mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-02-10 12:25:00 +01:00
Merge branch 'Creators-of-Create:mc1.18/dev' into patch-2
This commit is contained in:
commit
3eece900aa
11 changed files with 66 additions and 20 deletions
|
@ -3237,7 +3237,7 @@ c02335d1e84dffdc0c50e8ba2a27ce84366a5f6d data/create/advancements/steam_whistle.
|
||||||
0cb2a6357d3bcabb9dc2c87863a77cf53e8dcef1 data/create/advancements/stressometer_maxed.json
|
0cb2a6357d3bcabb9dc2c87863a77cf53e8dcef1 data/create/advancements/stressometer_maxed.json
|
||||||
566d3804e962be45c80c8debb2eb2761b2ded905 data/create/advancements/sturdy_sheet.json
|
566d3804e962be45c80c8debb2eb2761b2ded905 data/create/advancements/sturdy_sheet.json
|
||||||
1c431334d71f7e25b9bedc525c642c8cb5271b9f data/create/advancements/super_glue.json
|
1c431334d71f7e25b9bedc525c642c8cb5271b9f data/create/advancements/super_glue.json
|
||||||
58fd8b7440508a8128d2860eb70a2c5b7a2531f9 data/create/advancements/track_0.json
|
7c274fba06fb2bf357f817cf47d92ca63f3f8837 data/create/advancements/track_0.json
|
||||||
7388901df65f05074c2a2ad8156cbd76a069cdc6 data/create/advancements/track_crafting_factory.json
|
7388901df65f05074c2a2ad8156cbd76a069cdc6 data/create/advancements/track_crafting_factory.json
|
||||||
c6c3a803ff7738a36ac0956eda593f9774e567b5 data/create/advancements/track_signal.json
|
c6c3a803ff7738a36ac0956eda593f9774e567b5 data/create/advancements/track_signal.json
|
||||||
7f4cb81f3ddf26f47055b369b3f3af82f1894fcb data/create/advancements/train.json
|
7f4cb81f3ddf26f47055b369b3f3af82f1894fcb data/create/advancements/train.json
|
||||||
|
@ -5376,6 +5376,7 @@ ba2e448d208997c8327df19fac39748184d49465 data/create/tags/items/stone_types/ochr
|
||||||
14710201b8b392a414feddff420594fb7194b194 data/create/tags/items/stone_types/tuff.json
|
14710201b8b392a414feddff420594fb7194b194 data/create/tags/items/stone_types/tuff.json
|
||||||
634faefc734062b869002bd38aa4e5a2b06d8b9a data/create/tags/items/stone_types/veridium.json
|
634faefc734062b869002bd38aa4e5a2b06d8b9a data/create/tags/items/stone_types/veridium.json
|
||||||
d063e12c9ef75f39518c6d129ea35d833464d547 data/create/tags/items/toolboxes.json
|
d063e12c9ef75f39518c6d129ea35d833464d547 data/create/tags/items/toolboxes.json
|
||||||
|
ad8fa04f7bbbafd70d0ce158af78a35e899301e2 data/create/tags/items/tracks.json
|
||||||
2f4044c2989b9a8aa394c88617d67a6a310e6b1b data/create/tags/items/upright_on_belt.json
|
2f4044c2989b9a8aa394c88617d67a6a310e6b1b data/create/tags/items/upright_on_belt.json
|
||||||
50936b211d94167a35ec78c89954082a336b6269 data/create/tags/items/valve_handles.json
|
50936b211d94167a35ec78c89954082a336b6269 data/create/tags/items/valve_handles.json
|
||||||
f8d83f446d0a2071dca4481251339c4249b2fd3f data/create/tags/items/vanilla_stripped_logs.json
|
f8d83f446d0a2071dca4481251339c4249b2fd3f data/create/tags/items/vanilla_stripped_logs.json
|
||||||
|
|
|
@ -22,9 +22,7 @@
|
||||||
"conditions": {
|
"conditions": {
|
||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"items": [
|
"tag": "create:tracks"
|
||||||
"create:track"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"create:track"
|
||||||
|
]
|
||||||
|
}
|
|
@ -1534,6 +1534,7 @@ public class AllBlocks {
|
||||||
.tag(AllBlockTags.GIRDABLE_TRACKS.tag)
|
.tag(AllBlockTags.GIRDABLE_TRACKS.tag)
|
||||||
.lang("Train Track")
|
.lang("Train Track")
|
||||||
.item(TrackBlockItem::new)
|
.item(TrackBlockItem::new)
|
||||||
|
.tag(AllItemTags.TRACKS.tag)
|
||||||
.model((c, p) -> p.generated(c, Create.asResource("item/" + c.getName())))
|
.model((c, p) -> p.generated(c, Create.asResource("item/" + c.getName())))
|
||||||
.build()
|
.build()
|
||||||
.register();
|
.register();
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class AllTags {
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum NameSpace {
|
public enum NameSpace {
|
||||||
|
|
||||||
MOD(Create.ID, false, true),
|
MOD(Create.ID, false, true),
|
||||||
FORGE("forge"),
|
FORGE("forge"),
|
||||||
TIC("tconstruct"),
|
TIC("tconstruct"),
|
||||||
|
@ -77,7 +77,7 @@ public class AllTags {
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum AllBlockTags {
|
public enum AllBlockTags {
|
||||||
|
|
||||||
BRITTLE,
|
BRITTLE,
|
||||||
CASING,
|
CASING,
|
||||||
CONTRAPTION_INVENTORY_DENY,
|
CONTRAPTION_INVENTORY_DENY,
|
||||||
|
@ -154,11 +154,11 @@ public class AllTags {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void init() {}
|
private static void init() {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum AllItemTags {
|
public enum AllItemTags {
|
||||||
|
|
||||||
BLAZE_BURNER_FUEL_REGULAR(MOD, "blaze_burner_fuel/regular"),
|
BLAZE_BURNER_FUEL_REGULAR(MOD, "blaze_burner_fuel/regular"),
|
||||||
BLAZE_BURNER_FUEL_SPECIAL(MOD, "blaze_burner_fuel/special"),
|
BLAZE_BURNER_FUEL_SPECIAL(MOD, "blaze_burner_fuel/special"),
|
||||||
CASING,
|
CASING,
|
||||||
|
@ -173,6 +173,7 @@ public class AllTags {
|
||||||
SEATS,
|
SEATS,
|
||||||
SLEEPERS,
|
SLEEPERS,
|
||||||
TOOLBOXES,
|
TOOLBOXES,
|
||||||
|
TRACKS,
|
||||||
UPRIGHT_ON_BELT,
|
UPRIGHT_ON_BELT,
|
||||||
VALVE_HANDLES,
|
VALVE_HANDLES,
|
||||||
VANILLA_STRIPPED_LOGS,
|
VANILLA_STRIPPED_LOGS,
|
||||||
|
@ -225,11 +226,11 @@ public class AllTags {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void init() {}
|
private static void init() {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum AllFluidTags {
|
public enum AllFluidTags {
|
||||||
|
|
||||||
BOTTOMLESS_ALLOW(MOD, "bottomless/allow"),
|
BOTTOMLESS_ALLOW(MOD, "bottomless/allow"),
|
||||||
BOTTOMLESS_DENY(MOD, "bottomless/deny"),
|
BOTTOMLESS_DENY(MOD, "bottomless/deny"),
|
||||||
FAN_PROCESSING_CATALYSTS_BLASTING(MOD, "fan_processing_catalysts/blasting"),
|
FAN_PROCESSING_CATALYSTS_BLASTING(MOD, "fan_processing_catalysts/blasting"),
|
||||||
|
@ -280,9 +281,9 @@ public class AllTags {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void init() {}
|
private static void init() {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum AllEntityTags {
|
public enum AllEntityTags {
|
||||||
|
|
||||||
BLAZE_BURNER_CAPTURABLE,
|
BLAZE_BURNER_CAPTURABLE,
|
||||||
|
@ -328,9 +329,9 @@ public class AllTags {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void init() {}
|
private static void init() {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum AllRecipeSerializerTags {
|
public enum AllRecipeSerializerTags {
|
||||||
|
|
||||||
AUTOMATION_IGNORE,
|
AUTOMATION_IGNORE,
|
||||||
|
|
|
@ -133,7 +133,7 @@ public class ChromaticCompoundItem extends Item {
|
||||||
BlockPos.MutableBlockPos testPos =
|
BlockPos.MutableBlockPos testPos =
|
||||||
new BlockPos.MutableBlockPos(entityX, Math.min(Mth.floor(entity.getY()), localWorldHeight), entityZ);
|
new BlockPos.MutableBlockPos(entityX, Math.min(Mth.floor(entity.getY()), localWorldHeight), entityZ);
|
||||||
|
|
||||||
while (testPos.getY() > 0) {
|
while (testPos.getY() > minHeight) {
|
||||||
testPos.move(Direction.DOWN);
|
testPos.move(Direction.DOWN);
|
||||||
BlockState state = world.getBlockState(testPos);
|
BlockState state = world.getBlockState(testPos);
|
||||||
if (state.getLightBlock(world, testPos) >= 15 && state.getBlock() != Blocks.BEDROCK)
|
if (state.getLightBlock(world, testPos) >= 15 && state.getBlock() != Blocks.BEDROCK)
|
||||||
|
|
|
@ -107,6 +107,8 @@ public class EdgeData {
|
||||||
if (!hasSignalBoundaries())
|
if (!hasSignalBoundaries())
|
||||||
return getEffectiveEdgeGroupId(graph);
|
return getEffectiveEdgeGroupId(graph);
|
||||||
SignalBoundary firstSignal = next(EdgePointType.SIGNAL, 0);
|
SignalBoundary firstSignal = next(EdgePointType.SIGNAL, 0);
|
||||||
|
if (firstSignal == null)
|
||||||
|
return null;
|
||||||
UUID currentGroup = firstSignal.getGroup(edge.node1);
|
UUID currentGroup = firstSignal.getGroup(edge.node1);
|
||||||
|
|
||||||
for (TrackEdgePoint trackEdgePoint : getPoints()) {
|
for (TrackEdgePoint trackEdgePoint : getPoints()) {
|
||||||
|
|
|
@ -505,7 +505,7 @@ public class TrackGraph {
|
||||||
|
|
||||||
SignalEdgeGroup group = Create.RAILWAYS.signalEdgeGroups.get(groupId);
|
SignalEdgeGroup group = Create.RAILWAYS.signalEdgeGroups.get(groupId);
|
||||||
SignalEdgeGroup otherGroup = Create.RAILWAYS.signalEdgeGroups.get(otherGroupId);
|
SignalEdgeGroup otherGroup = Create.RAILWAYS.signalEdgeGroups.get(otherGroupId);
|
||||||
if (group == null || otherGroup == null)
|
if (group == null || otherGroup == null || groupId == null || otherGroupId == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
intersection.groupId = groupId;
|
intersection.groupId = groupId;
|
||||||
|
|
|
@ -23,6 +23,7 @@ import com.mojang.logging.LogUtils;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.AllFluids;
|
import com.simibubi.create.AllFluids;
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
|
import com.simibubi.create.AllTags.AllItemTags;
|
||||||
import com.simibubi.create.foundation.advancement.CreateAdvancement.Builder;
|
import com.simibubi.create.foundation.advancement.CreateAdvancement.Builder;
|
||||||
|
|
||||||
import net.minecraft.advancements.Advancement;
|
import net.minecraft.advancements.Advancement;
|
||||||
|
@ -328,7 +329,7 @@ public class AllAdvancements implements DataProvider {
|
||||||
.description("Create Chocolate Glazed Berries, a Honeyed Apple, and a Sweet Roll all from the same Spout")
|
.description("Create Chocolate Glazed Berries, a Honeyed Apple, and a Sweet Roll all from the same Spout")
|
||||||
.after(STEAM_ENGINE_MAXED)
|
.after(STEAM_ENGINE_MAXED)
|
||||||
.special(EXPERT)),
|
.special(EXPERT)),
|
||||||
|
|
||||||
DIVING_SUIT_LAVA = create("diving_suit_lava", b -> b.icon(AllItems.NETHERITE_DIVING_HELMET)
|
DIVING_SUIT_LAVA = create("diving_suit_lava", b -> b.icon(AllItems.NETHERITE_DIVING_HELMET)
|
||||||
.title("Swimming with the Striders")
|
.title("Swimming with the Striders")
|
||||||
.description("Attempt to take a dive in lava with your netherite diving gear")
|
.description("Attempt to take a dive in lava with your netherite diving gear")
|
||||||
|
@ -543,7 +544,7 @@ public class AllAdvancements implements DataProvider {
|
||||||
TRAIN_TRACK = create("track_0", b -> b.icon(AllBlocks.TRACK)
|
TRAIN_TRACK = create("track_0", b -> b.icon(AllBlocks.TRACK)
|
||||||
.title("A New Gauge")
|
.title("A New Gauge")
|
||||||
.description("Obtain some Train Tracks")
|
.description("Obtain some Train Tracks")
|
||||||
.whenIconCollected()
|
.whenItemCollected(AllItemTags.TRACKS.tag)
|
||||||
.after(STURDY_SHEET)),
|
.after(STURDY_SHEET)),
|
||||||
|
|
||||||
TRAIN_WHISTLE = create("train_whistle", b -> b.icon(AllBlocks.STEAM_WHISTLE)
|
TRAIN_WHISTLE = create("train_whistle", b -> b.icon(AllBlocks.STEAM_WHISTLE)
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
|
||||||
import com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour;
|
import com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour;
|
||||||
import com.simibubi.create.foundation.item.ItemHelper.ExtractionCountMode;
|
import com.simibubi.create.foundation.item.ItemHelper.ExtractionCountMode;
|
||||||
import com.simibubi.create.foundation.utility.BlockFace;
|
import com.simibubi.create.foundation.utility.BlockFace;
|
||||||
|
import com.simibubi.create.foundation.utility.HashableNonNullConsumer;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
@ -102,7 +103,7 @@ public abstract class CapManipulationBehaviourBase<T, S extends CapManipulationB
|
||||||
amount = filter.getAmount();
|
amount = filter.getAmount();
|
||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExtractionCountMode getModeFromFilter() {
|
public ExtractionCountMode getModeFromFilter() {
|
||||||
ExtractionCountMode mode = ExtractionCountMode.UPTO;
|
ExtractionCountMode mode = ExtractionCountMode.UPTO;
|
||||||
FilteringBehaviour filter = blockEntity.getBehaviour(FilteringBehaviour.TYPE);
|
FilteringBehaviour filter = blockEntity.getBehaviour(FilteringBehaviour.TYPE);
|
||||||
|
@ -128,7 +129,7 @@ public abstract class CapManipulationBehaviourBase<T, S extends CapManipulationB
|
||||||
targetCapability =
|
targetCapability =
|
||||||
bypassSided ? invBE.getCapability(capability) : invBE.getCapability(capability, targetBlockFace.getFace());
|
bypassSided ? invBE.getCapability(capability) : invBE.getCapability(capability, targetBlockFace.getFace());
|
||||||
if (targetCapability.isPresent())
|
if (targetCapability.isPresent())
|
||||||
targetCapability.addListener(this::onHandlerInvalidated);
|
targetCapability.addListener(new HashableNonNullConsumer<>(this::onHandlerInvalidated, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.simibubi.create.foundation.utility;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import net.minecraftforge.common.util.NonNullConsumer;
|
||||||
|
|
||||||
|
public class HashableNonNullConsumer<T, H> implements NonNullConsumer<T> {
|
||||||
|
private final NonNullConsumer<T> consumer;
|
||||||
|
private final H hashKey;
|
||||||
|
|
||||||
|
public HashableNonNullConsumer(NonNullConsumer<T> consumer, H hashKey) {
|
||||||
|
this.consumer = consumer;
|
||||||
|
this.hashKey = hashKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void accept(@Nonnull T t) {
|
||||||
|
consumer.accept(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
HashableNonNullConsumer<?, ?> that = (HashableNonNullConsumer<?, ?>) o;
|
||||||
|
return Objects.equals(hashKey, that.hashKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(hashKey);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue