添加彩蛋
This commit is contained in:
parent
148e80bd2a
commit
95b3856542
2 changed files with 10 additions and 3 deletions
|
@ -5,20 +5,27 @@ import net.mcreator.superbwarfare.entity.ClaymoreEntity;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import software.bernie.geckolib.model.GeoModel;
|
import software.bernie.geckolib.model.GeoModel;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
public class ClaymoreModel extends GeoModel<ClaymoreEntity> {
|
public class ClaymoreModel extends GeoModel<ClaymoreEntity> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getAnimationResource(ClaymoreEntity entity) {
|
public ResourceLocation getAnimationResource(ClaymoreEntity entity) {
|
||||||
return new ResourceLocation(ModUtils.MODID, "animations/claymore.animation.json");
|
return ModUtils.loc("animations/claymore.animation.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getModelResource(ClaymoreEntity entity) {
|
public ResourceLocation getModelResource(ClaymoreEntity entity) {
|
||||||
return new ResourceLocation(ModUtils.MODID, "geo/claymore.geo.json");
|
return ModUtils.loc("geo/claymore.geo.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getTextureResource(ClaymoreEntity entity) {
|
public ResourceLocation getTextureResource(ClaymoreEntity entity) {
|
||||||
return new ResourceLocation(ModUtils.MODID, "textures/entity/claymore.png");
|
UUID uuid = entity.getUUID();
|
||||||
|
if (uuid.getLeastSignificantBits() % 514 == 0) {
|
||||||
|
return ModUtils.loc("textures/entity/claymore_alter.png");
|
||||||
|
}
|
||||||
|
return ModUtils.loc("textures/entity/claymore.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
Loading…
Add table
Reference in a new issue