Skip to content

Commit

Permalink
Merge branch 'BluSunrize:1.20.4' into YALU-German1
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaElidove authored Jul 15, 2024
2 parents 755bc21 + cc8ef6d commit 9c0d35b
Show file tree
Hide file tree
Showing 163 changed files with 4,213 additions and 180 deletions.
16 changes: 15 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
##### Version 1.20.4-11.5.1-pre
##### Version 1.20.4-11.6.0-pre
- "The Redstone Update!"
- Add the redstone state cell for storing signals (BluSunrize)
- Add the redstone timer for emitting regular signals (BluSunrize)
- Add the redstone switchboard for remapping redstone signals between networks (BluSunrize)
- Add the warning siren to make loud noises and send villagers to their homes (BluSunrize)
- Move redstone components to a separate category of the manual (BluSunrize)
- Add recipe for crushing slag bricks into slag gravel (BluSunrize)
- Add recipes for wetting vanilla concrete powder in the bottling machine (BluSunrize)
- Add progress tooltip to items in the arc furnace (BluSunrize)
- Change recipe for catwalk stairs to be cheaper (BluSunrize)
- Fix waterlogged posts not dropping items (BluSunrize)
- Fix treated windows and feedthrough insulators letting rain through (BluSunrize, voidsong-dragonfly)
- Fix crates not syncing their names to the client (BluSunrize)
- Fix shader based particles breaking on servers (BluSunrize)
- Fix various button tooltips sticking around after being clicked (BluSunrize)
- Fix treated trapdoors erroneously having metal properties (BluSunrize)
- Fix arms on posts dropping blocks when broken (BluSunrize)
- Fix crate minecarts crashing when inserted into with a hopper (BluSunrize)

##### Version 1.20.4-11.5.0-179
- Add warning signs (BluSunrize)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version_neoforge=20.4.234
# "random" times. Updating this should usually be done in sync with updating the NeoForge version as there sometimes are
# cross-dependencies in e.g. argument generation.
version_neogradle=7.0.96
version_ie=11.5.1
version_ie=11.6.0
version_jei=17.0.0.30
version_cctweaked=1.110.2
version_buildnumber=179
Expand Down
4 changes: 4 additions & 0 deletions src/api/java/blusunrize/immersiveengineering/api/Lib.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public class Lib
public static final String GUIID_ToolboxBlock = "toolboxblock";
public static final String GUIID_RedstoneConnector = "redstoneconnector";
public static final String GUIID_RedstoneProbe = "redstoneprobe";
public static final String GUIID_RedstoneStateCell = "redstonestatecell";
public static final String GUIID_RedstoneTimer = "redstonetimer";
public static final String GUIID_RedstoneSwitchboard = "redstoneswitchboard";
public static final String GUIID_Siren = "siren";
//Items
public static final String GUIID_Revolver = "revolver";
public static final String GUIID_Toolbox = "toolbox";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,16 @@ private void createConnectorModels()
.renderType(ModelProviderUtils.getName(translucent()));
obj(Connectors.CONNECTOR_BUNDLED, rl("block/connector/connector_bundled.obj"))
.transforms(rl("item/connector"));
obj(Connectors.REDSTONE_STATE_CELL, rl("block/connector/redstone_state_cell.obj"))
.transforms(rl("item/connector"))
.renderType(ModelProviderUtils.getName(translucent()));
obj(Connectors.REDSTONE_TIMER, rl("block/connector/redstone_timer.obj.ie"))
.transforms(rl("item/block"))
.renderType(ModelProviderUtils.getName(translucent()));
obj(Connectors.REDSTONE_SWITCHBOARD, rl("block/connector/switchboard.obj"))
.transforms(rl("item/switchboard"));
obj(Connectors.SIREN, rl("block/connector/siren.obj.ie"))
.transforms(rl("item/block"));
obj(Connectors.CONNECTOR_STRUCTURAL, rl("block/connector/connector_structural.obj.ie"))
.transforms(rl("item/connector"));
obj(Connectors.TRANSFORMER, rl("block/connector/transformer_mv_left.obj"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis;
import net.minecraft.data.PackOutput;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.Block;
import net.neoforged.neoforge.client.model.generators.BlockModelBuilder;
import net.neoforged.neoforge.client.model.generators.ConfiguredModel;
import net.neoforged.neoforge.client.model.generators.ModelFile;
import net.neoforged.neoforge.client.model.generators.VariantBlockStateBuilder;
import net.neoforged.neoforge.common.data.ExistingFileHelper;

import javax.annotation.Nonnull;
Expand Down Expand Up @@ -90,6 +94,27 @@ protected void registerStatesAndModels()
.end()
);
createAllRotatedBlock(Connectors.CONNECTOR_BUNDLED, obj("block/connector/connector_bundled.obj", cutout()));
createAllRotatedBlock(Connectors.REDSTONE_STATE_CELL, obj("block/connector/redstone_state_cell.obj", translucent()));
createAllRotatedBlock(
Connectors.REDSTONE_TIMER,
ieObjBuilder("block/connector/redstone_timer.obj.ie")
.callback(RSConnectorCallbacks.INSTANCE)
.layer(translucent())
.end()
);
createHorizontalRotatedBlock(Connectors.REDSTONE_SWITCHBOARD, obj("block/connector/switchboard.obj", cutout()));
{
BlockModelBuilder model = ieObjBuilder("block/connector/siren.obj.ie")
.callback(SirenCallbacks.INSTANCE)
.layer(cutout())
.end();
VariantBlockStateBuilder stateBuilder = getVariantBuilder(Connectors.SIREN.get());
forEachState(stateBuilder.partialState(), List.of(), state -> {
for(Direction d : IEProperties.FACING_ALL.getPossibleValues())
state.with(IEProperties.FACING_ALL, d).setModels(new ConfiguredModel(model, 0, d.getAxis()==Axis.Y?0: getAngle(d, 180), false));
});
}

ModelFile feedthroughModelFile = models().getBuilder("block/connector/feedthrough")
.customLoader(SpecialModelBuilder.forLoader(FeedthroughLoader.LOCATION))
.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import blusunrize.immersiveengineering.api.EnumMetals;
import blusunrize.immersiveengineering.api.multiblocks.blocks.MultiblockRegistration;
import blusunrize.immersiveengineering.common.blocks.IEEntityBlock;
import blusunrize.immersiveengineering.common.blocks.generic.PostBlock;
import blusunrize.immersiveengineering.common.blocks.generic.PostBlock.HorizontalOffset;
import blusunrize.immersiveengineering.common.blocks.metal.CapacitorBlockEntity;
import blusunrize.immersiveengineering.common.blocks.metal.ConveyorBlock;
import blusunrize.immersiveengineering.common.blocks.plant.HempBlock;
Expand Down Expand Up @@ -116,6 +118,10 @@ public void generate(BiConsumer<ResourceLocation, Builder> out)
registerDoor(WoodenDecoration.DOOR_FRAMED);
registerDoor(MetalDecoration.STEEL_DOOR);

registerPost(WoodenDecoration.TREATED_POST);
registerPost(MetalDecoration.STEEL_POST);
registerPost(MetalDecoration.ALU_POST);

registerMultiblocks();

registerSelfDropping(WoodenDevices.CRAFTING_TABLE, dropInv());
Expand Down Expand Up @@ -311,6 +317,15 @@ private void registerDoor(Supplier<? extends Block> b)
register(b, ret);
}

private void registerPost(Supplier<? extends Block> b)
{
LootPool.Builder ret = createPoolBuilder().setRolls(ConstantValue.exactly(1.0F))
.add(LootItem.lootTableItem(b.get()).when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b.get()).setProperties(
StatePropertiesPredicate.Builder.properties().hasProperty(PostBlock.HORIZONTAL_OFFSET, HorizontalOffset.NONE))
));
register(b, ret);
}

private void registerSawdust()
{
LootTable.Builder ret = LootTable.lootTable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,14 @@ private void woodenDecoration(RecipeOutput out)
.define('s', IETags.getItemTag(IETags.treatedWoodSlab))
.unlockedBy("has_treated_planks", has(IETags.getItemTag(IETags.treatedWood)))
.save(new WrappingRecipeOutput<>(out, BasicShapedRecipe::new), toRL(toPath(WoodenDecoration.CATWALK)));
addStairs(WoodenDecoration.CATWALK, WoodenDecoration.CATWALK_STAIRS, out);
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, WoodenDecoration.CATWALK_STAIRS, 4)
.pattern("s ")
.pattern("rs ")
.pattern(" rs")
.define('r', IETags.treatedStick)
.define('s', IETags.getItemTag(IETags.treatedWoodSlab))
.unlockedBy("has_treated_planks", has(IETags.getItemTag(IETags.treatedWood)))
.save(new WrappingRecipeOutput<>(out, BasicShapedRecipe::new), toRL(toPath(WoodenDecoration.CATWALK_STAIRS)));

ShapedRecipeBuilder.shaped(RecipeCategory.MISC, WoodenDecoration.DOOR, 3)
.pattern("ww")
Expand Down Expand Up @@ -689,7 +696,14 @@ private void metalDecorations(RecipeOutput out)
.define('s', IETags.getItemTag(IETags.scaffoldingSteelSlab))
.unlockedBy("has_scaffolding", has(IETags.getItemTag(IETags.scaffoldingSteel)))
.save(new WrappingRecipeOutput<>(out, BasicShapedRecipe::new), toRL(toPath(MetalDecoration.STEEL_CATWALK)));
addStairs(MetalDecoration.STEEL_CATWALK, MetalDecoration.STEEL_CATWALK_STAIRS, out);
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, MetalDecoration.STEEL_CATWALK_STAIRS, 4)
.pattern("s ")
.pattern("rs ")
.pattern(" rs")
.define('r', IETags.steelRod)
.define('s', IETags.getItemTag(IETags.scaffoldingSteelSlab))
.unlockedBy("has_scaffolding", has(IETags.getItemTag(IETags.scaffoldingSteel)))
.save(new WrappingRecipeOutput<>(out, BasicShapedRecipe::new), toRL(toPath(MetalDecoration.STEEL_CATWALK_STAIRS)));
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, MetalDecoration.ALU_CATWALK, 6)
.pattern("rrr")
.pattern("r r")
Expand All @@ -698,7 +712,14 @@ private void metalDecorations(RecipeOutput out)
.define('s', IETags.getItemTag(IETags.scaffoldingAluSlab))
.unlockedBy("has_scaffolding", has(IETags.getItemTag(IETags.scaffoldingAlu)))
.save(new WrappingRecipeOutput<>(out, BasicShapedRecipe::new), toRL(toPath(MetalDecoration.ALU_CATWALK)));
addStairs(MetalDecoration.ALU_CATWALK, MetalDecoration.ALU_CATWALK_STAIRS, out);
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, MetalDecoration.ALU_CATWALK_STAIRS, 4)
.pattern("s ")
.pattern("rs ")
.pattern(" rs")
.define('r', IETags.aluminumRod)
.define('s', IETags.getItemTag(IETags.scaffoldingAluSlab))
.unlockedBy("has_scaffolding", has(IETags.getItemTag(IETags.scaffoldingAlu)))
.save(new WrappingRecipeOutput<>(out, BasicShapedRecipe::new), toRL(toPath(MetalDecoration.ALU_CATWALK_STAIRS)));

ShapedRecipeBuilder.shaped(RecipeCategory.MISC, MetalDecoration.STEEL_DOOR, 3)
.pattern("ii")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ private void woodenDevices(RecipeOutput out)

private void connectors(@Nonnull RecipeOutput out)
{
shapedMisc(IEBlocks.Connectors.BREAKER_SWITCH)
shapedMisc(Connectors.BREAKER_SWITCH)
.pattern(" l ")
.pattern("cic")
.define('l', Items.LEVER)
.define('i', IETags.getTagsFor(EnumMetals.COPPER).ingot)
.define('c', IETags.connectorInsulator)
.unlockedBy("has_"+toPath(Misc.WIRE_COILS.get(WireType.COPPER)), has(Misc.WIRE_COILS.get(WireType.COPPER)))
.save(out, toRL(toPath(Connectors.BREAKER_SWITCH)));
shapedMisc(IEBlocks.Connectors.REDSTONE_BREAKER)
shapedMisc(Connectors.REDSTONE_BREAKER)
.pattern("hrh")
.pattern("ici")
.define('h', IEBlocks.Connectors.getEnergyConnector(WireType.HV_CATEGORY, false))
Expand All @@ -249,7 +249,7 @@ private void connectors(@Nonnull RecipeOutput out)
.unlockedBy("has_hv_connector", has(IEBlocks.Connectors.getEnergyConnector(WireType.HV_CATEGORY, false)))
.save(out, toRL(toPath(Connectors.REDSTONE_BREAKER)));

shapedMisc(IEBlocks.Connectors.CURRENT_TRANSFORMER)
shapedMisc(Connectors.CURRENT_TRANSFORMER)
.pattern(" m ")
.pattern(" b ")
.pattern("iei")
Expand All @@ -260,7 +260,7 @@ private void connectors(@Nonnull RecipeOutput out)
.unlockedBy("has_voltmeter", has(IEItems.Tools.VOLTMETER))
.save(out, toRL(toPath(Connectors.CURRENT_TRANSFORMER)));

shapedMisc(IEBlocks.Connectors.TRANSFORMER)
shapedMisc(Connectors.TRANSFORMER)
.pattern("lm")
.pattern("eb")
.pattern("ii")
Expand All @@ -271,7 +271,7 @@ private void connectors(@Nonnull RecipeOutput out)
.define('i', IETags.getTagsFor(EnumMetals.IRON).ingot)
.unlockedBy("has_mv_connector", has(IEBlocks.Connectors.getEnergyConnector(WireType.MV_CATEGORY, false)))
.save(out, toRL(toPath(Connectors.TRANSFORMER)));
shapedMisc(IEBlocks.Connectors.TRANSFORMER_HV)
shapedMisc(Connectors.TRANSFORMER_HV)
.pattern("mh")
.pattern("eb")
.pattern("ii")
Expand All @@ -283,38 +283,73 @@ private void connectors(@Nonnull RecipeOutput out)
.unlockedBy("has_hv_connector", has(IEBlocks.Connectors.getEnergyConnector(WireType.HV_CATEGORY, false)))
.save(out, toRL(toPath(Connectors.TRANSFORMER_HV)));

shapedMisc(IEBlocks.Connectors.CONNECTOR_STRUCTURAL, 8)
shapedMisc(Connectors.CONNECTOR_STRUCTURAL, 8)
.pattern("isi")
.pattern("i i")
.define('i', IETags.getTagsFor(EnumMetals.STEEL).ingot)
.define('s', IETags.steelRod)
.unlockedBy("has_steel_ingot", has(IETags.getTagsFor(EnumMetals.STEEL).ingot))
.save(out, toRL(toPath(Connectors.CONNECTOR_STRUCTURAL)));

shapedMisc(IEBlocks.Connectors.CONNECTOR_REDSTONE, 4)
shapedMisc(Connectors.CONNECTOR_REDSTONE, 4)
.pattern("iii")
.pattern("brb")
.define('i', IETags.getTagsFor(EnumMetals.ELECTRUM).nugget)
.define('b', IETags.connectorInsulator)
.define('r', Tags.Items.DUSTS_REDSTONE)
.unlockedBy("has_electrum_nugget", has(IETags.getTagsFor(EnumMetals.ELECTRUM).nugget))
.save(out, toRL(toPath(Connectors.CONNECTOR_REDSTONE)));
shapedMisc(IEBlocks.Connectors.CONNECTOR_PROBE)
shapedMisc(Connectors.CONNECTOR_PROBE)
.pattern(" c ")
.pattern("gpg")
.define('c', Connectors.CONNECTOR_REDSTONE)
.define('g', Tags.Items.GLASS_PANES)
.define('p', Ingredients.COMPONENT_ELECTRONIC)
.unlockedBy("has_connector", has(Connectors.CONNECTOR_REDSTONE))
.save(out, toRL(toPath(Connectors.CONNECTOR_PROBE)));
shapedMisc(IEBlocks.Connectors.CONNECTOR_BUNDLED)
shapedMisc(Connectors.CONNECTOR_BUNDLED)
.pattern(" w ")
.pattern("wcw")
.pattern(" w ")
.define('c', Connectors.CONNECTOR_REDSTONE)
.define('w', IETags.aluminumWire)
.unlockedBy("has_connector", has(Connectors.CONNECTOR_REDSTONE))
.save(out, toRL(toPath(Connectors.CONNECTOR_BUNDLED)));
shapedMisc(Connectors.REDSTONE_STATE_CELL)
.pattern("c")
.pattern("t")
.define('c', Connectors.CONNECTOR_REDSTONE)
.define('t', Ingredients.ELECTRON_TUBE)
.unlockedBy("has_connector", has(Connectors.CONNECTOR_REDSTONE))
.save(out, toRL(toPath(Connectors.REDSTONE_STATE_CELL)));
shapedMisc(Connectors.REDSTONE_TIMER)
.pattern(" t ")
.pattern("te ")
.pattern(" c")
.define('c', Connectors.CONNECTOR_REDSTONE)
.define('e', Ingredients.COMPONENT_ELECTRONIC)
.define('t', Ingredients.ELECTRON_TUBE)
.unlockedBy("has_connector", has(Connectors.CONNECTOR_REDSTONE))
.save(out, toRL(toPath(Connectors.REDSTONE_TIMER)));
shapedMisc(Connectors.REDSTONE_SWITCHBOARD)
.pattern("c c")
.pattern("sws")
.pattern("ses")
.define('c', Connectors.CONNECTOR_REDSTONE)
.define('s', IETags.getTagsFor(EnumMetals.STEEL).plate)
.define('w', Misc.WIRE_COILS.get(WireType.REDSTONE))
.define('e', Ingredients.COMPONENT_ELECTRONIC)
.unlockedBy("has_connector", has(Connectors.CONNECTOR_REDSTONE))
.save(out, toRL(toPath(Connectors.REDSTONE_SWITCHBOARD)));
shapedMisc(Connectors.SIREN)
.pattern(" c ")
.pattern("pmp")
.pattern(" p ")
.define('c', Connectors.CONNECTOR_REDSTONE)
.define('p', IETags.getTagsFor(EnumMetals.IRON).plate)
.define('m', Ingredients.COMPONENT_IRON)
.unlockedBy("has_connector", has(Connectors.CONNECTOR_REDSTONE))
.save(out, toRL(toPath(Connectors.SIREN)));

// Connectors and Relays
shapedMisc(Connectors.getEnergyConnector(WireType.LV_CATEGORY, false), 4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,26 @@
import net.minecraft.tags.FluidTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.alchemy.Potions;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.ConcretePowderBlock;
import net.minecraft.world.level.material.Fluid;
import net.neoforged.neoforge.common.Tags;
import net.neoforged.neoforge.fluids.FluidType;

import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static blusunrize.immersiveengineering.api.IETags.getItemTag;
import static blusunrize.immersiveengineering.api.IETags.getStorageBlock;
Expand Down Expand Up @@ -217,6 +226,32 @@ private void bottling(RecipeOutput out)
.input(IETags.fiberHemp, 8)
.fluidInput(IETags.fluidResin, half_bucket)
.build(out, toRL("bottling/"+toPath(Tools.GRINDINGDISK)));


// I can't believe this map didn't exist already...
Map<Block, Block> vanillaConcrete = new HashMap<>();
vanillaConcrete.put(Blocks.WHITE_CONCRETE_POWDER, Blocks.WHITE_CONCRETE);
vanillaConcrete.put(Blocks.ORANGE_CONCRETE_POWDER, Blocks.ORANGE_CONCRETE);
vanillaConcrete.put(Blocks.MAGENTA_CONCRETE_POWDER, Blocks.MAGENTA_CONCRETE);
vanillaConcrete.put(Blocks.LIGHT_BLUE_CONCRETE_POWDER, Blocks.LIGHT_BLUE_CONCRETE);
vanillaConcrete.put(Blocks.YELLOW_CONCRETE_POWDER, Blocks.YELLOW_CONCRETE);
vanillaConcrete.put(Blocks.LIME_CONCRETE_POWDER, Blocks.LIME_CONCRETE);
vanillaConcrete.put(Blocks.PINK_CONCRETE_POWDER, Blocks.PINK_CONCRETE);
vanillaConcrete.put(Blocks.GRAY_CONCRETE_POWDER, Blocks.GRAY_CONCRETE);
vanillaConcrete.put(Blocks.LIGHT_GRAY_CONCRETE_POWDER, Blocks.LIGHT_GRAY_CONCRETE);
vanillaConcrete.put(Blocks.CYAN_CONCRETE_POWDER, Blocks.CYAN_CONCRETE);
vanillaConcrete.put(Blocks.PURPLE_CONCRETE_POWDER, Blocks.PURPLE_CONCRETE);
vanillaConcrete.put(Blocks.BLUE_CONCRETE_POWDER, Blocks.BLUE_CONCRETE);
vanillaConcrete.put(Blocks.BROWN_CONCRETE_POWDER, Blocks.BROWN_CONCRETE);
vanillaConcrete.put(Blocks.GREEN_CONCRETE_POWDER, Blocks.GREEN_CONCRETE);
vanillaConcrete.put(Blocks.RED_CONCRETE_POWDER, Blocks.RED_CONCRETE);
vanillaConcrete.put(Blocks.BLACK_CONCRETE_POWDER, Blocks.BLACK_CONCRETE);
vanillaConcrete.forEach((powder, concrete) -> BottlingMachineRecipeBuilder.builder()
.output(concrete)
.input(powder)
.fluidInput(FluidTags.WATER, eighth_bucket)
.build(out, toRL("bottling/"+toPath(powder)))
);
}

private void crusher(RecipeOutput out)
Expand Down Expand Up @@ -247,6 +282,11 @@ private void crusher(RecipeOutput out)
.input(IETags.slag)
.setEnergy(1600)
.build(out, toRL("crusher/slag"));
CrusherRecipeBuilder.builder()
.output(StoneDecoration.SLAG_GRAVEL.asItem())
.input(StoneDecoration.SLAG_BRICK)
.setEnergy(1600)
.build(out, toRL("crusher/slag_brick"));
CrusherRecipeBuilder.builder()
.output(Items.SAND)
.input(Tags.Items.GLASS)
Expand Down
Loading

0 comments on commit 9c0d35b

Please sign in to comment.