mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixed Reinforced Spawners
This commit is contained in:
parent
d20650855c
commit
1389085932
@ -36,6 +36,7 @@
|
||||
* Fixed #2164
|
||||
* Fixed #2147
|
||||
* Fixed #2179
|
||||
* Fixed Reinforced Spawners not working sometimes
|
||||
|
||||
## Release Candidate 15 (01 Aug 2020)
|
||||
|
||||
|
@ -38,15 +38,15 @@ public class RepairedSpawner extends SimpleSlimefunItem<BlockPlaceHandler> {
|
||||
|
||||
@Override
|
||||
public void onPlayerPlace(BlockPlaceEvent e) {
|
||||
onPlace(e);
|
||||
onPlace(e.getItemInHand(), e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacerPlace(BlockPlacerPlaceEvent e) {
|
||||
onPlace(e);
|
||||
onPlace(e.getItemStack(), e);
|
||||
}
|
||||
|
||||
private void onPlace(BlockEvent e) {
|
||||
private void onPlace(ItemStack item, BlockEvent e) {
|
||||
Optional<EntityType> entity = getEntityType(item);
|
||||
|
||||
if (entity.isPresent() && e.getBlock().getType() == Material.SPAWNER) {
|
||||
|
Loading…
Reference in New Issue
Block a user