Fixes anchor rendering (#2698)
* Fixes #2680: Use a shorter cable anchor model when blocked by a facade. * Fixes #2664: Prevent anchors from creating intersection. Replaced the simple List<ResourceLocation> for the static models with a new container also indicating a solid part, which can be used to prevent the creation of an intersection.
This commit is contained in:
@@ -19,16 +19,14 @@
|
||||
package appeng.parts.misc;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import appeng.api.parts.IPartModel;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.items.parts.PartModels;
|
||||
import appeng.parts.PartModel;
|
||||
|
||||
|
||||
public class PartInvertedToggleBus extends PartToggleBus
|
||||
@@ -36,9 +34,9 @@ public class PartInvertedToggleBus extends PartToggleBus
|
||||
@PartModels
|
||||
public static final ResourceLocation MODEL_BASE = new ResourceLocation( AppEng.MOD_ID, "part/inverted_toggle_bus_base" );
|
||||
|
||||
public static final List<ResourceLocation> MODELS_OFF = ImmutableList.of(MODEL_BASE, MODEL_STATUS_OFF);
|
||||
public static final List<ResourceLocation> MODELS_ON = ImmutableList.of(MODEL_BASE, MODEL_STATUS_ON);
|
||||
public static final List<ResourceLocation> MODELS_HAS_CHANNEL = ImmutableList.of(MODEL_BASE, MODEL_STATUS_HAS_CHANNEL);
|
||||
public static final PartModel MODELS_OFF = new PartModel( MODEL_BASE, MODEL_STATUS_OFF );
|
||||
public static final PartModel MODELS_ON = new PartModel( MODEL_BASE, MODEL_STATUS_ON );
|
||||
public static final PartModel MODELS_HAS_CHANNEL = new PartModel( MODEL_BASE, MODEL_STATUS_HAS_CHANNEL );
|
||||
|
||||
@Reflected
|
||||
public PartInvertedToggleBus( final ItemStack is )
|
||||
@@ -57,7 +55,7 @@ public class PartInvertedToggleBus extends PartToggleBus
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResourceLocation> getStaticModels()
|
||||
public IPartModel getStaticModels()
|
||||
{
|
||||
if( hasRedstoneFlag() && isActive() && isPowered() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user