use of blusunrize.immersiveengineering.api.shader.CapabilityShader.ShaderWrapper_Direct in project ImmersiveEngineering by BluSunrize.
the class TileEntityBalloon method readCustomNBT.
@Override
public void readCustomNBT(NBTTagCompound nbt, boolean descPacket) {
super.readCustomNBT(nbt, descPacket);
//to prevent old ballons from going black
int nbtVersion = nbt.getInteger("nbtVersion");
if (nbtVersion >= 1) {
style = nbt.getInteger("style");
colour0 = nbt.getInteger("colour0");
colour1 = nbt.getInteger("colour1");
}
if (nbt.hasKey("shader")) {
shader = new ShaderWrapper_Direct("immersiveengineering:balloon");
shader.deserializeNBT(nbt.getCompoundTag("shader"));
}
}
use of blusunrize.immersiveengineering.api.shader.CapabilityShader.ShaderWrapper_Direct in project ImmersiveEngineering by BluSunrize.
the class EventHandler method onCapabilitiesAttach.
@SubscribeEvent
public void onCapabilitiesAttach(AttachCapabilitiesEvent.Entity event) {
if (event.getEntity() instanceof EntityMinecart) {
EntityMinecart entityMinecart = (EntityMinecart) event.getEntity();
event.addCapability(new ResourceLocation("immersiveengineering:shader"), new ShaderWrapper_Direct("immersiveengineering:minecart"));
}
}
Aggregations