-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this could work, if access transformers would work
- Loading branch information
Showing
7 changed files
with
128 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
public net.minecraft.client.Minecraft pausePartialTick | ||
public net.minecraft.client.gui.Font getFontSet(Lnet/minecraft/resources/ResourceLocation;)Lnet/minecraft/client/gui/font/FontSet; | ||
public net.minecraft.client.gui.screens.TitleScreen panorama | ||
public net.minecraft.client.multiplayer.ClientPacketListener serverChunkRadius | ||
protected net.minecraft.client.particle.Particle stoppedByCollision | ||
public net.minecraft.client.renderer.ItemInHandRenderer mainHandItem | ||
public net.minecraft.client.renderer.ItemInHandRenderer offHandItem | ||
public net.minecraft.client.renderer.entity.ItemRenderer textureManager | ||
|
||
public-f net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket flyingSpeed | ||
|
||
public net.minecraft.server.MinecraftServer storageSource | ||
public net.minecraft.server.network.ServerGamePacketListenerImpl aboveGroundTickCount | ||
public net.minecraft.server.network.ServerGamePacketListenerImpl aboveGroundVehicleTickCount | ||
|
||
public net.minecraft.world.entity.Entity removalReason | ||
protected net.minecraft.world.entity.Entity positionRider(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/entity/Entity$MoveFunction;)V | ||
public net.minecraft.world.entity.LivingEntity jumping | ||
|
||
public-f net.minecraft.world.item.HoneycombItem WAXABLES | ||
public net.minecraft.world.item.alchemy.PotionBrewing POTION_MIXES | ||
public net.minecraft.world.item.alchemy.PotionBrewing CONTAINER_MIXES | ||
public net.minecraft.world.item.alchemy.PotionBrewing ALLOWED_CONTAINER | ||
public net.minecraft.world.item.crafting.Ingredient values | ||
public net.minecraft.world.item.crafting.RecipeManager recipes | ||
|
||
public net.minecraft.world.level.BaseSpawner spawnPotentials | ||
public net.minecraft.world.level.BaseSpawner nextSpawnData | ||
public net.minecraft.world.level.biome.BiomeManager biomeZoomSeed | ||
public net.minecraft.world.level.block.entity.BeaconBlockEntity beamSections | ||
public net.minecraft.world.level.chunk.HashMapPalette values | ||
public net.minecraft.world.level.chunk PaletteResize | ||
|
||
public net.minecraft.client.model.geom.ModelPart cubes | ||
public net.minecraft.client.model.geom.ModelPart children | ||
public net.minecraft.client.model.AgeableListModel scaleHead | ||
public net.minecraft.client.model.AgeableListModel babyYHeadOffset | ||
public net.minecraft.client.model.AgeableListModel babyZHeadOffset | ||
public net.minecraft.client.model.AgeableListModel babyHeadScale | ||
public net.minecraft.client.model.AgeableListModel babyBodyScale | ||
public net.minecraft.client.model.AgeableListModel bodyYOffset | ||
|
||
public net.minecraft.client.gui.components.CommandSuggestions suggestions | ||
public net.minecraft.client.gui.components.CommandSuggestions$SuggestionsList <init>(Lnet/minecraft/client/gui/components/CommandSuggestions;IIILjava/util/List;Z)V |
16 changes: 16 additions & 0 deletions
16
src/main/java/dev/rdh/createunlimited/asm/mixin/glue/ContraptionMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package dev.rdh.createunlimited.asm.mixin.glue; | ||
|
||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
import com.simibubi.create.content.contraptions.Contraption; | ||
|
||
@Mixin(Contraption.class) | ||
public abstract class ContraptionMixin { | ||
@ModifyExpressionValue(method = "moveBlock", at = @At(value = "INVOKE", target = "Lcom/simibubi/create/content/contraptions/glue/SuperGlueEntity;isGlued(Lnet/minecraft/world/level/LevelAccessor;Lnet/minecraft/core/BlockPos;Lnet/minecraft/core/Direction;Ljava/util/Set;)Z")) | ||
private boolean a(boolean original) { | ||
return true; | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
src/main/java/dev/rdh/createunlimited/asm/mixin/glue/SuperGlueSelectionHelperMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package dev.rdh.createunlimited.asm.mixin.glue; | ||
|
||
|
||
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Overwrite; | ||
|
||
import com.simibubi.create.content.contraptions.glue.SuperGlueEntity; | ||
import com.simibubi.create.content.contraptions.glue.SuperGlueSelectionHelper; | ||
|
||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.level.block.Block; | ||
import net.minecraft.world.level.block.Blocks; | ||
import net.minecraft.world.phys.AABB; | ||
|
||
import java.util.Set; | ||
|
||
@Mixin(SuperGlueSelectionHelper.class) | ||
public abstract class SuperGlueSelectionHelperMixin { | ||
/** | ||
* @author rdh | ||
* @reason test | ||
*/ | ||
@Overwrite | ||
public static Set<BlockPos> searchGlueGroup(Level level, BlockPos startPos, BlockPos endPos, boolean includeOther) { | ||
if(endPos == null || startPos == null) { | ||
return null; | ||
} | ||
|
||
AABB bb = new AABB(startPos, endPos); | ||
Set<BlockPos> blocks = new ObjectOpenHashSet<>(); | ||
for(double posx = bb.minX; posx <= bb.maxX; posx++) { | ||
for(double posy = bb.minY; posy <= bb.maxY; posy++) { | ||
for(double posz = bb.minZ; posz <= bb.maxZ; posz++) { | ||
BlockPos pos = new BlockPos(posx, posy, posz); | ||
Block block = level.getBlockState(pos).getBlock(); | ||
|
||
if(block != Blocks.AIR && block != Blocks.WATER) { | ||
blocks.add(pos); | ||
} | ||
} | ||
} | ||
} | ||
|
||
return blocks; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters