Skip to content

Commit 760cfa3

Browse files
authored
Merge branch 'GregTechCEu:1.20.1' into 1.20.1
2 parents 90a871e + d24ec37 commit 760cfa3

File tree

5 files changed

+21
-5
lines changed

5 files changed

+21
-5
lines changed

src/main/java/com/gregtechceu/gtceu/api/blockentity/PipeBlockEntity.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,20 +391,23 @@ public Pair<GTToolType, InteractionResult> onToolClick(Set<GTToolType> toolTypes
391391
boolean isOpen = this.isConnected(gridSide);
392392
this.setConnection(gridSide, !isOpen, false);
393393
}
394+
playerIn.swing(hand);
394395
return Pair.of(getPipeTuneTool(), InteractionResult.CONSUME);
395396
} else if (toolTypes.contains(GTToolType.CROWBAR)) {
396397
if (coverBehavior != null) {
397398
if (!isRemote()) {
398399
getCoverContainer().removeCover(gridSide, playerIn);
400+
playerIn.swing(hand);
401+
return Pair.of(GTToolType.CROWBAR, InteractionResult.CONSUME);
399402
}
400-
return Pair.of(GTToolType.CROWBAR, InteractionResult.CONSUME);
401403
} else {
402404
if (frameMaterial != null) {
403405
Block.popResource(getLevel(), getPipePos(),
404406
GTBlocks.MATERIAL_BLOCKS.get(TagPrefix.frameGt, frameMaterial).asStack());
405407
frameMaterial = null;
408+
playerIn.swing(hand);
409+
return Pair.of(GTToolType.CROWBAR, InteractionResult.CONSUME);
406410
}
407-
return Pair.of(GTToolType.CROWBAR, InteractionResult.CONSUME);
408411
}
409412
}
410413

src/main/java/com/gregtechceu/gtceu/api/cover/CoverBehavior.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ public InteractionResult onScrewdriverClick(Player playerIn, InteractionHand han
152152
if (playerIn instanceof ServerPlayer serverPlayer) {
153153
CoverUIFactory.INSTANCE.openUI(this, serverPlayer);
154154
}
155-
return InteractionResult.SUCCESS;
155+
playerIn.swing(hand);
156+
return InteractionResult.CONSUME;
156157
}
157158
return InteractionResult.PASS;
158159
}

src/main/java/com/gregtechceu/gtceu/api/data/chemical/material/Material.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,11 @@ public Builder componentStacks(ImmutableList<MaterialStack> components) {
985985
return this;
986986
}
987987

988+
public Builder kjs$components(ImmutableList<MaterialStackWrapper> components) {
989+
compositionSupplier = components;
990+
return this;
991+
}
992+
988993
/**
989994
* Add {@link MaterialFlags} to this Material.<br>
990995
* Dependent Flags (for example, {@link MaterialFlags#GENERATE_LONG_ROD} requiring

src/main/java/com/gregtechceu/gtceu/api/machine/MetaMachine.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,10 @@ protected InteractionResult onHardHammerClick(Player playerIn, InteractionHand h
345345
if (this instanceof IMufflableMachine mufflableMachine) {
346346
if (!isRemote()) {
347347
mufflableMachine.setMuffled(!mufflableMachine.isMuffled());
348+
playerIn.sendSystemMessage(Component.translatable(mufflableMachine.isMuffled() ?
349+
"gtceu.machine.muffle.on" : "gtceu.machine.muffle.off"));
348350
}
349-
351+
playerIn.swing(hand);
350352
return InteractionResult.CONSUME;
351353
}
352354
return InteractionResult.PASS;
@@ -366,6 +368,7 @@ protected InteractionResult onWrenchClick(Player playerIn, InteractionHand hand,
366368
if (!isRemote()) {
367369
setFrontFacing(gridSide);
368370
}
371+
playerIn.swing(hand);
369372
return InteractionResult.CONSUME;
370373
} else {
371374
if (isRemote())
@@ -387,6 +390,7 @@ protected InteractionResult onWrenchClick(Player playerIn, InteractionHand hand,
387390
autoOutputFluid.setOutputFacingFluids(gridSide);
388391
}
389392
}
393+
playerIn.swing(hand);
390394
return InteractionResult.CONSUME;
391395
}
392396
}
@@ -400,6 +404,7 @@ protected InteractionResult onSoftMalletClick(Player playerIn, InteractionHand h
400404
playerIn.sendSystemMessage(Component.translatable(controllable.isWorkingEnabled() ?
401405
"behaviour.soft_hammer.enabled" : "behaviour.soft_hammer.disabled"));
402406
}
407+
playerIn.swing(hand);
403408
return InteractionResult.CONSUME;
404409
}
405410
return InteractionResult.PASS;
@@ -435,6 +440,7 @@ protected InteractionResult onScrewdriverClick(Player playerIn, InteractionHand
435440
}
436441
}
437442
if (flag) {
443+
playerIn.swing(hand);
438444
return InteractionResult.SUCCESS;
439445
}
440446
} else {
@@ -453,6 +459,7 @@ protected InteractionResult onScrewdriverClick(Player playerIn, InteractionHand
453459
}
454460
}
455461
if (flag) {
462+
playerIn.swing(hand);
456463
return InteractionResult.SUCCESS;
457464
}
458465
}

src/main/java/com/gregtechceu/gtceu/common/CommonProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public void registerPackFinders(AddPackFindersEvent event) {
252252
event.getPackType(),
253253
Pack.Position.BOTTOM,
254254
GTDynamicResourcePack::new));
255-
} else {
255+
} else if (event.getPackType() == PackType.SERVER_DATA) {
256256
// Clear old data
257257
GTDynamicDataPack.clearServer();
258258

0 commit comments

Comments
 (0)