Browse Source

Fixed Hoppers to only add Snowballs Clientside now

Gregorius Techneticies 7 months ago
parent
commit
33f1e254e6
Signed by: Gregorius Techneticies <gregoriustech@gmail.com> GPG Key ID: 4C7DC365E9F99806

+ 1
- 1
src/main/java/gregtech/tileentity/inventories/MultiTileEntityHopper.java View File

@@ -155,7 +155,7 @@ public class MultiTileEntityHopper extends TileEntityBase09FacingSingle implemen
155 155
 	
156 156
 	@Override
157 157
 	public void onWalkOver2(EntityLivingBase aEntity) {
158
-		if (aEntity.getClass() == EntitySnowman.class || "EntityNewSnowGolem".equalsIgnoreCase(UT.Reflection.getLowercaseClass(aEntity))) {
158
+		if (isServerSide() && (aEntity.getClass() == EntitySnowman.class || "EntityNewSnowGolem".equalsIgnoreCase(UT.Reflection.getLowercaseClass(aEntity)))) {
159 159
 			int i = getSizeInventory(); while (--i>=0) if (addStackToSlot(i, ST.make(Items.snowball, 1, 0))) break;
160 160
 		}
161 161
 	}

+ 1
- 1
src/main/java/gregtech/tileentity/inventories/MultiTileEntityQueueHopper.java View File

@@ -142,7 +142,7 @@ public class MultiTileEntityQueueHopper extends TileEntityBase09FacingSingle imp
142 142
 	
143 143
 	@Override
144 144
 	public void onWalkOver2(EntityLivingBase aEntity) {
145
-		if (aEntity.getClass() == EntitySnowman.class || "EntityNewSnowGolem".equalsIgnoreCase(UT.Reflection.getLowercaseClass(aEntity))) {
145
+		if (isServerSide() && (aEntity.getClass() == EntitySnowman.class || "EntityNewSnowGolem".equalsIgnoreCase(UT.Reflection.getLowercaseClass(aEntity)))) {
146 146
 			addStackToSlot(getSizeInventory()-1, ST.make(Items.snowball, 1, 0));
147 147
 		}
148 148
 	}

Loading…
Cancel
Save