Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-persistent entities are pasted incorrectly #2719

Closed
5 tasks done
brickmonster opened this issue Feb 22, 2025 · 1 comment · May be fixed by #2721
Closed
5 tasks done

Non-persistent entities are pasted incorrectly #2719

brickmonster opened this issue Feb 22, 2025 · 1 comment · May be fixed by #2721
Labels
status:invalid This does not describe a request or bug with WorldEdit type:bug Incorrect behavior, not working as intended

Comments

@brickmonster
Copy link
Contributor

WorldEdit Version

7.3.10

Platform Version

1.21.4-177

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

Entities set to not persist in bukkit are pasted in a default state.

Expected Behavior

They should either not be pasted, or their state should be copied correctly.

Reproduction Steps

final var entity = (LivingEntity) player.getWorld().spawnEntity(player.getLocation(), org.bukkit.entity.EntityType.ZOMBIE);
entity.setPersistent(false);
entity.setAI(false);

Select a region with the spawned entity.
//copy -e
//paste -e

The zombie will have their AI back, attributes set to defaults, BukkitValues empty, etc.

Anything Else?

Example with interaction entity. Note the incorrect width/height and missing BukkitValues.

Before:

{
	Air: 300s,
	Bukkit.persist: 0b,
	Bukkit.updateLevel: 2,
	BukkitValues: {
		"minecraft:test": 4b
	},
	FallDistance: 0f,
	Fire: -1s,
	Invulnerable: 0b,
	Motion: [0d, 0d, 0d],
	OnGround: 0b,
	Paper.Origin: [1.5d, 4d, 1.5d],
	Paper.OriginWorld: [I; -1736324837, 981615463, -1862036380, -371568799],
	Paper.SpawnReason: "CUSTOM",
	PortalCooldown: 0,
	Pos: [1.5d, 4d, 1.5d],
	Rotation: [0f, 0f],
	Spigot.ticksLived: 110,
	UUID: [I; 2133294147, 930369498, -1087649753, -1186562898],
	WorldUUIDLeast: -7997385352138829983L,
	WorldUUIDMost: -7457458389165915289L,
	height: 0.125f,
	id: "minecraft:interaction",
	response: 0b,
	width: 0.125f
}

After:

{
	Air: 300s,
	Bukkit.updateLevel: 2,
	FallDistance: 0f,
	Fire: 0s,
	Invulnerable: 0b,
	Motion: [0d, 0d, 0d],
	OnGround: 0b,
	Paper.Origin: [4.5d, 4d, 1.5d],
	Paper.OriginWorld: [I; -1736324837, 981615463, -1862036380, -371568799],
	Paper.SpawnReason: "DEFAULT",
	PortalCooldown: 0,
	Pos: [4.5d, 4d, 1.5d],
	Rotation: [0f, 0f],
	Spigot.ticksLived: 46,
	UUID: [I; 883903165, 1354779539, -1631178688, -909579244],
	WorldUUIDLeast: -7997385352138829983L,
	WorldUUIDMost: -7457458389165915289L,
	height: 1f,
	id: "minecraft:interaction",
	response: 0b,
	width: 1f
}
@brickmonster brickmonster added status:pending Pending acceptance or closure. type:bug Incorrect behavior, not working as intended labels Feb 22, 2025
@wizjany
Copy link
Collaborator

wizjany commented Feb 22, 2025

As far as I can tell, the entity is being serialized "correctly".

Image

I don't know what behaviors the bukkit/paper API or implementation has, but from the perspective of WorldEdit, we just dump NBT out of the server and then feed it back to the server. The only thing we strip is entity UUIDs as inserting new entities with existing uuids causes errors. Aside from that, what the server gives us or reads back isn't really WE's concern.

@wizjany wizjany closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2025
@wizjany wizjany added status:invalid This does not describe a request or bug with WorldEdit and removed status:pending Pending acceptance or closure. labels Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:invalid This does not describe a request or bug with WorldEdit type:bug Incorrect behavior, not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants