-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
So you're telling me, spare time exists? :O Close #11
- Loading branch information
Showing
25 changed files
with
189 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
fabric/src/main/java/com/lx862/jcm/mod/block/RVPIDSSIL1Block.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.lx862.jcm.mod.block; | ||
|
||
import com.lx862.jcm.mod.block.entity.RVPIDSSIL1BlockEntity; | ||
import org.mtr.mapping.holder.*; | ||
import org.mtr.mapping.mapper.BlockEntityExtension; | ||
import org.mtr.mod.block.IBlock; | ||
|
||
public class RVPIDSSIL1Block extends JCMPIDSBlock { | ||
|
||
public RVPIDSSIL1Block(BlockSettings settings) { | ||
super(settings); | ||
} | ||
|
||
@Override | ||
public VoxelShape getOutlineShape2(BlockState state, BlockView view, BlockPos pos, ShapeContext context) { | ||
VoxelShape vx1 = IBlock.getVoxelShapeByDirection(0, -2, 0, 16, 9, 16, IBlock.getStatePropertySafe(state, FACING)); | ||
VoxelShape vx2 = IBlock.getVoxelShapeByDirection(7.5, 9, 8.5, 8.5, 16, 9.5, IBlock.getStatePropertySafe(state, FACING)); | ||
return VoxelShapes.union(vx1, vx2); | ||
} | ||
|
||
@Override | ||
public BlockEntityExtension createBlockEntity(BlockPos blockPos, BlockState blockState) { | ||
return new RVPIDSSIL1BlockEntity(blockPos, blockState); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
fabric/src/main/java/com/lx862/jcm/mod/block/RVPIDSSIL2Block.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.lx862.jcm.mod.block; | ||
|
||
import com.lx862.jcm.mod.block.entity.RVPIDSSIL2BlockEntity; | ||
import org.mtr.mapping.holder.*; | ||
import org.mtr.mapping.mapper.BlockEntityExtension; | ||
import org.mtr.mod.block.IBlock; | ||
|
||
public class RVPIDSSIL2Block extends JCMPIDSBlock { | ||
|
||
public RVPIDSSIL2Block(BlockSettings settings) { | ||
super(settings); | ||
} | ||
|
||
@Override | ||
public VoxelShape getOutlineShape2(BlockState state, BlockView view, BlockPos pos, ShapeContext context) { | ||
VoxelShape vx1 = IBlock.getVoxelShapeByDirection(0, -2, 0, 16, 9, 16, IBlock.getStatePropertySafe(state, FACING)); | ||
VoxelShape vx2 = IBlock.getVoxelShapeByDirection(7.5, 9, 8.5, 8.5, 16, 9.5, IBlock.getStatePropertySafe(state, FACING)); | ||
return VoxelShapes.union(vx1, vx2); | ||
} | ||
|
||
@Override | ||
public BlockEntityExtension createBlockEntity(BlockPos blockPos, BlockState blockState) { | ||
return new RVPIDSSIL2BlockEntity(blockPos, blockState); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
fabric/src/main/java/com/lx862/jcm/mod/block/entity/RVPIDSSIL1BlockEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.lx862.jcm.mod.block.entity; | ||
|
||
import com.lx862.jcm.mod.registry.BlockEntities; | ||
import org.mtr.mapping.holder.BlockPos; | ||
import org.mtr.mapping.holder.BlockState; | ||
|
||
public class RVPIDSSIL1BlockEntity extends PIDSBlockEntity { | ||
|
||
public RVPIDSSIL1BlockEntity(BlockPos blockPos, BlockState blockState) { | ||
super(BlockEntities.RV_PIDS_SIL_1.get(), blockPos, blockState); | ||
} | ||
|
||
@Override | ||
public String getDefaultPresetId() { | ||
return "rv_pids"; | ||
} | ||
|
||
@Override | ||
public int getRowAmount() { | ||
return 4; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
fabric/src/main/java/com/lx862/jcm/mod/block/entity/RVPIDSSIL2BlockEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.lx862.jcm.mod.block.entity; | ||
|
||
import com.lx862.jcm.mod.registry.BlockEntities; | ||
import org.mtr.mapping.holder.BlockPos; | ||
import org.mtr.mapping.holder.BlockState; | ||
|
||
public class RVPIDSSIL2BlockEntity extends PIDSBlockEntity { | ||
|
||
public RVPIDSSIL2BlockEntity(BlockPos blockPos, BlockState blockState) { | ||
super(BlockEntities.RV_PIDS_SIL_2.get(), blockPos, blockState); | ||
} | ||
|
||
@Override | ||
public String getDefaultPresetId() { | ||
return "rv_pids"; | ||
} | ||
|
||
@Override | ||
public int getRowAmount() { | ||
return 4; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
fabric/src/main/java/com/lx862/jcm/mod/render/block/RVPIDSSILRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.lx862.jcm.mod.render.block; | ||
|
||
import com.lx862.jcm.mod.block.entity.PIDSBlockEntity; | ||
import com.lx862.jcm.mod.block.entity.RVPIDSBlockEntity; | ||
import com.lx862.jcm.mod.data.pids.preset.PIDSPresetBase; | ||
import org.mtr.core.operation.ArrivalResponse; | ||
import org.mtr.libraries.it.unimi.dsi.fastutil.objects.ObjectArrayList; | ||
import org.mtr.mapping.holder.BlockPos; | ||
import org.mtr.mapping.holder.BlockState; | ||
import org.mtr.mapping.holder.Direction; | ||
import org.mtr.mapping.holder.World; | ||
import org.mtr.mapping.mapper.GraphicsHolder; | ||
|
||
public class RVPIDSSILRenderer<T extends PIDSBlockEntity> extends PIDSRenderer<T> { | ||
public RVPIDSSILRenderer(Argument dispatcher) { | ||
super(dispatcher); | ||
} | ||
|
||
@Override | ||
public void renderPIDS(PIDSBlockEntity blockEntity, PIDSPresetBase pidsPreset, GraphicsHolder graphicsHolder, World world, BlockState state, BlockPos pos, Direction facing, ObjectArrayList<ArrivalResponse> arrivals, float tickDelta, boolean[] rowHidden) { | ||
graphicsHolder.translate(-0.21, -0.155, -0.650); | ||
graphicsHolder.rotateXDegrees(22.5f); | ||
graphicsHolder.scale(1/96F, 1/96F, 1/96F); | ||
pidsPreset.render(blockEntity, graphicsHolder, world, blockEntity.getPos2(), facing, arrivals, rowHidden, tickDelta, 0, 0, 136, 76); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
fabric/src/main/resources/assets/jsblock/models/item/pids_pole.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
7 changes: 5 additions & 2 deletions
7
fabric/src/main/resources/assets/jsblock/models/item/rv_pids_pole.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"parent": "jsblock:block/rv_pids_pole" | ||
} | ||
"parent": "item/generated", | ||
"textures": { | ||
"layer0": "jsblock:item/rv_pids_pole" | ||
} | ||
} |
Binary file removed
BIN
-322 Bytes
fabric/src/main/resources/assets/jsblock/textures/item/pids_pole.png
Binary file not shown.
Binary file added
BIN
+303 Bytes
fabric/src/main/resources/assets/jsblock/textures/item/rv_pids_pole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.