-
Posts
884 -
Joined
-
Last visited
-
Days Won
9
Everything posted by Jay Avery
-
Post the entire fml-client-latest.log.
-
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.
-
The position is just moved in the relevant direction, so you can do pos.offset(facing).
-
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.
-
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.
-
[SOLVED] item doesn't render properly in inventory
Jay Avery replied to AkaliSucks's topic in Modder Support
Post the latest log again. -
[SOLVED] item doesn't render properly in inventory
Jay Avery replied to AkaliSucks's topic in Modder Support
Don't use Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register. Instead use ModelLoader.setCustomModelResourceLocation (it takes the same arguments) in preInit or ModelRegistryEvent. -
[SOLVED] item doesn't render properly in inventory
Jay Avery replied to AkaliSucks's topic in Modder Support
Where and how do you register your item model? Does the block display correctly in the world? -
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.
-
Where do you register your fluid rendering (state mappers etc)?
-
[1.12] Make a block drop itself when mined by hand
Jay Avery replied to DragonFerocity's topic in Modder Support
Step into that method in the debugger and find out why it's returning false. -
[1.12] Metadata Blockstates Not Working Properly
Jay Avery replied to DragonFerocity's topic in Modder Support
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". -
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.
-
What happens when you set a breakpoint at getActualState, does it get hit? Are you using the @Override annotation?
-
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?
-
Defining BlockStateContainer from constructor parameters
Jay Avery replied to Jay Avery's topic in Modder Support
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. -
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?
-
1.10.2(SOLVED)help with language issues on my item
Jay Avery replied to TheRPGAdventurer's topic in Modder Support
Show the code where you create and register the item which isn't working. -
How many tickable tileentities are too many?
Jay Avery replied to Jay Avery's topic in Modder Support
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? -
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.
-
[1.10.2] data beetween gui and tileEntity
Jay Avery replied to personnedu13's topic in Modder Support
Your packet needs to also include an empty public constructor (one with no parameters which does nothing). -
[1.10.2] data beetween gui and tileEntity
Jay Avery replied to personnedu13's topic in Modder Support
You need to pass the data to the packet constructor, so that it can send the information to the server. -
[1.10.2] data beetween gui and tileEntity
Jay Avery replied to personnedu13's topic in Modder Support
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. -
[1.10.2] data beetween gui and tileEntity
Jay Avery replied to personnedu13's topic in Modder Support
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? -
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?