Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<BakedQuad> getQuads(@Nullable IBlockState blockState, @Nullable EnumFacing side, long rand) {
- if (side != null) return Collections.emptyList();
- assert IExtendedBlockState.class.isAssignableFrom(blockState.getClass());
- Map<String, Pair<IModel, IModelState>> map = new HashMap<>();
- rail16vx(map, stateT(tern(+axialGap / 2, 0F, 0F))); // left
- rail16vx(map, stateTR(tern(-axialGap / 2, 0F, 0F), rotY(180F))); // right
- sleeperNSpikes(map, stateT(tern(0F, 0F, +0.25F)));
- sleeperNSpikes(map, stateT(tern(0F, 0F, -0.25F)));
- EnumTrackDirectionSWNE dir = ((IExtendedBlockState) blockState).getValue(BlockTrackSWNE.direction);
- IModelState baseState = stateTR(tern(0.5F, 0, 0.5F), rotY(dir.getIndex() * 90F));
- IBakedModel bakedModel = (new MultiModel(null, null, null, map)).bake(baseState, DefaultVertexFormats.ITEM, ModelLoader.defaultTextureGetter());
- return bakedModel.getQuads(blockState, side, rand);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement