Skip to content

Commit

Permalink
fixed a crash that happened when summoning boats
Browse files Browse the repository at this point in the history
  • Loading branch information
NewJumper committed Mar 26, 2024
1 parent 1460122 commit 545a85b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Expand Up @@ -45,8 +45,9 @@ private ListModel<Boat> createBoatModel(EntityRendererProvider.Context context,

@Override
public Pair<ResourceLocation, ListModel<Boat>> getModelWithLocation(Boat boat) {
if(boat instanceof DDBoat ddBoat) return BOAT_RESOURCES.get(ddBoat.getWoodType());
if(boat instanceof DDChestBoat ddChestBoat) return BOAT_RESOURCES.get(ddChestBoat.getWoodType());
return BOAT_RESOURCES.get("echo");
Pair<ResourceLocation, ListModel<Boat>> model = null;
if(boat instanceof DDBoat ddBoat) model = BOAT_RESOURCES.get(ddBoat.getWoodType());
if(boat instanceof DDChestBoat ddChestBoat) model = BOAT_RESOURCES.get(ddChestBoat.getWoodType());
return model == null ? BOAT_RESOURCES.get("bloom") : model;
}
}
Expand Up @@ -54,11 +54,6 @@ public boolean doHurtTarget(Entity pEntity) {
return super.doHurtTarget(pEntity);
}

@Override
public void tick() {
super.tick();
}

@Override
public void handleEntityEvent(byte pId) {
if(pId == 4) this.attackState.start(this.tickCount);
Expand Down

0 comments on commit 545a85b

Please sign in to comment.