It compiles
This commit is contained in:
parent
40c0c59576
commit
4be4cb8c4d
3 changed files with 1 additions and 34 deletions
|
@ -1,32 +0,0 @@
|
||||||
package org.dimdev.dimdoors.mixin;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
import com.mojang.datafixers.util.Pair;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.Unique;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
|
||||||
|
|
||||||
import net.minecraft.structure.pool.StructurePool;
|
|
||||||
import net.minecraft.structure.pool.StructurePoolElement;
|
|
||||||
import net.minecraft.structure.processor.StructureProcessorLists;
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
|
|
||||||
@Mixin(StructurePool.class)
|
|
||||||
public class StructurePoolMixin {
|
|
||||||
@Unique
|
|
||||||
private static final Identifier HOUSES_ID = new Identifier("bastion/treasure/extensions/houses");
|
|
||||||
|
|
||||||
@ModifyVariable(method = "<init>(Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Ljava/util/List;Lnet/minecraft/structure/pool/StructurePool$Projection;)V", at = @At("HEAD"))
|
|
||||||
private static List<Pair<Function<StructurePool.Projection, ? extends StructurePoolElement>, Integer>> thing(List<Pair<Function<StructurePool.Projection, ? extends StructurePoolElement>, Integer>> list, Identifier id, Identifier terminatorsId, List<Pair<Function<StructurePool.Projection, ? extends StructurePoolElement>, Integer>> elementCounts, StructurePool.Projection projection) {
|
|
||||||
if (id.equals(HOUSES_ID)) {
|
|
||||||
List<Pair<Function<StructurePool.Projection, ? extends StructurePoolElement>, Integer>> copy = new ArrayList<>(list);
|
|
||||||
copy.add(Pair.of(StructurePoolElement.ofProcessedSingle("dimdoors:bastion/treasure/houses/bastion_gateway", StructureProcessorLists.TREASURE_ROOMS), 1));
|
|
||||||
return copy;
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -29,7 +29,7 @@ public abstract class ClientPlayerInteractionManagerMixin {
|
||||||
@Shadow
|
@Shadow
|
||||||
protected abstract void sendSequencedPacket(ClientWorld world, SequencedPacketCreator packetCreator);
|
protected abstract void sendSequencedPacket(ClientWorld world, SequencedPacketCreator packetCreator);
|
||||||
|
|
||||||
@Inject(method = "interactBlock", cancellable = true, at = @At(value = "NEW", target = "org/apache/commons/lang3/mutable/MutableObject"))
|
@Inject(method = "interactBlock", cancellable = true, at = @At(value = "NEW", target = "org/apache/commons/lang3/mutable/MutableObject", remap = false))
|
||||||
public void useItemOnBlock(ClientPlayerEntity player, Hand hand, BlockHitResult hitResult, CallbackInfoReturnable<ActionResult> info) {
|
public void useItemOnBlock(ClientPlayerEntity player, Hand hand, BlockHitResult hitResult, CallbackInfoReturnable<ActionResult> info) {
|
||||||
ActionResult result = UseItemOnBlockCallback.EVENT.invoker().useItemOnBlock(player, client.world, hand, hitResult);
|
ActionResult result = UseItemOnBlockCallback.EVENT.invoker().useItemOnBlock(player, client.world, hand, hitResult);
|
||||||
if (result == ActionResult.PASS) {
|
if (result == ActionResult.PASS) {
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
"ServerPlayerInteractionManagerMixin",
|
"ServerPlayerInteractionManagerMixin",
|
||||||
"ServerPlayNetworkHandlerMixin",
|
"ServerPlayNetworkHandlerMixin",
|
||||||
"ServerWorldMixin",
|
"ServerWorldMixin",
|
||||||
"StructurePoolMixin",
|
|
||||||
"TrapDoorMixin",
|
"TrapDoorMixin",
|
||||||
"WorldMixin",
|
"WorldMixin",
|
||||||
"accessor.ChunkGeneratorAccessor",
|
"accessor.ChunkGeneratorAccessor",
|
||||||
|
|
Loading…
Reference in a new issue