添加载具集装箱角标
This commit is contained in:
parent
4732b61465
commit
68d7f43b72
16 changed files with 72 additions and 1 deletions
|
@ -38,7 +38,6 @@ public class ContainerItemDecorator implements IItemDecorator {
|
|||
var entity = entityType.create(level);
|
||||
if (!(entity instanceof VehicleEntity vehicle)) return false;
|
||||
|
||||
// TODO 给每一个载具加上item icon
|
||||
ResourceLocation icon = vehicle.getVehicleItemIcon();
|
||||
if (icon == null) return false;
|
||||
|
||||
|
|
|
@ -1072,4 +1072,9 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
|||
}
|
||||
return super.getCameraPosition(partialTicks, player, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/aircraft.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -723,4 +723,9 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
|||
}
|
||||
return super.getCameraPosition(partialTicks, player, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/aircraft.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -595,4 +595,9 @@ public class AnnihilatorEntity extends EnergyVehicleEntity implements GeoEntity,
|
|||
public boolean useFixedCameraPos(Entity entity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/defense.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -778,4 +778,9 @@ public class Bmp2Entity extends ContainerMobileVehicleEntity implements GeoEntit
|
|||
}
|
||||
return super.getCameraPosition(partialTicks, player, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/land.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -607,4 +607,9 @@ public class Hpj11Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
|||
}
|
||||
return super.getCameraPosition(partialTicks, player, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/defense.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.atsuishio.superbwarfare.entity.vehicle;
|
||||
|
||||
import com.atsuishio.superbwarfare.Mod;
|
||||
import com.atsuishio.superbwarfare.config.server.VehicleConfig;
|
||||
import com.atsuishio.superbwarfare.entity.TargetEntity;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.base.AutoAimable;
|
||||
|
@ -18,6 +19,7 @@ import net.minecraft.nbt.CompoundTag;
|
|||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.network.syncher.EntityDataSerializers;
|
||||
import net.minecraft.network.syncher.SynchedEntityData;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.players.OldUsersConverter;
|
||||
|
@ -359,4 +361,9 @@ public class LaserTowerEntity extends EnergyVehicleEntity implements GeoEntity,
|
|||
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
||||
return this.cache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/defense.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -641,4 +641,9 @@ public class Lav150Entity extends ContainerMobileVehicleEntity implements GeoEnt
|
|||
}
|
||||
return super.getCameraPosition(partialTicks, player, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/land.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -457,4 +457,9 @@ public class Mk42Entity extends VehicleEntity implements GeoEntity, CannonEntity
|
|||
public boolean useFixedCameraPos(Entity entity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/defense.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -526,4 +526,9 @@ public class Mle1934Entity extends VehicleEntity implements GeoEntity, CannonEnt
|
|||
public boolean useFixedCameraPos(Entity entity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/defense.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -821,4 +821,9 @@ public class PrismTankEntity extends ContainerMobileVehicleEntity implements Geo
|
|||
public boolean useFixedCameraPos(Entity entity) {
|
||||
return this.getSeatIndex(entity) == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/land.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -567,4 +567,9 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo
|
|||
public Pair<Quaternionf, Quaternionf> getPassengerRotation(Entity entity, float tickDelta) {
|
||||
return Pair.of(Axis.XP.rotationDegrees(-this.getViewXRot(tickDelta)), Axis.ZP.rotationDegrees(-this.getRoll(tickDelta)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/water.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -360,4 +360,9 @@ public class Tom6Entity extends MobileVehicleEntity implements GeoEntity {
|
|||
public Pair<Quaternionf, Quaternionf> getPassengerRotation(Entity entity, float tickDelta) {
|
||||
return Pair.of(Axis.XP.rotationDegrees(-this.getViewXRot(tickDelta)), Axis.ZP.rotationDegrees(-this.getRoll(tickDelta)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/aircraft.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -312,4 +312,9 @@ public class WheelChairEntity extends MobileVehicleEntity implements GeoEntity {
|
|||
public Pair<Quaternionf, Quaternionf> getPassengerRotation(Entity entity, float tickDelta) {
|
||||
return Pair.of(Axis.XP.rotationDegrees(-this.getViewXRot(tickDelta)), Axis.ZP.rotationDegrees(-this.getRoll(tickDelta)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/otto.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1282,4 +1282,9 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
|||
}
|
||||
return super.getCameraPosition(partialTicks, player, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ResourceLocation getVehicleItemIcon() {
|
||||
return Mod.loc("textures/gui/vehicle/land.png");
|
||||
}
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 310 B |
Loading…
Add table
Reference in a new issue