diff --git a/README.md b/README.md index fb4de9dd..170bd9cb 100644 --- a/README.md +++ b/README.md @@ -394,16 +394,12 @@ All changes are toggleable via config files. * **Tech Reborn** * **Optimized Rolling Machine:** Optimizes the Rolling Machine to reduce tick time * **Thaumcraft** - * **Duplication Fixes:** Fixes various duplication exploits - * **Firebat Particles:** Adds particles to firebats similar to legacy versions - * **Flower Bounding Box:** Fixes the bounding box always being at the center in both cinderpearls and shimmerleafs * **Focus Effects** * Revamps the cast sounds of certain focus effects to provide better variety * Adds impact sounds (like air or curse) to various focus effects that lack it * **Focus Mediums:** Makes several focus mediums play additional cast sounds to make them stand out more * **Spiderlike Eldritch Crabs:** Rotates dead eldritch crabs all the way like endermites, silverfish, and spiders * **Stable Thaumometer:** Stops the thaumometer from bobbing rapidly when using it to scan objects - * **Wisp Particles:** Increases particle size of wisps similar to legacy versions * **Thaumic Wonders** * **Duplication Fixes:** Fixes various duplication exploits * **The Erebus** diff --git a/src/main/java/mod/acgaming/universaltweaks/UniversalTweaks.java b/src/main/java/mod/acgaming/universaltweaks/UniversalTweaks.java index 61473cc0..ef569662 100644 --- a/src/main/java/mod/acgaming/universaltweaks/UniversalTweaks.java +++ b/src/main/java/mod/acgaming/universaltweaks/UniversalTweaks.java @@ -26,7 +26,6 @@ import mod.acgaming.universaltweaks.mods.tconstruct.UTTConstructEvents; import mod.acgaming.universaltweaks.mods.tconstruct.UTTConstructMaterials; import mod.acgaming.universaltweaks.mods.tconstruct.oredictcache.UTOreDictCache; -import mod.acgaming.universaltweaks.mods.thaumcraft.UTThaumcraftEvents; import mod.acgaming.universaltweaks.tweaks.blocks.betterplacement.UTBetterPlacement; import mod.acgaming.universaltweaks.tweaks.blocks.breakablebedrock.UTBreakableBedrock; import mod.acgaming.universaltweaks.tweaks.blocks.dispenser.UTBlockDispenser; @@ -176,7 +175,6 @@ public void init(FMLInitializationEvent event) // Unregister reason: event handler adds to an unused map that is never cleared. if (Loader.isModLoaded("tardis") && UTConfigMods.TARDIS.utMemoryLeakFixToggle) MinecraftForge.EVENT_BUS.unregister(ClientProxy.class); if (Loader.isModLoaded("tconstruct") && UTConfigMods.TINKERS_CONSTRUCT.utDuplicationFixesToggle) MinecraftForge.EVENT_BUS.register(new UTTConstructEvents()); - if (Loader.isModLoaded("thaumcraft") && UTConfigMods.THAUMCRAFT.utDuplicationFixesToggle) MinecraftForge.EVENT_BUS.register(new UTThaumcraftEvents()); LOGGER.info(NAME + " initialized"); } diff --git a/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java b/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java index 9b76f265..20a957f3 100644 --- a/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java +++ b/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java @@ -811,38 +811,18 @@ public static class TechRebornCategory public static class ThaumcraftCategory { - @Config.RequiresMcRestart - @Config.Name("Flower Bounding Box") - @Config.Comment("Fixes the bounding box always being at the center in both cinderpearls and shimmerleafs") - public boolean utTCFlowerBoundingBoxToggle = true; - @Config.RequiresMcRestart @Config.Name("Stable Thaumometer") @Config.Comment("Stops the thaumometer from bobbing rapidly when using it to scan objects") public boolean utTCStableThaumometerToggle = true; - - @Config.RequiresMcRestart - @Config.Name("Duplication Fixes") - @Config.Comment("Fixes various duplication exploits") - public boolean utDuplicationFixesToggle = true; } public static class ThaumcraftEntitiesCategory { - @Config.RequiresMcRestart - @Config.Name("Firebat Particles") - @Config.Comment("Adds particles to firebats similar to legacy versions") - public boolean utTCFirebatParticlesToggle = true; - @Config.RequiresMcRestart @Config.Name("Spiderlike Eldritch Crabs") @Config.Comment("Rotates dead eldritch crabs all the way like endermites, silverfish, and spiders") public boolean utTCSpiderlikeEldritchCrabToggle = true; - - @Config.RequiresMcRestart - @Config.Name("Wisp Particles") - @Config.Comment("Increases particle size of wisps similar to legacy versions") - public boolean utTCWispParticlesToggle = true; } public static class ThaumcraftFociCategory diff --git a/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java b/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java index fe85a551..970daaf0 100644 --- a/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java +++ b/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java @@ -96,9 +96,6 @@ public class UTMixinLoader implements ILateMixinLoader put("mixins.mods.tconstruct.toolcustomization.json", () -> loaded("tconstruct") && UTConfigMods.TINKERS_CONSTRUCT.utTConToolCustomizationToggle); put("mixins.mods.tconstruct.toolcustomization.plustic.json", () -> loaded("tconstruct") && loaded("plustic") && UTConfigMods.TINKERS_CONSTRUCT.utTConToolCustomizationToggle); put("mixins.mods.techreborn.json", () -> loaded("techreborn")); - put("mixins.mods.thaumcraft.dupes.json", () -> loaded("thaumcraft") && UTConfigMods.THAUMCRAFT.utDuplicationFixesToggle); - put("mixins.mods.thaumcraft.enderio.dupes.json", () -> loaded("thaumcraft") && loaded("enderio") && UTConfigMods.THAUMCRAFT.utDuplicationFixesToggle); - put("mixins.mods.thaumcraft.entities.server.json", () -> loaded("thaumcraft")); put("mixins.mods.thaumcraft.foci.focuseffects.json", () -> loaded("thaumcraft")); put("mixins.mods.thaumcraft.foci.focusmediums.json", () -> loaded("thaumcraft")); put("mixins.mods.thaumcraft.json", () -> loaded("thaumcraft")); diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/UTThaumcraftEvents.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/UTThaumcraftEvents.java deleted file mode 100644 index 8f73a5b5..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/UTThaumcraftEvents.java +++ /dev/null @@ -1,205 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.TextComponentString; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.translation.I18n; -import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; -import net.minecraftforge.event.world.BlockEvent; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import thaumcraft.api.blocks.BlocksTC; -import thaumcraft.common.container.ContainerArcaneWorkbench; -import thaumcraft.common.lib.enchantment.EnumInfusionEnchantment; -import thaumcraft.common.lib.utils.InventoryUtils; -import thaumcraft.common.tiles.misc.TileHole; - -// Courtesy of Focamacho -public class UTThaumcraftEvents -{ - //Arcane Workbench Dupe Fix - @SubscribeEvent - public void onRightClickBlock(PlayerInteractEvent.RightClickBlock event) - { - Block block = event.getWorld().getBlockState(event.getPos()).getBlock(); - if (block != null && Block.isEqualTo(block, BlocksTC.arcaneWorkbench)) - { - if (event.getEntityPlayer() != null) - { - if (event.getEntityPlayer().openContainer instanceof ContainerArcaneWorkbench) - { - event.setCanceled(true); - return; - } - - event.getEntityPlayer().getEntityData().setInteger("ThaumcraftWorkbenchX", event.getPos().getX()); - event.getEntityPlayer().getEntityData().setInteger("ThaumcraftWorkbenchY", event.getPos().getY()); - event.getEntityPlayer().getEntityData().setInteger("ThaumcraftWorkbenchZ", event.getPos().getZ()); - event.getEntityPlayer().getEntityData().setBoolean("ThaumcraftWorkbenchDupeFix", true); - - List players = event.getWorld().getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(event.getPos().getX() - 32, event.getPos().getY() - 32, event.getPos().getZ() - 32, event.getPos().getX() + 32, event.getPos().getY() + 32, event.getPos().getZ() + 32)); - for (EntityPlayer player : players) - { - if (player == event.getEntityPlayer()) continue; - if (player.openContainer instanceof ContainerArcaneWorkbench) - { - if (player.getEntityData().getBoolean("ThaumcraftWorkbenchDupeFix")) - { - NBTTagCompound playerData = player.getEntityData(); - if (playerData.getInteger("ThaumcraftWorkbenchX") == event.getPos().getX() && playerData.getInteger("ThaumcraftWorkbenchY") == event.getPos().getY() && playerData.getInteger("ThaumcraftWorkbenchZ") == event.getPos().getZ()) - { - event.setCanceled(true); - event.getEntityPlayer().sendMessage(new TextComponentString("Someone is already using this.")); - break; - } - } - } - } - } - } - } - - @SubscribeEvent - public void onTickPlayer(TickEvent.PlayerTickEvent event) - { - if (event.player.openContainer != null && !(event.player.openContainer instanceof ContainerArcaneWorkbench)) - { - event.player.getEntityData().setBoolean("ThaumcraftWorkbenchDupeFix", false); - } - } - - //Collector Enchantment Fix - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void harvestDrops(BlockEvent.HarvestDropsEvent event) - { - if (event.getHarvester() != null && event.getHarvester().getActiveHand() != null) - { - ItemStack heldItem = event.getHarvester().getHeldItem(event.getHarvester().getActiveHand()); - if (heldItem.hasTagCompound() && heldItem.getTagCompound().hasKey("infench")) - { - NBTTagList nbtList = EnumInfusionEnchantment.getInfusionEnchantmentTagList(heldItem); - for (int i = 0; i < nbtList.tagCount(); i++) - { - if (nbtList.getCompoundTagAt(i).getShort("id") == 0) - { - nbtList.removeTag(i); - heldItem.setTagInfo("infench", nbtList); - heldItem.getTagCompound().setBoolean("fixCollector", true); - break; - } - } - } - } - } - - @SubscribeEvent(priority = EventPriority.LOWEST) - public void dropsCheck(BlockEvent.HarvestDropsEvent event) - { - if (event.getHarvester() != null && event.getHarvester().getActiveHand() != null) - { - ItemStack heldItem = event.getHarvester().getHeldItem(event.getHarvester().getActiveHand()); - if (heldItem != null && !heldItem.isEmpty()) - { - if (heldItem.hasTagCompound() && heldItem.getTagCompound().hasKey("fixCollector")) - { - InventoryUtils.dropHarvestsAtPos(event.getWorld(), event.getPos(), event.getDrops(), true, 10, event.getHarvester()); - event.getDrops().clear(); - } - } - } - } - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void removeTagB(LivingDropsEvent event) - { - if (event.getSource().getTrueSource() != null && event.getSource().getTrueSource() instanceof EntityPlayer && ((EntityPlayer) event.getSource().getTrueSource()).getActiveHand() != null) - { - ItemStack heldItem = ((EntityPlayer) event.getSource().getTrueSource()).getHeldItem(((EntityPlayer) event.getSource().getTrueSource()).getActiveHand()); - if (heldItem != null && !heldItem.isEmpty()) - { - if (heldItem.hasTagCompound() && heldItem.getTagCompound().hasKey("infench")) - { - NBTTagList nbtList = EnumInfusionEnchantment.getInfusionEnchantmentTagList(heldItem); - for (int i = 0; i < nbtList.tagCount(); i++) - { - if (nbtList.getCompoundTagAt(i).getShort("id") == 0) - { - nbtList.removeTag(i); - heldItem.setTagInfo("infench", nbtList); - heldItem.getTagCompound().setBoolean("fixCollector", true); - break; - } - } - } - } - } - } - - @SubscribeEvent(priority = EventPriority.LOWEST) - public void livingDrops(LivingDropsEvent event) - { - if (event.getSource().getTrueSource() != null && event.getSource().getTrueSource() instanceof EntityPlayer && ((EntityPlayer) event.getSource().getTrueSource()).getActiveHand() != null) - { - ItemStack heldItem = ((EntityPlayer) event.getSource().getTrueSource()).getHeldItem(((EntityPlayer) event.getSource().getTrueSource()).getActiveHand()); - if (heldItem != null && !heldItem.isEmpty()) - { - if (heldItem.hasTagCompound() && heldItem.getTagCompound().hasKey("fixCollector")) - { - List itemsDrop = new ArrayList(); - for (EntityItem drop : event.getDrops()) - { - itemsDrop.add(drop.getItem()); - } - InventoryUtils.dropHarvestsAtPos(event.getEntity().world, new BlockPos(event.getEntity().posX, event.getEntity().posY, event.getEntity().posZ), itemsDrop, true, 10, event.getSource().getTrueSource()); - event.getDrops().clear(); - } - } - } - } - - @SideOnly(Side.CLIENT) - @SubscribeEvent - public void tooltipFix(ItemTooltipEvent event) - { - if (event.getItemStack().hasTagCompound() && event.getItemStack().getTagCompound().hasKey("fixCollector")) - { - event.getToolTip().add(1, TextFormatting.GOLD + I18n.translateToLocal("enchantment.infusion.COLLECTOR")); - } - } - - //Arcane Stone Dupe Fix - @SubscribeEvent - public void arcaneStoneFix(BlockEvent.NeighborNotifyEvent event) - { - if (event.getState() != null && event.getState().getBlock().equals(BlocksTC.hole)) - { - if (event.getWorld().getTileEntity(event.getPos()) != null && event.getWorld().getTileEntity(event.getPos()) instanceof TileHole) - { - for (EntityItem item : event.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(event.getPos()))) - { - if (item.getItem().getItem().equals(Item.getItemFromBlock(BlocksTC.stoneArcane))) - { - event.getWorld().removeEntity(item); - } - } - } - } - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/enderio/mixin/UTDSUContainerMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/enderio/mixin/UTDSUContainerMixin.java deleted file mode 100644 index 9789db7a..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/enderio/mixin/UTDSUContainerMixin.java +++ /dev/null @@ -1,21 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.enderio.mixin; - -import net.minecraft.entity.player.EntityPlayer; - -import crazypants.enderio.base.handler.darksteel.gui.DSUContainer; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import thaumcraft.api.items.ItemsTC; - -// Courtesy of Focamacho -@Mixin(value = DSUContainer.class) -public class UTDSUContainerMixin -{ - @Inject(method = "canInteractWith", at = @At("HEAD"), cancellable = true) - private void canInteractWith(EntityPlayer player, CallbackInfoReturnable info) - { - if (((DSUContainer) (Object) this).getSlot(1).getStack().getItem().equals(ItemsTC.primordialPearl)) info.setReturnValue(false); - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/entities/mixin/UTFirebatParticlesMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/entities/mixin/UTFirebatParticlesMixin.java deleted file mode 100644 index bad78288..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/entities/mixin/UTFirebatParticlesMixin.java +++ /dev/null @@ -1,32 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.entities.mixin; - -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.world.World; - -import mod.acgaming.universaltweaks.config.UTConfigMods; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import thaumcraft.common.entities.monster.EntityFireBat; - -@Mixin(EntityFireBat.class) -public class UTFirebatParticlesMixin extends EntityMob -{ - public UTFirebatParticlesMixin(World worldIn) - { - super(worldIn); - } - - @Inject(method = "onLivingUpdate", at = @At(value = "HEAD")) - public void utFirebatParticles(CallbackInfo ci) - { - if (!UTConfigMods.THAUMCRAFT_ENTITIES.utTCFirebatParticlesToggle) return; - if (this.world.isRemote) - { - this.world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, this.prevPosX + (this.world.rand.nextFloat() - this.world.rand.nextFloat()) * 0.2F, this.prevPosY + this.height / 2 + (this.world.rand.nextFloat() - this.world.rand.nextFloat()) * 0.2F, this.prevPosZ + (this.world.rand.nextFloat() - this.world.rand.nextFloat()) * 0.2F, 0, 0, 0); - this.world.spawnParticle(EnumParticleTypes.FLAME, this.prevPosX + (this.world.rand.nextFloat() - this.world.rand.nextFloat()) * 0.2F, this.prevPosY + this.height / 2 + (this.world.rand.nextFloat() - this.world.rand.nextFloat()) * 0.2F, this.prevPosZ + (this.world.rand.nextFloat() - this.world.rand.nextFloat()) * 0.2F, 0, 0, 0); - } - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/entities/mixin/UTWispParticlesMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/entities/mixin/UTWispParticlesMixin.java deleted file mode 100644 index cb80f830..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/entities/mixin/UTWispParticlesMixin.java +++ /dev/null @@ -1,18 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.entities.mixin; - -import mod.acgaming.universaltweaks.config.UTConfigMods; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.Constant; -import org.spongepowered.asm.mixin.injection.ModifyConstant; -import thaumcraft.common.entities.monster.EntityWisp; - -@Mixin(EntityWisp.class) -public class UTWispParticlesMixin -{ - @ModifyConstant(method = "onDeath", constant = @Constant(floatValue = 1.0F)) - public float utWispParticles(float constant) - { - if (UTConfigMods.THAUMCRAFT_ENTITIES.utTCWispParticlesToggle) return 10; - else return constant; - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTCinderpearlMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTCinderpearlMixin.java deleted file mode 100644 index 24b5dba4..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTCinderpearlMixin.java +++ /dev/null @@ -1,31 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.mixin; - -import javax.annotation.Nonnull; - -import net.minecraft.block.BlockBush; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; - -import mod.acgaming.universaltweaks.config.UTConfigMods; -import org.spongepowered.asm.mixin.Mixin; -import thaumcraft.common.blocks.world.plants.BlockPlantCinderpearl; - -// Courtesy of Turkey9002 -@Mixin(BlockPlantCinderpearl.class) -public class UTCinderpearlMixin extends BlockBush -{ - public UTCinderpearlMixin() - { - super(); - } - - @Nonnull - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, @Nonnull IBlockAccess world, @Nonnull BlockPos pos) - { - if (UTConfigMods.THAUMCRAFT.utTCFlowerBoundingBoxToggle) return BUSH_AABB.offset(state.getOffset(world, pos)); - else return BUSH_AABB; - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTContainerHandMirrorMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTContainerHandMirrorMixin.java deleted file mode 100644 index 79daa48f..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTContainerHandMirrorMixin.java +++ /dev/null @@ -1,23 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.mixin; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; -import thaumcraft.api.items.ItemsTC; -import thaumcraft.common.container.ContainerHandMirror; - -// Courtesy of Focamacho -@Mixin(ContainerHandMirror.class) -public class UTContainerHandMirrorMixin -{ - @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/InventoryPlayer;getCurrentItem()Lnet/minecraft/item/ItemStack;")) - private ItemStack getCurrentItem(InventoryPlayer iinventory) - { - ItemStack mirror = iinventory.player.getHeldItemMainhand(); - if (!mirror.getItem().equals(ItemsTC.handMirror) || !mirror.hasTagCompound()) mirror = iinventory.player.getHeldItemOffhand(); - return mirror; - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTContainerRepairMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTContainerRepairMixin.java deleted file mode 100644 index b56e56f8..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTContainerRepairMixin.java +++ /dev/null @@ -1,28 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.mixin; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ContainerRepair; -import net.minecraft.inventory.IInventory; - -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import thaumcraft.api.items.ItemsTC; - -// Courtesy of Focamacho -@Mixin(ContainerRepair.class) -public class UTContainerRepairMixin -{ - @Shadow - @Final - public IInventory inputSlots; - - @Inject(method = "canInteractWith", at = @At("HEAD"), cancellable = true) - private void canInteractWith(EntityPlayer player, CallbackInfoReturnable info) - { - if (this.inputSlots.getStackInSlot(1).getItem().equals(ItemsTC.primordialPearl)) info.setReturnValue(false); - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityArcaneBoreMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityArcaneBoreMixin.java deleted file mode 100644 index 1b8d20ed..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityArcaneBoreMixin.java +++ /dev/null @@ -1,28 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.mixin; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import thaumcraft.common.entities.construct.EntityArcaneBore; -import thaumcraft.common.entities.construct.EntityOwnedConstruct; - -// Courtesy of Focamacho -@Mixin(EntityArcaneBore.class) -public class UTEntityArcaneBoreMixin extends EntityOwnedConstruct -{ - public UTEntityArcaneBoreMixin(World worldIn) - { - super(worldIn); - } - - @Inject(method = "processInteract", at = @At("HEAD"), cancellable = true) - private void processInteract(EntityPlayer player, EnumHand hand, CallbackInfoReturnable cir) - { - if (getHealth() <= 0.0F) cir.setReturnValue(false); - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityThaumcraftGolemMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityThaumcraftGolemMixin.java deleted file mode 100644 index 536b9c23..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityThaumcraftGolemMixin.java +++ /dev/null @@ -1,32 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.mixin; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import thaumcraft.common.entities.construct.EntityOwnedConstruct; -import thaumcraft.common.golems.EntityThaumcraftGolem; - -// Courtesy of Focamacho -@Mixin(EntityThaumcraftGolem.class) -public class UTEntityThaumcraftGolemMixin extends EntityOwnedConstruct -{ - public UTEntityThaumcraftGolemMixin(World worldIn) - { - super(worldIn); - } - - // Courtesy of LuckyValenok - @Override - protected void dropEquipment(boolean wasRecentlyHit, int lootingModifier) {} - - @Inject(method = "processInteract", at = @At("HEAD"), cancellable = true) - private void processInteract(EntityPlayer player, EnumHand hand, CallbackInfoReturnable cir) - { - if (getHealth() <= 0.0F) cir.setReturnValue(false); - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityTurretCrossbowAdvancedMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityTurretCrossbowAdvancedMixin.java deleted file mode 100644 index d808bd9f..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityTurretCrossbowAdvancedMixin.java +++ /dev/null @@ -1,28 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.mixin; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import thaumcraft.common.entities.construct.EntityTurretCrossbow; -import thaumcraft.common.entities.construct.EntityTurretCrossbowAdvanced; - -// Courtesy of Focamacho -@Mixin(EntityTurretCrossbowAdvanced.class) -public class UTEntityTurretCrossbowAdvancedMixin extends EntityTurretCrossbow -{ - public UTEntityTurretCrossbowAdvancedMixin(World worldIn) - { - super(worldIn); - } - - @Inject(method = "processInteract", at = @At("HEAD"), cancellable = true) - private void processInteract(EntityPlayer player, EnumHand hand, CallbackInfoReturnable cir) - { - if (getHealth() <= 0.0F) cir.setReturnValue(false); - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityTurretCrossbowMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityTurretCrossbowMixin.java deleted file mode 100644 index 12744332..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTEntityTurretCrossbowMixin.java +++ /dev/null @@ -1,28 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.mixin; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.EnumHand; -import net.minecraft.world.World; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import thaumcraft.common.entities.construct.EntityOwnedConstruct; -import thaumcraft.common.entities.construct.EntityTurretCrossbow; - -// Courtesy of Focamacho -@Mixin(EntityTurretCrossbow.class) -public class UTEntityTurretCrossbowMixin extends EntityOwnedConstruct -{ - public UTEntityTurretCrossbowMixin(World worldIn) - { - super(worldIn); - } - - @Inject(method = "processInteract", at = @At("HEAD"), cancellable = true) - private void processInteract(EntityPlayer player, EnumHand hand, CallbackInfoReturnable cir) - { - if (getHealth() <= 0.0F) cir.setReturnValue(false); - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTShimmerleafMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTShimmerleafMixin.java deleted file mode 100644 index de895811..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/thaumcraft/mixin/UTShimmerleafMixin.java +++ /dev/null @@ -1,31 +0,0 @@ -package mod.acgaming.universaltweaks.mods.thaumcraft.mixin; - -import javax.annotation.Nonnull; - -import net.minecraft.block.BlockBush; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; - -import mod.acgaming.universaltweaks.config.UTConfigMods; -import org.spongepowered.asm.mixin.Mixin; -import thaumcraft.common.blocks.world.plants.BlockPlantShimmerleaf; - -// Courtesy of Turkey9002 -@Mixin(BlockPlantShimmerleaf.class) -public class UTShimmerleafMixin extends BlockBush -{ - public UTShimmerleafMixin() - { - super(); - } - - @Nonnull - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, @Nonnull IBlockAccess world, @Nonnull BlockPos pos) - { - if (UTConfigMods.THAUMCRAFT.utTCFlowerBoundingBoxToggle) return BUSH_AABB.offset(state.getOffset(world, pos)); - else return BUSH_AABB; - } -} \ No newline at end of file diff --git a/src/main/resources/mixins.mods.thaumcraft.dupes.json b/src/main/resources/mixins.mods.thaumcraft.dupes.json deleted file mode 100644 index d6d82391..00000000 --- a/src/main/resources/mixins.mods.thaumcraft.dupes.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "package": "mod.acgaming.universaltweaks.mods.thaumcraft.mixin", - "refmap": "universaltweaks.refmap.json", - "minVersion": "0.8", - "compatibilityLevel": "JAVA_8", - "mixins": ["UTContainerHandMirrorMixin", "UTContainerRepairMixin", "UTEntityArcaneBoreMixin", "UTEntityThaumcraftGolemMixin", "UTEntityTurretCrossbowAdvancedMixin", "UTEntityTurretCrossbowMixin"] -} \ No newline at end of file diff --git a/src/main/resources/mixins.mods.thaumcraft.enderio.dupes.json b/src/main/resources/mixins.mods.thaumcraft.enderio.dupes.json deleted file mode 100644 index a06f6c14..00000000 --- a/src/main/resources/mixins.mods.thaumcraft.enderio.dupes.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "package": "mod.acgaming.universaltweaks.mods.thaumcraft.enderio.mixin", - "refmap": "universaltweaks.refmap.json", - "minVersion": "0.8", - "compatibilityLevel": "JAVA_8", - "mixins": ["UTDSUContainerMixin"] -} \ No newline at end of file diff --git a/src/main/resources/mixins.mods.thaumcraft.entities.server.json b/src/main/resources/mixins.mods.thaumcraft.entities.server.json deleted file mode 100644 index aeffa52c..00000000 --- a/src/main/resources/mixins.mods.thaumcraft.entities.server.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "package": "mod.acgaming.universaltweaks.mods.thaumcraft.entities.mixin", - "refmap": "universaltweaks.refmap.json", - "minVersion": "0.8", - "compatibilityLevel": "JAVA_8", - "mixins": ["UTFirebatParticlesMixin", "UTWispParticlesMixin"] -} \ No newline at end of file diff --git a/src/main/resources/mixins.mods.thaumcraft.json b/src/main/resources/mixins.mods.thaumcraft.json index 4a96d99b..84547cc4 100644 --- a/src/main/resources/mixins.mods.thaumcraft.json +++ b/src/main/resources/mixins.mods.thaumcraft.json @@ -3,5 +3,5 @@ "refmap": "universaltweaks.refmap.json", "minVersion": "0.8", "compatibilityLevel": "JAVA_8", - "mixins": ["UTCinderpearlMixin", "UTShimmerleafMixin", "UTStableThaumometerMixin"] + "mixins": ["UTStableThaumometerMixin"] } \ No newline at end of file