mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
49 lines
1.2 KiB
Java
49 lines
1.2 KiB
Java
package com.hbm.entity.cart;
|
|
|
|
import com.hbm.blocks.ModBlocks;
|
|
import com.hbm.items.ModItems;
|
|
import com.hbm.main.MainRegistry;
|
|
|
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.world.World;
|
|
|
|
public class EntityMinecartDestroyer extends EntityMinecartContainerBase {
|
|
|
|
public EntityMinecartDestroyer(World p_i1712_1_) {
|
|
super(p_i1712_1_);
|
|
}
|
|
|
|
public EntityMinecartDestroyer(World world, double x, double y, double z) {
|
|
super(world, x, y, z);
|
|
}
|
|
|
|
@Override
|
|
public boolean interactFirst(EntityPlayer player) {
|
|
if(net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, player)))
|
|
return true;
|
|
if(!this.worldObj.isRemote) {
|
|
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModItems.guiID_cart_destroyer, worldObj, this.getEntityId(), 0, 0);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public Block func_145817_o() {
|
|
return ModBlocks.machine_shredder;
|
|
}
|
|
|
|
@Override
|
|
public int getSizeInventory() {
|
|
return 18;
|
|
}
|
|
|
|
@Override
|
|
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
|
return false;
|
|
}
|
|
}
|