Jump to content

Jay Avery

Members
  • Posts

    884
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Jay Avery

  1. Post the entire fml-client-latest.log.
  2. Is this the location of your blockstates file? If so, it's in the wrong place - it needs to be in assets/[modid]/blockstates/[registry_name].json.
  3. The position is just moved in the relevant direction, so you can do pos.offset(facing).
  4. The list of "bites" variants should be inside curly braces {}, not square ones []. Every variant (except the last one) should have a comma after the closing brace. This is a json syntax error which would be caught if you run your json file through jsonlint or a json plugin in your IDE.
  5. What's the difference between this- BlockPos north = pos.north(branchLength); ... IBlockState nState = world.getBlockState(north); ... if (nState.getBlock().isAir(nState, world, north) || nState.getBlock().isLeaves(nState, world, north)) { this.setBlockAndNotifyAdequately(world, pos.north(branchLength).up(branchHeight), LOG); } - and this - BlockPos east = pos.east(branchLength); ... IBlockState eState = world.getBlockState(east); ... if (eState.getBlock().isAir(eState, world, east) || eState.getBlock().isLeaves(eState, world, east)) { this.setBlockAndNotifyAdequately(world, pos.east(branchLength).up(branchHeight), LOG); } ? The only difference is that every instance of north in the first example is replaced with east in the second example. You could streamline this by looping through the horizontal directions (EnumFacing.HORIZONTALS), and write out this procedure just once inside the loop.
  6. Don't use Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register. Instead use ModelLoader.setCustomModelResourceLocation (it takes the same arguments) in preInit or ModelRegistryEvent.
  7. Where and how do you register your item model? Does the block display correctly in the world?
  8. In this method, you check whether your slab is not double - then if it is not double you don't store the half in metadata. Then in the corresponding read method you ignore the metadata if the slab is not double.
  9. Where do you register your fluid rendering (state mappers etc)?
  10. Step into that method in the debugger and find out why it's returning false.
  11. You are setting the variant to "acacia", but your blockstates file doesn't have such a variant - it has a "type" variant with possible values of "acacia", "oak", etc. You either need to have "acacia" as a top-level variant in the blockstates file, or set the variant to "type=acacia".
  12. I'm starting to update my mod to 1.12 and recipes are obviously one of the biggest changes. My mod has a bunch of different crafting devices which each have their own recipes (none of them use the vanilla CraftingManager). Is there any way to put my own recipes in tabs of the vanilla recipe book and associate them with the correct crafting device to function like other vanilla recipes? I've looked through the recipe book code and it looks pretty hardcoded to vanilla inventory and crafting table recipes. I'm a bit irritated about the recipe book because it seems like a somewhat less-functional and less-adaptive version of JEI, which I just finished incorporating into my mod! Is Forge likely to make the recipe book any easier to add recipe categories to in future updates (more like JEI)? Or shall I just resign myself to ignoring the recipe book entirely and telling people to use JEI if they need recipe help? Sorry I know this question is a bit vague. I guess I just want input on how much I should worry about incorporating or ignoring the 1.12 recipe book to my recipe system.
  13. What happens when you set a breakpoint at getActualState, does it get hit? Are you using the @Override annotation?
  14. How do you know the property isn't being set to true? Where are you checking this? Have you tried setting a breakpoint in the method to check whether it gets called?
  15. I have a sort of workaround. I'm constructing my own BlockStateContainer in my constructor (using my parameters), and then overriding getBlockState to return mine instead of Block#blockState. Although I also have to check if mine is null (meaning the method is being called from the super constructor) and return the default version if that's the case (which will then be ignored, but otherwise the super constructor throws an NPE). It's messy but, still less messy than making 10+ subclasses to override one method.
  16. I have a block type with several instances that have different properties which I set in the constructor. I want the IPropertys that go into the BlockStateContainer to be dependent on the constructor parameters (nothing else needs to be overriden so I don't have subclasses), but createBlockState is called in the Block super constructor so that doesn't work. Is there any other way I can achieve this without having to manually override createBlockState for every instance of my block?
  17. Show the code where you create and register the item which isn't working.
  18. Ohh, thanks. So if I do that, then the TE will be created when the blockstate changes to the TE-requiring state, and removed when it changes back? Do I need to do anything manually to make sure it happens correctly?
  19. I know that tickable things are obviously a lot more performance-intensive than, say, static blocks. I'm working on the way trees generate, and one approach I'm considering involves each tree having an associated tickable tileentity. In it's generated state, the only thing the update does is check a boolean property in the blockstate at its position and then return (the condition will only be true after the player interacts with the tree in some way). Will this simple check, but executed every tick for every tree, have a significant impact on performance? The other alternative is to have two different blocks which look and function the same except for tileentities - generate the one that has no tileentity, and turn it into the one with a tileentity when it's needed. But that would mean duplicating things and would be kind of confusing and illogical. I just don't really know how to judge the performance effects of things like this, so if anyone has input I'm all ears.
  20. Your packet needs to also include an empty public constructor (one with no parameters which does nothing).
  21. You need to pass the data to the packet constructor, so that it can send the information to the server.
  22. What is this? It's not even valid Java, this code should not compile. You are trying to call a field and a method which do not exist.
  23. To update values from the GUI, you need to send a packet to the server with the required information. What does your UpdateTe packet do?
  24. Sorry, I meant the fml log, found at logs/fml-client-latest.log. What exactly is the rendering problem, are the items showing the missing texture?
×
×
  • Create New...

Important Information

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