GameRegistry.registerTileEntity(TileEntityFireplace.class, new ResourceLocation(DataReference.MODID+":fireplaceTE"));
to
GameRegistry.registerTileEntity(TileEntityFireplace.class, new ResourceLocation(DataReference.MODID+":fireplace"));
but if I run post-change Minecraft with a pre-change world I get the error
[15:23:33] [Server thread/WARN] [minecraft/TileEntity]: Skipping BlockEntity with id ftfloocraft:fireplace
and the TileEntity is gone, because there doesn't seem to be an opportunity to remap the pre-change TileEntity to the post-change ResourceLocation. MissingMappingsEvent didn't seem to fire for TileEntities. My only idea right now is to register the tile entity once with the old ResourceLocation and once with the old one, and then somehow migrate the NBT data over. Is there a better way?
Thanks for reading.
Beta for THE EVERYTHING FRAGILE UPDATE!
I recommend you use a new world for this, or at least back up your world: one line of text can change things dramatically!
In this version, you can make almost ANY block fragile.
Run Minecraft with this version of the mod.
Quit Minecraft.
Go to your game's config folder and see fragileglassft_blocklist.cfg for detailed instructions.
This a very drastic and sort of dangerous update so I've listed it as beta for now. But anyone who wanted a way to make actual glass fragile finally has one:
minecraft:glass break 0.165 0
Any feedback and suggestions, including for new (simple) crash behaviours, before I release this properly are very welcome!
I often forget to update this place; the best place to get updates now is my Twitter.
So then, the trick is getting the player model. As far as I can see you can only get that through RenderLivingBase#getMainModel, and you can only get a RenderLivingBase through RenderLivingEvent#getRenderer.
That seems like a lot of hassle; am I missing an easier way to get it?
I made a custom helmet which renders, but instead of rotating with the yaw of the player's head it rotates with the yaw of the whole body, which is not always the same thing...
I tried comparing entity.rotationYaw and entity.getRotationYawHead() but I got the same value. Another option is Math.atan2(lookVec) but when I use that the rotation goes completely out of sync in a way I can't really describe.
My last guess is it's to do with the rotation point of the model, but the tutorial I followed said to use (0, 0, 0) so I'm not sure that's wrong.
Here's my helmet code; does anyone know what's going on?
/**
* Conch - FredTargaryen
* Created using Tabula 7.0.0
*/
public class ModelConch extends ModelBiped {
public static final ResourceLocation CONCH_TEX = new ResourceLocation(DataReference.MODID + ":textures/armour/conch.png");
public ModelRenderer shape1;
public ModelRenderer shape2;
public ModelRenderer shape3;
public ModelRenderer shape6;
public ModelConch() {
this.textureWidth = 16;
this.textureHeight = 16;
this.shape2 = new ModelRenderer(this, 0, 0);
this.shape2.setRotationPoint(0.0F, 0.0F, 0.0F);
this.shape2.addBox(-5.0F, -4.0F, 0.0F, 2, 1, 1, 0.0F);
this.shape6 = new ModelRenderer(this, 5, 2);
this.shape6.setRotationPoint(0.0F, 0.0F, 0.0F);
this.shape6.addBox(-8.0F, -5.0F, 0.0F, 3, 3, 1, 0.0F);
this.shape3 = new ModelRenderer(this, 12, 0);
this.shape3.setRotationPoint(0.0F, 0.0F, 0.0F);
this.shape3.addBox(-9.0F, -4.0F, 0.0F, 1, 1, 1, 0.0F);
this.shape1 = new ModelRenderer(this, 6, 6);
this.shape1.setRotationPoint(0.0F, 0.0F, 0.0F);
this.shape1.addBox(-8.0F, -4.0F, 1.0F, 2, 2, 1, 0.0F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
Minecraft.getMinecraft().getTextureManager().bindTexture(CONCH_TEX);
this.shape2.render(f5);
this.shape6.render(f5);
this.shape3.render(f5);
this.shape1.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
That... would make a lot of sense. I'll think about it, but right now I don't think I can do it because glass doesn't have a TileEntity. If I find a solution I will update this reply.
EDIT: Just 12 months later, there is now a way to do this, as of the 1.12.2-1.10.0 beta!
I just released version 1.12.2-1.8.5; hope you enjoy! This mod updates worldgen; I recommend you delete your ftfragileglass.cfg file and get the new one.
Really big change list for this one; here we go. Ports for versions 1.11.2 and 1.10.2 will come in at least a few days.
Changes from version 1.8.1:
Drastic physics overhaul for all valid entities, letting them break through fragile blocks without losing speed
Modders can now use a Capability to define entities as able to trigger fragile blocks
Modders can now use a Capability to define tile entities as fragile
Fixed Sugar Cauldron blocks turning dark when solid blocks are adjacent
Each entity is only able to break blocks when its Capability says so
Each block can only be broken when its Capability says so (blocks get the final say)
Using pack.mcmeta and updated to version 3 of resources
Updated credits
Added legs to Sugar Cauldron model
Re-added Thin Ice to Creative menu
Added Spanish (Spain), Portuguese (Portugal) and French (France) localisation
Fixed cascading worldgen lag by moving patches so they don't cross into adjacent chunks
Added Weak Stone blocks, that fall after 1 second when walked on and
become gravel on landing. Crafted with 4 Stone Slabs in a square. Added
worldgen options; weak stone is disabled by default. If you enable it,
expect falls into lava!
Made Thin Ice much easier to fall through. Sneak or sink!
Fixed players not being able to break blocks unless they are in the air
Updated mcmod.info description
Increased maximum average ice (and stone) patch sizes from 10 to 14
Hello to any of you out there who still use this mod and check this thread! Sorry about the lack of updates.
The coming update brings Fragile Glass and Thin Ice to a state which is almost exactly as I envisioned it. That's pretty rare in programming so I'm really happy!
The main feature is an overhaul of the old glass "physics". Not only does fragile glass break ahead of a predicted collision, so that you can fire arrows through it properly or fall through a roof without hurting yourself and slowing down, but it now supports the Capability system, so modders can now easily make their own fragile blocks and entities that can break fragile blocks!
At the point of uploading I realised Forge 1.12.1 just came out, so I've basically put out a beta release for those of you who are still on 1.12 (1.12.1 might not be compatible). You can download it here; please let me know of any bugs you encounter.
Below is a rough list of changes since I last posted on this thread. If you'd rather just go and play the mod, enjoy. And thank you all for over 32000 downloads on Curse!
0
I want to change the line
to
but if I run post-change Minecraft with a pre-change world I get the error
and the TileEntity is gone, because there doesn't seem to be an opportunity to remap the pre-change TileEntity to the post-change ResourceLocation. MissingMappingsEvent didn't seem to fire for TileEntities. My only idea right now is to register the tile entity once with the old ResourceLocation and once with the old one, and then somehow migrate the NBT data over. Is there a better way?
Thanks for reading.
0
BETA VERSION 1.1-beta.2
[/b]
I often forget to update this place; the best place to get updates now is my Twitter.
0
VERSION 1.10.0 Beta
Beta for THE EVERYTHING FRAGILE UPDATE!I recommend you use a new world for this, or at least back up your world: one line of text can change things dramatically!
In this version, you can make almost ANY block fragile.
This a very drastic and sort of dangerous update so I've listed it as beta for now. But anyone who wanted a way to make actual glass fragile finally has one:
Any feedback and suggestions, including for new (simple) crash behaviours, before I release this properly are very welcome!
I often forget to update this place; the best place to get updates now is my Twitter.
0
VERSION 1.9.0[/b]
I often forget to update this place; the best place to get updates now is my Twitter.[/b]
0
I was trying to do that in the render function for the ModelConch above, which I return in getArmorModel for the ItemConch.
Trying the way you've explained has turned out to be a bit trickier than I thought.
To start listening I used
With the listening method in ModelConch:
For some reason it has the same effect as before, even though head.rotateAngleY and entityPlayer.rotationYaw are different. Very odd.
0
So then, the trick is getting the player model. As far as I can see you can only get that through RenderLivingBase#getMainModel, and you can only get a RenderLivingBase through RenderLivingEvent#getRenderer.
That seems like a lot of hassle; am I missing an easier way to get it?
0
I made a custom helmet which renders, but instead of rotating with the yaw of the player's head it rotates with the yaw of the whole body, which is not always the same thing...
I tried comparing entity.rotationYaw and entity.getRotationYawHead() but I got the same value. Another option is Math.atan2(lookVec) but when I use that the rotation goes completely out of sync in a way I can't really describe.
My last guess is it's to do with the rotation point of the model, but the tutorial I followed said to use (0, 0, 0) so I'm not sure that's wrong.
Here's my helmet code; does anyone know what's going on?
Thanks for reading.
0
VERSION 1.9.2
I often forget to update this place; the best place for updates is my new Twitter.
0
VERSION 1.9.1
I often forget to update this place; the best place for updates is my new Twitter.
0
VERSION 1.8.1 (Minecraft 1.11.2; 1.12.2)
Bringing the mod up to date with current practice...
I often forget to update this place; the best place to get updates now is my Twitter.
0
VERSION 1.0.1
I often forget to update this place; the best place to get updates now is my Twitter.
0
VERSION 1.8.65
I often forget to update this place; the best place to get updates now is my Twitter.
1
That... would make a lot of sense. I'll think about it, but right now I don't think I can do it because glass doesn't have a TileEntity. If I find a solution I will update this reply.
EDIT: Just 12 months later, there is now a way to do this, as of the 1.12.2-1.10.0 beta!
0
I just released version 1.12.2-1.8.5; hope you enjoy! This mod updates worldgen; I recommend you delete your ftfragileglass.cfg file and get the new one.
Really big change list for this one; here we go. Ports for versions 1.11.2 and 1.10.2 will come in at least a few days.
Changes from version 1.8.1:
worldgen options; weak stone is disabled by default. If you enable it,
expect falls into lava!
0
Hello to any of you out there who still use this mod and check this thread! Sorry about the lack of updates.
The coming update brings Fragile Glass and Thin Ice to a state which is almost exactly as I envisioned it. That's pretty rare in programming so I'm really happy!
The main feature is an overhaul of the old glass "physics". Not only does fragile glass break ahead of a predicted collision, so that you can fire arrows through it properly or fall through a roof without hurting yourself and slowing down, but it now supports the Capability system, so modders can now easily make their own fragile blocks and entities that can break fragile blocks!
At the point of uploading I realised Forge 1.12.1 just came out, so I've basically put out a beta release for those of you who are still on 1.12 (1.12.1 might not be compatible). You can download it here; please let me know of any bugs you encounter.
Below is a rough list of changes since I last posted on this thread. If you'd rather just go and play the mod, enjoy. And thank you all for over 32000 downloads on Curse!