/
Belyash5
/
Flu
Обзор
Документация
Войти
/
Belyash5
/
Flu
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/main/java/com/hbm/blocks/BlockContainerBase.java
26 строк
916 B
Bob
yeah whatever
06 янв 2022, 02:24
06 янв 2022, 02:24
49a07b6
Код
Авторство
О чём код?
package com.hbm.blocks; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public abstract class BlockContainerBase extends BlockBase implements ITileEntityProvider { protected BlockContainerBase(Material material) { super(material); this.isBlockContainer = true; } public void breakBlock(World world, int x, int y, int z, Block block, int meta) { super.breakBlock(world, x, y, z, block, meta); world.removeTileEntity(x, y, z); } public boolean onBlockEventReceived(World world, int x, int y, int z, int eventNo, int eventArg) { super.onBlockEventReceived(world, x, y, z, eventNo, eventArg); TileEntity tileentity = world.getTileEntity(x, y, z); return tileentity != null ? tileentity.receiveClientEvent(eventNo, eventArg) : false; } }