-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix NPE caused by calling markdirty() when chunk is being loaded
- Loading branch information
Showing
22 changed files
with
1,628 additions
and
53 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
67 changes: 67 additions & 0 deletions
67
src/main/java/reobf/proghatches/eucrafting/ItemPartEUP2PInterface.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,67 @@ | ||
package reobf.proghatches.eucrafting; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
import com.glodblock.github.FluidCraft; | ||
import com.glodblock.github.common.Config; | ||
import com.glodblock.github.common.item.FCBaseItem; | ||
import com.glodblock.github.common.item.ItemFluidExportBus; | ||
import com.glodblock.github.common.parts.PartFluidExportBus; | ||
import com.glodblock.github.common.tabs.FluidCraftingTabs; | ||
import com.glodblock.github.util.NameConst; | ||
|
||
import appeng.api.AEApi; | ||
import appeng.api.parts.IPartItem; | ||
import cpw.mods.fml.common.registry.GameRegistry; | ||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import net.minecraft.client.renderer.texture.IIconRegister; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.world.World; | ||
|
||
public class ItemPartEUP2PInterface extends Item implements IPartItem { | ||
|
||
public ItemPartEUP2PInterface() { | ||
this.setMaxStackSize(64); | ||
// this.setUnlocalizedName(NameConst.ITEM_PART_FLUID_EXPORT); | ||
AEApi.instance().partHelper().setItemBusRenderer(this); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public PartEUP2PInterface createPartFromItemStack(ItemStack is) { | ||
return new PartEUP2PInterface(is); | ||
} | ||
|
||
@Override | ||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, | ||
float xOffset, float yOffset, float zOffset) { | ||
return AEApi.instance().partHelper().placeBus(player.getHeldItem(), x, y, z, side, player, world); | ||
} | ||
|
||
/* | ||
public ItemPartEUSource register() { | ||
//if (!Config.fluidIOBus) return null; | ||
GameRegistry.registerItem(this, NameConst.ITEM_PART_FLUID_EXPORT, FluidCraft.MODID); | ||
//setCreativeTab(FluidCraftingTabs.INSTANCE); | ||
return this; | ||
} | ||
*/ | ||
@SideOnly(Side.CLIENT) | ||
@Override | ||
public void registerIcons(IIconRegister _iconRegister) { | ||
//PartEUSource.registerIcons(_iconRegister); | ||
|
||
|
||
} | ||
|
||
@Override | ||
@SideOnly(Side.CLIENT) | ||
public int getSpriteNumber() { | ||
return 0; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.