1
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:
TheBusyBiscuit 2020-08-02 22:01:32 +02:00
parent d20650855c
commit 1389085932
2 changed files with 4 additions and 3 deletions

View File

@ -36,6 +36,7 @@
* Fixed #2164
* Fixed #2147
* Fixed #2179
* Fixed Reinforced Spawners not working sometimes
## Release Candidate 15 (01 Aug 2020)

View File

@ -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) {