From 9503120d5829eefce71729795d2dc92a68fe14aa Mon Sep 17 00:00:00 2001 From: Tschipp Date: Sat, 10 Apr 2021 10:59:42 +0200 Subject: [PATCH] Updated configs, improved compatibility, fixed sponge server issue --- build.gradle | 4 ---- gradle.properties | 2 +- .../tschipp/carryon/common/config/Configs.java | 17 ++++++++++++++--- .../carryon/common/event/ItemEntityEvents.java | 2 +- .../carryon/common/event/ItemEvents.java | 9 ++++++--- .../tschipp/carryon/common/item/ItemTile.java | 14 ++++++++++++-- 6 files changed, 34 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index 557944e..2e16e1f 100644 --- a/build.gradle +++ b/build.gradle @@ -9,13 +9,9 @@ buildscript { } } - - - apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'maven-publish' - apply from: 'https://raw.githubusercontent.com/MinecraftModDevelopment/Gradle-Collection/22e7d543a18cd30675277fbfa3669e3d9e206010/generic/secrets.gradle' import groovy.json.JsonOutput diff --git a/gradle.properties b/gradle.properties index e5876ac..af0736a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Sets default memory used for gradle commands. Can be overridden by user or command line properties. # This is required to provide enough memory for the Minecraft decompilation process. org.gradle.jvmargs=-Xmx3G -version=1.12.3 +version=1.12.4 minecraft_version=1.12.2 \ No newline at end of file diff --git a/src/main/java/tschipp/carryon/common/config/Configs.java b/src/main/java/tschipp/carryon/common/config/Configs.java index 085e0c0..cb8618c 100644 --- a/src/main/java/tschipp/carryon/common/config/Configs.java +++ b/src/main/java/tschipp/carryon/common/config/Configs.java @@ -197,7 +197,14 @@ public class Configs { "dumpsterdiving:rep_casing", "dumpsterdiving:trash_furn_g", "dumpsterdiving:trash_furn_n", - "*door*" + "*door*", + "waystones:*", + "immersiverailroading:*", + "integrateddynamics:*", + "bloodmagic:*", + "rftools:screen", + "rftools:creative_screen", + }; @Comment("Entities that cannot be picked up") @@ -220,7 +227,11 @@ public class Configs { "mynko:*", "astikorcarts:*", "dakimakuramod:*", - "tektopia:*" + "tektopia:*", + "mocreatures:*", + "pixelmon:*", + "thebetweenlands:draeton**", + "mysticalworld:*" }; @@ -300,7 +311,7 @@ public class Configs { "animania:cheese_mold;7->(block)animania:cheese_mold;7", "animania:cheese_mold;8->(block)animania:cheese_mold;8", "animania:cheese_mold;9->(block)animania:cheese_mold;9", - "animania:cheese_mold;10->(block)animania:cheese_mold;10", + "animania:cheese_mold;10->(block)animania:cheese_mold;10" }; } diff --git a/src/main/java/tschipp/carryon/common/event/ItemEntityEvents.java b/src/main/java/tschipp/carryon/common/event/ItemEntityEvents.java index 13beb53..ea6480e 100644 --- a/src/main/java/tschipp/carryon/common/event/ItemEntityEvents.java +++ b/src/main/java/tschipp/carryon/common/event/ItemEntityEvents.java @@ -57,7 +57,7 @@ public class ItemEntityEvents { String command = override.getCommandPlace(); if (command != null) - player.getServer().getCommandManager().executeCommand(player.getServer(), "/execute " + player.getGameProfile().getName() + " ~ ~ ~ " + command); + player.getServer().getCommandManager().executeCommand(player.getServer(), "execute " + player.getGameProfile().getName() + " ~ ~ ~ " + command); } } } diff --git a/src/main/java/tschipp/carryon/common/event/ItemEvents.java b/src/main/java/tschipp/carryon/common/event/ItemEvents.java index f0159f2..57ab370 100644 --- a/src/main/java/tschipp/carryon/common/event/ItemEvents.java +++ b/src/main/java/tschipp/carryon/common/event/ItemEvents.java @@ -90,7 +90,7 @@ public class ItemEvents { String command = override.getCommandPlace(); if (command != null) - player.getServer().getCommandManager().executeCommand(player.getServer(), "/execute " + player.getGameProfile().getName() + " ~ ~ ~ " + command); + player.getServer().getCommandManager().executeCommand(player.getServer(), "execute " + player.getGameProfile().getName() + " ~ ~ ~ " + command); } } } @@ -375,7 +375,10 @@ public class ItemEvents { String command = override.getCommandInit(); if (command != null) - player.getServer().getCommandManager().executeCommand(player.getServer(), "/execute " + player.getGameProfile().getName() + " ~ ~ ~ " + command); + { + CarryOn.LOGGER.info("Executing command: execute " + player.getGameProfile().getName() + " ~ ~ ~ " + command); + player.getServer().getCommandManager().executeCommand(player.getServer(), "execute " + player.getGameProfile().getName() + " ~ ~ ~ " + command); + } } } @@ -501,7 +504,7 @@ public class ItemEvents { String command = override.getCommandLoop(); if (command != null) - player.getServer().getCommandManager().executeCommand(player.getServer(), "/execute " + player.getGameProfile().getName() + " ~ ~ ~ " + command); + player.getServer().getCommandManager().executeCommand(player.getServer(), "execute " + player.getGameProfile().getName() + " ~ ~ ~ " + command); } } diff --git a/src/main/java/tschipp/carryon/common/item/ItemTile.java b/src/main/java/tschipp/carryon/common/item/ItemTile.java index 7eb4cac..d7459db 100644 --- a/src/main/java/tschipp/carryon/common/item/ItemTile.java +++ b/src/main/java/tschipp/carryon/common/item/ItemTile.java @@ -210,8 +210,11 @@ public class ItemTile extends Item TileEntity tile = world.getTileEntity(pos2); if (tile != null) { - tile.readFromNBT(getTileData(stack)); - tile.setPos(pos2); + NBTTagCompound tag = getTileData(stack); + updateTileLocation(tag, pos2); + tile.readFromNBT(tag); +// tile.readFromNBT(getTileData(stack)); +// tile.setPos(pos2); } clearTileData(stack); player.playSound(containedblock.getSoundType().getPlaceSound(), 1.0f, 0.5f); @@ -320,6 +323,13 @@ public class ItemTile extends Item tag.removeTag("stateid"); } } + + public static void updateTileLocation(NBTTagCompound tag, BlockPos pos) + { + tag.setInteger("x", pos.getX()); + tag.setInteger("y", pos.getY()); + tag.setInteger("z", pos.getZ()); + } public static NBTTagCompound getTileData(ItemStack stack) {