Jump to content

TamsynnImogen

Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

TamsynnImogen's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. so i got custom signs to work if i use a vanilla wood type. when i try and add my own wood type i get an error upon loading a world that states that theres missing registered blocks when there present @Mod(NetherFarming.MOD_ID) public class ModWoodTypes { public static final String MOD_ID = "netherfarming"; public static final WoodType BLOODBARK = WoodType.create(new ResourceLocation(MOD_ID, "signs").toString()); private void clientSetup(final FMLClientSetupEvent event) { ClientRegistry.bindTileEntityRenderer(ModTileEntitites.SIGN_TILE_ENTITIES.get(), SignTileEntityRenderer::new); event.enqueueWork(() -> { Atlases.addWoodType(BLOODBARK); }); } private void commonSetup(final FMLCommonSetupEvent event) { event.enqueueWork(() -> WoodType.register(BLOODBARK)); } } full project code (minus the custom woodtype code https://github.com/TamsynnImogen/NetherFarming
  2. 1) thats potentially my fault just trying to figure things out and messing things up (i think ive tried like 4 different ways to try and get these to work 2) pretty sure thats what ive used this time just had to up date some minor bits like stackTo(16) to maxStackSize(16) etc
  3. Hi all ive been trying to get a custom sign to work for a while and just cant seem to get it. The latest attempt ive got as far as load or create world and just crashes stating that other items arnt present (no idea what that means since there all there and work find when ive disabled the custom sign stuff) heres the github repo as probably easier to see what ive got there https://github.com/TamsynnImogen/NetherFarming
  4. well for some reason with the 1st option it didnt work but when used the second option it worked. im not questioning it as long as it works for now is good enough for me
  5. oh ok well ive fixed it anyway all it was instead of if (block.equals(Blocks.SOUL_SOIL)) i used if (block == (Blocks.SOUL_SOIL)) and it works (probably could remove the brackes around Blocks.SOUL_SOIL but was just a v quick test i'll look into what you susgested later though as its probably better but for now im just glad it worked
  6. so you can add things like IGrowable to vanilla blocks? i'll look into it after i finish work tonight
  7. the fertilized soul soil allows crops to grow on it. original plan was to get soul soil to be tillable and then get it so it acts like farmland but needing lava instead of water but couldnt figure out how to get it to be tillable so changed the plan and got it so you craft it with bone meal to make it fertilized and that'll take over wich worked but thought would be more fun to have it instead of a crafting recipe to get it done in world sortta thing
  8. hi im trying to get it so that when i use bonemeal on soul soil it turns into ferilized soul soil i can get it so when i use bone meal on any block it changes to fertilized soul soil but as as soon as i try to restrict it to only soul soil it stops working @SubscribeEvent public void onSoulSoilClick(PlayerInteractEvent.RightClickBlock e) { World world = e.getWorld(); PlayerEntity player = e.getPlayer(); ItemStack hand = e.getItemStack(); BlockPos targetpos = e.getPos(); BlockState state = world.getBlockState(targetpos); Block block = state.getBlock(); if (world.isRemote) { return; } if (!hand.getItem().equals(Items.BONE_MEAL)) { return; } if (block.equals(Blocks.SOUL_SOIL)) { world.setBlockState(targetpos, ModBlocks.FERTILE_SOUL_SOIL.get().getDefaultState()); } } @SubscribeEvent public void onSoulSoilClick(PlayerInteractEvent.RightClickBlock e) { World world = e.getWorld(); PlayerEntity player = e.getPlayer(); ItemStack hand = e.getItemStack(); BlockPos targetpos = e.getPos(); BlockState state = world.getBlockState(targetpos); Block block = state.getBlock(); if (world.isRemote) { return; } if (!hand.getItem().equals(Items.BONE_MEAL)) { return; } if (block.equals(Blocks.SOUL_SOIL)) { world.setBlockState(targetpos, ModBlocks.FERTILE_SOUL_SOIL.get().getDefaultState()); } if (!player.isCreative()) { hand.shrink(1); } }
  9. import javax.annotation.Nullable; public class ModStrippedBlock extends RotatedPillarBlock { private final BlockState stripped; public ModStrippedBlock(BlockState state, Properties properties) { super(properties); this.stripped = properties; state.with(stripped) } @Override @Nullable public BlockState getToolModifiedState(BlockState state, World world, BlockPos pos, PlayerEntity player, ItemStack stack, ToolType toolType) { return toolType == ToolType.AXE ? stripped : null; i was doing that but ive fixed it now so not to worry
  10. i did read the solution but didnt get it when i tried to do what i thought the solution meant it just threw up errors, thats why i originally posted there as didnt understand what the solution meant
  11. Hi all im fairly new to modding mine craft and struggling with stripped logs as now ive got them to actually strip they return upwardsany help would be welcome the stripped class: public class ModStrippedBlock extends RotatedPillarBlock { private final BlockState stripped; public ModStrippedBlock(BlockState state, Properties properties) { super(properties); this.stripped = state; } @Override @Nullable public BlockState getToolModifiedState(BlockState state, World world, BlockPos pos, PlayerEntity player, ItemStack stack, ToolType toolType) { return toolType == ToolType.AXE ? stripped : null; } } and the block: public static final RegistryObject<Block> REDWOOD_LOG = register("redwood_log", ()-> new ModStrippedBlock(STRIPPED_REDWOOD_LOG.get().getDefaultState(), AbstractBlock.Properties.create(Material.WOOD) .hardnessAndResistance(0.5f,2.0f) .harvestTool(ToolType.AXE) .harvestLevel(0)));
  12. Hi all im having the same issue with mine although its a tree log. im very new to modding minecraft and not quite sure on what you mean with the solution
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.