
TrashCaster
Members-
Posts
115 -
Joined
-
Last visited
Everything posted by TrashCaster
-
[1.7.10] Custom rendered block doesn't want to face east
TrashCaster replied to Kander16's topic in Modder Support
Why do you rotate on all three rotation axes? If you are rotating it from a yaw perspective, you rotate the Y axis. OpenGL rotation parameters are angle, x-factor, y-factor, z-factor, so to turn it, you do 90, 0, 1, 0. If you are correcting the orientation of the object because it renders in the wrong orientation from that, correct it with a rotation call before hand. Sometimes Minecraft has models upside down, and that can be fixed by scaling the X and Y axes by -1, and Z by 1. -
Just to be clear, Lex, your concern is deciding which mod would get the "priority" of the render changes, correct? I can try to think up something that could be implemented to introduce "compatibility" between mods. I'm thinking something along the lines of an animation registry with different compatibility parameters, like "mix", "dominant", "submissive", and so on. Like if you register an animation key for your mod, decide how that animation should "play with other mods", and have an event that fires on animation call to the correct mod with the animation name as a parameter.
-
[1.8] Random blockstates for multiple textures?
TrashCaster replied to zerofall's topic in Modder Support
Are you trying to randomly select a model/texture to make each block "unique", or do you want programmatic control of the texture? Minecraft's model system allows you to designate several models for 1 property definition line, and it will randomly pick a model using seeded ranomization, with the seed being fetched from the coordinates. This page has a little run-down of it. So to sum it up, when the game looks for models, it looks for JSON objects (denoted by curly brackets), but it also looks for a JSON array (denoted by square brackets) of these JSON objects. So rather than "on=true": {"model":"mymodel"} You can do "on=true": [{"model":"mymodel"}, {"model":"mymodel2"}, {"model":"mymodel3"}] -
The player model. The various ModelRenderer parts. If we could change that before the render based on certain conditions, such as certain items being equipped, or certain other attributes. Player size too, by calling GlStateManager.scale(), and so on. Otherwise we are using RenderPlayer API, and I feel it would be best to have an event fired from Forge, rather than have an "API mod" to handle it. This way it would always behave as intended, and it would mean that any bugs that are fixed remain consistent, and not have to wait for an update to said "API mod".
-
If you issue is solved, please update your title. It should be [solved] 1.8 | NPO with model registration.
-
So in my mod, I am making my item have -2 damage. Basically, that'll prevent the item from dealing damage. However, because it is classified as a tool, it adds an extra blank line to separate the upper items in the tooltip list from the attack-damage list item. The attack-damage list item won't get added when the "+damage" is 0, ie., when you set it to -2. So you are left with a blank line at the bottom of the tooltip. This is the same for any modifier. The fix is just to make the blank line not get added unless a modifier is not 0. An ideal way of doing this is to create a second tooltip array list, and only add the modifier tooltip items to that. Then, when the modifiers are done, check if the list is empty or not. If it isn't, then add the blank line, and all the elements into the original list. EDIT: I forgot to mention which version. I tested in 1.8-11.14.3.1551
-
In the Render Player class, we have 2 events. The first one is called right at the beginning of the method, and the second at the very end. My proposal is to add one "in-between". Particularly, after the function call that updates the player model (func_177137_d), but before the player is rendered (super.doRender). This would give us the ability to change the model transforms before the render has occurred. Otherwise, we have to cancel the render, and re-render with our own code. And I am almost certain this could conflict with other mods with the same goals. If there is another way to do this, by all means, share. But if the only way to do this is with awkward, and ridiculous work arounds, then I think this is a very fair proposal.
-
[1.8] Model/Texture Problems (blocks, items, GUI-es)
TrashCaster replied to Kethas's topic in Modder Support
There is so much wrong with your code. First off, common proxy and server proxy are the same. You don't need 2 files. Second, never register client code from the server side. In your item class you are defining the models, which should be done in your client proxy. Third, you still haven't replaced your use of "substring". If your GitHub is out-dated, update it. I'm looking at the code that's on there now, and nothing is going to work right with the way you have it set up. -
Check for .equals The equals operand checks for the same instance, or location in memory. The equals function is something that can, and I'm pretty sure is, overriden in the block class, to handle these types of scenarios.
-
[1.8] Model/Texture Problems (blocks, items, GUI-es)
TrashCaster replied to Kethas's topic in Modder Support
First off, your registration is calling getUnlocalizedName().substring(5). The first argument in substring is the start index. So you are starting at index 5. If you want to shave off the .name, you need to use (0,getUnlocalizedName().length()-5) to signify starting at 0, and ending 5 indices short of the name length, thus "amputating" .name. Lastly, and this is only one developer trying to be informative to another, your package layout is very difficult to follow. It's much easier for us to help you, if you help us by keeping close to standard programming conventions. It's more of a distraction, and keeps our focus off of finding the problem, and more onto trying to decipher your formatting. -
Of course. But I wanted to avoid "magic numbers", in case if OP didn't know where the 5 came from.
-
I believe the issue might be registering the items with getUnlocalizedName since that is, by default, going to return whatever name you specified for the item, plus .name Try changing that to a literal string, or use .substring(0,getUnlocalizedName().length()-".name".length()), or something of the sorts.
-
why can't use LivingDeathEvent on server?
TrashCaster replied to zlappedx3's topic in Modder Support
Also, your event variable shouldn't be called entity. Just saying. -
Best way to interpolate between 2 positions?
TrashCaster replied to thebest108's topic in Modder Support
Like diezieben07 said, interpolate between old and new variables. The way it is usually done in Minecraft is, for example, with rotation: float renderYaw = entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw)*partialTicks; So you use the same formula for position, scale, rotation, all that. -
It is returning "this" though. Derp, so it is. For now, I'd just troubleshoot with the ISmartItemModel and get rid of IPerspectiveAwareModel. Try returning true from #isBuiltInRenderer and see if that changes anything. Since my model only has two states, I decided to just use model variants and metadata. Thanks though.
-
[spoiler=voxelizer.json] { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "textures": { "particle": "tsm:items/voxelizer", "layer0": "tsm:items/voxelizer" }, "display": { "thirdperson": { "rotation": [ 90, -90, 90 ], "translation": [ 0.3, 4, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 20, -40, 10 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] }, "gui": { "rotation": [ 10, -10, 10 ], "translation": [ -4, -3, 2 ], "scale": [ 1.2, 1.2, 1.2 ] } }, "elements": [ { "name": "barrel_b", "from": [ 7.0, 5.0, 0.0 ], "to": [ 9.0, 6.0, 12.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 2.0, 1.0, 4.0 ], "rotation": 90 }, "east": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 3.0 ] }, "south": { "texture": "layer0", "uv": [ 0.0, 2.0, 1.0, 4.0 ], "rotation": 90 }, "west": { "texture": "layer0", "uv": [ 0.0, 2.0, 5.0, 3.0 ] }, "up": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 3.0 ] }, "down": { "texture": "layer0", "uv": [ 0.0, 3.0, 4.0, 4.0 ] } } }, { "name": "barrel_t", "from": [ 7.0, 10.0, 0.0 ], "to": [ 9.0, 11.0, 12.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 2.0, 1.0, 4.0 ], "rotation": 90 }, "east": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 3.0 ] }, "south": { "texture": "layer0", "uv": [ 0.0, 2.0, 1.0, 4.0 ], "rotation": 90 }, "west": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 3.0 ] }, "up": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 4.0 ] }, "down": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 4.0 ] } } }, { "name": "barrel_w", "from": [ 5.0, 7.0, 0.0 ], "to": [ 6.0, 9.0, 12.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 2.0, 1.0, 4.0 ] }, "east": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 4.0 ] }, "south": { "texture": "layer0", "uv": [ 3.0, 2.0, 4.0, 4.0 ] }, "west": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 4.0 ] }, "up": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 3.0 ] }, "down": { "texture": "layer0", "uv": [ 0.0, 3.0, 4.0, 4.0 ] } } }, { "name": "barrel_e", "from": [ 10.0, 7.0, 0.0 ], "to": [ 11.0, 9.0, 12.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 4.0 ] }, "east": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 4.0 ] }, "south": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 4.0 ] }, "west": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 4.0 ] }, "up": { "texture": "layer0", "uv": [ 0.0, 3.0, 4.0, 4.0 ] }, "down": { "texture": "layer0", "uv": [ 0.0, 2.0, 4.0, 3.0 ] } } }, { "name": "barrel_tw", "from": [ 5.0, 6.0, 2.0 ], "to": [ 6.0, 10.0, 13.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": -45.0 }, "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "east": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "south": { "texture": "layer0", "uv": [ 3.0, 0.0, 4.0, 2.0 ] }, "west": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "up": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 1.0 ] }, "down": { "texture": "layer0", "uv": [ 0.0, 1.0, 4.0, 2.0 ] } } }, { "name": "barrel_bw", "from": [ 5.0, 6.0, 2.0 ], "to": [ 6.0, 10.0, 13.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": 45.0 }, "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "east": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "south": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "west": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "up": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "down": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] } } }, { "name": "barrel_te", "from": [ 10.0, 6.0, 2.0 ], "to": [ 11.0, 10.0, 13.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": 45.0 }, "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "east": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "south": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "west": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "up": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "down": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] } } }, { "name": "barrel_be", "from": [ 10.0, 6.0, 2.0 ], "to": [ 11.0, 10.0, 13.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": -45.0 }, "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "east": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "south": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "west": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "up": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "down": { "texture": "layer0", "uv": [ 0.0, 0.0, 4.0, 2.0 ] } } }, { "name": "core", "from": [ 7.0, 7.0, 3.0 ], "to": [ 9.0, 9.0, 15.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 4.0, 1.0, 5.0, 2.0 ] }, "east": { "texture": "layer0", "uv": [ 4.0, 1.0, 9.0, 2.0 ] }, "south": { "texture": "layer0", "uv": [ 4.0, 1.0, 5.0, 2.0 ] }, "west": { "texture": "layer0", "uv": [ 4.0, 1.0, 9.0, 2.0 ] }, "up": { "texture": "layer0", "uv": [ 4.0, 1.0, 9.0, 2.0 ], "rotation": 90 }, "down": { "texture": "layer0", "uv": [ 4.0, 1.0, 9.0, 2.0 ], "rotation": 90 } } }, { "name": "handle", "from": [ 6.5, -4.0, 14.0 ], "to": [ 9.5, 3.0, 17.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "x", "angle": -22.5 }, "faces": { "north": { "texture": "layer0", "uv": [ 8.0, 2.0, 12.0, 6.0 ] }, "east": { "texture": "layer0", "uv": [ 8.0, 2.0, 12.0, 6.0 ] }, "south": { "texture": "layer0", "uv": [ 8.0, 2.0, 12.0, 6.0 ] }, "west": { "texture": "layer0", "uv": [ 8.0, 2.0, 12.0, 6.0 ] }, "up": { "texture": "layer0", "uv": [ 8.0, 2.0, 12.0, 6.0 ] }, "down": { "texture": "layer0", "uv": [ 8.0, 2.0, 12.0, 6.0 ] } } }, { "name": "container_cap_1", "from": [ 5.0, 5.0, 15.0 ], "to": [ 11.0, 11.0, 16.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 4.0, 2.0, 8.0, 6.0 ] }, "east": { "texture": "layer0", "uv": [ 4.0, 2.0, 5.0, 6.0 ] }, "south": { "texture": "layer0", "uv": [ 4.0, 2.0, 8.0, 6.0 ] }, "west": { "texture": "layer0", "uv": [ 7.0, 2.0, 8.0, 6.0 ] }, "up": { "texture": "layer0", "uv": [ 4.0, 2.0, 8.0, 3.0 ] }, "down": { "texture": "layer0", "uv": [ 4.0, 5.0, 8.0, 6.0 ] } } }, { "name": "grip", "from": [ 7.0, 0.0, 7.0 ], "to": [ 9.0, 5.0, 9.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 8.0, 4.0, 9.0 ] }, "east": { "texture": "layer0", "uv": [ 0.0, 8.0, 4.0, 9.0 ] }, "south": { "texture": "layer0", "uv": [ 0.0, 8.0, 4.0, 9.0 ] }, "west": { "texture": "layer0", "uv": [ 0.0, 8.0, 4.0, 9.0 ] }, "up": { "texture": "layer0", "uv": [ 0.0, 8.0, 2.0, 9.0 ] }, "down": { "texture": "layer0", "uv": [ 2.0, 8.0, 4.0, 9.0 ] } } }, { "name": "core_guard", "from": [ 7.0, 7.0, 7.0 ], "to": [ 9.0, 9.0, 15.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": -45.0 }, "faces": { "north": { "texture": "layer0", "uv": [ 4.0, 0.0, 5.0, 1.0 ] }, "east": { "texture": "layer0", "uv": [ 4.0, 0.0, 9.0, 1.0 ] }, "south": { "texture": "layer0", "uv": [ 8.0, 0.0, 9.0, 1.0 ] }, "west": { "texture": "layer0", "uv": [ 4.0, 0.0, 9.0, 1.0 ] }, "up": { "texture": "layer0", "uv": [ 4.0, 0.0, 9.0, 1.0 ], "rotation": 90 }, "down": { "texture": "layer0", "uv": [ 4.0, 0.0, 9.0, 1.0 ], "rotation": 90 } } }, { "name": "trigger", "from": [ 7.5, 6.0, 15.5 ], "to": [ 8.5, 8.0, 16.5 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "x", "angle": 22.5 }, "faces": { "north": { "texture": "layer0", "uv": [ 10.0, 0.0, 11.0, 1.0 ] }, "east": { "texture": "layer0", "uv": [ 10.0, 0.0, 11.0, 1.0 ] }, "south": { "texture": "layer0", "uv": [ 11.0, 0.0, 12.0, 1.0 ] }, "west": { "texture": "layer0", "uv": [ 10.0, 0.0, 11.0, 1.0 ] }, "up": { "texture": "layer0", "uv": [ 10.0, 0.0, 11.0, 1.0 ] }, "down": { "texture": "layer0", "uv": [ 10.0, 0.0, 11.0, 1.0 ] } } }, { "name": "trigger_guard", "from": [ 7.0, 2.0, 13.0 ], "to": [ 9.0, 6.0, 17.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 4.0, 1.0, 8.0 ] }, "east": { "texture": "layer0", "uv": [ 0.0, 4.0, 4.0, 8.0 ] }, "south": { "texture": "layer0", "uv": [ 3.0, 4.0, 4.0, 8.0 ] }, "west": { "texture": "layer0", "uv": [ 0.0, 4.0, 4.0, 8.0 ] }, "up": { "texture": "layer0", "uv": [ 0.0, 4.0, 4.0, 5.0 ] }, "down": { "texture": "layer0", "uv": [ 0.0, 7.0, 4.0, 8.0 ] } } } ] } [spoiler=voxelizer_container.json] { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "textures": { "particle": "tsm:items/voxelizer", "layer0": "tsm:items/voxelizer" }, "display": { "thirdperson": { "rotation": [ 90, -90, 90 ], "translation": [ 0.3, 4, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 20, -40, 10 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] }, "gui": { "rotation": [ 10, -10, 10 ], "translation": [ -4, -3, 2 ], "scale": [ 1.2, 1.2, 1.2 ] } }, "elements": [ { "name": "container_cap_2", "from": [ 5.0, 5.0, 23.0 ], "to": [ 11.0, 11.0, 24.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 4.0, 2.0, 8.0, 6.0 ] }, "east": { "texture": "layer0", "uv": [ 4.0, 2.0, 5.0, 6.0 ] }, "south": { "texture": "layer0", "uv": [ 4.0, 2.0, 8.0, 6.0 ] }, "west": { "texture": "layer0", "uv": [ 7.0, 2.0, 8.0, 6.0 ] }, "up": { "texture": "layer0", "uv": [ 4.0, 2.0, 8.0, 3.0 ] }, "down": { "texture": "layer0", "uv": [ 4.0, 5.0, 8.0, 6.0 ] } } }, { "name": "container_guard", "from": [ 6.0, 6.0, 16.0 ], "to": [ 10.0, 10.0, 23.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 12.0, 0.0, 13.0, 1.0 ] }, "east": { "texture": "layer0", "uv": [ 12.0, 0.0, 16.0, 1.0 ] }, "south": { "texture": "layer0", "uv": [ 15.0, 0.0, 16.0, 1.0 ] }, "west": { "texture": "layer0", "uv": [ 12.0, 0.0, 16.0, 1.0 ] }, "up": { "texture": "layer0", "uv": [ 12.0, 0.0, 16.0, 1.0 ] }, "down": { "texture": "layer0", "uv": [ 12.0, 0.0, 16.0, 1.0 ] } } }, { "name": "container_core", "from": [ 6.0, 6.0, 16.0 ], "to": [ 10.0, 10.0, 23.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": -45.0 }, "faces": { "north": { "texture": "layer0", "uv": [ 12.0, 1.0, 13.0, 2.0 ] }, "east": { "texture": "layer0", "uv": [ 12.0, 1.0, 16.0, 2.0 ] }, "south": { "texture": "layer0", "uv": [ 15.0, 1.0, 16.0, 2.0 ] }, "west": { "texture": "layer0", "uv": [ 12.0, 1.0, 16.0, 2.0 ] }, "up": { "texture": "layer0", "uv": [ 12.0, 1.0, 16.0, 2.0 ] }, "down": { "texture": "layer0", "uv": [ 12.0, 1.0, 16.0, 2.0 ] } } } ] } public class VoxelizerSmartItemModel implements ISmartItemModel, IPerspectiveAwareModel { public VoxelizerSmartItemModel(IBakedModel i_baseModel, IBakedModel i_containerModel) { baseModel = i_baseModel; containerModel = i_containerModel; } public static final ModelResourceLocation BASE = new ModelResourceLocation( TSM.MODID + ":" + TSM.voxelizer.getName(), "inventory"); public static final ModelResourceLocation CONTAINER = new ModelResourceLocation( TSM.MODID + ":" + TSM.voxelizer.getName() + "_container", "inventory"); @SuppressWarnings("deprecation") @Override public IBakedModel handleItemState(ItemStack stack) { hasContainer = false; if (stack != null && stack.getTagCompound() != null) { NBTTagCompound tag = stack.getTagCompound(); if (tag.hasKey("Container", Constants.NBT.TAG_COMPOUND)) { hasContainer = true; } } return this; } @Override public TextureAtlasSprite getTexture() { return baseModel.getTexture(); } @Override public List getFaceQuads(EnumFacing enumFacing) { return baseModel.getFaceQuads(enumFacing); } @Override public List getGeneralQuads() { List<BakedQuad> combinedQuadsList = new ArrayList(baseModel.getGeneralQuads()); if (hasContainer) { combinedQuadsList.addAll(containerModel.getGeneralQuads()); } return combinedQuadsList; } @Override public boolean isAmbientOcclusion() { return baseModel.isAmbientOcclusion(); } @Override public boolean isGui3d() { return baseModel.isGui3d(); } @Override public boolean isBuiltInRenderer() { return false; } @Override public ItemCameraTransforms getItemCameraTransforms() { return baseModel.getItemCameraTransforms(); } @Override public Pair<IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) { switch (cameraTransformType) { case FIRST_PERSON: RenderItem.applyVanillaTransform(baseModel.getItemCameraTransforms().firstPerson); return Pair.of(baseModel, null); case GUI: // only this one returns the layered model RenderItem.applyVanillaTransform(baseModel.getItemCameraTransforms().gui); return Pair.of(baseModel, null); case HEAD: RenderItem.applyVanillaTransform(baseModel.getItemCameraTransforms().head); return Pair.of(baseModel, null); case THIRD_PERSON: RenderItem.applyVanillaTransform(baseModel.getItemCameraTransforms().thirdPerson); return Pair.of(baseModel, null); default: break; } return Pair.of(baseModel, null); } private boolean hasContainer = false; private IBakedModel baseModel; private IBakedModel containerModel; } Both models are rendering merged, as wanted. But they aren't using the transforms in the JSON files. The transforms work when I don't replace the model with the ISmartItemModel. In my first test, I didn't implement IPerspectiveAwareModel, and in the second test, I did. They both had the same results. Is there a fix?
-
You should probably shorten it, just to be safe. For example, your mod ID could be "amb", and your channel could be MODID+"net". Also, with mod ID, you should keep it all lowercase. This is the domain for your resource locations, and keeping it in convention with Minecraft's domain is better.
-
I believe OP was referring to each world having a unique identifier (same ID for all dimensions), so if someone deleted their world, re-creating one with the same generation settings would still result in a different world, since they'd have a unique identifier generated upon creation.
-
I have no idea what this does. The entity will be null if no entity with that ID exists on the client. Show where you send the packet. Actually I just want to get the worldobj object. Where can I get it from when in an iMessage? That depends. Are you calling that from the server side, or the client side?
-
What you could do, if it's something you want to implement, just check the System.currentMillis upon making a world, and use that in NBT of the world save (if that's possible), or in some kind of world-save file. That should provide enough "uniqueness" that you can identify a world with. But there is no UUID for worlds.
-
[1.8] Get all EntityLiving entities near a pos
TrashCaster replied to ThatBenderGuy's topic in Modder Support
for (EntityLivingBase e:world.getEntities(EntityLivingBase.class, new Predicate<EntityLivingBase>() { @Override public boolean apply(EntityLivingBase input) { return (input.getDistanceToEntity(player) <= DISTANCE); } })) { // Do stuff } It's not super clean or elegant, but it does work. Just make sure you get the right imports. -
Minecraft not launching, instead giving me these scripts(?)
TrashCaster replied to Laatikko's topic in Support & Bug Reports
First of all, wrong section. Second of all, make sure you installed Forge, and not ForgeModLoader. -
I'm trying to make something where I hold right click on my item, and if it isn't my tile entity, it will replace that block with my tile entity, and store the previous block type/state in NBT on the TileEntity (for restoring, and for rendering). When it is my tile entity, it should increment a float on the tile entity, and then update it on both client and server. What's currently happening is it is removing the block for a second, going back to the original block, and then setting to air. (My tile entity defaults the stored block to air). So somewhere along the lines, the tile entity isn't being updated properly. As usual, my GitHub is at: https://github.com/TrashCaster/TheStuffMod-2.0