-
Posts
884 -
Joined
-
Last visited
-
Days Won
9
Everything posted by Jay Avery
-
Do you have a file at this location?
-
The size of the health bar (and the hotbar, food, etc) is an absolute number of pixels, rather than relative to the size of the screen. You can position your text next to the health bar by defining its position in similar absolute terms to match. But this goes against what your goal apparently is, to be able to reposition the text freely. How would you decide whether the player wants their text position to 'follow' the health bar, or to remain at the same actual screen position?
-
Create a subclass of ItemSword that uses your material.
-
.
-
Java Hotspot Error - Internal CMS is depreacated
Jay Avery replied to bhavikchugani's topic in Modder Support
Yes, I am making a mod. This forum is the best place if you have more questions though - lots of other people available to help, and it's public for people with the same questions to see in future. -
1.10.2 How do I make my entity drop multiple items,
Jay Avery replied to TheRPGAdventurer's topic in Modder Support
So, spawn a stack of the correct item in each case. Use entity#attackEntityFrom to apply damage. -
I think the equivalent method is now getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand).
-
The method parameters must be wrong - look at the vanilla Block class and find the method, then make sure your override has the exact same parameters.
-
Assigning different models to different blockstates of a block
Jay Avery replied to Poseidon5001's topic in Modder Support
Your "facing" variant should not be an array (surrounded by square brackets). Also, model names must be entirely lowercase so "testmod:tilePencil" will not work. -
Java Hotspot Error - Internal CMS is depreacated
Jay Avery replied to bhavikchugani's topic in Modder Support
You are giving the reference to your proxy names as a string themselves (surrounded by quotes). Instead of using the string they refer to, you are telling the proxy to load a class called "reference.CLIENT_PROXY_CLASS", which doesn't exist. -
1.10.2 How do I make my entity drop multiple items,
Jay Avery replied to TheRPGAdventurer's topic in Modder Support
What exactly is the problem then? -
Use a capability to store the data.
-
One way to do this would be to create your own Slot implementation, overriding any methods which refer to an inventory so that they do nothing but return empty stacks where needed.
-
What do you mean by "doesn't work"? What result do you get and what do you expect?
-
I have a lot of resources overall (blockstates, models, and textures), and I've gone through various stages of adding and removing different ones. There's a decent chance that I now have unused files sitting around taking up space, but I can't think of an efficient way to find these. Is there anything I can do in code to tell me which things in my resources folder don't get used?
-
The nature of this issue as you describe it sounds like you aren't calling markDirty on the TileEntity when you need to. The purpose of that method is to tell the game that the TE needs to be saved to NBT, so it needs to be called anywhere that the TE's data gets changed. But it looks like you're not calling it in cycleSide, which changes the ints in the TE.
-
Can you post all your latest code? It's hard to keep track with various updates in different posts.
-
I don't know anything about the universal bucket textures, I'm afraid. The fluids thing though - unfortunately forge fluids don't do anything with collisions. So if you want to e.g. make entities slow down in the fluid, you'll have to manually implement something. I have a very simple version here, overriding onEntityCollidedWithBlock to reduce the entity's horizontal motion by a fixed amount.
-
Looks like you haven't registered your bucket item.
-
Thank you!
-
So, call the ServerList constructor with a Minecraft parameter.
-
[1.11.2] Is there a way to update a item's NBT wothout "shaking"?
Jay Avery replied to ThexXTURBOXx's topic in Modder Support
Post the code that you tried. Edit: You should probably wrap your onUpdate code in a !world#isRemote check, so that it only runs on the logical server side - it may be syncing issues that causes the shaking. -
Do you know how to call a constructor with parameters?
-
You were using the postfix decrement operator (count--), which is applied after the rest of the expression is evaluated. So the code was saying "set this stack size to count, and then reduce the local count variable by 1". If you used the prefix operator (--count) it would reduce count by one before using it in the method. But there's also a simpler way of doing this in one line with no local variable - the method ItemStack#shrink will reduce the stack size of the stack by the number you give it.