Skip to content

Commit

Permalink
Merge branch '1.20.1' into yo/recipe-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungOnionMC authored Jul 30, 2024
2 parents f2e8202 + d24ec37 commit 32a3207
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,20 +391,23 @@ public Pair<GTToolType, InteractionResult> onToolClick(Set<GTToolType> toolTypes
boolean isOpen = this.isConnected(gridSide);
this.setConnection(gridSide, !isOpen, false);
}
playerIn.swing(hand);
return Pair.of(getPipeTuneTool(), InteractionResult.CONSUME);
} else if (toolTypes.contains(GTToolType.CROWBAR)) {
if (coverBehavior != null) {
if (!isRemote()) {
getCoverContainer().removeCover(gridSide, playerIn);
playerIn.swing(hand);
return Pair.of(GTToolType.CROWBAR, InteractionResult.CONSUME);
}
return Pair.of(GTToolType.CROWBAR, InteractionResult.CONSUME);
} else {
if (frameMaterial != null) {
Block.popResource(getLevel(), getPipePos(),
GTBlocks.MATERIAL_BLOCKS.get(TagPrefix.frameGt, frameMaterial).asStack());
frameMaterial = null;
playerIn.swing(hand);
return Pair.of(GTToolType.CROWBAR, InteractionResult.CONSUME);
}
return Pair.of(GTToolType.CROWBAR, InteractionResult.CONSUME);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ public InteractionResult onScrewdriverClick(Player playerIn, InteractionHand han
if (playerIn instanceof ServerPlayer serverPlayer) {
CoverUIFactory.INSTANCE.openUI(this, serverPlayer);
}
return InteractionResult.SUCCESS;
playerIn.swing(hand);
return InteractionResult.CONSUME;
}
return InteractionResult.PASS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,11 @@ public Builder componentStacks(ImmutableList<MaterialStack> components) {
return this;
}

public Builder kjs$components(ImmutableList<MaterialStackWrapper> components) {
compositionSupplier = components;
return this;
}

/**
* Add {@link MaterialFlags} to this Material.<br>
* Dependent Flags (for example, {@link MaterialFlags#GENERATE_LONG_ROD} requiring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,10 @@ protected InteractionResult onHardHammerClick(Player playerIn, InteractionHand h
if (this instanceof IMufflableMachine mufflableMachine) {
if (!isRemote()) {
mufflableMachine.setMuffled(!mufflableMachine.isMuffled());
playerIn.sendSystemMessage(Component.translatable(mufflableMachine.isMuffled() ?
"gtceu.machine.muffle.on" : "gtceu.machine.muffle.off"));
}

playerIn.swing(hand);
return InteractionResult.CONSUME;
}
return InteractionResult.PASS;
Expand All @@ -366,6 +368,7 @@ protected InteractionResult onWrenchClick(Player playerIn, InteractionHand hand,
if (!isRemote()) {
setFrontFacing(gridSide);
}
playerIn.swing(hand);
return InteractionResult.CONSUME;
} else {
if (isRemote())
Expand All @@ -387,6 +390,7 @@ protected InteractionResult onWrenchClick(Player playerIn, InteractionHand hand,
autoOutputFluid.setOutputFacingFluids(gridSide);
}
}
playerIn.swing(hand);
return InteractionResult.CONSUME;
}
}
Expand All @@ -400,6 +404,7 @@ protected InteractionResult onSoftMalletClick(Player playerIn, InteractionHand h
playerIn.sendSystemMessage(Component.translatable(controllable.isWorkingEnabled() ?
"behaviour.soft_hammer.enabled" : "behaviour.soft_hammer.disabled"));
}
playerIn.swing(hand);
return InteractionResult.CONSUME;
}
return InteractionResult.PASS;
Expand Down Expand Up @@ -435,6 +440,7 @@ protected InteractionResult onScrewdriverClick(Player playerIn, InteractionHand
}
}
if (flag) {
playerIn.swing(hand);
return InteractionResult.SUCCESS;
}
} else {
Expand All @@ -453,6 +459,7 @@ protected InteractionResult onScrewdriverClick(Player playerIn, InteractionHand
}
}
if (flag) {
playerIn.swing(hand);
return InteractionResult.SUCCESS;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void registerPackFinders(AddPackFindersEvent event) {
event.getPackType(),
Pack.Position.BOTTOM,
GTDynamicResourcePack::new));
} else {
} else if (event.getPackType() == PackType.SERVER_DATA) {
// Clear old data
GTDynamicDataPack.clearServer();

Expand Down

0 comments on commit 32a3207

Please sign in to comment.