Skip to content

Commit

Permalink
fix: suppress message about custom model data component type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed Jan 3, 2025
1 parent c4dd43b commit f88af89
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
`java-library`
id("io.papermc.paperweight.userdev") version "1.7.7"
id("io.papermc.paperweight.userdev") version "2.0.0-beta.11"
id("xyz.jpenilla.run-paper") version "2.3.1" // Adds runServer and runMojangMappedServer tasks for testing
}

Expand Down
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ private CustomItem from_old_item(final ItemStack item_stack) {

// If lookups fail, we return null and nothing will be done.
String new_item_key = null;
if (meta.getCustomModelDataComponent().getFloats().isEmpty()) {
return null;
}
switch (meta.getCustomModelData()) {
case 7758190:
new_item_key = "vane_trifles:wooden_sickle";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public FloatingItem(final World world, double x, double y, double z) {
setPos(x, y, z);
}

public FloatingItem(EntityType<? extends ItemEntity> entitytypes, Level world) {
public FloatingItem(EntityType<Entity> entitytypes, Level world) {
super(entitytypes, world);
setSilent(true);
setInvulnerable(true);
Expand Down Expand Up @@ -73,11 +73,6 @@ public void readAdditionalSaveData(CompoundTag nbt) {}
@Override
public void addAdditionalSaveData(CompoundTag nbt) {}

@Override
public boolean serializeEntity(CompoundTag nbt) {
return false;
}

@Override
public boolean save(CompoundTag nbt) {
return false;
Expand Down

0 comments on commit f88af89

Please sign in to comment.