mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 14:50:56 +00:00
rename mixins for mojmap
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
|||||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||||
|
|
||||||
@Mixin(AbstractSpawner.class)
|
@Mixin(AbstractSpawner.class)
|
||||||
public interface MobSpawnerLogicAccessor {
|
public interface AbstractSpawnerAccessor {
|
||||||
@Invoker("getEntityId")
|
@Invoker("getEntityId")
|
||||||
ResourceLocation callGetEntityId();
|
ResourceLocation callGetEntityId();
|
||||||
}
|
}
|
||||||
+2
-2
@@ -26,9 +26,9 @@ public abstract class ConfiguredFeatureMixin {
|
|||||||
@SuppressWarnings({"try"})
|
@SuppressWarnings({"try"})
|
||||||
public boolean terra$plant(Location l, Random r) {
|
public boolean terra$plant(Location l, Random r) {
|
||||||
try(ProfileFrame ignore = TerraForgePlugin.getInstance().getProfiler().profile("forge_tree")) {
|
try(ProfileFrame ignore = TerraForgePlugin.getInstance().getProfiler().profile("forge_tree")) {
|
||||||
ISeedReader fabricWorldAccess = ((ISeedReader) l.getWorld());
|
ISeedReader world = ((ISeedReader) l.getWorld());
|
||||||
ChunkGenerator generatorWrapper = (ChunkGenerator) l.getWorld().getGenerator();
|
ChunkGenerator generatorWrapper = (ChunkGenerator) l.getWorld().getGenerator();
|
||||||
return place(fabricWorldAccess, generatorWrapper, r, new BlockPos(l.getBlockX(), l.getBlockY(), l.getBlockZ()));
|
return place(world, generatorWrapper, r, new BlockPos(l.getBlockX(), l.getBlockY(), l.getBlockZ()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ import javax.annotation.Nullable;
|
|||||||
|
|
||||||
@Mixin(TileEntity.class)
|
@Mixin(TileEntity.class)
|
||||||
@Implements(@Interface(iface = BlockState.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = BlockState.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class BlockEntityMixin {
|
public abstract class TileEntityMixin {
|
||||||
@Shadow
|
@Shadow
|
||||||
protected BlockPos worldPosition;
|
protected BlockPos worldPosition;
|
||||||
|
|
||||||
+2
-2
@@ -2,7 +2,7 @@ package com.dfsek.terra.forge.mixin.implementations.block.state;
|
|||||||
|
|
||||||
import com.dfsek.terra.api.platform.block.state.Container;
|
import com.dfsek.terra.api.platform.block.state.Container;
|
||||||
import com.dfsek.terra.api.platform.inventory.Inventory;
|
import com.dfsek.terra.api.platform.inventory.Inventory;
|
||||||
import com.dfsek.terra.forge.mixin.implementations.block.BlockEntityMixin;
|
import com.dfsek.terra.forge.mixin.implementations.block.TileEntityMixin;
|
||||||
import net.minecraft.tileentity.LockableLootTileEntity;
|
import net.minecraft.tileentity.LockableLootTileEntity;
|
||||||
import org.spongepowered.asm.mixin.Implements;
|
import org.spongepowered.asm.mixin.Implements;
|
||||||
import org.spongepowered.asm.mixin.Interface;
|
import org.spongepowered.asm.mixin.Interface;
|
||||||
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
|||||||
|
|
||||||
@Mixin(LockableLootTileEntity.class)
|
@Mixin(LockableLootTileEntity.class)
|
||||||
@Implements(@Interface(iface = Container.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = Container.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class LootableContainerBlockEntityMixin extends BlockEntityMixin {
|
public abstract class LockableLootTileEntityMixin extends TileEntityMixin {
|
||||||
public Inventory terra$getInventory() {
|
public Inventory terra$getInventory() {
|
||||||
return (Inventory) this;
|
return (Inventory) this;
|
||||||
}
|
}
|
||||||
+4
-4
@@ -4,8 +4,8 @@ import com.dfsek.terra.api.platform.block.state.MobSpawner;
|
|||||||
import com.dfsek.terra.api.platform.block.state.SerialState;
|
import com.dfsek.terra.api.platform.block.state.SerialState;
|
||||||
import com.dfsek.terra.api.platform.entity.EntityType;
|
import com.dfsek.terra.api.platform.entity.EntityType;
|
||||||
import com.dfsek.terra.forge.TerraForgePlugin;
|
import com.dfsek.terra.forge.TerraForgePlugin;
|
||||||
import com.dfsek.terra.forge.mixin.access.MobSpawnerLogicAccessor;
|
import com.dfsek.terra.forge.mixin.access.AbstractSpawnerAccessor;
|
||||||
import com.dfsek.terra.forge.mixin.implementations.block.BlockEntityMixin;
|
import com.dfsek.terra.forge.mixin.implementations.block.TileEntityMixin;
|
||||||
import net.minecraft.tileentity.MobSpawnerTileEntity;
|
import net.minecraft.tileentity.MobSpawnerTileEntity;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
import net.minecraft.world.spawner.AbstractSpawner;
|
import net.minecraft.world.spawner.AbstractSpawner;
|
||||||
@@ -17,12 +17,12 @@ import org.spongepowered.asm.mixin.Shadow;
|
|||||||
|
|
||||||
@Mixin(MobSpawnerTileEntity.class)
|
@Mixin(MobSpawnerTileEntity.class)
|
||||||
@Implements(@Interface(iface = MobSpawner.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = MobSpawner.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class MobSpawnerBlockEntityMixin extends BlockEntityMixin {
|
public abstract class MobSpawnerTileEntityMixin extends TileEntityMixin {
|
||||||
@Shadow
|
@Shadow
|
||||||
public abstract AbstractSpawner getSpawner();
|
public abstract AbstractSpawner getSpawner();
|
||||||
|
|
||||||
public EntityType terra$getSpawnedType() {
|
public EntityType terra$getSpawnedType() {
|
||||||
return (EntityType) Registry.ENTITY_TYPE.get(((MobSpawnerLogicAccessor) getSpawner()).callGetEntityId());
|
return (EntityType) Registry.ENTITY_TYPE.get(((AbstractSpawnerAccessor) getSpawner()).callGetEntityId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void terra$setSpawnedType(@NotNull EntityType creatureType) {
|
public void terra$setSpawnedType(@NotNull EntityType creatureType) {
|
||||||
+1
-1
@@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
|||||||
|
|
||||||
@Mixin(SignTileEntity.class)
|
@Mixin(SignTileEntity.class)
|
||||||
@Implements(@Interface(iface = Sign.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = Sign.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class SignBlockEntityMixin {
|
public abstract class SignTileEntityMixin {
|
||||||
@Shadow
|
@Shadow
|
||||||
@Final
|
@Final
|
||||||
private ITextComponent[] messages;
|
private ITextComponent[] messages;
|
||||||
+1
-1
@@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
|||||||
|
|
||||||
@Mixin(net.minecraft.world.chunk.Chunk.class)
|
@Mixin(net.minecraft.world.chunk.Chunk.class)
|
||||||
@Implements(@Interface(iface = Chunk.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = Chunk.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class WorldChunkMixin {
|
public abstract class ChunkMixin {
|
||||||
|
|
||||||
@Shadow
|
@Shadow
|
||||||
@Final
|
@Final
|
||||||
+1
-1
@@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
|||||||
|
|
||||||
@Mixin(WorldGenRegion.class)
|
@Mixin(WorldGenRegion.class)
|
||||||
@Implements(@Interface(iface = Chunk.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = Chunk.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class ChunkRegionMixin {
|
public abstract class WorldGenRegionMixin {
|
||||||
@Final
|
@Final
|
||||||
@Shadow
|
@Shadow
|
||||||
private int x;
|
private int x;
|
||||||
+1
-1
@@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
|||||||
|
|
||||||
@Mixin(ChunkPrimer.class)
|
@Mixin(ChunkPrimer.class)
|
||||||
@Implements(@Interface(iface = ChunkData.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = ChunkData.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class ProtoChunkMixin {
|
public abstract class ChunkPrimerMixin {
|
||||||
@Shadow
|
@Shadow
|
||||||
public abstract BlockState getBlockState(BlockPos pos);
|
public abstract BlockState getBlockState(BlockPos pos);
|
||||||
|
|
||||||
+1
-1
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
|||||||
|
|
||||||
@Mixin(CommandSource.class)
|
@Mixin(CommandSource.class)
|
||||||
@Implements(@Interface(iface = CommandSender.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = CommandSender.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class ServerCommandSourceMixin {
|
public abstract class CommandSourceMixin {
|
||||||
@Shadow
|
@Shadow
|
||||||
public abstract void sendSuccess(ITextComponent p_197030_1_, boolean p_197030_2_);
|
public abstract void sendSuccess(ITextComponent p_197030_1_, boolean p_197030_2_);
|
||||||
|
|
||||||
+1
-1
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
|||||||
|
|
||||||
@Mixin(LockableTileEntity.class)
|
@Mixin(LockableTileEntity.class)
|
||||||
@Implements(@Interface(iface = Inventory.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = Inventory.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public class LockableContainerBlockEntityMixin {
|
public class LockableTileEntityMixin {
|
||||||
public Object terra$getHandle() {
|
public Object terra$getHandle() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
+2
-2
@@ -71,11 +71,11 @@ public abstract class ServerWorldMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overridden in the same manner as {@link ChunkRegionMixin#hashCode()}
|
* Overridden in the same manner as {@link WorldGenRegionMixin#hashCode()}
|
||||||
*
|
*
|
||||||
* @param other Another object
|
* @param other Another object
|
||||||
* @return Whether this world is the same as other.
|
* @return Whether this world is the same as other.
|
||||||
* @see ChunkRegionMixin#hashCode()
|
* @see WorldGenRegionMixin#hashCode()
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("ConstantConditions")
|
@SuppressWarnings("ConstantConditions")
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
|||||||
|
|
||||||
@Mixin(WorldGenRegion.class)
|
@Mixin(WorldGenRegion.class)
|
||||||
@Implements(@Interface(iface = World.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = World.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class ChunkRegionMixin {
|
public abstract class WorldGenRegionMixin {
|
||||||
@Shadow
|
@Shadow
|
||||||
@Final
|
@Final
|
||||||
private ServerWorld level;
|
private ServerWorld level;
|
||||||
@@ -4,30 +4,30 @@
|
|||||||
"compatibilityLevel": "JAVA_8",
|
"compatibilityLevel": "JAVA_8",
|
||||||
"refmap": "terra-refmap.json",
|
"refmap": "terra-refmap.json",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"access.MobSpawnerLogicAccessor",
|
"access.AbstractSpawnerAccessor",
|
||||||
"implementations.BiomeMixin",
|
"implementations.BiomeMixin",
|
||||||
"implementations.ChunkGeneratorMixin",
|
"implementations.ChunkGeneratorMixin",
|
||||||
"implementations.ConfiguredFeatureMixin",
|
"implementations.ConfiguredFeatureMixin",
|
||||||
"implementations.block.BlockEntityMixin",
|
|
||||||
"implementations.block.BlockMixin",
|
"implementations.block.BlockMixin",
|
||||||
"implementations.block.state.LootableContainerBlockEntityMixin",
|
"implementations.block.TileEntityMixin",
|
||||||
"implementations.block.state.MobSpawnerBlockEntityMixin",
|
"implementations.block.state.LockableLootTileEntityMixin",
|
||||||
"implementations.block.state.SignBlockEntityMixin",
|
"implementations.block.state.MobSpawnerTileEntityMixin",
|
||||||
"implementations.chunk.ChunkRegionMixin",
|
"implementations.block.state.SignTileEntityMixin",
|
||||||
"implementations.chunk.WorldChunkMixin",
|
"implementations.chunk.ChunkMixin",
|
||||||
"implementations.chunk.data.ProtoChunkMixin",
|
"implementations.chunk.WorldGenRegionMixin",
|
||||||
|
"implementations.chunk.data.ChunkPrimerMixin",
|
||||||
|
"implementations.entity.CommandSourceMixin",
|
||||||
"implementations.entity.EntityMixin",
|
"implementations.entity.EntityMixin",
|
||||||
"implementations.entity.EntityTypeMixin",
|
"implementations.entity.EntityTypeMixin",
|
||||||
"implementations.entity.PlayerEntityMixin",
|
"implementations.entity.PlayerEntityMixin",
|
||||||
"implementations.entity.ServerCommandSourceMixin",
|
"implementations.inventory.LockableTileEntityMixin",
|
||||||
"implementations.inventory.LockableContainerBlockEntityMixin",
|
|
||||||
"implementations.inventory.item.ItemMixin",
|
"implementations.inventory.item.ItemMixin",
|
||||||
"implementations.inventory.item.ItemStackMixin",
|
"implementations.inventory.item.ItemStackMixin",
|
||||||
"implementations.inventory.meta.EnchantmentMixin",
|
"implementations.inventory.meta.EnchantmentMixin",
|
||||||
"implementations.inventory.meta.ItemStackDamageableMixin",
|
"implementations.inventory.meta.ItemStackDamageableMixin",
|
||||||
"implementations.inventory.meta.ItemStackMetaMixin",
|
"implementations.inventory.meta.ItemStackMetaMixin",
|
||||||
"implementations.world.ChunkRegionMixin",
|
"implementations.world.ServerWorldMixin",
|
||||||
"implementations.world.ServerWorldMixin"
|
"implementations.world.WorldGenRegionMixin"
|
||||||
],
|
],
|
||||||
"client": [
|
"client": [
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user