diff --git a/build.gradle b/build.gradle index 744dc63..706b347 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '1.1.0-1.16.x' +version = '1.2.0-1.16.x' group = 'com.northwestwind.moreboots' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'moreboots' diff --git a/src/main/java/com/northwestwind/moreboots/handler/MoreBootsHandler.java b/src/main/java/com/northwestwind/moreboots/handler/MoreBootsHandler.java index 0134daf..77dded4 100644 --- a/src/main/java/com/northwestwind/moreboots/handler/MoreBootsHandler.java +++ b/src/main/java/com/northwestwind/moreboots/handler/MoreBootsHandler.java @@ -228,14 +228,7 @@ public void onLivingUpdate(final LivingEvent.LivingUpdateEvent event) { entity.setPositionAndUpdate(entity.getPosX(), pos.getY() + 1, entity.getPosZ()); } } else if (boots.getItem().equals(ItemInit.SPIDER_BOOTS)) { - if (Utils.isSurroundedByInvalidBlocks(entity) || entity.isInLava() || entity.isInWater() || entity.isSpectator() || entity.func_233570_aj_()) { - tag.putBoolean("climable", false); - boots.setTag(tag); - } else if (entity.collidedHorizontally) { - tag.putBoolean("climable", true); - boots.setTag(tag); - } - boolean climable = tag.getBoolean("climable"); + boolean climable = !Utils.isSurroundedByInvalidBlocks(entity) && !entity.isInLava() && !entity.isInWater() && !entity.isSpectator() && !entity.func_233570_aj_(); Vector3d motion = entity.getMotion(); motion = motion.mul(1, 0, 1); boolean ascending = entity.collidedHorizontally; @@ -291,7 +284,7 @@ public void onLivingUpdate(final LivingEvent.LivingUpdateEvent event) { boots.setDamage(boots.getMaxDamage()); entity.world.createExplosion(entity, pos.x, entity.getPosYHeight(-0.0625D), pos.z, 10.0F, Explosion.Mode.BREAK); entity.setMotion(entity.getMotion().add(0, 0.01 * 864000, 0)); - if (entity instanceof PlayerEntity) { + if (entity instanceof PlayerEntity && !entity.world.isRemote) { MinecraftServer server = entity.world.getServer(); ServerPlayerEntity serverPlayerEntity = (ServerPlayerEntity) entity; serverPlayerEntity.getAdvancements().grantCriterion(server.getAdvancementManager().getAdvancement(new ResourceLocation("moreboots", "moreboots/twelve_hours")), "twelve_hours"); diff --git a/src/main/java/com/northwestwind/moreboots/handler/packet/CPlayerKAPacket.java b/src/main/java/com/northwestwind/moreboots/handler/packet/CPlayerKAPacket.java index dcb173c..13e13ce 100644 --- a/src/main/java/com/northwestwind/moreboots/handler/packet/CPlayerKAPacket.java +++ b/src/main/java/com/northwestwind/moreboots/handler/packet/CPlayerKAPacket.java @@ -23,7 +23,7 @@ public void handle(final NetworkEvent.Context ctx) { ItemStack boots = player.getItemStackFromSlot(EquipmentSlotType.FEET); if(!boots.getItem().equals(ItemInit.KA_BOOTS)) return; BlockPos pos = new BlockPos(player.getPositionVec()); - AxisAlignedBB area = new AxisAlignedBB(pos).expand(8, 8, 8); + AxisAlignedBB area = new AxisAlignedBB(pos).grow(4); List collidedEntities = player.world.getEntitiesInAABBexcluding(player, area, EntityPredicates.NOT_SPECTATING); LivingEntity closest = null; for (Entity entity : collidedEntities) { diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 5addfe7..44d85b1 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,11 +1,11 @@ modLoader="javafml" -loaderVersion="[32,35)" +loaderVersion="[32,35]" license="MIT" issueTrackerURL="https://github.com/North-West-Wind/MoreBoots/issues" [[mods]] modId="moreboots" -version="1.1.0" +version="1.2.0" displayName="More Boots" updateJSONURL="https://github.com/North-West-Wind/MoreBoots/raw/main/update.json" displayURL="https://github.com/North-West-Wind/MoreBoots" @@ -20,13 +20,13 @@ Oh, you love shoes? Name every boots in this mod. [[dependencies.moreboots]] modId="forge" mandatory=true - versionRange="[32,35)" + versionRange="[32,35]" ordering="NONE" side="BOTH" [[dependencies.moreboots]] modId="minecraft" mandatory=true - versionRange="[1.16.1,1.16.4)" + versionRange="[1.16.1,1.16.4]" ordering="NONE" side="BOTH" diff --git a/src/main/resources/assets/moreboots/lang/en_us.json b/src/main/resources/assets/moreboots/lang/en_us.json index 77c378d..e55cc66 100644 --- a/src/main/resources/assets/moreboots/lang/en_us.json +++ b/src/main/resources/assets/moreboots/lang/en_us.json @@ -31,6 +31,8 @@ "item.moreboots.windy_boots": "Windy Boots", "item.moreboots.skating_boots": "Skater", "item.moreboots.prismarine_boots": "Prismarine Boots", + "item.moreboots.bat_boots": "Bat Boots", + "item.moreboots.ka_boots": "Kill Aura Boots", "item.moreboots.quartz_ingot": "Quartz Ingot", "item.moreboots.metal_mix": "Metal Mix", @@ -75,6 +77,8 @@ "tooltip.moreboots.windy_boots": "\u00A77\u00A7oGains velocity in the air", "tooltip.moreboots.skating_boots": "\u00A77\u00A7oSneak to skate on ice", "tooltip.moreboots.prismarine_boots": "\u00A77\u00A7oSwims extremely fast", + "tooltip.moreboots.bat_boots": "\u00A77\u00A7oWalks on ceiling", + "tooltip.moreboots.ka_boots": "\u00A77\u00A7oHelps with your aim", "itemGroup.morebootstab": "More Boots", "death.attack.stomp": "%1$s was stomped by %2$s", @@ -140,6 +144,10 @@ "advancements.moreboots.prismarine_boots.description": "Obtain the Prismarine Boots", "advancements.moreboots.windy_boots.title": "Not Gliding", "advancements.moreboots.windy_boots.description": "Obtain the Windy Boots", + "advancements.moreboots.bat_boots.title": "BATMAN!!!", + "advancements.moreboots.bat_boots.description": "Obtain the Bat Boots", + "advancements.moreboots.ka_boots.title": "Please Stop Hacking", + "advancements.moreboots.ka_boots.description": "Obtain the Kill Aura Boots", "key.categories.moreboots": "More Boots", "key.moreboots.teleport": "Ender Boots Teleport" diff --git a/src/main/resources/assets/moreboots/models/item/bat_boots.json b/src/main/resources/assets/moreboots/models/item/bat_boots.json new file mode 100644 index 0000000..678578d --- /dev/null +++ b/src/main/resources/assets/moreboots/models/item/bat_boots.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "moreboots:items/bat_boots" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/moreboots/models/item/ka_boots.json b/src/main/resources/assets/moreboots/models/item/ka_boots.json new file mode 100644 index 0000000..309c6fa --- /dev/null +++ b/src/main/resources/assets/moreboots/models/item/ka_boots.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "moreboots:items/ka_boots" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/moreboots/textures/items/bat_boots.png b/src/main/resources/assets/moreboots/textures/items/bat_boots.png new file mode 100644 index 0000000..89c5e35 Binary files /dev/null and b/src/main/resources/assets/moreboots/textures/items/bat_boots.png differ diff --git a/src/main/resources/assets/moreboots/textures/items/ka_boots.png b/src/main/resources/assets/moreboots/textures/items/ka_boots.png new file mode 100644 index 0000000..b09a4e7 Binary files /dev/null and b/src/main/resources/assets/moreboots/textures/items/ka_boots.png differ diff --git a/src/main/resources/assets/moreboots/textures/models/armor/bat_layer_1.png b/src/main/resources/assets/moreboots/textures/models/armor/bat_layer_1.png new file mode 100644 index 0000000..af989f6 Binary files /dev/null and b/src/main/resources/assets/moreboots/textures/models/armor/bat_layer_1.png differ diff --git a/src/main/resources/assets/moreboots/textures/models/armor/ka_layer_1.png b/src/main/resources/assets/moreboots/textures/models/armor/ka_layer_1.png new file mode 100644 index 0000000..8747f10 Binary files /dev/null and b/src/main/resources/assets/moreboots/textures/models/armor/ka_layer_1.png differ diff --git a/src/main/resources/data/moreboots/advancements/moreboots/bat_boots.json b/src/main/resources/data/moreboots/advancements/moreboots/bat_boots.json new file mode 100644 index 0000000..f234412 --- /dev/null +++ b/src/main/resources/data/moreboots/advancements/moreboots/bat_boots.json @@ -0,0 +1,36 @@ +{ + "parent": "moreboots:moreboots/slime_boots", + "display": { + "icon": { + "item": "moreboots:bat_boots", + "nbt": "{Damage:0}" + }, + "title": { + "translate": "advancements.moreboots.bat_boots.title" + }, + "description": { + "translate": "advancements.moreboots.bat_boots.description" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": false + }, + "criteria": { + "bat_boots": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "moreboots:bat_boots" + } + ] + } + } + }, + "requirements": [ + [ + "bat_boots" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/data/moreboots/advancements/moreboots/ka_boots.json b/src/main/resources/data/moreboots/advancements/moreboots/ka_boots.json new file mode 100644 index 0000000..209fc23 --- /dev/null +++ b/src/main/resources/data/moreboots/advancements/moreboots/ka_boots.json @@ -0,0 +1,36 @@ +{ + "parent": "moreboots:moreboots/root", + "display": { + "icon": { + "item": "moreboots:ka_boots", + "nbt": "{Damage:0}" + }, + "title": { + "translate": "advancements.moreboots.ka_boots.title" + }, + "description": { + "translate": "advancements.moreboots.ka_boots.description" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": false + }, + "criteria": { + "ka_boots": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "moreboots:ka_boots" + } + ] + } + } + }, + "requirements": [ + [ + "ka_boots" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/data/moreboots/recipes/bat_boots.json b/src/main/resources/data/moreboots/recipes/bat_boots.json new file mode 100644 index 0000000..e5eb1c8 --- /dev/null +++ b/src/main/resources/data/moreboots/recipes/bat_boots.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "# #", + "# #" + ], + "key": { + "#": { + "item": "moreboots:bat_hide" + } + }, + "result": { + "item": "moreboots:bat_boots", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/moreboots/recipes/ka_boots.json b/src/main/resources/data/moreboots/recipes/ka_boots.json new file mode 100644 index 0000000..d0b1b64 --- /dev/null +++ b/src/main/resources/data/moreboots/recipes/ka_boots.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " # ", + "GND", + " I " + ], + "key": { + "#": { + "item": "minecraft:netherite_sword" + }, + "G": { + "item": "minecraft:golden_sword" + }, + "N": { + "item": "minecraft:netherite_boots" + }, + "D": { + "item": "minecraft:diamond_sword" + }, + "I": { + "item": "minecraft:iron_sword" + } + }, + "result": { + "item": "moreboots:ka_boots", + "count": 1 + } +} \ No newline at end of file diff --git a/update.json b/update.json index 91e3f54..5ee4386 100644 --- a/update.json +++ b/update.json @@ -3,31 +3,35 @@ "1.16.4": { "1.0.0": "The very first release", "1.0.1": "Fixed furnace recipe", - "1.1.0": "Week #1 Update" + "1.1.0": "Week #1 Update", + "1.2.0": "Week #2 Update" }, "1.16.3": { "1.0.0": "The very first release", "1.0.1": "Fixed furnace recipe", - "1.1.0": "Week #1 Update" + "1.1.0": "Week #1 Update", + "1.2.0": "Week #2 Update" }, "1.16.2": { "1.0.0": "The very first release", "1.0.1": "Fixed furnace recipe", - "1.1.0": "Week #1 Update" + "1.1.0": "Week #1 Update", + "1.2.0": "Week #2 Update" }, "1.16.1": { "1.0.0": "The very first release", "1.0.1": "Fixed furnace recipe", - "1.1.0": "Week #1 Update" + "1.1.0": "Week #1 Update", + "1.2.0": "Week #2 Update" }, "promos": { - "1.16.4-latest": "1.1.0", - "1.16.4-recommended": "1.1.0", - "1.16.3-latest": "1.1.0", - "1.16.3-recommended": "1.1.0", - "1.16.2-latest": "1.1.0", - "1.16.2-recommended": "1.1.0", - "1.16.1-latest": "1.1.0", - "1.16.1-recommended": "1.1.0" + "1.16.4-latest": "1.2.0", + "1.16.4-recommended": "1.2.0", + "1.16.3-latest": "1.2.0", + "1.16.3-recommended": "1.2.0", + "1.16.2-latest": "1.2.0", + "1.16.2-recommended": "1.2.0", + "1.16.1-latest": "1.2.0", + "1.16.1-recommended": "1.2.0" } } \ No newline at end of file