Skip to content

Commit 5b5be70

Browse files
committed
Merge remote-tracking branch 'refs/remotes/forge/mc1.20.1/feature-dev' into mc1.20.1/fabric/feature-dev
# Conflicts: # build.gradle # src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java # src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelScreen.java # src/main/java/com/simibubi/create/content/logistics/stockTicker/StockKeeperRequestScreen.java # src/main/java/com/simibubi/create/content/trains/entity/ArrivalSoundQueue.java # src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/ValueBox.java # src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/ValueBoxRenderer.java
2 parents 0ddd673 + 50ab122 commit 5b5be70

File tree

47 files changed

+154
-66
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+154
-66
lines changed

src/main/java/com/simibubi/create/AllBlocks.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ public class AllBlocks {
879879
.properties(p -> p.forceSolidOff())
880880
.transform(pickaxeOnly())
881881
.blockstate(BlockStateGen.pipe())
882-
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
882+
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
883883
.item()
884884
.transform(customItemModel())
885885
.register();
@@ -918,7 +918,7 @@ public class AllBlocks {
918918
.build();
919919
}, BlockStateProperties.WATERLOGGED);
920920
})
921-
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
921+
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
922922
.loot((p, b) -> p.dropOther(b, FLUID_PIPE.get()))
923923
.register();
924924

@@ -927,7 +927,7 @@ public class AllBlocks {
927927
.properties(p -> p.mapColor(MapColor.STONE))
928928
.transform(pickaxeOnly())
929929
.blockstate(BlockStateGen.directionalBlockProviderIgnoresWaterlogged(true))
930-
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
930+
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
931931
.transform(CStress.setImpact(4.0))
932932
.item()
933933
.transform(customItemModel())
@@ -939,7 +939,7 @@ public class AllBlocks {
939939
.properties(p -> p.mapColor(MapColor.TERRACOTTA_YELLOW))
940940
.transform(pickaxeOnly())
941941
.blockstate(new SmartFluidPipeGenerator()::generate)
942-
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
942+
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
943943
.item()
944944
.transform(customItemModel())
945945
.register();
@@ -951,7 +951,7 @@ public class AllBlocks {
951951
.blockstate((c, p) -> BlockStateGen.directionalAxisBlock(c, p,
952952
(state, vertical) -> AssetLookup.partialBaseModel(c, p, vertical ? "vertical" : "horizontal",
953953
state.getValue(FluidValveBlock.ENABLED) ? "open" : "closed")))
954-
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
954+
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
955955
.item()
956956
.transform(customItemModel())
957957
.register();

src/main/java/com/simibubi/create/content/contraptions/Contraption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ private void readBlocksCompound(Tag compound, Level world, boolean usePalettedDe
990990
}
991991

992992
@Nullable
993-
private static BlockEntity readBlockEntity(Level level, StructureBlockInfo info, CompoundTag tag) {
993+
protected BlockEntity readBlockEntity(Level level, StructureBlockInfo info, CompoundTag tag) {
994994
BlockState state = info.state();
995995
BlockPos pos = info.pos();
996996
CompoundTag nbt = info.nbt();

src/main/java/com/simibubi/create/content/contraptions/bearing/BearingContraption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public boolean assemble(Level world, BlockPos pos) throws AssemblyException {
4949

5050
@Override
5151
public ContraptionType getType() {
52-
return AllContraptionTypes.BEARING.get();
52+
return AllContraptionTypes.BEARING.value();
5353
}
5454

5555
@Override

src/main/java/com/simibubi/create/content/contraptions/bearing/ClockworkContraption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class ClockworkContraption extends Contraption {
2626

2727
@Override
2828
public ContraptionType getType() {
29-
return AllContraptionTypes.CLOCKWORK.get();
29+
return AllContraptionTypes.CLOCKWORK.value();
3030
}
3131

3232
private void ignoreBlocks(Set<BlockPos> blocks, BlockPos anchor) {

src/main/java/com/simibubi/create/content/contraptions/bearing/StabilizedContraption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected boolean isAnchoringBlockAt(BlockPos pos) {
3838

3939
@Override
4040
public ContraptionType getType() {
41-
return AllContraptionTypes.STABILIZED.get();
41+
return AllContraptionTypes.STABILIZED.value();
4242
}
4343

4444
@Override

src/main/java/com/simibubi/create/content/contraptions/elevator/ElevatorContraption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public void readNBT(Level world, CompoundTag nbt, boolean spawnData) {
169169

170170
@Override
171171
public ContraptionType getType() {
172-
return AllContraptionTypes.ELEVATOR.get();
172+
return AllContraptionTypes.ELEVATOR.value();
173173
}
174174

175175
public void setClientYTarget(int clientYTarget) {

src/main/java/com/simibubi/create/content/contraptions/gantry/GantryContraption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected boolean isAnchoringBlockAt(BlockPos pos) {
5050

5151
@Override
5252
public ContraptionType getType() {
53-
return AllContraptionTypes.GANTRY.get();
53+
return AllContraptionTypes.GANTRY.value();
5454
}
5555

5656
public Direction getFacing() {

src/main/java/com/simibubi/create/content/contraptions/mounted/MountedContraption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public MountedContraption(CartMovementMode mode) {
4949

5050
@Override
5151
public ContraptionType getType() {
52-
return AllContraptionTypes.MOUNTED.get();
52+
return AllContraptionTypes.MOUNTED.value();
5353
}
5454

5555
@Override

src/main/java/com/simibubi/create/content/contraptions/piston/PistonContraption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class PistonContraption extends TranslatingContraption {
4848

4949
@Override
5050
public ContraptionType getType() {
51-
return AllContraptionTypes.PISTON.get();
51+
return AllContraptionTypes.PISTON.value();
5252
}
5353

5454
public PistonContraption() {

src/main/java/com/simibubi/create/content/contraptions/pulley/PulleyContraption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class PulleyContraption extends TranslatingContraption {
1515

1616
@Override
1717
public ContraptionType getType() {
18-
return AllContraptionTypes.PULLEY.get();
18+
return AllContraptionTypes.PULLEY.value();
1919
}
2020

2121
public PulleyContraption() {}

src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoCannonItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static Ammo getAmmo(Player player, ItemStack heldStack) {
7474
return null;
7575
}
7676

77-
return new Ammo(ammoStack, optionalType.get().get());
77+
return new Ammo(ammoStack, optionalType.get().value());
7878
}
7979

8080
@Override

src/main/java/com/simibubi/create/content/kinetics/clock/CuckooClockBlockEntity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
import com.simibubi.create.foundation.damageTypes.CreateDamageSources;
99

1010
import net.createmod.catnip.animation.AnimationTickHolder;
11-
import net.createmod.catnip.nbt.NBTHelper;
12-
import net.createmod.catnip.math.VecHelper;
1311
import net.createmod.catnip.animation.LerpedFloat;
1412
import net.createmod.catnip.animation.LerpedFloat.Chaser;
13+
import net.createmod.catnip.math.VecHelper;
14+
import net.createmod.catnip.nbt.NBTHelper;
1515
import net.minecraft.core.BlockPos;
1616
import net.minecraft.core.particles.ParticleTypes;
1717
import net.minecraft.nbt.CompoundTag;

src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelScreen.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ public static List<BigItemStack> convertRecipeToPackageOrderContext(CraftingReci
128128
if (ingredient.test(bigItemStack.stack))
129129
craftingIngredient = new BigItemStack(bigItemStack.stack, 1);
130130
craftingIngredients.add(craftingIngredient);
131-
131+
132132
if (width < 3 && (i + 1) % width == 0)
133133
for (int j = 0; j < 3 - width; j++)
134134
craftingIngredients.add(emptyIngredient);
135135
}
136136

137137
while (craftingIngredients.size() < 9)
138138
craftingIngredients.add(emptyIngredient);
139-
139+
140140
return craftingIngredients;
141141
}
142142

@@ -191,15 +191,15 @@ protected void init() {
191191
});
192192
newInputButton.setToolTip(CreateLang.translate("gui.factory_panel.connect_input")
193193
.component());
194-
194+
195195
relocateButton = new IconButton(x + 31, y + 67, AllIcons.I_MOVE_GAUGE);
196196
relocateButton.withCallback(() -> {
197197
FactoryPanelConnectionHandler.startRelocating(behaviour);
198198
minecraft.setScreen(null);
199199
});
200200
relocateButton.setToolTip(CreateLang.translate("gui.factory_panel.relocate")
201201
.component());
202-
202+
203203
if (!restocker) {
204204
addRenderableWidget(newInputButton);
205205
addRenderableWidget(relocateButton);
@@ -440,7 +440,7 @@ private void renderInputItem(GuiGraphics graphics, int slot, BigItemStack itemSt
440440
mouseX, mouseY);
441441
return;
442442
}
443-
443+
444444
if (itemStack.stack.isEmpty()) {
445445
graphics.renderComponentTooltip(font, List.of(CreateLang.translate("gui.factory_panel.empty_panel")
446446
.color(ScrollInput.HEADER_RGB)
@@ -583,14 +583,14 @@ public boolean mouseClicked(double mouseX, double mouseY, int pButton) {
583583
public void playButtonSound() {
584584
Minecraft.getInstance()
585585
.getSoundManager()
586-
.play(SimpleSoundInstance.forUI(SoundEvents.UI_BUTTON_CLICK.get(), 1.0f, 0.25f));
586+
.play(SimpleSoundInstance.forUI(SoundEvents.UI_BUTTON_CLICK.value(), 1.0f, 0.25f));
587587
}
588588

589589
@Override
590590
public boolean mouseScrolled(double mouseX, double mouseY, double pDelta) {
591591
int x = guiLeft;
592592
int y = guiTop;
593-
593+
594594
if (addressBox.mouseScrolled(mouseX, mouseY, pDelta))
595595
return true;
596596

src/main/java/com/simibubi/create/content/logistics/stockTicker/StockKeeperRequestScreen.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,12 +1080,12 @@ public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) {
10801080

10811081
if (!entry.hidden) {
10821082
hiddenCategories.add(indexOf);
1083-
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 0.75f, 1.5f);
1083+
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 1.5f);
10841084
}
10851085

10861086
else {
10871087
hiddenCategories.remove(indexOf);
1088-
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 0.75f, 0.675f);
1088+
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 0.675f);
10891089
}
10901090

10911091
refreshSearchNextTick = true;
@@ -1122,8 +1122,8 @@ public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) {
11221122
if (itemsToOrder.size() >= cols || rmb)
11231123
return true;
11241124
itemsToOrder.add(existingOrder = new BigItemStack(itemStack.copyWithCount(1), 0));
1125-
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.2f);
1126-
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 0.8f);
1125+
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.2f);
1126+
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 0.8f);
11271127
}
11281128

11291129
int current = existingOrder.count;
@@ -1132,8 +1132,8 @@ public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) {
11321132
existingOrder.count = current - transfer;
11331133
if (existingOrder.count <= 0) {
11341134
itemsToOrder.remove(existingOrder);
1135-
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.8f);
1136-
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 1.8f);
1135+
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.8f);
1136+
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 1.8f);
11371137
}
11381138
return true;
11391139
}
@@ -1189,8 +1189,8 @@ public boolean mouseScrolled(double mouseX, double mouseY, double delta) {
11891189
if (itemsToOrder.size() >= cols || remove)
11901190
return true;
11911191
itemsToOrder.add(existingOrder = new BigItemStack(entry.stack.copyWithCount(1), 0));
1192-
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.2f);
1193-
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 0.8f);
1192+
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.2f);
1193+
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 0.8f);
11941194
}
11951195

11961196
int current = existingOrder.count;
@@ -1199,8 +1199,8 @@ public boolean mouseScrolled(double mouseX, double mouseY, double delta) {
11991199
existingOrder.count = current - transfer;
12001200
if (existingOrder.count <= 0) {
12011201
itemsToOrder.remove(existingOrder);
1202-
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.8f);
1203-
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 1.8f);
1202+
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.8f);
1203+
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 1.8f);
12041204
} else if (existingOrder.count != current)
12051205
playUiSound(AllSoundEvents.SCROLL_VALUE.getMainEvent(), 0.25f, 1.2f);
12061206
return true;

src/main/java/com/simibubi/create/content/trains/entity/ArrivalSoundQueue.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock;
1414
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock.WhistleSize;
1515

16-
import net.createmod.catnip.nbt.NBTHelper;
1716
import net.createmod.catnip.data.Pair;
17+
import net.createmod.catnip.nbt.NBTHelper;
1818
import net.minecraft.core.BlockPos;
1919
import net.minecraft.nbt.CompoundTag;
2020
import net.minecraft.nbt.NbtUtils;
@@ -135,8 +135,7 @@ public static void play(CarriageContraptionEntity entity, StructureBlockInfo inf
135135
if (state.getBlock() instanceof NoteBlock nb) {
136136
float f = (float) Math.pow(2, (state.getValue(NoteBlock.NOTE) - 12) / 12.0);
137137
playSimple(entity, state.getValue(NoteBlock.INSTRUMENT)
138-
.getSoundEvent()
139-
.value(), 1, f);
138+
.getSoundEvent().value(), 1, f);
140139
}
141140

142141
if (state.getBlock() instanceof WhistleBlock && info.nbt() != null) {

src/main/java/com/simibubi/create/content/trains/entity/CarriageContraption.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,10 @@ protected Pair<StructureBlockInfo, BlockEntity> capture(Level world, BlockPos po
157157
.getStep(), toLocalPos(pos));
158158
}
159159

160-
if (blockState.getBlock() instanceof AbstractBogeyBlock<?> bogey) {
161-
boolean captureBE = bogey.captureBlockEntityForTrain();
160+
if (blockState.getBlock() instanceof AbstractBogeyBlock<?>) {
162161
bogeys++;
163162
if (bogeys == 2)
164163
secondBogeyPos = pos;
165-
return Pair.of(new StructureBlockInfo(pos, blockState, captureBE ? getBlockEntityNBT(world, pos) : null),
166-
captureBE ? world.getBlockEntity(pos) : null);
167164
}
168165

169166
MovingInteractionBehaviour behaviour = MovingInteractionBehaviour.REGISTRY.get(blockState);
@@ -187,6 +184,14 @@ protected Pair<StructureBlockInfo, BlockEntity> capture(Level world, BlockPos po
187184
return super.capture(world, pos);
188185
}
189186

187+
@Override
188+
protected BlockEntity readBlockEntity(Level level, StructureBlockInfo info, CompoundTag tag) {
189+
if (info.state().getBlock() instanceof AbstractBogeyBlock<?> bogey && !bogey.captureBlockEntityForTrain())
190+
return null; // Bogeys are typically rendered by the carriage contraption, not the BE
191+
192+
return super.readBlockEntity(level, info, tag);
193+
}
194+
190195
@Override
191196
public CompoundTag writeNBT(boolean spawnPacket) {
192197
CompoundTag tag = super.writeNBT(spawnPacket);
@@ -231,7 +236,7 @@ public boolean canBeStabilized(Direction facing, BlockPos localPos) {
231236

232237
@Override
233238
public ContraptionType getType() {
234-
return AllContraptionTypes.CARRIAGE.get();
239+
return AllContraptionTypes.CARRIAGE.value();
235240
}
236241

237242
public Direction getAssemblyDirection() {

src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/ValueBoxRenderer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ public static void renderItemIntoValueBox(ItemStack filter, PoseStack ms, MultiB
2828
Minecraft mc = Minecraft.getInstance();
2929
ItemRenderer itemRenderer = mc.getItemRenderer();
3030
BakedModel modelWithOverrides = itemRenderer.getModel(filter, null, null, 0);
31-
boolean blockItem =
32-
modelWithOverrides.isGui3d();
31+
boolean blockItem = modelWithOverrides.isGui3d();
3332
float scale = (!blockItem ? .5f : 1f) + 1 / 64f;
3433
float zOffset = (!blockItem ? -.15f : 0) + customZOffset(filter.getItem());
3534
ms.scale(scale, scale, scale);

src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/ValueSettingsBehaviour.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ default void onShortInteract(Player player, InteractionHand hand, Direction side
8787
default boolean bypassesInput(ItemStack mainhandItem) {
8888
return false;
8989
}
90-
90+
9191
default boolean mayInteract(Player player) {
9292
return true;
9393
}
94-
94+
9595
default int netId() {
9696
return 0;
9797
}
98-
98+
9999
}

src/main/resources/assets/create/models/block/chain_conveyor/item.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"scale":[ 0.4, 0.4, 0.4 ]
1111
},
1212
"fixed": {
13-
"rotation": [ 90, 0, 0 ],
13+
"rotation": [ 270, 180, 0 ],
1414
"translation": [ 0, 0, 0],
15-
"scale":[ 0.5, 0.5, 0.5 ]
15+
"scale":[ 0.375, 0.375, 0.375 ]
1616
}
1717
}
1818
}

src/main/resources/assets/create/models/block/clutch/item.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@
6161
}
6262
}
6363
],
64+
"display": {
65+
"fixed": {
66+
"rotation": [0, 90, 0],
67+
"scale": [0.5, 0.5, 0.5]
68+
}
69+
},
6470
"groups": [
6571
0,
6672
1,

src/main/resources/assets/create/models/block/diodes/latch_off.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
},
100100
"fixed": {
101101
"rotation": [ 270, 0, 0 ],
102-
"translation": [ 0, 0, -3],
102+
"translation": [ 0, 0, -5],
103103
"scale":[ 0.5, 0.5, 0.5 ]
104104
}
105105
}

src/main/resources/assets/create/models/block/diodes/latch_on.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
},
102102
"fixed": {
103103
"rotation": [ 270, 0, 0 ],
104-
"translation": [ 0, 0, -3],
104+
"translation": [ 0, 0, -5],
105105
"scale":[ 0.5, 0.5, 0.5 ]
106106
}
107107
}

0 commit comments

Comments
 (0)