Skip to content

Commit

Permalink
Fix serveral 1.15 -> 1.16 issues
Browse files Browse the repository at this point in the history
Well, strictly speaking some mapping changes.
  • Loading branch information
SquidDev committed Dec 25, 2020
1 parent 96c5774 commit 4af5bcc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static MonitorEdgeState fromConnections( boolean up, boolean down, boolea
@Override
public String toString()
{
return getName();
return getString();
}

@Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 4af5bcc

Please sign in to comment.