From c2140c0e5509be23b515d76ac11f072b26ebfb22 Mon Sep 17 00:00:00 2001 From: 3944Realms Date: Thu, 5 Jun 2025 20:19:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E4=B8=BA1.?= =?UTF-8?q?0.5=20=E6=B7=BB=E5=8A=A0=E4=BA=86=E4=B8=AD=E6=96=87=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20=E5=B0=86=E7=81=AB=E7=82=AE=E7=89=A9=E5=93=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=E5=88=9B=E9=80=A0=E7=89=A9=E5=93=81?= =?UTF-8?q?=E6=A0=8F=E2=80=9C=E5=8A=9F=E8=83=BD=E6=80=A7=E6=96=B9=E5=9D=97?= =?UTF-8?q?FUNCTIONAL=5FBLOCKS=E2=80=9D=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../content/entity/CannonEntity.java | 1 - .../content/item/ItemEventHandler.java | 16 ++++++++++++++++ .../assets/blasttravelreborn/lang/zh_cn.json | 10 ++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/leisuretimedock/blasttravelreborn/content/item/ItemEventHandler.java create mode 100644 src/main/resources/assets/blasttravelreborn/lang/zh_cn.json diff --git a/gradle.properties b/gradle.properties index 5907484..3506e21 100644 --- a/gradle.properties +++ b/gradle.properties @@ -38,7 +38,7 @@ mod_name=BlastTravel-Reborn # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=MIT # The mod version. See https://semver.org/ -mod_version=1.0.4+1.20.1-forge +mod_version=1.0.5+1.20.1-forge jsonem_version=0.2.1+1.20-fabrge # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. diff --git a/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/CannonEntity.java b/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/CannonEntity.java index d376ba7..8e301c6 100644 --- a/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/CannonEntity.java +++ b/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/CannonEntity.java @@ -18,7 +18,6 @@ import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket; -import net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; diff --git a/src/main/java/com/leisuretimedock/blasttravelreborn/content/item/ItemEventHandler.java b/src/main/java/com/leisuretimedock/blasttravelreborn/content/item/ItemEventHandler.java new file mode 100644 index 0000000..2169ec5 --- /dev/null +++ b/src/main/java/com/leisuretimedock/blasttravelreborn/content/item/ItemEventHandler.java @@ -0,0 +1,16 @@ +package com.leisuretimedock.blasttravelreborn.content.item; + +import com.leisuretimedock.blasttravelreborn.BlastTravelReborn; +import net.minecraft.world.item.CreativeModeTabs; +import net.minecraftforge.event.BuildCreativeModeTabContentsEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber(modid = BlastTravelReborn.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) +public class ItemEventHandler { + @SubscribeEvent + public static void onCreativeEvent(BuildCreativeModeTabContentsEvent event) { + if (event.getTabKey() == CreativeModeTabs.FUNCTIONAL_BLOCKS) + event.accept(BTRItems.CANNON_ITEM); + } +} diff --git a/src/main/resources/assets/blasttravelreborn/lang/zh_cn.json b/src/main/resources/assets/blasttravelreborn/lang/zh_cn.json new file mode 100644 index 0000000..11f8179 --- /dev/null +++ b/src/main/resources/assets/blasttravelreborn/lang/zh_cn.json @@ -0,0 +1,10 @@ +{ + "container.blasttravelreborn.cannon_container_menu": "大炮", + "item.blasttravelreborn.cannon": "大炮", + "entity.blasttravelreborn.cannon": "大炮实体", + + "death.attack.blasttravelreborn.cannon": "%s被飞行的%s击倒了", + "dialog.blasttravelreborn.full_cannon": "大炮已装满!", + "dialog.blasttravelreborn.no_gunpowder": "大炮没有火药了!", + "mount.blasttravelreborn.cannon.onboard": "按%s离开,或按%s发射" +}