v1.1.0-b1 commit: E-Furnace fixed (issue #97). 1.14/1.15: Sheet Metal Slab Slices added, Config handling unified, Dense Grid Sand textures tweaked.
This commit is contained in:
parent
2805e59d26
commit
7cf182652b
261 changed files with 1161 additions and 902 deletions
|
@ -12,23 +12,20 @@ MOD_JAR=$(filter-out %-sources.jar,$(wildcard build/libs/${MOD_JAR_PREFIX}*.jar)
|
|||
ifeq ($(OS),Windows_NT)
|
||||
GRADLE=gradlew.bat --no-daemon
|
||||
GRADLE_STOP=gradlew.bat --stop
|
||||
INSTALL_DIR=$(realpath ${APPDATA}/.minecraft)
|
||||
SERVER_INSTALL_DIR=$(realpath ${APPDATA}/minecraft-server-forge-1.12.2-14.23.5.2768)
|
||||
DJS=djs
|
||||
else
|
||||
GRADLE=./gradlew --no-daemon
|
||||
GRADLE_STOP=./gradlew --stop
|
||||
INSTALL_DIR=~/.minecraft
|
||||
SERVER_INSTALL_DIR=~/.minecraft-server-forge-1.12.2-14.23.5.2768
|
||||
DJS=djs
|
||||
endif
|
||||
TASK=$(DJS) ../meta/lib/tasks.js
|
||||
|
||||
wildcardr=$(foreach d,$(wildcard $1*),$(call wildcardr,$d/,$2) $(filter $(subst *,%,$2),$d))
|
||||
|
||||
#
|
||||
# Targets
|
||||
#
|
||||
.PHONY: default mod init clean clean-all mrproper all run install sanatize dist-check dist dist-files start-server port-languages
|
||||
.PHONY: default mod init clean clean-all mrproper all run install sanitize dist-check dist dist-files start-server
|
||||
|
||||
default: mod
|
||||
|
||||
|
@ -65,42 +62,28 @@ run:
|
|||
@echo "[1.12] Running client ..."
|
||||
@$(GRADLE) runClient
|
||||
|
||||
install: $(MOD_JAR) |
|
||||
@sleep 2s
|
||||
@if [ ! -d "$(INSTALL_DIR)" ]; then echo "Cannot find installation minecraft directory."; false; fi
|
||||
@echo "[1.12] Installing '$(MOD_JAR)' to '$(INSTALL_DIR)/mods' ..."
|
||||
@[ -d "$(INSTALL_DIR)/mods" ] || mkdir "$(INSTALL_DIR)/mods"
|
||||
@rm -f "$(INSTALL_DIR)/mods/${MOD_JAR_PREFIX}"*.jar
|
||||
@cp -f "$(MOD_JAR)" "$(INSTALL_DIR)/mods/"
|
||||
@echo "[1.12] Installing '$(MOD_JAR)' to '$(SERVER_INSTALL_DIR)/mods' ..."
|
||||
@rm -f "$(SERVER_INSTALL_DIR)/mods/${MOD_JAR_PREFIX}"*.jar
|
||||
@[ -d "$(SERVER_INSTALL_DIR)/mods" ] && cp -f "$(MOD_JAR)" "$(SERVER_INSTALL_DIR)/mods/"
|
||||
|
||||
start-server:
|
||||
-@make -s install
|
||||
@echo "[1.12] Starting local dedicated server ..."
|
||||
@cd "$(SERVER_INSTALL_DIR)" && java -jar forge-1.12.2-14.23.5.2768-universal.jar nogui
|
||||
|
||||
sanatize:
|
||||
sanitize:
|
||||
@echo "[1.12] Running sanatising tasks ..."
|
||||
@djs tasks.js sanatize
|
||||
@djs tasks.js sync-languages
|
||||
@djs tasks.js version-check
|
||||
@djs tasks.js update-json
|
||||
@$(TASK) sanitize
|
||||
@$(TASK) sync-languages
|
||||
@$(TASK) version-check
|
||||
@$(TASK) update-json
|
||||
@git status -s .
|
||||
|
||||
install: $(MOD_JAR) |
|
||||
@$(TASK) install
|
||||
|
||||
start-server: install
|
||||
@$(TASK) start-server
|
||||
|
||||
dist-check:
|
||||
@echo "[1.12] Running dist checks ..."
|
||||
@djs tasks.js dist-check
|
||||
@$(TASK) dist-check
|
||||
|
||||
dist-files: clean-all init mod
|
||||
@echo "[1.12] Distribution files ..."
|
||||
@mkdir -p dist
|
||||
@cp build/libs/$(MOD_JAR_PREFIX)* dist/
|
||||
@djs tasks.js dist
|
||||
@$(TASK) dist
|
||||
|
||||
dist: sanatize dist-check dist-files
|
||||
|
||||
port-languages:
|
||||
@echo "[1.12] Porting language files to 1.14 ..."
|
||||
@djs tasks.js port-languages
|
||||
dist: sanitize dist-check dist-files
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"1.12.2": {
|
||||
"1.1.0-b1": "[F] Fixed Electrical Furnace speed sanitizing bug (issue #97, thx therobotmenace).\n[M] Changed Labeled Crate Nesting to circumvent server crashing in combination with the Sponge mod.",
|
||||
"1.0.20": "[R] Release based on v1.0.20-b6. Release-to-release changes: * Manual back ported. * Steel Mesh Fence Gate back ported. * E-Furnace speed selection switch back ported. * Labeled Crate back ported. * Minor bug fixes, compatibility changes.",
|
||||
"1.0.20-b6": "[F] Implemented compat related to issue #91.",
|
||||
"1.0.20-b5": "[A] Back-ported Patchouli based Manual (you need to install Vazkii_'s Patchouli, too).\n[A] Back-ported Steel Mesh Fence Gate.\n[M] Minor back-porting compatibility refractoring.",
|
||||
|
@ -89,6 +90,6 @@
|
|||
},
|
||||
"promos": {
|
||||
"1.12.2-recommended": "1.0.20",
|
||||
"1.12.2-latest": "1.0.20"
|
||||
"1.12.2-latest": "1.1.0-b1"
|
||||
}
|
||||
}
|
|
@ -10,7 +10,9 @@ Mod sources for Minecraft version 1.12.2.
|
|||
----
|
||||
## Version history
|
||||
|
||||
~ v1.1.0-b1 [M]
|
||||
- v1.1.0-b1 [F] Fixed Electrical Furnace speed sanitizing bug (issue #97, thx therobotmenace).
|
||||
[M] Changed Labeled Crate Nesting to circumvent server crashing
|
||||
in combination with the Sponge mod.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
- v1.0.20 [R] Release based on v1.0.20-b6. Release-to-release changes:
|
||||
|
|
|
@ -212,7 +212,7 @@ public class ModContent
|
|||
ModAuxiliaries.getPixeledAABB(0,0,0, 16,16,16)
|
||||
);
|
||||
|
||||
public static final BlockDecorLabeledCrate.DecorLabeledCrateBlock LABELED_CRATE = new BlockDecorLabeledCrate.DecorLabeledCrateBlock(
|
||||
public static final BlockDecorLabeledCrate LABELED_CRATE = new BlockDecorLabeledCrate(
|
||||
"labeled_crate",
|
||||
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT,
|
||||
Material.WOOD, 0.5f, 128f, SoundType.METAL,
|
||||
|
|
|
@ -9,10 +9,8 @@
|
|||
package wile.engineersdecor.blocks;
|
||||
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -32,6 +30,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.energy.CapabilityEnergy;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
|
@ -316,7 +315,7 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
|
|||
public static final int HEAT_INCREMENT = 20;
|
||||
public static final int MAX_ENERGY_TRANSFER = 256;
|
||||
public static final int MAX_ENERGY_BUFFER = 32000;
|
||||
public static final int MAX_SPEED_SETTING = 2;
|
||||
public static final int MAX_SPEED_SETTING = 3;
|
||||
public static final int NUM_OF_SLOTS = 7;
|
||||
public static final int SMELTING_INPUT_SLOT_NO = 0;
|
||||
public static final int SMELTING_AUX_SLOT_NO = 1;
|
||||
|
@ -382,7 +381,7 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
|
|||
proc_time_needed_ = compound.getInteger("CookTimeTotal");
|
||||
energy_stored_ = compound.getInteger("Energy");
|
||||
speed_ = compound.getInteger("SpeedSetting");
|
||||
speed_ = (speed_ < 0) ? (1) : ((speed_>3) ? 3 : speed_);
|
||||
speed_ = (speed_ < 0) ? (1) : ((speed_>MAX_SPEED_SETTING) ? MAX_SPEED_SETTING : speed_);
|
||||
}
|
||||
|
||||
protected void writenbt(NBTTagCompound compound)
|
||||
|
@ -391,7 +390,7 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
|
|||
compound.setInteger("CookTime", MathHelper.clamp(proc_time_elapsed_, 0, MAX_BURNTIME));
|
||||
compound.setInteger("CookTimeTotal", MathHelper.clamp(proc_time_needed_, 0, MAX_BURNTIME));
|
||||
compound.setInteger("Energy", MathHelper.clamp(energy_stored_,0 , MAX_ENERGY_BUFFER));
|
||||
compound.setInteger("SpeedSetting", MathHelper.clamp(speed_, -1, MAX_SPEED_SETTING));
|
||||
compound.setInteger("SpeedSetting", MathHelper.clamp(speed_, 0, MAX_SPEED_SETTING));
|
||||
ItemStackHelper.saveAllItems(compound, stacks_);
|
||||
}
|
||||
|
||||
|
@ -655,7 +654,7 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
|
|||
@Override
|
||||
public void onClientPacketReceived(EntityPlayer player, NBTTagCompound nbt)
|
||||
{
|
||||
if(nbt.hasKey("speed")) speed_ = MathHelper.clamp(nbt.getInteger("speed"), 0, 3);
|
||||
if(nbt.hasKey("speed")) speed_ = MathHelper.clamp(nbt.getInteger("speed"), 0, MAX_SPEED_SETTING);
|
||||
markDirty();
|
||||
}
|
||||
|
||||
|
@ -761,7 +760,7 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
|
|||
}
|
||||
final ItemStack last_inp_stack = current_smelting_input_stack_;
|
||||
current_smelting_input_stack_ = stacks_.get(SMELTING_INPUT_SLOT_NO);
|
||||
if((!current_smelting_input_stack_.isEmpty()) && (enabled_) && (speed_>0) && (speed_<4)) {
|
||||
if((!current_smelting_input_stack_.isEmpty()) && (enabled_) && (speed_>0) && (speed_<=MAX_SPEED_SETTING)) {
|
||||
if(!current_smelting_input_stack_.isItemEqual(current_smelting_input_stack_)) {
|
||||
proc_time_elapsed_ = 0;
|
||||
proc_time_needed_ = getCookTime(current_smelting_input_stack_);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -40,13 +41,12 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
public class BlockDecorLabeledCrate
|
||||
public class BlockDecorLabeledCrate extends BlockDecorDirectedHorizontal
|
||||
{
|
||||
public static void on_config(int stack_limit)
|
||||
{
|
||||
|
@ -56,94 +56,129 @@ public class BlockDecorLabeledCrate
|
|||
// Block
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public static class DecorLabeledCrateBlock extends BlockDecorDirectedHorizontal
|
||||
public BlockDecorLabeledCrate(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB)
|
||||
{ super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); }
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state)
|
||||
{ return true; }
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public TileEntity createTileEntity(World world, IBlockState state)
|
||||
{ return new LabeledCrateTileEntity(); }
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
public DecorLabeledCrateBlock(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB)
|
||||
{ super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); }
|
||||
if(world.isRemote) return true;
|
||||
player.openGui(ModEngineersDecor.instance, ModEngineersDecor.GuiHandler.GUIID_LABELED_CRATE, world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state)
|
||||
{ return true; }
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||
{
|
||||
if(world.isRemote) return;
|
||||
if((!stack.hasTagCompound()) || (!stack.getTagCompound().hasKey("inventory"))) return;
|
||||
NBTTagCompound inventory_nbt = stack.getTagCompound().getCompoundTag("inventory");
|
||||
if(inventory_nbt.isEmpty()) return;
|
||||
final TileEntity te = world.getTileEntity(pos);
|
||||
if(!(te instanceof LabeledCrateTileEntity)) return;
|
||||
((LabeledCrateTileEntity)te).readnbt(inventory_nbt);
|
||||
((LabeledCrateTileEntity)te).markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public TileEntity createTileEntity(World world, IBlockState state)
|
||||
{ return new LabeledCrateTileEntity(); }
|
||||
private ItemStack itemize_with_inventory(World world, BlockPos pos)
|
||||
{
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if(!(te instanceof LabeledCrateTileEntity)) return ItemStack.EMPTY;
|
||||
ItemStack stack = new ItemStack(this, 1);
|
||||
NBTTagCompound inventory_nbt = new NBTTagCompound();
|
||||
ItemStackHelper.saveAllItems(inventory_nbt, ((LabeledCrateTileEntity)te).stacks_, false);
|
||||
if(!inventory_nbt.isEmpty()) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setTag("inventory", inventory_nbt);
|
||||
stack.setTagCompound(nbt);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
|
||||
@Override
|
||||
public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||
{
|
||||
if(world.isRemote) return true;
|
||||
final ItemStack stack = itemize_with_inventory(world, pos);
|
||||
if(stack != ItemStack.EMPTY) {
|
||||
world.spawnEntity(new EntityItem(world, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, stack));
|
||||
world.setBlockToAir(pos);
|
||||
world.removeTileEntity(pos);
|
||||
return false;
|
||||
} else {
|
||||
return super.removedByPlayer(state, world, pos, player, willHarvest);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockExploded(World world, BlockPos pos, Explosion explosion)
|
||||
{
|
||||
if(world.isRemote) return;
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if(!(te instanceof LabeledCrateTileEntity)) return;
|
||||
for(ItemStack stack: ((LabeledCrateTileEntity)te).stacks_) {
|
||||
if(!stack.isEmpty()) world.spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), stack));
|
||||
}
|
||||
((LabeledCrateTileEntity)te).reset();
|
||||
super.onBlockExploded(world, pos, explosion);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean hasComparatorInputOverride(IBlockState state)
|
||||
{ return true; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public int getComparatorInputOverride(IBlockState blockState, World world, BlockPos pos)
|
||||
{ return Container.calcRedstone(world.getTileEntity(pos)); }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// GUI
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static class BGui extends GuiContainer
|
||||
{
|
||||
private final LabeledCrateTileEntity te;
|
||||
|
||||
public BGui(InventoryPlayer playerInventory, World world, BlockPos pos, LabeledCrateTileEntity te)
|
||||
{
|
||||
if(world.isRemote) return true;
|
||||
player.openGui(ModEngineersDecor.instance, ModEngineersDecor.GuiHandler.GUIID_LABELED_CRATE, world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
super(new BContainer(playerInventory, world, pos, te));
|
||||
this.te = te;
|
||||
xSize = 213;
|
||||
ySize = 206;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||
{
|
||||
if(world.isRemote) return;
|
||||
if((!stack.hasTagCompound()) || (!stack.getTagCompound().hasKey("inventory"))) return;
|
||||
NBTTagCompound inventory_nbt = stack.getTagCompound().getCompoundTag("inventory");
|
||||
if(inventory_nbt.isEmpty()) return;
|
||||
final TileEntity te = world.getTileEntity(pos);
|
||||
if(!(te instanceof LabeledCrateTileEntity)) return;
|
||||
((LabeledCrateTileEntity)te).readnbt(inventory_nbt);
|
||||
((LabeledCrateTileEntity)te).markDirty();
|
||||
}
|
||||
public void initGui()
|
||||
{ super.initGui(); }
|
||||
|
||||
private ItemStack itemize_with_inventory(World world, BlockPos pos)
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if(!(te instanceof LabeledCrateTileEntity)) return ItemStack.EMPTY;
|
||||
ItemStack stack = new ItemStack(this, 1);
|
||||
NBTTagCompound inventory_nbt = new NBTTagCompound();
|
||||
ItemStackHelper.saveAllItems(inventory_nbt, ((LabeledCrateTileEntity)te).stacks_, false);
|
||||
if(!inventory_nbt.isEmpty()) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setTag("inventory", inventory_nbt);
|
||||
stack.setTagCompound(nbt);
|
||||
}
|
||||
return stack;
|
||||
drawDefaultBackground();
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
renderHoveredToolTip(mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
|
||||
{
|
||||
if(world.isRemote) return true;
|
||||
final ItemStack stack = itemize_with_inventory(world, pos);
|
||||
if(stack != ItemStack.EMPTY) {
|
||||
world.spawnEntity(new EntityItem(world, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, stack));
|
||||
world.setBlockToAir(pos);
|
||||
world.removeTileEntity(pos);
|
||||
return false;
|
||||
} else {
|
||||
return super.removedByPlayer(state, world, pos, player, willHarvest);
|
||||
}
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(new ResourceLocation(ModEngineersDecor.MODID, "textures/gui/labeled_crate_gui.png"));
|
||||
final int x0=guiLeft, y0=guiTop, w=xSize, h=ySize;
|
||||
drawTexturedModalRect(x0, y0, 0, 0, w, h);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockExploded(World world, BlockPos pos, Explosion explosion)
|
||||
{
|
||||
if(world.isRemote) return;
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if(!(te instanceof LabeledCrateTileEntity)) return;
|
||||
for(ItemStack stack: ((LabeledCrateTileEntity)te).stacks_) {
|
||||
if(!stack.isEmpty()) world.spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), stack));
|
||||
}
|
||||
((LabeledCrateTileEntity)te).reset();
|
||||
super.onBlockExploded(world, pos, explosion);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean hasComparatorInputOverride(IBlockState state)
|
||||
{ return true; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public int getComparatorInputOverride(IBlockState blockState, World world, BlockPos pos)
|
||||
{ return Container.calcRedstone(world.getTileEntity(pos)); }
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -184,7 +219,7 @@ public class BlockDecorLabeledCrate
|
|||
|
||||
@Override
|
||||
public boolean shouldRefresh(World world, BlockPos pos, IBlockState os, IBlockState ns)
|
||||
{ return (os.getBlock()!=ns.getBlock())||(!(ns.getBlock() instanceof DecorLabeledCrateBlock));}
|
||||
{ return (os.getBlock()!=ns.getBlock())||(!(ns.getBlock() instanceof BlockDecorLabeledCrate));}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound compound)
|
||||
|
@ -445,45 +480,6 @@ public class BlockDecorLabeledCrate
|
|||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// GUI
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static class BGui extends GuiContainer
|
||||
{
|
||||
private final LabeledCrateTileEntity te;
|
||||
|
||||
public BGui(InventoryPlayer playerInventory, World world, BlockPos pos, LabeledCrateTileEntity te)
|
||||
{
|
||||
super(new BContainer(playerInventory, world, pos, te));
|
||||
this.te = te;
|
||||
xSize = 213;
|
||||
ySize = 206;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{ super.initGui(); }
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
drawDefaultBackground();
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
renderHoveredToolTip(mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
|
||||
{
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(new ResourceLocation(ModEngineersDecor.MODID, "textures/gui/labeled_crate_gui.png"));
|
||||
final int x0=guiLeft, y0=guiTop, w=xSize, h=ySize;
|
||||
drawTexturedModalRect(x0, y0, 0, 0, w, h);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// Container
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -542,7 +538,7 @@ public class BlockDecorLabeledCrate
|
|||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{ return (world.getBlockState(pos).getBlock() instanceof DecorLabeledCrateBlock) && (player.getDistanceSq(pos) <= 64); }
|
||||
{ return (world.getBlockState(pos).getBlock() instanceof BlockDecorLabeledCrate) && (player.getDistanceSq(pos) <= 64); }
|
||||
|
||||
@Override
|
||||
public boolean canMergeSlot(ItemStack stack, Slot slot)
|
||||
|
|
|
@ -28,7 +28,6 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import wile.engineersdecor.blocks.BlockDecorLabeledCrate;
|
||||
import wile.engineersdecor.blocks.BlockDecorLabeledCrate.DecorLabeledCrateBlock;
|
||||
import wile.engineersdecor.blocks.BlockDecorTest;
|
||||
|
||||
public class ModTesrs
|
||||
|
@ -114,7 +113,7 @@ public class ModTesrs
|
|||
try {
|
||||
final ItemStack stack = te.getItemFrameStack();
|
||||
if(stack.isEmpty()) return;
|
||||
final int di = MathHelper.clamp(te.getWorld().getBlockState(te.getPos()).getValue(DecorLabeledCrateBlock.FACING).getHorizontalIndex(), 0, 3);
|
||||
final int di = MathHelper.clamp(te.getWorld().getBlockState(te.getPos()).getValue(BlockDecorLabeledCrate.FACING).getHorizontalIndex(), 0, 3);
|
||||
double ox = tr[di][0], oy = tr[di][1], oz = tr[di][2], ry = tr[di][3];
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableLighting();
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/djs
|
||||
// Note for reviewers/clones: This file is a auxiliary script for my setup. It's not needed to build the mod.
|
||||
"use strict";
|
||||
const constants = include("../meta/lib/constants.js")();
|
||||
const libtask = include("../meta/lib/libtask.js")(constants);
|
||||
const liblang = include("../meta/lib/liblang.1.12.js")(constants);
|
||||
const liblang13 = include("../meta/lib/liblang.1.13.js")(constants);
|
||||
const liblang14 = include("../meta/lib/liblang.1.13.js")(constants);
|
||||
var tasks = {};
|
||||
|
||||
tasks["sync-languages"] = function() {
|
||||
liblang.sync_languages();
|
||||
};
|
||||
|
||||
tasks["port-languages"] = function() {
|
||||
fs.find("src/main/resources/assets/"+ constants.mod_registry_name() +"/lang", '*.lang', function(path){
|
||||
const unified = liblang.load(path);
|
||||
path = path.replace(/\.lang$/,"");
|
||||
liblang13.save("../1.13/"+path+".json", unified);
|
||||
liblang14.save("../1.14/"+path+".json", unified);
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
libtask.run(tasks, sys.args);
|
Loading…
Add table
Add a link
Reference in a new issue