From c5a89c6408440f96d048125cd12ebfcf7f04d5bd Mon Sep 17 00:00:00 2001 From: Codename Revy Date: Sun, 22 Dec 2019 16:46:01 +0100 Subject: [PATCH] 1.0.3.6 (1.15.1) Update --- build.gradle | 30 ++++--------------- .../content/items/ItemDimensionalMirror.java | 4 +-- .../content/items/ItemMagicMirror.java | 2 +- .../magicmirror/util/Reference.java | 2 +- .../magicmirror/util/handler/LootHandler.java | 28 ++++++++--------- src/main/resources/META-INF/mods.toml | 26 +++++++--------- 6 files changed, 35 insertions(+), 57 deletions(-) diff --git a/build.gradle b/build.gradle index a76c4ff..d4fdc15 100644 --- a/build.gradle +++ b/build.gradle @@ -9,23 +9,18 @@ buildscript { } } apply plugin: 'net.minecraftforge.gradle' -// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '1.0.3.5' -group = 'com.codenamerevy.magicmirror' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +version = '1.0.3.6' +group = 'com.codenamerevy.magicmirror' archivesBaseName = 'magicmirror' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. minecraft { - // snapshot_YYYYMMDD Snapshot are built nightly. - // stable_# Stables are built at the discretion of the MCP team. - mappings channel: 'snapshot', version: '20191017-1.14.3' - - // Default run configurations. - // These can be tweaked, removed, or duplicated as needed. + //Mappings Version + mappings channel: 'snapshot', version: '20191222-1.14.3' runs { client { workingDirectory project.file('run') @@ -81,20 +76,7 @@ minecraft { dependencies { // Forge version - minecraft 'net.minecraftforge:forge:1.14.4-28.1.56' - - // You may put jars on which you depend on in ./libs or you may define them like so.. - // compile "some.group:artifact:version:classifier" - // compile "some.group:artifact:version" - - // Real examples - // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env - // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env - - // For more info... - // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html - // http://www.gradle.org/docs/current/userguide/dependency_management.html - + minecraft 'net.minecraftforge:forge:1.15.1-30.0.15' } // Manifest for reading by the runtime.. @@ -103,7 +85,7 @@ jar { attributes([ "Specification-Title": "MagicMirrors", "Specification-Vendor": "CodenameRevy", - "Specification-Version": "1", // We are version 1 of ourselves + "Specification-Version": "1", "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"CodenameRevy", diff --git a/src/main/java/com/codenamerevy/magicmirror/content/items/ItemDimensionalMirror.java b/src/main/java/com/codenamerevy/magicmirror/content/items/ItemDimensionalMirror.java index d29d105..3539385 100644 --- a/src/main/java/com/codenamerevy/magicmirror/content/items/ItemDimensionalMirror.java +++ b/src/main/java/com/codenamerevy/magicmirror/content/items/ItemDimensionalMirror.java @@ -72,7 +72,7 @@ private void travelHomeFromNether(PlayerEntity player) DimensionType prevDimension = player.dimension; DimensionType transDimension = prevDimension == DimensionType.THE_NETHER ? DimensionType.OVERWORLD : DimensionType.THE_NETHER; - serverPlayer.teleport(player.getServer().getWorld(transDimension), serverPlayer.posX, serverPlayer.posY, serverPlayer.posZ, serverPlayer.rotationYaw, serverPlayer.rotationPitch); + serverPlayer.teleport(player.getServer().getWorld(transDimension), serverPlayer.serverPosX, serverPlayer.serverPosY, serverPlayer.serverPosZ, serverPlayer.rotationYaw, serverPlayer.rotationPitch); } private void travelHomeFromEnd(PlayerEntity player) @@ -82,7 +82,7 @@ private void travelHomeFromEnd(PlayerEntity player) DimensionType prevDimension = player.dimension; DimensionType transDimension = prevDimension == DimensionType.THE_END ? DimensionType.OVERWORLD : DimensionType.THE_END; - serverPlayer.teleport(player.getServer().getWorld(transDimension), serverPlayer.posX, serverPlayer.posY, serverPlayer.posZ, serverPlayer.rotationYaw, serverPlayer.rotationPitch); + serverPlayer.teleport(player.getServer().getWorld(transDimension), serverPlayer.serverPosX, serverPlayer.serverPosY, serverPlayer.serverPosZ, serverPlayer.rotationYaw, serverPlayer.rotationPitch); } @Override diff --git a/src/main/java/com/codenamerevy/magicmirror/content/items/ItemMagicMirror.java b/src/main/java/com/codenamerevy/magicmirror/content/items/ItemMagicMirror.java index fbe2210..708c8fc 100644 --- a/src/main/java/com/codenamerevy/magicmirror/content/items/ItemMagicMirror.java +++ b/src/main/java/com/codenamerevy/magicmirror/content/items/ItemMagicMirror.java @@ -35,7 +35,7 @@ public void onUsingTick (ItemStack stack, LivingEntity entity,int count) Random rand = entity.world.rand; for (int i = 0; i < 45; i++) { - entity.world.addParticle(ParticleTypes.DRAGON_BREATH, entity.posX + (rand.nextBoolean() ? -1 : 1) * Math.pow(rand.nextFloat(), 2) * 2, entity.posY + rand.nextFloat() * 3 - 2, entity.posZ + (rand.nextBoolean() ? -1 : 1) * Math.pow(rand.nextFloat(), 2) * 2, 0, 0.105D, 0); + entity.world.addParticle(ParticleTypes.DRAGON_BREATH, entity.serverPosX + (rand.nextBoolean() ? -1 : 1) * Math.pow(rand.nextFloat(), 2) * 2, entity.chunkCoordY + rand.nextFloat() * 3 - 2, entity.serverPosZ + (rand.nextBoolean() ? -1 : 1) * Math.pow(rand.nextFloat(), 2) * 2, 0, 0.105D, 0); } } diff --git a/src/main/java/com/codenamerevy/magicmirror/util/Reference.java b/src/main/java/com/codenamerevy/magicmirror/util/Reference.java index b3ae17d..bcadcd1 100644 --- a/src/main/java/com/codenamerevy/magicmirror/util/Reference.java +++ b/src/main/java/com/codenamerevy/magicmirror/util/Reference.java @@ -8,7 +8,7 @@ public class Reference public static final String MODID = "magicmirror"; public static final String NAME = "Magic Mirror"; public static final String VERSION = "1.0.3.5"; - public static final String MC_VERSION = "1.14.4"; + public static final String MC_VERSION = "1.15.1"; public static final String CLIENT_PROXY = "com.codenamerevy.magicmirror.proxy.ClientProxy"; public static final String COMMON_PROXY = "com.codenamerevy.magicmirror.proxy.CommonProxy"; public static final Logger LOGGER = LogManager.getLogger(); diff --git a/src/main/java/com/codenamerevy/magicmirror/util/handler/LootHandler.java b/src/main/java/com/codenamerevy/magicmirror/util/handler/LootHandler.java index 7bad40a..3e75b4f 100644 --- a/src/main/java/com/codenamerevy/magicmirror/util/handler/LootHandler.java +++ b/src/main/java/com/codenamerevy/magicmirror/util/handler/LootHandler.java @@ -122,7 +122,7 @@ private static void addToTableMineshaft(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("mineshaft_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(MINESHAFT).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("mineshaft_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(MINESHAFT).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableBuried(LootTableLoadEvent event, int maxRolls) @@ -130,14 +130,14 @@ private static void addToTableBuried(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("buried_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(BURIED).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("buried_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(BURIED).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableDesert(LootTableLoadEvent event, int maxRolls) { if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("desert_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(DESERT).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("desert_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(DESERT).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableEnd(LootTableLoadEvent event, int maxRolls) @@ -145,7 +145,7 @@ private static void addToTableEnd(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("end_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(END).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("end_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(END).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableIgloo(LootTableLoadEvent event, int maxRolls) @@ -153,7 +153,7 @@ private static void addToTableIgloo(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("igloo_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(IGLOO).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("igloo_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(IGLOO).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableJungle(LootTableLoadEvent event, int maxRolls) @@ -161,7 +161,7 @@ private static void addToTableJungle(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("jungle_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(JUNGLE).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("jungle_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(JUNGLE).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableNether(LootTableLoadEvent event, int maxRolls) @@ -169,7 +169,7 @@ private static void addToTableNether(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("nether_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(NETHER).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("nether_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(NETHER).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableShipwreck(LootTableLoadEvent event, int maxRolls) @@ -177,7 +177,7 @@ private static void addToTableShipwreck(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("shipwreck_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(SHIPWRECK).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("shipwreck_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(SHIPWRECK).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableStronghold(LootTableLoadEvent event, int maxRolls) @@ -185,7 +185,7 @@ private static void addToTableStronghold(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("stronghold_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(STRONGHOLD).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("stronghold_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(STRONGHOLD).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableCrossing(LootTableLoadEvent event, int maxRolls) @@ -193,7 +193,7 @@ private static void addToTableCrossing(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("crossing_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(CROSSING).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("crossing_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(CROSSING).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableLibrary(LootTableLoadEvent event, int maxRolls) @@ -201,7 +201,7 @@ private static void addToTableLibrary(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("library_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(LIBRARY).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("library_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(LIBRARY).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableUnderwater(LootTableLoadEvent event, int maxRolls) @@ -209,7 +209,7 @@ private static void addToTableUnderwater(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("underwater_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(UNDERWATER).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("underwater_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(UNDERWATER).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableCartographer(LootTableLoadEvent event, int maxRolls) @@ -217,7 +217,7 @@ private static void addToTableCartographer(LootTableLoadEvent event, int maxRoll if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("cartographer_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(CARTOGRAPHER).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("cartographer_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(CARTOGRAPHER).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } private static void addToTableSnowyHouse(LootTableLoadEvent event, int maxRolls) @@ -225,7 +225,7 @@ private static void addToTableSnowyHouse(LootTableLoadEvent event, int maxRolls) if (hasLootPool(event.getTable(), event.getName().toString())) return; Reference.LOGGER.info("Add mirrors to loot table {} ({} rolls)", event.getName(), maxRolls); - event.getTable().addPool((new LootPool.Builder()).name("snowy_house_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(SNOWY_HOUSE).weight(10).acceptFunction(SetCount.func_215932_a(new RandomValueRange(0, 1)))).build()); + event.getTable().addPool((new LootPool.Builder()).name("snowy_house_added").rolls(new RandomValueRange(1, maxRolls)).addEntry(TableLootEntry.builder(SNOWY_HOUSE).weight(10).acceptFunction(SetCount.builder(new RandomValueRange(0, 1)))).build()); } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index f11b1e2..86fa7e1 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,41 +1,37 @@ modLoader="javafml" -loaderVersion="[28,)" -issueTrackerURL="https://github.com/CodenameRevy/-1.14.4-MagicMirror/issues" +loaderVersion="[30,)" +issueTrackerURL="https://github.com/CodenameRevy/MagicMirrors/issues" [[mods]] modId="magicmirror" -version="1.0.3.5" +version="1.0.3.6" displayName="Magic Mirrors" -displayURL="https://github.com/CodenameRevy/-1.14.4-MagicMirror" +displayURL="https://github.com/CodenameRevy/MagicMirrors" logoFile="logo.png" credits="MichaelLimaRodrigues" authors="CodenameRevy" description=''' Magic Mirror mod adds several new items that are used to teleport you to your bed location almost instantly! -Update 1.0.3.5 changelog: -- Added Configuration file for Items and Recipes (magicmirror_items.toml) -- Reworked Loot Table Handler, Loot Tables should now generate in existing worlds -- Updated to Forge 28.1.56 -- Updated Mappings to 20191017-1.14.3 +Update 1.0.3.6 (1.15.1) changelog: + +- Updated to Forge 30.0.15 +- Updated Mappings to 20191222-1.14.3 [Internal Changes] -- Optimized Imports -- Removed unnecessary classes -- Optimized loot_tables data structure -- Optimized recipes data structure for configs +- Fixed some weird function names :P ''' [[dependencies.magicmirror]] modId="forge" mandatory=true - versionRange="[28.1.0,)" + versionRange="[30,)" ordering="NONE" side="BOTH" [[dependencies.magicmirror]] modId="minecraft" mandatory=true - versionRange="[1.14.4]" + versionRange="[1.15.1]" ordering="NONE" side="BOTH"