-
Notifications
You must be signed in to change notification settings - Fork 12
Transfer nodes #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
alone13141
wants to merge
28
commits into
GTNewHorizons:transfer-nodes
Choose a base branch
from
alone13141:transfer-nodes
base: transfer-nodes
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Transfer nodes #130
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
19f994b
added logic / walkers / still imcomplete
alone13141 668ecf8
PLAESE IDK
alone13141 a2ec6f5
Fixed reviewed comments
alone13141 8eb5158
Merging with upstream
Cardinalstars 6edd5d7
Pretty major refactor to allow stuff for FMP. Still a lot to be done,…
Cardinalstars d9b0ddc
Collision, external connections, and client syncing done I think. I k…
Cardinalstars 1cd08da
First node transfer logic done.
Cardinalstars e119714
Finished Crossover pipes
Cardinalstars 3459375
Sorting pipes done
Cardinalstars dc5cbfa
Rationing pipe logic + itemTransferNode insertion logic done
Cardinalstars ef1037b
Fuck my life but I think it's finally working only like 8 hours of le…
Cardinalstars ebea9e8
Slot locking
Cardinalstars 3a918a4
NBT aware recipes for filters + phantom slots for filters
Cardinalstars dfe82dc
A shit-load more filter dogshit.
Cardinalstars a8d62a9
Merge branch 'transfer-nodes' into transfer-nodes
Cardinalstars b9e3c98
Naming + dev art
Cardinalstars 18ddf2b
Filters maybe working. Need to test more.
Cardinalstars ab8566b
Merge branch 'transfer-nodes' of https://github.com/alone13141/Utilit…
Cardinalstars 961d746
Fuck my life getting the slots to tint seems to be fucking impossible.
Cardinalstars cc961b9
Finally got the slots coloured
Cardinalstars 62abb1d
Basic filter functionality working, haven't tested advanced functiona…
Cardinalstars 2ed9b56
Fixing edge case
Cardinalstars df3d7db
Pretty sure filter items should work now too. Just need to do more te…
Cardinalstars 190c172
Mod sorting pipe done + fixes for filter pipe
Cardinalstars b620ab9
Cleaning up some idiocy from my multipart pr + changing pipes to all …
Cardinalstars 2d36af1
fixing impossible object rendering
Cardinalstars ea97848
Reorganizing some stuff + start of fluid stuff
Cardinalstars 982e227
More organization of things + getting there on nodes.
Cardinalstars File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
4 changes: 4 additions & 0 deletions
4
...in/java/com/fouristhenumber/utilitiesinexcess/common/blocks/transfer/BlockEnergyNode.java
This file contains hidden or 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,4 @@ | ||
| package com.fouristhenumber.utilitiesinexcess.common.blocks.transfer; | ||
|
|
||
| public class BlockEnergyNode { | ||
| } |
107 changes: 107 additions & 0 deletions
107
...main/java/com/fouristhenumber/utilitiesinexcess/common/blocks/transfer/BlockNodeBase.java
This file contains hidden or 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,107 @@ | ||
| package com.fouristhenumber.utilitiesinexcess.common.blocks.transfer; | ||
|
|
||
|
|
||
| import com.fouristhenumber.utilitiesinexcess.common.tileentities.transfer.TileEntityNetworkComponentBase; | ||
| import com.fouristhenumber.utilitiesinexcess.transfer.collision.PipeCollision; | ||
| import net.minecraft.block.material.Material; | ||
| import net.minecraft.entity.Entity; | ||
| import net.minecraft.entity.player.EntityPlayer; | ||
| import net.minecraft.util.AxisAlignedBB; | ||
| import net.minecraft.world.World; | ||
|
|
||
| import com.cleanroommc.modularui.factory.GuiFactories; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public abstract class BlockNodeBase extends BlockTransferBase | ||
| { | ||
|
|
||
|
|
||
| protected BlockNodeBase() { | ||
| super(Material.iron); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean renderAsNormalBlock() { | ||
| return false; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean isOpaqueCube() { | ||
| return false; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean hasTileEntity(int metadata) { | ||
| return true; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean onBlockActivated(World worldIn, int x, int y, int z, EntityPlayer player, int side, float subX, | ||
| float subY, float subZ) { | ||
| if (!worldIn.isRemote) GuiFactories.tileEntity() | ||
| .open(player, x, y, z); | ||
| return true; | ||
| } | ||
|
|
||
| @Override | ||
| public int onBlockPlaced(World world, int x, int y, int z, | ||
| int side, float hitX, float hitY, float hitZ, | ||
| int meta) | ||
| { | ||
| return (meta << 3) | side; | ||
| } | ||
|
|
||
| @Override | ||
| public void addCollisionBoxesToList(World worldIn, int x, int y, int z, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity collider) | ||
| { | ||
| TileEntityNetworkComponentBase<?> te = (TileEntityNetworkComponentBase<?>) worldIn.getTileEntity(x, y, z); | ||
| if (te == null) return; | ||
|
|
||
| int connectionMask = te.getRawConnectionMask(); | ||
|
|
||
| AxisAlignedBB boundingBox = PipeCollision.MIDDLE.getBoundingBox().copy().offset(x, y, z); | ||
| if (boundingBox.intersectsWith(mask)) | ||
| { | ||
| list.add(boundingBox); | ||
| } | ||
|
|
||
| boundingBox = PipeCollision.DOWN.getBoundingBox().copy().offset(x, y, z); | ||
| if ((connectionMask & (1 << 0)) != 0 && boundingBox.intersectsWith(mask)) | ||
| { | ||
| list.add(boundingBox); | ||
| } | ||
|
|
||
| boundingBox = PipeCollision.UP.getBoundingBox().copy().offset(x, y, z); | ||
| if ((connectionMask & (1 << 1)) != 0 && boundingBox.intersectsWith(mask)) | ||
| { | ||
| list.add(boundingBox); | ||
| } | ||
|
|
||
| boundingBox = PipeCollision.NORTH.getBoundingBox().copy().offset(x, y, z); | ||
| if ((connectionMask & (1 << 2)) != 0 && boundingBox.intersectsWith(mask)) | ||
| { | ||
| list.add(boundingBox); | ||
| } | ||
|
|
||
| boundingBox = PipeCollision.SOUTH.getBoundingBox().copy().offset(x, y, z); | ||
| if ((connectionMask & (1 << 3)) != 0 && boundingBox.intersectsWith(mask)) | ||
| { | ||
| list.add(boundingBox); | ||
| } | ||
|
|
||
| boundingBox = PipeCollision.WEST.getBoundingBox().copy().offset(x, y, z); | ||
| if ((connectionMask & (1 << 4)) != 0 && boundingBox.intersectsWith(mask)) | ||
| { | ||
| list.add(boundingBox); | ||
| } | ||
|
|
||
| boundingBox = PipeCollision.EAST.getBoundingBox().copy().offset(x, y, z); | ||
| if ((connectionMask & (1 << 5)) != 0 && boundingBox.intersectsWith(mask)) | ||
| { | ||
| list.add(boundingBox); | ||
| } | ||
| } | ||
|
|
||
| public abstract int getRenderType(); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.