-
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.
Added the basics of item transportation:
- Item Conduits and Inserters Revamped booster system: - Added a weaker version of the Dilitium Booster available in the Basic Tier, the Redstone Booster - Added "yield" property to boosters, higher yield has a chance to multiply the outputs of other machines
- Loading branch information
1 parent
91db77d
commit aa6ff4a
Showing
85 changed files
with
1,635 additions
and
131 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
24 changes: 24 additions & 0 deletions
24
...in/java/sunsetsatellite/signalindustries/api/impl/btwaila/tooltip/ItemConduitTooltip.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,24 @@ | ||
package sunsetsatellite.signalindustries.api.impl.btwaila.tooltip; | ||
|
||
import net.minecraft.core.block.entity.TileEntity; | ||
import net.minecraft.core.item.ItemStack; | ||
import sunsetsatellite.signalindustries.inventories.TileEntityItemConduit; | ||
import toufoumaster.btwaila.gui.components.AdvancedInfoComponent; | ||
import toufoumaster.btwaila.tooltips.TileTooltip; | ||
import toufoumaster.btwaila.tooltips.Tooltip; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
public class ItemConduitTooltip extends TileTooltip<TileEntityItemConduit> { | ||
@Override | ||
public void initTooltip() { | ||
addClass(TileEntityItemConduit.class); | ||
} | ||
|
||
@Override | ||
public void drawAdvancedTooltip(TileEntityItemConduit conduit, AdvancedInfoComponent c) { | ||
ItemStack[] stacks = conduit.getContents().stream().map(TileEntityItemConduit.PipeItem::getStack).toArray(ItemStack[]::new); | ||
c.drawItemList(stacks,0); | ||
} | ||
} |
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
47 changes: 47 additions & 0 deletions
47
src/main/java/sunsetsatellite/signalindustries/blocks/BlockInserter.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,47 @@ | ||
package sunsetsatellite.signalindustries.blocks; | ||
|
||
import net.minecraft.core.block.BlockTileEntityRotatable; | ||
import net.minecraft.core.block.entity.TileEntity; | ||
import net.minecraft.core.block.material.Material; | ||
import net.minecraft.core.entity.EntityLiving; | ||
import net.minecraft.core.util.helper.Side; | ||
import net.minecraft.core.util.helper.Sides; | ||
import net.minecraft.core.world.World; | ||
import sunsetsatellite.catalyst.core.util.Direction; | ||
import sunsetsatellite.signalindustries.SignalIndustries; | ||
import sunsetsatellite.signalindustries.blocks.base.BlockContainerTiered; | ||
import sunsetsatellite.signalindustries.inventories.TileEntityInserter; | ||
import sunsetsatellite.signalindustries.util.Tier; | ||
|
||
public class BlockInserter extends BlockContainerTiered { | ||
|
||
public BlockInserter(String key, int i, Tier tier, Material material) { | ||
super(key, i, tier, material); | ||
withTags(SignalIndustries.ITEM_CONDUITS_CONNECT); | ||
} | ||
|
||
@Override | ||
public int getBlockTextureFromSideAndMetadata(Side side, int meta) { | ||
|
||
if(SignalIndustries.textures == null) return this.atlasIndices[side.getId()]; | ||
int index; | ||
int[] orientationLookUpVertical = new int[]{1, 0, 2, 3, 4, 5, /**/ 0, 1, 2, 3, 4, 5}; | ||
if(meta == 0 || meta == 1){ | ||
index = orientationLookUpVertical[6 * meta + side.getId()]; | ||
return SignalIndustries.textures.get(tier.name()+".inserter.vertical").getTexture(Side.getSideById(index)); | ||
} else { | ||
index = Sides.orientationLookUpHorizontal[6 * meta + side.getId()]; | ||
} | ||
return this.atlasIndices[index]; | ||
} | ||
|
||
@Override | ||
public void onBlockPlaced(World world, int x, int y, int z, Side side, EntityLiving entity, double sideHeight) { | ||
world.setBlockMetadataWithNotify(x, y, z, entity.getPlacementDirection(side).getOpposite().getId()); | ||
} | ||
|
||
@Override | ||
protected TileEntity getNewBlockEntity() { | ||
return new TileEntityInserter(); | ||
} | ||
} |
Oops, something went wrong.