mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 11:59:17 +00:00
Made painted glow stone re-paintable.
This commit is contained in:
1 parent
939fecac69
commit
58aaad320d
2 files changed
+6
-11
No files matched your search
@@ -98,8 +98,8 @@ public abstract class BasicPainterTemplate implements IMachineRecipe {
|
||||
if(target == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Block blk = Util.getBlockFromItemId(target);
|
||||
|
||||
Block blk = Block.getBlockFromItem(target.getItem());
|
||||
if(blk == null) {
|
||||
return false;
|
||||
}
|
||||
@@ -109,12 +109,7 @@ public abstract class BasicPainterTemplate implements IMachineRecipe {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < validTargets.length; i++) {
|
||||
if(validTargets[i] == blk) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public class BlockPaintedGlowstone extends Block implements ITileEntityProvider
|
||||
private void init() {
|
||||
GameRegistry.registerBlock(this, BlockItemPaintedGlowstone.class, ModObject.blockPaintedGlowstone.unlocalisedName);
|
||||
GameRegistry.registerTileEntity(TileEntityPaintedBlock.class, ModObject.blockPaintedGlowstone.unlocalisedName + "TileEntity");
|
||||
MachineRecipeRegistry.instance.registerRecipe(ModObject.blockPainter.unlocalisedName, new PainterTemplate());
|
||||
MachineRecipeRegistry.instance.registerRecipe(ModObject.blockPainter.unlocalisedName, new PainterTemplate(this));
|
||||
}
|
||||
|
||||
public static ItemStack createItemStackForSourceBlock(Block block, int damage) {
|
||||
@@ -238,8 +238,8 @@ public class BlockPaintedGlowstone extends Block implements ITileEntityProvider
|
||||
|
||||
public static final class PainterTemplate extends BasicPainterTemplate {
|
||||
|
||||
public PainterTemplate() {
|
||||
super(Blocks.glowstone);
|
||||
public PainterTemplate(Block paintedGlowstone) {
|
||||
super(Blocks.glowstone, paintedGlowstone);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user