1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-07-05 03:23:20 +00:00

Fix serveral 1.15 -> 1.16 issues

Well, strictly speaking some mapping changes.
This commit is contained in:
Jonathan Coates 2020-12-25 16:59:09 +00:00
parent 96c577482d
commit 4af5bcc0b0
3 changed files with 5 additions and 4 deletions

View File

@ -17,6 +17,7 @@
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.generators.*;
import net.minecraftforge.common.data.ExistingFileHelper;
import javax.annotation.Nonnull;
@ -95,7 +96,7 @@ private void registerMonitors( BlockMonitor block )
VariantBlockStateBuilder builder = getVariantBuilder( block );
for( MonitorEdgeState edge : BlockMonitor.STATE.getAllowedValues() )
{
String suffix = edge == MonitorEdgeState.NONE ? "" : "_" + edge.getName();
String suffix = edge == MonitorEdgeState.NONE ? "" : "_" + edge.getString();
ModelFile model = models().getBuilder( suffix( block, suffix ) );
for( Direction facing : BlockMonitor.FACING.getAllowedValues() )

View File

@ -60,7 +60,7 @@ public static MonitorEdgeState fromConnections( boolean up, boolean down, boolea
@Override
public String toString()
{
return getName();
return getString();
}
@Nonnull

View File

@ -330,13 +330,13 @@ public Direction getDirection()
// Ensure we're actually a monitor block. This _should_ always be the case, but sometimes there's
// fun problems with the block being missing on the client.
BlockState state = getBlockState();
return state.has( BlockMonitor.FACING ) ? state.get( BlockMonitor.FACING ) : Direction.NORTH;
return state.hasProperty( BlockMonitor.FACING ) ? state.get( BlockMonitor.FACING ) : Direction.NORTH;
}
public Direction getOrientation()
{
BlockState state = getBlockState();
return state.has( BlockMonitor.ORIENTATION ) ? state.get( BlockMonitor.ORIENTATION ) : Direction.NORTH;
return state.hasProperty( BlockMonitor.ORIENTATION ) ? state.get( BlockMonitor.ORIENTATION ) : Direction.NORTH;
}
public Direction getFront()