Release merge mc1.12.2-v1.0.3.

This commit is contained in:
stfwi 2019-04-11 20:23:12 +02:00
commit f5539a5851
92 changed files with 3420 additions and 907 deletions

View file

@ -11,6 +11,7 @@ buildscript {
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'idea'
sourceCompatibility = targetCompatibility = '1.8'
compileJava { // Need this here so eclipse task generates correctly.
sourceCompatibility = targetCompatibility = '1.8'
@ -47,7 +48,13 @@ minecraft {
replaceIn "ModEngineersDecor.java"
}
repositories {
maven { name = "Progwml6 maven"; url = "https://dvs1.progwml6.com/files/maven/" } // JEI files
maven { name = "ModMaven"; url = "modmaven.k-4u.nl" } // JEI files, fallback
}
dependencies {
deobfProvided "mezz.jei:jei_${version_minecraft}:${version_jei}:api"
runtime "mezz.jei:jei_${version_minecraft}:${version_jei}"
}
processResources {
@ -63,7 +70,7 @@ processResources {
}
task signJar(type: SignJar, dependsOn: reobfJar) {
onlyIf { signing.getProperty("keystore_file"); }
onlyIf { signing.getProperty("keystore_file") }
keyStore = signing.getProperty("keystore_file")
alias = signing.getProperty("keystore_alias")
storePass = signing.getProperty("keystore_pass")

View file

@ -3,12 +3,5 @@ org.gradle.daemon=false
org.gradle.jvmargs=-Xmx8G
version_minecraft=1.12.2
version_forge=14.23.5.2768
version_engineersdecor=1.0.2
#
# jar signing data loaded from signing.properties in the project root.
#
#signing.keystore_file=
#signing.keystore_alias=
#signing.keystore_pass=
#signing.keystore_keypass=
#fingerprint_sha1.fp_sha1=
version_jei=4.10.0.198
version_engineersdecor=1.0.3

View file

@ -1,6 +1,12 @@
{
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
"1.12.2": {
"1.0.3": "[R] Release based on v1.0.3-b5. Release-to-release changes: * Small laboratory furnace added. * Extensive config options for mod packing and tuning added. * Rendering issues fixes (window bleeding, optifine). * Steel framed window added. * Treated wood pole \"end pieces\" added (two support variants). * Sitting on treated wood stool added including mobs (but not villagers, as these are obviously very upright people). * Lang ru_ru added (github contribution from Yaroslavik). * Creative tab logo changed to mod logo. * Table/crafting table bounding boxes refined. * Standalone \"escape\" recipes added if IE is not installed.",
"1.0.3-b5": "[F] Fixed typo in en-en lang file.\n[F] Fixed IE concrete texture missing bailout in log if IE is not installed.\n[F] Using forge multi-layer models for windows to circumvent glitches.\n[M] Changed creative tab logo to the mod logo.\n[A] Added alternative recipes for crafting table and furnace if main IE ingredients are missing (for \"stand-alone\" mod usage).",
"1.0.3-b4": "[A] Lab furnace supports electrical speedup when a IE external is placed in one of the two auxiliary slots.\n[F] Fixed window rendering issue (issue #15, thanks to ILLOMIURGE).\n[M] Updated ru_ru lang file (Yaroslavik).",
"1.0.3-b3": "[A] Added sitting on treated wood stool, Zombies included.\n[A] Added steel framed window.\n[A] Added treated wood pole support head/foot and heavy duty support.\n[A] Added language Russian language support, thanks to yaroslav4167.\n[A] Added config for furnace smelting speed (percent of vanilla furnace).\n[A] Added config for furnace fuel efficiency (in percent, ref is vanilla).\n[F] Treated pole model changed to circumvent potential texture bleeding.\n[M] Treated wood table bounding box aligned with the legs.\n[M] Treated wood crafting table bounding box aligned with the legs.\n[M] Treated wood window can be vertically placed for rooflights.",
"1.0.3-b2": "[A] Added config options for selective feature opt-outs (soft opt-out).\n[A] Added config skip registration of opt-out features (hard opt-out).\n[A] Added config to disable all internal recipes (for packs).\n[A] Added JEI API adapter for soft opt-outs.\n[A] Added lab furnace recipe override config to smelt ores to nuggets that would normally be smelted into ingots. Can be changed on-the-fly.",
"1.0.3-b1": "[A] Added small laboratory furnace.\n[M] Panzer glass opacity/light level set explicitly 0.",
"1.0.2": "[R] Release based on v1.0.2-b3 * Fixes: Spawning. * Crafting table: Shift-click. * Ladders: Faster climbing/descending. * Concrete: Rebar tiles, tile stairs. * Treated wood: window, windowsill. * Slag brick: wall. * Panzer glass: added. * Recipes: Adaptions, added decompositions.",
"1.0.2-b3": "[A] Added slag brick wall.\n[A] Added wall decomposition recipes.\n[A] Added treated wood window.\n[M] Climbing/descending mod ladders is faster when looking up or down and not sneaking.\n[M] Panzer glass material definition changed.\n[M] Explicitly preventing spawning in and on \"non-full\" blocks of the mod.",
"1.0.2-b2": "[A] Added rebar concrete tile stairs.\n[A] Added treated wood window sill.\n[A] Added decomposition recipes for stairs and tiles.\n[M] Changed stair recipe yield quantity from 9 to 6.",
@ -17,7 +23,7 @@
"1.0.0-b1": "[A] Initial structure.\n[A] Added clinker bricks and clinker brick stairs.\n[A] Added slag bricks and slag brick stairs.\n[A] Added metal rung ladder.\n[A] Added staggered metal steps ladder.\n[A] Added treated wood ladder.\n[A] Added treated wood pole.\n[A] Added treated wood table."
},
"promos": {
"1.12.2-recommended": "1.0.2",
"1.12.2-latest": "1.0.2"
"1.12.2-recommended": "1.0.3",
"1.12.2-latest": "1.0.3"
}
}

View file

@ -10,6 +10,54 @@ Mod sources for Minecraft version 1.12.2.
----
## Revision history
-------------------------------------------------------------------
- v1.0.3 [R] Release based on v1.0.3-b5. Release-to-release changes:
* Small laboratory furnace added.
* Extensive config options for mod packing and tuning added.
* Rendering issues fixes (window bleeding, optifine).
* Steel framed window added.
* Treated wood pole "end pieces" added (two support variants).
* Sitting on treated wood stool added including mobs (but not
villagers, as these are obviously very upright people).
* Lang ru_ru added (github contribution from Yaroslavik).
* Creative tab logo changed to mod logo.
* Table/crafting table bounding boxes refined.
* Standalone "escape" recipes added if IE is not installed.
-------------------------------------------------------------------
- v1.0.3-b5 [F] Fixed typo in en-en lang file.
[F] Fixed IE concrete texture missing bailout in log if IE is not installed.
[F] Using forge multi-layer models for windows to circumvent glitches.
[M] Changed creative tab logo to the mod logo.
[A] Added alternative recipes for crafting table and furnace if main
IE ingredients are missing (for "stand-alone" mod usage).
- v1.0.3-b4 [A] Lab furnace supports electrical speedup when a IE external
is placed in one of the two auxiliary slots.
[F] Fixed window rendering issue (issue #15, thanks to ILLOMIURGE).
[M] Updated ru_ru lang file (Yaroslavik).
- v1.0.3-b3 [A] Added sitting on treated wood stool, Zombies included.
[A] Added steel framed window.
[A] Added treated wood pole support head/foot and heavy duty support.
[A] Added language Russian language support, thanks to yaroslav4167.
[A] Added config for furnace smelting speed (percent of vanilla furnace).
[A] Added config for furnace fuel efficiency (in percent, ref is vanilla).
[F] Treated pole model changed to circumvent potential texture bleeding.
[M] Treated wood table bounding box aligned with the legs.
[M] Treated wood crafting table bounding box aligned with the legs.
[M] Treated wood window can be vertically placed for rooflights.
- v1.0.3-b2 [A] Added config options for selective feature opt-outs (soft opt-out).
[A] Added config skip registration of opt-out features (hard opt-out).
[A] Added config to disable all internal recipes (for packs).
[A] Added JEI API adapter for soft opt-outs.
[A] Added lab furnace recipe override config to smelt ores to nuggets
that would normally be smelted into ingots. Can be changed on-the-fly.
- v1.0.3-b1 [A] Added small laboratory furnace.
[M] Panzer glass opacity/light level set explicitly 0.
-------------------------------------------------------------------
- v1.0.2 [R] Release based on v1.0.2-b3
* Fixes: Spawning.

View file

@ -8,36 +8,40 @@
*/
package wile.engineersdecor;
import wile.engineersdecor.detail.ModConfig;
import wile.engineersdecor.detail.ExtItems;
import wile.engineersdecor.detail.Networking;
import wile.engineersdecor.detail.RecipeCondModSpecific;
import wile.engineersdecor.blocks.*;
import net.minecraft.world.World;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.fml.common.network.IGuiHandler;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import wile.engineersdecor.blocks.BlockDecorCraftingTable;
import wile.engineersdecor.blocks.BlockDecorLadder;
import wile.engineersdecor.detail.ModConfig;
import wile.engineersdecor.blocks.ModBlocks;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.apache.logging.log4j.Logger;
import javax.annotation.Nonnull;
@Mod(
modid = ModEngineersDecor.MODID,
name = ModEngineersDecor.MODNAME,
@ -61,6 +65,10 @@ public class ModEngineersDecor
@Mod.Instance
public static ModEngineersDecor instance;
//--------------------------------------------------------------------------------------------------------------------
// Side handling
//--------------------------------------------------------------------------------------------------------------------
@SidedProxy(clientSide = "wile.engineersdecor.detail.ClientProxy", serverSide = "wile.engineersdecor.detail.ServerProxy")
public static IProxy proxy;
@ -69,8 +77,13 @@ public class ModEngineersDecor
default void preInit(final FMLPreInitializationEvent e) {}
default void init(final FMLInitializationEvent e) {}
default void postInit(final FMLPostInitializationEvent e) {}
default World getWorlClientSide() { return null; }
}
//--------------------------------------------------------------------------------------------------------------------
// Init
//--------------------------------------------------------------------------------------------------------------------
@Mod.EventHandler
public void preInit(final FMLPreInitializationEvent event)
{
@ -83,6 +96,7 @@ public class ModEngineersDecor
}
proxy.preInit(event);
MinecraftForge.EVENT_BUS.register(new PlayerEventHandler());
Networking.init();
}
@Mod.EventHandler
@ -90,11 +104,18 @@ public class ModEngineersDecor
{
proxy.init(event);
NetworkRegistry.INSTANCE.registerGuiHandler(this, new ModEngineersDecor.GuiHandler());
EntityRegistry.registerModEntity(new ResourceLocation(ModEngineersDecor.MODID, "chair_entity"), BlockDecorChair.EntityChair.class,"DecorChair",0,this,80,1,false);
}
@Mod.EventHandler
public void postInit(final FMLPostInitializationEvent event)
{ ModConfig.onPostInit(event); proxy.postInit(event); }
{
ModConfig.onPostInit(event);
proxy.postInit(event);
if(RecipeCondModSpecific.num_skipped > 0) logger.info("Excluded " + RecipeCondModSpecific.num_skipped + " recipes due to config opt-out.");
if(ModConfig.zmisc.with_experimental) logger.info("Included experimental features due to mod config.");
ExtItems.onPostInit();
}
@Mod.EventBusSubscriber
public static final class RegistrationSubscriptions
@ -117,12 +138,17 @@ public class ModEngineersDecor
@Override
@SideOnly(Side.CLIENT)
public @Nonnull ItemStack createIcon()
{ return new ItemStack(ModBlocks.TREATED_WOOD_LADDER); }
{ return new ItemStack(ModBlocks.SIGN_MODLOGO); }
});
//--------------------------------------------------------------------------------------------------------------------
// Player interaction/notification
//--------------------------------------------------------------------------------------------------------------------
public static final class GuiHandler implements IGuiHandler
{
public static final int GUIID_CRAFTING_TABLE = 213101;
public static final int GUIID_SMALL_LAB_FURNACE = 213102;
@Override
public Object getServerGuiElement(final int guiid, final EntityPlayer player, final World world, int x, int y, int z)
@ -131,6 +157,7 @@ public class ModEngineersDecor
final TileEntity te = world.getTileEntity(pos);
switch(guiid) {
case GUIID_CRAFTING_TABLE: return BlockDecorCraftingTable.getServerGuiElement(player, world, pos, te);
case GUIID_SMALL_LAB_FURNACE: return BlockDecorFurnace.getServerGuiElement(player, world, pos, te);
}
return null;
}
@ -143,6 +170,7 @@ public class ModEngineersDecor
final TileEntity te = (world instanceof WorldClient) ? world.getTileEntity(pos) : null;
switch(guiid) {
case GUIID_CRAFTING_TABLE: return BlockDecorCraftingTable.getClientGuiElement(player, world, pos, te);
case GUIID_SMALL_LAB_FURNACE: return BlockDecorFurnace.getClientGuiElement(player, world, pos, te);
}
return null;
}

View file

@ -46,12 +46,16 @@ public class BlockDecor extends Block
public static final long CFG_HORIZIONTAL = 0x0000000000000002L; // horizontal block, affects bounding box calculation at construction time and placement
public static final long CFG_LOOK_PLACEMENT = 0x0000000000000004L; // placed in direction the player is looking when placing.
public static final long CFG_FACING_PLACEMENT = 0x0000000000000008L; // placed on the facing the player has clicked.
public static final long CFG_OPPOSITE_PLACEMENT = 0x0000000000000020L; // placed placed in the opposite direction of the face the player clicked.
public static final long CFG_OPPOSITE_PLACEMENT = 0x0000000000000010L; // placed placed in the opposite direction of the face the player clicked.
public static final long CFG_FLIP_PLACEMENT_IF_SAME = 0x0000000000000020L; // placement direction flipped if an instance of the same class was clicked
public static final long CFG_TRANSLUCENT = 0x0000000000000040L; // indicates a block/pane is glass like (transparent, etc)
public static final long CFG_LIGHT_VALUE_MASK = 0x0000000000000f00L; // fixed value for getLightValue()
public static final long CFG_LIGHT_VALUE_SHIFT = 8L;
public static final long CFG_LAB_FURNACE_CRUDE = 0x0000000000010000L; // For DecorFurnace, denotes that it is a crude furnace.
public BlockDecor(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound)
protected final AxisAlignedBB aabb;
public BlockDecor(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nullable AxisAlignedBB boundingbox)
{
super((material!=null) ? (material) : (Material.IRON));
setCreativeTab(ModEngineersDecor.CREATIVE_TAB_ENGINEERSDECOR);
@ -63,13 +67,11 @@ public class BlockDecor extends Block
setSoundType((sound==null) ? SoundType.STONE : sound);
setLightOpacity(0);
this.config = config;
this.aabb = (boundingbox==null) ? (FULL_BLOCK_AABB) : (boundingbox);
}
@Override
@Nullable
@SuppressWarnings("deprecation")
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
{ return getBoundingBox(state, world, pos); }
public BlockDecor(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound)
{ this(registryName, config, material, hardness, resistance, sound, null); }
@Override
@SideOnly(Side.CLIENT)
@ -143,6 +145,17 @@ public class BlockDecor extends Block
public IBlockState withMirror(IBlockState state, Mirror mirrorIn)
{ return state; }
@Override
@Nullable
@SuppressWarnings("deprecation")
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
{ return getBoundingBox(state, world, pos); }
@Override
@SuppressWarnings("deprecation")
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
{ return aabb; }
@Override
public boolean hasTileEntity(IBlockState state)
{ return false; }

View file

@ -10,17 +10,143 @@ package wile.engineersdecor.blocks;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.*;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import wile.engineersdecor.ModEngineersDecor;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Random;
public class BlockDecorChair extends BlockDecorDirected
{
public BlockDecorChair(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB)
private static boolean sitting_enabled = true;
private static double sitting_probability = 0.1;
private static double standup_probability = 0.01;
public static void on_config(boolean without_sitting, boolean without_mob_sitting, double sitting_probability_percent, double standup_probability_percent)
{
super(registryName, config, material, hardness, resistance, sound, unrotatedAABB);
setLightOpacity(0);
sitting_enabled = (!without_sitting);
sitting_probability = (without_sitting||without_mob_sitting) ? 0.0 : MathHelper.clamp(sitting_probability_percent/100, 0, 0.9);
standup_probability = (without_sitting||without_mob_sitting) ? 1.0 : MathHelper.clamp(standup_probability_percent/100, 1e-6, 1e-2);
ModEngineersDecor.logger.info("Config chairs: " + sitting_enabled + ", sit: " + sitting_probability, ", stand up: " + standup_probability);
}
public BlockDecorChair(@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); setLightOpacity(0); setTickRandomly(true); }
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{ if(sitting_enabled && (!world.isRemote)) { EntityChair.sit(world, player, pos); } return true; }
@Override
public void onEntityCollision(World world, BlockPos pos, IBlockState state, Entity entity)
{ if(sitting_enabled && (Math.random() < sitting_probability) && (entity instanceof EntityMob)) EntityChair.sit(world, (EntityLivingBase)entity, pos); }
@Override
public void updateTick(World world, BlockPos pos, IBlockState state, Random rand)
{
if((!sitting_enabled) || (sitting_probability < 1e-6)) return;
final List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityMob.class, new AxisAlignedBB(pos).grow(2,1,2).expand(0,1,0));
if(entities.isEmpty()) return;
int index = rand.nextInt(entities.size());
if((index < 0) || (index >= entities.size())) return;
EntityChair.sit(world, entities.get(index), pos);
}
//--------------------------------------------------------------------------------------------------------------------
// Riding entity for sitting
//--------------------------------------------------------------------------------------------------------------------
public static class EntityChair extends Entity
{
public final double x_offset = 0.5d;
public final double y_offset = 0.4d;
public final double z_offset = 0.5d;
private int t_tick = 0;
private int t_sit = 0;
public BlockPos chair_pos = new BlockPos(0,0,0);
public EntityChair(World world)
{ super(world); preventEntitySpawning=true; noClip=true; setSize(2e-3f, 2e-3f); }
public EntityChair(World world, BlockPos pos)
{
this(world);
setPosition(pos.getX()+x_offset,pos.getY()+y_offset,pos.getZ()+z_offset);
chair_pos = pos;
t_sit = 5;
}
public static boolean accepts_mob(EntityLivingBase entity)
{
if(!(entity instanceof net.minecraft.entity.monster.EntityMob)) return false;
if((entity.height > 2.5) || (entity.width > 2.0)) return false;
if(entity instanceof net.minecraft.entity.monster.EntityZombie) return true;
if(entity instanceof net.minecraft.entity.monster.EntityZombieVillager) return true;
if(entity instanceof net.minecraft.entity.monster.EntityPigZombie) return true;
if(entity instanceof net.minecraft.entity.monster.EntityHusk) return true;
if(entity instanceof net.minecraft.entity.monster.EntityStray) return true;
if(entity instanceof net.minecraft.entity.monster.EntitySkeleton) return true;
if(entity instanceof net.minecraft.entity.monster.EntityWitherSkeleton) return true;
return false;
}
public static void sit(World world, EntityLivingBase sitter, BlockPos pos)
{
if(!sitting_enabled) return;
if((world==null) || (world.isRemote) || (sitter==null) || (pos==null)) return;
if((!(sitter instanceof EntityPlayer)) && (!accepts_mob(sitter))) return;
if(!world.getEntitiesWithinAABB(EntityChair.class, new AxisAlignedBB(pos)).isEmpty()) return;
if(sitter.isBeingRidden() || (sitter.isDead) || (sitter.isRiding())) return;
if((!world.isAirBlock(pos.up())) || (!world.isAirBlock(pos.up(2)))) return;
EntityChair chair = new EntityChair(world, pos);
if(world.spawnEntity(chair)) sitter.startRiding(chair);
}
@Override
protected void entityInit()
{}
@Override
protected void writeEntityToNBT(NBTTagCompound compound)
{}
@Override
protected void readEntityFromNBT(NBTTagCompound compound)
{}
@Override
public double getMountedYOffset()
{ return 0.0; }
@Override
public void onUpdate()
{
if((world.isRemote) || (--t_tick > 0)) return;
t_tick = 20;
if(--t_sit > 0) return;
Entity sitter = getPassengers().isEmpty() ? null : getPassengers().get(0);
if((sitter==null) || (sitter.isDead)) { setDead(); return; }
boolean abort = !sitting_enabled;
final IBlockState state = world.getBlockState(chair_pos);
if((state==null) || (!(state.getBlock() instanceof BlockDecorChair))) abort = true;
if(!world.isAirBlock(chair_pos.up())) abort = true;
if((!(sitter instanceof EntityPlayer)) && (Math.random() < standup_probability)) abort = true;
if(abort) {
for(Entity e:getPassengers()) e.dismountRidingEntity();
setDead();
}
}
}
}

View file

@ -1,47 +1,62 @@
/*
* @file BlockDecorFull.java
* @file BlockDecorCraftingTable.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Full block characteristics class.
* Mod crafting table, different style, UI and fetature set
* than vanilla crafting table.
*/
package wile.engineersdecor.blocks;
import net.minecraft.client.gui.GuiButtonImage;
import wile.engineersdecor.ModEngineersDecor;
import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.world.World;
import net.minecraft.world.Explosion;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.*;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.init.Items;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.*;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.World;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.gui.GuiButton;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import com.google.common.collect.ImmutableList;
import wile.engineersdecor.detail.Networking;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class BlockDecorCraftingTable extends BlockDecorDirected
{
public static boolean with_assist = true;
public static final void on_config(boolean without_crafting_assist)
{
with_assist = !without_crafting_assist;
CraftingHistory.max_history_size(32);
}
public BlockDecorCraftingTable(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB)
{
@ -134,26 +149,185 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
{ return (te instanceof BTileEntity) ? (new BContainer(player.inventory, world, pos, (BTileEntity)te)) : null; }
public static Object getClientGuiElement(final EntityPlayer player, final World world, final BlockPos pos, final TileEntity te)
{ return (te instanceof BTileEntity) ? (new BGuiCrafting(player.inventory, world, pos, (BTileEntity)te)) : null; }
{ return (te instanceof BTileEntity) ? (new BGui(player.inventory, world, pos, (BTileEntity)te)) : null; }
//--------------------------------------------------------------------------------------------------------------------
// Crafting history
//--------------------------------------------------------------------------------------------------------------------
private static class CraftingHistory
{
public static final List<ItemStack> NOTHING = new ArrayList<ItemStack>();
private List<String> history_ = new ArrayList<String>();
private int current_ = -1;
private static int max_history_size_ = 5;
public CraftingHistory()
{}
public static int max_history_size()
{ return max_history_size_; }
public static int max_history_size(int newsize)
{ return max_history_size_ = MathHelper.clamp(newsize, 0, 32); }
public void read(final NBTTagCompound nbt)
{
try {
clear();
final NBTTagCompound subsect = nbt.getCompoundTag("history");
if(subsect.isEmpty()) return;
{
String s = subsect.getString("elements");
if((s!=null) && (s.length() > 0)) {
String[] ls = s.split("[|]");
for(String e:ls) history_.add(e.toLowerCase().trim());
}
}
current_ = (!subsect.hasKey("current")) ? (-1) : MathHelper.clamp(subsect.getInteger("current"), -1, history_.size()-1);
} catch(Throwable ex) {
ModEngineersDecor.logger.error("Exception reading crafting table history NBT, resetting, exception is:" + ex.getMessage());
clear();
}
}
public void write(final NBTTagCompound nbt)
{
final NBTTagCompound subsect = new NBTTagCompound();
subsect.setInteger("current", current_);
subsect.setString("elements", String.join("|", history_));
nbt.setTag("history", subsect);
}
public void clear()
{ current_ = -1; history_.clear(); }
public void reset_curent()
{ current_ = -1; }
public void add(final List<ItemStack> grid_stacks)
{
if(!with_assist) { clear(); return; }
String s = stacks2str(grid_stacks);
if(s.isEmpty()) return;
history_.removeIf(e->e.equals(s));
history_.add(s);
while(history_.size() > max_history_size()) history_.remove(0);
if(current_ >= history_.size()) current_ = -1;
}
public String stacks2str(final List<ItemStack> grid_stacks)
{
if((grid_stacks==null) || (grid_stacks.size() != 10)) return "";
if(grid_stacks.get(0).isEmpty()) return "";
final ArrayList<String> items = new ArrayList<String>();
for(ItemStack st:grid_stacks) {
int meta = st.getMetadata();
items.add( (st.isEmpty()) ? ("") : ((st.getItem().getRegistryName().toString().trim()) + ((meta==0)?(""):("/"+meta)) ));
}
return String.join(";", items);
}
public List<ItemStack> str2stacks(final String entry)
{
try {
if((entry == null) || (entry.isEmpty())) return NOTHING;
ArrayList<String> item_regnames = new ArrayList<String>(Arrays.asList(entry.split("[;]")));
if((item_regnames == null) || (item_regnames.size() > 10)) return NOTHING;
while(item_regnames.size() < 10) item_regnames.add("");
List<ItemStack> stacks = new ArrayList<ItemStack>();
for(String regname : item_regnames) {
ItemStack stack = ItemStack.EMPTY;
if(!regname.isEmpty()) {
int meta = 0;
if(regname.indexOf('/') >= 0) {
String[] itemdetails = regname.split("[/]");
if(itemdetails.length>0) regname = itemdetails[0];
try { if(itemdetails.length>1) meta = Integer.parseInt(itemdetails[1]); } catch(Throwable e){meta=0;} // ignore exception here
}
final Item item = Item.REGISTRY.getObject(new ResourceLocation(regname));
stack = ((item == null) || (item == Items.AIR)) ? ItemStack.EMPTY : (new ItemStack(item, 1, meta));
}
stacks.add(stack);
}
if((stacks.size() != 10) || (stacks.get(0).isEmpty())) return NOTHING; // invalid size or no result
return stacks;
} catch(Throwable ex) {
ModEngineersDecor.logger.error("History stack building failed: " + ex.getMessage());
return NOTHING;
}
}
public List<ItemStack> current()
{
if((current_ < 0) || (current_ >= history_.size())) { current_ = -1; return NOTHING; }
return str2stacks(history_.get(current_));
}
public void next()
{
if(history_.isEmpty()) { current_ = -1; return; }
current_ = ((++current_) >= history_.size()) ? (-1) : (current_);
}
public void prev()
{
if(history_.isEmpty()) { current_ = -1; return; }
current_ = ((--current_) < -1) ? (history_.size()-1) : (current_);
}
public String toString()
{
StringBuilder s = new StringBuilder("{ current:" + current_ + ", elements:[ ");
for(int i=0; i<history_.size(); ++i) s.append("{i:").append(i).append(", e:[").append(history_.get(i)).append("]} ");
s.append("]}");
return s.toString();
}
}
//--------------------------------------------------------------------------------------------------------------------
// GUI
//--------------------------------------------------------------------------------------------------------------------
@SideOnly(Side.CLIENT)
public static class BGuiCrafting extends GuiContainer
private static class BGui extends GuiContainer
{
public BGuiCrafting(InventoryPlayer playerInventory, World world, BlockPos pos, BTileEntity te)
{ super(new BContainer(playerInventory, world, pos, te)); }
protected static final int BUTTON_NEXT = 0;
protected static final int BUTTON_PREV = 1;
protected static final int BUTTON_FROM_STORAGE = 2;
protected static final int BUTTON_TO_STORAGE = 3;
protected static final int BUTTON_FROM_PLAYER = 4;
protected static final int BUTTON_TO_PLAYER = 5;
protected static final ResourceLocation BACKGROUND = new ResourceLocation(ModEngineersDecor.MODID, "textures/gui/treated_wood_crafting_table.png");
protected final BTileEntity te;
protected final ArrayList<GuiButton> buttons = new ArrayList<GuiButton>();
public BGui(InventoryPlayer playerInventory, World world, BlockPos pos, BTileEntity te)
{ super(new BContainer(playerInventory, world, pos, te)); this.te = te; }
@Override
@SuppressWarnings("unused")
public void initGui()
{ super.initGui(); }
{
super.initGui();
final int x0=((width - xSize)/2), y0=((height - ySize)/2);
buttons.clear();
if(with_assist) {
buttons.add(addButton(new GuiButtonImage(BUTTON_NEXT, x0+156,y0+44, 12,12, 194,44, 12, BACKGROUND)));
buttons.add(addButton(new GuiButtonImage(BUTTON_PREV, x0+156,y0+30, 12,12, 180,30, 12, BACKGROUND)));
// buttons.add(addButton(new GuiButtonImage(BUTTON_FROM_STORAGE, x0+49,y0+34, 9,17, 219,34, 17, BACKGROUND)));
// buttons.add(addButton(new GuiButtonImage(BUTTON_TO_STORAGE, x0+49,y0+52, 9,17, 208,16, 17, BACKGROUND)));
// buttons.add(addButton(new GuiButtonImage(BUTTON_FROM_PLAYER, x0+77,y0+71, 17,9, 198,71, 9, BACKGROUND)));
// buttons.add(addButton(new GuiButtonImage(BUTTON_TO_PLAYER, x0+59,y0+71, 17,9, 180,71, 9, BACKGROUND)));
}
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
drawDefaultBackground();
super.drawScreen(mouseX, mouseY, partialTicks);
renderHoveredToolTip(mouseX, mouseY);
}
@ -161,9 +335,94 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
{
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(new ResourceLocation(ModEngineersDecor.MODID, "textures/gui/treated_wood_crafting_table.png"));
drawTexturedModalRect(((this.width - this.xSize)/2), ((this.height - this.ySize)/2), 0, 0, this.xSize, this.ySize);
GlStateManager.color(1f, 1f, 1f, 1f);
mc.getTextureManager().bindTexture(BACKGROUND);
final int x0=((width - xSize)/2), y0=((height - ySize)/2);
drawTexturedModalRect(x0, y0, 0, 0, xSize, ySize);
if(with_assist) {
List<ItemStack> crafting_template = te.history.current();
if((crafting_template == null) || (crafting_template.isEmpty())) return;
if(inventorySlots.getSlot(0).getHasStack()) return;
{
int i = 0;
for(Tuple<Integer, Integer> e : ((BContainer) inventorySlots).CRAFTING_SLOT_POSITIONS) {
if((inventorySlots.getSlot(i).getHasStack())) {
if(!inventorySlots.getSlot(i).getStack().getItem().equals(crafting_template.get(i).getItem())) {
return; // user has placed another recipe
}
}
++i;
}
}
{
int i = 0;
for(Tuple<Integer, Integer> e : ((BContainer) inventorySlots).CRAFTING_SLOT_POSITIONS) {
final ItemStack stack = crafting_template.get(i);
if(!stack.isEmpty()) drawTemplateItemAt(stack, x0, y0, e.getFirst(), e.getSecond());
++i;
}
}
}
}
protected void drawTemplateItemAt(ItemStack stack, int x0, int y0, int x, int y)
{
RenderHelper.disableStandardItemLighting();
RenderHelper.enableGUIStandardItemLighting();
float zl = itemRender.zLevel;
itemRender.zLevel = -50;
itemRender.renderItemIntoGUI(stack, x0+x, y0+y);
itemRender.zLevel = zl;
zLevel = 100;
GlStateManager.color(0.7f, 0.7f, 0.7f, 0.8f);
mc.getTextureManager().bindTexture(BACKGROUND);
drawTexturedModalRect(x0+x, y0+y, x, y, 16, 16);
RenderHelper.enableStandardItemLighting();
}
@Override
protected void actionPerformed(GuiButton button)
{
switch(button.id) {
case BUTTON_NEXT:
case BUTTON_PREV:
case BUTTON_FROM_STORAGE:
case BUTTON_TO_STORAGE:
case BUTTON_FROM_PLAYER:
case BUTTON_TO_PLAYER: {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setInteger("button", button.id);
Networking.PacketTileNotify.sendToServer(te, nbt);
break;
}
}
}
}
//--------------------------------------------------------------------------------------------------------------------
// Crafting slot of container
//--------------------------------------------------------------------------------------------------------------------
public static class BSlotCrafting extends SlotCrafting
{
private final BTileEntity te;
private final EntityPlayer player;
public BSlotCrafting(BTileEntity te, EntityPlayer player, InventoryCrafting craftingInventory, IInventory inventoryIn, int slotIndex, int xPosition, int yPosition)
{ super(player, craftingInventory, inventoryIn, slotIndex, xPosition, yPosition); this.te = te; this.player=player; }
@Override
protected void onCrafting(ItemStack stack)
{
if((with_assist) && ((player.world!=null) && (!(player.world.isRemote))) && (!stack.isEmpty())) {
final ArrayList<ItemStack> grid = new ArrayList<ItemStack>();
grid.add(stack);
for(int i = 0; i < 9; ++i) grid.add(te.stacks.get(i));
te.history.add(grid);
te.history.reset_curent();
te.syncHistory(player);
}
super.onCrafting(stack);
}
}
@ -171,7 +430,7 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
// Crafting container
//--------------------------------------------------------------------------------------------------------------------
public static class BContainer extends Container
private static class BContainer extends Container
{
private final World world;
private final BlockPos pos;
@ -179,36 +438,42 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
private final BTileEntity te;
public BInventoryCrafting craftMatrix;
public InventoryCraftResult craftResult = new InventoryCraftResult();
public final ImmutableList<Tuple<Integer,Integer>> CRAFTING_SLOT_POSITIONS;
public BContainer(InventoryPlayer playerInventory, World world, BlockPos pos, BTileEntity te)
{
ArrayList<Tuple<Integer,Integer>> slotpositions = new ArrayList<Tuple<Integer,Integer>>();
this.player = playerInventory.player;
this.world = world;
this.pos = pos;
this.te = te;
this.craftMatrix = new BInventoryCrafting(this, te);
this.craftMatrix.openInventory(player);
this.addSlotToContainer(new SlotCrafting(playerInventory.player, this.craftMatrix, this.craftResult, 0, 124+14, 35));
craftMatrix = new BInventoryCrafting(this, te);
craftMatrix.openInventory(player);
addSlotToContainer(new BSlotCrafting(te, playerInventory.player, craftMatrix, craftResult, 0, 134, 35));
slotpositions.add(new Tuple<>(134, 35));
for(int y=0; y<3; ++y) {
for(int x=0; x<3; ++x) {
addSlotToContainer(new Slot(this.craftMatrix, x+y*3, 28+30+x*18, 17+y*18)); // block slots 0..8
int xpos = 60+x*18;
int ypos = 17+y*18;
addSlotToContainer(new Slot(craftMatrix, x+y*3, xpos, ypos)); // block slots 0..8
slotpositions.add(new Tuple<>(xpos, ypos));
}
}
CRAFTING_SLOT_POSITIONS = ImmutableList.copyOf(slotpositions);
for(int y=0; y<3; ++y) {
for (int x=0; x<9; ++x) {
this.addSlotToContainer(new Slot(playerInventory, x+y*9+9, 8+x*18, 86+y*18)); // player slots: 9..35
addSlotToContainer(new Slot(playerInventory, x+y*9+9, 8+x*18, 86+y*18)); // player slots: 9..35
}
}
for (int x=0; x<9; ++x) {
this.addSlotToContainer(new Slot(playerInventory, x, 8+x*18, 144)); // player slots: 0..8
for(int x=0; x<9; ++x) {
addSlotToContainer(new Slot(playerInventory, x, 8+x*18, 144)); // player slots: 0..8
}
for(int y=0; y<4; ++y) {
for (int x=0; x<2; ++x) {
this.addSlotToContainer(new Slot(this.craftMatrix, x+y*2+9, 8+x*18, 9+y*18)); // block slots 9..17
addSlotToContainer(new Slot(craftMatrix, x+y*2+9, 8+x*18, 9+y*18)); // block slots 9..17
}
}
this.onCraftMatrixChanged(this.craftMatrix);
onCraftMatrixChanged(craftMatrix);
}
@Override
@ -219,7 +484,7 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
public void onCraftMatrixChanged(IInventory inv)
{
try {
slotChangedCraftingGrid(this.world, this.player, this.craftMatrix, this.craftResult);
slotChangedCraftingGrid(world, player, craftMatrix, craftResult);
} catch(Throwable exc) {
ModEngineersDecor.logger.error("Recipe failed:", exc);
}
@ -242,12 +507,12 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
@Override
public boolean canMergeSlot(ItemStack stack, Slot slot)
{ return (slot.inventory != this.craftResult) && (super.canMergeSlot(stack, slot)); }
{ return (slot.inventory != craftResult) && (super.canMergeSlot(stack, slot)); }
@Override
public ItemStack transferStackInSlot(EntityPlayer playerIn, int index)
{
Slot slot = this.inventorySlots.get(index);
Slot slot = inventorySlots.get(index);
if((slot == null) || (!slot.getHasStack())) return ItemStack.EMPTY;
ItemStack slotstack = slot.getStack();
ItemStack stack = slotstack.copy();
@ -282,7 +547,7 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
// Crafting inventory (needed to allow SlotCrafting to have a InventoryCrafting)
//--------------------------------------------------------------------------------------------------------------------
public static class BInventoryCrafting extends InventoryCrafting
private static class BInventoryCrafting extends InventoryCrafting
{
protected final Container container;
protected final IInventory inventory;
@ -332,12 +597,13 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
//--------------------------------------------------------------------------------------------------------------------
// Tile entity
//--------------------------------------------------------------------------------------------------------------------
public static class BTileEntity extends TileEntity implements IInventory
public static class BTileEntity extends TileEntity implements IInventory, Networking.IPacketReceiver
{
public static final int NUM_OF_CRAFTING_SLOTS = 9;
public static final int NUM_OF_STORAGE_SLOTS = 9;
public static final int NUM_OF_STORAGE_SLOTS = 8;
public static final int NUM_OF_SLOTS = NUM_OF_CRAFTING_SLOTS+NUM_OF_STORAGE_SLOTS;
protected NonNullList<ItemStack> stacks;
protected final CraftingHistory history = new CraftingHistory();
public BTileEntity()
{ stacks = NonNullList.<ItemStack>withSize(NUM_OF_SLOTS, ItemStack.EMPTY); }
@ -348,12 +614,63 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
public void readnbt(NBTTagCompound compound)
{
reset();
ItemStackHelper.loadAllItems(compound, this.stacks);
while(this.stacks.size() < NUM_OF_SLOTS) this.stacks.add(ItemStack.EMPTY);
ItemStackHelper.loadAllItems(compound, stacks);
while(stacks.size() < NUM_OF_SLOTS) stacks.add(ItemStack.EMPTY);
history.read(compound);
}
private void writenbt(NBTTagCompound compound)
{ ItemStackHelper.saveAllItems(compound, this.stacks); }
{
ItemStackHelper.saveAllItems(compound, stacks);
history.write(compound);
}
// Networking.IPacketReceiver --------------------------------------------------------------
@Override
public void onClientPacketReceived(EntityPlayer player, NBTTagCompound nbt)
{
if(with_assist && nbt.hasKey("button")) {
switch(nbt.getInteger("button")) {
case BGui.BUTTON_NEXT:
history.next();
syncHistory(player);
break;
case BGui.BUTTON_PREV:
history.prev();
syncHistory(player);
break;
case BGui.BUTTON_FROM_STORAGE:
//System.out.println("BUTTON_FROM_STORAGE");
break;
case BGui.BUTTON_TO_STORAGE:
//System.out.println("BUTTON_TO_STORAGE");
break;
case BGui.BUTTON_FROM_PLAYER:
//System.out.println("BUTTON_FROM_PLAYER");
break;
case BGui.BUTTON_TO_PLAYER:
//System.out.println("BUTTON_TO_PLAYER");
break;
}
}
}
@Override
public void onServerPacketReceived(NBTTagCompound nbt)
{
if(nbt.hasKey("historydata")) history.read(nbt.getCompoundTag("historydata"));
}
private void syncHistory(EntityPlayer player)
{
if(!with_assist) return;
NBTTagCompound history_nbt = new NBTTagCompound();
history.write(history_nbt);
NBTTagCompound rnbt = new NBTTagCompound();
rnbt.setTag("historydata", history_nbt);
Networking.PacketTileNotify.sendToPlayer(player, this, rnbt);
}
// TileEntity ------------------------------------------------------------------------------
@ -362,12 +679,16 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
{ return (os.getBlock() != ns.getBlock()) || (!(ns.getBlock() instanceof BlockDecorCraftingTable)); }
@Override
public void readFromNBT(NBTTagCompound compound)
{ super.readFromNBT(compound); readnbt(compound); }
public void readFromNBT(NBTTagCompound nbt)
{ super.readFromNBT(nbt); readnbt(nbt); }
@Override
public NBTTagCompound writeToNBT(NBTTagCompound compound)
{ super.writeToNBT(compound); writenbt(compound); return compound; }
public NBTTagCompound writeToNBT(NBTTagCompound nbt)
{ super.writeToNBT(nbt); writenbt(nbt); return nbt; }
@Override
public NBTTagCompound getUpdateTag()
{ NBTTagCompound nbt = new NBTTagCompound(); super.writeToNBT(nbt); writenbt(nbt); return nbt; }
// IWorldNamable ---------------------------------------------------------------------------

View file

@ -0,0 +1,926 @@
/*
* @file BlockFurnace.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* ED Lab furnace.
*/
package wile.engineersdecor.blocks;
import com.google.common.collect.Maps;
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.init.SoundEvents;
import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.energy.IEnergyStorage;
import wile.engineersdecor.ModEngineersDecor;
import net.minecraft.stats.StatList;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.world.World;
import net.minecraft.world.Explosion;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.init.Items;
import net.minecraft.item.*;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.inventory.*;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.*;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.wrapper.SidedInvWrapper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import wile.engineersdecor.detail.ExtItems;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Map;
import java.util.Random;
public class BlockDecorFurnace extends BlockDecorDirected
{
public static final PropertyBool LIT = PropertyBool.create("lit");
public BlockDecorFurnace(@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);
setLightOpacity(0);
}
@Override
protected BlockStateContainer createBlockState()
{ return new BlockStateContainer(this, FACING, LIT); }
@Override
public IBlockState getStateFromMeta(int meta)
{ return getDefaultState().withProperty(FACING, EnumFacing.byHorizontalIndex(meta & 0x3)).withProperty(LIT, (meta & 0x4)!=0); }
@Override
public int getMetaFromState(IBlockState state)
{ return (state.getValue(FACING).getHorizontalIndex() & 0x3) | (state.getValue(LIT) ? 4 : 0); }
@Override
@SuppressWarnings("deprecation")
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
{ return getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()).withProperty(LIT, false); }
@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)); }
@Override
public boolean hasTileEntity(IBlockState state)
{ return true; }
@Nullable
public TileEntity createTileEntity(World world, IBlockState state)
{ return new BlockDecorFurnace.BTileEntity(); }
@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 BTileEntity)) return;
((BTileEntity)te).readnbt(inventory_nbt);
((BTileEntity)te).markDirty();
}
@Override
public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
{
if(world.isRemote) return true;
TileEntity te = world.getTileEntity(pos);
if(!(te instanceof BTileEntity)) return super.removedByPlayer(state, world, pos, player, willHarvest);
ItemStack stack = new ItemStack(this, 1);
NBTTagCompound inventory_nbt = new NBTTagCompound();
ItemStackHelper.saveAllItems(inventory_nbt, ((BTileEntity)te).stacks_, false);
if(!inventory_nbt.isEmpty()) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setTag("inventory", inventory_nbt);
stack.setTagCompound(nbt);
}
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;
}
@Override
public void onBlockExploded(World world, BlockPos pos, Explosion explosion)
{
if(world.isRemote) return;
TileEntity te = world.getTileEntity(pos);
if(!(te instanceof BTileEntity)) return;
for(ItemStack stack: ((BTileEntity)te).stacks_) {
if(!stack.isEmpty()) world.spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), stack));
}
((BTileEntity)te).reset();
super.onBlockExploded(world, pos, explosion);
}
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
if(world.isRemote) return true;
player.openGui(ModEngineersDecor.instance, ModEngineersDecor.GuiHandler.GUIID_SMALL_LAB_FURNACE, world, pos.getX(), pos.getY(), pos.getZ());
player.addStat(StatList.FURNACE_INTERACTION);
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rnd)
{
if((state.getBlock()!=this) || (!state.getValue(LIT))) return;
final double rv = rnd.nextDouble();
if(rv > 0.5) return;
final double x=0.5+pos.getX(), y=0.5+pos.getY(), z=0.5+pos.getZ();
final double xc=0.52, xr=rnd.nextDouble()*0.4-0.2, yr=(y-0.3+rnd.nextDouble()*0.2);
if(rv < 0.1d) world.playSound(x, y, z, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 0.4f, 0.5f, false);
switch(state.getValue(FACING)) {
case WEST: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x-xc, yr, z+xr, 0.0, 0.0, 0.0); break;
case EAST: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x+xc, yr, z+xr, 0.0, 0.0, 0.0); break;
case NORTH: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x+xr, yr, z-xc, 0.0, 0.0, 0.0); break;
default: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x+xr, yr, z+xc, 0.0, 0.0, 0.0); break;
}
}
//--------------------------------------------------------------------------------------------------------------------
// ModEngineersDecor.GuiHandler connectors
//--------------------------------------------------------------------------------------------------------------------
public static Object getServerGuiElement(final EntityPlayer player, final World world, final BlockPos pos, final TileEntity te)
{ return (te instanceof BTileEntity) ? (new BContainer(player.inventory, world, pos, (BTileEntity)te)) : null; }
public static Object getClientGuiElement(final EntityPlayer player, final World world, final BlockPos pos, final TileEntity te)
{ return (te instanceof BTileEntity) ? (new BGui(player.inventory, world, pos, (BTileEntity)te)) : null; }
//--------------------------------------------------------------------------------------------------------------------
// GUI
//--------------------------------------------------------------------------------------------------------------------
@SideOnly(Side.CLIENT)
private static class BGui extends GuiContainer
{
private final BTileEntity te;
public BGui(InventoryPlayer playerInventory, World world, BlockPos pos, BTileEntity te)
{ super(new BContainer(playerInventory, world, pos, te)); this.te = te; }
@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/small_lab_furnace_gui.png"));
final int x0=(width-xSize)/2, y0=(height-ySize)/2, w=xSize, h=ySize;
drawTexturedModalRect(x0, y0, 0, 0, w, h);
if(BTileEntity.isBurning(te)) {
final int k = flame_px(13);
drawTexturedModalRect(x0+59, y0+36+12-k, 176, 12-k, 14, k+1);
}
drawTexturedModalRect(x0+79, y0+36, 176, 15, 1+progress_px(17), 15);
}
private int progress_px(int pixels)
{ final int tc=te.getField(2), T=te.getField(3); return ((T>0) && (tc>0)) ? (tc * pixels / T) : (0); }
private int flame_px(int pixels)
{ int ibt = te.getField(1); return ((te.getField(0) * pixels) / ((ibt>0) ? (ibt) : (BTileEntity.proc_speed_interval_))); }
}
//--------------------------------------------------------------------------------------------------------------------
// container slots
//--------------------------------------------------------------------------------------------------------------------
public static class BSlotInpFifo extends Slot
{
public BSlotInpFifo(IInventory inv, int index, int xpos, int ypos)
{ super(inv, index, xpos, ypos); }
}
public static class BSlotFuelFifo extends Slot
{
public BSlotFuelFifo(IInventory inv, int index, int xpos, int ypos)
{ super(inv, index, xpos, ypos); }
}
public static class BSlotOutFifo extends BSlotResult
{
public BSlotOutFifo(EntityPlayer player, BTileEntity te, int index, int xpos, int ypos)
{ super(player, te, index, xpos, ypos); }
}
public static class BSlotResult extends Slot
{
// This class is basically SlotFurnaceOutput.onCrafting(), except that the recipe overrides
// are used, unfortunately a copy is needed due to private instance variables.
private final EntityPlayer player;
private int removeCount = 0;
public BSlotResult(EntityPlayer player, BTileEntity te, int index, int xpos, int ypos)
{ super(te, index, xpos, ypos); this.player = player; }
@Override
public boolean isItemValid(ItemStack stack)
{ return false; }
@Override
public ItemStack decrStackSize(int amount)
{ removeCount += getHasStack() ? Math.min(amount, getStack().getCount()) : 0; return super.decrStackSize(amount); }
@Override
public ItemStack onTake(EntityPlayer thePlayer, ItemStack stack)
{ onCrafting(stack); super.onTake(thePlayer, stack); return stack; }
@Override
protected void onCrafting(ItemStack stack, int amount)
{ removeCount += amount; onCrafting(stack); }
@Override
protected void onCrafting(ItemStack stack)
{
stack.onCrafting(player.world, player, removeCount);
if(!player.world.isRemote) {
int xp = removeCount;
float sxp = BRecipes.instance().getSmeltingExperience(stack);
if(sxp == 0) {
xp = 0;
} else if(sxp < 1.0) {
xp = (int)((sxp*xp) + Math.round(Math.random()+0.75));
}
while(xp > 0) {
int k = EntityXPOrb.getXPSplit(xp);
xp -= k;
player.world.spawnEntity(new EntityXPOrb(player.world, player.posX, player.posY+0.5, player.posZ+0.5, k));
}
}
removeCount = 0;
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerSmeltedEvent(player, stack);
}
}
//--------------------------------------------------------------------------------------------------------------------
// container
//--------------------------------------------------------------------------------------------------------------------
public static class BContainer extends Container
{
private static final int PLAYER_INV_START_SLOTNO = 11;
private final World world;
private final BlockPos pos;
private final EntityPlayer player;
private final BTileEntity te;
private int proc_time_elapsed_;
private int burntime_left_;
private int fuel_burntime_;
private int proc_time_needed_;
public BContainer(InventoryPlayer playerInventory, World world, BlockPos pos, BTileEntity te)
{
this.player = playerInventory.player;
this.world = world;
this.pos = pos;
this.te = te;
addSlotToContainer(new Slot(te, 0, 59, 17)); // smelting input
addSlotToContainer(new SlotFurnaceFuel(te, 1, 59, 53)); // fuel
addSlotToContainer(new BSlotResult(playerInventory.player, te, 2, 101, 35)); // smelting result
addSlotToContainer(new BSlotInpFifo(te, 3, 34, 17)); // input fifo 0
addSlotToContainer(new BSlotInpFifo(te, 4, 16, 17)); // input fifo 1
addSlotToContainer(new BSlotFuelFifo(te, 5, 34, 53)); // fuel fifo 0
addSlotToContainer(new BSlotFuelFifo(te, 6, 16, 53)); // fuel fifo 1
addSlotToContainer(new BSlotOutFifo(playerInventory.player, te, 7, 126, 35)); // out fifo 0
addSlotToContainer(new BSlotOutFifo(playerInventory.player, te, 8, 144, 35)); // out fifo 1
addSlotToContainer(new Slot(te, 9, 126, 61)); // aux slot 1
addSlotToContainer(new Slot(te, 10, 144, 61)); // aux slot 2
for(int x=0; x<9; ++x) {
addSlotToContainer(new Slot(playerInventory, x, 8+x*18, 144)); // player slots: 0..8
}
for(int y=0; y<3; ++y) {
for(int x=0; x<9; ++x) {
addSlotToContainer(new Slot(playerInventory, x+y*9+9, 8+x*18, 86+y*18)); // player slots: 9..35
}
}
}
@Override
public void addListener(IContainerListener listener)
{ super.addListener(listener); listener.sendAllWindowProperties(this, te); }
@Override
public void detectAndSendChanges()
{
super.detectAndSendChanges();
for(int i=0; i<listeners.size(); ++i) {
IContainerListener lis = listeners.get(i);
if(proc_time_elapsed_ != te.getField(2)) lis.sendWindowProperty(this, 2, te.getField(2));
if(burntime_left_ != te.getField(0)) lis.sendWindowProperty(this, 0, te.getField(0));
if(fuel_burntime_ != te.getField(1)) lis.sendWindowProperty(this, 1, te.getField(1));
if(proc_time_needed_ != te.getField(3)) lis.sendWindowProperty(this, 3, te.getField(3));
}
proc_time_elapsed_ = te.getField(2);
burntime_left_ = te.getField(0);
fuel_burntime_ = te.getField(1);
proc_time_needed_ = te.getField(3);
}
@Override
@SideOnly(Side.CLIENT)
public void updateProgressBar(int id, int data)
{ te.setField(id, data); }
@Override
public boolean canInteractWith(EntityPlayer player)
{ return (world.getBlockState(pos).getBlock() instanceof BlockDecorFurnace) && (player.getDistanceSq(pos) <= 64); }
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index)
{
Slot slot = inventorySlots.get(index);
if((slot==null) || (!slot.getHasStack())) return ItemStack.EMPTY;
ItemStack slot_stack = slot.getStack();
ItemStack transferred = slot_stack.copy();
if((index==2) || (index==7) || (index==8)) {
// Output slots
if(!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+36, true)) return ItemStack.EMPTY;
slot.onSlotChange(slot_stack, transferred);
} else if((index==0) || (index==3) || (index==4)) {
// Input slots
if(!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+36, false)) return ItemStack.EMPTY;
} else if((index==1) || (index==5) || (index==6)) {
// Fuel slots
if(!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+36, false)) return ItemStack.EMPTY;
} else if((index==9) || (index==10)) {
if(!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+36, false)) return ItemStack.EMPTY;
} else if((index >= PLAYER_INV_START_SLOTNO) && (index <= PLAYER_INV_START_SLOTNO+36)) {
// Player inventory
if(!BRecipes.instance().getSmeltingResult(slot_stack).isEmpty()) {
if(
(!mergeItemStack(slot_stack, 0, 1, false)) && // smelting input
(!mergeItemStack(slot_stack, 3, 4, false)) && // fifo0
(!mergeItemStack(slot_stack, 4, 5, false)) // fifo1
) return ItemStack.EMPTY;
} else if(TileEntityFurnace.isItemFuel(slot_stack)) {
if(
(!mergeItemStack(slot_stack, 1, 2, false)) && // fuel input
(!mergeItemStack(slot_stack, 5, 6, false)) && // fuel fifo0
(!mergeItemStack(slot_stack, 6, 7, false)) // fuel fifo1
) return ItemStack.EMPTY;
} else if((index >= PLAYER_INV_START_SLOTNO) && (index < PLAYER_INV_START_SLOTNO+27)) {
// player inventory --> player hotbar
if(!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO+27, PLAYER_INV_START_SLOTNO+36, false)) return ItemStack.EMPTY;
} else if((index >= PLAYER_INV_START_SLOTNO+27) && (index < PLAYER_INV_START_SLOTNO+36) && (!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+27, false))) {
// player hotbar --> player inventory
return ItemStack.EMPTY;
}
} else {
// invalid slot
return ItemStack.EMPTY;
}
if(slot_stack.isEmpty()) {
slot.putStack(ItemStack.EMPTY);
} else {
slot.onSlotChanged();
}
if(slot_stack.getCount() == transferred.getCount()) return ItemStack.EMPTY;
slot.onTake(player, slot_stack);
return transferred;
}
}
//--------------------------------------------------------------------------------------------------------------------
// Tile entity
//--------------------------------------------------------------------------------------------------------------------
public static class BTileEntity extends TileEntity implements ITickable, ISidedInventory, IEnergyStorage
{
public static final int TICK_INTERVAL = 4;
public static final int FIFO_INTERVAL = 20;
public static final int MAX_BURNTIME = 0x7fff;
public static final int DEFAULT_BOOST_ENERGY = 32;
public static final int VANILLA_FURNACE_SPEED_INTERVAL = 200;
public static final int DEFAULT_SPEED_INTERVAL = 150;
public static final int NUM_OF_SLOTS = 11;
public static final int SMELTING_INPUT_SLOT_NO = 0;
public static final int SMELTING_FUEL_SLOT_NO = 1;
public static final int SMELTING_OUTPUT_SLOT_NO = 2;
public static final int FIFO_INPUT_0_SLOT_NO = 3;
public static final int FIFO_INPUT_1_SLOT_NO = 4;
public static final int FIFO_FUEL_0_SLOT_NO = 5;
public static final int FIFO_FUEL_1_SLOT_NO = 6;
public static final int FIFO_OUTPUT_0_SLOT_NO = 7;
public static final int FIFO_OUTPUT_1_SLOT_NO = 8;
public static final int AUX_0_SLOT_NO = 9;
public static final int AUX_1_SLOT_NO =10;
private static final int[] SLOTS_TOP = new int[] {FIFO_INPUT_1_SLOT_NO};
private static final int[] SLOTS_BOTTOM = new int[] {FIFO_OUTPUT_1_SLOT_NO};
private static final int[] SLOTS_SIDES = new int[] {FIFO_FUEL_1_SLOT_NO};
private final IItemHandler sided_itemhandler_top_ = new SidedInvWrapper(this, EnumFacing.UP);
private final IItemHandler sided_itemhandler_down_ = new SidedInvWrapper(this, EnumFacing.DOWN);
private final IItemHandler sided_itemhandler_sides_ = new SidedInvWrapper(this, EnumFacing.WEST);
private static double proc_fuel_efficiency_ = 1.0;
private static int proc_speed_interval_ = DEFAULT_SPEED_INTERVAL;
private static int boost_energy_consumption = DEFAULT_BOOST_ENERGY * TICK_INTERVAL;
private int tick_timer_;
private int fifo_timer_;
private int burntime_left_;
private int fuel_burntime_;
private int proc_time_elapsed_;
private int proc_time_needed_;
private int boost_energy_; // small, not saved in nbt.
private boolean heater_inserted_ = false;
private NonNullList<ItemStack> stacks_;
public static void on_config(int speed_percent, int fuel_efficiency_percent, int boost_energy_per_tick)
{
double ratio = (100.0 / MathHelper.clamp(speed_percent, 10, 500)) ;
proc_speed_interval_ = MathHelper.clamp((int)(ratio * VANILLA_FURNACE_SPEED_INTERVAL), 20, 400);
proc_fuel_efficiency_ = ((double) MathHelper.clamp(fuel_efficiency_percent, 10, 500)) / 100;
boost_energy_consumption = TICK_INTERVAL * MathHelper.clamp(boost_energy_per_tick, 16, 512);
ModEngineersDecor.logger.info("Config lab furnace interval:" + proc_speed_interval_ + ", efficiency:" + proc_fuel_efficiency_);
}
public BTileEntity()
{ reset(); }
public void reset()
{
stacks_ = NonNullList.<ItemStack>withSize(NUM_OF_SLOTS, ItemStack.EMPTY);
proc_time_elapsed_ = 0;
proc_time_needed_ = 0;
burntime_left_ = 0;
fuel_burntime_ = 0;
fifo_timer_ = 0;
tick_timer_ = 0;
}
public void readnbt(NBTTagCompound compound)
{
reset();
ItemStackHelper.loadAllItems(compound, this.stacks_);
while(this.stacks_.size() < NUM_OF_SLOTS) this.stacks_.add(ItemStack.EMPTY);
burntime_left_ = compound.getInteger("BurnTime");
proc_time_elapsed_ = compound.getInteger("CookTime");
proc_time_needed_ = compound.getInteger("CookTimeTotal");
fuel_burntime_ = getItemBurnTime(stacks_.get(SMELTING_FUEL_SLOT_NO));
}
private void writenbt(NBTTagCompound compound)
{
compound.setInteger("BurnTime", MathHelper.clamp(burntime_left_,0 , MAX_BURNTIME));
compound.setInteger("CookTime", MathHelper.clamp(proc_time_elapsed_, 0, MAX_BURNTIME));
compound.setInteger("CookTimeTotal", MathHelper.clamp(proc_time_needed_, 0, MAX_BURNTIME));
ItemStackHelper.saveAllItems(compound, stacks_);
}
// TileEntity ------------------------------------------------------------------------------
@Override
public boolean shouldRefresh(World world, BlockPos pos, IBlockState os, IBlockState ns)
{ return (os.getBlock() != ns.getBlock()) || (!(ns.getBlock() instanceof BlockDecorFurnace)); }
@Override
public void readFromNBT(NBTTagCompound compound)
{ super.readFromNBT(compound); readnbt(compound); }
@Override
public NBTTagCompound writeToNBT(NBTTagCompound compound)
{ super.writeToNBT(compound); writenbt(compound); return compound; }
// IWorldNamable ---------------------------------------------------------------------------
@Override
public String getName()
{ final Block block=getBlockType(); return (block!=null) ? (block.getTranslationKey() + ".name") : (""); }
@Override
public boolean hasCustomName()
{ return false; }
@Override
public ITextComponent getDisplayName()
{ return new TextComponentTranslation(getName(), new Object[0]); }
// IInventory ------------------------------------------------------------------------------
@Override
public int getSizeInventory()
{ return stacks_.size(); }
@Override
public boolean isEmpty()
{ for(ItemStack stack: stacks_) { if(!stack.isEmpty()) return false; } return true; }
@Override
public ItemStack getStackInSlot(int index)
{ return (index < getSizeInventory()) ? stacks_.get(index) : ItemStack.EMPTY; }
@Override
public ItemStack decrStackSize(int index, int count)
{ return ItemStackHelper.getAndSplit(stacks_, index, count); }
@Override
public ItemStack removeStackFromSlot(int index)
{ return ItemStackHelper.getAndRemove(stacks_, index); }
@Override
public void setInventorySlotContents(int index, ItemStack stack)
{
ItemStack slot_stack = stacks_.get(index);
boolean already_in_slot = (!stack.isEmpty()) && (stack.isItemEqual(slot_stack)) && (ItemStack.areItemStackTagsEqual(stack, slot_stack));
stacks_.set(index, stack);
if(stack.getCount() > getInventoryStackLimit()) stack.setCount(getInventoryStackLimit());
if((index == SMELTING_INPUT_SLOT_NO) && (!already_in_slot)) {
proc_time_needed_ = getCookTime(stack);
proc_time_elapsed_ = 0;
markDirty();
}
}
@Override
public int getInventoryStackLimit()
{ return 64; }
@Override
public void markDirty()
{ super.markDirty(); }
@Override
public boolean isUsableByPlayer(EntityPlayer player)
{ return ((world.getTileEntity(pos) == this) && (player.getDistanceSq(pos.getX()+0.5d, pos.getY()+0.5d, pos.getZ()+0.5d) <= 64.0d)); }
@Override
public void openInventory(EntityPlayer player)
{}
@Override
public void closeInventory(EntityPlayer player)
{ markDirty(); }
@Override
public boolean isItemValidForSlot(int index, ItemStack stack)
{
switch(index) {
case SMELTING_OUTPUT_SLOT_NO:
case FIFO_OUTPUT_0_SLOT_NO:
case FIFO_OUTPUT_1_SLOT_NO:
return false;
case SMELTING_INPUT_SLOT_NO:
case FIFO_INPUT_0_SLOT_NO:
case FIFO_INPUT_1_SLOT_NO:
return true;
case AUX_0_SLOT_NO:
case AUX_1_SLOT_NO:
return true;
default: {
ItemStack slot_stack = stacks_.get(FIFO_FUEL_1_SLOT_NO);
return isItemFuel(stack) || SlotFurnaceFuel.isBucket(stack) && (slot_stack.getItem() != Items.BUCKET);
}
}
}
@Override
public int getField(int id)
{
switch (id) {
case 0: return burntime_left_;
case 1: return fuel_burntime_;
case 2: return proc_time_elapsed_;
case 3: return proc_time_needed_;
default: return 0;
}
}
@Override
public void setField(int id, int value)
{
switch(id) {
case 0: burntime_left_ = value; break;
case 1: fuel_burntime_ = value; break;
case 2: proc_time_elapsed_ = value; break;
case 3: proc_time_needed_ = value; break;
}
}
@Override
public int getFieldCount()
{ return 4; }
@Override
public void clear()
{ stacks_.clear(); }
@Override
public void update()
{
if(--tick_timer_ > 0) return;
tick_timer_ = TICK_INTERVAL;
final boolean was_burning = isBurning();
if(was_burning) burntime_left_ -= TICK_INTERVAL;
if(burntime_left_ < 0) burntime_left_ = 0;
if(world.isRemote) return;
boolean dirty = false;
if(--fifo_timer_ <= 0) {
fifo_timer_ = FIFO_INTERVAL/TICK_INTERVAL;
// note, intentionally not using bitwise OR piping.
if(transferItems(FIFO_OUTPUT_0_SLOT_NO, FIFO_OUTPUT_1_SLOT_NO, 1)) dirty = true;
if(transferItems(SMELTING_OUTPUT_SLOT_NO, FIFO_OUTPUT_0_SLOT_NO, 1)) dirty = true;
if(transferItems(FIFO_FUEL_0_SLOT_NO, SMELTING_FUEL_SLOT_NO, 1)) dirty = true;
if(transferItems(FIFO_FUEL_1_SLOT_NO, FIFO_FUEL_0_SLOT_NO, 1)) dirty = true;
if(transferItems(FIFO_INPUT_0_SLOT_NO, SMELTING_INPUT_SLOT_NO, 1)) dirty = true;
if(transferItems(FIFO_INPUT_1_SLOT_NO, FIFO_INPUT_0_SLOT_NO, 1)) dirty = true;
heater_inserted_ = (ExtItems.IE_EXTERNAL_HEATER==null) // without IE always allow electrical boost
|| (stacks_.get(AUX_0_SLOT_NO).getItem()==ExtItems.IE_EXTERNAL_HEATER)
|| (stacks_.get(AUX_1_SLOT_NO).getItem()==ExtItems.IE_EXTERNAL_HEATER);
}
ItemStack fuel = stacks_.get(SMELTING_FUEL_SLOT_NO);
if(isBurning() || (!fuel.isEmpty()) && (!(stacks_.get(SMELTING_INPUT_SLOT_NO)).isEmpty())) {
if(!isBurning() && canSmelt()) {
burntime_left_ = (int)MathHelper.clamp((proc_fuel_efficiency_ * getItemBurnTime(fuel)), 0, MAX_BURNTIME);
fuel_burntime_ = (burntime_left_ * proc_speed_interval_) / VANILLA_FURNACE_SPEED_INTERVAL;
if(isBurning()) {
dirty = true;
if(!fuel.isEmpty()) {
Item fuel_item = fuel.getItem();
fuel.shrink(1);
if(fuel.isEmpty()) stacks_.set(SMELTING_FUEL_SLOT_NO, fuel_item.getContainerItem(fuel));
}
}
}
if(isBurning() && canSmelt()) {
proc_time_elapsed_ += TICK_INTERVAL;
if(heater_inserted_ && (boost_energy_ >= boost_energy_consumption)) { boost_energy_ = 0; proc_time_elapsed_ += TICK_INTERVAL; }
if(proc_time_elapsed_ >= proc_time_needed_) {
proc_time_elapsed_ = 0;
proc_time_needed_ = getCookTime(stacks_.get(SMELTING_INPUT_SLOT_NO));
smeltItem();
dirty = true;
}
} else {
proc_time_elapsed_ = 0;
}
} else if(!isBurning() && (proc_time_elapsed_ > 0)) {
proc_time_elapsed_ = MathHelper.clamp(proc_time_elapsed_-2, 0, proc_time_needed_);
}
if(was_burning != isBurning()) {
dirty = true;
final IBlockState state = world.getBlockState(pos);
if(state.getBlock() instanceof BlockDecorFurnace) {
world.setBlockState(pos, state.withProperty(LIT, isBurning()));
}
}
if(dirty) markDirty();
}
public boolean isBurning()
{ return burntime_left_ > 0; }
@SideOnly(Side.CLIENT)
public static boolean isBurning(IInventory inventory)
{ return inventory.getField(0) > 0; }
public int getCookTime(ItemStack stack)
{ return proc_speed_interval_ < 10 ? 10 : proc_speed_interval_; }
private boolean transferItems(final int index_from, final int index_to, int count)
{
ItemStack from = stacks_.get(index_from);
if(from.isEmpty()) return false;
ItemStack to = stacks_.get(index_to);
if(from.getCount() < count) count = from.getCount();
if(count <= 0) return false;
boolean changed = true;
if(to.isEmpty()) {
stacks_.set(index_to, from.splitStack(count));
} else if(to.getCount() >= to.getMaxStackSize()) {
changed = false;
} else if((!from.isItemEqual(to)) || (!ItemStack.areItemStackTagsEqual(from, to))) {
changed = false;
} else {
if((to.getCount()+count) >= to.getMaxStackSize()) {
from.shrink(to.getMaxStackSize()-to.getCount());
to.setCount(to.getMaxStackSize());
} else {
from.shrink(count);
to.grow(count);
}
}
if(from.isEmpty() && from!=ItemStack.EMPTY) {
stacks_.set(index_from, ItemStack.EMPTY);
changed = true;
}
return changed;
}
private boolean canSmelt()
{
if(stacks_.get(SMELTING_INPUT_SLOT_NO).isEmpty()) return false;
final ItemStack recipe_result_items = BRecipes.instance().getSmeltingResult(stacks_.get(SMELTING_INPUT_SLOT_NO));
if(recipe_result_items.isEmpty()) return false;
final ItemStack result_stack = stacks_.get(SMELTING_OUTPUT_SLOT_NO);
if(result_stack.isEmpty()) return true;
if(!result_stack.isItemEqual(recipe_result_items)) return false;
if(result_stack.getCount() + recipe_result_items.getCount() <= getInventoryStackLimit() && result_stack.getCount() + recipe_result_items.getCount() <= result_stack.getMaxStackSize()) return true;
return result_stack.getCount() + recipe_result_items.getCount() <= recipe_result_items.getMaxStackSize();
}
public void smeltItem()
{
if(!canSmelt()) return;
final ItemStack smelting_input_stack = stacks_.get(SMELTING_INPUT_SLOT_NO);
final ItemStack recipe_result_items = BRecipes.instance().getSmeltingResult(smelting_input_stack);
final ItemStack smelting_output_stack = stacks_.get(SMELTING_OUTPUT_SLOT_NO);
final ItemStack fuel_stack = stacks_.get(SMELTING_FUEL_SLOT_NO);
if(smelting_output_stack.isEmpty()) {
stacks_.set(SMELTING_OUTPUT_SLOT_NO, recipe_result_items.copy());
} else if(smelting_output_stack.getItem() == recipe_result_items.getItem()) {
smelting_output_stack.grow(recipe_result_items.getCount());
}
smelting_input_stack.shrink(1);
}
public static int getItemBurnTime(ItemStack stack)
{ return TileEntityFurnace.getItemBurnTime(stack); }
public static boolean isItemFuel(ItemStack stack)
{ return TileEntityFurnace.isItemFuel(stack); }
// ISidedInventory ----------------------------------------------------------------------------
@Override
public int[] getSlotsForFace(EnumFacing side)
{
if(side == EnumFacing.DOWN) return SLOTS_BOTTOM;
if(side == EnumFacing.UP) return SLOTS_TOP;
return SLOTS_SIDES;
}
@Override
public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction)
{ return isItemValidForSlot(index, itemStackIn); }
@Override
public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction)
{
if((direction!=EnumFacing.DOWN) || ((index!=SMELTING_FUEL_SLOT_NO) && (index!=FIFO_FUEL_0_SLOT_NO) && (index!=FIFO_FUEL_1_SLOT_NO) )) return true;
return (stack.getItem()==Items.BUCKET);
}
// IEnergyStorage ----------------------------------------------------------------------------
public boolean canExtract()
{ return false; }
public boolean canReceive()
{ return true; }
public int getMaxEnergyStored()
{ return boost_energy_consumption; }
public int getEnergyStored()
{ return boost_energy_; }
public int extractEnergy(int maxExtract, boolean simulate)
{ return 0; }
public int receiveEnergy(int maxReceive, boolean simulate)
{ // only speedup support, no buffering, not in nbt -> no markdirty
if((boost_energy_ >= boost_energy_consumption) || (maxReceive < boost_energy_consumption)) return 0;
if(!simulate) boost_energy_ = boost_energy_consumption;
return boost_energy_consumption;
}
// Capability export ----------------------------------------------------------------------------
@Override
public boolean hasCapability(Capability<?> cap, EnumFacing facing)
{ return ((cap==CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) || (cap==CapabilityEnergy.ENERGY)) || super.hasCapability(cap, facing); }
@Override
@SuppressWarnings("unchecked")
@Nullable
public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing)
{
if((facing != null) && (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)) {
if(facing == EnumFacing.DOWN) return (T) sided_itemhandler_down_;
if(facing == EnumFacing.UP) return (T) sided_itemhandler_top_;
return (T) sided_itemhandler_sides_;
} else if(capability == CapabilityEnergy.ENERGY) {
return (T)this;
} else {
return super.getCapability(capability, facing);
}
}
}
//--------------------------------------------------------------------------------------------------------------------
// Furnace recipe overrides
//--------------------------------------------------------------------------------------------------------------------
// Based on net.minecraft.item.crafting.FurnaceRecipes, copy as
// needed methods are private.
public static class BRecipes
{
private static final BRecipes RECIPPE_OVERRIDES = new BRecipes();
private final Map<ItemStack, ItemStack> recipes_ = Maps.<ItemStack, ItemStack>newHashMap();
private final Map<ItemStack, Float> experiences_ = Maps.<ItemStack, Float>newHashMap();
public static BRecipes instance()
{ return RECIPPE_OVERRIDES; }
private BRecipes()
{}
public Map<ItemStack, ItemStack> getRecipes()
{ return recipes_; }
public void reset()
{ recipes_.clear(); experiences_.clear(); }
public ItemStack getSmeltingResult(final ItemStack stack)
{
ItemStack res = override_result(stack);
if(res.isEmpty()) res = FurnaceRecipes.instance().getSmeltingResult(stack);
return res;
}
public float getSmeltingExperience(ItemStack stack)
{
float ret = stack.getItem().getSmeltingExperience(stack);
if(ret != -1) return ret;
for(Map.Entry<ItemStack, Float> e : experiences_.entrySet()) {
if(compare(stack, e.getKey())) return e.getValue();
}
return FurnaceRecipes.instance().getSmeltingExperience(stack);
}
public void add(Block input, ItemStack stack, float experience)
{ add(Item.getItemFromBlock(input), stack, experience); }
public void add(Item input, ItemStack stack, float experience)
{ add(new ItemStack(input, 1, 32767), stack, experience); }
public void add(ItemStack input, ItemStack stack, float xp)
{
// Forced override setting
if(input==ItemStack.EMPTY) return;
if(recipes_.containsKey(input)) recipes_.remove(input);
if(experiences_.containsKey(input)) experiences_.remove(input);
if((stack==null) || (stack==ItemStack.EMPTY)) return;
recipes_.put(input, stack);
experiences_.put(stack, xp);
}
public ItemStack override_result(ItemStack stack)
{
for(Map.Entry<ItemStack, ItemStack> e:recipes_.entrySet()) {
if(compare(stack, e.getKey())) return e.getValue();
}
return ItemStack.EMPTY;
}
private boolean compare(final ItemStack stack1, final ItemStack stack2)
{ return (stack2.getItem() == stack1.getItem()) && ((stack2.getMetadata() == 32767) || (stack2.getMetadata() == stack1.getMetadata())); }
}
}

View file

@ -1,10 +1,10 @@
/*
* @file BlockDecorFull.java
* @file BlockDecorGlassBlock.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Full block characteristics class.
* Full block-size glass blocks.
*/
package wile.engineersdecor.blocks;
@ -56,6 +56,24 @@ public class BlockDecorGlassBlock extends BlockDecor
public boolean isOpaqueCube(IBlockState state)
{ return false; }
@Override
@SuppressWarnings("deprecation")
public boolean isFullCube(IBlockState state)
{ return false; }
@Override
@SuppressWarnings("deprecation")
public boolean isNormalCube(IBlockState state)
{ return false; }
@Override
public int getLightOpacity(IBlockState state, IBlockAccess world, BlockPos pos)
{ return 0; }
@Override
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
{ return 0; }
@Override
public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, net.minecraft.entity.EntityLiving.SpawnPlacementType type)
{ return false; }
@ -75,14 +93,4 @@ public class BlockDecorGlassBlock extends BlockDecor
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
{ return FULL_BLOCK_AABB; }
@Override
@SuppressWarnings("deprecation")
public boolean isFullCube(IBlockState state)
{ return false; }
@Override
@SuppressWarnings("deprecation")
public boolean isNormalCube(IBlockState state)
{ return false; }
}

View file

@ -44,7 +44,11 @@ public class BlockDecorLadder extends BlockLadder
protected static final AxisAlignedBB EDLADDER_EAST_AABB = ModAuxiliaries.getRotatedAABB(EDLADDER_SOUTH_AABB, EnumFacing.EAST, false);
protected static final AxisAlignedBB EDLADDER_WEST_AABB = ModAuxiliaries.getRotatedAABB(EDLADDER_SOUTH_AABB, EnumFacing.WEST, false);
protected static final AxisAlignedBB EDLADDER_NORTH_AABB = ModAuxiliaries.getRotatedAABB(EDLADDER_SOUTH_AABB, EnumFacing.NORTH, false);
protected static final double ladder_speed = 0.7;
protected static boolean with_ladder_speed_boost = true;
public static final void on_config(boolean without_ladder_speed_boost)
{ with_ladder_speed_boost = !without_ladder_speed_boost; }
public BlockDecorLadder(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound)
{
@ -113,15 +117,16 @@ public class BlockDecorLadder extends BlockLadder
// Player update event, forwarded from the main mod instance.
public static void onPlayerUpdateEvent(final EntityPlayer player)
{
if(!with_ladder_speed_boost) return;
if(!player.isOnLadder() || (player.isSneaking()) || (player.isSpectator())) return;
if((Math.abs(player.motionY) < 0.1) || (Math.abs(player.motionY) > 0.7) || ((player.getLookVec().y > 0) != (player.motionY > 0))) return;
if((Math.abs(player.motionY) < 0.1) || (Math.abs(player.motionY) > ladder_speed) || ((player.getLookVec().y > 0) != (player.motionY > 0))) return;
if(Math.abs(player.getLookVec().y) < 0.9) return;
final BlockPos pos = new BlockPos(player.posX, player.posY, player.posZ);
if(!(player.world.getBlockState(pos).getBlock() instanceof BlockDecorLadder)) return;
player.fallDistance = 0;
player.motionY = (player.motionY < -0.25) ? (-0.7) : ((player.motionY > 0.25) ? (0.7) : (player.motionY));
player.motionX = MathHelper.clamp(player.motionX, -0.15, 0.15);
player.motionZ = MathHelper.clamp(player.motionX, -0.15, 0.15);
player.motionY = (player.motionY < -0.25) ? (-ladder_speed) : ((player.motionY > 0.25) ? (ladder_speed) : (player.motionY));
player.motionX = MathHelper.clamp(player.motionX, -0.05, 0.05);
player.motionZ = MathHelper.clamp(player.motionZ, -0.05, 0.05);
player.move(MoverType.PLAYER, player.motionX, player.motionY, player.motionZ);
}
}

View file

@ -0,0 +1,40 @@
/*
* @file BlockDecorStraightPole.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Smaller (cutout) block with a defined facing.
*/
package wile.engineersdecor.blocks;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.world.World;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class BlockDecorStraightPole extends BlockDecorDirected
{
public BlockDecorStraightPole(@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
@SuppressWarnings("deprecation")
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
{
IBlockState state = super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer);
if((config & CFG_FLIP_PLACEMENT_IF_SAME) != 0) {
if(world.getBlockState(pos.offset(facing.getOpposite())).getBlock() instanceof BlockDecorStraightPole) {
state = state.withProperty(FACING, state.getValue(FACING).getOpposite());
}
}
return state;
}
}

View file

@ -66,7 +66,7 @@ public class BlockDecorWall extends BlockDecor
new AxisAlignedBB(d_0, d_0, d_0, d_1, d_1, d_b),
new AxisAlignedBB(d_0, d_0, d_0, d_1, d_1, d_1)
};
private static final double clip_height = 1.5d;
private static final double clip_height = 1.8d;
protected static final AxisAlignedBB[] CLIP_AABB_BY_INDEX = new AxisAlignedBB[] { AABB_BY_INDEX[0].setMaxY(clip_height), AABB_BY_INDEX[1].setMaxY(clip_height), AABB_BY_INDEX[2].setMaxY(clip_height), AABB_BY_INDEX[3].setMaxY(clip_height), AABB_BY_INDEX[4].setMaxY(clip_height), AABB_BY_INDEX[5].setMaxY(clip_height), AABB_BY_INDEX[6].setMaxY(clip_height), AABB_BY_INDEX[7].setMaxY(clip_height), AABB_BY_INDEX[8].setMaxY(clip_height), AABB_BY_INDEX[9].setMaxY(clip_height), AABB_BY_INDEX[10].setMaxY(clip_height), AABB_BY_INDEX[11].setMaxY(clip_height), AABB_BY_INDEX[12].setMaxY(clip_height), AABB_BY_INDEX[13].setMaxY(clip_height), AABB_BY_INDEX[14].setMaxY(clip_height), AABB_BY_INDEX[15].setMaxY(clip_height) };
public BlockDecorWall(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound)

View file

@ -0,0 +1,61 @@
/*
* @file BlockDecorWindow.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Mod windows.
*/
package wile.engineersdecor.blocks;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class BlockDecorWindow extends BlockDecorDirected
{
public BlockDecorWindow(@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
@SideOnly(Side.CLIENT)
public BlockRenderLayer getRenderLayer()
{ return BlockRenderLayer.TRANSLUCENT; }
@Override
@SideOnly(Side.CLIENT)
public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer)
{ return (layer==BlockRenderLayer.CUTOUT) || (layer==BlockRenderLayer.TRANSLUCENT); }
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
{ return true; }
@Override
public boolean isFullCube(IBlockState state)
{ return false; }
@Override
public boolean isNormalCube(IBlockState state)
{ return false; }
@Override
public boolean isOpaqueCube(IBlockState state)
{ return false; }
@Override
public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
{ return false; }
}

View file

@ -12,18 +12,18 @@
*/
package wile.engineersdecor.blocks;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import wile.engineersdecor.ModEngineersDecor;
import wile.engineersdecor.detail.ModAuxiliaries;
import wile.engineersdecor.detail.ModConfig;
import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.ResourceLocation;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@ -57,17 +57,32 @@ public class ModBlocks
public static final BlockDecorGlassBlock PANZERGLASS_BLOCK = new BlockDecorGlassBlock("panzerglass_block", 0, Material.GLASS, 0.8f, 2000f, SoundType.GLASS);
public static final BlockDecorDirected TREATED_WOOD_POLE = new BlockDecorDirected(
public static final BlockDecorStraightPole TREATED_WOOD_POLE = new BlockDecorStraightPole(
"treated_wood_pole",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT,
Material.WOOD, 1.0f, 15f, SoundType.WOOD,
ModAuxiliaries.getPixeledAABB(5.8,5.8,0, 10.2,10.2,16)
);
public static final BlockDecorStraightPole TREATED_WOOD_POLE_HEAD = new BlockDecorStraightPole(
"treated_wood_pole_head",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_IF_SAME,
Material.WOOD, 1.0f, 15f, SoundType.WOOD,
ModAuxiliaries.getPixeledAABB(5.8,5.8,0, 10.2,10.2,16)
);
public static final BlockDecorStraightPole TREATED_WOOD_POLE_SUPPORT = new BlockDecorStraightPole(
"treated_wood_pole_support",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_IF_SAME,
Material.WOOD, 1.0f, 15f, SoundType.WOOD,
ModAuxiliaries.getPixeledAABB(5.8,5.8,0, 10.2,10.2,16)
);
public static final BlockDecor TREATED_WOOD_TABLE = new BlockDecor(
"treated_wood_table",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT,
Material.WOOD, 1.0f, 15f, SoundType.WOOD
Material.WOOD, 1.0f, 15f, SoundType.WOOD,
ModAuxiliaries.getPixeledAABB(1,0,1, 15,15.9,15)
);
public static final BlockDecorChair TREATED_WOOD_STOOL = new BlockDecorChair(
@ -81,7 +96,7 @@ public class ModBlocks
"treated_wood_crafting_table",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT,
Material.WOOD, 1.0f, 15f, SoundType.WOOD,
ModAuxiliaries.getPixeledAABB(0.0,0,0, 16,15.9,16)
ModAuxiliaries.getPixeledAABB(1,0,1, 15,15.9,15)
);
public static final BlockDecorDirected INSET_LIGHT_IRON = new BlockDecorDirected(
@ -98,15 +113,33 @@ public class ModBlocks
ModAuxiliaries.getPixeledAABB(0.5,15,10.5, 15.5,16,16)
);
public static final BlockDecorDirected TREATED_WOOD_WINDOW = new BlockDecorDirected(
public static final BlockDecorWindow TREATED_WOOD_WINDOW = new BlockDecorWindow(
"treated_wood_window",
BlockDecor.CFG_TRANSLUCENT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT,
BlockDecor.CFG_TRANSLUCENT|BlockDecor.CFG_LOOK_PLACEMENT,
Material.WOOD, 0.5f, 15f, SoundType.GLASS,
ModAuxiliaries.getPixeledAABB(0,0,7, 16,16,9)
);
public static final BlockDecorFull IRON_SHEET_ROOF_FULLBLOCK = new BlockDecorFull("iron_sheet_roof_block", 0, Material.IRON, 1.8f, 25f, SoundType.METAL);
public static final BlockDecorStairs IRON_SHEET_ROOF = new BlockDecorStairs("iron_sheet_roof", IRON_SHEET_ROOF_FULLBLOCK.getDefaultState());
public static final BlockDecorWindow STEEL_FRAMED_WINDOW = new BlockDecorWindow(
"steel_framed_window",
BlockDecor.CFG_TRANSLUCENT|BlockDecor.CFG_LOOK_PLACEMENT,
Material.IRON, 0.5f, 30f, SoundType.GLASS,
ModAuxiliaries.getPixeledAABB(0,0,7.5, 16,16,8.5)
);
public static final BlockDecorFurnace SMALL_LAB_FURNACE = new BlockDecorFurnace(
"small_lab_furnace",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT,
Material.IRON, 1.0f, 15f, SoundType.METAL,
ModAuxiliaries.getPixeledAABB(1,0,1, 15,15,16.0)
);
public static final BlockDecorDirected SIGN_MODLOGO = new BlockDecorDirected(
"sign_decor",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_OPPOSITE_PLACEMENT|(1<<BlockDecor.CFG_LIGHT_VALUE_SHIFT),
Material.WOOD, 0.1f, 1000f, SoundType.WOOD,
ModAuxiliaries.getPixeledAABB(0,0,15.6, 16,16,16.0)
);
private static final Block modBlocks[] = {
TREATED_WOOD_CRAFTING_TABLE,
@ -132,31 +165,48 @@ public class ModBlocks
TREATED_WOOD_WINDOW,
TREATED_WOOD_WINDOWSILL,
INSET_LIGHT_IRON,
SMALL_LAB_FURNACE,
STEEL_FRAMED_WINDOW,
TREATED_WOOD_POLE_SUPPORT,
TREATED_WOOD_POLE_HEAD,
SIGN_MODLOGO
};
private static final Block devBlocks[] = {
IRON_SHEET_ROOF, // model looks not good enough yet
};
private static ArrayList<Block> registeredBlocks = new ArrayList<>();
@Nonnull
public static List getRegisteredBlocks()
public static List<Block> getRegisteredBlocks()
{ return Collections.unmodifiableList(registeredBlocks); }
// Invoked from CommonProxy.registerBlocks()
public static final void registerBlocks(RegistryEvent.Register<Block> event)
{
// Config based registry selection
int num_registrations_skipped = 0;
ArrayList<Block> allBlocks = new ArrayList<>();
Collections.addAll(allBlocks, modBlocks);
//if(Loader.isModLoaded("immersiveengineering")){}
if(ModConfig.zmisc.with_experimental) Collections.addAll(allBlocks, devBlocks);
for(Block e:allBlocks) registeredBlocks.add(e);
final boolean woor = ModConfig.isWithoutOptOutRegistration();
for(Block e:allBlocks) {
if((!woor) || (!ModConfig.isOptedOut(e))) {
registeredBlocks.add(e);
} else {
++num_registrations_skipped;
}
}
for(Block e:registeredBlocks) event.getRegistry().register(e);
ModEngineersDecor.logger.info("Registered " + Integer.toString(registeredBlocks.size()) + " blocks.");
if(num_registrations_skipped > 0) {
ModEngineersDecor.logger.info("Skipped registration of " + num_registrations_skipped + " blocks due to no-register-opt-out config.");
}
// TEs
GameRegistry.registerTileEntity(BlockDecorCraftingTable.BTileEntity.class, new ResourceLocation(ModEngineersDecor.MODID, "te_crafting_table"));
GameRegistry.registerTileEntity(BlockDecorFurnace.BTileEntity.class, new ResourceLocation(ModEngineersDecor.MODID, "te_small_lab_furnace"));
}
// Invoked from ClientProxy.registerModels()

View file

@ -8,20 +8,19 @@
*/
package wile.engineersdecor.detail;
import net.minecraft.world.World;
import wile.engineersdecor.ModEngineersDecor;
import net.minecraft.client.Minecraft;
import net.minecraftforge.client.model.obj.OBJLoader;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
public class ClientProxy implements ModEngineersDecor.IProxy
{
@Override
public void preInit(FMLPreInitializationEvent e)
{ OBJLoader.INSTANCE.addDomain(ModEngineersDecor.MODID); }
public void init(FMLInitializationEvent e)
{}
public void postInit(FMLPostInitializationEvent e)
{}
@Override
public World getWorlClientSide()
{ return Minecraft.getMinecraft().world; }
}

View file

@ -0,0 +1,21 @@
/*
* @file ExtItems.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Object holder based item references.
*/
package wile.engineersdecor.detail;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class ExtItems
{
@GameRegistry.ObjectHolder("immersiveengineering:metal_device1")
public static final Item IE_EXTERNAL_HEATER = null;
public static final void onPostInit()
{}
}

View file

@ -8,15 +8,15 @@
*/
package wile.engineersdecor.detail;
import net.minecraft.util.EnumFacing;
import wile.engineersdecor.ModEngineersDecor;
import net.minecraft.item.ItemStack;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.world.World;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.input.Keyboard;

View file

@ -10,17 +10,105 @@
package wile.engineersdecor.detail;
import wile.engineersdecor.ModEngineersDecor;
import wile.engineersdecor.blocks.*;
import net.minecraftforge.common.config.Config;
import net.minecraftforge.common.config.ConfigManager;
import net.minecraft.block.Block;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import javax.annotation.Nullable;
@Config(modid = ModEngineersDecor.MODID)
@Config.LangKey("engineersdecor.config.title")
public class ModConfig
{
@Config.Comment({"Allows disabling specific features."})
@Config.Name("Feature opt-outs")
public static final SettingsOptouts optout = new SettingsOptouts();
public static final class SettingsOptouts
{
@Config.Comment({"Disable clinker bricks and derived blocks."})
@Config.Name("Without clinker bricks")
@Config.RequiresMcRestart
public boolean without_clinker_bricks = false;
@Config.Comment({"Disable slag bricks and derived blocks."})
@Config.Name("Without slag bricks")
@Config.RequiresMcRestart
public boolean without_slag_bricks = false;
@Config.Comment({"Disable rebar concrete and derived blocks."})
@Config.Name("Without rebar concrete")
@Config.RequiresMcRestart
public boolean without_rebar_concrete = false;
@Config.Comment({"Disable all mod wall blocks."})
@Config.Name("Without walls")
@Config.RequiresMcRestart
public boolean without_walls = false;
@Config.Comment({"Disable all mod stairs blocks."})
@Config.Name("Without stairs")
@Config.RequiresMcRestart
public boolean without_stairs = false;
@Config.Comment({"Disable IE concrete wall."})
@Config.Name("Without concrete wall")
@Config.RequiresMcRestart
public boolean without_ie_concrete_wall = false;
@Config.Comment({"Disable panzer glass and derived blocks."})
@Config.Name("Without panzer glass")
@Config.RequiresMcRestart
public boolean without_panzer_glass = false;
@Config.Comment({"Disable treated wood crafting table."})
@Config.Name("Without crafting table")
@Config.RequiresMcRestart
public boolean without_crafting_table = false;
@Config.Comment({"Disable small lab furnace."})
@Config.Name("Without lab furnace")
@Config.RequiresMcRestart
public boolean without_lab_furnace = false;
@Config.Comment({"Disable treated wood table, stool, windowsill, pole, etc."})
@Config.Name("Without tr. wood furniture")
@Config.RequiresMcRestart
public boolean without_treated_wood_furniture = false;
@Config.Comment({"Disable treated wood window, etc."})
@Config.Name("Without windows")
@Config.RequiresMcRestart
public boolean without_windows = false;
@Config.Comment({"Disable light sources"})
@Config.Name("Without lights")
@Config.RequiresMcRestart
public boolean without_light_sources = false;
@Config.Comment({"Disable ladders"})
@Config.Name("Without ladders")
@Config.RequiresMcRestart
public boolean without_ladders = false;
@Config.Comment({"Disable possibility to sit on stools and chairs."})
@Config.Name("Without chair sitting")
public boolean without_chair_sitting = false;
@Config.Comment({"Disable that mobs will sit on chairs and stools."})
@Config.Name("Without chair mob sitting")
public boolean without_mob_chair_sitting = false;
@Config.Comment({"Disable the speed boost of ladders in this mod."})
@Config.Name("Without ladder speed boost")
public boolean without_ladder_speed_boost = false;
}
@Config.Comment({
"Settings for beta testing and trouble shooting. Some of the settings " +
"may be moved to other categories after testing."
@ -31,7 +119,79 @@ public class ModConfig
{
@Config.Comment({ "Enables experimental features. Use at own risk." })
@Config.Name("With experimental")
@Config.RequiresMcRestart
public boolean with_experimental = false;
@Config.Comment({ "Disable all internal recipes, allowing to use alternative pack recipes." })
@Config.Name("Without recipes")
@Config.RequiresMcRestart
public boolean without_recipes = false;
@Config.Comment({"Disable registration of opt'ed out blocks. That is normally not a good idea. Your choice."})
@Config.Name("Without opt-out registration")
@Config.RequiresMcRestart
public boolean without_optout_registration = false;
}
@Config.Comment({"Tweaks and block behaviour adaptions."})
@Config.Name("Tweaks")
public static final SettingsTweaks tweaks = new SettingsTweaks();
public static final class SettingsTweaks
{
@Config.Comment({
"Smelts ores to nuggets that are normally smelted to ingots, " +
"if detectable in the Forge ore dict. Prefers IE recipe results. " +
"The value can be changed on-the-fly for testing or age progression."
})
@Config.Name("Furnace: Nugget smelting")
public boolean furnace_smelts_nuggets = false;
@Config.Comment({
"Defines, in percent, how fast the lab furnace smelts compared to " +
"a vanilla furnace. 100% means vanilla furnace speed, 150% means the " +
"lab furnace is faster. The value can be changed on-the-fly for tuning."
})
@Config.Name("Furnace: Smelting speed %")
@Config.RangeInt(min=50, max=500)
public int furnace_smelting_speed_percent = 130;
@Config.Comment({
"Defines, in percent, how fuel efficient the lab furnace is, compared " +
"to a vanilla furnace. 100% means vanilla furnace consumiton, 200% means " +
"the lab furnace needs about half the fuel of a vanilla furnace, " +
"The value can be changed on-the-fly for tuning."
})
@Config.Name("Furnace: Fuel efficiency %")
@Config.RangeInt(min=50, max=250)
public int furnace_fuel_efficiency_percent = 100;
@Config.Comment({
"Defines the energy consumption (per tick) for speeding up the smelting process. " +
"If IE is installed, an external heater has to be inserted into an auxiliary slot " +
"of the lab furnace. The power source needs to be able to provide at least 4 times " +
"this consumption (fixed threshold value). The value can be changed on-the-fly for tuning. " +
"The default value corresponds to the IE heater consumption."
})
@Config.Name("Furnace: Boost energy")
@Config.RangeInt(min=16, max=256)
public int furnace_boost_energy_consumption = 24;
@Config.Comment({
"Defines, in percent, how high the probability is that a mob sits on a chair " +
"when colliding with it. Can be changed on-the-fly for tuning."
})
@Config.Name("Chairs: Sitting chance %")
@Config.RangeDouble(min=0.0, max=80)
public double chair_mob_sitting_probability_percent = 10;
@Config.Comment({
"Defines, in percent, probable it is that a mob leaves a chair when sitting " +
"on it. The 'dice is rolled' about every 20 ticks. There is also a minimum " +
"Sitting time of about 3s. The config value can be changed on-the-fly for tuning."
})
@Config.Name("Chairs: Stand up chance %")
@Config.RangeDouble(min=0.001, max=10)
public double chair_mob_standup_probability_percent = 1;
}
@SuppressWarnings("unused")
@ -42,11 +202,56 @@ public class ModConfig
public static void onConfigChanged(final ConfigChangedEvent.OnConfigChangedEvent event) {
if(!event.getModID().equals(ModEngineersDecor.MODID)) return;
ConfigManager.sync(ModEngineersDecor.MODID, Config.Type.INSTANCE);
apply();
}
}
@SuppressWarnings("unused")
public static final void onPostInit(FMLPostInitializationEvent event)
{}
{ apply(); }
public static final boolean isWithoutOptOutRegistration()
{ return (zmisc!=null) && (zmisc.without_optout_registration); }
public static final boolean isWithoutRecipes()
{ return (zmisc==null) || (zmisc.without_recipes); }
public static final boolean isOptedOut(final @Nullable Block block)
{
if((block == null) || (optout==null)) return true;
if(block == ModBlocks.SIGN_MODLOGO) return true;
final String rn = block.getRegistryName().getPath();
if(optout.without_clinker_bricks && rn.startsWith("clinker_brick_")) return true;
if(optout.without_slag_bricks && rn.startsWith("slag_brick_")) return true;
if(optout.without_rebar_concrete && rn.startsWith("rebar_concrete")) return true;
if(optout.without_ie_concrete_wall && rn.startsWith("concrete_wall")) return true;
if(optout.without_panzer_glass && rn.startsWith("panzerglass_")) return true;
if(optout.without_crafting_table && (block instanceof BlockDecorCraftingTable)) return true;
if(optout.without_lab_furnace && (block instanceof BlockDecorFurnace)) return true;
if(optout.without_windows && rn.endsWith("_window")) return true;
if(optout.without_light_sources && rn.endsWith("_light")) return true;
if(optout.without_ladders && (block instanceof BlockDecorLadder)) return true;
if(optout.without_walls && rn.endsWith("_wall")) return true;
if(optout.without_stairs && rn.endsWith("_stairs")) return true;
if(optout.without_treated_wood_furniture) {
if(block instanceof BlockDecorChair) return true;
if(rn.equals("treated_wood_pole")) return true;
if(rn.equals("treated_wood_table")) return true;
if(rn.equals("treated_wood_stool")) return true;
if(rn.equals("treated_wood_windowsill")) return true;
if(rn.equals("treated_wood_window")) return true;
}
return false;
}
public static final void apply()
{
BlockDecorFurnace.BTileEntity.on_config(tweaks.furnace_smelting_speed_percent, tweaks.furnace_fuel_efficiency_percent, tweaks.furnace_boost_energy_consumption);
ModRecipes.furnaceRecipeOverrideReset();
if(tweaks.furnace_smelts_nuggets) ModRecipes.furnaceRecipeOverrideSmeltsOresToNuggets();
BlockDecorChair.on_config(optout.without_chair_sitting, optout.without_mob_chair_sitting, tweaks.chair_mob_sitting_probability_percent, tweaks.chair_mob_standup_probability_percent);
BlockDecorLadder.on_config(optout.without_ladder_speed_boost);
BlockDecorCraftingTable.on_config(!zmisc.with_experimental);
}
}

View file

@ -0,0 +1,68 @@
/*
* @file ModRecipes.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2018 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* General handling auxiliaries for mod recipes.
*/
package wile.engineersdecor.detail;
import wile.engineersdecor.ModEngineersDecor;
import wile.engineersdecor.blocks.BlockDecorFurnace;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.util.NonNullList;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraft.item.ItemStack;
import java.util.*;
public class ModRecipes
{
public static final void furnaceRecipeOverrideReset()
{ BlockDecorFurnace.BRecipes.instance().reset(); }
public static final void furnaceRecipeOverrideSmeltsOresToNuggets()
{
try {
ArrayList<String> ores = new ArrayList<String>();
ArrayList<String> ingots = new ArrayList<String>();
ArrayList<String> nuggets = new ArrayList<String>();
String[] names = OreDictionary.getOreNames();
for(String name:names) {
if(name.startsWith("ore")) ores.add(name);
if(name.startsWith("ingot")) ingots.add(name);
if(name.startsWith("nugget")) nuggets.add(name);
}
for(String ore_name:ores) {
final String ingot_name = ore_name.replace("ore", "ingot");
if(!ingots.contains(ingot_name)) continue;
final String nugget_name = ore_name.replace("ore", "nugget");
if(!nuggets.contains(nugget_name)) continue;
final NonNullList<ItemStack> ore_list = OreDictionary.getOres(ore_name, false);
final NonNullList<ItemStack> ingot_list = OreDictionary.getOres(ingot_name, false);
final NonNullList<ItemStack> nugget_list = OreDictionary.getOres(nugget_name, false);
if(ore_list.isEmpty() || ingot_list.isEmpty() || nugget_list.isEmpty()) continue;
final ItemStack ore_stack = ore_list.get(0);
final ItemStack ingot_stack = ingot_list.get(0);
ItemStack nugget_stack = nugget_list.get(0);
for(ItemStack stack:nugget_list) {
if(stack.getItem().getRegistryName().getNamespace() == "immersiveengineering") {
nugget_stack = stack;
break;
}
}
if(ore_stack.isEmpty() || ingot_stack.isEmpty() || nugget_stack.isEmpty()) continue;
if(FurnaceRecipes.instance().getSmeltingResult(ore_stack).getItem().equals(ingot_stack.getItem())) {
final float xp = FurnaceRecipes.instance().getSmeltingExperience(ore_stack);
BlockDecorFurnace.BRecipes.instance().add(ore_stack, nugget_stack, xp);
ModEngineersDecor.logger.info("Lab furnace override: " + ore_name + " -> " + nugget_name);
}
}
} catch(Throwable e) {
ModEngineersDecor.logger.error("Lab furnace override failed with exception, skipping further override processing.");
ModEngineersDecor.logger.error("Exception is: ", e);
}
}
}

View file

@ -0,0 +1,119 @@
/*
* @file Networking.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Main client/server message handling.
*/
package wile.engineersdecor.detail;
import wile.engineersdecor.ModEngineersDecor;
import net.minecraft.client.Minecraft;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fml.common.network.ByteBufUtils;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import net.minecraftforge.fml.relauncher.Side;
import io.netty.buffer.ByteBuf;
public class Networking
{
private static SimpleNetworkWrapper snw = null;
public static void init()
{
if(snw != null) return;
int discr = -1;
snw = NetworkRegistry.INSTANCE.newSimpleChannel(ModEngineersDecor.MODID);
snw.registerMessage(PacketTileNotify.ServerHandler.class, PacketTileNotify.class, ++discr, Side.SERVER);
snw.registerMessage(PacketTileNotify.ClientHandler.class, PacketTileNotify.class, ++discr, Side.CLIENT);
}
public interface IPacketReceiver
{
default void onServerPacketReceived(NBTTagCompound nbt) {}
default void onClientPacketReceived(EntityPlayer player, NBTTagCompound nbt) {}
}
//--------------------------------------------------------------------------------------------------------------------
// Tile entity notifications
//--------------------------------------------------------------------------------------------------------------------
public static class PacketTileNotify implements IMessage
{
NBTTagCompound nbt = null;
BlockPos pos = BlockPos.ORIGIN;
public static void sendToServer(TileEntity te, NBTTagCompound nbt)
{ if((te != null) && (nbt!=null)) snw.sendToServer(new PacketTileNotify(te, nbt)); }
public static void sendToPlayer(EntityPlayer player, TileEntity te, NBTTagCompound nbt)
{ if((player instanceof EntityPlayerMP) && (te != null) && (nbt!=null)) snw.sendTo(new PacketTileNotify(te, nbt), (EntityPlayerMP)player); }
public PacketTileNotify(TileEntity te, NBTTagCompound nbt)
{ this.nbt=nbt; pos=te.getPos(); }
public PacketTileNotify()
{}
@Override
public void fromBytes(ByteBuf buf)
{ pos=BlockPos.fromLong(buf.readLong()); nbt= ByteBufUtils.readTag(buf); }
@Override
public void toBytes(ByteBuf buf)
{ buf.writeLong(pos.toLong()); ByteBufUtils.writeTag(buf, nbt); }
public static class ServerHandler implements IMessageHandler<PacketTileNotify, IMessage>
{
@Override
public IMessage onMessage(PacketTileNotify pkt, MessageContext ctx)
{
EntityPlayer player = ctx.getServerHandler().player;
WorldServer world = ctx.getServerHandler().player.getServerWorld();
world.addScheduledTask(() -> {
try {
if(!world.isBlockLoaded(pkt.pos)) return;
TileEntity te = world.getTileEntity(pkt.pos);
if(!(te instanceof IPacketReceiver)) return;
((IPacketReceiver)te).onClientPacketReceived(player, pkt.nbt);
} catch(Throwable ex) {
ModEngineersDecor.logger.error("Failed to process TE notify packet: " + ex.getMessage());
}
});
return null;
}
}
public static class ClientHandler implements IMessageHandler<PacketTileNotify, IMessage>
{
@Override
public IMessage onMessage(PacketTileNotify pkt, MessageContext ctx)
{
Minecraft.getMinecraft().addScheduledTask(() -> {
try {
final World world = ModEngineersDecor.proxy.getWorlClientSide();
if(!(world instanceof World)) return;
TileEntity te = world.getTileEntity(pkt.pos);
if(!(te instanceof IPacketReceiver)) return;
((IPacketReceiver) te).onServerPacketReceived(pkt.nbt);
} catch(Throwable ex) {
ModEngineersDecor.logger.error("Failed to process TE notify packet: " + ex.getMessage());
}
});
return null;
}
}
}
}

View file

@ -19,7 +19,6 @@ import net.minecraftforge.common.crafting.IConditionFactory;
import net.minecraftforge.common.crafting.JsonContext;
import net.minecraftforge.registries.IForgeRegistry;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import com.google.gson.*;
import java.util.function.BooleanSupplier;
@ -29,8 +28,14 @@ public class RecipeCondModSpecific implements IConditionFactory
public static final BooleanSupplier RECIPE_INCLUDE = ()->true;
public static final BooleanSupplier RECIPE_EXCLUDE = ()->false;
public static int num_skipped = 0;
private static BooleanSupplier exclude()
{ ++num_skipped; return RECIPE_EXCLUDE; }
@Override
public BooleanSupplier parse(JsonContext context, JsonObject json) {
if(ModConfig.isWithoutRecipes()) return exclude();
try {
final IForgeRegistry<Block> block_registry = ForgeRegistries.BLOCKS;
final IForgeRegistry<Item> item_registry = ForgeRegistries.ITEMS;
@ -39,31 +44,33 @@ public class RecipeCondModSpecific implements IConditionFactory
for(JsonElement e: items) {
if(!e.isJsonPrimitive()) continue;
final ResourceLocation rl = new ResourceLocation(((JsonPrimitive)e).getAsString());
if((!block_registry.containsKey(rl)) && (!item_registry.containsKey(rl))) return RECIPE_EXCLUDE; // required item not registered
if((!block_registry.containsKey(rl)) && (!item_registry.containsKey(rl))) return exclude(); // required item not registered
}
}
final JsonPrimitive result = json.getAsJsonPrimitive("result");
if(result != null) {
final ResourceLocation rl = new ResourceLocation(result.getAsString());
if((!block_registry.containsKey(rl)) && (!item_registry.containsKey(rl))) return RECIPE_EXCLUDE; // required result not registered
if((!block_registry.containsKey(rl)) && (!item_registry.containsKey(rl))) return exclude(); // required result not registered
if(ModConfig.isOptedOut(block_registry.getValue(rl))) return exclude(); // disabled in mod config
}
final JsonArray missing = json.getAsJsonArray("missing");
if((missing!=null) && (missing.size() > 0)) {
int num_missing = 0;
for(JsonElement e: missing) {
if(!e.isJsonPrimitive()) continue;
final ResourceLocation rl = new ResourceLocation(((JsonPrimitive)e).getAsString());
if((!block_registry.containsKey(rl)) && (!item_registry.containsKey(rl))) ++num_missing;
}
// At least one item missing, enable this recipe as alternative recipe for another one that check the missing item as required item.
// --> e.g. if IE not installed there is no slag. One recipe requires slag, and another one (for the same result) is used if there
// is no slag.
if((!block_registry.containsKey(rl)) && (!item_registry.containsKey(rl))) return RECIPE_INCLUDE;
}
return RECIPE_EXCLUDE; // all required there, but there is no item missing, so another recipe
return (num_missing == 0) ? (exclude()) : (RECIPE_INCLUDE);
} else {
return RECIPE_INCLUDE; // no missing given, means include if result and required are all there.
}
} catch(Throwable ex) {
ModEngineersDecor.logger.error("rsgauges::ResultRegisteredCondition failed: " + ex.toString());
}
return RECIPE_EXCLUDE; // skip on exception.
return exclude(); // skip on exception.
}
}

View file

@ -9,18 +9,6 @@
package wile.engineersdecor.detail;
import wile.engineersdecor.ModEngineersDecor;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
public class ServerProxy implements ModEngineersDecor.IProxy
{
public void preInit(FMLPreInitializationEvent e)
{}
public void init(FMLInitializationEvent e)
{}
public void postInit(FMLPostInitializationEvent e)
{}
}
{}

View file

@ -0,0 +1,43 @@
/*
* @file JEIPlugin.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* JEI plugin (see https://github.com/mezz/JustEnoughItems/wiki/Creating-Plugins)
*/
package wile.engineersdecor.eapi.jei;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import wile.engineersdecor.ModEngineersDecor;
import wile.engineersdecor.blocks.ModBlocks;
import wile.engineersdecor.detail.ModConfig;
@mezz.jei.api.JEIPlugin
public class JEIPlugin implements mezz.jei.api.IModPlugin
{
@Override
@SuppressWarnings("deprecation")
public void register(mezz.jei.api.IModRegistry registry)
{
try {
for(Block e:ModBlocks.getRegisteredBlocks()) {
if(ModConfig.isOptedOut(e)) {
ItemStack stack = new ItemStack(Item.getItemFromBlock(e));
if(stack != null) {
if(!registry.getJeiHelpers().getIngredientBlacklist().isIngredientBlacklisted(stack)) {
registry.getJeiHelpers().getIngredientBlacklist().addIngredientToBlacklist(stack);
}
if(!registry.getJeiHelpers().getItemBlacklist().isItemBlacklisted(stack)) {
registry.getJeiHelpers().getItemBlacklist().addItemToBlacklist(stack);
}
}
}
}
} catch(Throwable e) {
ModEngineersDecor.logger.warn("Exception in JEI opt-out processing: '" + e.getMessage() + "', skipping further JEI processing.");
}
}
}

View file

@ -3,8 +3,8 @@
"defaults": {
"model": "engineersdecor:wall/concrete_wall_default",
"textures": {
"wall": "immersiveengineering:blocks/stone_decoration_concrete",
"particle": "immersiveengineering:blocks/stone_decoration_concrete"
"wall": "engineersdecor:blocks/iestyle/stone_decoration_concrete_by_blusunrize",
"particle": "engineersdecor:blocks/iestyle/stone_decoration_concrete_by_blusunrize"
}
},
"variants": {

View file

@ -1,55 +0,0 @@
{
"forge_marker": 1,
"defaults": {
"model": "engineersdecor:stairs/decor_straight_roof_model",
"textures": {
"bottom": "engineersdecor:blocks/iestyle/ironsheet_roof_top",
"side": "engineersdecor:blocks/iestyle/ironsheet_roof",
"top": "engineersdecor:blocks/iestyle/ironsheet_roof_top"
}
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing=east,half=bottom,shape=straight": { "model": "engineersdecor:stairs/decor_straight_roof_model" },
"facing=west,half=bottom,shape=straight": { "model": "engineersdecor:stairs/decor_straight_roof_model", "y": 180, "uvlock": true },
"facing=south,half=bottom,shape=straight": { "model": "engineersdecor:stairs/decor_straight_roof_model", "y": 90, "uvlock": true },
"facing=north,half=bottom,shape=straight": { "model": "engineersdecor:stairs/decor_straight_roof_model", "y": 270, "uvlock": true },
"facing=east,half=bottom,shape=outer_right": { "model": "engineersdecor:stairs/decor_outer_roof_model" },
"facing=west,half=bottom,shape=outer_right": { "model": "engineersdecor:stairs/decor_outer_roof_model", "y": 180, "uvlock": true },
"facing=south,half=bottom,shape=outer_right": { "model": "engineersdecor:stairs/decor_outer_roof_model", "y": 90, "uvlock": true },
"facing=north,half=bottom,shape=outer_right": { "model": "engineersdecor:stairs/decor_outer_roof_model", "y": 270, "uvlock": true },
"facing=east,half=bottom,shape=outer_left": { "model": "engineersdecor:stairs/decor_outer_roof_model", "y": 270, "uvlock": true },
"facing=west,half=bottom,shape=outer_left": { "model": "engineersdecor:stairs/decor_outer_roof_model", "y": 90, "uvlock": true },
"facing=south,half=bottom,shape=outer_left": { "model": "engineersdecor:stairs/decor_outer_roof_model" },
"facing=north,half=bottom,shape=outer_left": { "model": "engineersdecor:stairs/decor_outer_roof_model", "y": 180, "uvlock": true },
"facing=east,half=bottom,shape=inner_right": { "model": "engineersdecor:stairs/decor_inner_roof_model" },
"facing=west,half=bottom,shape=inner_right": { "model": "engineersdecor:stairs/decor_inner_roof_model", "y": 180, "uvlock": true },
"facing=south,half=bottom,shape=inner_right": { "model": "engineersdecor:stairs/decor_inner_roof_model", "y": 90, "uvlock": true },
"facing=north,half=bottom,shape=inner_right": { "model": "engineersdecor:stairs/decor_inner_roof_model", "y": 270, "uvlock": true },
"facing=east,half=bottom,shape=inner_left": { "model": "engineersdecor:stairs/decor_inner_roof_model", "y": 270, "uvlock": true },
"facing=west,half=bottom,shape=inner_left": { "model": "engineersdecor:stairs/decor_inner_roof_model", "y": 90, "uvlock": true },
"facing=south,half=bottom,shape=inner_left": { "model": "engineersdecor:stairs/decor_inner_roof_model" },
"facing=north,half=bottom,shape=inner_left": { "model": "engineersdecor:stairs/decor_inner_roof_model", "y": 180, "uvlock": true },
"facing=east,half=top,shape=straight": { "model": "engineersdecor:stairs/decor_straight_roof_model", "x": 180, "uvlock": true },
"facing=west,half=top,shape=straight": { "model": "engineersdecor:stairs/decor_straight_roof_model", "x": 180, "y": 180, "uvlock": true },
"facing=south,half=top,shape=straight": { "model": "engineersdecor:stairs/decor_straight_roof_model", "x": 180, "y": 90, "uvlock": true },
"facing=north,half=top,shape=straight": { "model": "engineersdecor:stairs/decor_straight_roof_model", "x": 180, "y": 270, "uvlock": true },
"facing=east,half=top,shape=outer_right": { "model": "engineersdecor:stairs/decor_outer_roof_model", "x": 180, "y": 90, "uvlock": true },
"facing=west,half=top,shape=outer_right": { "model": "engineersdecor:stairs/decor_outer_roof_model", "x": 180, "y": 270, "uvlock": true },
"facing=south,half=top,shape=outer_right": { "model": "engineersdecor:stairs/decor_outer_roof_model", "x": 180, "y": 180, "uvlock": true },
"facing=north,half=top,shape=outer_right": { "model": "engineersdecor:stairs/decor_outer_roof_model", "x": 180, "uvlock": true },
"facing=east,half=top,shape=outer_left": { "model": "engineersdecor:stairs/decor_outer_roof_model", "x": 180, "uvlock": true },
"facing=west,half=top,shape=outer_left": { "model": "engineersdecor:stairs/decor_outer_roof_model", "x": 180, "y": 180, "uvlock": true },
"facing=south,half=top,shape=outer_left": { "model": "engineersdecor:stairs/decor_outer_roof_model", "x": 180, "y": 90, "uvlock": true },
"facing=north,half=top,shape=outer_left": { "model": "engineersdecor:stairs/decor_outer_roof_model", "x": 180, "y": 270, "uvlock": true },
"facing=east,half=top,shape=inner_right": { "model": "engineersdecor:stairs/decor_inner_roof_model", "x": 180, "y": 90, "uvlock": true },
"facing=west,half=top,shape=inner_right": { "model": "engineersdecor:stairs/decor_inner_roof_model", "x": 180, "y": 270, "uvlock": true },
"facing=south,half=top,shape=inner_right": { "model": "engineersdecor:stairs/decor_inner_roof_model", "x": 180, "y": 180, "uvlock": true },
"facing=north,half=top,shape=inner_right": { "model": "engineersdecor:stairs/decor_inner_roof_model", "x": 180, "uvlock": true },
"facing=east,half=top,shape=inner_left": { "model": "engineersdecor:stairs/decor_inner_roof_model", "x": 180, "uvlock": true },
"facing=west,half=top,shape=inner_left": { "model": "engineersdecor:stairs/decor_inner_roof_model", "x": 180, "y": 180, "uvlock": true },
"facing=south,half=top,shape=inner_left": { "model": "engineersdecor:stairs/decor_inner_roof_model", "x": 180, "y": 90, "uvlock": true },
"facing=north,half=top,shape=inner_left": { "model": "engineersdecor:stairs/decor_inner_roof_model", "x": 180, "y": 270, "uvlock": true }
}
}

View file

@ -1,11 +0,0 @@
{
"forge_marker": 1,
"defaults": {
"model": "engineersdecor:decor_full_block_model",
"textures": { "all": "engineersdecor:blocks/iestyle/ironsheet_roof" }
},
"variants": {
"normal": [{}],
"inventory": [{}]
}
}

View file

@ -0,0 +1,9 @@
{
"forge_marker": 1,
"defaults": { "model": "engineersdecor:sign/sign_decor_model" },
"variants": {
"normal": [{}],
"facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":0}, "down": {"x":0} },
"inventory": [{}]
}
}

View file

@ -0,0 +1,12 @@
{
"forge_marker": 1,
"defaults": {
"model": "engineersdecor:furnace/small_lab_furnace_model"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing": { "north": {"y":0}, "south": {"y":180}, "west": {"y":-90}, "east": {"y":90}, "up":{}, "down":{} },
"lit": { "false":{ "textures":{ "gloom": "engineersdecor:blocks/furnace/small_lab_furnace_front_gloom_off" } }, "true":{}}
}
}

View file

@ -0,0 +1,19 @@
{
"forge_marker": 1,
"defaults": {
"model": "forge:multi-layer",
"transform": "forge:default-block",
"custom": {
"base": "engineersdecor:steel_framed_window#frame",
"Cutout": "engineersdecor:steel_framed_window#frame",
"Translucent": "engineersdecor:steel_framed_window#pane"
}
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing": { "north": {"y":0}, "south": {"y":0}, "west": {"y":90}, "east": {"y":90}, "up": {"x":90}, "down": {"x":90} },
"frame": [ {"model":"engineersdecor:furniture/steel_framed_window_submodel" }],
"pane": [ {"model":"engineersdecor:furniture/framed_window_glasspane_submodel" }]
}
}

View file

@ -0,0 +1,17 @@
{
"forge_marker": 1,
"defaults": {
"model": "engineersdecor:pole/straight_pole_head_model",
"x":-90,
"textures": {
"particle": "engineersdecor:blocks/pole/treated_wood_pole_side_texture",
"side": "engineersdecor:blocks/pole/treated_wood_pole_side_texture",
"top": "engineersdecor:blocks/pole/treated_wood_pole_top_texture"
}
},
"variants": {
"normal": [{}],
"facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} },
"inventory": [{}]
}
}

View file

@ -0,0 +1,17 @@
{
"forge_marker": 1,
"defaults": {
"model": "engineersdecor:pole/straight_pole_support_model",
"x":-90,
"textures": {
"particle": "engineersdecor:blocks/pole/treated_wood_pole_side_texture",
"side": "engineersdecor:blocks/pole/treated_wood_pole_side_texture",
"top": "engineersdecor:blocks/pole/treated_wood_pole_top_texture"
}
},
"variants": {
"normal": [{}],
"facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} },
"inventory": [{}]
}
}

View file

@ -1,11 +1,19 @@
{
"forge_marker": 1,
"defaults": {
"model": "engineersdecor:furniture/treated_wood_window_model"
"model": "forge:multi-layer",
"transform": "forge:default-block",
"custom": {
"base": "engineersdecor:treated_wood_window#frame",
"Cutout": "engineersdecor:treated_wood_window#frame",
"Translucent": "engineersdecor:treated_wood_window#pane"
}
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing": { "north": {"y":0}, "south": {"y":0}, "west": {"y":90}, "east": {"y":90}, "up": {"x":90}, "down": {"x":90} },
"inventory": [{}]
"frame": [ {"model":"engineersdecor:furniture/treated_wood_window_submodel" }],
"pane": [ {"model":"engineersdecor:furniture/framed_window_glasspane_submodel" }]
}
}

View file

@ -52,6 +52,10 @@ tile.engineersdecor.treated_wood_pole.name=Straight treated wood pole
tile.engineersdecor.treated_wood_pole.help=§6Straight pole fragment with the diameter of a wire relay.§r\n\
Can be useful as alternative to the wire posts if special special lengths are needed, \
or as support for structures.
tile.engineersdecor.treated_wood_pole_head.name=Straight treated wood pole head/foot
tile.engineersdecor.treated_wood_pole_head.help=§6Wooden part fitting as foot or head of straight poles.
tile.engineersdecor.treated_wood_pole_support.name=Straight treated wood pole support
tile.engineersdecor.treated_wood_pole_support.help=§6Heavy duty wooden support part fitting as foot or head of straight poles.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.treated_wood_table.name=Treated wood table
tile.engineersdecor.treated_wood_table.help=§6Robust four-legged wood table.§r Indoor and outdoor use.
@ -64,12 +68,21 @@ tile.engineersdecor.iron_inset_light.help=§6Small glowstone light source, sunk
Useful to light up places where electrical light installations are problematic.\
Light level like a torch.
tile.engineersdecor.treated_wood_window.name=Treated wood window
tile.engineersdecor.treated_wood_window.help=§6Wood framed tripple glazed window. Well insulating.
tile.engineersdecor.treated_wood_window.help=§6Wood framed tripple glazed window. Well insulating.§r Does not connect to adjacent blocks like glass panes.
tile.engineersdecor.treated_wood_windowsill.name=Treated wood window sill
tile.engineersdecor.treated_wood_windowsill.help=§6Simple window decoration.
tile.engineersdecor.steel_framed_window.name=Steel framed window
tile.engineersdecor.steel_framed_window.help=§6Steel framed tripple glazed window. Well insulating. §r Does not connect to adjacent blocks like glass panes.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.iron_sheet_roof.name=Iron sheet metal roof
tile.engineersdecor.iron_sheet_roof.help=§6Well, it's a roof.
tile.engineersdecor.small_lab_furnace.name=Small laboratory furnace
tile.engineersdecor.small_lab_furnace.help=§6Small metal cased lab kiln.§r Solid fuel consuming, updraught. \
Slightly hotter and better isolated than a cobblestone furnace, therefore more efficient. \
Two auxiliary slots e.g. for storage. Two stack internal hopper fifos for input, output, \
and fuel. Place an external heater into a aux slot and connect power for electrical \
smelting speed boost.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.sign_decor.name=Sign plate (Engineer's decor logo)
tile.engineersdecor.sign_decor.help=§6This should not be craftable or visible in JEI. Used for creative tab and screenshots.
#-----------------------------------------------------------------------------------------------------------
# EOF
#-----------------------------------------------------------------------------------------------------------

View file

@ -0,0 +1,84 @@
#
# Engineer's Decor lang file
#
#PARSE_ESCAPES
#
#-----------------------------------------------------------------------------------------------------------
itemGroup.tabengineersdecor=Engineer's Decor
engineersdecor.config.title=Engineer's Decor конфигурация
engineersdecor.tooltip.hint.extended=§6[§9SHIFT§r Больше информации§6]§r
engineersdecor.tooltip.hint.help=§6[§9CTRL-SHIFT§r Помощь§6]§r
#-----------------------------------------------------------------------------------------------------------
# Stone/"ceramic material" based blocks
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.clinker_brick_block.name=Клинкерный кирпич
tile.engineersdecor.clinker_brick_block.help=§6Кирпичный блок с вариациями текстуры, зависящими от положения.§r\nВыглядит немного темнее и интенсивнее, чем ванильный кирпичный блок.
tile.engineersdecor.slag_brick_block.name=Шлакоблок
tile.engineersdecor.slag_brick_block.help=§6Серо-коричневый кирпичный блок с зависимыми от положения вариациями текстуры.
tile.engineersdecor.rebar_concrete.name=Железобетон
tile.engineersdecor.rebar_concrete.help=§6Стальной железобетонный блок.§r Дорогой, но взрывоустойчивый, как обсидиан.
tile.engineersdecor.panzerglass_block.name=Бронированное стекло
tile.engineersdecor.panzerglass_block.help=§6Усиленный стеклоблок.§r Дорогой, взрывоустойчивый. Имеет темно-серый оттенок, видны слабые структурные линии, мульти текстура для бесшовного отображения.
tile.engineersdecor.rebar_concrete_tile.name=Железобетонная плита
tile.engineersdecor.rebar_concrete_tile.help=§6Стальная железобетонная плитка.§r Дорогая, но взрывоустойчивая, как обсидиан.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.rebar_concrete_wall.name=Железобетонная стена
tile.engineersdecor.rebar_concrete_wall.help=§6Стальная железобетонная стена.§r Дорогая, но взрывоустойчивая, как обсидиан.
tile.engineersdecor.concrete_wall.name=Бетонная стена
tile.engineersdecor.concrete_wall.help=§6Стена из твердого бетона.
tile.engineersdecor.clinker_brick_wall.name=Клинкерная кирпичная стена
tile.engineersdecor.clinker_brick_wall.help=§6Обыкновенная клинкерная кирпичная стена.
tile.engineersdecor.slag_brick_wall.name=Кирпичная стена из шлакоблока
tile.engineersdecor.slag_brick_wall.help=§6Обыкновенная стена из шлакоблока.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.metal_rung_ladder.name=Металлическая лестница
tile.engineersdecor.metal_rung_ladder.help=§6Типичная промышленная настенная лестница, состоящая из горизонтальных металлических стержней.§r Смотри вверх / вниз, чтобы подняться быстрее.
tile.engineersdecor.metal_rung_steps.name=Настенные металлические ступеньки
tile.engineersdecor.metal_rung_steps.help=§6Металлические ступеньки, крепятся к стене. Позволяют подыматься / спускаться.§r Смотри вверх / вниз, чтобы подняться быстрее.
tile.engineersdecor.treated_wood_ladder.name=Лестница из обработанного дерева
tile.engineersdecor.treated_wood_ladder.help=§6Погодоустойчивая деревянная лестница.§r Смотри вверх / вниз, чтобы подняться быстрее.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.clinker_brick_stairs.name=Клинкерная кирпичная лестница
tile.engineersdecor.clinker_brick_stairs.help=§6По цвету выглядит немного темнее и интенсивнее, чем ванильный кирпичный блок
tile.engineersdecor.slag_brick_stairs.name=Клинкерная кирпичная лестница
tile.engineersdecor.slag_brick_stairs.help=§6По цвету выглядит немного темнее и интенсивнее, чем ванильный кирпичный блок.
tile.engineersdecor.rebar_concrete_stairs.name=Железобетонная лестница
tile.engineersdecor.rebar_concrete_stairs.help=§6Железобетонная лестница.§r Дорогая, но взрывоустойчивая, как обсидиан.
tile.engineersdecor.rebar_concrete_tile_stairs.name=Железобетонная лестница
tile.engineersdecor.rebar_concrete_tile_stairs.help=§6Железобетонная лестница.§r Дорогая, но взрывоустойчивая, как обсидиан.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.treated_wood_pole.name=Прямой обработанный деревянный столб
tile.engineersdecor.treated_wood_pole.help=§6Надёжный столб с диаметром, схожим с реле.§r\n\
Может быть полезен в качестве альтернативы электро-столбам, если требуется особая специальная длина, \
или как опора для конструкций.
tile.engineersdecor.treated_wood_pole_head.name=Прямой обработанный деревянный столб верхняя часть/основание
#tile.engineersdecor.treated_wood_pole_head.help=§6Wooden part fitting as foot or head of straight poles.
tile.engineersdecor.treated_wood_pole_support.name=Прямой обработанный деревянный столб
#tile.engineersdecor.treated_wood_pole_support.help=§6Heavy duty wooden support part fitting as foot or head of straight poles.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.treated_wood_table.name=Стол из обработанного дерева
tile.engineersdecor.treated_wood_table.help=§6Прочный деревянный стол с четырьмя ножками .§r Для использования в помещении и на улице.
tile.engineersdecor.treated_wood_stool.name=Табурет из обработанного дерева
tile.engineersdecor.treated_wood_stool.help=§6Крепкий деревянный табурет.§r Для использования в помещении и на улице.
tile.engineersdecor.treated_wood_crafting_table.name=Верстак из обработанного дерева
tile.engineersdecor.treated_wood_crafting_table.help=§6Прочный и устойчивый к погодным условиям. Восемь слотов для хранения. Хранит инвентарь.
tile.engineersdecor.iron_inset_light.name=Встраиваемый осветитель
tile.engineersdecor.iron_inset_light.help=§6Маленький источник света, интегрируемый в стены, пол или потолок.§r\n\
Полезно для освещения мест, где проблематичны электрические осветительные установки.\
Уровень света - как факел.
tile.engineersdecor.treated_wood_window.name=Обработанное деревянное окно
tile.engineersdecor.treated_wood_window.help=§6Деревянный каркас окна с тройным остеклением. Ну и шумоизоляция.
tile.engineersdecor.treated_wood_windowsill.name=Обработанный деревянный подоконник
tile.engineersdecor.treated_wood_windowsill.help=§6Простое оформление окон.
tile.engineersdecor.steel_framed_window.name=Окно со стальной рамой
#tile.engineersdecor.steel_framed_window.help=§6Steel framed tripple glazed window. Well insulating. §r Does not connect to adjacent blocks like glass panes.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.small_lab_furnace.name=Компактная лабораторная печь
tile.engineersdecor.small_lab_furnace.help=§6Лабораторная печь в металлическом корпусе.§r Подача твёрдого топлива - сверху. Немного горячее чем каменная, поэтому быстрее. Два внутренних слота для ввода, выхода и топлива.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.sign_decor.name=Sign plate (Engineer's decor logo)
#tile.engineersdecor.sign_decor.help=§6This should not be craftable or visible in JEI. Used for creative tab and screenshots.
#-----------------------------------------------------------------------------------------------------------
# EOF
#-----------------------------------------------------------------------------------------------------------

View file

@ -0,0 +1,198 @@
{
"parent": "block/cube",
"textures": {
"handles": "engineersdecor:blocks/furnace/small_lab_furnace_handles",
"particle": "engineersdecor:blocks/furnace/small_lab_furnace_handles",
"top": "engineersdecor:blocks/furnace/small_lab_furnace_top",
"bottom": "engineersdecor:blocks/furnace/small_lab_furnace_bottom",
"left": "engineersdecor:blocks/furnace/small_lab_furnace_left",
"right": "engineersdecor:blocks/furnace/small_lab_furnace_right",
"front": "engineersdecor:blocks/furnace/small_lab_furnace_front",
"back": "engineersdecor:blocks/furnace/small_lab_furnace_back",
"gloom": "engineersdecor:blocks/furnace/small_lab_furnace_front_gloom_on"
},
"elements": [
{
"from": [4, 2, 0],
"to": [12, 5, 1],
"faces": {
"north": {"uv": [4, 11, 12, 14], "texture": "#gloom"}
}
},
{
"from": [0, 1, 1],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 16, 15], "texture": "#front"},
"east": {"uv": [0, 0, 15, 15], "texture": "#left"},
"south": {"uv": [0, 0, 16, 15], "texture": "#back"},
"west": {"uv": [1, 0, 16, 15], "texture": "#right"},
"up": {"uv": [0, 1, 16, 16], "texture": "#top"},
"down": {"uv": [0, 0, 16, 15], "texture": "#bottom"}
}
},
{
"from": [1, 0, 1],
"to": [15, 1, 15],
"faces": {
"north": {"uv": [1, 15, 15, 16], "texture": "#front"},
"east": {"uv": [1, 15, 15, 16], "texture": "#left"},
"south": {"uv": [1, 15, 15, 16], "texture": "#back"},
"west": {"uv": [1, 15, 15, 16], "texture": "#right"},
"down": {"uv": [1, 1, 15, 15], "texture": "#bottom"}
}
},
{
"from": [3, 7, 0],
"to": [13, 15, 1],
"faces": {
"north": {"uv": [3, 1, 13, 9], "texture": "#front"},
"east": {"uv": [15, 1, 16, 9], "texture": "#left"},
"west": {"uv": [0, 1, 1, 9], "texture": "#right"},
"up": {"uv": [3, 0, 13, 1], "texture": "#top"},
"down": {"uv": [3, 15, 13, 16], "texture": "#bottom"}
}
},
{
"from": [3, 5, 0],
"to": [13, 6, 1],
"faces": {
"north": {"uv": [3, 10, 13, 11], "texture": "#front"},
"east": {"uv": [15, 10, 16, 11], "texture": "#left"},
"west": {"uv": [0, 10, 1, 11], "texture": "#right"},
"up": {"uv": [3, 0, 13, 1], "texture": "#top"}
}
},
{
"from": [3, 1, 0],
"to": [13, 2, 1],
"faces": {
"north": {"uv": [3, 14, 13, 15], "texture": "#front"},
"east": {"uv": [15, 14, 16, 15], "texture": "#left"},
"west": {"uv": [0, 14, 1, 15], "texture": "#right"},
"down": {"uv": [3, 15, 13, 16], "texture": "#bottom"}
}
},
{
"from": [3, 2, 0],
"to": [4, 5, 1],
"faces": {
"north": {"uv": [12, 11, 13, 14], "texture": "#front"},
"west": {"uv": [0, 11, 1, 14], "texture": "#right"},
"up": {"uv": [3, 0, 4, 1], "texture": "#top"},
"down": {"uv": [3, 15, 4, 16], "texture": "#bottom"}
}
},
{
"from": [12, 2, 0],
"to": [13, 5, 1],
"faces": {
"north": {"uv": [3, 11, 4, 14], "texture": "#front"},
"east": {"uv": [15, 11, 16, 14], "texture": "#left"},
"up": {"uv": [12, 0, 13, 1], "texture": "#top"},
"down": {"uv": [12, 15, 13, 16], "texture": "#bottom"}
}
},
{
"from": [13, 1.5, 0.25],
"to": [14, 5.5, 0.75],
"faces": {
"north": {"uv": [2, 10.5, 3, 14.5], "texture": "#handles"},
"east": {"uv": [15.25, 10.5, 15.75, 14.5], "texture": "#handles"},
"south": {"uv": [13, 10.5, 14, 14.5], "texture": "#handles"},
"up": {"uv": [13, 0.25, 14, 0.75], "rotation": 270, "texture": "#handles"},
"down": {"uv": [13, 15.25, 14, 15.75], "rotation": 90, "texture": "#handles"}
}
},
{
"from": [13, 13, 0.25],
"to": [14, 14, 0.75],
"faces": {
"north": {"uv": [2, 2, 3, 3], "texture": "#handles"},
"east": {"uv": [15.25, 2, 15.75, 3], "texture": "#handles"},
"south": {"uv": [13, 2, 14, 3], "texture": "#handles"},
"up": {"uv": [13, 0.25, 14, 0.75], "rotation": 270, "texture": "#handles"},
"down": {"uv": [13, 15.25, 14, 15.75], "rotation": 90, "texture": "#handles"}
}
},
{
"from": [2.5, 12, 0.5],
"to": [3, 14, 1],
"faces": {
"north": {"uv": [13, 2, 13.5, 4], "texture": "#handles"},
"west": {"uv": [0.5, 2, 1, 4], "texture": "#handles"},
"up": {"uv": [2.5, 0.5, 3, 1], "rotation": 270, "texture": "#handles"},
"down": {"uv": [2.5, 15, 3, 15.5], "rotation": 90, "texture": "#handles"}
}
},
{
"from": [2.5, 8, 0.5],
"to": [3, 10, 1],
"faces": {
"north": {"uv": [13, 6, 13.5, 8], "texture": "#handles"},
"west": {"uv": [0.5, 6, 1, 8], "texture": "#handles"},
"up": {"uv": [2.5, 0.5, 3, 1], "rotation": 270, "texture": "#handles"},
"down": {"uv": [2.5, 15, 3, 15.5], "rotation": 90, "texture": "#handles"}
}
},
{
"from": [2.5, 1, 0.5],
"to": [3, 2, 1],
"faces": {
"north": {"uv": [13, 14, 13.5, 15], "texture": "#handles"},
"west": {"uv": [0.5, 14, 1, 15], "texture": "#handles"},
"up": {"uv": [2.5, 0.5, 3, 1], "rotation": 270, "texture": "#handles"},
"down": {"uv": [2.5, 15, 3, 15.5], "rotation": 90, "texture": "#handles"}
}
},
{
"from": [2.5, 5, 0.5],
"to": [3, 6, 1],
"faces": {
"north": {"uv": [13, 10, 13.5, 11], "texture": "#handles"},
"west": {"uv": [0.5, 10, 1, 11], "texture": "#handles"},
"up": {"uv": [2.5, 0.5, 3, 1], "rotation": 270, "texture": "#handles"},
"down": {"uv": [2.5, 15, 3, 15.5], "rotation": 90, "texture": "#handles"}
}
},
{
"from": [13, 8, 0.25],
"to": [14, 9, 0.75],
"faces": {
"north": {"uv": [2, 7, 3, 8], "texture": "#handles"},
"east": {"uv": [15.25, 7, 15.75, 8], "texture": "#handles"},
"south": {"uv": [13, 7, 14, 8], "texture": "#handles"},
"up": {"uv": [13, 0.25, 14, 0.75], "rotation": 270, "texture": "#handles"},
"down": {"uv": [13, 15.25, 14, 15.75], "rotation": 90, "texture": "#handles"}
}
},
{
"from": [13.5, 9, 0.25],
"to": [14, 13, 0.75],
"faces": {
"north": {"uv": [2, 3, 2.5, 7], "texture": "#handles"},
"east": {"uv": [15.25, 3, 15.75, 7], "texture": "#handles"},
"south": {"uv": [13.5, 3, 14, 7], "texture": "#handles"},
"west": {"uv": [0.25, 3, 0.75, 7], "texture": "#handles"}
}
}
],
"display": {
"ground": {
"scale": [0.2, 0.2, 0.2]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [0, 1, 2, 3, 4, 5, 6, 7,
{
"name": "handles",
"children": [8, 9, 10, 11, 12, 13, 14, 15]
}
]
}

View file

@ -0,0 +1,17 @@
{
"parent": "block/cube",
"ambientocclusion": false,
"textures": {
"glass": "engineersdecor:blocks/glass/window_glass_texture"
},
"elements": [
{
"from": [1, 1, 7.5],
"to": [15, 15, 8.5],
"faces": {
"north": {"texture": "#glass"},
"south": {"texture": "#glass"}
}
}
]
}

View file

@ -0,0 +1,67 @@
{
"parent": "block/cube",
"ambientocclusion": false,
"textures": {
"frame": "engineersdecor:blocks/iestyle/steel_texture",
"particle": "engineersdecor:blocks/iestyle/steel_texture"
},
"elements": [
{
"from": [1, 0, 7.5],
"to": [15, 1, 8.5],
"faces": {
"north": {"texture": "#frame"},
"south": {"texture": "#frame"},
"up": {"texture": "#frame"},
"down": {"texture": "#frame"}
}
},
{
"from": [0, 0, 7.5],
"to": [1, 16, 8.5],
"faces": {
"north": {"texture": "#frame"},
"east": {"texture": "#frame"},
"south": {"texture": "#frame"},
"west": {"texture": "#frame"},
"up": {"texture": "#frame"},
"down": {"texture": "#frame"}
}
},
{
"from": [1, 15, 7.5],
"to": [15, 16, 8.5],
"faces": {
"north": {"texture": "#frame"},
"south": {"texture": "#frame"},
"up": {"texture": "#frame"},
"down": {"texture": "#frame"}
}
},
{
"from": [15, 0, 7.5],
"to": [16, 16, 8.5],
"faces": {
"north": {"texture": "#frame"},
"east": {"texture": "#frame"},
"south": {"texture": "#frame"},
"west": {"texture": "#frame"},
"up": {"texture": "#frame"},
"down": {"texture": "#frame"}
}
}
],
"display": {
"ground": {
"scale": [0.2, 0.2, 0.2]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.9, 0.9, 0.9],
"translation": [ 3, -8, -3]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -1,111 +0,0 @@
{
"parent": "block/cube",
"ambientocclusion": false,
"textures": {
"glass": "engineersdecor:blocks/glass/panzerglass_block_texture0",
"frame": "engineersdecor:blocks/iestyle/treated_wood_rough_texture",
"particle": "engineersdecor:blocks/iestyle/treated_wood_rough_texture"
},
"elements": [
{
"from": [1, 1, 7.25],
"to": [15, 15, 8.75],
"faces": {
"north": {"uv": [1, 1, 15, 15], "texture": "#glass"},
"south": {"uv": [1, 1, 15, 15], "texture": "#glass"}
}
},
{
"from": [0, 1, 6.5],
"to": [1, 15, 9.5],
"faces": {
"north": {"uv": [15, 1, 16, 15], "texture": "#frame"},
"east": {"uv": [6.5, 1, 9.5, 15], "texture": "#frame"},
"south": {"uv": [0, 1, 1, 15], "texture": "#frame"},
"west": {"uv": [6.5, 1, 9.5, 15], "texture": "#frame"}
}
},
{
"from": [15, 1, 6.5],
"to": [16, 15, 9.5],
"faces": {
"north": {"uv": [0, 1, 1, 15], "texture": "#frame"},
"east": {"uv": [6.5, 1, 9.5, 15], "texture": "#frame"},
"south": {"uv": [15, 1, 16, 15], "texture": "#frame"},
"west": {"uv": [6.5, 1, 9.5, 15], "texture": "#frame"}
}
},
{
"from": [1, 15, 6.5],
"to": [15, 16, 9.5],
"faces": {
"north": {"uv": [1, 0, 15, 1], "texture": "#frame"},
"south": {"uv": [1, 0, 15, 1], "texture": "#frame"},
"up": {"uv": [1, 6.5, 15, 9.5], "texture": "#frame"},
"down": {"uv": [1, 6.5, 15, 9.5], "texture": "#frame"}
}
},
{
"from": [1, 0, 6.5],
"to": [15, 1, 9.5],
"faces": {
"north": {"uv": [1, 15, 15, 16], "texture": "#frame"},
"south": {"uv": [1, 15, 15, 16], "texture": "#frame"},
"up": {"uv": [1, 6.5, 15, 9.5], "texture": "#frame"},
"down": {"uv": [1, 6.5, 15, 9.5], "texture": "#frame"}
}
},
{
"from": [0, 15, 6.5],
"to": [1, 16, 9.5],
"faces": {
"north": {"uv": [15, 0, 16, 1], "texture": "#frame"},
"south": {"uv": [0, 0, 1, 1], "texture": "#frame"},
"west": {"uv": [6.5, 0, 9.5, 1], "texture": "#frame"},
"up": {"uv": [0, 6.5, 1, 9.5], "texture": "#frame"}
}
},
{
"from": [15, 15, 6.5],
"to": [16, 16, 9.5],
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#frame"},
"east": {"uv": [6.5, 0, 9.5, 1], "texture": "#frame"},
"south": {"uv": [15, 0, 16, 1], "texture": "#frame"},
"up": {"uv": [15, 6.5, 16, 9.5], "texture": "#frame"}
}
},
{
"from": [15, 0, 6.5],
"to": [16, 1, 9.5],
"faces": {
"north": {"uv": [0, 15, 1, 16], "texture": "#frame"},
"east": {"uv": [6.5, 15, 9.5, 16], "texture": "#frame"},
"south": {"uv": [15, 15, 16, 16], "texture": "#frame"},
"down": {"uv": [15, 6.5, 16, 9.5], "texture": "#frame"}
}
},
{
"from": [0, 0, 6.5],
"to": [1, 1, 9.5],
"faces": {
"north": {"uv": [15, 15, 16, 16], "texture": "#frame"},
"south": {"uv": [0, 15, 1, 16], "texture": "#frame"},
"west": {"uv": [6.5, 15, 9.5, 16], "texture": "#frame"},
"down": {"uv": [0, 6.5, 1, 9.5], "texture": "#frame"}
}
}
],
"display": {
"ground": {
"scale": [0.2, 0.2, 0.2]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -0,0 +1,54 @@
{
"parent": "block/cube",
"ambientocclusion": false,
"textures": {
"frame": "engineersdecor:blocks/iestyle/treated_wood_rough_texture",
"particle": "engineersdecor:blocks/iestyle/treated_wood_rough_texture"
},
"elements": [
{
"from": [1, 0, 6.5],
"to": [15, 1, 9.5],
"faces": {
"north": {"texture": "#frame"},
"south": {"texture": "#frame"},
"up": {"texture": "#frame"},
"down": {"texture": "#frame"}
}
},
{
"from": [0, 0, 6.5],
"to": [1, 16, 9.5],
"faces": {
"north": {"texture": "#frame"},
"east": {"texture": "#frame"},
"south": {"texture": "#frame"},
"west": {"texture": "#frame"},
"up": {"texture": "#frame"},
"down": {"texture": "#frame"}
}
},
{
"from": [1, 15, 6.5],
"to": [15, 16, 9.5],
"faces": {
"north": {"texture": "#frame"},
"south": {"texture": "#frame"},
"up": {"texture": "#frame"},
"down": {"texture": "#frame"}
}
},
{
"from": [15, 0, 6.5],
"to": [16, 16, 9.5],
"faces": {
"north": {"texture": "#frame"},
"east": {"texture": "#frame"},
"south": {"texture": "#frame"},
"west": {"texture": "#frame"},
"up": {"texture": "#frame"},
"down": {"texture": "#frame"}
}
}
]
}

View file

@ -0,0 +1,115 @@
{
"parent": "block/cube",
"textures": {
"side": "engineersdecor:blocks/pole/treated_wood_pole_side_texture",
"particle": "engineersdecor:blocks/pole/treated_wood_pole_side_texture",
"top": "engineersdecor:blocks/pole/treated_wood_pole_top_texture",
"topsurf": "engineersdecor:blocks/pole/treated_wood_pole_support_top_texture",
"edges": "engineersdecor:blocks/pole/treated_wood_pole_support_edges_texture"
},
"elements": [
{
"from": [5.75, 5.5, 0],
"to": [10.25, 10.5, 14],
"faces": {
"north": {"uv": [5.75, 5.5, 10.25, 10.5], "texture": "#top"},
"east": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"},
"south": {"uv": [5.75, 5.5, 10.25, 10.5], "texture": "#top"},
"west": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [5.75, 0, 10.25, 16], "texture": "#side"},
"down": {"uv": [5.75, 0, 10.25, 16], "texture": "#side"}
}
},
{
"from": [10.25, 5.75, 0],
"to": [10.5, 10.25, 14],
"faces": {
"north": {"uv": [10.75, 5.25, 11, 10.75], "texture": "#top", "cullface": "north"},
"east": {"uv": [5.25, 0, 10.75, 16], "rotation": 90, "texture": "#side"},
"south": {"uv": [10.25, 5.75, 10.5, 10.25], "texture": "#top", "cullface": "south"},
"up": {"uv": [5, 0, 5.25, 16], "texture": "#side"},
"down": {"uv": [10.75, 0, 11, 16], "rotation": 180, "texture": "#side"}
}
},
{
"from": [5.5, 5.75, 0],
"to": [5.75, 10.25, 14],
"faces": {
"north": {"uv": [5, 5.25, 5.25, 10.75], "texture": "#top", "cullface": "north"},
"south": {"uv": [5.5, 5.75, 5.75, 10.25], "texture": "#top", "cullface": "south"},
"west": {"uv": [5.25, 0, 10.75, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [10.75, 0, 11, 16], "texture": "#side"},
"down": {"uv": [5, 0, 5.25, 16], "rotation": 180, "texture": "#side"}
}
},
{
"from": [3, 3, 14],
"to": [13, 13, 16],
"faces": {
"north": {"uv": [3, 3, 13, 13], "texture": "#topsurf"},
"east": {"uv": [0, 3, 2, 13], "texture": "#edges"},
"south": {"uv": [3, 3, 13, 13], "texture": "#topsurf"},
"west": {"uv": [14, 3, 16, 13], "texture": "#edges"},
"up": {"uv": [3, 14, 13, 16], "texture": "#edges"},
"down": {"uv": [3, 0, 13, 2], "texture": "#edges"}
}
},
{
"from": [6.5, 7.18717, 7.04539],
"to": [9.5, 9.18717, 13.54539],
"rotation": {"angle": 45, "axis": "x", "origin": [8, 4.68717, 9.04539]},
"faces": {
"east": {"uv": [0, 10.5, 11.5, 13.5], "texture": "#edges"},
"west": {"uv": [4.5, 10.5, 16, 13.5], "rotation": 180, "texture": "#edges"},
"up": {"uv": [5, 0, 11, 16], "rotation": 180, "texture": "#side"},
"down": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#side"}
}
},
{
"from": [6.5, 6.81283, 7.04539],
"to": [9.5, 8.81283, 13.54539],
"rotation": {"angle": -45, "axis": "x", "origin": [8, 11.31283, 9.04539]},
"faces": {
"north": {"uv": [14, 1, 16, 15], "rotation": 90, "texture": "#edges"},
"east": {"uv": [1, 3, 13.5, 6], "texture": "#edges"},
"west": {"uv": [4.5, 2.5, 16, 5.5], "rotation": 180, "texture": "#edges"},
"up": {"uv": [6, 0, 10, 16], "texture": "#side"},
"down": {"uv": [5, 0, 11, 16], "texture": "#side"}
}
},
{
"from": [6.81283, 6.5, 7.04539],
"to": [8.81283, 9.5, 13.54539],
"rotation": {"angle": 45, "axis": "y", "origin": [11.31283, 8, 9.04539]},
"faces": {
"east": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"},
"west": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [10.5, 4.5, 13.5, 16], "texture": "#edges"},
"down": {"uv": [10.5, 0, 13.5, 11.5], "rotation": 180, "texture": "#edges"}
}
},
{
"from": [7.18717, 6.5, 7.04539],
"to": [9.18717, 9.5, 13.54539],
"rotation": {"angle": -45, "axis": "y", "origin": [4.68717, 8, 9.04539]},
"faces": {
"east": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"},
"west": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [2.5, 4.5, 5.5, 16], "rotation": 180, "texture": "#edges"},
"down": {"uv": [2.5, 0, 5.5, 11.5], "rotation": 180, "texture": "#edges"}
}
}
],
"display": {
"ground": {
"scale": [0.2, 0.2, 0.2]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -1,5 +1,4 @@
{
"credit": "I made this with the Blockbench",
"parent": "block/cube",
"textures": {
"side": "engineersdecor:blocks/pole/treated_wood_pole_side_texture",
@ -8,33 +7,15 @@
},
"elements": [
{
"from": [5.75, 5.75, 0],
"to": [10.25, 10.25, 16],
"faces": {
"north": {"uv": [5.25, 5.25, 10.75, 10.75], "texture": "#top", "cullface": "north"},
"south": {"uv": [5.25, 5.25, 10.75, 10.75], "texture": "#top", "cullface": "south"}
}
},
{
"from": [5.75, 10.25, 0],
"from": [5.75, 5.5, 0],
"to": [10.25, 10.5, 16],
"faces": {
"north": {"uv": [5.25, 10.75, 10.75, 11], "texture": "#top", "cullface": "north"},
"east": {"uv": [10.75, 0, 11, 16], "rotation": 90, "texture": "#side"},
"south": {"uv": [5.25, 5, 10.75, 5.25], "texture": "#top", "cullface": "south"},
"west": {"uv": [5, 0, 5.25, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [5.25, 0, 10.75, 16], "texture": "#side"}
}
},
{
"from": [5.75, 5.5, 0],
"to": [10.25, 5.75, 16],
"faces": {
"north": {"uv": [5.25, 5, 10.75, 5.25], "texture": "#top", "cullface": "north"},
"east": {"uv": [5, 0, 5.25, 16], "rotation": 90, "texture": "#side"},
"south": {"uv": [5.25, 10.75, 10.75, 11], "texture": "#top", "cullface": "south"},
"west": {"uv": [10.75, 0, 11, 16], "rotation": 90, "texture": "#side"},
"down": {"uv": [5.25, 0, 10.75, 16], "rotation": 180, "texture": "#side"}
"north": {"uv": [5.75, 5.5, 10.25, 10.5], "texture": "#top"},
"east": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"},
"south": {"uv": [5.75, 5.5, 10.25, 10.5], "texture": "#top"},
"west": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [5.75, 0, 10.25, 16], "texture": "#side"},
"down": {"uv": [5.75, 0, 10.25, 16], "texture": "#side"}
}
},
{
@ -43,7 +24,7 @@
"faces": {
"north": {"uv": [10.75, 5.25, 11, 10.75], "texture": "#top", "cullface": "north"},
"east": {"uv": [5.25, 0, 10.75, 16], "rotation": 90, "texture": "#side"},
"south": {"uv": [10.75, 5.25, 11, 10.75], "texture": "#top", "cullface": "south"},
"south": {"uv": [10, 5.25, 10.25, 10.75], "texture": "#top", "cullface": "south"},
"up": {"uv": [5, 0, 5.25, 16], "texture": "#side"},
"down": {"uv": [10.75, 0, 11, 16], "rotation": 180, "texture": "#side"}
}
@ -53,7 +34,7 @@
"to": [5.75, 10.25, 16],
"faces": {
"north": {"uv": [5, 5.25, 5.25, 10.75], "texture": "#top", "cullface": "north"},
"south": {"uv": [5, 5.25, 5.25, 10.75], "texture": "#top", "cullface": "south"},
"south": {"uv": [5.5, 6, 5.75, 10.5], "texture": "#top", "cullface": "south"},
"west": {"uv": [5.25, 0, 10.75, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [10.75, 0, 11, 16], "texture": "#side"},
"down": {"uv": [5, 0, 5.25, 16], "rotation": 180, "texture": "#side"}

View file

@ -0,0 +1,139 @@
{
"parent": "block/cube",
"textures": {
"side": "engineersdecor:blocks/pole/treated_wood_pole_side_texture",
"particle": "engineersdecor:blocks/pole/treated_wood_pole_side_texture",
"top": "engineersdecor:blocks/pole/treated_wood_pole_top_texture",
"topsurf": "engineersdecor:blocks/pole/treated_wood_pole_support_top_texture",
"edges": "engineersdecor:blocks/pole/treated_wood_pole_support_edges_texture"
},
"elements": [
{
"from": [5.75, 5.5, 0],
"to": [10.25, 10.5, 14],
"faces": {
"north": {"uv": [5.75, 5.5, 10.25, 10.5], "texture": "#top"},
"east": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"},
"south": {"uv": [5.75, 5.5, 10.25, 10.5], "texture": "#top"},
"west": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [5.75, 0, 10.25, 16], "texture": "#side"},
"down": {"uv": [5.75, 0, 10.25, 16], "texture": "#side"}
}
},
{
"from": [10.25, 5.75, 0],
"to": [10.5, 10.25, 14],
"faces": {
"north": {"uv": [10.75, 5.25, 11, 10.75], "texture": "#top", "cullface": "north"},
"east": {"uv": [5.25, 0, 10.75, 16], "rotation": 90, "texture": "#side"},
"south": {"uv": [10.25, 5.75, 10.5, 10.25], "texture": "#top", "cullface": "south"},
"up": {"uv": [5, 0, 5.25, 16], "texture": "#side"},
"down": {"uv": [10.75, 0, 11, 16], "rotation": 180, "texture": "#side"}
}
},
{
"from": [5.5, 5.75, 0],
"to": [5.75, 10.25, 14],
"faces": {
"north": {"uv": [5, 5.25, 5.25, 10.75], "texture": "#top", "cullface": "north"},
"south": {"uv": [5.5, 5.75, 5.75, 10.25], "texture": "#top", "cullface": "south"},
"west": {"uv": [5.25, 0, 10.75, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [10.75, 0, 11, 16], "texture": "#side"},
"down": {"uv": [5, 0, 5.25, 16], "rotation": 180, "texture": "#side"}
}
},
{
"from": [5.75, 1, 14],
"to": [10.25, 15, 16],
"faces": {
"north": {"uv": [5.75, 1, 10.25, 15], "texture": "#topsurf"},
"east": {"uv": [0, 1, 2, 15], "texture": "#edges"},
"south": {"uv": [5.75, 1, 10.25, 15], "texture": "#topsurf"},
"west": {"uv": [14, 1, 16, 15], "texture": "#edges"},
"up": {"uv": [5.75, 14, 10.25, 16], "texture": "#edges"},
"down": {"uv": [5.75, 0, 10.25, 2], "texture": "#edges"}
}
},
{
"from": [6, 2.5, 4.5],
"to": [10, 5.5, 16.5],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 11.5]},
"faces": {
"east": {"uv": [0, 10.5, 11.5, 13.5], "texture": "#edges"},
"west": {"uv": [4.5, 10.5, 16, 13.5], "rotation": 180, "texture": "#edges"},
"up": {"uv": [5, 0, 11, 16], "rotation": 180, "texture": "#side"},
"down": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#side"}
}
},
{
"from": [6, 10.5, 4.5],
"to": [10, 13.5, 16.5],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 8, 11.5]},
"faces": {
"north": {"uv": [14, 1, 16, 15], "rotation": 90, "texture": "#edges"},
"east": {"uv": [1, 3, 13.5, 6], "texture": "#edges"},
"west": {"uv": [4.5, 2.5, 16, 5.5], "rotation": 180, "texture": "#edges"},
"up": {"uv": [6, 0, 10, 16], "texture": "#side"},
"down": {"uv": [5, 0, 11, 16], "texture": "#side"}
}
},
{
"from": [10.5, 6, 4.5],
"to": [13.5, 10, 16.5],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 8, 11.5]},
"faces": {
"east": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"},
"west": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [10.5, 4.5, 13.5, 16], "texture": "#edges"},
"down": {"uv": [10.5, 0, 13.5, 11.5], "rotation": 180, "texture": "#edges"}
}
},
{
"from": [2.5, 6, 4.5],
"to": [5.5, 10, 16.5],
"rotation": {"angle": -22.5, "axis": "y", "origin": [8, 8, 11.5]},
"faces": {
"east": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"},
"west": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"},
"up": {"uv": [2.5, 4.5, 5.5, 16], "rotation": 180, "texture": "#edges"},
"down": {"uv": [2.5, 0, 5.5, 11.5], "rotation": 180, "texture": "#edges"}
}
},
{
"from": [10, 5.75, 14],
"to": [15, 10.25, 16],
"faces": {
"north": {"uv": [1, 5.75, 6, 10.25], "texture": "#topsurf"},
"east": {"uv": [0, 5.75, 2, 10.25], "texture": "#edges"},
"south": {"uv": [10, 5.75, 15, 10.25], "texture": "#topsurf"},
"west": {"uv": [14, 5.75, 16, 10.25], "texture": "#edges"},
"up": {"uv": [10, 14, 15, 16], "texture": "#edges"},
"down": {"uv": [10, 0, 15, 2], "texture": "#edges"}
}
},
{
"from": [1, 5.75, 14],
"to": [6, 10.25, 16],
"faces": {
"north": {"uv": [10, 5.75, 15, 10.25], "texture": "#topsurf"},
"east": {"uv": [0, 5.75, 2, 10.25], "texture": "#edges"},
"south": {"uv": [1, 5.75, 6, 10.25], "texture": "#topsurf"},
"west": {"uv": [14, 5.75, 16, 10.25], "texture": "#edges"},
"up": {"uv": [1, 14, 6, 16], "texture": "#edges"},
"down": {"uv": [1, 0, 6, 2], "texture": "#edges"}
}
}
],
"display": {
"ground": {
"scale": [0.2, 0.2, 0.2]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -0,0 +1,36 @@
{
"parent": "block/cube",
"textures": {
"s": "engineersdecor:blocks/iestyle/treated_wood_rough_texture",
"f": "engineersdecor:blocks/sign/engineersdecor-logo",
"particle": "engineersdecor:blocks/iestyle/treated_wood_rough_texture"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 16, 0.5],
"faces": {
"north": {"texture": "#s"},
"east": {"texture": "#s"},
"south": {"texture": "#f"},
"west": {"texture": "#s"},
"up": {"texture": "#s"},
"down": {"texture": "#s"}
}
}
],
"display": {
"ground": {
"translation": [0, 0, 7],
"scale": [0.7, 0.7, 0.7]
},
"gui": {
"rotation": [0, 0, 0],
"translation": [0, 0.5, 0]
},
"fixed": {
"rotation": [0, 180, 0],
"translation": [0, 0, -7.3]
}
}
}

View file

@ -1,163 +0,0 @@
{
"ambientocclusion": false,
"textures": {
"side": "engineersdecor:blocks/iestyle/ironsheet_roof",
"particle": "engineersdecor:blocks/iestyle/ironsheet_roof",
"top": "engineersdecor:blocks/iestyle/ironsheet_roof_top"
},
"elements": [
{
"from": [6, 0, 0],
"to": [8, 8, 8],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"west": {"texture": "#top"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [14, 0, 0],
"to": [16, 16, 16],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top", "cullface": "up"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [0, 0, 14],
"to": [14, 16, 16],
"faces": {
"north": {"texture": "#top"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#side", "cullface": "west"},
"up": {"rotation": 270, "texture": "#top", "cullface": "up"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [10, 0, 0],
"to": [12, 12, 12],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"west": {"texture": "#top"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [0, 0, 10],
"to": [10, 12, 12],
"faces": {
"north": {"texture": "#top"},
"west": {"texture": "#side", "cullface": "west"},
"up": {"rotation": 90, "texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [0, 0, 6],
"to": [6, 8, 8],
"faces": {
"north": {"texture": "#top"},
"west": {"texture": "#side", "cullface": "west"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [0, 0, 0],
"to": [2, 2, 2],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"west": {"texture": "#side", "cullface": "west"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [12, 0, 0],
"to": [14, 14, 14],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"west": {"texture": "#top"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [0, 0, 12],
"to": [12, 14, 14],
"faces": {
"north": {"texture": "#top"},
"west": {"texture": "#side", "cullface": "west"},
"up": {"rotation": 270, "texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [8, 0, 0],
"to": [10, 10, 10],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"west": {"texture": "#top"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [0, 0, 8],
"to": [8, 10, 10],
"faces": {
"north": {"texture": "#top"},
"west": {"texture": "#side", "cullface": "west"},
"up": {"rotation": 90, "texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [4, 0, 0],
"to": [6, 6, 4],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"west": {"texture": "#top"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [0, 0, 4],
"to": [6, 6, 6],
"faces": {
"north": {"texture": "#side"},
"west": {"texture": "#side", "cullface": "west"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [0, 0, 2],
"to": [4, 4, 4],
"faces": {
"north": {"texture": "#top"},
"west": {"texture": "#side", "cullface": "west"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [2, 0, 0],
"to": [4, 4, 2],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"west": {"texture": "#top"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
}
]
}

View file

@ -1,99 +0,0 @@
{
"ambientocclusion": false,
"textures": {
"particle": "engineersdecor:blocks/iestyle/ironsheet_roof",
"side": "engineersdecor:blocks/iestyle/ironsheet_roof",
"top": "engineersdecor:blocks/iestyle/ironsheet_roof_top"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 2, 16],
"faces": {
"north": {"texture": "#top", "cullface": "north"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top", "cullface": "west"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [2, 2, 2],
"to": [16, 4, 16],
"faces": {
"north": {"texture": "#top"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [4, 4, 4],
"to": [16, 6, 16],
"faces": {
"north": {"texture": "#top"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [6, 6, 6],
"to": [16, 8, 16],
"faces": {
"north": {"texture": "#top"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [8, 8, 8],
"to": [16, 10, 16],
"faces": {
"north": {"texture": "#top"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [10, 10, 10],
"to": [16, 12, 16],
"faces": {
"north": {"texture": "#top"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [12, 12, 12],
"to": [16, 14, 16],
"faces": {
"north": {"texture": "#top"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [14, 14, 14],
"to": [16, 16, 16],
"faces": {
"north": {"texture": "#top"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
}
]
}

View file

@ -1,114 +0,0 @@
{
"ambientocclusion": false,
"parent": "block/block",
"textures": {
"side": "engineersdecor:blocks/iestyle/ironsheet_roof",
"particle": "engineersdecor:blocks/iestyle/ironsheet_roof",
"top": "engineersdecor:blocks/iestyle/ironsheet_roof_top"
},
"elements": [
{
"from": [2, 2, 0],
"to": [16, 4, 16],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [14, 14, 0],
"to": [16, 16, 16],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top", "cullface": "up"}
}
},
{
"from": [0, 0, 0],
"to": [16, 2, 16],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top", "cullface": "west"},
"up": {"texture": "#top"},
"down": {"texture": "#side", "cullface": "down"}
}
},
{
"from": [4, 4, 0],
"to": [16, 6, 16],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [6, 6, 0],
"to": [16, 8, 16],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [12, 12, 0],
"to": [16, 14, 16],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [10, 10, 0],
"to": [16, 12, 16],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
},
{
"from": [8, 8, 0],
"to": [16, 10, 16],
"faces": {
"north": {"texture": "#side", "cullface": "north"},
"east": {"texture": "#side", "cullface": "east"},
"south": {"texture": "#side", "cullface": "south"},
"west": {"texture": "#top"},
"up": {"texture": "#top"}
}
}
],
"display": {
"thirdperson_lefthand": {
"rotation": [75, -135, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"gui": {
"rotation": [30, 135, 0],
"scale": [0.625, 0.625, 0.625]
},
"head": {
"rotation": [0, -90, 0]
}
}
}

View file

@ -1,220 +1,138 @@
[
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "itemSlag"
},
"ingredient": { "type": "forge:ore_dict", "ore": "itemSlag" },
"name": "itemSlag"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "plankTreatedWood"
},
"ingredient": { "type": "forge:ore_dict", "ore": "plankTreatedWood" },
"name": "plankTreatedWood"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "slabTreatedWood"
},
"ingredient": { "type": "forge:ore_dict", "ore": "slabTreatedWood" },
"name": "slabTreatedWood"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "stickTreatedWood"
},
"ingredient": { "type": "forge:ore_dict", "ore": "stickTreatedWood" },
"name": "stickTreatedWood"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "plateIron"
"ingredient": { "type": "forge:ore_dict", "ore": "ingotIron" },
"name": "ingotIron"
},
{
"ingredient": { "type": "forge:ore_dict", "ore": "plateIron" },
"name": "plateIron"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "plateSteel"
},
"ingredient": { "type": "forge:ore_dict", "ore": "plateSteel" },
"name": "plateSteel"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "plateAluminium"
},
"ingredient": { "type": "forge:ore_dict", "ore": "plateAluminium" },
"name": "plateAluminium"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "stickSteel"
},
"ingredient": { "type": "forge:ore_dict", "ore": "stickSteel" },
"name": "stickSteel"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "stickIron"
},
"ingredient": { "type": "forge:ore_dict", "ore": "stickIron" },
"name": "stickIron"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "stickAluminium"
},
"ingredient": { "type": "forge:ore_dict", "ore": "stickAluminium" },
"name": "stickAluminium"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "plankWood"
},
"ingredient": { "type": "forge:ore_dict", "ore": "plankWood" },
"name": "plankWood"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "stickWood"
},
"ingredient": { "type": "forge:ore_dict", "ore": "stickWood" },
"name": "stickWood"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "sand"
"ingredient": { "type": "forge:ore_dict", "ore": "slabSheetmetalIron" },
"name": "slabSheetmetalIron"
},
{
"ingredient": { "type": "forge:ore_dict", "ore": "slabSheetmetalSteel" },
"name": "slabSheetmetalSteel"
},
{
"ingredient": { "type": "forge:ore_dict", "ore": "slabSheetmetalAluminium" },
"name": "slabSheetmetalAluminium"
},
{
"ingredient": { "type": "forge:ore_dict", "ore": "sand" },
"name": "sand"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "sandstone"
},
"ingredient": { "type": "forge:ore_dict", "ore": "sandstone" },
"name": "sandstone"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "bricksStone"
},
"ingredient": { "type": "forge:ore_dict", "ore": "bricksStone" },
"name": "bricksStone"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "ingotBrick"
},
"ingredient": { "type": "forge:ore_dict", "ore": "ingotBrick" },
"name": "ingotBrick"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "ingotBrickNether"
},
"ingredient": { "type": "forge:ore_dict", "ore": "ingotBrickNether" },
"name": "ingotBrickNether"
},
{
"ingredient": [
{
"type": "forge:ore_dict",
"ore": "plateIron"
},
{
"type": "forge:ore_dict",
"ore": "plateSteel"
},
{
"type": "forge:ore_dict",
"ore": "plateCopper"
},
{
"type": "forge:ore_dict",
"ore": "plateAluminium"
},
{
"type": "forge:ore_dict",
"ore": "plateNickel"
},
{
"type": "forge:ore_dict",
"ore": "plateLead"
}
{ "type": "forge:ore_dict", "ore": "plateIron" },
{ "type": "forge:ore_dict", "ore": "plateSteel" },
{ "type": "forge:ore_dict", "ore": "plateCopper" },
{ "type": "forge:ore_dict", "ore": "plateAluminium" },
{ "type": "forge:ore_dict", "ore": "plateNickel" },
{ "type": "forge:ore_dict", "ore": "plateLead" }
],
"name": "plateAnyMetal"
},
{
"ingredient": [
{
"type": "forge:ore_dict",
"ore": "ingotBrick"
},
{
"type": "forge:ore_dict",
"ore": "ingotBrickNether"
}
{ "type": "forge:ore_dict", "ore": "ingotBrick" },
{ "type": "forge:ore_dict", "ore": "ingotBrickNether" }
],
"name": "ingotAnyBrick"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "dustGlowstone"
},
"ingredient": { "type": "forge:ore_dict", "ore": "dustGlowstone" },
"name": "luminescentDust"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "glowstone"
},
"ingredient": { "type": "forge:ore_dict", "ore": "glowstone" },
"name": "luminescentBlock"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "paneGlass"
},
"ingredient": { "type": "forge:ore_dict", "ore": "paneGlass" },
"name": "paneGlass"
},
{
"ingredient": {
"type": "forge:ore_dict",
"ore": "blockGlass"
},
"ingredient": { "type": "forge:ore_dict", "ore": "blockGlass" },
"name": "blockGlass"
},
{
"ingredient": {
"item": "minecraft:diamond",
"data": 0
},
"ingredient": { "item": "minecraft:diamond", "data": 0 },
"name": "itemDiamond"
},
{
"ingredient": {
"item": "minecraft:crafting_table",
"data": 0
},
"ingredient": { "item": "minecraft:crafting_table", "data": 0 },
"name": "itemCraftingTable"
},
{
"ingredient": [
{
"type": "forge:ore_dict",
"ore": "stickIron"
"ingredient": { "item": "minecraft:hopper", "data": 0 },
"name": "anyHopper"
},
{
"type": "forge:ore_dict",
"ore": "stickSteel"
}
"ingredient": [
{ "type": "forge:ore_dict", "ore": "stickIron" },
{ "type": "forge:ore_dict", "ore": "stickSteel" }
],
"name": "stickFerroMetal"
},
@ -222,21 +140,35 @@
"conditions": [
{ "type": "minecraft:item_exists", "item": "immersiveengineering:stone_decoration" }
],
"ingredient": {
"item": "immersiveengineering:stone_decoration",
"data": 5
},
"ingredient": { "item": "immersiveengineering:stone_decoration", "data": 5 },
"name": "blockConcreteIe"
},
{
"conditions": [
{ "type": "minecraft:item_exists", "item": "immersiveengineering:wooden_device0" }
],
"ingredient": {
"item": "immersiveengineering:wooden_device0",
"data": 0
},
"ingredient": { "item": "immersiveengineering:wooden_device0", "data": 0 },
"name": "crateTreatedWood"
},
{
"conditions": [
{ "type": "engineersdecor:grc", "missing": ["immersiveengineering:stone_decoration"] }
],
"ingredient": [
{ "item": "minecraft:concrete", "data": 32767 },
{ "item": "minecraft:concrete_powder", "data": 32767 }
],
"name": "blockConcreteMc"
},
{
"ingredient": [
{ "item": "minecraft:chest" },
{ "type": "forge:ore_dict", "ore": "chestWood" }
],
"name": "itemAnyChest"
},
{
"ingredient": { "item": "minecraft:furnace", "data": 0 },
"name": "itemFurnace"
}
]

View file

@ -0,0 +1,29 @@
{
"conditions": [
{
"type": "engineersdecor:grc",
"result": "engineersdecor:rebar_concrete",
"missing": ["immersiveengineering:stone_decoration"]
}
],
"type": "minecraft:crafting_shaped",
"pattern": [
"SCS",
"CSC",
"SCS"
],
"key": {
"C": {
"item": "#blockConcreteMc",
"data": 0
},
"S": {
"item": "#ingotIron",
"data": 0
}
},
"result": {
"item": "engineersdecor:rebar_concrete",
"count": 4
}
}

View file

@ -0,0 +1,33 @@
{
"conditions": [
{
"type": "engineersdecor:grc",
"result": "engineersdecor:small_lab_furnace",
"required": ["immersiveengineering:material"]
}
],
"type": "minecraft:crafting_shaped",
"pattern": [
"HPP",
"PFP",
"PPP"
],
"key": {
"F": {
"item": "#itemFurnace",
"data": 0
},
"P": {
"item": "#plateIron",
"data": 0
},
"H": {
"item": "#anyHopper",
"data": 0
}
},
"result": {
"item": "engineersdecor:small_lab_furnace",
"count": 1
}
}

View file

@ -0,0 +1,33 @@
{
"conditions": [
{
"type": "engineersdecor:grc",
"result": "engineersdecor:small_lab_furnace",
"missing": ["immersiveengineering:material"]
}
],
"type": "minecraft:crafting_shaped",
"pattern": [
"HPP",
"PFP",
"PPP"
],
"key": {
"F": {
"item": "#itemFurnace",
"data": 0
},
"P": {
"item": "#ingotIron",
"data": 0
},
"H": {
"item": "#anyHopper",
"data": 0
}
},
"result": {
"item": "engineersdecor:small_lab_furnace",
"count": 1
}
}

View file

@ -0,0 +1,29 @@
{
"conditions": [
{
"type": "engineersdecor:grc",
"result": "engineersdecor:steel_framed_window",
"required": ["immersiveengineering:material"]
}
],
"type": "minecraft:crafting_shaped",
"pattern": [
"WGW",
"GGG",
"WGW"
],
"key": {
"W": {
"item": "#slabSheetmetalSteel",
"data": 0
},
"G": {
"item": "#paneGlass",
"data": 0
}
},
"result": {
"item": "engineersdecor:steel_framed_window",
"count": 9
}
}

View file

@ -0,0 +1,32 @@
{
"conditions": [
{
"type": "engineersdecor:grc",
"result": "engineersdecor:treated_wood_crafting_table",
"missing": ["immersiveengineering:material"]
}
],
"type": "minecraft:crafting_shaped",
"pattern": [
"PP",
"SC"
],
"key": {
"P": {
"item": "#plankWood",
"data": 0
},
"C": {
"item": "#itemCraftingTable",
"data": 0
},
"S": {
"item": "#itemAnyChest",
"data": 0
}
},
"result": {
"item": "engineersdecor:treated_wood_crafting_table",
"count": 1
}
}

View file

@ -0,0 +1,17 @@
{
"conditions": [
{
"type": "engineersdecor:grc",
"result": "engineersdecor:treated_wood_pole_head"
}
],
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "engineersdecor:treated_wood_pole"
}
],
"result": {
"item": "engineersdecor:treated_wood_pole_head"
}
}

View file

@ -0,0 +1,17 @@
{
"conditions": [
{
"type": "engineersdecor:grc",
"result": "engineersdecor:treated_wood_pole_support"
}
],
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "engineersdecor:treated_wood_pole_head"
}
],
"result": {
"item": "engineersdecor:treated_wood_pole_support"
}
}

View file

@ -0,0 +1,17 @@
{
"conditions": [
{
"type": "engineersdecor:grc",
"result": "engineersdecor:treated_wood_pole"
}
],
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "engineersdecor:treated_wood_pole_support"
}
],
"result": {
"item": "engineersdecor:treated_wood_pole"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

View file

@ -0,0 +1 @@
{ "animation":{ "frames": [0,1,2,3,4,5,6,7], "frametime":8, "interpolate":true }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 471 B

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

View file

@ -225,9 +225,9 @@ tasks["version-check"] = function() {
})
const combined_version = version_minecraft + "-" + version_engineersdecor;
var readme_version_found = fs.readfile("readme.md", function(line){
var m = line.match(/^[\s]+-[\s]+v([\d]+[\.][\d]+[\.][\d]+[-][abrc][\d]+)/i);
var m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+[-][abrc][\d]+)/i);
if((!m) || (!m.length) || (m.length < 2)) {
m = line.match(/^[\s]+-[\s]+v([\d]+[\.][\d]+[\.][\d]+)/i);
m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+)/i);
if((!m) || (!m.length) || (m.length < 2)) return false;
}
return m[1]==version_engineersdecor;

1
1.13/.gitignore vendored
View file

@ -33,3 +33,4 @@ desktop.ini
.DS_Store
Thumbs.db
forge*changelog.txt
/*.txt

View file

@ -1,10 +1,15 @@
{
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
"1.13.2": {
"1.0.2-b3": "[A] Added treated wood window.\n[A] Added treated wood pole support.\n[A] Added treated wood pole head.\n[A] Added steel framed window.",
"1.0.2-b2": "[A] Added wall decomposition recipes.\n[A] Added slag brick wall.\n[M] Climbing/descending mod ladders is faster when looking up or down and not sneaking.\n[M] Panzer glass material definition changed.",
"1.0.2-b1": "[A] Added Treated wood crafting table.\n[A] Added decomposition recipes for stairs and tiles.\n[N] Note: All v1.0.2-b1-mc1.12.2 blocks are ported to 1.13.2 (alpha -^ beta version).\n[N] Note: Until IE is out for 1.13.2, the recipes are temporary with vanilla items.",
"1.0.0-a3": "[A] Added iron inset light.\n[A] Added rebar concrete tile.\n[A] Added rebar concrete tile stairs.\n[A] Added clinker brick wall.\n[A] Added treated wood stool.\n[A] Added treated window sill.",
"1.0.0-a2": "[A] Added panzer glass.",
"1.0.0-a1": "[A] Initial port to 1.13.2 with Forge beta."
},
"promos": {
"1.13.2-recommended": "",
"1.13.2-latest": "1.0.0-a1"
"1.13.2-latest": "1.0.2-b3"
}
}

View file

@ -10,6 +10,35 @@ Mod sources for Minecraft version 1.13.2.
----
## Revision history
~ v1.0.2-b4 [A]
- v1.0.2-b3 [A] Added treated wood window.
[A] Added treated wood pole support.
[A] Added treated wood pole head.
[A] Added steel framed window.
- v1.0.2-b2 [A] Added wall decomposition recipes.
[A] Added slag brick wall.
[M] Climbing/descending mod ladders is faster when
looking up or down and not sneaking.
[M] Panzer glass material definition changed.
- v1.0.2-b1 [A] Added Treated wood crafting table.
[A] Added decomposition recipes for stairs and tiles.
[N] Note: All v1.0.2-b1-mc1.12.2 blocks are
ported to 1.13.2 (alpha -^ beta version).
[N] Note: Until IE is out for 1.13.2, the
recipes are temporary with vanilla items.
- v1.0.0-a3 [A] Added iron inset light.
[A] Added rebar concrete tile.
[A] Added rebar concrete tile stairs.
[A] Added clinker brick wall.
[A] Added treated wood stool.
[A] Added treated window sill.
- v1.0.0-a2 [A] Added panzer glass.
- v1.0.0-a1 [A] Initial port to 1.13.2 with Forge beta.
----

View file

@ -26,9 +26,9 @@ tasks["dist-check"] = function() {
if(git_remote.replace(/[\s]/g,"").indexOf("git@github.com:stfwi/engineers-decor.git(push)") < 0) fails.push("Not the reference repository.");
if((git_branch != "develop") && (git_branch != "master")) {
fails.push("No valid branch for dist. (branch:'"+git_branch+"')");
} else if((git_branch == "develop") && (version_engineersdecor.replace(/[^\w\.-]/g,"")=="")) {
} else if((git_branch == "develop") && (version_engineersdecor.replace(/[^ab]/g,"")=="")) {
fails.push("Cannot make release dist on develop branch.");
} else if((git_branch == "master") && (version_engineersdecor.replace(/[^\w\.-]/g,"")!="")) {
} else if((git_branch == "master") && (version_engineersdecor.replace(/[^ab]/g,"")!="")) {
fails.push("Cannot make beta dist on master branch.");
}
if(git_diff !== "") fails.push("Not everything committed to the GIT repository.");
@ -109,9 +109,9 @@ tasks["version-check"] = function() {
})
const combined_version = version_minecraft + "-" + version_engineersdecor;
var readme_version_found = fs.readfile("readme.md", function(line){
var m = line.match(/^[\s]+-[\s]+v([\d]+[\.][\d]+[\.][\d]+[-][abrc][\d]+)/i);
var m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+[-][abrc][\d]+)/i);
if((!m) || (!m.length) || (m.length < 2)) {
m = line.match(/^[\s]+-[\s]+v([\d]+[\.][\d]+[\.][\d]+)/i);
m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+)/i);
if((!m) || (!m.length) || (m.length < 2)) return false;
}
return m[1]==version_engineersdecor;
@ -189,7 +189,7 @@ tasks["update-json"] = function() {
// Condense log entries sepatated with newlines to one line for each version
for(var i=readme.length-1; i>0; --i) {
var line = readme[i].replace(/^\s+/,"");
if(line.search(/^-/) < 0) {
if(line.search(/^[-~]/) < 0) {
readme[i-1] += "\n" + line;
readme[i] = "";
}
@ -201,6 +201,7 @@ tasks["update-json"] = function() {
var line = readme[i].replace(/^[\sv-]+/g,"").trim();
var ver = line.substr(0, line.search(" ")).trim().toLowerCase();
var txt = line.substr(line.search(" ")).trim();
if(ver.search("~")===0) continue;
if(history[ver] !== undefined) throw new Error("Double definition of version '" + ver + "' in the readme revision history.");
history[ver] = txt;
}

View file

@ -14,7 +14,11 @@ Mod components derived/inspired by IE:
IE components used in this mod:
- immersiveengineering:textures/block/stone_decoration_concrete.png (for IE
concrete wall).
- Image pattern of wooden GUIs (background, slots) to make them look
identical to the IE GUI style.
- Image pattern of wooden GUIs (background, slots, etc.).
- immersiveengineering:textures/block/stone_decoration_concrete.png (for IE
concrete wall). The texture had to be copied into this mod to prevent
reported bailouts if IE is not installed, local path in the mod is
"engineersdecor:blocks/iestyle/stone_decoration_concrete_by_blusunrize",
used in block "engineersdecor:concrete_wall".

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

View file

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 162 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

View file

@ -1,6 +1,12 @@
{
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
"1.12.2": {
"1.0.3": "[R] Release based on v1.0.3-b5. Release-to-release changes: * Small laboratory furnace added. * Extensive config options for mod packing and tuning added. * Rendering issues fixes (window bleeding, optifine). * Steel framed window added. * Treated wood pole \"end pieces\" added (two support variants). * Sitting on treated wood stool added including mobs (but not villagers, as these are obviously very upright people). * Lang ru_ru added (github contribution from Yaroslavik). * Creative tab logo changed to mod logo. * Table/crafting table bounding boxes refined. * Standalone \"escape\" recipes added if IE is not installed.",
"1.0.3-b5": "[F] Fixed typo in en-en lang file.\n[F] Fixed IE concrete texture missing bailout in log if IE is not installed.\n[F] Using forge multi-layer models for windows to circumvent glitches.\n[M] Changed creative tab logo to the mod logo.\n[A] Added alternative recipes for crafting table and furnace if main IE ingredients are missing (for \"stand-alone\" mod usage).",
"1.0.3-b4": "[A] Lab furnace supports electrical speedup when a IE external is placed in one of the two auxiliary slots.\n[F] Fixed window rendering issue (issue #15, thanks to ILLOMIURGE).\n[M] Updated ru_ru lang file (Yaroslavik).",
"1.0.3-b3": "[A] Added sitting on treated wood stool, Zombies included.\n[A] Added steel framed window.\n[A] Added treated wood pole support head/foot and heavy duty support.\n[A] Added language Russian language support, thanks to yaroslav4167.\n[A] Added config for furnace smelting speed (percent of vanilla furnace).\n[A] Added config for furnace fuel efficiency (in percent, ref is vanilla).\n[F] Treated pole model changed to circumvent potential texture bleeding.\n[M] Treated wood table bounding box aligned with the legs.\n[M] Treated wood crafting table bounding box aligned with the legs.\n[M] Treated wood window can be vertically placed for rooflights.",
"1.0.3-b2": "[A] Added config options for selective feature opt-outs (soft opt-out).\n[A] Added config skip registration of opt-out features (hard opt-out).\n[A] Added config to disable all internal recipes (for packs).\n[A] Added JEI API adapter for soft opt-outs.\n[A] Added lab furnace recipe override config to smelt ores to nuggets that would normally be smelted into ingots. Can be changed on-the-fly.",
"1.0.3-b1": "[A] Added small laboratory furnace.\n[M] Panzer glass opacity/light level set explicitly 0.",
"1.0.2": "[R] Release based on v1.0.2-b3 * Fixes: Spawning. * Crafting table: Shift-click. * Ladders: Faster climbing/descending. * Concrete: Rebar tiles, tile stairs. * Treated wood: window, windowsill. * Slag brick: wall. * Panzer glass: added. * Recipes: Adaptions, added decompositions.",
"1.0.2-b3": "[A] Added slag brick wall.\n[A] Added wall decomposition recipes.\n[A] Added treated wood window.\n[M] Climbing/descending mod ladders is faster when looking up or down and not sneaking.\n[M] Panzer glass material definition changed.\n[M] Explicitly preventing spawning in and on \"non-full\" blocks of the mod.",
"1.0.2-b2": "[A] Added rebar concrete tile stairs.\n[A] Added treated wood window sill.\n[A] Added decomposition recipes for stairs and tiles.\n[M] Changed stair recipe yield quantity from 9 to 6.",
@ -17,6 +23,7 @@
"1.0.0-b1": "[A] Initial structure.\n[A] Added clinker bricks and clinker brick stairs.\n[A] Added slag bricks and slag brick stairs.\n[A] Added metal rung ladder.\n[A] Added staggered metal steps ladder.\n[A] Added treated wood ladder.\n[A] Added treated wood pole.\n[A] Added treated wood table."
},
"1.13.2": {
"1.0.2-b3": "[A] Added treated wood window.\n[A] Added treated wood pole support.\n[A] Added treated wood pole head.\n[A] Added steel framed window.",
"1.0.2-b2": "[A] Added wall decomposition recipes.\n[A] Added slag brick wall.\n[M] Climbing/descending mod ladders is faster when looking up or down and not sneaking.\n[M] Panzer glass material definition changed.",
"1.0.2-b1": "[A] Added Treated wood crafting table.\n[A] Added decomposition recipes for stairs and tiles.\n[N] Note: All v1.0.2-b1-mc1.12.2 blocks are ported to 1.13.2 (alpha -^ beta version).\n[N] Note: Until IE is out for 1.13.2, the recipes are temporary with vanilla items.",
"1.0.0-a3": "[A] Added iron inset light.\n[A] Added rebar concrete tile.\n[A] Added rebar concrete tile stairs.\n[A] Added clinker brick wall.\n[A] Added treated wood stool.\n[A] Added treated window sill.",
@ -24,9 +31,9 @@
"1.0.0-a1": "[A] Initial port to 1.13.2 with Forge beta."
},
"promos": {
"1.12.2-recommended": "1.0.2",
"1.12.2-latest": "1.0.2",
"1.12.2-recommended": "1.0.3",
"1.12.2-latest": "1.0.3",
"1.13.2-recommended": "",
"1.13.2-latest": "1.0.2-b2"
"1.13.2-latest": "1.0.2-b3"
}
}

View file

@ -5,7 +5,7 @@ A [Minecraft](https://minecraft.net) (Java Edition) mod based on
[`Forge`](http://www.minecraftforge.net/), adding cosmetic blocks
for the Engineer's factory, workshop, and home.
![](documentation/engineers-decor-v100a-summary.png)
![](documentation/engineers-decor-v103-summary.png)
### Distribution file download
@ -20,10 +20,21 @@ Main distribution channel for this mod is CurseForge:
The mod has its focus on non-functional, decorative blocks. If anyhow possible,
no tile entities or user interactions are used. Current feature set:
- *Treated wood crafting table*: 3x3 crafting table with IE style GUI and a model
fitting better in the engineer's workshop. Keeps its inventory, has eight additional
storage slots on the left side of the crafting grid. Crafted 2x2 with three
treated wood planks and one vanilla crafting table.
- *Small laboratory furnace*: Solid fuel consuming, updraught. Slightly hotter and
better isolated than a cobblestone furnace, therefore more efficient. Has internal
hopper FiFos for input, output, and fuel (two stacks each). Two auxilliary slots
(storage tray). Keeps inventory when relocated. Crafted with one cobblestone
furnace, one hopper, and seven metal plates.
- Rebar (steel) reinforced concrete: Expensive but creeper-proof. Crafted 3x3 from
four concrete blocks and five steel rods. Texture design oriented at the IE concrete,
slightly darker, eight (position dependent) random texture variations with rust
traces. Also creaftable in form of *stairs* and *walls*. Like the IE contrete tiles,
traces. Also creaftable in form of *stairs* and *walls*. Like the IE contrete *tiles*,
you can craft rebar concrete tiles with corresponding stairs. Reverse recipes
available for all blocks crafted from rebar concrete.
@ -43,11 +54,6 @@ no tile entities or user interactions are used. Current feature set:
explosion resistance than bricks. Also available as stairs and wall, also with
reverse recipes.
- *Treated wood crafting table*: 3x3 crafting table with IE style GUI and a model
fitting better in the engineer's workshop. Keeps its inventory, has eight additional
storage slots on the left side of the crafting grid. Crafted 2x2 with three
treated wood planks and one vanilla crafting table.
- *Treated wood ladder*: Crafted 3x3 with the known ladder pattern, items are
treated wood sticks. Climbing is faster if looking up/down and not sneaking.
@ -59,6 +65,10 @@ no tile entities or user interactions are used. Current feature set:
zip pattern. Crafted 3x3 with six iron or steel rods in a zip pattern. Climbing
is faster when looking up/down and not sneaking.
- *Panzer glass*: Reinforced, dark gray tinted glass block. Explosion-proof.
Faint structural lines are visible, multiple texture variations for seemless
look. Crafted 3x3 with four metal rods, four glass blocks, and one diamond.
- *Treated wood table*: Four leg table made out of treated wood. Crafted 3x3
with three treated wood slabs and four treated wood poles. Guess the pattern.
@ -70,9 +80,9 @@ no tile entities or user interactions are used. Current feature set:
Can be used e.g. for structural support or wire relay post, where the height
of the IE wire posts does not match.
- *Panzer glass*: Reinforced, dark gray tinted glass block. Explosion-proof.
Faint structural lines are visible, multiple texture variations for seemless
look. Crafted 3x3 with four metal rods, four glass blocks, and one diamond.
- *Inset spot light*: Small metal framed glowstone based light source for ceiling,
wall, or floor. Light level like a torch. Thin, hence not blocking the way.
Allows illuminating places where electrical light installations are problematic.
More to come slowly but steadily.
@ -128,6 +138,6 @@ Mods covering similar features, or may fit well together with IE and the decorat
![Concrete](documentation/engineers-decor-v100a-concrete-stuff.png)
![Concrete](documentation/engineers-decor-v101a-added.png)
![Concrete](documentation/engineers-decor-v101a-summary.png)
![Concrete](documentation/engineers-decor-v101a-craftinggui.png)

View file

@ -56,7 +56,8 @@ tasks["sync-main-repository"] = function() {
sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js signing.* \"" + main_repo_local + "/1.12/\"")
sys.shell("cp -r src gradle meta \"" + main_repo_local + "/1.12/\"")
//@todo uncomment after alpha code cleanup.
//cd_dev("1.13");
cd_dev("1.13");
sys.shell("cp -f .gitignore readme.md tasks.js \"" + main_repo_local + "/1.13/\"")
//sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js signing.* \"" + main_repo_local + "/1.13/\"")
//sys.shell("cp -r src gradle meta \"" + main_repo_local + "/1.13/\"")
cd_main();