-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conduit models now render using dragonfly.
- Loading branch information
1 parent
7006e1b
commit 91db77d
Showing
81 changed files
with
1,137 additions
and
140 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
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
43 changes: 43 additions & 0 deletions
43
src/main/java/sunsetsatellite/signalindustries/blocks/states/ConduitStateInterpreter.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,43 @@ | ||
package sunsetsatellite.signalindustries.blocks.states; | ||
|
||
import net.minecraft.core.block.Block; | ||
import net.minecraft.core.block.BlockTileEntity; | ||
import net.minecraft.core.block.entity.TileEntity; | ||
import net.minecraft.core.world.WorldSource; | ||
import sunsetsatellite.catalyst.core.util.Direction; | ||
import sunsetsatellite.catalyst.core.util.Vec3i; | ||
import sunsetsatellite.catalyst.fluids.api.IFluidInventory; | ||
import sunsetsatellite.signalindustries.SignalIndustries; | ||
import sunsetsatellite.signalindustries.blocks.BlockConduit; | ||
import sunsetsatellite.signalindustries.blocks.BlockFluidConduit; | ||
import useless.dragonfly.model.blockstates.processed.MetaStateInterpreter; | ||
|
||
import java.util.HashMap; | ||
|
||
public class ConduitStateInterpreter extends MetaStateInterpreter { | ||
@Override | ||
public HashMap<String, String> getStateMap(WorldSource worldSource, int i, int j, int k, Block block, int meta) { | ||
HashMap<String, String> states = new HashMap<>(); | ||
for (Direction direction : Direction.values()) { | ||
boolean show = false; | ||
Vec3i offset = new Vec3i(i,j,k).add(direction.getVec()); | ||
Block neighbouringBlock = worldSource.getBlock(offset.x, offset.y, offset.z); | ||
if(neighbouringBlock != null) { | ||
if(block.getClass().isAssignableFrom(neighbouringBlock.getClass())){ | ||
show = true; | ||
} else if(!(neighbouringBlock instanceof BlockConduit || neighbouringBlock instanceof BlockFluidConduit)) { | ||
if(neighbouringBlock instanceof BlockTileEntity){ | ||
TileEntity neighbouringTile = worldSource.getBlockTileEntity(offset.x, offset.y, offset.z); | ||
if(neighbouringTile instanceof IFluidInventory){ | ||
show = true; | ||
} | ||
} else if (neighbouringBlock.hasTag(SignalIndustries.ENERGY_CONDUITS_CONNECT) || neighbouringBlock.hasTag(SignalIndustries.FLUID_CONDUITS_CONNECT)) { | ||
show = true; | ||
} | ||
} | ||
} | ||
states.put(direction.getName().toLowerCase(), String.valueOf(show)); | ||
} | ||
return states; | ||
} | ||
} |
4 changes: 0 additions & 4 deletions
4
src/main/java/sunsetsatellite/signalindustries/interfaces/IConduitsConnect.java
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
src/main/java/sunsetsatellite/signalindustries/mixin/RenderBlocksMixin.java
This file was deleted.
Oops, something went wrong.
62 changes: 0 additions & 62 deletions
62
src/main/java/sunsetsatellite/signalindustries/render/RenderConduit.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.