-
Posts
422 -
Joined
-
Last visited
-
Days Won
1
Posts posted by Novârch
-
-
15 minutes ago, vemerion said:
You could also try overriding getYaw() to simply return rotationYaw, since getYaw() is what is used to determine the viewport yaw.
This works, though it makes the rotation a heck of a lot less smooth. Nonetheless, thank you.
-
I've been trying to create a remote controlled entity, it's been going pretty well so far, though I have a single issue. To move the camera I've opted for how AbstractHorseEntity does it, copying the player's yaw and pitch values. This works fine until the yaw value reaches 360, upon which it abruptly snaps to about -90 and then returns to 0. Can anyone tell me what's causing this? The code for the entity can be found here.
-
It will not work. Don't even try.
-
4 hours ago, vemerion said:
When you toss an item the itemstack is modified, and since you only pass a reference of the player itemstacks to your capability, those itemstacks will also shrink. Copy the stacks with .copy()
That's exactly what I was looking for! Thank you!
- 1
-
11 hours ago, poopoodice said:
Instead you should copy the inventory of the player in order to save it, for example ArrayList<ItemStack>, and use ItemStack.copy
I'm doing that now, I've updated the repo with the new code so you can just use the same links. The same issue still occurs though, if I throw an item it will not re-appear in my inventory, but if I manually delete it using creative mode it will.
Edit: I have confirmed the issue is linked to tossing the item, if I toss the item no matter what I do the item will be erased. I don't understand why the list in the capability updates.
-
8 hours ago, poopoodice said:
What I can think of is to use ItemStack.write() to write the stack into the compound, and then use CompoundNBT.put()
Thank you! I've gone ahead and used that and setup a capability, I also took a look at the read write methods inside PlayerInventory. The issue now is that for some reason the inventory in the capability is syncing with the player's inventory, so it isn't reverting like it should. Can you see anything I missed here that could cause that, the issue seems pretty much impossible.
Edit: Forgot to include a link to the class, here.
Edit 2: It seems that it removes new items but doesn't bring back old ones? Weird.
Edit 3:
It also seems the items added to the player's inventory are ghost items and disappear when dropped.I'm stupid and didn't check World#isRemote. -
I've been trying to make a "time revert" effect lately, where you would set a checkpoint at one time and then be able to go back to it. This of course requires lots of things to be saved (broken blocks, placed blocks, entity positions, game time, etc.), things like broken and placed blocks have been easy, but I'm having trouble with player inventories. The half-baked system I thought up was giving all the ItemStacks in a player's inventory a special variable in a capability and then to delete all items that don't have that variable at a certain value, this works poorly though, items don't revert durability and stackable items can be destroyed if manually stacked. Is there a way I can save every player's inventory contents into a capability to be able to revert to that? I'd really appreciate some ideas.
-
performEffect only runs if isReady returns true.
-
51 minutes ago, BlockyPenguin said:
so by inverting it, you're making it so it only works on a client.
That's a valid assumption, but it doesn't work like that, you cannot access client code from common code without packets.
-
Entity#setVelocity is only present on the client, use Entity#setMotion instead. What BlockyPenguin suggested will not work.
-
35 minutes ago, Sanysvo said:
1.7.10
1.7 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support, or better yet, give up. No one here will help you make a custom launcher.
-
I'd take a look at EntityRenderer#renderName.
- 1
-
Post code, preferably as a git repo.
-
3 minutes ago, BlockyPenguin said:
I was hoping to keep the power stored in a blockstate to avoid using a tile entity
Do not do that, that's exactly why tile entities exist.
-
48 minutes ago, Xydru said:
There are no other forums like this that deal with Minecraft Forge Modding
-
2 minutes ago, MrGreenyboy said:
Oh and i did remove "example_mod" from the other code
You mean example_item, right? Please post your full debug.log. Before you ask where it is like everyone else, remember that your OS 's file manager has a search function.
-
13 minutes ago, MrGreenyboy said:
@ObjectHolder("tutorialmod" + "example_item")
Remove your item name, all you need is the modid, you can also annotate the class with it if you're going to use to for lots of items.
-
Take a look at KelpBlock.
-
Why? In the context of modding you should be using ResourceLocation and inputting the path manually.
-
1.8 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
All packets should be registered in FMLCommonSetupEvent, no exceptions. OnlyIn does literally nothing for modders, it's just an ugly ASM hack vanilla and Forge use, to properly specify network direction use the NetworkDirection version of SimpleChannel#register. Your issue most likely stems from your registration, your packet probably isn't present on the server, it should be.
-
Access Transformers.
-
3 hours ago, Handreans said:
And how do I call the Tag Class?
It isn't a class, it's a json file you need to add.
- 1
-
6 minutes ago, Help! said:
---- Minecraft Crash Report ----
Please do what Draco said, that's still not the full debug.log.
[1.15.2] Locating structure pieces
in Modder Support
Posted
I'm trying to locate a specific StructurePiece in a structure, for instance locate a single FortressPiece.Crossing in a Nether Fortress. How would I go about doing this, is this even possible?