-
Verify player moves and get location
make ur own methods
-
Verify player moves and get location
does it print at all? Try printing old and new and see if the values are different, sometimes it might be block pos or actual view origin so it wouldnt be the same. If push comes to shove make your own old pos, compare to current pos then if not the same change old pos to new pos and do whatever
-
Verify player moves and get location
I couldnt find a move event, maybe use PlayerTickEvent and check the old position and compare to new positon, if not equal then do whatever
-
1.18.2 Inventory Click On Item Related Listener or Event?
Hi, I'm currently trying to remake a spigot plugin called Custom Enchantments. Basically the only thing I'm trying to achieve is when I pickup an item in my inventory and hover over another item and swap with it I want it to cancel the swap and allow me to access both item stacks so I can transfer data from one another. Any ideas?
-
Getting a raw server IP address
MinecraftServer#getLocalIP()?
-
Issue with creating a GUI (Forge 1.19.2 43.2.0)
Create a new abstractcontainermenu, attach a screen to it, override isValid to return true with given logic, then call the menu wherever you seem it is fit.
-
AnvilUpdateEvent called too late
I agree, and being able to set a fixed cost would be good as well.
-
[1.18.2] Player.hurt() doesn't work
Create a method in ur custom item class with an entity as the parameter and call it at any event that handles ticks, check if that entity has the item in their inventory if so check if item is an instance of your custom item if so cast and call that method and in ur custom item class do ur logic there
-
Custom TNT - Cannot Resolve Constructor
I made a mistake, Im currently not at an IDE right but can you just pass in ur Entity.get() thru ur init?
-
Get world saved data on client for a screen [1.19.2]
https://github.com/Rinventor/SavedDataSync/blob/main/PTMSavedData.java#:~:text=(level)) {-,PTMSavedData data %3D PTMSavedData.getInstance(level)%3B,-return data. Whenever you are calling Client side code and want the server to do something with it you must send a packet over to the server and have the server do the logic there and if needed return any data changes back to the client. Not to be rude, but I really think you are over complicating everything and making it harder on yourself. Like mentioned above its really as simple as sending the data to server and if needed have the server send the data back to the client. Usually if the data you need to mess with is server side you don't need to send any data back.
-
Get world saved data on client for a screen [1.19.2]
do you still need help, I can guide you on how to accomplish everything. Only thing I ask is next time you help others
-
Custom TNT - Cannot Resolve Constructor
I went out of my way to debug it for you, I got the error to go away. Here is your final Code PrimedLumeniteTnt public class PrimedLumeniteTnt extends PrimedTnt { @Nullable private LivingEntity owner; public PrimedLumeniteTnt(Level level, double x, double y, double z, @Nullable LivingEntity igniter) { this(EntityInit.LUMENITE_TNT.get(), level); this.setPos(x, y, z); double d0 = level.random.nextDouble() * (double)((float)Math.PI * 2F); this.setDeltaMovement(-Math.sin(d0) * 0.02D, (double)0.2F, -Math.cos(d0) * 0.02D); this.setFuse(80); this.xo = x; this.yo = y; this.zo = z; this.owner = igniter; } public PrimedLumeniteTnt(EntityType<Entity> entityEntityType, Level level) { super((EntityType<? extends PrimedTnt>) entityEntityType, level); } @Nullable public LivingEntity getOwner() { return this.owner; } @Override protected void explode() { float f = 4.0F; this.level.explode(this, this.getX(), this.getY(0.0625D), this.getZ(), f, Explosion.BlockInteraction.BREAK); } } And here is where you register it public static final RegistryObject<EntityType<Entity>> LUMENITE_TNT = ENTITY_TYPES.register("lumenite_tnt", () -> EntityType.Builder.of(PrimedLumeniteTnt::new, MobCategory.MISC) .fireImmune() .sized(0.98F, 0.98F) .build(new ResourceLocation(Main.MOD_ID, "lumenite_tnt").toString())); I think what happened here is when you tried to extend your tnt class when in fact you should've just put <Entity> since PrimedTnt is extending Entity
-
Custom TNT - Cannot Resolve Constructor
Its not happy with the constructor you currently have, delete it and when it suggests to create a constructor in the registry just create it there and see if it works. I wouldn't know what the correct constructor would be since I've never worked with PrimedTnt before.
-
Issue with creating a GUI (Forge 1.19.2 43.2.0)
It should run twice, it does logic on both sides.
-
Issue with creating a GUI (Forge 1.19.2 43.2.0)
This is a bit messy and could be implemented so much easier and cleaner. Just create your own AbstractContainerMenu at this point and have your own AbstractContainerScreen, make sure you override the stillValid() method in your Menu class and do whatever logic you deem necessary to keep that container open for that player.
IPS spam blocked by CleanTalk.