• Posts

    • So after thinking a lot today, I decided to revisit and take a closer look at what I am doing. It looks like perhaps I do want to extend from BlockDoor to simplify things. Here is my much simpler door and handler.   BlockInit package encom.grid.rezcraft; import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.BlockDoor; import net.minecraft.block.material.Material; public class BlockInit { public static final List<Block> BLOCKS= new ArrayList<Block>(); //Vanilla Door Replacer public static final BlockDoor ACACIA_DOOR = (BlockDoor) new BlockDoorBase("acacia_door", Material.WOOD); }   Subscriber   package encom.grid.rezcraft; import encom.grid.rezcraft.TestOre; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.util.ResourceLocation; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @Mod.EventBusSubscriber(modid = TestOre.MODID) public final class EventSubscriber { @SubscribeEvent static void onBlockRegister(final RegistryEvent.Register<Block> event) { event.getRegistry().register(new TestOre().setHardness(3.0F).setResistance(5.0F).setUnlocalizedName("oreIron").setRegistryName(new ResourceLocation("minecraft", "iron_ore"))); event.getRegistry().register(new TestOre().setHardness(3.0F).setResistance(5.0F).setUnlocalizedName("oreDiamond").setRegistryName(new ResourceLocation("minecraft", "diamond_ore"))); event.getRegistry().register(new BlockDoorBase("acacia_door", Material.WOOD).setHardness(3.0F).setUnlocalizedName("doorAcacia").setRegistryName(new ResourceLocation("minecraft", "acacia_door"))); } }   BlockDoorBase   package encom.grid.rezcraft; import java.util.Random; import net.minecraft.block.BlockDoor; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockDoorBase extends BlockDoor { public BlockDoorBase(String name, Material materialIn) { super(materialIn); BlockInit.BLOCKS.add(this); ItemInit.ITEMS.add(new ItemBlockDoor(this).setRegistryName(name)); } @Override public Item getItemDropped(IBlockState state, Random rand, int fortune) { return Item.getItemFromBlock(this); } @Override public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) { return new ItemStack(this); } @Override public boolean isTranslucent(IBlockState state) { return true; } @SideOnly(Side.CLIENT) @Override public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.TRANSLUCENT; } }     Edit: This is a block problem and I've apparently skipped out on some of the CreativeTabs stuff that I need to have *or* I didn't register it properly before preInit      
    • IHasModel is completely and utterly pointless. All it does is make you write the same 4 lines of code all over again for every item so that you can pass public values to a public function.
    • Hello I’m SideIntgral52 wanna to ask one more and again if herobrine is in the game,due to me finding shrines and appearances in my world. Herobrine only appeared when I made a hard survival mode world without cheats.
    • I'm going out on a limb. This looks like a certificate error and I've had certificate issues before because of a "Security Feature" from Comcast (my ISP) that was done poorly and was replacing a valid cert from the website with an invalid one from Comcast.
  • Topics

  • Who's Online (See full list)