Added Old Industrial Wood and Door. Wood textures slightly darkened. Resource cleanup. Recipes internalized to prevent collisions.

This commit is contained in:
stfwi 2020-09-01 21:04:28 +02:00
parent dccd02c40d
commit bde1dab5a8
186 changed files with 1710 additions and 329 deletions

View file

@ -97,7 +97,6 @@ public class ModConfig
public final ForgeConfigSpec.BooleanValue without_gas_concrete;
public final ForgeConfigSpec.BooleanValue without_walls;
public final ForgeConfigSpec.BooleanValue without_stairs;
public final ForgeConfigSpec.BooleanValue without_ie_concrete_wall;
public final ForgeConfigSpec.BooleanValue without_panzer_glass;
public final ForgeConfigSpec.BooleanValue without_ladders;
public final ForgeConfigSpec.BooleanValue without_treated_wood_furniture;
@ -206,10 +205,6 @@ public class ModConfig
.translation(MODID + ".config.without_stairs")
.comment("Disable all mod stairs blocks.")
.define("without_stairs", false);
without_ie_concrete_wall = builder
.translation(MODID + ".config.without_ie_concrete_wall")
.comment("Disable IE concrete wall.")
.define("without_ie_concrete_wall", false);
without_panzer_glass = builder
.translation(MODID + ".config.without_panzer_glass")
.comment("Disable panzer glass and derived blocks.")
@ -629,7 +624,6 @@ public class ModConfig
if(SERVER.without_slag_bricks.get()&&rn.startsWith("slag_brick_")) return true;
if(SERVER.without_rebar_concrete.get()&&rn.startsWith("rebar_concrete")) return true;
if(SERVER.without_gas_concrete.get()&&rn.startsWith("gas_concrete")) return true;
if(SERVER.without_ie_concrete_wall.get()&&rn.startsWith("ie_concrete_wall")) return true;
if(SERVER.without_panzer_glass.get()&&rn.startsWith("panzerglass_")) return true;
if(SERVER.without_light_sources.get()&&rn.endsWith("_light")) return true;
if(SERVER.without_sign_plates.get()&&rn.startsWith("sign_")) return true;

View file

@ -288,6 +288,34 @@ public class ModContent
// -------------------------------------------------------------------------------------------------------------------
public static final DecorBlock.Normal OLD_INDUSTRIAL_PLANKS = (DecorBlock.Normal)(new DecorBlock.Normal(
DecorBlock.CFG_DEFAULT,
Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(1.5f, 8f).sound(SoundType.WOOD)
)).setRegistryName(new ResourceLocation(ModEngineersDecor.MODID, "old_industrial_wood_planks"));
public static final EdSlabBlock OLD_INDUSTRIAL_SLAB = (EdSlabBlock)(new EdSlabBlock(
DecorBlock.CFG_DEFAULT,
Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(1.5f, 8f).sound(SoundType.WOOD)
)).setRegistryName(new ResourceLocation(ModEngineersDecor.MODID, "old_industrial_wood_slab"));
public static final EdStairsBlock OLD_INDUSTRIAL_STAIRS = (EdStairsBlock)(new EdStairsBlock(
DecorBlock.CFG_DEFAULT,
OLD_INDUSTRIAL_PLANKS.getDefaultState(),
Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(1.5f, 8f).sound(SoundType.WOOD)
)).setRegistryName(new ResourceLocation(ModEngineersDecor.MODID, "old_industrial_wood_stairs"));
public static final EdSlabSliceBlock OLD_INDUSTRIAL_SLABSLICE = (EdSlabSliceBlock)(new EdSlabSliceBlock(
DecorBlock.CFG_CUTOUT,
Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(1.5f, 8f).sound(SoundType.WOOD).notSolid()
)).setRegistryName(new ResourceLocation(ModEngineersDecor.MODID, "old_industrial_wood_slabslice"));
public static final EdDoorBlock OLD_INDUSTRIAL_WOOD_DOOR = (EdDoorBlock)(new EdDoorBlock(
DecorBlock.CFG_DEFAULT,
Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(1.5f, 12f).sound(SoundType.WOOD).notSolid()
)).setRegistryName(new ResourceLocation(ModEngineersDecor.MODID, "old_industrial_wood_door"));
// -------------------------------------------------------------------------------------------------------------------
public static final DecorBlock.WaterLoggable TREATED_WOOD_TABLE = (DecorBlock.WaterLoggable)(new DecorBlock.WaterLoggable(
DecorBlock.CFG_CUTOUT,
Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2f, 15f).sound(SoundType.WOOD).notSolid(),
@ -828,6 +856,11 @@ public class ModContent
METAL_RUNG_STEPS,
TREATED_WOOD_LADDER,
IRON_HATCH,
OLD_INDUSTRIAL_PLANKS,
OLD_INDUSTRIAL_SLAB,
OLD_INDUSTRIAL_STAIRS,
OLD_INDUSTRIAL_SLABSLICE,
OLD_INDUSTRIAL_WOOD_DOOR,
TREATED_WOOD_TABLE,
TREATED_WOOD_STOOL,
TREATED_WOOD_SIDE_TABLE,

View file

@ -8,14 +8,6 @@
*/
package wile.engineersdecor.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.renderer.ItemRenderer;
import wile.engineersdecor.ModContent;
import wile.engineersdecor.ModEngineersDecor;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import wile.engineersdecor.libmc.detail.Inventories;
import wile.engineersdecor.libmc.detail.Inventories.SlotRange;
import wile.engineersdecor.libmc.detail.Networking;
import net.minecraft.inventory.container.*;
import net.minecraft.network.play.server.SSetSlotPacket;
import net.minecraft.network.NetworkManager;
@ -45,6 +37,7 @@ import net.minecraft.util.text.StringTextComponent;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.client.gui.widget.button.ImageButton;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraftforge.fml.network.NetworkHooks;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.registries.ForgeRegistries;
@ -52,6 +45,13 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import com.mojang.blaze3d.systems.RenderSystem;
import com.google.common.collect.ImmutableList;
import com.mojang.blaze3d.matrix.MatrixStack;
import wile.engineersdecor.ModContent;
import wile.engineersdecor.ModEngineersDecor;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import wile.engineersdecor.libmc.detail.Inventories;
import wile.engineersdecor.libmc.detail.Inventories.SlotRange;
import wile.engineersdecor.libmc.detail.Networking;
import wile.engineersdecor.libmc.detail.TooltipDisplay;
import wile.engineersdecor.libmc.detail.TooltipDisplay.TipRange;
@ -456,8 +456,8 @@ public class EdCraftingTable
if(!this.mergeItemStack(slotstack, 10, 46, true)) return ItemStack.EMPTY;
slot.onSlotChange(slotstack, stack);
} else if(index >= 10 && (index < 46)) {
if(!this.mergeItemStack(slotstack, 46, 54, false)) return ItemStack.EMPTY;
} else if((index >= 46) && (index < 54)) {
if(!this.mergeItemStack(slotstack, 46, 46+NUM_OF_STORAGE_SLOTS, false)) return ItemStack.EMPTY;
} else if((index >= 46) && (index < 46+NUM_OF_STORAGE_SLOTS)) {
if(!this.mergeItemStack(slotstack, 10, 46, false)) return ItemStack.EMPTY;
} else if(!this.mergeItemStack(slotstack, 10, 46, false)) {
return ItemStack.EMPTY;

View file

@ -0,0 +1,22 @@
/*
* @file EdDoorBlock.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Door blocks.
*/
package wile.engineersdecor.blocks;
import wile.engineersdecor.libmc.blocks.StandardDoorBlock;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorldReader;
import net.minecraft.block.*;
public class EdDoorBlock extends StandardDoorBlock implements IDecorBlock
{
public EdDoorBlock(long config, Block.Properties properties)
{ super(config, properties); }
}

View file

@ -239,7 +239,7 @@ public class EdFluidBarrel
{
int vol = tank_.getFluidAmount();
int cap = tank_.getCapacity();
String name = Auxiliaries.localizable(tank_.getFluid().getTranslationKey()).getString();
String name = (new TranslationTextComponent(tank_.getFluid().getTranslationKey())).getString();
if((vol>0) && (cap>0)) {
Overlay.show(player, Auxiliaries.localizable("block.engineersdecor.fluid_barrel.status", new Object[]{
Integer.toString(vol), Integer.toString(cap), name

View file

@ -0,0 +1,47 @@
/*
* @file StandardDoorBlock.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Door blocks, almost entirely based on vanilla.
*/
package wile.engineersdecor.libmc.blocks;
import net.minecraft.entity.EntitySpawnPlacementRegistry;
import net.minecraft.entity.EntityType;
import net.minecraft.util.math.BlockPos;
import net.minecraft.block.*;
import net.minecraft.block.BlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.IBlockReader;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import javax.annotation.Nullable;
import java.util.List;
public class StandardDoorBlock extends DoorBlock implements StandardBlocks.IStandardBlock
{
private final long config;
public StandardDoorBlock(long config, Block.Properties properties)
{ super(properties); this.config = config; }
@Override
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, @Nullable IBlockReader world, List<ITextComponent> tooltip, ITooltipFlag flag)
{ Auxiliaries.Tooltip.addInformation(stack, world, tooltip, flag, true); }
@Override
public boolean canSpawnInBlock()
{ return false; }
@Override
public boolean canCreatureSpawn(BlockState state, IBlockReader world, BlockPos pos, EntitySpawnPlacementRegistry.PlacementType type, @Nullable EntityType<?> entityType)
{ return false; }
}

View file

@ -11,7 +11,7 @@ package wile.engineersdecor.libmc.datagen;
import net.minecraftforge.client.model.generators.BlockStateProvider;
import net.minecraftforge.client.model.generators.ItemModelProvider;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import net.minecraftforge.client.model.generators.*;
import net.minecraftforge.common.data.ExistingFileHelper;
import net.minecraft.data.*;
public class AssetsDataGen