mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 20:20:30 +00:00
Fix serveral 1.15 -> 1.16 issues
Well, strictly speaking some mapping changes.
This commit is contained in:
parent
96c577482d
commit
4af5bcc0b0
@ -17,6 +17,7 @@ import net.minecraft.data.DataGenerator;
|
||||
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 @@ public class BlockModelProvider extends BlockStateProvider
|
||||
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() )
|
||||
|
@ -60,7 +60,7 @@ public enum MonitorEdgeState implements IStringSerializable
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return getName();
|
||||
return getString();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -330,13 +330,13 @@ public class TileMonitor extends TileGeneric
|
||||
// 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()
|
||||
|
Loading…
Reference in New Issue
Block a user