Everything posted by Draco18s
-
Removing a block on ther server side
New versions don't make the need for packets to magically go away.
-
1.16.3 player variable
Capabilities store "arbitrary data." If your magic system isn't "arbitrary data" then something is very wrong indeed.
-
Remove crafting recipes [Forge 1.16]
Use data packs. Your mod is also a data pack.
-
1.16.3 player variable
Capabilities.
-
[1.15.2] How to make an item that doesn't burn
By "doesn't burn" do you mean that it does not provide fuel for a furnace? Because that's automatic. Or do you mean that when dropped into the world it isn't destroyed by fire or lava? Or do you mean something else?
-
Mod has failed to load correctly
You see this? https://github.com/LukasSchikirianski/JungleAddonsMod/blob/master/Jungle Addons - 1.16.1/src/main/java/com/lukas/jungle_addons/JungleAddons.java#L30 You see how it says bus=Bus.MOD? That's the wrong bus for those events.
-
[1.16.2] Transparent blocks with baked models are invisible when using OptiFine
Complain to Optifine for not being compatible with Forge.
-
Removing a block on ther server side
That's called Reaching Across Sides and won't work. If the client and sever are running on different machines, how do you think the server knows about the gui change? (a) use the loot system and get the block's drops (b) pickBlock()
-
Removing a block on ther server side
Do not use this, this uses the vanilla IInventory system. You should use ItemStackHandler for inventory instead. Why the fuck do you have THREE local variables storing the same block state? blockstate, newBlockstate, and blockRemoved are literally all the same thing and can never be anything else at this point in the code. If you are interested in doing something with these variables, but not with this value, don't assign a value here. Yeah. Like that...why didn't you just assign newBlockstate to AIR to begin with? And for that matter why do you even need this variable anyway? What. Why are you passing a public static field to a private non-static method? What. This is not how you get an ItemStack from a block. This won't work for a whole host of blocks, from piston heads, to cake, to redstone wire, to crops. Mmm yep. This is why ItemStackHandler exists. *Suspicion*
-
Removing a block on ther server side
I don't know. Where are you calling destroyBlock from? What's that code look like?
-
how to make creepers charged on spawn
ReflectionObfuscationHelper if I remember the class's name correctly. You call getPrivateValue and pass in the SRG name of the field you want.
-
how to make creepers charged on spawn
Let me pop my IDE open here and... Well, the POWERED value and the dataManager are both private, so.... Reflection.
-
how to make creepers charged on spawn
Don't serialize/deserialize entities to change their field values. That's disgusting.
-
Changing beds....
Report the crash to the mod author.
-
Removing a block on ther server side
They're bit flags. You bit-wise OR the values together. 1 | 2 (aka "3") 4 | 8 (aka "12") 1 | 2 | 8 (aka "11") This will create weird effects that you almost certainly do not want.
-
Entity Health Not Updating
Item has methods for onRightClick and onEntityInteract (you'll have to poke around for exact method names). Just override them and put your functionality there.
-
Removing a block on ther server side
No. Also:
-
Entity Health Not Updating
Don't compare strings. Use instanceof. You already use a cast later down. Why are you performing this particular check twice? Use an early return here like you did with a null player. "Refuel." And finally: Why are you bothering with R keypresses? Why not use the systems Minecraft already has in place (right clicking with a stack)? Then you don't need this key press handler at all and can put this logic inside your item (where it belongs) and don't need to deal with custom packets.
-
Removing a block on ther server side
Read the javadoc.
-
Removing a block on ther server side
Well you have a world.isRemote check there, but I can't tell if you're checking for true or false. And you have another line above it that looks suspicious. But you posted your code as an image rather than text showing a tooltip that is patently useless for solving the problem and hiding code I might actually be interested in. Also, there's nothing wrong with world.setBlockState, provided you pay attention to the FLAG parameter. world.destroyBlock should also work (it will drop the block's loot). world.removeBlock should just be a wrapper around world.setBlockState(Blocks.AIR)
-
Asyncing Item Cooldown Among Itemstacks
Ah yes, you are correct. Normally this sort of issue is caused by people putting data in the Item class. Anyway, in order to make the cooldown stack based not player based, the answer is still Capabilities.
-
Removing a block on ther server side
I only had to spell things out for you. Twice.
-
Is the concept of blocks being registered per-world feasible?
Not really, no.
-
Asyncing Item Cooldown Among Itemstacks
You can't do this. Use Capabilities.
-
Removing a block on ther server side
None of those. The tile entity already has a world field. You even found it. Fucking use it.
IPS spam blocked by CleanTalk.