mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-25 06:24:21 +00:00
Fix double-application of RR sorting upgrade deleting blocks.
This commit is contained in:
1 parent
24f1f3beef
commit
c741a6fd4b
3 files changed
+7
-9
No files matched your search
+1
-1
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.7.10-1.7.3"
|
||||
version = "1.7.10-1.7.4"
|
||||
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "StorageDrawers"
|
||||
|
||||
|
||||
+5
-7
@@ -3,16 +3,11 @@ package com.jaquadro.minecraft.storagedrawers.integration.refinedrelocation;
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.BlockCompDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityDrawersComp;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityDrawersStandard;
|
||||
import com.jaquadro.minecraft.storagedrawers.core.ModBlocks;
|
||||
import com.jaquadro.minecraft.storagedrawers.core.ModItems;
|
||||
import com.jaquadro.minecraft.storagedrawers.integration.RefinedRelocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -32,7 +27,7 @@ public class BlockSortingCompDrawers extends BlockCompDrawers
|
||||
|
||||
public static boolean upgradeToSorting (World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (!(tile instanceof TileEntityDrawersComp))
|
||||
if (!(tile instanceof TileEntityDrawersComp) || tile instanceof TileSortingDrawersComp)
|
||||
return false;
|
||||
|
||||
Block block = world.getBlock(x, y, z);
|
||||
@@ -48,7 +43,10 @@ public class BlockSortingCompDrawers extends BlockCompDrawers
|
||||
world.removeTileEntity(x, y, z);
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
world.setBlock(x, y, z, RefinedRelocation.compDrawers, meta, 3);
|
||||
Block sortingBlock = SortingBlockRegistry.resolveSortingBlock(block);
|
||||
if (sortingBlock != null) {
|
||||
world.setBlock(x, y, z, sortingBlock, meta, 3);
|
||||
}
|
||||
|
||||
world.setTileEntity(x, y, z, newDrawer);
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ public class BlockSortingDrawers extends BlockDrawers
|
||||
|
||||
public static boolean upgradeToSorting (World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (!(tile instanceof TileEntityDrawersStandard))
|
||||
if (!(tile instanceof TileEntityDrawersStandard) || tile instanceof TileSortingDrawersStandard)
|
||||
return false;
|
||||
|
||||
Block block = world.getBlock(x, y, z);
|
||||
|
||||
Reference in new issue
Block a user