修复遥控器的属性覆盖问题
This commit is contained in:
parent
15c8e25301
commit
c991c3f034
3 changed files with 3 additions and 4 deletions
|
@ -217,7 +217,7 @@ public class DroneEntity extends PathfinderMob implements GeoEntity {
|
|||
|
||||
private PlayState movementPredicate(AnimationState event) {
|
||||
if (this.animationprocedure.equals("empty")) {
|
||||
if (linked) {
|
||||
if (this.linked) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.drone.fly"));
|
||||
}
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.drone.idle"));
|
||||
|
|
|
@ -9,10 +9,10 @@ import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
|||
import net.mcreator.target.tools.ItemNBTTool;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
|
||||
public class PropertyRegistry {
|
||||
public class TargetModProperties {
|
||||
@SubscribeEvent
|
||||
public static void propertyOverrideRegistry(FMLClientSetupEvent event) {
|
||||
event.enqueueWork(() -> ItemProperties.register(TargetModItems.MONITOR.get(), new ResourceLocation("target", "monitor_linked"),
|
||||
(itemStack, clientWorld, livingEntity, seed) -> ItemNBTTool.getBoolean(itemStack, "linked", false) ? 1.0F : 0.0F));
|
||||
(itemStack, clientWorld, livingEntity, seed) -> ItemNBTTool.getBoolean(itemStack, "Linked", false) ? 1.0F : 0.0F));
|
||||
}
|
||||
}
|
|
@ -127,7 +127,6 @@ public class TooltipTool {
|
|||
DroneEntity entity = player.level().getEntitiesOfClass(DroneEntity.class, player.getBoundingBox().inflate(256))
|
||||
.stream().filter(e -> e.getStringUUID().equals(id)).findFirst().orElse(null);
|
||||
|
||||
tooltip.add(Component.literal("" + entity));
|
||||
if (entity == null) return;
|
||||
|
||||
tooltip.add(Component.literal(""));
|
||||
|
|
Loading…
Add table
Reference in a new issue