Skip to content

Commit 40cce83

Browse files
committed
Fixed critical bucket void bug .
Changed the recipe for dilithium rails and made them 3x the speed of powered rails.
1 parent 84a4dfc commit 40cce83

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

src/main/java/sunsetsatellite/signalindustries/blocks/machines/BlockSIFluidTank.java

+18-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,15 @@ public boolean onBlockRightClicked(World world, int i, int j, int k, EntityPlaye
6262
if (tile.getAllowedFluidsForSlot(0).contains(fluid)) {
6363
tile.insertFluid(0, stack);
6464
Item emptyContainer = CatalystFluids.CONTAINERS.findEmptyContainersWithContainer(fluid, equippedItem).get(0);
65-
entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem] = new ItemStack(emptyContainer);
65+
ItemStack heldStack = entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem];
66+
ItemStack resultStack = new ItemStack(emptyContainer);
67+
if(heldStack != null && heldStack.stackSize == 1){
68+
entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem] = resultStack;
69+
} else if(heldStack != null && heldStack.stackSize > 1) {
70+
heldStack.stackSize -= 1;
71+
entityplayer.inventory.insertItem(resultStack,false);
72+
if(resultStack.stackSize > 0) entityplayer.dropPlayerItem(resultStack);
73+
}
6674
return true;
6775
}
6876
}
@@ -77,7 +85,15 @@ public boolean onBlockRightClicked(World world, int i, int j, int k, EntityPlaye
7785
if (tile.getFluidInSlot(0).amount >= 1000) {
7886
tile.getFluidInSlot(0).amount -= 1000;
7987
Item filledContainer = CatalystFluids.CONTAINERS.findFilledContainersWithContainer(fluid, equippedItem).get(0);
80-
entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem] = new ItemStack(filledContainer);
88+
ItemStack heldStack = entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem];
89+
ItemStack resultStack = new ItemStack(filledContainer);
90+
if(heldStack != null && heldStack.stackSize == 1){
91+
entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem] = resultStack;
92+
} else if(heldStack != null && heldStack.stackSize > 1) {
93+
heldStack.stackSize -= 1;
94+
entityplayer.inventory.insertItem(resultStack,false);
95+
if(resultStack.stackSize > 0) entityplayer.dropPlayerItem(resultStack);
96+
}
8197
return true;
8298
}
8399
}

src/main/java/sunsetsatellite/signalindustries/mixin/EntityMinecartMixin.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import net.minecraft.core.player.inventory.IInventory;
88
import net.minecraft.core.util.phys.Vec3d;
99
import net.minecraft.core.world.World;
10-
import org.spongepowered.asm.mixin.Debug;
1110
import org.spongepowered.asm.mixin.Mixin;
1211
import org.spongepowered.asm.mixin.injection.At;
1312
import org.spongepowered.asm.mixin.injection.Inject;
@@ -62,7 +61,7 @@ public void dilithiumRailBoost(CallbackInfo ci){
6261
if(l == SIBlocks.dilithiumRail.id){
6362
double d31 = Math.sqrt(this.xd * this.xd + this.zd * this.zd);
6463
if (d31 > 0.01D) {
65-
double d32 = 0.12D;
64+
double d32 = 0.18D;
6665
this.xd += this.xd / d31 * d32;
6766
this.zd += this.zd / d31 * d32;
6867
} else if (i1 == 1) {

src/main/resources/assets/signalindustries/recipes/workbench.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,9 @@
836836
"name": "signalindustries:workbench/dilithium_rail",
837837
"type": "minecraft:crafting/shaped",
838838
"pattern": [
839-
"PDP",
840-
"STS",
841-
"PDP"
839+
"PTP",
840+
"DTD",
841+
"PTP"
842842
],
843843
"symbols": [
844844
{

0 commit comments

Comments
 (0)