-
Posts
128 -
Joined
-
Last visited
Everything posted by Merthew
-
So I am trying to get the block hit by say and egg or a snowball instead of where the entity was when it died. Any thoughts on this? I am trying to do this from ProjectileImpactEvent and having some trouble with it. I can get the position of the impact by using e.getRayTraceResult().getHitVec().x, e.getRayTraceResult().getHitVec().y, e.getRayTraceResult().getHitVec().z or by e.getEntity().getPosition() but I can't really find a way to get the impacted block. Any help would be much appreciated.
-
Is there a method to grow a tree given a blockPos or some other kind of thing? Or do I need to make my own?
-
I have not been on this forum in forever.
-
What is the correct way to do this then. I'm flying blind mate. Also, on a side note, I like your new Icon.
-
I made a custom Item and it does not recognize either the model file or the name in the .lang file. Help would be nice, I may just be an idiot. https://github.com/Merthew/MerthewTweaks Item: https://github.com/Merthew/MerthewTweaks/blob/master/src/main/java/com/example/merthewtweaks/object/item/Safety_Rope.java Registry: https://github.com/Merthew/MerthewTweaks/blob/master/src/main/java/com/example/merthewtweaks/util/ItemRegistry.java Model: https://github.com/Merthew/MerthewTweaks/blob/master/src/main/resources/assets/merthewtweaks/models/item/safety_rope.json
-
Currently I have an item, the phantom sword that gets an entity that the player is looking at. However, it should cause the entity to be damaged by an amount dependent on the sword type. This does not happen. There is no indication that the entity has been damaged and it will not kill any entity. Any help would be appreciated. Relevant file: https://github.com/Merthew/Merthew-Mod/blob/master/src/main/java/merthew/mod/object/item/weapons/PhantomBlade.java
-
Nevermind, figured it out.
-
What would the best way to get the entity a player is looking at be? All i have found works in 1.7.10 and has been changed since.
-
sorry, log is here:
-
I am getting a null pointer error when loading a structure that i am trying to add loot to. Any help would be nice. Files: WorldGeneratorStructures WorldGenStructure Main
-
And i fixed it. Sorry forgot to post. Ended up setting the y coordinate to zero every other time and that caused it to spawn underground.
-
So I made a custom structure called "church". I got it to generate and then did something that broke it. Only problem i have no idea what i did... Any help would be appreciated.
-
Never mind, it works if i just run it on the client side... why though.
-
Code should be up to date now.
-
by doing that, the entity that spawns has no ai and doesn't interact with anything...
-
How would i spawn an entity from the tileentity that stays around then? do i need a check for isRemote?
-
I am trying to send a packet to the server from a tileentity. I have gotten it working before but now I seem to have missed something. Console Log: My code: https://github.com/Merthew/Merthew-Mod
-
Ah, that works perfectly, thanks.
-
Best way to randomly rotate a block? like have if it is placed on a block pos that mod divides by 4 to be facing north and so on?
-
Thank you.
-
So in the blockstate, specify the name of the model as .obj instead of blank?
-
What would the best way to implement that be? I tried adding .obj to the end of the resource location and it was looking for [name].obj.json
-
I know that in json block models you can easily have cubes and rotate them, but, is there a way to have smoother sides or even curves without using tesr?
-
I actually just did something like this. Fist thing you need it to look at one of the particle files in the main game, this is the actual code for the particle, build something like it. Then you are going to need a way to call it. Some form of class that contains a method to spawn the particle. Lastly you need a static declaration of the particle. For the custom texture, i know that you can override a method for the texture file but i never got it to work. My code if it helps: where i call the particle: https://github.com/Merthew/Empire-Of-Blood/blob/master/src/main/java/merthew/mod/item/general/ItemFlowerCrown.java where i declare the particle: https://github.com/Merthew/Empire-Of-Blood/tree/master/src/main/java/merthew/mod/util/particle
-
Nevermind, i ended up creating multiple tileentites instead of trying to do multiple uses of the same one.