• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I have been experimenting a bit and replaced grass_blocks an stone and it causes strange errors STONE: stone generates fine but caves don't spawn inside the stone GRASS: grass blocks don't generate instead there is just a lighting glitch and when updated spawns a non-textured block that behaves like grass yet the block still shows up in the creative tab and can be placed like normal LEAVES: behaves normally when placed by player but will not be generated by growing trees   this is the method I am using to register these blocks   @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public class RegistryEvents { @ObjectHolder("minecraft:stone") public static final Block STONE_BLOCK = null; @ObjectHolder("minecraft:grass_block") public static final Block GRASS_BLOCK = null; @SubscribeEvent public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) { blockRegistryEvent.getRegistry().registerAll ( new Block(Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5.0f, 6.0F).sound(SoundType.STONE)).setRegistryName("minecraft:stone"), new GrassBlock(Block.Properties.create(Material.ORGANIC).tickRandomly().hardnessAndResistance(1.5F).sound(SoundType.PLANT)).setRegistryName("minecraft:grass_block") ); } @ObjectHolder("minecraft:stone") public static final Item STONE_ITEM = null; @ObjectHolder("minecraft:grass_block") public static final Block GRASS_ITEM = null; @SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll ( new BlockItemBase(STONE_BLOCK, ItemGroup.BUILDING_BLOCKS).setRegistryName("minecraft:stone"), new BlockItemBase(GRASS_BLOCK, ItemGroup.BUILDING_BLOCKS).setRegistryName("minecraft:grass_block") ); } } This is the  definition of BlockItemBase package com.Blocks; import net.minecraft.block.Block; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; public class BlockItemBase extends BlockItem { public BlockItemBase( Block blockIn, ItemGroup itemGroupIn) { super(blockIn, new Item.Properties().group(itemGroupIn)); } }   It seems to me that there is another step in registration that I am missing, unless minecraft's generation code surrounding these blocks is inflexible which I hop isn't the case
    • I've already created a custom ore but i want it to generate in the world like other ores would. How would i do this?
    • hello, a new modder here. So i've been in the process of making my first mod, when i hit a block. I can't figure out how to detect what a player is holding in their hand. I'm trying to make it so that when the player crouches and they are holding a sword in their hand they get strength and slowness. I've already tried to find an answer by looking it up on google, no luck.
    • When I open the jar folder it pops up the mod system installer and when I install client there it tells me that I have to run the version 1.6.4 manually at least once.
    • That is changeable in the player's attribute. Obtain the attribute via LivingEntity#getAttribute and pass in the REACH_DISTANCE in PlayerEntity to obtain the reach attribute. You can modify that to change block reach distance. Unfortunately I don't think there is a convenient method of changing the reach for entity interactions. You'll have to do some manual ray casting.
  • Topics

  • Who's Online (See full list)