Reimplemented cable and parts rendering.

This commit is contained in:
Sebastian Hartte
2016-08-29 09:47:17 +02:00
parent 0b756708d4
commit 7e027da804
358 changed files with 5964 additions and 1901 deletions
@@ -19,6 +19,8 @@
package appeng.parts.automation;
import java.util.List;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -26,6 +28,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.Vec3d;
import appeng.api.config.Actionable;
@@ -51,10 +54,12 @@ import appeng.api.storage.IMEMonitor;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.util.AECableType;
import appeng.core.AELog;
import appeng.core.AppEng;
import appeng.core.settings.TickRates;
import appeng.core.sync.GuiBridge;
import appeng.helpers.MultiCraftingTracker;
import appeng.helpers.Reflected;
import appeng.items.parts.PartModels;
import appeng.me.GridAccessException;
import appeng.util.InventoryAdaptor;
import appeng.util.Platform;
@@ -63,6 +68,24 @@ import appeng.util.item.AEItemStack;
public class PartExportBus extends PartSharedItemBus implements ICraftingRequester
{
public static final ResourceLocation MODEL_BASE = new ResourceLocation( AppEng.MOD_ID, "part/export_bus_base" );
@PartModels
public static final List<ResourceLocation> MODELS_OFF = ImmutableList.of(
MODEL_BASE,
new ResourceLocation( AppEng.MOD_ID, "part/export_bus_off" )
);
@PartModels
public static final List<ResourceLocation> MODELS_ON = ImmutableList.of(
MODEL_BASE,
new ResourceLocation( AppEng.MOD_ID, "part/export_bus_on" )
);
@PartModels
public static final List<ResourceLocation> MODELS_HAS_CHANNEL = ImmutableList.of(
MODEL_BASE,
new ResourceLocation( AppEng.MOD_ID, "part/export_bus_has_channel" )
);
private final MultiCraftingTracker craftingTracker = new MultiCraftingTracker( this, 9 );
private final BaseActionSource mySrc;
private long itemToSend = 1;
@@ -337,4 +360,22 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
this.nextSlot = ( this.nextSlot + x ) % this.availableSlots();
}
}
@Override
public List<ResourceLocation> getStaticModels()
{
if( isActive() && isPowered() )
{
return MODELS_HAS_CHANNEL;
}
else if( isPowered() )
{
return MODELS_ON;
}
else
{
return MODELS_OFF;
}
}
}