From 494da44e94bf47f3c86f7de7b15044cb20e02534 Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sat, 4 Feb 2017 21:43:00 +0800 Subject: [PATCH 01/36] Fix wooden window fu hasn't recipe --- src/main/java/unstudio/chinacraft/common/Recipes.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 78d073f..1d8f31f 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -102,6 +102,8 @@ public static void init() { GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindowdragon, 1), new Object[]{"HHH", "B#A", "HHH", 'H', Item.getItemFromBlock(Blocks.log), '#', ChinaCraft.artKnife, 'A', ChinaCraft.woodenWindow4, 'B', ChinaCraft.woodenWindow2})); + GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindowfu, 1), + new Object[]{"HHH", "B#B", "HHH", 'H', Item.getItemFromBlock(Blocks.log), '#', ChinaCraft.artKnife, 'B', ChinaCraft.woodenWindow2})); GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindow4, 4), new Object[]{" # ", "#A#", " # ", 'A', ChinaCraft.artKnife, '#', Items.stick})); GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindow3, 4), new Object[]{"B#B", "#A#", "B#B", 'A', From 73e25cc984e7ec6c42dfa4e16bcb654b7b85933d Mon Sep 17 00:00:00 2001 From: 3TUSK Date: Thu, 23 Feb 2017 21:22:54 -0500 Subject: [PATCH 02/36] Close UnknownStudio/ChinaCraft#5 - improve english text --- .../assets/chinacraft/lang/en_US.lang | 148 +++++++++--------- .../assets/chinacraft/lang/zh_CN.lang | 4 +- 2 files changed, 79 insertions(+), 73 deletions(-) diff --git a/src/main/resources/assets/chinacraft/lang/en_US.lang b/src/main/resources/assets/chinacraft/lang/en_US.lang index c57a849..ee57b5f 100644 --- a/src/main/resources/assets/chinacraft/lang/en_US.lang +++ b/src/main/resources/assets/chinacraft/lang/en_US.lang @@ -1,33 +1,34 @@ -tile.bronze_block.name=Bronze Block +tile.bronze_block.name=Block of Bronze item.bronze_ingot.name=Bronze Ingot -item.copper_tin_mixed_powder.name=Copper & Tin Mixed Powder +item.copper_tin_mixed_powder.name=Copper-Tin Mixture item.bronze_sword.name=Bronze Sword -item.bronze_bigsword.name=Bronze Big Sword -item.bronze_bigsword_green.name=Bronze Big Sword - §2Fei Cui Jade -item.bronze_bigsword_green2.name=Bronze Big Sword - §aJasper -item.bronze_bigsword_pink.name=Bronze Big Sword - §dRoss quartz -item.bronze_bigsword_purple.name=Bronze Big Sword - §5Purple Jade -item.yanlung_giantknife.name=BL Giant Sword -item.yanlung_giantknife.lore=If the entity is attacked, the entity will burn +item.bronze_bigsword.name=Big Bronze Sword +item.bronze_bigsword_green.name=Big Bronze Sword - §2Jade +item.bronze_bigsword_green2.name=Big Bronze Sword - §aJasper +item.bronze_bigsword_pink.name=Big Bronze Sword - §dRoss quartz +item.bronze_bigsword_purple.name=Big Bronze Sword - §5Purple Jade +item.yanlung_giantknife.name=Giant Sword of Blazing Dragon +item.yanlung_giantknife.lore=Burn target upon being attacked item.jiuqu_tang.name=Jiu Qu Sword item.mace.name=Mace -item.mace.lore=Make the aggressor dizziness +item.mace.lore=Dizzy the target item.super_bow.name=Powerful Bow item.bronze_axe.name=Bronze Axe item.bronze_pickaxe.name=Bronze Pickaxe item.bronze_hoe.name=Bronze Hoe item.bronze_shovel.name=Bronze Shovel item.bronze_helmet.name=Bronze Helmet -item.bronze_body.name=Bronze Body -item.bronze_legs.name=Bronze Legs +item.bronze_body.name=Bronze Chestplate +item.bronze_legs.name=Bronze Leggings item.bronze_boots.name=Bronze Boots item.night_clothes_head.name=Night Clothes Helmet item.night_clothes_body.name=Night Clothes Body item.night_clothes_leg.name=Night Clothes Legs item.night_clothes_shoe.name=Night Clothes Boots item.nightclothes.lore=Night is coming, the world is in your control -item.nightclothes.hidelore.1=Wear complete set can make you more light , and you can double jump at air. -item.nightclothes.hidelore.2=And keep pressing SHIFT can you invisible at night +item.nightclothes.hidelore.1=Full suit will give the following effects: +item.nightclothes.hidelore.2=Double-jump while falling +item.nightclothes.hidelore.3=Being invisible while sneaking item.hammer_diamond.name=Diamond Hammer item.hammer_iron.name=Iron Hammer item.hammer_bronze.name=Bronze Hammer @@ -36,44 +37,44 @@ item.jade_knife.name=Jade Cutting Knife item.jade_knife.hidelore=Throwable, damage 1, can't be pick up item.art_knife.name=Art Cutting Knife item.art_knife.hidelore=Use item to the lantern scaldfish, can make it smaller! -item.buddhist_cane.name=Buddhist monk's staff -item.buddhist_cane.lore=The staff which was from Buddhism is filled with life and hop -item.buddhist_cane.hidelore.1=Attack entity to heal it -item.buddhist_cane.hidelore.2=Keeping using this can heal the players around you -item.buddhist_cane.hidelore.3=Break some block such as grass, leaves and so on can repair this -item.spiritual_magic_figures.name=Spiritual Magic Paper -item.spiritual_magic_figures_fire.name=Fire Spiritual Magic Paper -item.spiritual_magic_figures_fire.lore=To Make Entity be Burn -item.spiritual_magic_figures_power.name=Power Spiritual Magic Paper -item.spiritual_magic_figures_poison.name=Poison Spiritual Magic Paper -item.spiritual_magic_figures_night_vision.name=Night Vision Spiritual Magic Paper -item.spiritual_magic_figures_heal.name=Heal Spiritual Magic Paper -item.spiritual_magic_figures_protect.name=Protect Spiritual Magic Paper -item.SMFSuper.name=Mess Figures +item.buddhist_cane.name=Staff of Buddhist Monk +item.buddhist_cane.lore=The Buddhism staff, filling with essence of life +item.buddhist_cane.hidelore.1=Heal target upon attack +item.buddhist_cane.hidelore.2=Can heal surrounding players while being used +item.buddhist_cane.hidelore.3=Can be healed upon breaking grass, leaves or the alike +item.spiritual_magic_figures.name=Spirit Spell +item.spiritual_magic_figures_fire.name=Spirit Spell of Flame +item.spiritual_magic_figures_fire.lore=Let entity burn +item.spiritual_magic_figures_power.name=Spirit Spell of Power +item.spiritual_magic_figures_poison.name=Spirit Spell of Poison +item.spiritual_magic_figures_night_vision.name=Spirit Spell of Night Vision +item.spiritual_magic_figures_heal.name=Spirit Spell of Regeneration +item.spiritual_magic_figures_protect.name=Spirit Spell of Protection +item.SMFSuper.name=Chaotic Spell item.debug.name=Debug -item.xinjiang_nut_cake.name=XinJiang Nut Cake +item.xinjiang_nut_cake.name=Xinjiang Nut Cake item.china_crown.name=Crown -item.chinacrown.lore=Symbol of rights -item.chinacrown.hidelore=Get power potion effect +item.chinacrown.lore=Symbol of the Power +item.chinacrown.hidelore=Will give wearer with Strength Effect tile.xinjiang_nut_cake.name=Xinjiang Nut Cake item.apple_cake.name=Apple Cake tile.apple_cake.name=Apple Cake item.firecracker.name=Firecracker item.firecracker.hidelore=All the firecracker will be thrown if you are sneaking -item.bomb.name=Thrown Bomb +item.bomb.name=Throwable Bomb item.flying_cutter.name=Fly-cutter -item.flying_cutter.lore=A knife, an injured +item.flying_cutter.lore=As sharp as dank item.flying_cutter.hidelore=Throwable, damage 4, can be pick up tile.tin_ore.name=Tin Ore item.tin_ingot.name=Tin Ingot -item.tin_powder.name=Tin Power +item.tin_powder.name=Tin Powder tile.silver_ore.name=Silver Ore item.silver_ingot.name=Silver Ingot tile.silver_block.name=Silver Block item.copper_ingot.name=Copper Ingot -item.copper_powder.name=Copper Power +item.copper_powder.name=Copper Powder tile.copper_ore.name=Copper Ore tile.copper_block.name=Copper Block item.bronze_ingot.name=Bronze Ingot @@ -93,14 +94,14 @@ tile.chrysanthemum.name=Chrysanthemum tile.glutinous_rice.name=Glutinous Rice item.glutinous_rice.name=Glutinous Rice tile.peony.name=Peony -tile.prunus_mume_branch.name=Prunus Mume Branch -tile.prunus_mume_wood.name=Prunus Mume Sapling +tile.prunus_mume_branch.name=Chinese Plum Branch +tile.prunus_mume_wood.name=Chinese Plum Sapling tile.reed.name=Reed -tile.jasmine_bush.name=Jasmine shrub -tile.prunus_mume_sapling=Prunus Mume Sapling +tile.jasmine_bush.name=Jasmine Shrub +tile.prunus_mume_sapling=Chinese Plum Sapling tile.tea_bush=Tea Bush -tile.wooden_window.name=Wood pane +tile.wooden_window.name=Wood Pane tile.mulberry_log.name=Mulberry Log tile.mulberry_leaf.name=Mulberry Leaf @@ -110,7 +111,7 @@ tile.mulberry_wood.name=Mulberry Wood tile.marble.name=Marble tile.smooth_marble.name=Smooth Marble -tile.pillar_marble.name=Pillar Marble +tile.pillar_marble.name=Marble Pillar tile.chiseled_marble.name=Chiseled Marble tile.marble_slab.name=Marble Slab tile.marble_stair.name=Marble Stair @@ -134,11 +135,11 @@ item.wooden_bucket.name=Wooden Bucket item.wooden_bucket_water.name=Water Wooden Bucket item.wooden_bucket.opps=Opps, the wooden bucket on fire -item.bucket_salt.name=A Bucket of salt +item.bucket_salt.name=Bucket of Salt item.salt_powder.name=Salt -item.doujiang_bucket.name=Soya-bean milk +item.doujiang_bucket.name=Bucket of Soybean Milk item.rices.name=Rices -item.lcker.name=Lcker +item.lcker.name=Rice Ear item.soy.name=Soy item.soy_pod.name=Pod item.cocoa.name=Cocoa Powder @@ -149,6 +150,11 @@ item.flour.name=Flour item.rice_flour.name=Rice Flour item.barley_rice.name=Barley Rice +tile.wooden_bucket.name=Wooden Bucket +item.wooden_bucket.name=Wooden Bucket +item.wooden_bucket_water.name=Wooden Water Bucket +item.wooden_bucket.opps=Oops, it's on fire, oh no it's now ashes... + item.silkworm_chrysalis.name=Silkworm Chrysalis item.silkworm_young.name=Young Silkworm item.silkworm_graine.name=Silkworm Graine @@ -156,18 +162,18 @@ item.silkworm_dead.name=Dead Silkworm item.sericulture_frame.name=Sericulture frame tile.sericulture_frame.name=Sericulture frame gui.sericulture_frame.title=Sericulture frame -gui.sericulture_frame.stopWork.lowLight.info=Need More Light! -gui.sericulture_frame.stopWork.highLight.info=Too Much Light! -gui.sericulture_frame.stopWork.biome.info=Bad Biome! -gui.sericulture_frame.stopWork.outputSlotFull.info=Output Slot is full! -gui.sericulture_frame.outputSlotStucks.info=Output Slot Stucks! -gui.sericulture_frame.noMulberryLeaf.info=No Mulberry Leaf! -gui.sericulture_frame.noRainProtection.info=No Rain Protection! -tooltip.progress.info=Progress: -tooltip.generation.info=Generation: -tooltip.productivity.info=Productivity: -tooltip.speed.info=Speed: -tooltip.fertility.info=Fertility: +gui.sericulture_frame.stopWork.lowLight.info=Need more light! +gui.sericulture_frame.stopWork.highLight.info=Too much light! +gui.sericulture_frame.stopWork.biome.info=Hostile biome! +gui.sericulture_frame.stopWork.outputSlotFull.info=No output space! +gui.sericulture_frame.outputSlotStucks.info=Output is stucked! +gui.sericulture_frame.noMulberryLeaf.info=No mulberry leaf! +gui.sericulture_frame.noRainProtection.info=Need some sort of rain-proof structure! +tooltip.progress.info=Progress: +tooltip.generation.info=Generation: +tooltip.productivity.info=Productivity: +tooltip.speed.info=Speed: +tooltip.fertility.info=Fertility: item.moth.male.name=Male moth item.moth.female.name=Female moth @@ -205,12 +211,12 @@ nei.gui.buhrimill.title=Buhrimill Recipes nei.gui.buhrimill.rotime.info=%.1fround waila.empty.info=None Input waila.invalidInput.info=Invalid Input! -waila.progress.info=Progress: +waila.progress.info=Progress: -gui.jade_bench.title=Jade Work Table -tile.jade_table.name=Jade Work Table +gui.jade_bench.title=Jade Workbench +tile.jade_table.name=Jade Workbench gui.jade_table.info=Jade Information -nei.gui.jadebench.title=Jade Worktable Recipes +nei.gui.jadebench.title=Jade Workbench nei.jadebench.output.info=Outputs: tile.cooking_bench.name=Furnace Platform @@ -220,14 +226,14 @@ tile.blockfirebrick.title=Firebrick item.firebrick.name=Firebrick item.clay_sand_mixture.name=Clay Sand Mixture -item.jade_green.name=§2Fei Cui Jade§r +item.jade_green.name=§2Jade§r item.jade_green2.name=§aJasper§r item.jade_pink.name=§dRoss quartz§r item.jade_purple.name=§5Purple Jade§r -itemGroup.core=Chinese Civilization-Core -itemGroup.tool=Chinese Civilization-Tools -itemGroup.farming=Chinese Civilization-Farming +itemGroup.core=Chinese Civilization - Core +itemGroup.tool=Chinese Civilization - Tools +itemGroup.farming=Chinese Civilization - Farming debug.firstline=Debug Tool: debug.blockinfo=Block Info @@ -254,20 +260,20 @@ record.the_march_of_the_volunteers=March of the Volunteers record.spring_festival_overture=Spring festival Overture splashText.spring.1=Happy Spring Festival! -splashText.spring.2=Best wishes for you and your family. -splashText.spring.3=Happy Spring Festival! +splashText.spring.2=Best wishes to you as well as your family. +splashText.spring.3=Happy Chinese New Year! item.redpacket.name=Red Packet gui.redpacket.title=Red Packet gui.redpacket.wash=Please enter a blessing... -gui.redpacket.sendee=Sendee: +gui.redpacket.sendee=Send to: gui.redpacket.from=From %s's Red Packet gui.redpacket.pack=Pack gui.redpacket.send=Send redpacket.success=Successfully send a Red Packet to %s. -redpacket.not_found_player=Failed: Can't find Player %s! -redpacket.backpack_full=Failed: %s's Backpack is full! -redpacket.received=You received a red Red Packet.! +redpacket.not_found_player=Failed: Can't find player %s! +redpacket.backpack_full=Failed: %s's inventory is full! +redpacket.received=You received a Red Packet.! gui.inventory.shiftfordetail=§7§o @@ -278,4 +284,4 @@ entity.panda.name=Panda VersionChecker.perfix=Found New Version!Click to Download. VersionChecker.version=Latest Version: !new ,Currect Version: !old . -death.attack.continuedLife=%1$s lost his life in order to heal other creature \ No newline at end of file +death.attack.continuedLife=%1$s lost his life in order to heal other creature diff --git a/src/main/resources/assets/chinacraft/lang/zh_CN.lang b/src/main/resources/assets/chinacraft/lang/zh_CN.lang index 40e4d27..79a9e9b 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_CN.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_CN.lang @@ -56,7 +56,7 @@ item.SMFSuper.name=混沌符 item.debug.name=调试 item.china_crown.name=冕冠 -item.chinacrown.lore=权利的象征 +item.chinacrown.lore=权力的象征 item.chinacrown.hidelore=获得 力量 效果 item.xinjiang_nut_cake.name=切糕 tile.xinjiang_nut_cake.name=切糕 @@ -153,7 +153,7 @@ item.barley_rice.name=麦仁 tile.wooden_bucket.name=木桶 item.wooden_bucket.name=木桶 item.wooden_bucket_water.name=木水桶 -item.wooden_bucket.opps=Opps , 木桶着火了 , oh , 他烧成了灰烬 +item.wooden_bucket.opps=木桶着火了,等等,它烧成了灰烬 item.silkworm_chrysalis.name=蚕蛹 item.silkworm_young.name=幼蚕 From 2a34668977a501cae98b6e1778ff72e2e456508d Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sat, 18 Mar 2017 21:25:10 +0800 Subject: [PATCH 03/36] fixed issue fix #7 --- src/main/java/unstudio/chinacraft/common/CommonProxy.java | 2 +- .../java/unstudio/chinacraft/world/gen/WorldGenListener.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/common/CommonProxy.java b/src/main/java/unstudio/chinacraft/common/CommonProxy.java index dc2b4a3..46bd20a 100644 --- a/src/main/java/unstudio/chinacraft/common/CommonProxy.java +++ b/src/main/java/unstudio/chinacraft/common/CommonProxy.java @@ -76,7 +76,7 @@ public void init(FMLInitializationEvent event) { // GameRegistry.registerWorldGenerator(ChinaCraft.tinOre, 3); // GameRegistry.registerWorldGenerator(ChinaCraft.jadeOre, 3); new WorldGenListener(); - GameRegistry.registerWorldGenerator(ChinaCraft.blockMarble, 127); + //GameRegistry.registerWorldGenerator(ChinaCraft.blockMarble, 127); GameRegistry.registerWorldGenerator(new WorldGenCCFlower(), 1); GameRegistry.registerWorldGenerator(new WorldGenMulberryTree(true), 1); GameRegistry.registerWorldGenerator(ChinaCraft.blockBambooShoot, 1); diff --git a/src/main/java/unstudio/chinacraft/world/gen/WorldGenListener.java b/src/main/java/unstudio/chinacraft/world/gen/WorldGenListener.java index a64ec4e..3d62775 100644 --- a/src/main/java/unstudio/chinacraft/world/gen/WorldGenListener.java +++ b/src/main/java/unstudio/chinacraft/world/gen/WorldGenListener.java @@ -14,7 +14,7 @@ public class WorldGenListener{ private final WorldGenCCOre WORLD_GEN_TIN_ORE = new WorldGenCCOre(new int[]{0},10,64,0,8, ChinaCraft.tinOre); private final WorldGenCCOre WORLD_GEN_SILVER_ORE = new WorldGenCCOre(new int[]{0},4,32,0,8, ChinaCraft.silverOre); private final WorldGenCCOre WORLD_GEN_JADE_ORE = new WorldGenCCOre(new int[]{0},4,64,32,4, ChinaCraft.jadeOre); - //private final WorldGenCCOre WORLD_GEN_MARBLE_ORE = new WorldGenCCOre(new int[]{0},4,32,0,8, ChinaCraft.blockMarble); + private final WorldGenCCOre WORLD_GEN_MARBLE_ORE = new WorldGenCCOre(new int[]{0},1,128,32,48, ChinaCraft.blockMarble); public WorldGenListener() { @@ -27,6 +27,6 @@ public void onOreGenPost(OreGenEvent.Post event){ WORLD_GEN_TIN_ORE.generate(event.world,event.rand,event.worldX,0,event.worldZ); WORLD_GEN_SILVER_ORE.generate(event.world,event.rand,event.worldX,0,event.worldZ); WORLD_GEN_JADE_ORE.generate(event.world,event.rand,event.worldX,0,event.worldZ); - //WORLD_GEN_MARBLE_ORE.generate(event.world,event.rand,event.worldX,0,event.worldZ); + WORLD_GEN_MARBLE_ORE.generate(event.world,event.rand,event.worldX,0,event.worldZ); } } From fdda80c6e9efb05a5a8d789bd54f75d95257a222 Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Thu, 23 Mar 2017 17:26:44 +0800 Subject: [PATCH 04/36] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index be501a1..b581dea 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -#ChinaCraft [![Build Status](https://travis-ci.org/UnknownStudio/ChinaCraft.svg?branch=master)](https://travis-ci.org/UnknownStudio/ChinaCraft) +# ChinaCraft [![Build Status](https://travis-ci.org/UnknownStudio/ChinaCraft.svg?branch=master)](https://travis-ci.org/UnknownStudio/ChinaCraft) From c49ecf03912c4b75e1965b04798fe324efc27ec2 Mon Sep 17 00:00:00 2001 From: Trychen Date: Sat, 1 Apr 2017 22:11:14 +0800 Subject: [PATCH 05/36] Added Cassock with bugs of rendering --- .../client/model/armor/ModelCassock.java | 89 ++++++++++++++++++ .../client/model/armor/ModelChinaCrown.java | 17 ++-- .../client/model/armor/ModelNightClothes.java | 3 + .../chinacraft/common/ChinaCraft.java | 3 + .../chinacraft/item/combat/ModelArmor.java | 2 +- .../item/combat/ModelArmorCassock.java | 60 ++++++++++++ .../chinacraft/textures/items/cassock.png | Bin 0 -> 20246 bytes .../textures/models/armor/cassock.png | Bin 0 -> 6694 bytes 8 files changed, 166 insertions(+), 8 deletions(-) create mode 100644 src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java create mode 100644 src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java create mode 100644 src/main/resources/assets/chinacraft/textures/items/cassock.png create mode 100644 src/main/resources/assets/chinacraft/textures/models/armor/cassock.png diff --git a/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java b/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java new file mode 100644 index 0000000..0e57f20 --- /dev/null +++ b/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java @@ -0,0 +1,89 @@ +package unstudio.chinacraft.client.model.armor; + +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelCassock extends ModelBiped { + //fields + ModelRenderer armorRightLeg; + ModelRenderer armorLeftLeg; + ModelRenderer armorInterBody; + ModelRenderer armorRightArm; + ModelRenderer armorLeftArm; + ModelRenderer armorOuterBody; + ModelRenderer armorOuterLeftArm; + + public ModelCassock() { + super(0, 0, 256, 128); + textureWidth = 256; + textureHeight = 128; + + armorRightLeg = new ModelRenderer(this, 0, 16); + armorRightLeg.addBox(-2F, 0F, -2F, 4, 12, 4); + armorRightLeg.setRotationPoint(-2F, 12F, 0F); + armorRightLeg.setTextureSize(256, 128); + armorRightLeg.mirror = true; + +// armorLeftLeg.mirror = true; + armorLeftLeg = new ModelRenderer(this, 0, 16); + armorLeftLeg.addBox(-2F, 0F, -2F, 4, 12, 4); + armorLeftLeg.setRotationPoint(2F, 12F, 0F); + armorLeftLeg.setTextureSize(256, 128); + armorLeftLeg.mirror = true; + +// armorLeftLeg.mirror = false; + armorInterBody = new ModelRenderer(this, 16, 16); + armorInterBody.addBox(-4F, 0F, -2F, 8, 12, 4); + armorInterBody.setRotationPoint(0F, 0F, 0F); + armorInterBody.setTextureSize(256, 128); + armorInterBody.mirror = true; + + armorRightArm = new ModelRenderer(this, 40, 16); + armorRightArm.addBox(-4F, 0F, -2F, 4, 11, 4); + armorRightArm.setRotationPoint(-4F, 0F, 0F); + armorRightArm.setTextureSize(256, 128); + armorRightArm.mirror = true; + + armorLeftArm = new ModelRenderer(this, 40, 16); + armorLeftArm.addBox(0F, 0F, -2F, 4, 11, 4); + armorLeftArm.setRotationPoint(4F, 0F, 0F); + armorLeftArm.setTextureSize(256, 128); + armorLeftArm.mirror = true; + + armorOuterBody = new ModelRenderer(this, 0, 32); + armorOuterBody.addBox(-4.5F, -0.5F, -2.5F, 9, 14, 5); + armorOuterBody.setRotationPoint(0F, 0F, 0F); + armorOuterBody.setTextureSize(256, 128); + armorOuterBody.mirror = true; + + armorOuterLeftArm = new ModelRenderer(this, 36, 32); + armorOuterLeftArm.addBox(-2.5F, -0.5F, -2.5F, 5, 11, 5); + armorOuterLeftArm.setRotationPoint(6F, 0F, 0F); + armorOuterLeftArm.setTextureSize(256, 128); + armorOuterLeftArm.mirror = true; + + bipedLeftArm.addChild(armorLeftArm); + bipedLeftArm.addChild(armorOuterLeftArm); + + bipedBody.addChild(armorInterBody); + bipedBody.addChild(armorOuterBody); + + bipedLeftLeg.addChild(armorLeftLeg); + + bipedRightLeg.addChild(armorRightLeg); + bipedRightArm.addChild(armorRightArm); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + armorRightLeg.render(f5); + armorLeftLeg.render(f5); + armorInterBody.render(f5); + armorRightArm.render(f5); + armorLeftArm.render(f5); + armorOuterBody.render(f5); + armorOuterLeftArm.render(f5); + } +} \ No newline at end of file diff --git a/src/main/java/unstudio/chinacraft/client/model/armor/ModelChinaCrown.java b/src/main/java/unstudio/chinacraft/client/model/armor/ModelChinaCrown.java index 1f0b082..4bcf859 100644 --- a/src/main/java/unstudio/chinacraft/client/model/armor/ModelChinaCrown.java +++ b/src/main/java/unstudio/chinacraft/client/model/armor/ModelChinaCrown.java @@ -1,9 +1,12 @@ package unstudio.chinacraft.client.model.armor; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; +@SideOnly(Side.CLIENT) public class ModelChinaCrown extends ModelBiped { ModelRenderer Shape1; ModelRenderer Shape2; @@ -442,13 +445,13 @@ public ModelChinaCrown(float expand) { public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); - // Shape1.render(f5); - // Shape2.render(f5); - // Shape3.render(f5); - // Shape4.render(f5); - // Shape5.render(f5); - // Shape6.render(f5); - // Shape7.render(f5); + // armorRightLeg.render(f5); + // armorBody.render(f5); + // armorLeftArm.render(f5); + // armorOuterBody.render(f5); + // armorLeftOuterArm.render(f5); + // armorLeftLeg.render(f5); + // armorRightArm.render(f5); // Shape8.render(f5); // Shape9.render(f5); // Shape10.render(f5); diff --git a/src/main/java/unstudio/chinacraft/client/model/armor/ModelNightClothes.java b/src/main/java/unstudio/chinacraft/client/model/armor/ModelNightClothes.java index 1160398..f8ef326 100644 --- a/src/main/java/unstudio/chinacraft/client/model/armor/ModelNightClothes.java +++ b/src/main/java/unstudio/chinacraft/client/model/armor/ModelNightClothes.java @@ -1,9 +1,12 @@ package unstudio.chinacraft.client.model.armor; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; +@SideOnly(Side.CLIENT) public class ModelNightClothes extends ModelBiped { ModelRenderer Shape1; ModelRenderer Shape2; diff --git a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java index 11cafc5..60bb8a4 100644 --- a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java +++ b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java @@ -335,6 +335,9 @@ public Item getTabIconItem() { new ModelArmor(ItemArmor.ArmorMaterial.CLOTH, "night_clothes_body", "nightclothes", 1, 1, 1), new ModelArmor(ItemArmor.ArmorMaterial.CLOTH, "night_clothes_leg", "nightclothes", 1, 2, 1), new ModelArmor(ItemArmor.ArmorMaterial.CLOTH, "night_clothes_shoe", "nightclothes", 1, 3, 1)}; + @Register("Cassock") + public static final ModelArmorCassock cassock = new ModelArmorCassock(); + @Register("BronzeHelmet") public static ItemArmor bronzeHelmet;// 青铜头盔 @Register("BronzeChestplate") diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmor.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmor.java index 3cf2944..2a5bb51 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/ModelArmor.java +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmor.java @@ -20,7 +20,7 @@ public class ModelArmor extends ItemArmor { @SideOnly(Side.CLIENT) protected IIcon itemIcon; - private String textureName = ""; + private String textureName; private ModelBiped armorModel; private int textureType; diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java new file mode 100644 index 0000000..24fd294 --- /dev/null +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java @@ -0,0 +1,60 @@ +package unstudio.chinacraft.item.combat; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; +import unstudio.chinacraft.client.model.armor.ModelCassock; + +/** + * Created by trychen on 17/3/25. + */ +public class ModelArmorCassock extends ModelArmor{ + @SideOnly(Side.CLIENT) + private ModelCassock armorModel = new ModelCassock(); + public ModelArmorCassock() { + super(ArmorMaterial.CLOTH, "cassock", null, 1,1,1); + } + + @Override + @SideOnly(Side.CLIENT) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + if (armorModel != null){ + armorModel.isSneak = entityLiving.isSneaking(); + armorModel.isRiding = entityLiving.isRiding(); + armorModel.isChild = entityLiving.isChild(); + + armorModel.heldItemRight = 0; + armorModel.aimedBow = false; + + EntityPlayer player = (EntityPlayer) entityLiving; + + ItemStack held_item = player.getEquipmentInSlot(0); + + if (held_item != null) { + armorModel.heldItemRight = 1; + + if (player.getItemInUseCount() > 0) { + + EnumAction enumaction = held_item.getItemUseAction(); + + if (enumaction == EnumAction.bow) { + armorModel.aimedBow = true; + } else if (enumaction == EnumAction.block) { + armorModel.heldItemRight = 3; + } + } + } + } + return armorModel; + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) { + return "chinacraft:textures/models/armor/cassock.png"; + } +} diff --git a/src/main/resources/assets/chinacraft/textures/items/cassock.png b/src/main/resources/assets/chinacraft/textures/items/cassock.png new file mode 100644 index 0000000000000000000000000000000000000000..1bdc4e2f1f23089bfdebaaa66f4bbe2c77ae2937 GIT binary patch literal 20246 zcmeI42{=^k`^S%^Y$;KeRHjkAmBwtwG9g$q zDK9%m761TwD}se1_zfHSk)8_v<^~0Q1ixh11P?9%$SDo|hyh2FQ~^NNm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0+T|#jf0_BryBf?WctjSzTJrhCjapn{G%|1= z!*^Ki218hjhp)&?o-tV}<+oKnS~L*R|66^!^dW3=P^yy<9W>t!xgrYLF(VkG@pq-I zMMl)|K~;tNL{4_G&_5VWdB&_scYtKl@#eDM?w9-d>(g6bzOLS8&3|@wlme&)#VdLJ zk*=3$&3xRPJ`w!eEkX7y$nOruX++PZh+x`hRNrL5Rrn|p0>3c*UHIU$oL}CuRNq;g zJW6Ul-LHLf6>($)n0fLM1E5V=dMeUt&I{UoEm6nE{vx5{t>Qaak z6(Q*vigwv*lEtL)^0yC;*GNJr#8iIZBF_U39i`k?%jWj4OIJqKL!a7%PI*`*>?|(} zWUKYv?+$wW6wrqOWOI66>v5rk@g|*XAO?UA1-HCXL|uPfD_)*Hz;#KwwKaA>kJ)ETqyl$ zNuvNwStwSc@;YqFPN&v8IW-XI4eT`MYPF+kCFzBkXYqPQXyN#_fk}`sG#Myw6Q0w6 zcl_AhKmOu6j91Jp8{f{yFK@~j>LWic4)bwi7Ei`UojG6D`y3?32zLHpzZ zvdd=df;iOqKFMe1=64rC3$O5KzbcjjVu|%W(+BUgcRoEho^-`h;K9Cmojq9kd^6$- zMVt>rL@rw4xPR07^NH6JGXrR;gr+;x6fDDj$>Fyjrg2@2X>~~F66CZFPu${Z)*Y6& zG|CaPb`3MU`&0ByIamRQ(mN3m`T74sy8ngt{$JAn$&&xC)BhVzhdQs9fpG92>w%yj R)c;T%P*c`Ys!_1~@Lyesa&`a! literal 0 HcmV?d00001 From 70f88751b14a3fccfd84b0a6890043467cfb109b Mon Sep 17 00:00:00 2001 From: Trychen Date: Sat, 1 Apr 2017 22:31:54 +0800 Subject: [PATCH 06/36] Try to fix bugs --- .../client/model/armor/ModelCassock.java | 11 +++++++--- .../item/combat/ModelArmorCassock.java | 20 ++++++++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java b/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java index 0e57f20..207c633 100644 --- a/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java +++ b/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java @@ -3,6 +3,7 @@ import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; +import org.lwjgl.opengl.GL11; public class ModelCassock extends ModelBiped { //fields @@ -15,7 +16,7 @@ public class ModelCassock extends ModelBiped { ModelRenderer armorOuterLeftArm; public ModelCassock() { - super(0, 0, 256, 128); + super(0.0f, 0, 256, 128); textureWidth = 256; textureHeight = 128; @@ -52,7 +53,7 @@ public ModelCassock() { armorLeftArm.mirror = true; armorOuterBody = new ModelRenderer(this, 0, 32); - armorOuterBody.addBox(-4.5F, -0.5F, -2.5F, 9, 14, 5); + armorOuterBody.addBox(-4.5F, -0.5F, -2.5F, 9, 13, 5); armorOuterBody.setRotationPoint(0F, 0F, 0F); armorOuterBody.setTextureSize(256, 128); armorOuterBody.mirror = true; @@ -63,8 +64,8 @@ public ModelCassock() { armorOuterLeftArm.setTextureSize(256, 128); armorOuterLeftArm.mirror = true; + armorLeftArm.addChild(armorOuterLeftArm); bipedLeftArm.addChild(armorLeftArm); - bipedLeftArm.addChild(armorOuterLeftArm); bipedBody.addChild(armorInterBody); bipedBody.addChild(armorOuterBody); @@ -78,12 +79,16 @@ public ModelCassock() { public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); + GL11.glScalef(1.01f, 1.01f , 1.01f); armorRightLeg.render(f5); armorLeftLeg.render(f5); armorInterBody.render(f5); armorRightArm.render(f5); armorLeftArm.render(f5); armorOuterBody.render(f5); + GL11.glPushMatrix(); + GL11.glScalef(1.1f, 1.1f , 1.1f); armorOuterLeftArm.render(f5); + GL11.glPopMatrix(); } } \ No newline at end of file diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java index 24fd294..aabca85 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java @@ -13,17 +13,24 @@ /** * Created by trychen on 17/3/25. */ -public class ModelArmorCassock extends ModelArmor{ +public class ModelArmorCassock extends ModelArmor { @SideOnly(Side.CLIENT) private ModelCassock armorModel = new ModelCassock(); + public ModelArmorCassock() { - super(ArmorMaterial.CLOTH, "cassock", null, 1,1,1); + super(ArmorMaterial.CLOTH, "cassock", null, 1, 1, 1); } @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { - if (armorModel != null){ + if (armorModel != null) { + armorModel.bipedBody.showModel = true; + armorModel.bipedRightArm.showModel = true; + armorModel.bipedLeftArm.showModel = true; + armorModel.bipedRightLeg.showModel = true; + armorModel.bipedLeftLeg.showModel = true; + armorModel.isSneak = entityLiving.isSneaking(); armorModel.isRiding = entityLiving.isRiding(); armorModel.isChild = entityLiving.isChild(); @@ -47,9 +54,16 @@ public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemSta } else if (enumaction == EnumAction.block) { armorModel.heldItemRight = 3; } + + } + } + + } + + return armorModel; } From 50ba9be237576d1e0ff507bbb3bc785ef3ed8aba Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sat, 1 Apr 2017 23:20:51 +0800 Subject: [PATCH 07/36] Fixed render --- .../client/model/armor/ModelCassock.java | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java b/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java index 0e57f20..1f9b4a8 100644 --- a/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java +++ b/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java @@ -13,6 +13,8 @@ public class ModelCassock extends ModelBiped { ModelRenderer armorLeftArm; ModelRenderer armorOuterBody; ModelRenderer armorOuterLeftArm; + ModelRenderer armorOuterRightLeg; + ModelRenderer armorOuterLeftLeg; public ModelCassock() { super(0, 0, 256, 128); @@ -21,69 +23,69 @@ public ModelCassock() { armorRightLeg = new ModelRenderer(this, 0, 16); armorRightLeg.addBox(-2F, 0F, -2F, 4, 12, 4); - armorRightLeg.setRotationPoint(-2F, 12F, 0F); + //armorRightLeg.setRotationPoint(-2F, 12F, 0F); armorRightLeg.setTextureSize(256, 128); armorRightLeg.mirror = true; // armorLeftLeg.mirror = true; armorLeftLeg = new ModelRenderer(this, 0, 16); armorLeftLeg.addBox(-2F, 0F, -2F, 4, 12, 4); - armorLeftLeg.setRotationPoint(2F, 12F, 0F); + //armorLeftLeg.setRotationPoint(2F, 12F, 0F); armorLeftLeg.setTextureSize(256, 128); armorLeftLeg.mirror = true; // armorLeftLeg.mirror = false; armorInterBody = new ModelRenderer(this, 16, 16); armorInterBody.addBox(-4F, 0F, -2F, 8, 12, 4); - armorInterBody.setRotationPoint(0F, 0F, 0F); + //armorInterBody.setRotationPoint(0F, 0F, 0F); armorInterBody.setTextureSize(256, 128); armorInterBody.mirror = true; armorRightArm = new ModelRenderer(this, 40, 16); armorRightArm.addBox(-4F, 0F, -2F, 4, 11, 4); - armorRightArm.setRotationPoint(-4F, 0F, 0F); + //armorRightArm.setRotationPoint(-4F, 0F, 0F); armorRightArm.setTextureSize(256, 128); armorRightArm.mirror = true; armorLeftArm = new ModelRenderer(this, 40, 16); armorLeftArm.addBox(0F, 0F, -2F, 4, 11, 4); - armorLeftArm.setRotationPoint(4F, 0F, 0F); + //armorLeftArm.setRotationPoint(4F, 0F, 0F); armorLeftArm.setTextureSize(256, 128); armorLeftArm.mirror = true; armorOuterBody = new ModelRenderer(this, 0, 32); armorOuterBody.addBox(-4.5F, -0.5F, -2.5F, 9, 14, 5); - armorOuterBody.setRotationPoint(0F, 0F, 0F); + //armorOuterBody.setRotationPoint(0F, 0F, 0F); armorOuterBody.setTextureSize(256, 128); armorOuterBody.mirror = true; armorOuterLeftArm = new ModelRenderer(this, 36, 32); armorOuterLeftArm.addBox(-2.5F, -0.5F, -2.5F, 5, 11, 5); - armorOuterLeftArm.setRotationPoint(6F, 0F, 0F); + armorOuterLeftArm.setRotationPoint(0.75F, -1.625F, 0F); armorOuterLeftArm.setTextureSize(256, 128); armorOuterLeftArm.mirror = true; - bipedLeftArm.addChild(armorLeftArm); - bipedLeftArm.addChild(armorOuterLeftArm); + armorOuterRightLeg = new ModelRenderer(this, 0, 0); + armorOuterRightLeg.addBox(0F, 0F, 0F, 1, 1, 1); + //armorOuterRightLeg.setRotationPoint(2F, 12.5F, 0F); + armorOuterRightLeg.setTextureSize(256, 128); + armorOuterRightLeg.mirror = true; + + armorOuterLeftLeg = new ModelRenderer(this, 0, 45); + armorOuterLeftLeg.addBox(-2.5F, 0F, -2.5F, 5, 10, 5); + //armorOuterLeftLeg.setRotationPoint(2F, 12.5F, 0F); + armorOuterLeftLeg.setTextureSize(256, 128); + armorOuterLeftLeg.mirror = true; + + //bipedLeftArm.addChild(armorLeftArm); + bipedLeftArm.addChild(armorOuterLeftArm); bipedBody.addChild(armorInterBody); bipedBody.addChild(armorOuterBody); - bipedLeftLeg.addChild(armorLeftLeg); - + bipedLeftLeg.addChild(armorOuterRightLeg); bipedRightLeg.addChild(armorRightLeg); - bipedRightArm.addChild(armorRightArm); - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - armorRightLeg.render(f5); - armorLeftLeg.render(f5); - armorInterBody.render(f5); - armorRightArm.render(f5); - armorLeftArm.render(f5); - armorOuterBody.render(f5); - armorOuterLeftArm.render(f5); + bipedRightLeg.addChild(armorOuterRightLeg); + //bipedRightArm.addChild(armorRightArm); } } \ No newline at end of file From 19fd00c41c81717435410c7bdc713d0c40013bdc Mon Sep 17 00:00:00 2001 From: Trychen Date: Sun, 2 Apr 2017 00:15:40 +0800 Subject: [PATCH 08/36] Better Cassock --- .../client/model/armor/ModelCassock.java | 32 ++++---- .../model/armor/ModelRendererScale.java | 54 +++++++++++++ .../event/combat/ListenerArmor.java | 79 +++++++++++-------- .../item/combat/ModelArmorCassock.java | 1 + 4 files changed, 116 insertions(+), 50 deletions(-) create mode 100644 src/main/java/unstudio/chinacraft/client/model/armor/ModelRendererScale.java diff --git a/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java b/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java index 19ee6a4..ca34215 100644 --- a/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java +++ b/src/main/java/unstudio/chinacraft/client/model/armor/ModelCassock.java @@ -2,15 +2,14 @@ import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import org.lwjgl.opengl.GL11; public class ModelCassock extends ModelBiped { - //fields + private final float scale = 1.005f; + ModelRenderer armorRightLeg; ModelRenderer armorLeftLeg; ModelRenderer armorInterBody; -// ModelRenderer armorRightArm; + ModelRenderer armorRightArm; // ModelRenderer armorLeftArm; ModelRenderer armorOuterBody; ModelRenderer armorOuterLeftArm; @@ -22,48 +21,48 @@ public ModelCassock() { textureWidth = 256; textureHeight = 128; - armorRightLeg = new ModelRenderer(this, 0, 16); + armorRightLeg = new ModelRendererScale(this, 0, 16, scale); armorRightLeg.addBox(-2F, 0F, -2F, 4, 12, 4); armorRightLeg.setTextureSize(256, 128); armorRightLeg.mirror = true; - armorLeftLeg = new ModelRenderer(this, 0, 16); + armorLeftLeg = new ModelRendererScale(this, 0, 16, scale); armorLeftLeg.addBox(-2F, 0F, -2F, 4, 12, 4); armorLeftLeg.setTextureSize(256, 128); armorLeftLeg.mirror = true; - armorInterBody = new ModelRenderer(this, 16, 16); + armorInterBody = new ModelRendererScale(this, 16, 16, 1.009f); armorInterBody.addBox(-4F, 0F, -2F, 8, 12, 4); armorInterBody.setTextureSize(256, 128); armorInterBody.mirror = true; -// armorRightArm = new ModelRenderer(this, 40, 16); -// armorRightArm.addBox(-4F, 0F, -2F, 4, 11, 4); -// armorRightArm.setTextureSize(256, 128); -// armorRightArm.mirror = true; + armorRightArm = new ModelRendererScale(this, 40, 16, scale); + armorRightArm.addBox(-3F, -2.5F, -2F, 4, 11, 4); + armorRightArm.setTextureSize(256, 128); + armorRightArm.mirror = true; // // armorLeftArm = new ModelRenderer(this, 40, 16); // armorLeftArm.addBox(0F, 0F, -2F, 4, 11, 4); // armorLeftArm.setTextureSize(256, 128); // armorLeftArm.mirror = true; - armorOuterBody = new ModelRenderer(this, 0, 32); + armorOuterBody = new ModelRendererScale(this, 0, 32, 1.01f); armorOuterBody.addBox(-4.5F, -0.5F, -2.5F, 9, 14, 5); armorOuterBody.setTextureSize(256, 128); armorOuterBody.mirror = true; - armorOuterLeftArm = new ModelRenderer(this, 36, 32); + armorOuterLeftArm = new ModelRendererScale(this, 36, 32, 1.08f); armorOuterLeftArm.addBox(-2.5F, -0.5F, -2.5F, 5, 11, 5); armorOuterLeftArm.setRotationPoint(0.75F, -1.625F, 0F); armorOuterLeftArm.setTextureSize(256, 128); armorOuterLeftArm.mirror = true; - armorOuterLeftLeg = new ModelRenderer(this, 0, 45); + armorOuterLeftLeg = new ModelRendererScale(this, 6, 45, scale); armorOuterLeftLeg.addBox(-2.5F, 0F, -2.5F, 5, 10, 5); armorOuterLeftLeg.setTextureSize(256, 128); armorOuterLeftLeg.mirror = true; - armorOuterRightLeg = new ModelRenderer(this, 6, 45); + armorOuterRightLeg = new ModelRendererScale(this, 0, 45, scale); armorOuterRightLeg.addBox(-2.5F, 0F, -2.5F, 5, 10, 5); armorOuterRightLeg.setTextureSize(256, 128); armorOuterRightLeg.mirror = true; @@ -76,7 +75,6 @@ public ModelCassock() { bipedLeftLeg.addChild(armorOuterLeftLeg); bipedRightLeg.addChild(armorRightLeg); bipedRightLeg.addChild(armorOuterRightLeg); - //bipedRightArm.addChild(armorRightArm); + bipedRightArm.addChild(armorRightArm); } - } \ No newline at end of file diff --git a/src/main/java/unstudio/chinacraft/client/model/armor/ModelRendererScale.java b/src/main/java/unstudio/chinacraft/client/model/armor/ModelRendererScale.java new file mode 100644 index 0000000..8878b4e --- /dev/null +++ b/src/main/java/unstudio/chinacraft/client/model/armor/ModelRendererScale.java @@ -0,0 +1,54 @@ +package unstudio.chinacraft.client.model.armor; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import org.lwjgl.opengl.GL11; + +/** + * Created by trychen on 17/4/1. + */ +public class ModelRendererScale extends ModelRenderer { + private float scale; + public ModelRendererScale(ModelBase p_i1172_1_, String p_i1172_2_) { + super(p_i1172_1_, p_i1172_2_); + scale = 1f; + } + public ModelRendererScale(ModelBase p_i1172_1_, String p_i1172_2_, float scale) { + super(p_i1172_1_, p_i1172_2_); + this.scale = scale; + } + + public ModelRendererScale(ModelBase p_i1173_1_) { + super(p_i1173_1_); + this.scale = 1f; + } + + public ModelRendererScale(ModelBase p_i1173_1_, float scale) { + super(p_i1173_1_); + this.scale = scale; + } + + public ModelRendererScale(ModelBase p_i1174_1_, int p_i1174_2_, int p_i1174_3_) { + super(p_i1174_1_, p_i1174_2_, p_i1174_3_); + this.scale = 1f; + } + + public ModelRendererScale(ModelBase p_i1174_1_, int p_i1174_2_, int p_i1174_3_, float scale) { + super(p_i1174_1_, p_i1174_2_, p_i1174_3_); + this.scale = scale; + } + + public void setScale(float scale) { + this.scale = scale; + } + + public float getScale() { + return scale; + } + + @Override + public void render(float p_78785_1_) { + GL11.glScalef(scale, scale, scale); + super.render(p_78785_1_); + } +} diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java index 7f3b6a4..be8d0f0 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java @@ -7,6 +7,7 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; +import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -48,23 +49,6 @@ public void wearingNightClothes(TickEvent.PlayerTickEvent event) { tCompound.setByte("chinacraft.wearingWholeNightClothes",(byte)0); } - @SubscribeEvent - public void attack(LivingHurtEvent event){ - if (event.source.getEntity() == null) return; - if (event.entity instanceof EntityPlayer){ - if (!ChinaCraftApi.isWearingWholeNightClothes((EntityPlayer) event.entityLiving)) return; - EntityLivingBase source = (EntityLivingBase) event.source.getEntity(); - EntityLivingBase destination = event.entityLiving; - - double diffX = destination.posX - source.posX; - double diffZ; - for (diffZ = destination.posZ - source.posZ; diffX * diffX + diffZ * diffZ < 1.0E-4D; diffZ = (Math.random() - Math.random()) * 0.01D) - { - diffX = (Math.random() - Math.random()) * 0.01D; - } - EntityMethod.repel(event.entityLiving, diffX, diffZ); - } - } @SideOnly(Side.CLIENT) @SubscribeEvent @@ -76,22 +60,6 @@ public void preRenderPlayer(RenderPlayerEvent.Pre event) { } } - @SubscribeEvent - public void wearingChinaCrown(LivingHurtEvent event) { - if (event.entityLiving instanceof EntityPlayer){ - EntityPlayer p = (EntityPlayer) event.entityLiving; - if (p.inventory.armorInventory[3] != null&&p.inventory.armorInventory[3].getItem().equals(ChinaCraft.chinaCrown)){ - if (p.worldObj.rand.nextInt(2)==1){ - double percent = (p.worldObj.rand.nextInt(5)+3)/10.0; - if (event.source.getSourceOfDamage()!=null&&event.source.getSourceOfDamage() instanceof EntityLiving){ - event.source.getSourceOfDamage().attackEntityFrom(DamageSource.causePlayerDamage(p), (float) (event.ammount * (1 - percent))); - event.ammount = (float) (event.ammount * percent); - } - } - } - } - } - @SideOnly(Side.CLIENT) @SubscribeEvent public void key(InputEvent.KeyInputEvent event){ @@ -137,4 +105,49 @@ public void fall(LivingFallEvent e){ e.setCanceled(true); } } + + @SubscribeEvent + public void attack(LivingHurtEvent event){ + if (event.source.getEntity() == null) return; + if (!(event.entity instanceof EntityPlayer)) return; + EntityPlayer entityPlayer = (EntityPlayer) event.entity; + if (!ChinaCraftApi.isWearingWholeNightClothes(entityPlayer)){ + hurtNightClothes(event); + } else if (entityPlayer.inventory.armorInventory[1] != null && entityPlayer.inventory.armorInventory[1].getItem().equals(ChinaCraft.cassock)){ + hurtCassock(event, entityPlayer); + } else if (entityPlayer.inventory.armorInventory[3] != null&& entityPlayer.inventory.armorInventory[3].getItem().equals(ChinaCraft.chinaCrown)){ + hurtChinaCrown(event, entityPlayer); + } + + } + + private void hurtChinaCrown(LivingHurtEvent event, EntityPlayer entityPlayer) { + if (entityPlayer.worldObj.rand.nextInt(2)==1){ + double percent = (entityPlayer.worldObj.rand.nextInt(5)+3)/10.0; + if (event.source.getSourceOfDamage()!=null&&event.source.getSourceOfDamage() instanceof EntityLiving){ + event.source.getSourceOfDamage().attackEntityFrom(DamageSource.causePlayerDamage(entityPlayer), (float) (event.ammount * (1 - percent))); + event.ammount = (float) (event.ammount * percent); + } + } + } + + private void hurtCassock(LivingHurtEvent event, EntityPlayer entityPlayer){ + if (entityPlayer.getHealth() - event.ammount <= 0){ + entityPlayer.setHealth(entityPlayer.getMaxHealth() / 2); + entityPlayer.inventory.armorInventory[1] = null; + } + } + + private void hurtNightClothes(LivingHurtEvent event){ + EntityLivingBase source = (EntityLivingBase) event.source.getEntity(); + EntityLivingBase destination = event.entityLiving; + + double diffX = destination.posX - source.posX; + double diffZ; + for (diffZ = destination.posZ - source.posZ; diffX * diffX + diffZ * diffZ < 1.0E-4D; diffZ = (Math.random() - Math.random()) * 0.01D) + { + diffX = (Math.random() - Math.random()) * 0.01D; + } + EntityMethod.repel(event.entityLiving, diffX, diffZ); + } } diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java index aabca85..bbdf071 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java @@ -25,6 +25,7 @@ public ModelArmorCassock() { @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { if (armorModel != null) { + armorModel = new ModelCassock(); armorModel.bipedBody.showModel = true; armorModel.bipedRightArm.showModel = true; armorModel.bipedLeftArm.showModel = true; From b1b0f7382e1859d5232cda0cdc84a1da4d82a52b Mon Sep 17 00:00:00 2001 From: Trychen Date: Sun, 2 Apr 2017 10:08:33 +0800 Subject: [PATCH 09/36] Fixed Bugs && Redesign Mace --- .../block/especial/BlockBuhrimill.java | 4 +-- .../client/waila/WailaCompatibility.java | 4 +-- .../chinacraft/common/ChinaCraft.java | 3 +-- .../unstudio/chinacraft/common/Recipes.java | 2 +- .../event/combat/ListenerArmor.java | 17 ++++++++---- .../event/combat/ListenerSword.java | 20 ++++++++++++++ .../combat/{Mace.java => CCItemMace.java} | 27 ++++++++++++++----- .../item/combat/ModelArmorCassock.java | 14 ++++++++++ .../assets/chinacraft/lang/zh_CN.lang | 2 +- 9 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java rename src/main/java/unstudio/chinacraft/item/combat/{Mace.java => CCItemMace.java} (50%) diff --git a/src/main/java/unstudio/chinacraft/block/especial/BlockBuhrimill.java b/src/main/java/unstudio/chinacraft/block/especial/BlockBuhrimill.java index c9e61b8..fbbc4c5 100644 --- a/src/main/java/unstudio/chinacraft/block/especial/BlockBuhrimill.java +++ b/src/main/java/unstudio/chinacraft/block/especial/BlockBuhrimill.java @@ -158,9 +158,7 @@ public IIcon getIcon(int p_149691_1_, int p_149691_2_) { } @Override - public List addWailaBodyInfo(ItemStack stack, List tipList, IWailaDataAccessor accessor, - IWailaConfigHandler configHandler) { - TileEntity tile = accessor.getTileEntity(); + public List addWailaBodyInfo(ItemStack stack, List tipList, TileEntity tile) { if (tile instanceof TileBuhrimill) { TileBuhrimill tileBuhrimill = (TileBuhrimill) tile; int maxSchedule = tileBuhrimill.getMaxSchedule(); diff --git a/src/main/java/unstudio/chinacraft/client/waila/WailaCompatibility.java b/src/main/java/unstudio/chinacraft/client/waila/WailaCompatibility.java index af20382..379d0a9 100644 --- a/src/main/java/unstudio/chinacraft/client/waila/WailaCompatibility.java +++ b/src/main/java/unstudio/chinacraft/client/waila/WailaCompatibility.java @@ -52,7 +52,7 @@ public List getWailaBody(ItemStack stack, List tipList, IWailaDa IWailaConfigHandler configHandler) { Block block = accessor.getBlock(); if (block instanceof CCWailaInfoProvider) { - return ((CCWailaInfoProvider) block).addWailaBodyInfo(stack, tipList, accessor, configHandler); + return ((CCWailaInfoProvider) block).addWailaBodyInfo(stack, tipList, accessor.getTileEntity()); } return tipList; } @@ -68,7 +68,7 @@ public List getWailaTail(ItemStack stack, List tipList, IWailaDa * 凡是需要在Waila窗体中添加信息的方块都需实现此接口 */ public interface CCWailaInfoProvider { - List addWailaBodyInfo(ItemStack stack, List tipList, IWailaDataAccessor accessor, IWailaConfigHandler configHandler); + List addWailaBodyInfo(ItemStack stack, List tipList, TileEntity accessor); } } diff --git a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java index 60bb8a4..db4f7c1 100644 --- a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java +++ b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java @@ -16,7 +16,6 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.item.*; -import net.minecraft.util.StatCollector; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.util.EnumHelper; import org.apache.logging.log4j.LogManager; @@ -315,7 +314,7 @@ public Item getTabIconItem() { @Register("JiuQuTang") public static final JiuQu_tang jiuqu_tang = new JiuQu_tang();// 九曲镋 @Register("Mace") - public static final Mace mace = new Mace(); + public static final CCItemMace mace = new CCItemMace(); // @Register("SuperBow") public static final ItemSuperBow superBow = new ItemSuperBow(); @Register("StoneHammer") diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 1d8f31f..6c6d067 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -182,7 +182,7 @@ public static void init() { ChinaCraft.bronzeBlock); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bronzeSword, 1), new Object[]{" # ", " # ", " X ", '#', ChinaCraft.bronzeIngot, 'X', Items.stick}); - GameRegistry.addRecipe(new ItemStack(ChinaCraft.mace, 1), new Object[]{" #O", " X#", "X ", '#', Items.iron_ingot, + GameRegistry.addRecipe(new ItemStack(ChinaCraft.mace, 1), new Object[]{" #O", " X#", " X ", '#', Items.iron_ingot, 'X', Items.stick, 'O', Item.getItemFromBlock(Blocks.obsidian)}); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.bronzeBroadSword, 1), new Object[]{" ##", " X#", "X ", '#', ChinaCraft.bronzeIngot, 'X', Items.stick})); diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java index be8d0f0..186212f 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java @@ -26,6 +26,8 @@ import cpw.mods.fml.common.gameevent.TickEvent; import unstudio.chinacraft.common.config.FeatureConfig; import unstudio.chinacraft.common.network.KeyMessage; +import unstudio.chinacraft.entity.fx.FxHelper; +import unstudio.chinacraft.item.combat.ModelArmorCassock; public class ListenerArmor { /** @@ -106,16 +108,18 @@ public void fall(LivingFallEvent e){ } } - @SubscribeEvent + @SubscribeEvent(priority = EventPriority.HIGH) public void attack(LivingHurtEvent event){ - if (event.source.getEntity() == null) return; if (!(event.entity instanceof EntityPlayer)) return; EntityPlayer entityPlayer = (EntityPlayer) event.entity; + if (!ChinaCraftApi.isWearingWholeNightClothes(entityPlayer)){ hurtNightClothes(event); - } else if (entityPlayer.inventory.armorInventory[1] != null && entityPlayer.inventory.armorInventory[1].getItem().equals(ChinaCraft.cassock)){ + } + if (entityPlayer.inventory.armorInventory[2] != null && entityPlayer.inventory.armorInventory[2].getItem().equals(ChinaCraft.cassock)){ hurtCassock(event, entityPlayer); - } else if (entityPlayer.inventory.armorInventory[3] != null&& entityPlayer.inventory.armorInventory[3].getItem().equals(ChinaCraft.chinaCrown)){ + } + if (entityPlayer.inventory.armorInventory[3] != null&& entityPlayer.inventory.armorInventory[3].getItem().equals(ChinaCraft.chinaCrown)){ hurtChinaCrown(event, entityPlayer); } @@ -134,11 +138,14 @@ private void hurtChinaCrown(LivingHurtEvent event, EntityPlayer entityPlayer) { private void hurtCassock(LivingHurtEvent event, EntityPlayer entityPlayer){ if (entityPlayer.getHealth() - event.ammount <= 0){ entityPlayer.setHealth(entityPlayer.getMaxHealth() / 2); - entityPlayer.inventory.armorInventory[1] = null; + FxHelper.spawnEffects("blockcrack_" + ModelArmorCassock.getItemId(), entityPlayer.worldObj, entityPlayer.posX - 0.5, + entityPlayer.posY - 2, entityPlayer.posZ - 0.5); + entityPlayer.inventory.armorInventory[2] = null; } } private void hurtNightClothes(LivingHurtEvent event){ + if (event.source.getEntity() == null && !(event.source.getEntity() instanceof EntityLivingBase)) return; EntityLivingBase source = (EntityLivingBase) event.source.getEntity(); EntityLivingBase destination = event.entityLiving; diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java new file mode 100644 index 0000000..19a6add --- /dev/null +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java @@ -0,0 +1,20 @@ +package unstudio.chinacraft.event.combat; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.event.entity.living.LivingHurtEvent; + +/** + * Created by trychen on 17/4/2. + */ +public class ListenerSword { + @SubscribeEvent + public void mace(LivingHurtEvent event){ + System.out.println(event.source.damageType); + System.out.println(event.source.isDamageAbsolute()); + if (event.source.getSourceOfDamage() == null) return; + Entity entity = event.source.getSourceOfDamage(); + + } +} diff --git a/src/main/java/unstudio/chinacraft/item/combat/Mace.java b/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java similarity index 50% rename from src/main/java/unstudio/chinacraft/item/combat/Mace.java rename to src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java index 108a835..b6601c6 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/Mace.java +++ b/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java @@ -2,7 +2,10 @@ import java.util.List; +import com.google.common.collect.Multimap; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; @@ -13,18 +16,24 @@ import unstudio.chinacraft.common.ChinaCraft; import unstudio.chinacraft.util.annotation.register.ISpecialEquippedRender; -public class Mace extends ItemSword implements ISpecialEquippedRender{ - public Mace() { +public class CCItemMace extends ItemSword implements ISpecialEquippedRender{ + public CCItemMace() { super(ToolMaterial.IRON); setCreativeTab(ChinaCraft.tabTool); setUnlocalizedName("mace"); } @Override - public boolean hitEntity(ItemStack p_77644_1_, EntityLivingBase target, EntityLivingBase p_77644_3_) { - p_77644_1_.damageItem(1, p_77644_3_); - target.addPotionEffect(new PotionEffect(4, 8)); - target.addPotionEffect(new PotionEffect(2, 8)); + public boolean hitEntity(ItemStack itemStack, EntityLivingBase target, EntityLivingBase entity) { + if (entity instanceof EntityPlayer){ + if (((EntityPlayer) entity).onGround && target.worldObj.rand.nextBoolean()){ + ((EntityPlayer)entity).onCriticalHit(target); + itemStack.damageItem(3, entity); + } else { + itemStack.damageItem(1, entity); + } + } else + itemStack.damageItem(5, entity); return true; } @@ -42,4 +51,10 @@ public void doRender() { public SpecialItemRender.RenderType getSpecialRenderType() { return SpecialItemRender.RenderType.huge; } + + public Multimap getItemAttributeModifiers() { + Multimap multimap = super.getItemAttributeModifiers(); + multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", 3.0, 0)); + return multimap; + } } diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java index bbdf071..8eff6fe 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java @@ -7,8 +7,10 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import unstudio.chinacraft.client.model.armor.ModelCassock; +import unstudio.chinacraft.common.ChinaCraft; /** * Created by trychen on 17/3/25. @@ -17,6 +19,8 @@ public class ModelArmorCassock extends ModelArmor { @SideOnly(Side.CLIENT) private ModelCassock armorModel = new ModelCassock(); + private static Integer itemId; + public ModelArmorCassock() { super(ArmorMaterial.CLOTH, "cassock", null, 1, 1, 1); } @@ -32,6 +36,9 @@ public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemSta armorModel.bipedRightLeg.showModel = true; armorModel.bipedLeftLeg.showModel = true; + armorModel.bipedLeftLeg.childModels.clear(); + armorModel.bipedRightLeg.childModels.clear(); + armorModel.isSneak = entityLiving.isSneaking(); armorModel.isRiding = entityLiving.isRiding(); armorModel.isChild = entityLiving.isChild(); @@ -72,4 +79,11 @@ public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemSta public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) { return "chinacraft:textures/models/armor/cassock.png"; } + + public static int getItemId() { + if (itemId == null){ + itemId = Item.getIdFromItem(ChinaCraft.cassock); + } + return itemId; + } } diff --git a/src/main/resources/assets/chinacraft/lang/zh_CN.lang b/src/main/resources/assets/chinacraft/lang/zh_CN.lang index 79a9e9b..45374f3 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_CN.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_CN.lang @@ -13,7 +13,7 @@ item.yanlung_giantknife.name=炎龙巨刀 item.yanlung_giantknife.lore=被攻击的实体将会被燃烧 item.jiuqu_tang.name=九曲镋 item.mace.name=狼牙棒 -item.mace.lore=使被攻击者眩晕 +item.mace.lore=有很大的几率会造成暴击 item.super_bow.name=强力弓 item.bronze_axe.name=青铜斧 item.bronze_pickaxe.name=青铜稿 From b8f67b4dd340b25003e122fb3ad12dbe603a8965 Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sun, 2 Apr 2017 10:30:01 +0800 Subject: [PATCH 10/36] fix #10 --- .../chinacraft/common/CommonProxy.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/unstudio/chinacraft/common/CommonProxy.java b/src/main/java/unstudio/chinacraft/common/CommonProxy.java index 46bd20a..5ead2bf 100644 --- a/src/main/java/unstudio/chinacraft/common/CommonProxy.java +++ b/src/main/java/unstudio/chinacraft/common/CommonProxy.java @@ -4,6 +4,7 @@ import net.minecraft.dispenser.BehaviorProjectileDispense; import net.minecraft.dispenser.IPosition; import net.minecraft.entity.IProjectile; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -134,9 +135,26 @@ protected IProjectile getProjectileEntity(World p_82499_1_, IPosition p_82499_2_ } catch (InstantiationException e) { e.printStackTrace(); } + + initBlockFlammbility(); } public void postInit(FMLPostInitializationEvent event) { } + + private void initBlockFlammbility(){ + Blocks.fire.setFireInfo(ChinaCraft.bambooPlank,5,20); + Blocks.fire.setFireInfo(ChinaCraft.bambooSlab,5,20); + Blocks.fire.setFireInfo(ChinaCraft.bambooDoubleSlab,5,20); + Blocks.fire.setFireInfo(ChinaCraft.bambooStair,5,20); + Blocks.fire.setFireInfo(ChinaCraft.bamboo,5,5); + Blocks.fire.setFireInfo(ChinaCraft.blockBambooShoot,5,10); + Blocks.fire.setFireInfo(ChinaCraft.bambooFence,5,20); + Blocks.fire.setFireInfo(ChinaCraft.bambooFenceGate,5,20); + Blocks.fire.setFireInfo(ChinaCraft.mulberryLog,5,5); + Blocks.fire.setFireInfo(ChinaCraft.mulberryWood,5,20); + Blocks.fire.setFireInfo(ChinaCraft.mulberryLeaf,30,60); + Blocks.fire.setFireInfo(ChinaCraft.mulberrySapling,10,30); + } } From 077b9470753fc04b453f450b0edd65edfc0a3007 Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sun, 2 Apr 2017 10:30:16 +0800 Subject: [PATCH 11/36] Add oredict --- src/main/java/unstudio/chinacraft/common/ChinaCraft.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java index 60bb8a4..d5b8e8b 100644 --- a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java +++ b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java @@ -190,13 +190,13 @@ public Item getTabIconItem() { @Register("BlackBrickStair") public static final Block blackbrickStair = new BlockCCStair(ChinaCraft.blackbrickBlock,0).setHarvestLevelReturnBlock("pickaxe", 0).setHardness(2.0F).setResistance(10.0F).setBlockName("blackbrick_stair").setCreativeTab(ChinaCraft.tabCore); - @Register("MulberryLog") + @Register(value = "MulberryLog",ore = "logWood") public static final Block mulberryLog = new BlockCCLog("chinacraft:mulberry_log_top", "chinacraft:mulberry_log").setCreativeTab(ChinaCraft.tabCore).setBlockName("mulberry_log"); // 桑树原木 - @Register("MulberryLeaf") + @Register(value = "MulberryLeaf",ore = "treeLeaves") public static final Block mulberryLeaf = new BlockCCLeaves(ChinaCraft.mulberrySapling).setCreativeTab(ChinaCraft.tabFarming).setBlockName("mulberry_leaf").setBlockTextureName("chinacraft:mulberry_leaf"); // 桑树树叶 - @Register("MulberrySapling") + @Register(value = "MulberrySapling",ore = "treeSapling") public static final Block mulberrySapling = new BlockCCSapling(WorldGenMulberryTree.class).setBlockTextureName("chinacraft:mulberry_sapling").setBlockName("mulberry_sapling").setCreativeTab(ChinaCraft.tabFarming);//桑树树苗 - @Register("MulberryWood") + @Register(value = "MulberryWood",ore = "plankWood") public static final Block mulberryWood = new BlockBase(Material.wood).setBlockName("mulberry_wood").setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeWood).setCreativeTab(ChinaCraft.tabCore).setBlockTextureName("chinacraft:mulberry_wood"); // 桑树木板 From 93c0b7748f730bba5257e57f6589852b1d4c9a08 Mon Sep 17 00:00:00 2001 From: Trychen Date: Sun, 2 Apr 2017 10:47:07 +0800 Subject: [PATCH 12/36] Fixed Mace & Make more item repairable --- .../chinacraft/common/ChinaCraft.java | 10 ++++++++ .../unstudio/chinacraft/common/Recipes.java | 4 ++-- .../event/combat/ListenerSword.java | 13 ++++++---- .../chinacraft/item/combat/CCItemMace.java | 24 +++++-------------- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java index db4f7c1..a4690aa 100644 --- a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java +++ b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java @@ -15,6 +15,7 @@ import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.*; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.util.EnumHelper; @@ -80,6 +81,7 @@ public class ChinaCraft implements ICollection { public final static Random rand = new Random(); // Material public static final Item.ToolMaterial BRONZE = EnumHelper.addToolMaterial("BRONZE", 2, 200, 5.2F, 1.8F, 14); + public static final Item.ToolMaterial HAMMERSTONE = EnumHelper.addToolMaterial("HAMMERSIONE", 1, 240, 4.0F, 2.0F, 5); // 石锤 public static final Item.ToolMaterial HAMMERIRON = EnumHelper.addToolMaterial("HAMMERIRON", 2, 475, 6.0F, 3.0F, 14); // 铁锤 public static final Item.ToolMaterial HAMMERDIANMOND = EnumHelper.addToolMaterial("HAMMERDIAMOND", 3, 2096, 8.0F, 4.0F, @@ -467,6 +469,14 @@ public Item getTabIconItem() { @Register("Debug") public static final ItemDebug debug = new ItemDebug(); // 调试物品 + static { + HAMMERSTONE.setRepairItem(new ItemStack(Blocks.stone)); + HAMMERIRON.setRepairItem(new ItemStack(Items.iron_ingot)); + HAMMERDIANMOND.setRepairItem(new ItemStack(Items.diamond)); + BRONZE.setRepairItem(new ItemStack(ChinaCraft.bronzeIngot)); + BROAD_BRONZE.setRepairItem(new ItemStack(ChinaCraft.bronzeIngot)); + } + public static Configuration getMainConfig() { return ConfigLoader.getMainConfig(); } diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 6c6d067..a460498 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -182,8 +182,8 @@ public static void init() { ChinaCraft.bronzeBlock); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bronzeSword, 1), new Object[]{" # ", " # ", " X ", '#', ChinaCraft.bronzeIngot, 'X', Items.stick}); - GameRegistry.addRecipe(new ItemStack(ChinaCraft.mace, 1), new Object[]{" #O", " X#", " X ", '#', Items.iron_ingot, - 'X', Items.stick, 'O', Item.getItemFromBlock(Blocks.obsidian)}); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.mace, 1), new Object[]{" DO", " BD", " X ", 'D', Items.diamond, + 'X', Items.stick, 'O', Item.getItemFromBlock(Blocks.obsidian), 'B', ChinaCraft.bronzeIngot}); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.bronzeBroadSword, 1), new Object[]{" ##", " X#", "X ", '#', ChinaCraft.bronzeIngot, 'X', Items.stick})); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.bronzeBroadSword, 1), diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java index 19a6add..0d94def 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java @@ -4,6 +4,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.event.entity.living.LivingHurtEvent; +import unstudio.chinacraft.common.ChinaCraft; /** * Created by trychen on 17/4/2. @@ -11,10 +12,12 @@ public class ListenerSword { @SubscribeEvent public void mace(LivingHurtEvent event){ - System.out.println(event.source.damageType); - System.out.println(event.source.isDamageAbsolute()); - if (event.source.getSourceOfDamage() == null) return; - Entity entity = event.source.getSourceOfDamage(); - + if (event.source.isFireDamage() || event.source.isProjectile() || !(event.source.getSourceOfDamage() instanceof EntityPlayer) || event.source.damageType != "player" || event.source.getSourceOfDamage() == null) return; + EntityPlayer player = (EntityPlayer) event.source.getSourceOfDamage(); + if (player.onGround && player.getHeldItem() != null && player.getHeldItem().getItem() == ChinaCraft.mace && player.worldObj.rand.nextBoolean()){ + player.onCriticalHit(event.entity); + event.ammount *= 1.8; + player.getHeldItem().damageItem(2, player); + } } } diff --git a/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java b/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java index b6601c6..6f53f9d 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java +++ b/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java @@ -7,6 +7,7 @@ import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.potion.PotionEffect; @@ -18,23 +19,16 @@ public class CCItemMace extends ItemSword implements ISpecialEquippedRender{ public CCItemMace() { - super(ToolMaterial.IRON); + super(ToolMaterial.STONE); setCreativeTab(ChinaCraft.tabTool); setUnlocalizedName("mace"); } @Override - public boolean hitEntity(ItemStack itemStack, EntityLivingBase target, EntityLivingBase entity) { - if (entity instanceof EntityPlayer){ - if (((EntityPlayer) entity).onGround && target.worldObj.rand.nextBoolean()){ - ((EntityPlayer)entity).onCriticalHit(target); - itemStack.damageItem(3, entity); - } else { - itemStack.damageItem(1, entity); - } - } else - itemStack.damageItem(5, entity); - return true; + public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) { + ItemStack mat = new ItemStack(Blocks.obsidian, 1, net.minecraftforge.oredict.OreDictionary.WILDCARD_VALUE); + if (mat != null && net.minecraftforge.oredict.OreDictionary.itemMatches(mat, p_82789_2_, false)) return true; + return super.getIsRepairable(p_82789_1_, p_82789_2_); } @Override @@ -51,10 +45,4 @@ public void doRender() { public SpecialItemRender.RenderType getSpecialRenderType() { return SpecialItemRender.RenderType.huge; } - - public Multimap getItemAttributeModifiers() { - Multimap multimap = super.getItemAttributeModifiers(); - multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", 3.0, 0)); - return multimap; - } } From 6f6f67cbbb78eeffece816ee5b85dc11ad179c02 Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sun, 2 Apr 2017 11:31:47 +0800 Subject: [PATCH 13/36] Fix silk recipe --- src/main/java/unstudio/chinacraft/common/Recipes.java | 3 +++ src/main/java/unstudio/chinacraft/item/ItemSilk.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index a460498..0814451 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -1,5 +1,6 @@ package unstudio.chinacraft.common; +import net.minecraft.block.BlockColored; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -142,6 +143,8 @@ public static void init() { GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.silkYarn, 4), ChinaCraft.silkwormChrysalis); GameRegistry.addRecipe(new ItemStack(ChinaCraft.itemSilk, 1, 15), new Object[]{"@@ ", "@@ ", " ", '@', ChinaCraft.silkYarn}); + for (int i = 0; i < 16; ++i) + GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.itemSilk, 1, BlockColored.func_150031_c(i)), new Object[] {new ItemStack(Items.dye, 1, i), new ItemStack(ChinaCraft.itemSilk,1,0)}); // CookingBench GameRegistry.addRecipe(new ItemStack(ChinaCraft.cooking_bench_off, 1), diff --git a/src/main/java/unstudio/chinacraft/item/ItemSilk.java b/src/main/java/unstudio/chinacraft/item/ItemSilk.java index 06264a3..346e797 100644 --- a/src/main/java/unstudio/chinacraft/item/ItemSilk.java +++ b/src/main/java/unstudio/chinacraft/item/ItemSilk.java @@ -15,8 +15,8 @@ public class ItemSilk extends Item { - public static final String[] silk_name = new String[] { "black", "red", "green", "brown", "blue", "purple", "cyan", - "silver", "gray", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white" }; + public static final String[] silk_name = new String[] { "white", "orange", "magenta", "lightBlue", "yellow", "lime", "pink", + "gray", "silver", "cyan", "purple", "blue", "brown", "green", "red", "black" }; private IIcon[] silk_icon; public ItemSilk() { From 23dde3cf9df4c81c380e1834b691e5d0b9f09259 Mon Sep 17 00:00:00 2001 From: Trychen Date: Sun, 2 Apr 2017 11:38:18 +0800 Subject: [PATCH 14/36] Fixed Bugs & Added Language Field --- .../unstudio/chinacraft/event/combat/ListenerArmor.java | 2 +- .../unstudio/chinacraft/item/combat/ModelArmorCassock.java | 3 --- src/main/resources/assets/chinacraft/lang/en_US.lang | 7 ++++++- src/main/resources/assets/chinacraft/lang/zh_CN.lang | 5 +++++ src/main/resources/assets/chinacraft/lang/zh_TW.lang | 7 ++++++- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java index 186212f..675d425 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java @@ -139,7 +139,7 @@ private void hurtCassock(LivingHurtEvent event, EntityPlayer entityPlayer){ if (entityPlayer.getHealth() - event.ammount <= 0){ entityPlayer.setHealth(entityPlayer.getMaxHealth() / 2); FxHelper.spawnEffects("blockcrack_" + ModelArmorCassock.getItemId(), entityPlayer.worldObj, entityPlayer.posX - 0.5, - entityPlayer.posY - 2, entityPlayer.posZ - 0.5); + entityPlayer.posY, entityPlayer.posZ - 0.5); entityPlayer.inventory.armorInventory[2] = null; } } diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java index 8eff6fe..502715d 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java @@ -36,9 +36,6 @@ public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemSta armorModel.bipedRightLeg.showModel = true; armorModel.bipedLeftLeg.showModel = true; - armorModel.bipedLeftLeg.childModels.clear(); - armorModel.bipedRightLeg.childModels.clear(); - armorModel.isSneak = entityLiving.isSneaking(); armorModel.isRiding = entityLiving.isRiding(); armorModel.isChild = entityLiving.isChild(); diff --git a/src/main/resources/assets/chinacraft/lang/en_US.lang b/src/main/resources/assets/chinacraft/lang/en_US.lang index ee57b5f..e94bd11 100644 --- a/src/main/resources/assets/chinacraft/lang/en_US.lang +++ b/src/main/resources/assets/chinacraft/lang/en_US.lang @@ -11,7 +11,7 @@ item.yanlung_giantknife.name=Giant Sword of Blazing Dragon item.yanlung_giantknife.lore=Burn target upon being attacked item.jiuqu_tang.name=Jiu Qu Sword item.mace.name=Mace -item.mace.lore=Dizzy the target +item.mace.lore=Chance to cause crit item.super_bow.name=Powerful Bow item.bronze_axe.name=Bronze Axe item.bronze_pickaxe.name=Bronze Pickaxe @@ -29,6 +29,11 @@ item.nightclothes.lore=Night is coming, the world is in your control item.nightclothes.hidelore.1=Full suit will give the following effects: item.nightclothes.hidelore.2=Double-jump while falling item.nightclothes.hidelore.3=Being invisible while sneaking +item.cassock.name=Cassock +item.cassock.lore=The hope of reborn +item.cassock.hidelore.1=While causing fatal injuries: +item.cassock.hidelore.2=Will heal half of the value of life +item.cassock.hidelore.3=Cassock will be destroyed item.hammer_diamond.name=Diamond Hammer item.hammer_iron.name=Iron Hammer item.hammer_bronze.name=Bronze Hammer diff --git a/src/main/resources/assets/chinacraft/lang/zh_CN.lang b/src/main/resources/assets/chinacraft/lang/zh_CN.lang index 45374f3..b45f65c 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_CN.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_CN.lang @@ -31,6 +31,11 @@ item.nightclothes.lore=窃以无形,行如飞马 item.nightclothes.hidelore.1=穿上全套可以获得以下效果 item.nightclothes.hidelore.2=更加轻盈,在低速下落时可以在空中进行二段跳 item.nightclothes.hidelore.3=夜晚时按住 SHIFT 可以完全隐身(饱食度要大于14) +item.cassock.name=袈裟 +item.cassock.lore=重生的希望 +item.cassock.hidelore.1=造成致命伤害时: +item.cassock.hidelore.2=会回复一半的生命值 +item.cassock.hidelore.3=袈裟会被损坏 item.hammer_diamond.name=钻石锤子 item.hammer_iron.name=铁锤子 item.hammer_bronze.name=青铜锤子 diff --git a/src/main/resources/assets/chinacraft/lang/zh_TW.lang b/src/main/resources/assets/chinacraft/lang/zh_TW.lang index 6f4774f..29ad729 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_TW.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_TW.lang @@ -13,7 +13,7 @@ item.yanlung_giantknife.name=炎龍巨刀 item.yanlung_giantknife.lore=被攻擊的實體將會被燃燒 item.jiuqu_tang.name=九曲钂 item.mace.name=狼牙棒 -item.mace.lore=使被攻擊者眩暈 +item.mace.lore=有很大的幾率會造成暴擊 item.super_bow.name=强力弓 item.bronze_axe.name=青銅斧 item.bronze_pickaxe.name=青銅稿 @@ -31,6 +31,11 @@ item.nightclothes.lore=竊以無形,行如飛馬 item.nightclothes.hidelore.1=穿上全套可以獲得以下效果 item.nightclothes.hidelore.2=更加輕盈,在低速下落時可以在空中進行二段跳 item.nightclothes.hidelore.3=夜晚時按住SHIFT可以完全隱身(飽食度要大於14) +item.cassock.name=袈裟 +item.cassock.lore=重生的希望 +item.cassock.hidelore.1=造成致命傷害時: +item.cassock.hidelore.2=會回復一半的生命值 +item.cassock.hidelore.3=袈裟會被損壞 item.hammer_diamond.name=鑽石錘子 item.hammer_iron.name=鐵錘子 item.hammer_bronze.name=青銅錘子 From c00b91e294cb8ca61fb62c97f3be4f9e75c437a0 Mon Sep 17 00:00:00 2001 From: Trychen Date: Sun, 2 Apr 2017 11:51:05 +0800 Subject: [PATCH 15/36] Better Recipes using silk --- .../unstudio/chinacraft/common/Recipes.java | 51 ++++++++++++++----- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 0814451..f47cdb7 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -47,13 +47,34 @@ public static void init() { GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ChinaCraft.bomb), Items.gunpowder, Items.iron_ingot)); // 夜行衣 GameRegistry.addRecipe(new ItemStack(ChinaCraft.nightClothes[0]), - new Object[]{"AAA", "ABA", " ", 'A', Items.leather, 'B', Items.dye}); + "AAA", + "A A", + " ", + 'A', new ItemStack(ChinaCraft.itemSilk, 1, 15)); GameRegistry.addRecipe(new ItemStack(ChinaCraft.nightClothes[1]), - new Object[]{"ABA", "AAA", "AAA", 'A', Items.leather, 'B', Items.dye}); + "A A", + "AAA", + "AAA", + 'A', new ItemStack(ChinaCraft.itemSilk, 1, 15)); GameRegistry.addRecipe(new ItemStack(ChinaCraft.nightClothes[2]), - new Object[]{"AAA", "ABA", "A A", 'A', Items.leather, 'B', Items.dye}); + "AAA", + "A A", + "A A", + 'A', new ItemStack(ChinaCraft.itemSilk, 1, 15)); GameRegistry.addRecipe(new ItemStack(ChinaCraft.nightClothes[3]), - new Object[]{" ", "ABA", "A A", 'A', Items.leather, 'B', Items.dye}); + " ", + "A A", + "A A", + 'A', new ItemStack(ChinaCraft.itemSilk, 1, 15)); + + // 袈裟 + GameRegistry.addRecipe(new ItemStack(ChinaCraft.cassock), + "Y Y", + "YGR", + "YRR", + 'Y', new ItemStack(ChinaCraft.itemSilk, 1, 4), + 'G', Items.golden_apple, + 'R', new ItemStack(ChinaCraft.itemSilk, 1, 14)); // Copper GameRegistry.addSmelting(ChinaCraft.copperOre, new ItemStack(ChinaCraft.copperIngot, 1), 1.2f); @@ -114,7 +135,7 @@ public static void init() { GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindow1, 4), new Object[]{" A ", "A#A", " A ", 'A', Item.getItemFromBlock(Blocks.planks), '#', ChinaCraft.artKnife})); - GameRegistry.addRecipe(new ItemStack(ChinaCraft.lanternScaldfish,1,2), "WYW", "WTW", "WYW", 'W', new ItemStack(Blocks.wool, 1, 14), 'Y', new ItemStack(Blocks.wool, 1, 4), 'T', Blocks.torch); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.lanternScaldfish, 1, 2), "WYW", "WTW", "WYW", 'W', new ItemStack(Blocks.wool, 1, 14), 'Y', new ItemStack(Blocks.wool, 1, 4), 'T', Blocks.torch); GameRegistry.addRecipe(new ItemStack(ChinaCraft.itemDing), " J ", "MOM", "MCM", 'C', Blocks.coal_block, 'J', ChinaCraft.jadeKnife, 'O', Blocks.obsidian, 'M', Blocks.mossy_cobblestone); // 竹子 @@ -127,7 +148,7 @@ public static void init() { GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooFence, 2), new Object[]{"###", "###", " ", '#', ChinaCraft.itemBamboo}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooFenceGate, 1), - new Object[]{"#$#", "#$#", " ", '#', ChinaCraft.itemBamboo,'$',ChinaCraft.bambooPlank}); + new Object[]{"#$#", "#$#", " ", '#', ChinaCraft.itemBamboo, '$', ChinaCraft.bambooPlank}); // mulberry GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.mulberryWood, 4), @@ -144,7 +165,7 @@ public static void init() { GameRegistry.addRecipe(new ItemStack(ChinaCraft.itemSilk, 1, 15), new Object[]{"@@ ", "@@ ", " ", '@', ChinaCraft.silkYarn}); for (int i = 0; i < 16; ++i) - GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.itemSilk, 1, BlockColored.func_150031_c(i)), new Object[] {new ItemStack(Items.dye, 1, i), new ItemStack(ChinaCraft.itemSilk,1,0)}); + GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.itemSilk, 1, BlockColored.func_150031_c(i)), new Object[]{new ItemStack(Items.dye, 1, i), new ItemStack(ChinaCraft.itemSilk, 1, 0)}); // CookingBench GameRegistry.addRecipe(new ItemStack(ChinaCraft.cooking_bench_off, 1), @@ -219,13 +240,15 @@ public static void init() { new Object[]{"###", "#X#", " X ", '#', Item.getItemFromBlock(Blocks.cobblestone), 'X', Items.stick})); // 冕冠 - GameRegistry - .addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.chinaCrown, 1), - new Object[]{"TET", "#X#", "S#S", '#', Item.getItemFromBlock(Blocks.log), 'X', - Items.nether_star.setContainerItem(Items.nether_star), - 'T', ChinaCraft.tinIngot, 'E', Item.getItemFromBlock(Blocks.dragon_egg) - .setContainerItem(Item.getItemFromBlock(Blocks.dragon_egg)), - 'S', Items.stick})); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.chinaCrown, 1), + "TET", + "#X#", + "S#S", + '#', Items.gold_ingot, + 'X', Items.nether_star.setContainerItem(Items.nether_star), + 'T', new ItemStack(ChinaCraft.itemSilk, 1, 12), + 'E', Item.getItemFromBlock(Blocks.dragon_egg).setContainerItem(Item.getItemFromBlock(Blocks.dragon_egg)), + 'S', new ItemStack(ChinaCraft.itemSilk, 1, 14))); // TinOre GameRegistry.addSmelting(ChinaCraft.tinOre, new ItemStack(ChinaCraft.tinIngot), 0.8f); From 212e16dce2d6690780680a178e3ce7ec7b9a9d89 Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sun, 2 Apr 2017 12:20:30 +0800 Subject: [PATCH 16/36] Fixed generator bamboo shoot and flower --- .../generation/plant/BlockBambooShoot.java | 15 +----- .../chinacraft/common/CommonProxy.java | 7 +-- .../world/gen/WorldGenBambooShoot.java | 25 ++++++++++ .../world/gen/WorldGenCCFlower.java | 47 +++++++++---------- .../world/gen/WorldGenListener.java | 4 ++ 5 files changed, 54 insertions(+), 44 deletions(-) create mode 100644 src/main/java/unstudio/chinacraft/world/gen/WorldGenBambooShoot.java diff --git a/src/main/java/unstudio/chinacraft/block/generation/plant/BlockBambooShoot.java b/src/main/java/unstudio/chinacraft/block/generation/plant/BlockBambooShoot.java index 4e21eef..2d1bf32 100644 --- a/src/main/java/unstudio/chinacraft/block/generation/plant/BlockBambooShoot.java +++ b/src/main/java/unstudio/chinacraft/block/generation/plant/BlockBambooShoot.java @@ -20,7 +20,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockBambooShoot extends BlockBase implements IPlantable, IWorldGenerator { +public class BlockBambooShoot extends BlockBase implements IPlantable{ public BlockBambooShoot() { super(Material.plants); float f = 0.375F; @@ -162,17 +162,4 @@ public Block getPlant(IBlockAccess world, int x, int y, int z) { public int getPlantMetadata(IBlockAccess world, int x, int y, int z) { return world.getBlockMetadata(x, y, z); } - - @Override - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, - IChunkProvider chunkProvider) { - int l6 = chunkX * 16 + random.nextInt(16); - int i11 = random.nextInt(128); - int l14 = chunkZ * 16 + random.nextInt(16); - int id = world.getBiomeGenForCoords(l6, l14).biomeID; - if ((id == 3 || id == 4 || id == 18 || id == 20 || id == 34 || id == 27 || id == 28 || id == 29) - && random.nextInt(16) == 0) { - new WorldGenFlowers(ChinaCraft.blockBambooShoot).generate(world, random, l6, i11, l14); - } - } } diff --git a/src/main/java/unstudio/chinacraft/common/CommonProxy.java b/src/main/java/unstudio/chinacraft/common/CommonProxy.java index 5ead2bf..bfac45b 100644 --- a/src/main/java/unstudio/chinacraft/common/CommonProxy.java +++ b/src/main/java/unstudio/chinacraft/common/CommonProxy.java @@ -1,5 +1,6 @@ package unstudio.chinacraft.common; +import cpw.mods.fml.common.IFuelHandler; import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.BehaviorProjectileDispense; import net.minecraft.dispenser.IPosition; @@ -73,14 +74,8 @@ public void init(FMLInitializationEvent event) { ListenerRegister.init(); //注册生成器 -// GameRegistry.registerWorldGenerator(ChinaCraft.copperOre, 3); -// GameRegistry.registerWorldGenerator(ChinaCraft.tinOre, 3); -// GameRegistry.registerWorldGenerator(ChinaCraft.jadeOre, 3); new WorldGenListener(); - //GameRegistry.registerWorldGenerator(ChinaCraft.blockMarble, 127); - GameRegistry.registerWorldGenerator(new WorldGenCCFlower(), 1); GameRegistry.registerWorldGenerator(new WorldGenMulberryTree(true), 1); - GameRegistry.registerWorldGenerator(ChinaCraft.blockBambooShoot, 1); //注册TileEntity GameRegistry.registerTileEntity(TileJadeBench.class, "tileEntityCCJadeWorkingTable"); // 玉石工作台TileEntity diff --git a/src/main/java/unstudio/chinacraft/world/gen/WorldGenBambooShoot.java b/src/main/java/unstudio/chinacraft/world/gen/WorldGenBambooShoot.java new file mode 100644 index 0000000..0d3f9bc --- /dev/null +++ b/src/main/java/unstudio/chinacraft/world/gen/WorldGenBambooShoot.java @@ -0,0 +1,25 @@ +package unstudio.chinacraft.world.gen; + +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenFlowers; +import net.minecraft.world.gen.feature.WorldGenerator; +import unstudio.chinacraft.common.ChinaCraft; + +import java.util.Random; + +/** + * Created by Mouse on 2017/4/2. + */ +public class WorldGenBambooShoot extends WorldGenerator{ + @Override + public boolean generate(World world, Random random, int x, int y, int z) { + int x1 = x + random.nextInt(16); + int z1 = z + random.nextInt(16); + int y1 = world.getHeightValue(x1,z1)+1; + int id = world.getBiomeGenForCoords(x1, z1).biomeID; + if ((id == 3 || id == 4 || id == 18 || id == 20 || id == 34 || id == 27 || id == 28 || id == 29) + && random.nextInt(16) == 0) + new WorldGenFlowers(ChinaCraft.blockBambooShoot).generate(world, random, x1, y1, z1); + return true; + } +} diff --git a/src/main/java/unstudio/chinacraft/world/gen/WorldGenCCFlower.java b/src/main/java/unstudio/chinacraft/world/gen/WorldGenCCFlower.java index b9339c2..3884959 100644 --- a/src/main/java/unstudio/chinacraft/world/gen/WorldGenCCFlower.java +++ b/src/main/java/unstudio/chinacraft/world/gen/WorldGenCCFlower.java @@ -4,42 +4,41 @@ import net.minecraft.block.Block; import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenerator; import unstudio.chinacraft.common.ChinaCraft; -import cpw.mods.fml.common.IWorldGenerator; -public class WorldGenCCFlower implements IWorldGenerator { +public class WorldGenCCFlower extends WorldGenerator{ - private void Gen(Random random, int chunkX, int chunkZ, World world, Block block) { - int x = chunkX * 16 + random.nextInt(8) - random.nextInt(8); - int z = chunkZ * 16 + random.nextInt(8) - random.nextInt(8); - int y = world.getHeightValue(x, z) + random.nextInt(4) - random.nextInt(4); + private void gen(Random random, int blockX, int blockZ, World world, Block block) { + int x = blockX + random.nextInt(16); + int z = blockZ + random.nextInt(16); + int y = world.getHeightValue(x, z) +1; if (world.isAirBlock(x, y, z) && block.canBlockStay(world, x, y, z)) world.setBlock(x, y, z, block, 0, 3); } @Override - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, - IChunkProvider chunkProvider) { + public boolean generate(World world, Random random, int x, int y, int z) { + if(random.nextInt(9)==0) return true; + if (world.provider.dimensionId != 0) return true; + for (int i = 0; i <= 15; i++) { - if (random.nextBoolean()) - if (world.provider.dimensionId == 0) { - int j = random.nextInt(3); - switch (j) { - case 0: - Gen(random, chunkX, chunkZ, world, ChinaCraft.peony); - break; - case 1: - Gen(random, chunkX, chunkZ, world, ChinaCraft.azalea); - break; - case 2: - Gen(random, chunkX, chunkZ, world, ChinaCraft.chrysanthemum); - break; - } + int j = random.nextInt(3); + switch (j) { + case 0: + gen(random, x, z, world, ChinaCraft.peony); + break; + case 1: + gen(random, x, z, world, ChinaCraft.azalea); break; - } + case 2: + gen(random, x, z, world, ChinaCraft.chrysanthemum); + break; + + } } + return true; } } diff --git a/src/main/java/unstudio/chinacraft/world/gen/WorldGenListener.java b/src/main/java/unstudio/chinacraft/world/gen/WorldGenListener.java index 3d62775..bcbe0bd 100644 --- a/src/main/java/unstudio/chinacraft/world/gen/WorldGenListener.java +++ b/src/main/java/unstudio/chinacraft/world/gen/WorldGenListener.java @@ -15,6 +15,8 @@ public class WorldGenListener{ private final WorldGenCCOre WORLD_GEN_SILVER_ORE = new WorldGenCCOre(new int[]{0},4,32,0,8, ChinaCraft.silverOre); private final WorldGenCCOre WORLD_GEN_JADE_ORE = new WorldGenCCOre(new int[]{0},4,64,32,4, ChinaCraft.jadeOre); private final WorldGenCCOre WORLD_GEN_MARBLE_ORE = new WorldGenCCOre(new int[]{0},1,128,32,48, ChinaCraft.blockMarble); + private final WorldGenCCFlower WORLD_GEN_CC_FLOWER = new WorldGenCCFlower(); + private final WorldGenBambooShoot WORLD_GEN_BAMBOO_SHOOT = new WorldGenBambooShoot(); public WorldGenListener() { @@ -28,5 +30,7 @@ public void onOreGenPost(OreGenEvent.Post event){ WORLD_GEN_SILVER_ORE.generate(event.world,event.rand,event.worldX,0,event.worldZ); WORLD_GEN_JADE_ORE.generate(event.world,event.rand,event.worldX,0,event.worldZ); WORLD_GEN_MARBLE_ORE.generate(event.world,event.rand,event.worldX,0,event.worldZ); + WORLD_GEN_CC_FLOWER.generate(event.world,event.rand,event.worldX,0,event.worldZ); + WORLD_GEN_BAMBOO_SHOOT.generate(event.world,event.rand,event.worldX,0,event.worldZ); } } From f9398b2d2a8dc6d00b3896d049f6729a0d64c561 Mon Sep 17 00:00:00 2001 From: Trychen Date: Sun, 2 Apr 2017 13:18:53 +0800 Subject: [PATCH 17/36] Better Jade System --- .../event/jade/ListenerGreenJade.java | 13 --- .../chinacraft/event/jade/ListenerJade.java | 102 +++++++++--------- .../event/jade/PlayerUseJadeEvent.java | 9 +- 3 files changed, 57 insertions(+), 67 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/event/jade/ListenerGreenJade.java b/src/main/java/unstudio/chinacraft/event/jade/ListenerGreenJade.java index cc89cc0..ebb9dc7 100644 --- a/src/main/java/unstudio/chinacraft/event/jade/ListenerGreenJade.java +++ b/src/main/java/unstudio/chinacraft/event/jade/ListenerGreenJade.java @@ -15,19 +15,6 @@ import cpw.mods.fml.common.gameevent.TickEvent; public class ListenerGreenJade { - @SubscribeEvent - public void PlayerTick(TickEvent.PlayerTickEvent e) { - if (e.player.getHeldItem() != null) { - if (e.player.getHeldItem().getItem().equals(ChinaCraft.bronzeBroadSwordGreen)) { - if (e.player.isAirBorne && e.player.isSneaking()) { - e.player.motionY -= 0.2; - e.player.motionX *= 1.02D; - e.player.motionZ *= 1.02D; - } - } - } - } - @SubscribeEvent public void DoubleJump(LivingEvent.LivingJumpEvent event) { if (event.entity instanceof EntityPlayer) { diff --git a/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java b/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java index 2b00c3f..cde521c 100644 --- a/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java +++ b/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java @@ -2,19 +2,17 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingHurtEvent; import unstudio.chinacraft.common.ChinaCraft; import cpw.mods.fml.common.eventhandler.SubscribeEvent; -/** - * Created by trychen on 15/11/18. - */ public class ListenerJade { @SubscribeEvent public void useitem(PlayerUseJadeEvent.ItemRightClick event) { - if (event.itemStack.getItem() == ChinaCraft.jadeGreen2Item) { + if (event.itemStack.getItem() == ChinaCraft.jadePurpleItem) { if (event.itemStack.getItemDamage() == 0) { event.entityPlayer.heal(5); event.itemStack.setItemDamage(event.itemStack.getMaxDamage() - 1); @@ -26,58 +24,60 @@ public void useitem(PlayerUseJadeEvent.ItemRightClick event) { public void AttackEntityEvent(LivingHurtEvent event) { if (event.entity instanceof EntityPlayer) { EntityPlayer entityPlayer = (EntityPlayer) event.entity; - if (event.entity.worldObj.rand.nextInt(6) == 3) { - if (entityPlayer.getHeldItem() != null - && entityPlayer.getHeldItem().getItem().equals(ChinaCraft.bronzeBroadSwordPink)) { - event.ammount = 0.0f; - event.setCanceled(true); + + if (entityPlayer.inventory.mainInventory[8] != null) { + ItemStack itemStack = entityPlayer.inventory.mainInventory[8]; + if (itemStack.getItem() == ChinaCraft.jadePinkItem) { + /** + * Pink, 反弹1.3倍致命一击 + */ + PlayerUseJadeEvent.Hurt e = new PlayerUseJadeEvent.Hurt(event, entityPlayer, itemStack); + if (MinecraftForge.EVENT_BUS.post(e)) return; + if (itemStack.getItemDamage() == 0) { + event.ammount = 0.0f; + event.setCanceled(true); + } return; - } else { - for (int time = 0; time < 9; time++) { - if (entityPlayer.inventory.mainInventory[time] != null) { - if (entityPlayer.inventory.mainInventory[time].getItem().equals(ChinaCraft.jadePinkItem)) { - event.ammount = 0.0f; - event.setCanceled(true); - return; - } - } + } else if (itemStack.getItem() == ChinaCraft.jadeGreen2Item) { + /** + * Green2, 反弹1.3倍致命一击 + */ + PlayerUseJadeEvent.Hurt e = new PlayerUseJadeEvent.Hurt(event, entityPlayer, itemStack); + if (MinecraftForge.EVENT_BUS.post(e)) return; + + if (event.source.getEntity() != null && entityPlayer.getHealth() - event.ammount < 0) { + event.source.getEntity().attackEntityFrom(DamageSource.causePlayerDamage(entityPlayer), event.ammount * 1.3f); + } + } else if (itemStack.getItem() == ChinaCraft.jadePurpleItem){ + /** + * Purple, 回复CD + */ + PlayerUseJadeEvent.Hurt e = new PlayerUseJadeEvent.Hurt(event, entityPlayer, itemStack); + if (itemStack.getItemDamage() != 0) { + itemStack.setItemDamage(itemStack.getItemDamage() - 1); } } } - if (!event.source.isMagicDamage()&&!event.source.isUnblockable()) { - for (int time = 0; time < 9; time++) { - if (entityPlayer.inventory.mainInventory[time] != null) { - if (entityPlayer.inventory.mainInventory[time].getItem().equals(ChinaCraft.jadeGreen2Item)) { - ItemStack itemStack = entityPlayer.inventory.mainInventory[time]; - if (itemStack.getItemDamage() != 0) { - PlayerUseJadeEvent.MainInventory e = new PlayerUseJadeEvent.MainInventory(entityPlayer, - itemStack); - if (MinecraftForge.EVENT_BUS.post(e)) - return; - if (itemStack.getItemDamage() >= 2) - itemStack.setItemDamage(itemStack.getItemDamage() - 2); - else { - itemStack.setItemDamage(itemStack.getItemDamage() - 1); - } - } else if ((entityPlayer.getHealth() - event.ammount) < 0){ //如果是致命一击就自动回血 - entityPlayer.heal(5); - itemStack.setItemDamage(itemStack.getMaxDamage() - 1); - } - break; - } + + if (entityPlayer.getHeldItem() != null) { + ItemStack heldItemStack = entityPlayer.getHeldItem(); + if (heldItemStack.getItem().equals(ChinaCraft.bronzeBroadSwordPink)) { + /** + * Green 青铜剑, 一定几率miss伤害 + */ + if (event.entity.worldObj.rand.nextInt(6) == 3) { + event.ammount = 0.0f; + event.setCanceled(true); + entityPlayer.getHeldItem().damageItem(5, event.entityLiving); + return; } - } - } else { - if (entityPlayer.getHeldItem() != null - && entityPlayer.getHeldItem().getItem().equals(ChinaCraft.bronzeBroadSwordGreen2)) { - for (int time = 0; time < 9; time++) { - if (entityPlayer.inventory.mainInventory[time] != null) { - if (entityPlayer.inventory.mainInventory[time].getItem().equals(ChinaCraft.jadePinkItem)) { - entityPlayer.inventory.mainInventory[time] - .setItemDamage(entityPlayer.inventory.mainInventory[time].getItemDamage() - 1); - break; - } - } + } else if (heldItemStack.getItem().equals(ChinaCraft.bronzeBroadSwordGreen2)) { + if (event.entity.worldObj.rand.nextInt(6) == 3) { + /** + * Green2 青铜剑, 一定几率反弹伤害 + */ + event.source.getEntity().attackEntityFrom(DamageSource.causePlayerDamage(entityPlayer), event.ammount * 1.3f); + entityPlayer.getHeldItem().damageItem(5, event.entityLiving); } } } diff --git a/src/main/java/unstudio/chinacraft/event/jade/PlayerUseJadeEvent.java b/src/main/java/unstudio/chinacraft/event/jade/PlayerUseJadeEvent.java index 858d638..33e7219 100644 --- a/src/main/java/unstudio/chinacraft/event/jade/PlayerUseJadeEvent.java +++ b/src/main/java/unstudio/chinacraft/event/jade/PlayerUseJadeEvent.java @@ -2,6 +2,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.PlayerEvent; import cpw.mods.fml.common.eventhandler.Cancelable; @@ -26,10 +27,12 @@ public ItemRightClick(EntityPlayer player, ItemStack itemStack) { } @Cancelable - public static class MainInventory extends PlayerUseJadeEvent { + public static class Hurt extends PlayerUseJadeEvent { + public LivingHurtEvent hurtEvent; - public MainInventory(EntityPlayer player, ItemStack itemStack) { - super(player, itemStack); + public Hurt(LivingHurtEvent event, EntityPlayer entityPlayer, ItemStack itemStack) { + super(entityPlayer, itemStack); + this.hurtEvent = event; } } } From 53bba60eab691f181971e237a695beb46be9ab03 Mon Sep 17 00:00:00 2001 From: Trychen Date: Mon, 3 Apr 2017 20:20:19 +0800 Subject: [PATCH 18/36] New Version --- build.gradle | 2 +- gradle.properties | 2 +- .../chinacraft/common/ChinaCraft.java | 3 +- .../unstudio/chinacraft/common/Recipes.java | 10 ++++- .../chinacraft/entity/fx/FxHelper.java | 10 +++++ .../event/combat/ListenerSword.java | 2 +- .../event/jade/ListenerGreenJade.java | 23 +++++------ .../chinacraft/event/jade/ListenerJade.java | 40 +++++++++++++------ .../chinacraft/item/combat/CCItemMace.java | 8 ++++ src/main/resources/mcmod.info | 2 +- 10 files changed, 67 insertions(+), 35 deletions(-) diff --git a/build.gradle b/build.gradle index ffbf103..4a795fd 100644 --- a/build.gradle +++ b/build.gradle @@ -28,7 +28,7 @@ apply plugin: 'forge' def buildnumber = System.getenv("BUILD_NUMBER") == null ? null : System.getenv("BUILD_NUMBER") -version = minecraft_version + "-" + mod_version + ( buildnumber == null ? "" : "." + buildnumber + "-SanpShot") +version = minecraft_version + "-" + mod_version + ( buildnumber == null ? "" : "." + buildnumber + "-SANPSHOT") group = mod_group // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = mod_id diff --git a/gradle.properties b/gradle.properties index 4891de9..a179c96 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # Basic Properties mod_id = ChinaCraft -mod_version = 0.3.201 +mod_version = 0.4.203 mod_group = unstudio.chinacraft # Minecraft & Forge diff --git a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java index af10ec5..d76e849 100644 --- a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java +++ b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java @@ -383,7 +383,7 @@ public Item getTabIconItem() { @Register("JadeGreen") public static final Jade jadeGreenItem = new Jade("jade_green"); @Register("JadeGreen2") - public static final Item jadeGreen2Item = new Jade("jade_green2").setMaxDamage(8); + public static final Item jadeGreen2Item = new Jade("jade_green2").setMaxDamage(56); @Register("JadePink") public static final Jade jadePinkItem = new Jade("jade_pink"); @Register("JadePurple") @@ -474,7 +474,6 @@ public Item getTabIconItem() { HAMMERIRON.setRepairItem(new ItemStack(Items.iron_ingot)); HAMMERDIANMOND.setRepairItem(new ItemStack(Items.diamond)); BRONZE.setRepairItem(new ItemStack(ChinaCraft.bronzeIngot)); - BROAD_BRONZE.setRepairItem(new ItemStack(ChinaCraft.bronzeIngot)); } public static Configuration getMainConfig() { diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index f47cdb7..793b205 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -206,8 +206,14 @@ public static void init() { ChinaCraft.bronzeBlock); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bronzeSword, 1), new Object[]{" # ", " # ", " X ", '#', ChinaCraft.bronzeIngot, 'X', Items.stick}); - GameRegistry.addRecipe(new ItemStack(ChinaCraft.mace, 1), new Object[]{" DO", " BD", " X ", 'D', Items.diamond, - 'X', Items.stick, 'O', Item.getItemFromBlock(Blocks.obsidian), 'B', ChinaCraft.bronzeIngot}); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.mace, 1), + " DO", + "XBD", + "XX ", + 'D', Items.diamond, + 'X', Items.stick, + 'O', Item.getItemFromBlock(Blocks.obsidian), + 'B', ChinaCraft.bronzeIngot); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.bronzeBroadSword, 1), new Object[]{" ##", " X#", "X ", '#', ChinaCraft.bronzeIngot, 'X', Items.stick})); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.bronzeBroadSword, 1), diff --git a/src/main/java/unstudio/chinacraft/entity/fx/FxHelper.java b/src/main/java/unstudio/chinacraft/entity/fx/FxHelper.java index 0e7171b..71e713e 100644 --- a/src/main/java/unstudio/chinacraft/entity/fx/FxHelper.java +++ b/src/main/java/unstudio/chinacraft/entity/fx/FxHelper.java @@ -1,5 +1,6 @@ package unstudio.chinacraft.entity.fx; +import net.minecraft.entity.Entity; import net.minecraft.world.World; /** @@ -10,6 +11,15 @@ public static void spawnEffects(World worldObj, double xCoord, double yCoord, do spawnEffects("mobSpellAmbient", worldObj, xCoord, yCoord, zCoord); } + public static void spawnEffects(String type, Entity entity) { + for (int i = 0; i < 5; i++) { + double motionX = entity.worldObj.rand.nextGaussian() * 0.02D; + double motionY = entity.worldObj.rand.nextGaussian() * 0.02D; + double motionZ = entity.worldObj.rand.nextGaussian() * 0.02D; + entity.worldObj.spawnParticle(type, entity.posX, entity.posY + 1, entity.posZ, motionX,motionY,motionZ); + } + } + public static void spawnEffects(String kind, World worldObj, double xCoord, double yCoord, double zCoord) { worldObj.spawnParticle(kind, xCoord + worldObj.rand.nextFloat(), yCoord + 1.1, zCoord + worldObj.rand.nextFloat(), 0, 0, 0); diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java index 0d94def..08dce73 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java @@ -12,7 +12,7 @@ public class ListenerSword { @SubscribeEvent public void mace(LivingHurtEvent event){ - if (event.source.isFireDamage() || event.source.isProjectile() || !(event.source.getSourceOfDamage() instanceof EntityPlayer) || event.source.damageType != "player" || event.source.getSourceOfDamage() == null) return; + if (event.source.isFireDamage() || event.source.isProjectile() || !(event.source.getSourceOfDamage() instanceof EntityPlayer) && !event.source.damageType.equals("player") || event.source.getSourceOfDamage() == null) return; EntityPlayer player = (EntityPlayer) event.source.getSourceOfDamage(); if (player.onGround && player.getHeldItem() != null && player.getHeldItem().getItem() == ChinaCraft.mace && player.worldObj.rand.nextBoolean()){ player.onCriticalHit(event.entity); diff --git a/src/main/java/unstudio/chinacraft/event/jade/ListenerGreenJade.java b/src/main/java/unstudio/chinacraft/event/jade/ListenerGreenJade.java index ebb9dc7..dec2a62 100644 --- a/src/main/java/unstudio/chinacraft/event/jade/ListenerGreenJade.java +++ b/src/main/java/unstudio/chinacraft/event/jade/ListenerGreenJade.java @@ -33,9 +33,8 @@ public void DoubleJump(LivingEvent.LivingJumpEvent event) { } } - for (int time = 0; time < 9; time++) { - if (entityPlayer.inventory.mainInventory[time] != null) { - if (entityPlayer.inventory.mainInventory[time].getItem().equals(ChinaCraft.jadeGreenItem)) { + if (entityPlayer.inventory.mainInventory[8] != null) { + if (entityPlayer.inventory.mainInventory[8].getItem().equals(ChinaCraft.jadeGreenItem)) { entityPlayer.motionY += 0.2; FxHelper.spawnEffects(entityPlayer.worldObj, event.entity.posX - 0.5, event.entity.posY - 2, event.entity.posZ - 0.5); @@ -43,7 +42,6 @@ public void DoubleJump(LivingEvent.LivingJumpEvent event) { } } - } } } @@ -82,7 +80,6 @@ public void missFall(LivingFallEvent event) { event.setCanceled(true); } } else if (entityPlayer.getHeldItem().getItem().equals(ChinaCraft.blGiantSword) && event.distance > 3.0f) { - entityPlayer.worldObj.spawnParticle("largeexplode", event.entity.posX - 0.5 + entityPlayer.worldObj.rand.nextFloat(), event.entity.posY - 2 + 1.1, event.entity.posZ - 0.5, 0, 0, 0); @@ -95,15 +92,13 @@ public void missFall(LivingFallEvent event) { } } if (event.distance > 2.0f) { - for (int time = 0; time < 9; time++) { - if (entityPlayer.inventory.mainInventory[time] != null) { - if (entityPlayer.inventory.mainInventory[time].getItem().equals(ChinaCraft.jadeGreenItem)) { - if (event.distance < 5.0f) { - event.setCanceled(true); - } else if (event.distance > 5.0f && event.distance < 12.0f) { - entityPlayer.attackEntityFrom(DamageSource.fall, 1.0f); - event.setCanceled(true); - } + if (entityPlayer.inventory.mainInventory[8] != null) { + if (entityPlayer.inventory.mainInventory[8].getItem().equals(ChinaCraft.jadeGreenItem)) { + if (event.distance < 5.0f) { + event.setCanceled(true); + } else if (event.distance > 5.0f && event.distance < 12.0f) { + entityPlayer.attackEntityFrom(DamageSource.fall, 1.0f); + event.setCanceled(true); } } } diff --git a/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java b/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java index c36b74d..38b6287 100644 --- a/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java +++ b/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java @@ -9,6 +9,7 @@ import unstudio.chinacraft.common.ChinaCraft; import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import unstudio.chinacraft.entity.fx.FxHelper; public class ListenerJade { @SubscribeEvent @@ -25,7 +26,24 @@ public void useitem(PlayerUseJadeEvent.ItemRightClick event) { } @SubscribeEvent(priority = EventPriority.HIGH) - public void AttackEntityEvent(LivingHurtEvent event) { + public void attackEvent(LivingHurtEvent event) { + if (event.source.getEntity() != null && !event.source.isProjectile() && event.source.damageType.equals("player") && event.source.getEntity() instanceof EntityPlayer){ + EntityPlayer entityPlayer = (EntityPlayer) event.source.getEntity(); + ItemStack heldItemStack = entityPlayer.getHeldItem(); + if (heldItemStack.getItem().equals(ChinaCraft.bronzeBroadSwordGreen2)) { + if (event.entity.worldObj.rand.nextInt(6) == 3) { + /** + * Green2 Sword, 一定几率吸血 + */ + entityPlayer.heal(event.ammount); + heldItemStack.damageItem(4, entityPlayer); + } + } + } + } + + @SubscribeEvent(priority = EventPriority.HIGH) + public void hurtEvent(LivingHurtEvent event) { if (event.entity instanceof EntityPlayer) { EntityPlayer entityPlayer = (EntityPlayer) event.entity; @@ -44,15 +62,19 @@ public void AttackEntityEvent(LivingHurtEvent event) { return; } else if (itemStack.getItem() == ChinaCraft.jadeGreen2Item) { /** - * Green2 Jade, 反弹1.3倍致命一击 + * Green2 Jade, 几率性反弹1.3倍致命一击 */ PlayerUseJadeEvent.Hurt e = new PlayerUseJadeEvent.Hurt(event, entityPlayer, itemStack); if (MinecraftForge.EVENT_BUS.post(e)) return; - - if (event.source.getEntity() != null && entityPlayer.getHealth() - event.ammount < 0) { + if (entityPlayer.worldObj.rand.nextInt(4) == 3 && event.source.getEntity() != null) { event.source.getEntity().attackEntityFrom(DamageSource.causePlayerDamage(entityPlayer), event.ammount * 1.3f); + itemStack.damageItem(1, entityPlayer); + if(!e.entity.worldObj.isRemote) { +// e.entity.worldObj.spawnParticle("magicCrit", e.entity.worldObj, e.entity.posX - 0.5, e.entity.posY + 1, e.entity.posZ - 0.5); + FxHelper.spawnEffects("magicCrit", e.entity); + } } - } else if (itemStack.getItem() == ChinaCraft.jadePurpleItem){ + } else if (itemStack.getItem() == ChinaCraft.jadePurpleItem) { /** * Purple Jade, 回复CD */ @@ -75,14 +97,6 @@ public void AttackEntityEvent(LivingHurtEvent event) { entityPlayer.getHeldItem().damageItem(5, event.entityLiving); return; } - } else if (heldItemStack.getItem().equals(ChinaCraft.bronzeBroadSwordGreen2)) { - if (event.entity.worldObj.rand.nextInt(6) == 3) { - /** - * Green2 Sword, 一定几率反弹伤害 - */ - event.source.getEntity().attackEntityFrom(DamageSource.causePlayerDamage(entityPlayer), event.ammount * 1.3f); - entityPlayer.getHeldItem().damageItem(5, event.entityLiving); - } } } } diff --git a/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java b/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java index 6f53f9d..640d5f6 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java +++ b/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java @@ -15,6 +15,7 @@ import unstudio.chinacraft.client.render.item.SpecialItemRender; import unstudio.chinacraft.common.ChinaCraft; +import unstudio.chinacraft.entity.fx.FxHelper; import unstudio.chinacraft.util.annotation.register.ISpecialEquippedRender; public class CCItemMace extends ItemSword implements ISpecialEquippedRender{ @@ -36,6 +37,13 @@ public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p p_77624_3_.add(StatCollector.translateToLocal("item.mace.lore")); } + @Override + public boolean hitEntity(ItemStack p_77644_1_, EntityLivingBase p_77644_2_, EntityLivingBase p_77644_3_) { + FxHelper.spawnEffects("blockcrack_" + ModelArmorCassock.getItemId(), p_77644_3_.worldObj, p_77644_3_.posX - 0.5, + p_77644_3_.posY, p_77644_3_.posZ - 0.5); + return super.hitEntity(p_77644_1_, p_77644_2_, p_77644_3_); + } + @Override public void doRender() { diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 46f5347..a43f1b8 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "chinacraft", "name": "ChinaCraft", "description": "A mod with Chinese features.", - "version": "Beta 0.3.201", + "version": "Beta 0.4.203", "mcversion": "1.7.10", "url": "http://mccraft.cn/project/chinacraft", "updateUrl": "", From a72117d4ddfe154b1226c7a12f7ae5d221b4363b Mon Sep 17 00:00:00 2001 From: Trychen Date: Mon, 3 Apr 2017 22:16:00 +0800 Subject: [PATCH 19/36] Rename jiuquTang & Redesign chinacrown, now the player wearing it will under three times the damage and cause double damage --- .../chinacraft/common/ChinaCraft.java | 2 +- .../chinacraft/common/ClientProxy.java | 2 +- .../unstudio/chinacraft/common/Recipes.java | 2 +- .../event/combat/ListenerArmor.java | 26 ++++++++++++------- .../chinacraft/item/ItemFirecracker.java | 6 ++++- .../{JiuQu_tang.java => CCItemJiuQuTang.java} | 4 +-- .../item/combat/ModelArmorCassock.java | 2 +- .../assets/chinacraft/lang/en_US.lang | 2 +- .../assets/chinacraft/lang/zh_CN.lang | 5 ++-- .../assets/chinacraft/lang/zh_TW.lang | 2 +- 10 files changed, 31 insertions(+), 22 deletions(-) rename src/main/java/unstudio/chinacraft/item/combat/{JiuQu_tang.java => CCItemJiuQuTang.java} (85%) diff --git a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java index d76e849..3393a8b 100644 --- a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java +++ b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java @@ -314,7 +314,7 @@ public Item getTabIconItem() { @Register("YanLungGiantknife") public static final BLGiantSword blGiantSword = new BLGiantSword(ChinaCraft.YANGLONG); // 炎龙巨刀 @Register("JiuQuTang") - public static final JiuQu_tang jiuqu_tang = new JiuQu_tang();// 九曲镋 + public static final CCItemJiuQuTang jiuquTang = new CCItemJiuQuTang();// 九曲镋 @Register("Mace") public static final CCItemMace mace = new CCItemMace(); // @Register("SuperBow") diff --git a/src/main/java/unstudio/chinacraft/common/ClientProxy.java b/src/main/java/unstudio/chinacraft/common/ClientProxy.java index edb31f7..03defc3 100644 --- a/src/main/java/unstudio/chinacraft/common/ClientProxy.java +++ b/src/main/java/unstudio/chinacraft/common/ClientProxy.java @@ -60,7 +60,7 @@ public void init(FMLInitializationEvent event) { ChinaCraft.bronzeBroadSwordPink.setTextureName("chinacraft:bronze_bigsword_pink"); ChinaCraft.bronzeBroadSwordPurple.setTextureName("chinacraft:bronze_bigsword_purple"); ChinaCraft.blGiantSword.setTextureName("chinacraft:blgiantsword"); - ChinaCraft.jiuqu_tang.setTextureName("chinacraft:jiuqu_tang"); + ChinaCraft.jiuquTang.setTextureName("chinacraft:jiuqu_tang"); ChinaCraft.mace.setTextureName("chinacraft:mace"); ChinaCraft.tinIngot.setTextureName("chinacraft:tin_ingot"); ChinaCraft.silverIngot.setTextureName("chinacraft:silver_ingot"); diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 793b205..435830d 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -195,7 +195,7 @@ public static void init() { // Item.getItemFromBlock(Blocks.stone)}); // 九曲镋刀 - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.jiuqu_tang, 1), new Object[]{"#T#", "###", + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.jiuquTang, 1), new Object[]{"#T#", "###", " X ", '#', ChinaCraft.bronzeIngot, 'X', Items.stick, 'T', ChinaCraft.tinIngot})); // 青铜 diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java index 675d425..3f16ffc 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java @@ -109,7 +109,7 @@ public void fall(LivingFallEvent e){ } @SubscribeEvent(priority = EventPriority.HIGH) - public void attack(LivingHurtEvent event){ + public void hurt(LivingHurtEvent event){ if (!(event.entity instanceof EntityPlayer)) return; EntityPlayer entityPlayer = (EntityPlayer) event.entity; @@ -120,21 +120,27 @@ public void attack(LivingHurtEvent event){ hurtCassock(event, entityPlayer); } if (entityPlayer.inventory.armorInventory[3] != null&& entityPlayer.inventory.armorInventory[3].getItem().equals(ChinaCraft.chinaCrown)){ - hurtChinaCrown(event, entityPlayer); + hurtChinaCrown(event); } - } - private void hurtChinaCrown(LivingHurtEvent event, EntityPlayer entityPlayer) { - if (entityPlayer.worldObj.rand.nextInt(2)==1){ - double percent = (entityPlayer.worldObj.rand.nextInt(5)+3)/10.0; - if (event.source.getSourceOfDamage()!=null&&event.source.getSourceOfDamage() instanceof EntityLiving){ - event.source.getSourceOfDamage().attackEntityFrom(DamageSource.causePlayerDamage(entityPlayer), (float) (event.ammount * (1 - percent))); - event.ammount = (float) (event.ammount * percent); - } + @SubscribeEvent(priority = EventPriority.HIGH) + public void attack(LivingHurtEvent event){ + if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) return; + EntityPlayer entityPlayer = (EntityPlayer) event.source.getEntity(); + if (entityPlayer.inventory.armorInventory[3] != null&& entityPlayer.inventory.armorInventory[3].getItem().equals(ChinaCraft.chinaCrown)){ + attackWithChinaCrown(event); } } + private void attackWithChinaCrown(LivingHurtEvent event) { + event.ammount *= 2; + } + + private void hurtChinaCrown(LivingHurtEvent event) { + event.ammount *= 3; + } + private void hurtCassock(LivingHurtEvent event, EntityPlayer entityPlayer){ if (entityPlayer.getHealth() - event.ammount <= 0){ entityPlayer.setHealth(entityPlayer.getMaxHealth() / 2); diff --git a/src/main/java/unstudio/chinacraft/item/ItemFirecracker.java b/src/main/java/unstudio/chinacraft/item/ItemFirecracker.java index 485c4f6..86ebf71 100644 --- a/src/main/java/unstudio/chinacraft/item/ItemFirecracker.java +++ b/src/main/java/unstudio/chinacraft/item/ItemFirecracker.java @@ -25,7 +25,11 @@ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer pla if (!world.isRemote) { if (player.isSneaking()){ for (int i = 0; i < stack.stackSize; i++) { - world.spawnEntityInWorld(new EntityThrownFirecracker(world, player)); + EntityThrownFirecracker entityThrownFirecracker = new EntityThrownFirecracker(world, player); + entityThrownFirecracker.motionX *= world.rand.nextGaussian(); + entityThrownFirecracker.motionY += 0.3; + entityThrownFirecracker.motionZ *= world.rand.nextGaussian(); + world.spawnEntityInWorld(entityThrownFirecracker); } } else world.spawnEntityInWorld(new EntityThrownFirecracker(world, player)); } diff --git a/src/main/java/unstudio/chinacraft/item/combat/JiuQu_tang.java b/src/main/java/unstudio/chinacraft/item/combat/CCItemJiuQuTang.java similarity index 85% rename from src/main/java/unstudio/chinacraft/item/combat/JiuQu_tang.java rename to src/main/java/unstudio/chinacraft/item/combat/CCItemJiuQuTang.java index 7985b50..87f466c 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/JiuQu_tang.java +++ b/src/main/java/unstudio/chinacraft/item/combat/CCItemJiuQuTang.java @@ -9,9 +9,9 @@ /** * Created by Huangshize . */ -public class JiuQu_tang extends ItemSword implements ISpecialEquippedRender{ +public class CCItemJiuQuTang extends ItemSword implements ISpecialEquippedRender{ - public JiuQu_tang() { + public CCItemJiuQuTang() { super(ToolMaterial.IRON); setUnlocalizedName("jiuqu_tang"); setMaxStackSize(1); diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java index 502715d..dedb779 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java @@ -22,7 +22,7 @@ public class ModelArmorCassock extends ModelArmor { private static Integer itemId; public ModelArmorCassock() { - super(ArmorMaterial.CLOTH, "cassock", null, 1, 1, 1); + super(ArmorMaterial.CLOTH, "cassock", "cassock", 1, 1, 1); } @Override diff --git a/src/main/resources/assets/chinacraft/lang/en_US.lang b/src/main/resources/assets/chinacraft/lang/en_US.lang index e94bd11..a0fff81 100644 --- a/src/main/resources/assets/chinacraft/lang/en_US.lang +++ b/src/main/resources/assets/chinacraft/lang/en_US.lang @@ -61,7 +61,7 @@ item.debug.name=Debug item.xinjiang_nut_cake.name=Xinjiang Nut Cake item.china_crown.name=Crown item.chinacrown.lore=Symbol of the Power -item.chinacrown.hidelore=Will give wearer with Strength Effect +item.chinacrown.hidelore=Under three times the damage and cause double damage tile.xinjiang_nut_cake.name=Xinjiang Nut Cake item.apple_cake.name=Apple Cake tile.apple_cake.name=Apple Cake diff --git a/src/main/resources/assets/chinacraft/lang/zh_CN.lang b/src/main/resources/assets/chinacraft/lang/zh_CN.lang index b45f65c..682985b 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_CN.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_CN.lang @@ -24,7 +24,7 @@ item.bronze_body.name=青铜胸甲 item.bronze_legs.name=青铜护腿 item.bronze_boots.name=青铜靴子 item.night_clothes_head.name=夜行衣头罩 -item.night_clothes_body.name=夜行衣胸衣 +item.night_clothes_body.name夜行衣胸衣 item.night_clothes_leg.name=夜行衣绑腿 item.night_clothes_shoe.name=夜行衣护脚 item.nightclothes.lore=窃以无形,行如飞马 @@ -62,9 +62,8 @@ item.debug.name=调试 item.china_crown.name=冕冠 item.chinacrown.lore=权力的象征 -item.chinacrown.hidelore=获得 力量 效果 +item.chinacrown.hidelore=承受三倍的伤害造成双倍伤害 item.xinjiang_nut_cake.name=切糕 -tile.xinjiang_nut_cake.name=切糕 item.apple_cake.name=苹果糕 tile.apple_cake.name=苹果糕 item.firecracker.name=鞭炮 diff --git a/src/main/resources/assets/chinacraft/lang/zh_TW.lang b/src/main/resources/assets/chinacraft/lang/zh_TW.lang index 29ad729..6bea346 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_TW.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_TW.lang @@ -61,7 +61,7 @@ item.SMFSuper.name=混沌符 item.debug.name=調試 item.china_crown.name=冕冠 item.chinacrown.lore=權利的象徵 -item.chinacrown.hidelore=獲得力量效果 +item.chinacrown.hidelore=承受三倍的傷害造成雙倍傷害 item.xinjiang_nut_cake.name=切糕 tile.xinjiang_nut_cake.name=切糕 item.apple_cake.name=蘋果糕 From d6263cc1032c91fc84206c440897ccc8841bc523 Mon Sep 17 00:00:00 2001 From: Trychen Date: Mon, 3 Apr 2017 23:02:31 +0800 Subject: [PATCH 20/36] Fixed Bugs --- .../java/unstudio/chinacraft/event/combat/ListenerArmor.java | 4 ++-- .../java/unstudio/chinacraft/event/jade/ListenerJade.java | 2 +- src/main/resources/assets/chinacraft/lang/zh_CN.lang | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java index 3f16ffc..eba4b64 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java @@ -126,9 +126,9 @@ public void hurt(LivingHurtEvent event){ @SubscribeEvent(priority = EventPriority.HIGH) public void attack(LivingHurtEvent event){ - if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) return; + if (event.source.getEntity() == null || !(event.source.getEntity() instanceof EntityPlayer)) return; EntityPlayer entityPlayer = (EntityPlayer) event.source.getEntity(); - if (entityPlayer.inventory.armorInventory[3] != null&& entityPlayer.inventory.armorInventory[3].getItem().equals(ChinaCraft.chinaCrown)){ + if (entityPlayer.inventory.armorInventory[3] != null && entityPlayer.inventory.armorInventory[3].getItem() == ChinaCraft.chinaCrown){ attackWithChinaCrown(event); } } diff --git a/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java b/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java index 38b6287..27f4a23 100644 --- a/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java +++ b/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java @@ -30,7 +30,7 @@ public void attackEvent(LivingHurtEvent event) { if (event.source.getEntity() != null && !event.source.isProjectile() && event.source.damageType.equals("player") && event.source.getEntity() instanceof EntityPlayer){ EntityPlayer entityPlayer = (EntityPlayer) event.source.getEntity(); ItemStack heldItemStack = entityPlayer.getHeldItem(); - if (heldItemStack.getItem().equals(ChinaCraft.bronzeBroadSwordGreen2)) { + if (heldItemStack!= null && heldItemStack.getItem().equals(ChinaCraft.bronzeBroadSwordGreen2)) { if (event.entity.worldObj.rand.nextInt(6) == 3) { /** * Green2 Sword, 一定几率吸血 diff --git a/src/main/resources/assets/chinacraft/lang/zh_CN.lang b/src/main/resources/assets/chinacraft/lang/zh_CN.lang index 682985b..b0ef6d1 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_CN.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_CN.lang @@ -24,7 +24,7 @@ item.bronze_body.name=青铜胸甲 item.bronze_legs.name=青铜护腿 item.bronze_boots.name=青铜靴子 item.night_clothes_head.name=夜行衣头罩 -item.night_clothes_body.name夜行衣胸衣 +item.night_clothes_body.name=夜行衣胸衣 item.night_clothes_leg.name=夜行衣绑腿 item.night_clothes_shoe.name=夜行衣护脚 item.nightclothes.lore=窃以无形,行如飞马 From 9704d64e9b090dd38fb81d370f8cd68afce34c72 Mon Sep 17 00:00:00 2001 From: Trychen Date: Sun, 7 May 2017 14:05:38 +0800 Subject: [PATCH 21/36] Beta 0.2.205 --- gradle.properties | 2 +- .../chinacraft/block/CCBlockWall.java | 34 ++++++++++++++ .../{BlockWoodenWindow.java => CCWindow.java} | 6 +-- .../chinacraft/common/ChinaCraft.java | 43 +++++++++++++----- .../unstudio/chinacraft/common/Recipes.java | 38 +++++++++++++++- .../event/combat/ListenerSword.java | 4 +- .../chinacraft/item/combat/CCItemMace.java | 4 +- .../chinacraft/item/combat/ModelArmor.java | 7 ++- .../item/combat/ModelArmorCassock.java | 3 +- .../world/gen/WorldGenBambooShoot.java | 6 ++- .../assets/chinacraft/lang/en_US.lang | 7 ++- .../assets/chinacraft/lang/zh_CN.lang | 8 +++- .../assets/chinacraft/lang/zh_TW.lang | 5 ++ .../blocks/blackbrick_blacker_block.png | Bin 0 -> 3113 bytes .../blocks/blackbrick_block_mossy.png | Bin 0 -> 791 bytes .../textures/blocks/peeled_bamboo_plank.png | Bin 0 -> 757 bytes .../blocks/peeled_bamboo_window_1.png | Bin 0 -> 3984 bytes .../blocks/peeled_bamboo_window_2.png | Bin 0 -> 5248 bytes .../blocks/peeled_bamboo_window_3.png | Bin 0 -> 5184 bytes .../blocks/peeled_bamboo_window_top.png | Bin 0 -> 17381 bytes .../textures/models/armor/_cassock.png | Bin 0 -> 19684 bytes .../textures/models/entity/bomb.png | Bin 0 -> 4037 bytes src/main/resources/mcmod.info | 2 +- 23 files changed, 141 insertions(+), 28 deletions(-) create mode 100644 src/main/java/unstudio/chinacraft/block/CCBlockWall.java rename src/main/java/unstudio/chinacraft/block/decoration/{BlockWoodenWindow.java => CCWindow.java} (81%) create mode 100644 src/main/resources/assets/chinacraft/textures/blocks/blackbrick_blacker_block.png create mode 100644 src/main/resources/assets/chinacraft/textures/blocks/blackbrick_block_mossy.png create mode 100755 src/main/resources/assets/chinacraft/textures/blocks/peeled_bamboo_plank.png create mode 100755 src/main/resources/assets/chinacraft/textures/blocks/peeled_bamboo_window_1.png create mode 100755 src/main/resources/assets/chinacraft/textures/blocks/peeled_bamboo_window_2.png create mode 100755 src/main/resources/assets/chinacraft/textures/blocks/peeled_bamboo_window_3.png create mode 100644 src/main/resources/assets/chinacraft/textures/blocks/peeled_bamboo_window_top.png create mode 100644 src/main/resources/assets/chinacraft/textures/models/armor/_cassock.png create mode 100644 src/main/resources/assets/chinacraft/textures/models/entity/bomb.png diff --git a/gradle.properties b/gradle.properties index a179c96..f1129fa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # Basic Properties mod_id = ChinaCraft -mod_version = 0.4.203 +mod_version = 0.4.205 mod_group = unstudio.chinacraft # Minecraft & Forge diff --git a/src/main/java/unstudio/chinacraft/block/CCBlockWall.java b/src/main/java/unstudio/chinacraft/block/CCBlockWall.java new file mode 100644 index 0000000..9792b3d --- /dev/null +++ b/src/main/java/unstudio/chinacraft/block/CCBlockWall.java @@ -0,0 +1,34 @@ +package unstudio.chinacraft.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockWall; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import unstudio.chinacraft.common.ChinaCraft; + +import java.util.List; + +/** + * Created by trychen on 17/5/7. + */ +public class CCBlockWall extends BlockWall{ + public Block block; + + public CCBlockWall(Block b) { + super(b); + this.block = b; + this.setCreativeTab(ChinaCraft.tabCore); + } + + @Override + public IIcon getIcon(int p_149691_1_, int p_149691_2_) { + return block.getIcon(p_149691_1_, p_149691_2_); + } + + @Override + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) { + p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0)); + } +} diff --git a/src/main/java/unstudio/chinacraft/block/decoration/BlockWoodenWindow.java b/src/main/java/unstudio/chinacraft/block/decoration/CCWindow.java similarity index 81% rename from src/main/java/unstudio/chinacraft/block/decoration/BlockWoodenWindow.java rename to src/main/java/unstudio/chinacraft/block/decoration/CCWindow.java index 8326c43..de172ba 100644 --- a/src/main/java/unstudio/chinacraft/block/decoration/BlockWoodenWindow.java +++ b/src/main/java/unstudio/chinacraft/block/decoration/CCWindow.java @@ -9,11 +9,11 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockWoodenWindow extends BlockPane { +public class CCWindow extends BlockPane { - public BlockWoodenWindow(String arg1, String arg2) { + public CCWindow(String name, String arg1, String arg2) { super(arg1, arg2, Material.wood, true); - setBlockName(StatCollector.translateToLocal("wooden_window")); + setBlockName(StatCollector.translateToLocal(name)); setHardness(0.3F); setStepSound(soundTypeWood); setCreativeTab(ChinaCraft.tabCore); diff --git a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java index 3393a8b..06df4ff 100644 --- a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java +++ b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java @@ -22,6 +22,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import unstudio.chinacraft.block.BlockBase; +import unstudio.chinacraft.block.CCBlockWall; import unstudio.chinacraft.block.CCFlower; import unstudio.chinacraft.block.CCGrowablePlant; import unstudio.chinacraft.block.decoration.*; @@ -57,7 +58,7 @@ public class ChinaCraft implements ICollection { public static final String MODID = "chinacraft"; public static final String NAME = "ChinaCraft"; - public static final String VERSION = "0.3.200"; + public static final String VERSION = "0.4.205"; public static final int PROJECT_ID = 1; public static SimpleNetworkWrapper Network; @@ -82,12 +83,13 @@ public class ChinaCraft implements ICollection { // Material public static final Item.ToolMaterial BRONZE = EnumHelper.addToolMaterial("BRONZE", 2, 200, 5.2F, 1.8F, 14); - public static final Item.ToolMaterial HAMMERSTONE = EnumHelper.addToolMaterial("HAMMERSIONE", 1, 240, 4.0F, 2.0F, 5); // 石锤 - public static final Item.ToolMaterial HAMMERIRON = EnumHelper.addToolMaterial("HAMMERIRON", 2, 475, 6.0F, 3.0F, 14); // 铁锤 - public static final Item.ToolMaterial HAMMERDIANMOND = EnumHelper.addToolMaterial("HAMMERDIAMOND", 3, 2096, 8.0F, 4.0F, + public static final Item.ToolMaterial HAMMERSTONE = EnumHelper.addToolMaterial("CC_HAMMER_SIONE", 1, 240, 4.0F, 2.0F, 5); // 石锤 + public static final Item.ToolMaterial HAMMERIRON = EnumHelper.addToolMaterial("CC_HAMMER_IRON", 2, 475, 6.0F, 3.0F, 14); // 铁锤 + public static final Item.ToolMaterial HAMMERDIANMOND = EnumHelper.addToolMaterial("CC_HAMMER_DIAMOND", 3, 2096, 8.0F, 4.0F, 10); // 钻石锤 - public static final Item.ToolMaterial YANGLONG = EnumHelper.addToolMaterial("yanlong", 3, 2568, 8.0F, 6.0F, 10); // BLGiantSword - public static final Item.ToolMaterial BROAD_BRONZE = EnumHelper.addToolMaterial("BROAD_BRONZE", 2, 230, 6.0F, 2.5F, 1); + public static final Item.ToolMaterial YANGLONG = EnumHelper.addToolMaterial("CC_YANG_LONG", 3, 2568, 8.0F, 6.0F, 10); // BLGiantSword + public static final Item.ToolMaterial BROAD_BRONZE = EnumHelper.addToolMaterial("CC_BROAD_BRONZE", 2, 230, 6.0F, 2.5F, 1); + public static final Item.ToolMaterial MACE = EnumHelper.addToolMaterial("CC_MACE", 2, 450, 2.0F, 2F, 4); public static final CreativeTabs tabCore = new CreativeTabs("core") { @Override @@ -160,6 +162,8 @@ public Item getTabIconItem() { public static final Block marbleSlab = new BlockCCSlab(false, Material.rock).setHarvestLevelReturnBlock("pickaxe", 1).setCreativeTab(ChinaCraft.tabCore).setHardness(2.0F).setResistance(10.0F).setStepSound(Block.soundTypePiston).setBlockName("marble_slab").setBlockTextureName("chinacraft:smooth_marble"); // 大理石半砖 @SlabRegister(name = "MarbleDoubleSlab", first = "marbleSlab", second = "marbleDoubleSlab") public static final Block marbleDoubleSlab = new BlockCCSlab(true, Material.rock).setBlockSlab(ChinaCraft.marbleSlab).setHarvestLevelReturnBlock("pickaxe", 1).setHardness(2.0F).setResistance(10.0F).setStepSound(Block.soundTypePiston).setBlockName("marble_slab").setBlockTextureName("chinacraft:smooth_marble"); // 大理石半砖 + @Register("MarbleWall") + public static final Block marbleWall = new CCBlockWall(smoothMarble).setBlockName("marble_wall"); // 大理石墙 // @Register("TraditionalPainting") public static final CCItemPainting traditionalPainting = new CCItemPainting("traditional_painting"); @@ -181,15 +185,30 @@ public Item getTabIconItem() { public static final Block bambooFenceGate = new BlockCCFenceGate(bambooPlank).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeWood).setBlockName("bamboo_fence_gate").setCreativeTab(ChinaCraft.tabCore);//竹制栅栏门 @Register("BambooFence") public static final Block bambooFence = new BlockCCFence("chinacraft:bamboo_plank",Material.wood).setGate(bambooFenceGate).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeWood).setBlockName("bamboo_fence").setCreativeTab(ChinaCraft.tabCore);//竹制栅栏 + @Register("PeeledBambooPlank") + public static final Block peeledBambooPlank = new BlockBase(Material.wood).setBlockTextureName("chinacraft:peeled_bamboo_plank").setBlockName("peeled_bamboo_plank") + .setCreativeTab(ChinaCraft.tabCore).setStepSound(Block.soundTypeWood); // 竹板 + @Register("PeedledBambooWindow1") + public static final CCWindow peeledBambooWindow1 = new CCWindow("bamboo_window","chinacraft:peeled_bamboo_window_1", "chinacraft:peeled_bamboo_window_top"); + @Register("PeedledBambooWindow2") + public static final CCWindow peeledBambooWindow2 = new CCWindow("bamboo_window","chinacraft:peeled_bamboo_window_2", "chinacraft:peeled_bamboo_window_top"); + @Register("PeedledBambooWindow3") + public static final CCWindow peeledBambooWindow3 = new CCWindow("bamboo_window", "chinacraft:peeled_bamboo_window_3", "chinacraft:peeled_bamboo_window_top"); @Register("BlackBrickBlock") public static final Block blackbrickBlock = new BlockBase(Material.rock).setHarvestLevelReturnBlock("pickaxe", 0).setHardness(2.0F).setResistance(10.0F).setBlockName("blackbrick_block").setStepSound(Block.soundTypeStone).setBlockTextureName("chinacraft:blackbrick_block").setCreativeTab(ChinaCraft.tabCore);//青砖块 + @Register("BlackBrickMossyBlock") + public static final Block blackbrickMossyBlock = new BlockBase(Material.rock).setHarvestLevelReturnBlock("pickaxe", 0).setHardness(2.0F).setResistance(10.0F).setBlockName("blackbrick_mossy_block").setStepSound(Block.soundTypeStone).setBlockTextureName("chinacraft:blackbrick_block_mossy").setCreativeTab(ChinaCraft.tabCore);//青砖块 + @Register("BlackBrickBlackerBlock") + public static final Block blackbrickBlackerBlock = new BlockBase(Material.rock).setHarvestLevelReturnBlock("pickaxe", 0).setHardness(2.0F).setResistance(12.0F).setBlockName("blackbrick_blacker_block").setStepSound(Block.soundTypeStone).setBlockTextureName("chinacraft:blackbrick_blacker_block").setCreativeTab(ChinaCraft.tabCore);//青砖块 @SlabRegister(name = "BlackBrickSlab",first = "blackbrickSlab",second = "blackbrickDoubleSlab") public static final Block blackbrickSlab = new BlockCCSlab(false,Material.rock).setHarvestLevelReturnBlock("pickaxe", 0).setHardness(2.0F).setResistance(10.0F).setBlockName("blackbrick_slab").setStepSound(Block.soundTypeStone).setBlockTextureName("chinacraft:blackbrick_block").setCreativeTab(ChinaCraft.tabCore);//青砖半砖 @SlabRegister(name = "BlackBrickDoubleSlab",first = "blackbrickSlab",second = "blackbrickDoubleSlab") public static final Block blackbrickDoubleSlab = new BlockCCSlab(true,Material.rock).setHarvestLevelReturnBlock("pickaxe", 0).setBlockSlab(ChinaCraft.blackbrickSlab).setHardness(2.0F).setResistance(10.0F).setBlockName("blackbrick_slab").setStepSound(Block.soundTypeStone).setBlockTextureName("chinacraft:blackbrick_block");//青砖半砖 @Register("BlackBrickStair") public static final Block blackbrickStair = new BlockCCStair(ChinaCraft.blackbrickBlock,0).setHarvestLevelReturnBlock("pickaxe", 0).setHardness(2.0F).setResistance(10.0F).setBlockName("blackbrick_stair").setCreativeTab(ChinaCraft.tabCore); + @Register("BlackBrickWall") + public static final Block blackbrickWall = new CCBlockWall(blackbrickBlock).setBlockName("blackbrick_wall"); @Register(value = "MulberryLog",ore = "logWood") public static final Block mulberryLog = new BlockCCLog("chinacraft:mulberry_log_top", "chinacraft:mulberry_log").setCreativeTab(ChinaCraft.tabCore).setBlockName("mulberry_log"); // 桑树原木 @@ -202,17 +221,17 @@ public Item getTabIconItem() { @Register("WoodenWindow1") - public static final BlockWoodenWindow woodenWindow1 = new BlockWoodenWindow("chinacraft:wooden_window_1", "chinacraft:wooden_window_top"); // 木窗框1 + public static final CCWindow woodenWindow1 = new CCWindow("wooden_window", "chinacraft:wooden_window_1", "chinacraft:wooden_window_top"); // 木窗框1 @Register("WoodenWindow2") - public static final BlockWoodenWindow woodenWindow2 = new BlockWoodenWindow("chinacraft:wooden_window_2", "chinacraft:wooden_window_top"); // 木窗框2 + public static final CCWindow woodenWindow2 = new CCWindow("wooden_window", "chinacraft:wooden_window_2", "chinacraft:wooden_window_top"); // 木窗框2 @Register("WoodenWindow3") - public static final BlockWoodenWindow woodenWindow3 = new BlockWoodenWindow("chinacraft:wooden_window_3", "chinacraft:wooden_window_top"); // 木窗框3 + public static final CCWindow woodenWindow3 = new CCWindow("wooden_window", "chinacraft:wooden_window_3", "chinacraft:wooden_window_top"); // 木窗框3 @Register("WoodenWindow4") - public static final BlockWoodenWindow woodenWindow4 = new BlockWoodenWindow("chinacraft:wooden_window_4", "chinacraft:wooden_window_top"); // 木窗框3 + public static final CCWindow woodenWindow4 = new CCWindow("wooden_window", "chinacraft:wooden_window_4", "chinacraft:wooden_window_top"); // 木窗框3 @Register("WoodenWindowDragon") - public static final BlockWoodenWindow woodenWindowdragon = new BlockWoodenWindow("chinacraft:wooden_window_dragon", "chinacraft:wooden_window_top"); // 木窗框Logo + public static final CCWindow woodenWindowdragon = new CCWindow("wooden_window", "chinacraft:wooden_window_dragon", "chinacraft:wooden_window_top"); // 木窗框Logo @Register("WoodenWindowFu") - public static final BlockWoodenWindow woodenWindowfu = new BlockWoodenWindow("chinacraft:wooden_window_fu", "chinacraft:wooden_window_top"); // 木窗框:福 + public static final CCWindow woodenWindowfu = new CCWindow("wooden_window", "chinacraft:wooden_window_fu", "chinacraft:wooden_window_top"); // 木窗框:福 @Register("Azalea") public static final CCFlower azalea = new CCFlower("azalea"); diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 435830d..a7d5424 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -103,6 +103,11 @@ public static void init() { new Object[]{"# ", "## ", "###", '#', ChinaCraft.blockMarble}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.marbleStair, 4), new Object[]{" #", " ##", "###", '#', ChinaCraft.blockMarble}); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.marbleWall), + "###", + "###", + '#', ChinaCraft.smoothMarble + ); //青砖 for (int i = 1; i <= 8; i++) { @@ -119,6 +124,13 @@ public static void init() { new Object[]{"# ", "## ", "###", '#', ChinaCraft.blackbrick}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.blackbrickStair, 4), new Object[]{" #", " ##", "###", '#', ChinaCraft.blackbrick}); + GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.blackbrickMossyBlock), ChinaCraft.blackbrickBlock, Item.getItemFromBlock(Blocks.mossy_cobblestone)); + GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.blackbrickBlackerBlock), ChinaCraft.blackbrickBlock, Items.clay_ball); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.blackbrickWall), + "###", + "###", + '#', ChinaCraft.blackbrickBlock + ); // 木窗格 GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindowdragon, 1), @@ -135,6 +147,25 @@ public static void init() { GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindow1, 4), new Object[]{" A ", "A#A", " A ", 'A', Item.getItemFromBlock(Blocks.planks), '#', ChinaCraft.artKnife})); + GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.peeledBambooWindow1, 1), + "HHH", + " # ", + "HHH", + 'H', ChinaCraft.peeledBambooPlank, + '#', ChinaCraft.artKnife)); + GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.peeledBambooWindow2, 1), + "HHH", + "H#H", + "HHH", + 'H', ChinaCraft.peeledBambooPlank, + '#', ChinaCraft.artKnife)); + GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.peeledBambooWindow3, 1), + " H ", + "H#H", + " H ", + 'H', ChinaCraft.peeledBambooPlank, + '#', ChinaCraft.artKnife)); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.lanternScaldfish, 1, 2), "WYW", "WTW", "WYW", 'W', new ItemStack(Blocks.wool, 1, 14), 'Y', new ItemStack(Blocks.wool, 1, 4), 'T', Blocks.torch); GameRegistry.addRecipe(new ItemStack(ChinaCraft.itemDing), " J ", "MOM", "MCM", 'C', Blocks.coal_block, 'J', ChinaCraft.jadeKnife, 'O', Blocks.obsidian, 'M', Blocks.mossy_cobblestone); @@ -149,6 +180,12 @@ public static void init() { new Object[]{"###", "###", " ", '#', ChinaCraft.itemBamboo}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooFenceGate, 1), new Object[]{"#$#", "#$#", " ", '#', ChinaCraft.itemBamboo, '$', ChinaCraft.bambooPlank}); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooPlank, 9), + "###", + "#K#", + "###", + '#', ChinaCraft.bambooPlank, + 'K', ChinaCraft.artKnife); // mulberry GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.mulberryWood, 4), @@ -374,6 +411,5 @@ public static void init() { ChinaCraft.spiritualMagicFigures, Items.iron_ingot, Items.iron_ingot, Items.iron_ingot}); GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.smfSuper), new Object[]{ChinaCraft.blackDogBlood, ChinaCraft.spiritualMagicFigures}); - } } diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java index 08dce73..3e2cde7 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java @@ -14,9 +14,9 @@ public class ListenerSword { public void mace(LivingHurtEvent event){ if (event.source.isFireDamage() || event.source.isProjectile() || !(event.source.getSourceOfDamage() instanceof EntityPlayer) && !event.source.damageType.equals("player") || event.source.getSourceOfDamage() == null) return; EntityPlayer player = (EntityPlayer) event.source.getSourceOfDamage(); - if (player.onGround && player.getHeldItem() != null && player.getHeldItem().getItem() == ChinaCraft.mace && player.worldObj.rand.nextBoolean()){ + if (player.onGround && player.getHeldItem() != null && player.getHeldItem().getItem() == ChinaCraft.mace && player.worldObj.rand.nextInt(3) == 0 ){ player.onCriticalHit(event.entity); - event.ammount *= 1.8; + event.ammount *= 2.5; player.getHeldItem().damageItem(2, player); } } diff --git a/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java b/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java index 640d5f6..ced7d15 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java +++ b/src/main/java/unstudio/chinacraft/item/combat/CCItemMace.java @@ -20,7 +20,7 @@ public class CCItemMace extends ItemSword implements ISpecialEquippedRender{ public CCItemMace() { - super(ToolMaterial.STONE); + super(ChinaCraft.MACE); setCreativeTab(ChinaCraft.tabTool); setUnlocalizedName("mace"); } @@ -39,8 +39,6 @@ public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p @Override public boolean hitEntity(ItemStack p_77644_1_, EntityLivingBase p_77644_2_, EntityLivingBase p_77644_3_) { - FxHelper.spawnEffects("blockcrack_" + ModelArmorCassock.getItemId(), p_77644_3_.worldObj, p_77644_3_.posX - 0.5, - p_77644_3_.posY, p_77644_3_.posZ - 0.5); return super.hitEntity(p_77644_1_, p_77644_2_, p_77644_3_); } diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmor.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmor.java index 2a5bb51..736d5fb 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/ModelArmor.java +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmor.java @@ -20,8 +20,11 @@ public class ModelArmor extends ItemArmor { @SideOnly(Side.CLIENT) protected IIcon itemIcon; - private String textureName; + @SideOnly(Side.CLIENT) private ModelBiped armorModel; + + private String textureName; + private int textureType; public ModelArmor(ArmorMaterial armorMaterial, String name, String textureName, int textureType, int type, @@ -89,6 +92,7 @@ public IIcon getIcon(ItemStack stack, int pass) { } @Override + @SideOnly(Side.CLIENT) public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) { if (textureType == 0) { return String.format("chinacraft:textures/models/armor/%s.png", textureName); @@ -96,6 +100,7 @@ public String getArmorTexture(ItemStack stack, Entity entity, int slot, String l return String.format("chinacraft:textures/models/armor/%s_layer_%d.png", textureName, slot == 2 ? 2 : 1); } + @SideOnly(Side.CLIENT) public void setArmorModel(ModelBiped armorModel) { this.armorModel = armorModel; } diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java index dedb779..827147d 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java @@ -17,7 +17,7 @@ */ public class ModelArmorCassock extends ModelArmor { @SideOnly(Side.CLIENT) - private ModelCassock armorModel = new ModelCassock(); + private ModelCassock armorModel; private static Integer itemId; @@ -73,6 +73,7 @@ public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemSta } @Override + @SideOnly(Side.CLIENT) public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) { return "chinacraft:textures/models/armor/cassock.png"; } diff --git a/src/main/java/unstudio/chinacraft/world/gen/WorldGenBambooShoot.java b/src/main/java/unstudio/chinacraft/world/gen/WorldGenBambooShoot.java index 0d3f9bc..4286470 100644 --- a/src/main/java/unstudio/chinacraft/world/gen/WorldGenBambooShoot.java +++ b/src/main/java/unstudio/chinacraft/world/gen/WorldGenBambooShoot.java @@ -18,8 +18,12 @@ public boolean generate(World world, Random random, int x, int y, int z) { int y1 = world.getHeightValue(x1,z1)+1; int id = world.getBiomeGenForCoords(x1, z1).biomeID; if ((id == 3 || id == 4 || id == 18 || id == 20 || id == 34 || id == 27 || id == 28 || id == 29) - && random.nextInt(16) == 0) + && random.nextInt(16) == 0) try { new WorldGenFlowers(ChinaCraft.blockBambooShoot).generate(world, random, x1, y1, z1); + } catch (RuntimeException e) { + //TODO: unknown exception + e.printStackTrace(); + } return true; } } diff --git a/src/main/resources/assets/chinacraft/lang/en_US.lang b/src/main/resources/assets/chinacraft/lang/en_US.lang index a0fff81..fb45e63 100644 --- a/src/main/resources/assets/chinacraft/lang/en_US.lang +++ b/src/main/resources/assets/chinacraft/lang/en_US.lang @@ -87,10 +87,11 @@ tile.jade_ore.name=Jade Ore item.jade.lore=Level: tile.bamboo.name=Bamboo -tile.bamboo_plank.name=Bamboo Planks +tile.bamboo_plank.name=Bamboo Plank item.bamboo.name=Bamboo tile.bamboo_shoot.name=Bamboo Shoot item.bamboo_shoot.name=Bamboo Shoot +tile.peeled_bamboo_window.name=Peeled Bamboo Plank tile.azalea.name=Azalea tile.bean_bracket.name=Bean Bracket @@ -115,6 +116,7 @@ tile.mulberry_sapling.name=Mulberry Sapling tile.mulberry_wood.name=Mulberry Wood tile.marble.name=Marble +tile.marble_wall.name=Marble Wall tile.smooth_marble.name=Smooth Marble tile.pillar_marble.name=Marble Pillar tile.chiseled_marble.name=Chiseled Marble @@ -123,6 +125,9 @@ tile.marble_stair.name=Marble Stair tile.firebrick.name=Firebrick item.blackbrick.name=Black Brick tile.blackbrick_block.name=Black Brick +tile.blackbrick_mossy_block.name=Mossy Black Brick +tile.blackbrick_wall.name=Black Brick Wall +tile.blackbrick_blacker_block.name=Blacker Black Brick tile.blackbrick_slab.name=Black Brick Slab tile.blackbrick_stair.name=Black Brick Stair diff --git a/src/main/resources/assets/chinacraft/lang/zh_CN.lang b/src/main/resources/assets/chinacraft/lang/zh_CN.lang index b0ef6d1..2c4ea96 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_CN.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_CN.lang @@ -94,6 +94,7 @@ tile.bamboo_plank.name=竹板 tile.bamboo_shoot.name=竹笋 item.bamboo.name=竹子 item.bamboo_shoot.name=竹笋 +tile.peeled_bamboo_plank.name=竹板 (已杀青) tile.azalea.name=映山红 tile.beanBracket.name=作物支架 @@ -110,6 +111,7 @@ tile.prunusMumeSapling=梅花树苗 tile.teaBush=茶树 tile.wooden_window.name=木窗格 +tile.bamboo_window.name=竹窗格 tile.mulberry_log.name=桑树原木 tile.mulberry_leaf.name=桑叶 @@ -118,6 +120,7 @@ tile.mulberry_sapling.name=桑树苗 tile.mulberry_wood.name=桑木板 tile.marble.name=大理石 +tile.marble_wall.name=大理石墙 tile.smooth_marble.name=平滑大理石块 tile.pillar_marble.name=条纹大理石块 tile.chiseled_marble.name=錾制大理石块 @@ -125,7 +128,10 @@ tile.marble_slab.name=大理石半砖 tile.marble_stair.name=大理石楼梯 tile.firebrick.name=耐火砖 item.blackbrick.name=青砖 -tile.blackbrick_block.name=青砖 +tile.blackbrick_block.name=青砖块 +tile.blackbrick_wall.name=青砖墙 +tile.blackbrick_mossy_block.name=苔石青砖 +tile.blackbrick_blacker_block.name=深色青砖块 tile.blackbrick_slab.name=青砖半砖 tile.blackbrick_stair.name=青砖楼梯 diff --git a/src/main/resources/assets/chinacraft/lang/zh_TW.lang b/src/main/resources/assets/chinacraft/lang/zh_TW.lang index 6bea346..9afa699 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_TW.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_TW.lang @@ -88,6 +88,7 @@ tile.bamboo_plank.name=竹板 tile.bamboo_shoot.name=竹笋 item.bamboo.name=竹子 item.bamboo_shoot.name=竹笋 +tile.peeled_bamboo_window.name=竹板 (已杀青) tile.azalea.name=映山紅 tile.beanBracket.name=作物支架 tite.benincasa_pruriens.name=冬瓜 @@ -108,6 +109,7 @@ item.mulberry_leaf.name=桑葉 tile.mulberry_sapling.name=桑樹苗 tile.mulberry_wood.name=桑木板 tile.marble.name=大理石 +tile.marble_wall.name=大理石墙 tile.smooth_marble.name=平滑大理石塊 tile.pillar_marble.name=條紋大理石塊 tile.chiseled_marble.name=鏨制大理石塊 @@ -116,6 +118,9 @@ tile.marble_stair.name=大理石樓梯 tile.firebrick.name=耐火磚 item.blackbrick.name=青磚 tile.blackbrick_block.name=青磚 +tile.blackbrick_wall.name=青磚墙 +tile.blackbrick_mossy_block.name=苔石青磚 +tile.blackbrick_blacker_block.name=深色青磚块 tile.blackbrick_slab.name=青磚半磚 tile.blackbrick_stair.name=青磚樓梯 tile.potterytable.name=陶瓷工作臺 diff --git a/src/main/resources/assets/chinacraft/textures/blocks/blackbrick_blacker_block.png b/src/main/resources/assets/chinacraft/textures/blocks/blackbrick_blacker_block.png new file mode 100644 index 0000000000000000000000000000000000000000..430dd38c19755dce36a3dbaa93fd93970ef470d5 GIT binary patch literal 3113 zcmV+^4A%3BP)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b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w`k>Ww?tszGC;%6speLRD+)^zyoA^ z;^YT!nyIOy#Ifep=U?RVZwvP^?>LzV1eqG!wW|?tX2|^Uryr8_`v4Rt=h4yfz=?Q* zIF5P!_}hH;)rDP7q%j7Q8>EyxP#DJ;0}`~Z(r!0#{8`$KGEz#iEMu!xrrjvhZd}2V z67l2D-<#234BZPk_xWi6jvhJA;X^Orc^>5(zwpfAIi!>%NlcdYNqRA!69AwVSF2oG zIM1F3iyS=o5*wQ}NETSml!Vl+o>y`H@ z6be}WWbstmS1kQ;ji+Xg@b#rHsJCLi{pl>-#OLbLP3p}CH&>RKoqn84*UJ=wNot!L zEdIWN`mcS7@B4JRE?eO`V5o220y#14BuSF{enT2#__wu&loG8q);+d7&#_dI|95ib z`bEM{ZNM(Xpo2=KVv;1mvMjKLZ*U+1uy zp^8IQ$fmE#i6L~zzZ8FZ~L8`RLwCUQU2NeGS zu+Y?}+8lMQ8c4tG@$Up-B&YknP50d?vl4Y?&ZjEG!|!+5aW#TH1=Z~`^Vi^J0?V&u zwz>~X>u@K(0Z3RQ5Z(Q`~UxSbPTi_0tJI4F$iqmD(1O*j~=5% z5VY?FqFsbA5mGn`WsajWb8m|_!;DUEa1Q6Fo9nA#zn7(HgXTognwbdJ08mT-K`{V; zoaSNk=v=&(+ZkNOKQmdqYDa6QK_nIcz`Ab1;D%C~YA%ag_eQdelQ>!?8QJw$904#Q zqDTQCSRyvc0booDurqm*a6zBJv$0C0oMlO7GQ!3fV}Y8039Ai~)L089?6+g_M+{7J zxCA(Vxc7Ir!+wuydA(TL-LqY|UhAQ(C*R@QF5Inp61*>V;cnHF_|H5Ax8DH(oAd`qEm=>#00000NkvXXu0mjfASOj* literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/chinacraft/textures/blocks/peeled_bamboo_window_1.png b/src/main/resources/assets/chinacraft/textures/blocks/peeled_bamboo_window_1.png new file mode 100755 index 0000000000000000000000000000000000000000..f65eb84ace253d481bac2113a6ded092e5313e75 GIT binary patch literal 3984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ufuq0sqwcV_4IkQ*Pw{ZviLcL)`zIBgmIT`?rNT8EQiH=O8S)H#>;H zBpLgFbK*bSH74W!?D%T}edPEr35EP~DJENguF&^6`_GE%k8hAza5jJ=BTQ5QTtEM4 z`;mE4?=oIhO2CAEH3kK~km&KxDOYIsudc5D?h5Vx)%Ay`BaO_)VWzVE(hTt$-^C|4 z7<=%*LBfHT_G{CxYFjdgL~$`AgR7S{J}1#SQ$D|T{MOO+PmYj|DaXk&L5>9zRh(=E z4;|on2RVJ<`MJQ;%iw=({J5h3abRdTK@unpzP11tUqn!W02h=7Ut55SFCwTwfD1~4 zuPwmE7ZFq-zy+nj*B0R7iwG(Z;DXZNYYTAkMFbTHa6xJCwFS8NB7zD8xS%xn+5%jB z5kUn4Tu>T(Z2>O6h@b)iE+`GYwg4AjL{NbM7nBBHTY!r%BB(%s3rd5pEx^SW5mX?+ z1*O5)7U1HG2r3ZZg3{n?3vls81QiHyL22-{1-SSkf(it$VGVg1&1nGd(pPYlfTj5cvkViDJ^u&sj4BEM literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/chinacraft/textures/models/armor/_cassock.png b/src/main/resources/assets/chinacraft/textures/models/armor/_cassock.png new file mode 100644 index 0000000000000000000000000000000000000000..4e7727719d9348ceef8e7b36ddb7649d118803b0 GIT binary patch literal 19684 zcmV*KKxMy)P)pPO=&|zP*7-ZbZ>KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JR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nTcS#qAlJNMw=;Lu1)ncxy8b8fj~Mf<3Qa);bCF-LE6Bc61@91efAq>RYa<~dhw zB~^Omh`&R2xv^?u5u;$7_9u->leq&chrr!BHPey#^kr3qTv#@i>)dDyPK`oZSkSK7 zq^~Apn!kh#fu4hwq*{d2m;33w?E!&aIHhji+=pdprKV}t-;nRpDwf!D531z1ljzAc z>W3RB$}B$hu%IU%Z?a^p7gk@rW~2p%Ui&9H@RYVI3;w)JKXdeEw_%FwPvnh6Cv*50 zrDzG(6Ks-Nux7kNAZO&w$o12OS;b=$iAt8`f0u0G@EU|#<>+BcK?c2ZgAaUFlhnsP zbM(iI>s(59?AL->UvVKov@R}CnUSVxVm@g2TuQ+EE_Ejy?QP;h$m?TRFgrcn^h33I zT8MVYqQI3=wt!I&J(nv<)4HK1Nedw#kO`AGT>OJNFWdD99ZW4k!FZ{aIg>?;_m>LZ zjXk5sm!y>@d90l1IxABjTSZu0=y+NE`Lq93JqSGG3IdluyT6$lw!K@op)ik?raEXD zzWf18!k>^R-+f8#Z(wm%gu64MS9&t=+s;8g@=PmRkrRPP4-ZKtC8Z)lfUA-zD`)B_H-MZ)d literal 0 HcmV?d00001 diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index a43f1b8..1beb217 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "chinacraft", "name": "ChinaCraft", "description": "A mod with Chinese features.", - "version": "Beta 0.4.203", + "version": "Beta 0.4.205", "mcversion": "1.7.10", "url": "http://mccraft.cn/project/chinacraft", "updateUrl": "", From 2a6d8a6a6e548968492c00fd163c8ecae4aa71b9 Mon Sep 17 00:00:00 2001 From: Trychen Date: Fri, 12 May 2017 19:01:10 +0800 Subject: [PATCH 22/36] Fixed Language --- src/main/resources/assets/chinacraft/lang/en_US.lang | 1 + src/main/resources/assets/chinacraft/lang/zh_CN.lang | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/resources/assets/chinacraft/lang/en_US.lang b/src/main/resources/assets/chinacraft/lang/en_US.lang index fb45e63..b170ce7 100644 --- a/src/main/resources/assets/chinacraft/lang/en_US.lang +++ b/src/main/resources/assets/chinacraft/lang/en_US.lang @@ -149,6 +149,7 @@ item.bucket_salt.name=Bucket of Salt item.salt_powder.name=Salt item.doujiang_bucket.name=Bucket of Soybean Milk item.rices.name=Rices +tile.rice.name=Rice item.lcker.name=Rice Ear item.soy.name=Soy item.soy_pod.name=Pod diff --git a/src/main/resources/assets/chinacraft/lang/zh_CN.lang b/src/main/resources/assets/chinacraft/lang/zh_CN.lang index 2c4ea96..39e2fc8 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_CN.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_CN.lang @@ -148,6 +148,7 @@ item.bucket_salt.name=盐桶 item.salt_powder.name=盐 item.doujiang_bucket.name=豆浆桶 item.rices.name=大米 +tile.rice.name=大米 item.lcker.name=米穗 item.soy.name=大豆 tile.soy.name=大豆 From 63856c971800ca8c188ee096f1447ce1dd835844 Mon Sep 17 00:00:00 2001 From: Trychen Date: Fri, 12 May 2017 19:01:57 +0800 Subject: [PATCH 23/36] Fixed Night Clothes --- .../event/combat/ListenerArmor.java | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java index eba4b64..d2c7793 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java @@ -6,6 +6,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.client.gui.GuiChat; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; @@ -14,6 +15,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; +import net.minecraftforge.client.event.RenderHandEvent; import net.minecraftforge.client.event.RenderPlayerEvent; import net.minecraftforge.event.entity.living.LivingEvent; @@ -52,12 +54,25 @@ public void wearingNightClothes(TickEvent.PlayerTickEvent event) { } + @SideOnly(Side.CLIENT) + private static Minecraft mc = Minecraft.getMinecraft(); + @SideOnly(Side.CLIENT) @SubscribeEvent public void preRenderPlayer(RenderPlayerEvent.Pre event) { - if (event.entityPlayer.isSneaking()) { - if (event.entityPlayer.worldObj.getWorldTime() < 13500 || event.entityPlayer.worldObj.getWorldTime() > 22300) return; - if (!ChinaCraftApi.isWearingWholeNightClothes(event.entityPlayer)) return; + if (mc.thePlayer.isSneaking()) { + if (mc.thePlayer.worldObj.getWorldTime() < 13500 || mc.thePlayer.worldObj.getWorldTime() > 22300) return; + if (!ChinaCraftApi.isWearingWholeNightClothes(mc.thePlayer)) return; + event.setCanceled(true); + } + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void preRenderPlayer(RenderHandEvent event) { + if (mc.thePlayer.isSneaking()) { + if (mc.thePlayer.worldObj.getWorldTime() < 13500 || mc.thePlayer.worldObj.getWorldTime() > 22300) return; + if (!ChinaCraftApi.isWearingWholeNightClothes(mc.thePlayer)) return; event.setCanceled(true); } } From 76b95abdca76655d77437306d64bb7ea24efe518 Mon Sep 17 00:00:00 2001 From: Trychen Date: Sun, 14 May 2017 11:22:54 +0800 Subject: [PATCH 24/36] New @CorpPlant system to use CCCropPlantItem --- .../chinacraft/block/CCGrowablePlant.java | 4 ++-- .../chinacraft/common/ChinaCraft.java | 18 +++++++------- .../chinacraft/item/CCCropPlantItem.java | 14 +++++++++++ .../util/annotation/ItemBlockRegister.java | 24 +++++++++++++++++++ .../util/annotation/register/CorpPlant.java | 13 ++++++++++ src/main/resources/mcmod.info | 2 +- 6 files changed, 64 insertions(+), 11 deletions(-) create mode 100644 src/main/java/unstudio/chinacraft/util/annotation/register/CorpPlant.java diff --git a/src/main/java/unstudio/chinacraft/block/CCGrowablePlant.java b/src/main/java/unstudio/chinacraft/block/CCGrowablePlant.java index 4fd6587..086d49e 100644 --- a/src/main/java/unstudio/chinacraft/block/CCGrowablePlant.java +++ b/src/main/java/unstudio/chinacraft/block/CCGrowablePlant.java @@ -80,12 +80,12 @@ protected Item func_149866_i() { @Override protected Item func_149865_P() { - return dropItem; + return baseItem; } @Override public Item getItemDropped(int par1, Random par2Random, int par3) { - return par1 >= 5 ? baseItem : null; + return par1 == 7 ? dropItem : baseItem; } @Override diff --git a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java index 06df4ff..e7fb857 100644 --- a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java +++ b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java @@ -42,6 +42,7 @@ import unstudio.chinacraft.item.combat.*; import unstudio.chinacraft.item.jade.Jade; import unstudio.chinacraft.item.jade.JadePinkSystem; +import unstudio.chinacraft.util.annotation.register.CorpPlant; import unstudio.chinacraft.util.remote.Network; import unstudio.chinacraft.util.remote.MinecraftModVersionChecker; import unstudio.chinacraft.util.remote.VersionChecker; @@ -275,24 +276,25 @@ public Item getTabIconItem() { @Register("SericultureFrame") public static final BlockSericultureFrame sericultureFrame = new BlockSericultureFrame(); // 养蚕架 - - @Register("RiceGrow") - public static final CCGrowablePlant riceGrow = new CCGrowablePlant("rice", 5, ChinaCraft.rices, ChinaCraft.lcker); // 水稻作物 @Register("Rices") - public static final CCCropPlantItem rices = (CCCropPlantItem) new CCCropPlantItem(ChinaCraft.riceGrow) - .setUnlocalizedName("rices"); // 米 + @CorpPlant("riceGrow") + public static final CCCropPlantItem rices = (CCCropPlantItem) new CCCropPlantItem().setUnlocalizedName("rices"); // 米 @Register("Lckers") public static final Item lcker = new Item().setUnlocalizedName("lcker").setCreativeTab(ChinaCraft.tabFarming); // 米穗 + @Register("RiceGrow") + public static final CCGrowablePlant riceGrow = new CCGrowablePlant("rice", 5, ChinaCraft.rices, ChinaCraft.lcker); // 水稻作物 @Register("SoyPod") public static final Item soyPod = new Item().setUnlocalizedName("soy_pod").setCreativeTab(ChinaCraft.tabFarming); // 大豆荚 @Register("SoyGrow") public static final CCGrowablePlant soyGrow = new CCGrowablePlant("soy", 5, ChinaCraft.soyPod, ChinaCraft.soyPod); // 大豆作物 @Register("Soy") - public static final CCCropPlantItem soy = (CCCropPlantItem) new CCCropPlantItem(ChinaCraft.soyGrow).setUnlocalizedName("soy"); // 大豆 + @CorpPlant("soyGrow") + public static final CCCropPlantItem soy = (CCCropPlantItem) new CCCropPlantItem().setUnlocalizedName("soy"); // 大豆 + @Register("GlutinousRice") + @CorpPlant("blockGlutinousRice") + public static final CCCropPlantItem glutinousRice = (CCCropPlantItem) new CCCropPlantItem().setUnlocalizedName("glutinous_rice"); // 糯米 @Register("BlockGlutinousRice") public static final CCGrowablePlant blockGlutinousRice = new CCGrowablePlant("glutinous_rice", 7, ChinaCraft.glutinousRice, ChinaCraft.glutinousRice);// 糯米作物 - @Register("GlutinousRice") - public static final CCCropPlantItem glutinousRice = (CCCropPlantItem) new CCCropPlantItem(ChinaCraft.blockGlutinousRice).setUnlocalizedName("glutinous_rice"); // 糯米 @Register("ItemBamboo") public static final Item itemBamboo = new ItemBase().setTextureName("chinacraft:bamboo").setCreativeTab(ChinaCraft.tabFarming).setUnlocalizedName("bamboo"); // 竹子 @Register("ItemMulberryLeaf") diff --git a/src/main/java/unstudio/chinacraft/item/CCCropPlantItem.java b/src/main/java/unstudio/chinacraft/item/CCCropPlantItem.java index c853458..5da4f95 100644 --- a/src/main/java/unstudio/chinacraft/item/CCCropPlantItem.java +++ b/src/main/java/unstudio/chinacraft/item/CCCropPlantItem.java @@ -16,6 +16,16 @@ public class CCCropPlantItem extends Item implements IPlantable { private Block bb; + public CCCropPlantItem() { + this.setCreativeTab(ChinaCraft.tabFarming); + } + + /** + * this constructor is no safe, the block may no init. so it may crash because bb is null. + * safe method is use {@link unstudio.chinacraft.util.annotation.register.CorpPlant} + * @param b + */ + @Deprecated public CCCropPlantItem(Block b) { this.setCreativeTab(ChinaCraft.tabFarming); this.bb = b; @@ -56,4 +66,8 @@ public int getPlantMetadata(IBlockAccess world, int x, int y, int z) { return 0; } + public CCCropPlantItem setPlantBlock(Block bb) { + this.bb = bb; + return this; + } } diff --git a/src/main/java/unstudio/chinacraft/util/annotation/ItemBlockRegister.java b/src/main/java/unstudio/chinacraft/util/annotation/ItemBlockRegister.java index f380747..d39c386 100644 --- a/src/main/java/unstudio/chinacraft/util/annotation/ItemBlockRegister.java +++ b/src/main/java/unstudio/chinacraft/util/annotation/ItemBlockRegister.java @@ -2,12 +2,15 @@ import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; +import net.minecraft.block.BlockCrops; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraftforge.oredict.OreDictionary; import unstudio.chinacraft.common.ChinaCraft; import unstudio.chinacraft.common.Recipes; +import unstudio.chinacraft.item.CCCropPlantItem; import unstudio.chinacraft.item.ItemCCSlab; +import unstudio.chinacraft.util.annotation.register.CorpPlant; import unstudio.chinacraft.util.annotation.register.ICollection; import unstudio.chinacraft.util.annotation.register.Register; import unstudio.chinacraft.util.annotation.register.SlabRegister; @@ -88,6 +91,27 @@ public static void register(Class c) { } if (ore != null&&!ore.isEmpty()) OreDictionary.registerOre(ore, (Block) o); } else if (o instanceof Item) { + + if (f.isAnnotationPresent(CorpPlant.class)){ + if (o instanceof CCCropPlantItem) { + CorpPlant ann = f.getAnnotation(CorpPlant.class); + try { + Object obj = c.getField(ann.value()).get(null); + if (obj instanceof Block) { + ((CCCropPlantItem) o).setPlantBlock((Block) obj); + } else { + new IllegalArgumentException(f.getName() + "'s @CorpPlant.value() refers to an none-block field").printStackTrace(); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } else { + new IllegalArgumentException(f.getName() + " is not a CCCropPlantItem").printStackTrace(); + } + } + //以物品的形式注册 GameRegistry.registerItem((Item) o, name); if (ore != null&&!ore.isEmpty()) OreDictionary.registerOre(ore, (Item) o); diff --git a/src/main/java/unstudio/chinacraft/util/annotation/register/CorpPlant.java b/src/main/java/unstudio/chinacraft/util/annotation/register/CorpPlant.java new file mode 100644 index 0000000..5df68cd --- /dev/null +++ b/src/main/java/unstudio/chinacraft/util/annotation/register/CorpPlant.java @@ -0,0 +1,13 @@ +package unstudio.chinacraft.util.annotation.register; + +import java.lang.annotation.*; + +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface CorpPlant { + /** + * BlockCrops的名字,要求在同一个类中,且public static + */ + String value(); +} diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 1beb217..fcfa6a5 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -7,7 +7,7 @@ "mcversion": "1.7.10", "url": "http://mccraft.cn/project/chinacraft", "updateUrl": "", - "authorList": ["Mouse","Trychen","Huangshize","Mcdarc","Lasm_Gratel"], + "authorList": ["Mouse","Trychen","Huangshize","Mcdarc","Lasm_Gratel", "and so on, more see url.(no order)"], "logoFile": "assets/chinacraft/logo.png", "screenshots": [], "dependencies": [] From 58c3c6c23d649b53104e5f6224884214f24c0708 Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sat, 27 May 2017 23:52:48 +0800 Subject: [PATCH 25/36] Fixed some recipes --- src/main/java/unstudio/chinacraft/common/Recipes.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index a7d5424..538463d 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -180,12 +180,12 @@ public static void init() { new Object[]{"###", "###", " ", '#', ChinaCraft.itemBamboo}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooFenceGate, 1), new Object[]{"#$#", "#$#", " ", '#', ChinaCraft.itemBamboo, '$', ChinaCraft.bambooPlank}); - GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooPlank, 9), + GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.peeledBambooPlank, 8), "###", "#K#", "###", '#', ChinaCraft.bambooPlank, - 'K', ChinaCraft.artKnife); + 'K', ChinaCraft.artKnife)); // mulberry GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.mulberryWood, 4), @@ -199,7 +199,7 @@ public static void init() { GameRegistry.addRecipe(new ItemStack(ChinaCraft.sericultureFrame, 1), new Object[]{"@#@", "@#@", "@#@", '#', Item.getItemFromBlock(Blocks.wooden_slab), '@', Items.stick}); GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.silkYarn, 4), ChinaCraft.silkwormChrysalis); - GameRegistry.addRecipe(new ItemStack(ChinaCraft.itemSilk, 1, 15), + GameRegistry.addRecipe(new ItemStack(ChinaCraft.itemSilk, 1, 0), new Object[]{"@@ ", "@@ ", " ", '@', ChinaCraft.silkYarn}); for (int i = 0; i < 16; ++i) GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.itemSilk, 1, BlockColored.func_150031_c(i)), new Object[]{new ItemStack(Items.dye, 1, i), new ItemStack(ChinaCraft.itemSilk, 1, 0)}); From d20752eb0ec774b81ab006aa5c17888208063873 Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sun, 28 May 2017 00:44:27 +0800 Subject: [PATCH 26/36] Removed CCShapedIgnoreDamageRecipe --- .../unstudio/chinacraft/common/Recipes.java | 46 ++-- .../recipes/CCShapedIgnoreDamageRecipe.java | 205 ------------------ 2 files changed, 23 insertions(+), 228 deletions(-) delete mode 100644 src/main/java/unstudio/chinacraft/recipes/CCShapedIgnoreDamageRecipe.java diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 538463d..20b33ff 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -5,10 +5,10 @@ import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; -import unstudio.chinacraft.recipes.CCShapedIgnoreDamageRecipe; import unstudio.chinacraft.recipes.JadeBenchRecipes; import unstudio.chinacraft.recipes.BuhrimillRecipe; @@ -133,38 +133,38 @@ public static void init() { ); // 木窗格 - GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindowdragon, 1), - new Object[]{"HHH", "B#A", "HHH", 'H', Item.getItemFromBlock(Blocks.log), '#', ChinaCraft.artKnife, - 'A', ChinaCraft.woodenWindow4, 'B', ChinaCraft.woodenWindow2})); - GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindowfu, 1), - new Object[]{"HHH", "B#B", "HHH", 'H', Item.getItemFromBlock(Blocks.log), '#', ChinaCraft.artKnife, 'B', ChinaCraft.woodenWindow2})); - GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindow4, 4), - new Object[]{" # ", "#A#", " # ", 'A', ChinaCraft.artKnife, '#', Items.stick})); - GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindow3, 4), new Object[]{"B#B", "#A#", "B#B", 'A', - ChinaCraft.artKnife, '#', Items.stick, 'B', Item.getItemFromBlock(Blocks.log)})); - GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindow2, 4), - new Object[]{"###", "#A#", "###", 'A', ChinaCraft.artKnife, '#', Items.stick})); - GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.woodenWindow1, 4), new Object[]{" A ", "A#A", " A ", 'A', - Item.getItemFromBlock(Blocks.planks), '#', ChinaCraft.artKnife})); - - GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.peeledBambooWindow1, 1), + GameRegistry.addRecipe(new ItemStack(ChinaCraft.woodenWindowdragon, 1), + "HHH", "B#A", "HHH", 'H', Item.getItemFromBlock(Blocks.log), '#', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE), + 'A', ChinaCraft.woodenWindow4, 'B', ChinaCraft.woodenWindow2); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.woodenWindowfu, 1), + "HHH", "B#B", "HHH", 'H', Item.getItemFromBlock(Blocks.log), '#',new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE), 'B', ChinaCraft.woodenWindow2); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.woodenWindow4, 4), + " # ", "#A#", " # ", 'A', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE), '#', Items.stick); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.woodenWindow3, 4), "B#B", "#A#", "B#B", 'A', + ChinaCraft.artKnife, '#', Items.stick, 'B', Item.getItemFromBlock(Blocks.log)); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.woodenWindow2, 4), + new Object[]{"###", "#A#", "###", 'A', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE), '#', Items.stick}); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.woodenWindow1, 4), " A ", "A#A", " A ", 'A', + Item.getItemFromBlock(Blocks.planks), '#', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE)); + + GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooWindow1, 1), "HHH", " # ", "HHH", 'H', ChinaCraft.peeledBambooPlank, - '#', ChinaCraft.artKnife)); - GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.peeledBambooWindow2, 1), + '#', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE)); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooWindow2, 1), "HHH", "H#H", "HHH", 'H', ChinaCraft.peeledBambooPlank, - '#', ChinaCraft.artKnife)); - GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.peeledBambooWindow3, 1), + '#', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE)); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooWindow3, 1), " H ", "H#H", " H ", 'H', ChinaCraft.peeledBambooPlank, - '#', ChinaCraft.artKnife)); + '#', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE)); GameRegistry.addRecipe(new ItemStack(ChinaCraft.lanternScaldfish, 1, 2), "WYW", "WTW", "WYW", 'W', new ItemStack(Blocks.wool, 1, 14), 'Y', new ItemStack(Blocks.wool, 1, 4), 'T', Blocks.torch); GameRegistry.addRecipe(new ItemStack(ChinaCraft.itemDing), " J ", "MOM", "MCM", 'C', Blocks.coal_block, 'J', ChinaCraft.jadeKnife, 'O', Blocks.obsidian, 'M', Blocks.mossy_cobblestone); @@ -180,12 +180,12 @@ public static void init() { new Object[]{"###", "###", " ", '#', ChinaCraft.itemBamboo}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooFenceGate, 1), new Object[]{"#$#", "#$#", " ", '#', ChinaCraft.itemBamboo, '$', ChinaCraft.bambooPlank}); - GameRegistry.addRecipe(CCShapedIgnoreDamageRecipe.createRecipe(new ItemStack(ChinaCraft.peeledBambooPlank, 8), + GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooPlank, 8), "###", "#K#", "###", '#', ChinaCraft.bambooPlank, - 'K', ChinaCraft.artKnife)); + 'K', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE)); // mulberry GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.mulberryWood, 4), diff --git a/src/main/java/unstudio/chinacraft/recipes/CCShapedIgnoreDamageRecipe.java b/src/main/java/unstudio/chinacraft/recipes/CCShapedIgnoreDamageRecipe.java deleted file mode 100644 index fa86b33..0000000 --- a/src/main/java/unstudio/chinacraft/recipes/CCShapedIgnoreDamageRecipe.java +++ /dev/null @@ -1,205 +0,0 @@ -package unstudio.chinacraft.recipes; - -import net.minecraft.block.Block; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.ShapedRecipes; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import java.util.HashMap; - -/** - * Created by AAA on 2016/2/15. - */ -public class CCShapedIgnoreDamageRecipe extends ShapedRecipes { - private boolean field_92101_f; - - public CCShapedIgnoreDamageRecipe(int p_i1917_1_, int p_i1917_2_, ItemStack[] p_i1917_3_, ItemStack p_i1917_4_) - { - super(p_i1917_1_, p_i1917_2_, p_i1917_3_, p_i1917_4_); - } - /** - * Used to check if a recipe matches current crafting inventory - */ - public boolean matches(InventoryCrafting p_77569_1_, World p_77569_2_) - { - for (int i = 0; i <= 3 - this.recipeWidth; ++i) - { - for (int j = 0; j <= 3 - this.recipeHeight; ++j) - { - if (this.checkMatch(p_77569_1_, i, j, true)) - { - return true; - } - - if (this.checkMatch(p_77569_1_, i, j, false)) - { - return true; - } - } - } - return false; - } - - /** - * Checks if the region of a crafting inventory is match for the recipe. - */ - - private boolean checkMatch(InventoryCrafting p_77573_1_, int p_77573_2_, int p_77573_3_, boolean p_77573_4_) - { - for (int k = 0; k < 3; ++k) - { - for (int l = 0; l < 3; ++l) - { - int i1 = k - p_77573_2_; - int j1 = l - p_77573_3_; - ItemStack itemstack = null; - - if (i1 >= 0 && j1 >= 0 && i1 < this.recipeWidth && j1 < this.recipeHeight) - { - if (p_77573_4_) - { - itemstack = this.recipeItems[this.recipeWidth - i1 - 1 + j1 * this.recipeWidth]; - } - else - { - itemstack = this.recipeItems[i1 + j1 * this.recipeWidth]; - } - } - - ItemStack itemstack1 = p_77573_1_.getStackInRowAndColumn(k, l); - - if (itemstack1 != null || itemstack != null) - { - if (itemstack1 == null && itemstack != null || itemstack1 != null && itemstack == null) - { - return false; - } - - if (itemstack.getItem() != itemstack1.getItem()) - { - return false; - } - - //if (itemstack.getItemDamage() != 32767 && itemstack.getItemDamage() != itemstack1.getItemDamage()){return false;} - //去掉了关于物品损害值的判断以方便损害物品合成 - } - } - } - - return true; - } - - /** - * Returns an Item that is the result of this recipe - */ - public ItemStack getCraftingResult(InventoryCrafting p_77572_1_) - { - ItemStack itemstack = this.getRecipeOutput().copy(); - - if (this.field_92101_f) - { - for (int i = 0; i < p_77572_1_.getSizeInventory(); ++i) - { - ItemStack itemstack1 = p_77572_1_.getStackInSlot(i); - - if (itemstack1 != null && itemstack1.hasTagCompound()) - { - itemstack.setTagCompound((NBTTagCompound)itemstack1.stackTagCompound.copy()); - } - } - } - - return itemstack; - } - - /** - * Returns the size of the recipe area - */ - public int getRecipeSize() - { - return this.recipeWidth * this.recipeHeight; - } - - public CCShapedIgnoreDamageRecipe func_92100_c() - { - this.field_92101_f = true; - return this; - } - - public static CCShapedIgnoreDamageRecipe createRecipe(ItemStack p_92103_1_, Object ... p_92103_2_) - { - StringBuilder sb = new StringBuilder(); - int i = 0; - int j = 0; - int k = 0; - - if (p_92103_2_[i] instanceof String[]) - { - String[] astring = (String[]) p_92103_2_[i++]; - - for (int l = 0; l < astring.length; ++l) - { - String s1 = astring[l]; - ++k; - j = s1.length(); - sb.append(s1); - } - } - else - { - while (p_92103_2_[i] instanceof String) - { - String s2 = (String)p_92103_2_[i++]; - ++k; - j = s2.length(); - sb.append(s2); - } - } - - HashMap hashmap; - - for (hashmap = new HashMap(); i < p_92103_2_.length; i += 2) - { - Character character = (Character)p_92103_2_[i]; - ItemStack itemstack1 = null; - - if (p_92103_2_[i + 1] instanceof Item) - { - itemstack1 = new ItemStack((Item)p_92103_2_[i + 1]); - } - else if (p_92103_2_[i + 1] instanceof Block) - { - itemstack1 = new ItemStack((Block)p_92103_2_[i + 1], 1, 32767); - } - else if (p_92103_2_[i + 1] instanceof ItemStack) - { - itemstack1 = (ItemStack)p_92103_2_[i + 1]; - } - - hashmap.put(character, itemstack1); - } - - ItemStack[] aitemstack = new ItemStack[j * k]; - - for (int i1 = 0; i1 < j * k; ++i1) - { - char c0 = sb.toString().charAt(i1); - - if (hashmap.containsKey(Character.valueOf(c0))) - { - aitemstack[i1] = ((ItemStack)hashmap.get(Character.valueOf(c0))).copy(); - } - else - { - aitemstack[i1] = null; - } - } - - CCShapedIgnoreDamageRecipe shapedrecipes = new CCShapedIgnoreDamageRecipe(j, k, aitemstack, p_92103_1_); - return shapedrecipes; - } -} From 9c8ccd0f2aefc11d8b961f42378fff03a28f2bdc Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sun, 28 May 2017 00:45:57 +0800 Subject: [PATCH 27/36] Fixed a bug --- src/main/java/unstudio/chinacraft/common/Recipes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 20b33ff..848abb0 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -141,7 +141,7 @@ public static void init() { GameRegistry.addRecipe(new ItemStack(ChinaCraft.woodenWindow4, 4), " # ", "#A#", " # ", 'A', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE), '#', Items.stick); GameRegistry.addRecipe(new ItemStack(ChinaCraft.woodenWindow3, 4), "B#B", "#A#", "B#B", 'A', - ChinaCraft.artKnife, '#', Items.stick, 'B', Item.getItemFromBlock(Blocks.log)); + new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE), '#', Items.stick, 'B', Item.getItemFromBlock(Blocks.log)); GameRegistry.addRecipe(new ItemStack(ChinaCraft.woodenWindow2, 4), new Object[]{"###", "#A#", "###", 'A', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE), '#', Items.stick}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.woodenWindow1, 4), " A ", "A#A", " A ", 'A', From 7dd9f64f1d8e117cbaccc79385f94b2771243746 Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sun, 28 May 2017 16:43:09 +0800 Subject: [PATCH 28/36] Changed ArtKnife damage --- src/main/java/unstudio/chinacraft/item/ItemArtKnife.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/unstudio/chinacraft/item/ItemArtKnife.java b/src/main/java/unstudio/chinacraft/item/ItemArtKnife.java index db3e0eb..dcf1814 100644 --- a/src/main/java/unstudio/chinacraft/item/ItemArtKnife.java +++ b/src/main/java/unstudio/chinacraft/item/ItemArtKnife.java @@ -13,7 +13,7 @@ public class ItemArtKnife extends Item { public ItemArtKnife() { setUnlocalizedName("art_knife"); setMaxStackSize(1); - setMaxDamage(6); + setMaxDamage(64); setHasSubtypes(false); setCreativeTab(ChinaCraft.tabTool); } From 76b144ac079657f0112637f4234256107f95aa5b Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Sun, 28 May 2017 16:43:28 +0800 Subject: [PATCH 29/36] Update peeled bamboo! --- .../chinacraft/common/ChinaCraft.java | 13 +++++++ .../unstudio/chinacraft/common/Recipes.java | 36 ++++++++++-------- .../textures/items/peeled_bamboo.png | Bin 0 -> 3336 bytes 3 files changed, 33 insertions(+), 16 deletions(-) create mode 100644 src/main/resources/assets/chinacraft/textures/items/peeled_bamboo.png diff --git a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java index e7fb857..a20926e 100644 --- a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java +++ b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java @@ -189,6 +189,17 @@ public Item getTabIconItem() { @Register("PeeledBambooPlank") public static final Block peeledBambooPlank = new BlockBase(Material.wood).setBlockTextureName("chinacraft:peeled_bamboo_plank").setBlockName("peeled_bamboo_plank") .setCreativeTab(ChinaCraft.tabCore).setStepSound(Block.soundTypeWood); // 竹板 + @SlabRegister(name = "PeeledBambooSlab",first = "peeledBambooSlab",second = "peeledBambooDoubleSlab") + public static final Block peeledBambooSlab = new BlockCCSlab(false,Material.wood).setHardness(2.0F).setResistance(5.0F).setBlockName("peeled_bamboo_slab").setStepSound(Block.soundTypeWood).setBlockTextureName("chinacraft:peeled_bamboo_plank").setCreativeTab(ChinaCraft.tabCore);//竹制半砖 + @SlabRegister(name = "PeeledBambooDoubleSlab",first = "peeledBambooSlab",second = "peeledBambooDoubleSlab") + public static final Block peeledBambooDoubleSlab = new BlockCCSlab(true,Material.wood).setBlockSlab(ChinaCraft.peeledBambooSlab).setHardness(2.0F).setResistance(5.0F).setBlockName("peeled_bamboo_slab").setStepSound(Block.soundTypeWood).setBlockTextureName("chinacraft:peeled_bamboo_plank");//竹制半砖 + @Register("PeeledBambooStair") + public static final Block peeledBambooStair = new BlockCCStair(ChinaCraft.peeledBambooPlank,0).setHardness(2.0F).setResistance(5.0F).setBlockName("peeled_bamboo_stair").setCreativeTab(ChinaCraft.tabCore);//竹制楼梯 + @Register("PeeledBambooFenceGate") + public static final Block peeledBambooFenceGate = new BlockCCFenceGate(peeledBambooPlank).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeWood).setBlockName("peeled_bamboo_fence_gate").setCreativeTab(ChinaCraft.tabCore);//竹制栅栏门 + @Register("PeeledBambooFence") + public static final Block peeledBambooFence = new BlockCCFence("chinacraft:peeled_bamboo_plank",Material.wood).setGate(peeledBambooFenceGate).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeWood).setBlockName("peeled_bamboo_fence").setCreativeTab(ChinaCraft.tabCore);//竹制栅栏 + @Register("PeedledBambooWindow1") public static final CCWindow peeledBambooWindow1 = new CCWindow("bamboo_window","chinacraft:peeled_bamboo_window_1", "chinacraft:peeled_bamboo_window_top"); @Register("PeedledBambooWindow2") @@ -297,6 +308,8 @@ public Item getTabIconItem() { public static final CCGrowablePlant blockGlutinousRice = new CCGrowablePlant("glutinous_rice", 7, ChinaCraft.glutinousRice, ChinaCraft.glutinousRice);// 糯米作物 @Register("ItemBamboo") public static final Item itemBamboo = new ItemBase().setTextureName("chinacraft:bamboo").setCreativeTab(ChinaCraft.tabFarming).setUnlocalizedName("bamboo"); // 竹子 + @Register("PeeledBamboo") + public static final Item peeledBamboo = new ItemBase().setTextureName("chinacraft:peeled_bamboo").setCreativeTab(ChinaCraft.tabFarming).setUnlocalizedName("peeled_bamboo"); // 竹子 @Register("ItemMulberryLeaf") public static final Item itemMulberryLeaf = new Item().setUnlocalizedName("mulberry_leaf").setCreativeTab(ChinaCraft.tabFarming); // 桑叶 @Register("BlackDogBlood") diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 848abb0..0ab8a5d 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -99,8 +99,6 @@ public static void init() { new Object[]{"## ", "## ", " ", '#', ChinaCraft.blockMarble}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.marbleSlab, 6), new Object[]{" ", " ", "###", '#', ChinaCraft.blockMarble}); - GameRegistry.addRecipe(new ItemStack(ChinaCraft.marbleStair, 4), - new Object[]{"# ", "## ", "###", '#', ChinaCraft.blockMarble}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.marbleStair, 4), new Object[]{" #", " ##", "###", '#', ChinaCraft.blockMarble}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.marbleWall), @@ -120,8 +118,6 @@ public static void init() { new Object[]{"## ", "## ", " ", '#', ChinaCraft.blackbrick}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.blackbrickSlab, 6), new Object[]{" ", " ", "###", '#', ChinaCraft.blackbrick}); - GameRegistry.addRecipe(new ItemStack(ChinaCraft.blackbrickStair, 4), - new Object[]{"# ", "## ", "###", '#', ChinaCraft.blackbrick}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.blackbrickStair, 4), new Object[]{" #", " ##", "###", '#', ChinaCraft.blackbrick}); GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.blackbrickMossyBlock), ChinaCraft.blackbrickBlock, Item.getItemFromBlock(Blocks.mossy_cobblestone)); @@ -151,41 +147,49 @@ public static void init() { "HHH", " # ", "HHH", - 'H', ChinaCraft.peeledBambooPlank, + 'H', ChinaCraft.peeledBamboo, '#', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE)); GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooWindow2, 1), "HHH", "H#H", "HHH", - 'H', ChinaCraft.peeledBambooPlank, + 'H', ChinaCraft.peeledBamboo, '#', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE)); GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooWindow3, 1), " H ", "H#H", " H ", - 'H', ChinaCraft.peeledBambooPlank, + 'H', ChinaCraft.peeledBamboo, '#', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE)); GameRegistry.addRecipe(new ItemStack(ChinaCraft.lanternScaldfish, 1, 2), "WYW", "WTW", "WYW", 'W', new ItemStack(Blocks.wool, 1, 14), 'Y', new ItemStack(Blocks.wool, 1, 4), 'T', Blocks.torch); GameRegistry.addRecipe(new ItemStack(ChinaCraft.itemDing), " J ", "MOM", "MCM", 'C', Blocks.coal_block, 'J', ChinaCraft.jadeKnife, 'O', Blocks.obsidian, 'M', Blocks.mossy_cobblestone); // 竹子 - GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.bambooPlank), ChinaCraft.itemBamboo, ChinaCraft.itemBamboo, ChinaCraft.itemBamboo, ChinaCraft.itemBamboo); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooPlank, 1), + "##", + "##", + '#', ChinaCraft.itemBamboo); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooSlab, 6), " ", " ", "###", '#', ChinaCraft.bambooPlank); - GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooStair, 4), - new Object[]{"# ", "## ", "###", '#', ChinaCraft.bambooPlank}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooStair, 4), new Object[]{" #", " ##", "###", '#', ChinaCraft.bambooPlank}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooFence, 2), new Object[]{"###", "###", " ", '#', ChinaCraft.itemBamboo}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bambooFenceGate, 1), new Object[]{"#$#", "#$#", " ", '#', ChinaCraft.itemBamboo, '$', ChinaCraft.bambooPlank}); - GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooPlank, 8), - "###", - "#K#", - "###", - '#', ChinaCraft.bambooPlank, - 'K', new ItemStack(ChinaCraft.artKnife,1, OreDictionary.WILDCARD_VALUE)); + + GameRegistry.addSmelting(ChinaCraft.itemBamboo,new ItemStack(ChinaCraft.peeledBamboo),0f); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooPlank, 1), + "##", + "##", + '#', ChinaCraft.peeledBamboo); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooSlab, 6), " ", " ", "###", '#', ChinaCraft.peeledBambooPlank); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooStair, 4), + new Object[]{" #", " ##", "###", '#', ChinaCraft.peeledBambooPlank}); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooFence, 2), + new Object[]{"###", "###", " ", '#', ChinaCraft.peeledBamboo}); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.peeledBambooFenceGate, 1), + new Object[]{"#$#", "#$#", " ", '#', ChinaCraft.peeledBamboo, '$', ChinaCraft.peeledBambooPlank}); // mulberry GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.mulberryWood, 4), diff --git a/src/main/resources/assets/chinacraft/textures/items/peeled_bamboo.png b/src/main/resources/assets/chinacraft/textures/items/peeled_bamboo.png new file mode 100644 index 0000000000000000000000000000000000000000..ae06a46f362b2679e0042034747c3c4b6c855411 GIT binary patch literal 3336 zcmV+j4fpbiP)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3b#wrIijHG|(J>BYjM-sajE6;FiC7vY#};Gd zST$CUHDeuEH+B^pz@B062qXfFfD`NpUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%gfYS= zB9o|3v?Y2H`NVi)In3rTB8+ej^> zQ=~r95NVuDChL%G$=>7$vVg20myx%S50Foi`^m%Pw-h?Xh~i8Mq9jtJloCocWk2Nv zrJpiFnV_ms&8eQ$2&#xW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u6e2R za__6DuR6yg#~-}Tc|Gx_{H@O0eebyMy5GmWADJlpK>kqk(fVV@r_fLLKIeS?{4e)} z^ZO;zpECde03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(`>RI+y?e7jKeZ#YO-C z0yRlQK~#9!q?1ce6LA#9fB%`G^g)@nKyA}np#iM&P=b#{LWyX^7&f?d;YaXu=)x5- z#>9;)j5`;`l?H`GMI$OmjX)Eq6iQnvj%O1O$NP0k`kAY}?xExTX%U~h{nswBe7!fmm{>`yd{!(L7dzzwlC_Ph z{QaqN7@4(-@*uu6t=LsRt)UC#vMIjIPGcyWg9j3<=IXt-?moJ4v&%kuG!Q};c0Ntr z!)o);-F=R?llPs!5iDzEDX5xi0F{zH9&W0RI-JMYNaiVK-s4um6YRt4^kE>g?+#wS zm@!m;cO@BHtBWnZ!D`MB@H%m-Dy5w&xnh}gQDt=Oijej8q(#eWmQHV=3^4mHVwh|J zV&5j^T7HH`$;PR(eaMnP(>BSLJq(Uq6DDsk;xLPOsYCTy&63#yuo7=F5}L$fWQw|K zl(t|GiX>CnPLfV%sK|bXM#2K1)gc}ODA&)2QvgpUo*S7|gwQb;ttWbMw1nAO`@mMU zOnue`ip;?9MX~QAr8cTYPp5|#-(|p{kcqOq@Diz^k929hQCTZ1<~kNnq4g<6+v-Fp{mOWk>w!Z9)j@D7`DbE z6tWwXG1Y`(l@0^m9U;)+6S7S;^0^H9cH+?BJ#KU~6r`>8fcs=)SK?pn{Br;$V$(^} SF^5k80000 Date: Mon, 29 May 2017 12:15:50 +0800 Subject: [PATCH 30/36] New Version & More Item & Fixed Bugs --- gradle.properties | 2 +- .../unstudio/chinacraft/api/EntityMethod.java | 2 +- .../chinacraft/common/ChinaCraft.java | 9 +- .../chinacraft/common/ClientProxy.java | 3 + .../chinacraft/common/network/KeyMessage.java | 2 + .../common/network/KeyMessageHandler.java | 28 ++++- .../entity/fx/EntitySweepAttackFX.java | 97 ++++++++++++++++++ .../chinacraft/entity/fx/FxHelper.java | 41 +++++++- .../chinacraft/event/ListenerRegister.java | 2 +- .../event/combat/ListenerArmor.java | 2 +- .../event/combat/ListenerSword.java | 84 ++++++++++++++- .../chinacraft/event/jade/ListenerJade.java | 2 +- .../item/combat/CCBuddhistMonksKnife.java | 44 ++++++++ .../chinacraft/item/combat/CCJointStaff.java | 37 +++++++ .../assets/chinacraft/lang/en_US.lang | 4 + .../assets/chinacraft/lang/zh_CN.lang | 5 + .../assets/chinacraft/lang/zh_TW.lang | 4 + .../chinacraft/textures/entity/sweep.png | Bin 0 -> 1009 bytes .../textures/items/buddhist_monks_knife.png | Bin .../items/crash_buddhist_monks_knife.png | Bin .../chinacraft/textures/items/joint_staff.png | Bin src/main/resources/mcmod.info | 2 +- 22 files changed, 357 insertions(+), 13 deletions(-) create mode 100644 src/main/java/unstudio/chinacraft/entity/fx/EntitySweepAttackFX.java create mode 100644 src/main/java/unstudio/chinacraft/item/combat/CCBuddhistMonksKnife.java create mode 100644 src/main/java/unstudio/chinacraft/item/combat/CCJointStaff.java create mode 100644 src/main/resources/assets/chinacraft/textures/entity/sweep.png rename "src/main/resources/assets/chinacraft/textures/items/\346\210\222\345\210\200.png" => src/main/resources/assets/chinacraft/textures/items/buddhist_monks_knife.png (100%) rename "src/main/resources/assets/chinacraft/textures/items/\347\240\264\346\210\222\346\210\222\345\210\200.png" => src/main/resources/assets/chinacraft/textures/items/crash_buddhist_monks_knife.png (100%) rename "src/main/resources/assets/chinacraft/textures/items/\346\260\264\347\243\250\347\246\205\346\235\226.png" => src/main/resources/assets/chinacraft/textures/items/joint_staff.png (100%) diff --git a/gradle.properties b/gradle.properties index f1129fa..be0a373 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # Basic Properties mod_id = ChinaCraft -mod_version = 0.4.205 +mod_version = 0.4.206 mod_group = unstudio.chinacraft # Minecraft & Forge diff --git a/src/main/java/unstudio/chinacraft/api/EntityMethod.java b/src/main/java/unstudio/chinacraft/api/EntityMethod.java index 2dd6d05..8d57439 100644 --- a/src/main/java/unstudio/chinacraft/api/EntityMethod.java +++ b/src/main/java/unstudio/chinacraft/api/EntityMethod.java @@ -43,7 +43,7 @@ public static List findNearbyPlayers(Entity player, double x, double AxisAlignedBB.getBoundingBox(x - d0, y - d1, z - d0, x + d0, y + d1, z + d0)); } - public static List findNear(EntityPlayer player, Class find, double d0, double d1) { + public static List findNear(Entity player, Class find, double d0, double d1) { double x = player.posX; double y = player.posY; double z = player.posZ; diff --git a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java index e7fb857..8370332 100644 --- a/src/main/java/unstudio/chinacraft/common/ChinaCraft.java +++ b/src/main/java/unstudio/chinacraft/common/ChinaCraft.java @@ -59,7 +59,7 @@ public class ChinaCraft implements ICollection { public static final String MODID = "chinacraft"; public static final String NAME = "ChinaCraft"; - public static final String VERSION = "0.4.205"; + public static final String VERSION = "0.4.206"; public static final int PROJECT_ID = 1; public static SimpleNetworkWrapper Network; @@ -73,6 +73,7 @@ public class ChinaCraft implements ICollection { @SidedProxy(clientSide = "unstudio.chinacraft.common.ClientProxy", serverSide = "unstudio.chinacraft.common.CommonProxy") public static CommonProxy proxy; + @Instance("chinacraft") public static ChinaCraft instance; @@ -338,6 +339,12 @@ public Item getTabIconItem() { public static final CCItemJiuQuTang jiuquTang = new CCItemJiuQuTang();// 九曲镋 @Register("Mace") public static final CCItemMace mace = new CCItemMace(); + @Register("BuddhistMonksKnife") + public static final CCBuddhistMonksKnife buddhistMonksKnife = new CCBuddhistMonksKnife(Item.ToolMaterial.WOOD); + @Register("CrashBuddhistMonksKnife") + public static final CCBuddhistMonksKnife crashBuddhistMonksKnife = (CCBuddhistMonksKnife) new CCBuddhistMonksKnife(Item.ToolMaterial.IRON).setUnlocalizedName("crash_buddhist_monks_knife").setMaxDamage(450); + @Register("JointStaff") + public static final CCJointStaff jointStaff = new CCJointStaff(); // @Register("SuperBow") public static final ItemSuperBow superBow = new ItemSuperBow(); @Register("StoneHammer") diff --git a/src/main/java/unstudio/chinacraft/common/ClientProxy.java b/src/main/java/unstudio/chinacraft/common/ClientProxy.java index 03defc3..415abeb 100644 --- a/src/main/java/unstudio/chinacraft/common/ClientProxy.java +++ b/src/main/java/unstudio/chinacraft/common/ClientProxy.java @@ -62,6 +62,9 @@ public void init(FMLInitializationEvent event) { ChinaCraft.blGiantSword.setTextureName("chinacraft:blgiantsword"); ChinaCraft.jiuquTang.setTextureName("chinacraft:jiuqu_tang"); ChinaCraft.mace.setTextureName("chinacraft:mace"); + ChinaCraft.buddhistMonksKnife.setTextureName("chinacraft:buddhist_monks_knife"); + ChinaCraft.crashBuddhistMonksKnife.setTextureName("chinacraft:crash_buddhist_monks_knife"); + ChinaCraft.jointStaff.setTextureName("chinacraft:joint_staff"); ChinaCraft.tinIngot.setTextureName("chinacraft:tin_ingot"); ChinaCraft.silverIngot.setTextureName("chinacraft:silver_ingot"); ChinaCraft.rices.setTextureName("chinacraft:barley_rice"); diff --git a/src/main/java/unstudio/chinacraft/common/network/KeyMessage.java b/src/main/java/unstudio/chinacraft/common/network/KeyMessage.java index ae425b4..bd379c7 100644 --- a/src/main/java/unstudio/chinacraft/common/network/KeyMessage.java +++ b/src/main/java/unstudio/chinacraft/common/network/KeyMessage.java @@ -7,6 +7,8 @@ * Created by trychen on 16/7/28. */ public class KeyMessage implements IMessage{ + public static final int KEY_DOUBLE_JUMP = 0; + public static final int KEY_ATTACK = 1; public int key; public KeyMessage(int key) { diff --git a/src/main/java/unstudio/chinacraft/common/network/KeyMessageHandler.java b/src/main/java/unstudio/chinacraft/common/network/KeyMessageHandler.java index 3d19c7f..a6bf7e6 100644 --- a/src/main/java/unstudio/chinacraft/common/network/KeyMessageHandler.java +++ b/src/main/java/unstudio/chinacraft/common/network/KeyMessageHandler.java @@ -4,8 +4,16 @@ import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import cpw.mods.fml.relauncher.Side; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import unstudio.chinacraft.api.EntityMethod; +import unstudio.chinacraft.common.ChinaCraft; /** * Created by trychen on 16/7/28. @@ -15,7 +23,7 @@ public class KeyMessageHandler implements IMessageHandler public IMessage onMessage(KeyMessage message, MessageContext ctx) { EntityPlayer player = ctx.getServerHandler().playerEntity; switch(message.key){ - case 0: + case KeyMessage.KEY_DOUBLE_JUMP: NBTTagCompound tCompound = player.getEntityData(); if(tCompound.hasKey("chinacraft.nightClothesHasJumped")) { if (player.motionY < 0.4 && tCompound.getInteger("chinacraft.nightClothesHasJumped") < 2) { @@ -27,6 +35,24 @@ public IMessage onMessage(KeyMessage message, MessageContext ctx) { } } break; + case KeyMessage.KEY_ATTACK: + if (!player.canAttackWithItem() || player.isUsingItem() || player.isBlocking() || player.getHeldItem() == null || player.getHeldItem().getItem() != ChinaCraft.jointStaff) break; + DamageSource damageSource = DamageSource.causeMobDamage(player).setMagicDamage(); + int powerLevel = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, player.getHeldItem()); + int fireLevel = EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, player.getHeldItem()); + int unbreakingLevel = EnchantmentHelper.getEnchantmentLevel(Enchantment.unbreaking.effectId, player.getHeldItem()); + int damage = 1; + for (EntityLiving entityLiving : EntityMethod.findNear(player, EntityLiving.class, 2, 2)) { + if (player.equals(entityLiving)) continue; + if (!entityLiving.isImmuneToFire()) + entityLiving.setFire(3 * fireLevel); + entityLiving.attackEntityFrom(damageSource, 3 + 1.5f*powerLevel); + damage++; + } + if (unbreakingLevel <= 0 || player.worldObj.rand.nextInt(unbreakingLevel) == 0){ + player.getHeldItem().damageItem(damage ,player); + } + break; } return null; } diff --git a/src/main/java/unstudio/chinacraft/entity/fx/EntitySweepAttackFX.java b/src/main/java/unstudio/chinacraft/entity/fx/EntitySweepAttackFX.java new file mode 100644 index 0000000..09c8934 --- /dev/null +++ b/src/main/java/unstudio/chinacraft/entity/fx/EntitySweepAttackFX.java @@ -0,0 +1,97 @@ +package unstudio.chinacraft.entity.fx; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class EntitySweepAttackFX extends EntityFX +{ + private static final ResourceLocation SWEEP_TEXTURE = new ResourceLocation("chinacraft:textures/entity/sweep.png"); + private int life; + private int lifeTime; + /** The Rendering Engine. */ + private TextureManager theRenderEngine; + private float size; + + public EntitySweepAttackFX(TextureManager p_i1213_1_, World p_i1213_2_, double p_i1213_3_, double p_i1213_5_, double p_i1213_7_, double p_i1213_9_, double p_i1213_11_, double p_i1213_13_) + { + super(p_i1213_2_, p_i1213_3_, p_i1213_5_, p_i1213_7_, 0, 0, 0); + this.theRenderEngine = p_i1213_1_; + this.lifeTime = 4; + float f = this.rand.nextFloat() * 0.6F + 0.4F; + this.particleRed = f; + this.particleGreen = f; + this.particleBlue = f; + this.size = 1.0F - (float)p_i1213_9_ * 0.5F; + + } + + public void renderParticle(Tessellator p_70539_1_, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ) + { + int i = (int)(((float)this.life + partialTicks) * 3.0F / (float)this.lifeTime); + + if (i <= 7) + { + this.theRenderEngine.bindTexture(SWEEP_TEXTURE); + float f = (float)(i % 4) / 4.0F; + float f1 = f + 0.24975F; + float f2 = (float)(i / 2) / 2.0F; + float f3 = f2 + 0.4995F; + float f4 = 1.0F * this.size; + float f5 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)partialTicks - interpPosX); + float f6 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)partialTicks - interpPosY); + float f7 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)partialTicks - interpPosZ); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_LIGHTING); + RenderHelper.disableStandardItemLighting(); + p_70539_1_.startDrawingQuads(); + p_70539_1_.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, 1.0F); + p_70539_1_.setBrightness(240); + +// worldRendererIn.pos((double)(f5 - rotationX * f4 - rotationXY * f4), (double)(f - rotationZ * f4 * 0.5F), (double)(f1 - rotationYZ * f4 - rotationXZ * f4)).tex((double)f1, (double)f3).color(this.particleRed, this.particleGreen, this.particleBlue, 1.0F).lightmap(0, 240).normal(0.0F, 1.0F, 0.0F).endVertex(); +// worldRendererIn.pos((double)(f5 - rotationX * f4 + rotationXY * f4), (double)(f + rotationZ * f4 * 0.5F), (double)(f1 - rotationYZ * f4 + rotationXZ * f4)).tex((double)f1, (double)f2).color(this.particleRed, this.particleGreen, this.particleBlue, 1.0F).lightmap(0, 240).normal(0.0F, 1.0F, 0.0F).endVertex(); +// worldRendererIn.pos((double)(f5 + rotationX * f4 + rotationXY * f4), (double)(f + rotationZ * f4 * 0.5F), (double)(f1 + rotationYZ * f4 + rotationXZ * f4)).tex((double)f, (double)f2).color(this.particleRed, this.particleGreen, this.particleBlue, 1.0F).lightmap(0, 240).normal(0.0F, 1.0F, 0.0F).endVertex(); +// worldRendererIn.pos((double)(f5 + rotationX * f4 - rotationXY * f4), (double)(f - rotationZ * f4 * 0.5F), (double)(f1 + rotationYZ * f4 - rotationXZ * f4)).tex((double)f, (double)f3).color(this.particleRed, this.particleGreen, this.particleBlue, 1.0F).lightmap(0, 240).normal(0.0F, 1.0F, 0.0F).endVertex(); + p_70539_1_.addVertexWithUV((double)(f5 - rotationX * f4 - rotationXY * f4), (double)(f6 - rotationZ * f4 * 0.5f), (double)(f7 - rotationYZ * f4 - rotationXZ * f4), (double)f1, (double)f3); + p_70539_1_.addVertexWithUV((double)(f5 - rotationX * f4 + rotationXY * f4), (double)(f6 + rotationZ * f4 * 0.5f), (double)(f7 - rotationYZ * f4 + rotationXZ * f4), (double)f1, (double)f2); + p_70539_1_.addVertexWithUV((double)(f5 + rotationX * f4 + rotationXY * f4), (double)(f6 + rotationZ * f4 * 0.5f), (double)(f7 + rotationYZ * f4 + rotationXZ * f4), (double)f, (double)f2); + p_70539_1_.addVertexWithUV((double)(f5 + rotationX * f4 - rotationXY * f4), (double)(f6 - rotationZ * f4 * 0.5f), (double)(f7 + rotationYZ * f4 - rotationXZ * f4), (double)f, (double)f3); + p_70539_1_.draw(); + GL11.glPolygonOffset(0.0F, 0.0F); + GL11.glEnable(GL11.GL_LIGHTING); + } + } + + public int getBrightnessForRender(float p_70070_1_) + { + return 61680; + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + ++this.life; + + if (this.life == this.lifeTime) + { + this.setDead(); + } + } + + public int getFXLayer() + { + return 3; + } +} \ No newline at end of file diff --git a/src/main/java/unstudio/chinacraft/entity/fx/FxHelper.java b/src/main/java/unstudio/chinacraft/entity/fx/FxHelper.java index 71e713e..e5972c3 100644 --- a/src/main/java/unstudio/chinacraft/entity/fx/FxHelper.java +++ b/src/main/java/unstudio/chinacraft/entity/fx/FxHelper.java @@ -1,17 +1,24 @@ package unstudio.chinacraft.entity.fx; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.EntityFX; import net.minecraft.entity.Entity; +import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import net.minecraft.world.WorldServer; /** * Created by trychen on 15/11/18. */ +@SideOnly(Side.CLIENT) public class FxHelper { public static void spawnEffects(World worldObj, double xCoord, double yCoord, double zCoord) { spawnEffects("mobSpellAmbient", worldObj, xCoord, yCoord, zCoord); } - public static void spawnEffects(String type, Entity entity) { + public static void spawnEffectsOnHead(String type, Entity entity) { for (int i = 0; i < 5; i++) { double motionX = entity.worldObj.rand.nextGaussian() * 0.02D; double motionY = entity.worldObj.rand.nextGaussian() * 0.02D; @@ -19,6 +26,21 @@ public static void spawnEffects(String type, Entity entity) { entity.worldObj.spawnParticle(type, entity.posX, entity.posY + 1, entity.posZ, motionX,motionY,motionZ); } } + public static void spawnEffectsOnFoot(String type, Entity entity) { + for (int i = 0; i < 5; i++) { + double motionX = entity.worldObj.rand.nextGaussian() * 0.02D; + double motionY = entity.worldObj.rand.nextGaussian() * 0.02D; + double motionZ = entity.worldObj.rand.nextGaussian() * 0.02D; + entity.worldObj.spawnParticle(type, entity.posX, entity.posY - 1, entity.posZ, motionX,motionY,motionZ); + } + } + public static void spawnOneEffectsOnFoot(String type, Entity entity) { + double motionX = entity.worldObj.rand.nextGaussian() * 0.02D; + double motionY = entity.worldObj.rand.nextGaussian() * 0.02D; + double motionZ = entity.worldObj.rand.nextGaussian() * 0.02D; + entity.worldObj.spawnParticle(type, entity.posX, entity.posY - 2, entity.posZ, 0,0,0); +// entity.worldObj.spawnParticle(type, entity.posX, entity.posY - 2, entity.posZ, motionX,motionY,motionZ); + } public static void spawnEffects(String kind, World worldObj, double xCoord, double yCoord, double zCoord) { worldObj.spawnParticle(kind, xCoord + worldObj.rand.nextFloat(), yCoord + 1.1, @@ -33,4 +55,21 @@ public static void spawnEffects(String kind, World worldObj, double xCoord, doub zCoord + worldObj.rand.nextFloat(), 0, 0, 0); worldObj.spawnParticle(kind, xCoord + 0.5, yCoord + 1.1, zCoord + 0.5, 0, 0, 0); } + + public static void generateSweepAttackParticles(Entity entity) { + double d0 = (double)(-MathHelper.sin(entity.rotationYaw * 0.017453292F)); + double d1 = (double)MathHelper.cos(entity.rotationYaw * 0.017453292F); + + + EntityFX head = new EntitySweepAttackFX(Minecraft.getMinecraft().getTextureManager(), + entity.worldObj, + entity.posX + d0, + entity.posY - (double)entity.height * 0.3f, + entity.posZ + d1, + d0, + 0, + d1); + + Minecraft.getMinecraft().effectRenderer.addEffect(head); + } } diff --git a/src/main/java/unstudio/chinacraft/event/ListenerRegister.java b/src/main/java/unstudio/chinacraft/event/ListenerRegister.java index 15f03c5..164e45c 100644 --- a/src/main/java/unstudio/chinacraft/event/ListenerRegister.java +++ b/src/main/java/unstudio/chinacraft/event/ListenerRegister.java @@ -28,6 +28,6 @@ public static void registerListener(Object listener) { } public static List> getListeners(){ - return AnnotationClassGetter.getClasses("unstudio.chinacraft.event"); + return AnnotationClassGetter.getClasses("unstudio.chinacraft.event"); } } diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java index d2c7793..396a6ac 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerArmor.java @@ -89,7 +89,7 @@ public void key(InputEvent.KeyInputEvent event){ if (FMLClientHandler.instance().getClient().gameSettings.keyBindJump.getIsKeyPressed()) { //是否按下了跳跃键 if(FeatureConfig.enableDoubleJump) { if (player.motionY < 0.04 && player.isAirBorne) { - ChinaCraft.Network.sendToServer(new KeyMessage(0));//向服务器发送消息 + ChinaCraft.Network.sendToServer(new KeyMessage(KeyMessage.KEY_DOUBLE_JUMP));//向服务器发送消息 } } } diff --git a/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java b/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java index 3e2cde7..3730ace 100644 --- a/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java +++ b/src/main/java/unstudio/chinacraft/event/combat/ListenerSword.java @@ -1,23 +1,99 @@ package unstudio.chinacraft.event.combat; +import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import net.minecraft.entity.Entity; +import cpw.mods.fml.common.gameevent.InputEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiChat; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; import net.minecraftforge.event.entity.living.LivingHurtEvent; +import unstudio.chinacraft.api.EntityMethod; import unstudio.chinacraft.common.ChinaCraft; +import unstudio.chinacraft.common.network.KeyMessage; +import unstudio.chinacraft.entity.fx.FxHelper; /** * Created by trychen on 17/4/2. */ public class ListenerSword { @SubscribeEvent - public void mace(LivingHurtEvent event){ - if (event.source.isFireDamage() || event.source.isProjectile() || !(event.source.getSourceOfDamage() instanceof EntityPlayer) && !event.source.damageType.equals("player") || event.source.getSourceOfDamage() == null) return; + public void mace(LivingHurtEvent event) { + if (event.source.isFireDamage() || event.source.isProjectile() || !(event.source.getSourceOfDamage() instanceof EntityPlayer) && !event.source.damageType.equals("player") || event.source.getSourceOfDamage() == null) + return; EntityPlayer player = (EntityPlayer) event.source.getSourceOfDamage(); - if (player.onGround && player.getHeldItem() != null && player.getHeldItem().getItem() == ChinaCraft.mace && player.worldObj.rand.nextInt(3) == 0 ){ + if (player.onGround && player.getHeldItem() != null && player.getHeldItem().getItem() == ChinaCraft.mace && player.worldObj.rand.nextInt(3) == 0) { player.onCriticalHit(event.entity); event.ammount *= 2.5; player.getHeldItem().damageItem(2, player); } } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void key(InputEvent.MouseInputEvent event){ + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + if (FMLClientHandler.instance().isGUIOpen(GuiChat.class)) return; + if (player.getHeldItem() == null || player.getHeldItem().getItem() != ChinaCraft.jointStaff) return; + if (!player.canAttackWithItem() || player.isUsingItem() || player.isBlocking()) return; + + if (FMLClientHandler.instance().getClient().gameSettings.keyBindAttack.getIsKeyPressed()) { + ChinaCraft.Network.sendToServer(new KeyMessage(KeyMessage.KEY_ATTACK));//向服务器发送消息 + +// DamageSource damageSource = DamageSource.causeMobDamage(player).setMagicDamage(); +// for (EntityLiving entityLiving : EntityMethod.findNear(player, EntityLiving.class, 2, 2)) { +// if (player.equals(entityLiving)) continue; +// entityLiving.attackEntityFrom(damageSource, 3); +// } + + //Spawns a particle. Args particleName, x, y, z, velX, velY, velZ + FxHelper.generateSweepAttackParticles(player); +// player.worldObj.spawnParticle("explode"); + } + } + + @SubscribeEvent + public void monksKnife(LivingHurtEvent event) { + if (event.source.getSourceOfDamage() instanceof EntityLivingBase) { + EntityLivingBase source = (EntityLivingBase) event.source.getSourceOfDamage(); + if (source.getHeldItem() != null && (source.getHeldItem().getItem() == ChinaCraft.buddhistMonksKnife || source.getHeldItem().getItem() == ChinaCraft.crashBuddhistMonksKnife)) { + boolean isCrash = source.getHeldItem().getItem() == ChinaCraft.crashBuddhistMonksKnife; + int damaged = 0; + int maxDamage = 0; + int totalReduction = 0; + int countReduction = 0; + for (ItemStack itemStack : event.entityLiving.getLastActiveItems()) { + if (itemStack != null && itemStack.getItem() instanceof ItemArmor) { + int damage = source.worldObj.rand.nextInt(5); + itemStack.damageItem(damage, event.entityLiving); + damaged += itemStack.getItemDamage(); + maxDamage += itemStack.getMaxDamage(); + totalReduction += ((ItemArmor) itemStack.getItem()).getArmorMaterial().getDamageReductionAmount(((ItemArmor) itemStack.getItem()).armorType); + countReduction++; + } + } + if (maxDamage > 0) { + float rate = (float) (maxDamage - damaged) / (float) maxDamage; + event.ammount *= 1 + rate; + if (countReduction > 0) { + event.ammount -= totalReduction / (countReduction * 2); + } + if (isCrash) event.ammount *= 1.4; + } else { + if (isCrash) { + event.ammount = 5.0f; + } else { + event.ammount = 3.0f; + } + } + } else if (source.getHeldItem() != null && source.getHeldItem().getItem() == ChinaCraft.jointStaff && !event.source.isMagicDamage()) + event.setCanceled(true); + } + } } diff --git a/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java b/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java index 27f4a23..3f89a5f 100644 --- a/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java +++ b/src/main/java/unstudio/chinacraft/event/jade/ListenerJade.java @@ -71,7 +71,7 @@ public void hurtEvent(LivingHurtEvent event) { itemStack.damageItem(1, entityPlayer); if(!e.entity.worldObj.isRemote) { // e.entity.worldObj.spawnParticle("magicCrit", e.entity.worldObj, e.entity.posX - 0.5, e.entity.posY + 1, e.entity.posZ - 0.5); - FxHelper.spawnEffects("magicCrit", e.entity); + FxHelper.spawnEffectsOnHead("magicCrit", e.entity); } } } else if (itemStack.getItem() == ChinaCraft.jadePurpleItem) { diff --git a/src/main/java/unstudio/chinacraft/item/combat/CCBuddhistMonksKnife.java b/src/main/java/unstudio/chinacraft/item/combat/CCBuddhistMonksKnife.java new file mode 100644 index 0000000..b11a183 --- /dev/null +++ b/src/main/java/unstudio/chinacraft/item/combat/CCBuddhistMonksKnife.java @@ -0,0 +1,44 @@ +package unstudio.chinacraft.item.combat; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import unstudio.chinacraft.client.render.item.SpecialItemRender; +import unstudio.chinacraft.common.ChinaCraft; +import unstudio.chinacraft.util.ItemLoreHelper; +import unstudio.chinacraft.util.annotation.register.ISpecialEquippedRender; + +import java.util.List; + +/** + * Created by trychen on 17/5/28. + */ +public class CCBuddhistMonksKnife extends ItemSword implements ISpecialEquippedRender { + public CCBuddhistMonksKnife(ToolMaterial toolMaterial) { + super(toolMaterial); + setUnlocalizedName("buddhist_monks_knife"); + setMaxDamage(200); + setCreativeTab(ChinaCraft.tabTool); + } + + public int getDamage(){ + return (int) func_150931_i(); + } + + @Override + public void doRender() { + + } + + @Override + public SpecialItemRender.RenderType getSpecialRenderType() { + return SpecialItemRender.RenderType.huge; + } + + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { + ItemLoreHelper.shiftLoreWithStat(p_77624_3_,getUnlocalizedName()); + } +} \ No newline at end of file diff --git a/src/main/java/unstudio/chinacraft/item/combat/CCJointStaff.java b/src/main/java/unstudio/chinacraft/item/combat/CCJointStaff.java new file mode 100644 index 0000000..fde2ffa --- /dev/null +++ b/src/main/java/unstudio/chinacraft/item/combat/CCJointStaff.java @@ -0,0 +1,37 @@ +package unstudio.chinacraft.item.combat; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.world.World; +import unstudio.chinacraft.client.render.item.SpecialItemRender; +import unstudio.chinacraft.common.ChinaCraft; +import unstudio.chinacraft.util.annotation.register.ISpecialEquippedRender; + +/** + * Created by trychen on 17/5/28. + */ +public class CCJointStaff extends ItemSword implements ISpecialEquippedRender{ + public CCJointStaff() { + super(ToolMaterial.IRON); + setCreativeTab(ChinaCraft.tabTool); + setUnlocalizedName("joint_staff"); + } + + @Override + public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { + super.onPlayerStoppedUsing(p_77615_1_, p_77615_2_, p_77615_3_, p_77615_4_); + } + + + + @Override + public void doRender() { + + } + + @Override + public SpecialItemRender.RenderType getSpecialRenderType() { + return SpecialItemRender.RenderType.staff; + } +} diff --git a/src/main/resources/assets/chinacraft/lang/en_US.lang b/src/main/resources/assets/chinacraft/lang/en_US.lang index b170ce7..0dcdfa9 100644 --- a/src/main/resources/assets/chinacraft/lang/en_US.lang +++ b/src/main/resources/assets/chinacraft/lang/en_US.lang @@ -12,6 +12,10 @@ item.yanlung_giantknife.lore=Burn target upon being attacked item.jiuqu_tang.name=Jiu Qu Sword item.mace.name=Mace item.mace.lore=Chance to cause crit +item.buddhist_monks_knife.name=Buddhist Monk's Knife +item.buddhist_monks_knife.lore=Cause huge damage while attacking a thick armor +item.crash_buddhist_monks_knife.name=Strong Buddhist Monk's Knife +item.crash_buddhist_monks_knife.lore=Cause huge damage while attacking a thick armor item.super_bow.name=Powerful Bow item.bronze_axe.name=Bronze Axe item.bronze_pickaxe.name=Bronze Pickaxe diff --git a/src/main/resources/assets/chinacraft/lang/zh_CN.lang b/src/main/resources/assets/chinacraft/lang/zh_CN.lang index 39e2fc8..18cadbd 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_CN.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_CN.lang @@ -14,6 +14,11 @@ item.yanlung_giantknife.lore=被攻击的实体将会被燃烧 item.jiuqu_tang.name=九曲镋 item.mace.name=狼牙棒 item.mace.lore=有很大的几率会造成暴击 +item.buddhist_monks_knife.name=戒刀 +item.buddhist_monks_knife.lore=面对越厚重的盔甲,攻击力越高 +item.crash_buddhist_monks_knife.name=破戒戒刀 +item.crash_buddhist_monks_knife.lore=面对越厚重的盔甲,攻击力越高 +item.joint_staff.item=水磨禅杖 item.super_bow.name=强力弓 item.bronze_axe.name=青铜斧 item.bronze_pickaxe.name=青铜稿 diff --git a/src/main/resources/assets/chinacraft/lang/zh_TW.lang b/src/main/resources/assets/chinacraft/lang/zh_TW.lang index 9afa699..ed16ab2 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_TW.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_TW.lang @@ -14,6 +14,10 @@ item.yanlung_giantknife.lore=被攻擊的實體將會被燃燒 item.jiuqu_tang.name=九曲钂 item.mace.name=狼牙棒 item.mace.lore=有很大的幾率會造成暴擊 +item.buddhist_monks_knife.name=戒刀 +item.buddhist_monks_knife.lore=面對越厚重的盔甲,攻擊力越高 +item.crash_buddhist_monks_knife.name=破戒戒刀 +item.crash_buddhist_monks_knife.lore=面對越厚重的盔甲,攻擊力越高 item.super_bow.name=强力弓 item.bronze_axe.name=青銅斧 item.bronze_pickaxe.name=青銅稿 diff --git a/src/main/resources/assets/chinacraft/textures/entity/sweep.png b/src/main/resources/assets/chinacraft/textures/entity/sweep.png new file mode 100644 index 0000000000000000000000000000000000000000..7ab002d69353bbfc2e08da80735eaa6d2432a976 GIT binary patch literal 1009 zcmeAS@N?(olHy`uVBq!ia0vp^4M42G!3-qd{%H_rU|?nl@Ck7Ra{vGT4~_kVeFM^>(%t1HucUBCBt zyz~|wo8Q14`6u9%X|YmVUFdoFhpQV^zt~jA?yjz>*l^+FHO_lo&nFuw3fLc1w*Kw^ z=i6+7_~!Zd^IIz=-~3tUwvne!Zr;CNj8eVls;%FfJ-0Eb^bdSDdB&7@j_vX+OFvw> zarj+*Hro&9hv&a}99;WrqX+-rH$LZ|temx8enDUl^L&0L^=i3`4?)r8>FVdQ&MBb@ E0LB+-cK`qY literal 0 HcmV?d00001 diff --git "a/src/main/resources/assets/chinacraft/textures/items/\346\210\222\345\210\200.png" b/src/main/resources/assets/chinacraft/textures/items/buddhist_monks_knife.png similarity index 100% rename from "src/main/resources/assets/chinacraft/textures/items/\346\210\222\345\210\200.png" rename to src/main/resources/assets/chinacraft/textures/items/buddhist_monks_knife.png diff --git "a/src/main/resources/assets/chinacraft/textures/items/\347\240\264\346\210\222\346\210\222\345\210\200.png" b/src/main/resources/assets/chinacraft/textures/items/crash_buddhist_monks_knife.png similarity index 100% rename from "src/main/resources/assets/chinacraft/textures/items/\347\240\264\346\210\222\346\210\222\345\210\200.png" rename to src/main/resources/assets/chinacraft/textures/items/crash_buddhist_monks_knife.png diff --git "a/src/main/resources/assets/chinacraft/textures/items/\346\260\264\347\243\250\347\246\205\346\235\226.png" b/src/main/resources/assets/chinacraft/textures/items/joint_staff.png similarity index 100% rename from "src/main/resources/assets/chinacraft/textures/items/\346\260\264\347\243\250\347\246\205\346\235\226.png" rename to src/main/resources/assets/chinacraft/textures/items/joint_staff.png diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index fcfa6a5..2c90a16 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "chinacraft", "name": "ChinaCraft", "description": "A mod with Chinese features.", - "version": "Beta 0.4.205", + "version": "Beta 0.4.206", "mcversion": "1.7.10", "url": "http://mccraft.cn/project/chinacraft", "updateUrl": "", From 346012e7866f429c822ffa1155d2cf2866fe4e93 Mon Sep 17 00:00:00 2001 From: Trychen Date: Mon, 29 May 2017 12:24:42 +0800 Subject: [PATCH 31/36] Better Item Lore Helper --- .../chinacraft/item/combat/CCJointStaff.java | 13 ++++++++----- .../unstudio/chinacraft/util/ItemLoreHelper.java | 13 ++++++------- .../resources/assets/chinacraft/lang/en_US.lang | 2 ++ .../resources/assets/chinacraft/lang/zh_CN.lang | 3 ++- .../resources/assets/chinacraft/lang/zh_TW.lang | 2 ++ 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/item/combat/CCJointStaff.java b/src/main/java/unstudio/chinacraft/item/combat/CCJointStaff.java index fde2ffa..f72407c 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/CCJointStaff.java +++ b/src/main/java/unstudio/chinacraft/item/combat/CCJointStaff.java @@ -1,13 +1,18 @@ package unstudio.chinacraft.item.combat; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.world.World; import unstudio.chinacraft.client.render.item.SpecialItemRender; import unstudio.chinacraft.common.ChinaCraft; +import unstudio.chinacraft.util.ItemLoreHelper; import unstudio.chinacraft.util.annotation.register.ISpecialEquippedRender; +import java.util.List; + /** * Created by trychen on 17/5/28. */ @@ -18,13 +23,11 @@ public CCJointStaff() { setUnlocalizedName("joint_staff"); } - @Override - public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { - super.onPlayerStoppedUsing(p_77615_1_, p_77615_2_, p_77615_3_, p_77615_4_); + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { + ItemLoreHelper.shiftLoreWithStat(p_77624_3_,getUnlocalizedName()); } - - @Override public void doRender() { diff --git a/src/main/java/unstudio/chinacraft/util/ItemLoreHelper.java b/src/main/java/unstudio/chinacraft/util/ItemLoreHelper.java index 9692a82..0fa461d 100644 --- a/src/main/java/unstudio/chinacraft/util/ItemLoreHelper.java +++ b/src/main/java/unstudio/chinacraft/util/ItemLoreHelper.java @@ -43,20 +43,19 @@ public static void shiftLoreWithStat(List lores, String itemName){ } } - if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) - if (StatCollector.canTranslate(itemName + ".hidelore")){ + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { + if (StatCollector.canTranslate(itemName + ".hidelore")) { lores.add(""); lores.add(EnumChatFormatting.WHITE + StatCollector.translateToLocal(itemName + ".hidelore")); - } - else { + } else { int i = 1; - while (StatCollector.canTranslate(itemName + ".hidelore." + i)){ - if (i==1) lores.add(""); + while (StatCollector.canTranslate(itemName + ".hidelore." + i)) { + if (i == 1) lores.add(""); lores.add(EnumChatFormatting.WHITE + StatCollector.translateToLocal(itemName + ".hidelore." + i)); i++; } } - else { + } else if (StatCollector.canTranslate(itemName + ".hidelore") || StatCollector.canTranslate(itemName + ".hidelore.1")){ lores.add(""); lores.add(StatCollector.translateToLocal("gui.inventory.shiftfordetail")); } diff --git a/src/main/resources/assets/chinacraft/lang/en_US.lang b/src/main/resources/assets/chinacraft/lang/en_US.lang index 0dcdfa9..c8cdff9 100644 --- a/src/main/resources/assets/chinacraft/lang/en_US.lang +++ b/src/main/resources/assets/chinacraft/lang/en_US.lang @@ -16,6 +16,8 @@ item.buddhist_monks_knife.name=Buddhist Monk's Knife item.buddhist_monks_knife.lore=Cause huge damage while attacking a thick armor item.crash_buddhist_monks_knife.name=Strong Buddhist Monk's Knife item.crash_buddhist_monks_knife.lore=Cause huge damage while attacking a thick armor +item.joint_staff.name=Joint Staff +item.joint_staff.lore=Cause range damage item.super_bow.name=Powerful Bow item.bronze_axe.name=Bronze Axe item.bronze_pickaxe.name=Bronze Pickaxe diff --git a/src/main/resources/assets/chinacraft/lang/zh_CN.lang b/src/main/resources/assets/chinacraft/lang/zh_CN.lang index 18cadbd..89b927e 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_CN.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_CN.lang @@ -18,7 +18,8 @@ item.buddhist_monks_knife.name=戒刀 item.buddhist_monks_knife.lore=面对越厚重的盔甲,攻击力越高 item.crash_buddhist_monks_knife.name=破戒戒刀 item.crash_buddhist_monks_knife.lore=面对越厚重的盔甲,攻击力越高 -item.joint_staff.item=水磨禅杖 +item.joint_staff.name=水磨禅杖 +item.joint_staff.lore=造成范围伤害 item.super_bow.name=强力弓 item.bronze_axe.name=青铜斧 item.bronze_pickaxe.name=青铜稿 diff --git a/src/main/resources/assets/chinacraft/lang/zh_TW.lang b/src/main/resources/assets/chinacraft/lang/zh_TW.lang index ed16ab2..9a9e4fa 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_TW.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_TW.lang @@ -18,6 +18,8 @@ item.buddhist_monks_knife.name=戒刀 item.buddhist_monks_knife.lore=面對越厚重的盔甲,攻擊力越高 item.crash_buddhist_monks_knife.name=破戒戒刀 item.crash_buddhist_monks_knife.lore=面對越厚重的盔甲,攻擊力越高 +item.joint_staff.name=水磨禅杖 +item.joint_staff.lore=造成范围伤害 item.super_bow.name=强力弓 item.bronze_axe.name=青銅斧 item.bronze_pickaxe.name=青銅稿 From d468c276dbab73e666f152023391103e0cf9edc3 Mon Sep 17 00:00:00 2001 From: Trychen Date: Mon, 29 May 2017 19:07:45 +0800 Subject: [PATCH 32/36] Fixed Cassock --- .../chinacraft/item/combat/ModelArmorCassock.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java index 827147d..f878257 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java @@ -17,7 +17,7 @@ */ public class ModelArmorCassock extends ModelArmor { @SideOnly(Side.CLIENT) - private ModelCassock armorModel; + private ModelCassock armorModel = new ModelCassock(); private static Integer itemId; @@ -49,26 +49,16 @@ public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemSta if (held_item != null) { armorModel.heldItemRight = 1; - if (player.getItemInUseCount() > 0) { - EnumAction enumaction = held_item.getItemUseAction(); - if (enumaction == EnumAction.bow) { armorModel.aimedBow = true; } else if (enumaction == EnumAction.block) { armorModel.heldItemRight = 3; } - - } - } - - } - - return armorModel; } From ed118502160f866c8a2e0154bee841f1e4405aaa Mon Sep 17 00:00:00 2001 From: Mouse <937279156@qq.com> Date: Tue, 30 May 2017 00:08:27 +0800 Subject: [PATCH 33/36] Update --- .../java/unstudio/chinacraft/world/gen/WorldGenCCFlower.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/unstudio/chinacraft/world/gen/WorldGenCCFlower.java b/src/main/java/unstudio/chinacraft/world/gen/WorldGenCCFlower.java index 3884959..958a106 100644 --- a/src/main/java/unstudio/chinacraft/world/gen/WorldGenCCFlower.java +++ b/src/main/java/unstudio/chinacraft/world/gen/WorldGenCCFlower.java @@ -21,7 +21,6 @@ private void gen(Random random, int blockX, int blockZ, World world, Block block @Override public boolean generate(World world, Random random, int x, int y, int z) { - if(random.nextInt(9)==0) return true; if (world.provider.dimensionId != 0) return true; for (int i = 0; i <= 15; i++) { From 2a8f7f463bbf3bad1808fe942abed484e1336823 Mon Sep 17 00:00:00 2001 From: Trychen Date: Sun, 18 Jun 2017 10:30:40 +0800 Subject: [PATCH 34/36] Fixes #17 --- .../inventory/ContainerJadeBench.java | 18 ++++++++++++++++++ .../chinacraft/tileentity/TileJadeBench.java | 6 +----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/inventory/ContainerJadeBench.java b/src/main/java/unstudio/chinacraft/inventory/ContainerJadeBench.java index c5d704a..bd7cee2 100644 --- a/src/main/java/unstudio/chinacraft/inventory/ContainerJadeBench.java +++ b/src/main/java/unstudio/chinacraft/inventory/ContainerJadeBench.java @@ -72,4 +72,22 @@ else if (par2 >= 30 && par2 < 39) { } return var3; } + + @Override + public void onContainerClosed(EntityPlayer p_75134_1_) { + super.onContainerClosed(p_75134_1_); + + if (!this.tile.getWorldObj().isRemote) + { + for (int i = 0; i < 9; ++i) + { + ItemStack itemstack = this.tile.getStackInSlotOnClosing(i); + + if (itemstack != null) + { + p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); + } + } + } + } } diff --git a/src/main/java/unstudio/chinacraft/tileentity/TileJadeBench.java b/src/main/java/unstudio/chinacraft/tileentity/TileJadeBench.java index 76dae3c..63ed98d 100644 --- a/src/main/java/unstudio/chinacraft/tileentity/TileJadeBench.java +++ b/src/main/java/unstudio/chinacraft/tileentity/TileJadeBench.java @@ -4,23 +4,19 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import unstudio.chinacraft.common.ChinaCraft; -import unstudio.chinacraft.item.combat.BronzeBroadSword; import unstudio.chinacraft.item.combat.Hammer; -import unstudio.chinacraft.item.jade.Jade; import unstudio.chinacraft.recipes.JadeBenchRecipes; import unstudio.chinacraft.recipes.JadeBenchRecipes.JadeBenchModifyRecipe; import unstudio.chinacraft.recipes.JadeBenchRecipes.JadeBenchOreRecipe; -import unstudio.chinacraft.util.ItemStackHelper; public class TileJadeBench extends TileEntity implements IInventory { - private ItemStack stack[] = new ItemStack[3]; + private ItemStack[] stack = new ItemStack[3]; @Override public int getSizeInventory() { From c7d66d751ec24d00c5f1b7bf6aa120e5f054bbe0 Mon Sep 17 00:00:00 2001 From: Trychen Date: Sun, 18 Jun 2017 11:27:45 +0800 Subject: [PATCH 35/36] Add Recipes --- .../unstudio/chinacraft/common/Recipes.java | 30 +++++++++++++++++-- .../assets/chinacraft/lang/zh_CN.lang | 3 +- .../assets/chinacraft/lang/zh_TW.lang | 3 +- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 0ab8a5d..70472a3 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -348,13 +348,39 @@ public static void init() { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.jadeKnife, 1), new Object[]{" X ", "X#X", '#', Items.stick, 'X', Items.iron_ingot})); - //飞刀 + // 飞刀 GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.flyingCutter, 2), new Object[]{" I", "S ", "F ", 'S', Items.stick, 'I', Items.iron_ingot, 'F', Items.feather})); - //蝉杖 + // 蝉杖 GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.buddhistCane, 1), "IAI", "BSB", " S ", 'I', Items.gold_ingot, 'B', ChinaCraft.tinIngot, 'A', Items.ghast_tear, 'S', Items.stick)); + // 戒刀 + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.buddhistMonksKnife), + " P ", + "PDP", + " A ", + 'P', ChinaCraft.peeledBambooPlank, + 'A', ChinaCraft.artKnife, + 'D', Items.diamond + )); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.crashBuddhistMonksKnife), + " P ", + "TDT", + " A ", + 'P', ChinaCraft.peeledBambooPlank, + 'A', ChinaCraft.artKnife, + 'D', Items.diamond, + 'T', ChinaCraft.silverIngot + )); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.jointStaff), + " II", + "ISI", + "II ", + 'S', Items.stick, + 'I', Items.iron_ingot + )); + // 大麦 GameRegistry.addShapelessRecipe(new ItemStack(ChinaCraft.barleyRice), new ItemStack(Items.wheat)); diff --git a/src/main/resources/assets/chinacraft/lang/zh_CN.lang b/src/main/resources/assets/chinacraft/lang/zh_CN.lang index 89b927e..e9a8822 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_CN.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_CN.lang @@ -99,8 +99,9 @@ tile.bamboo_fence_gate.name=竹制栅栏门 tile.bamboo_plank.name=竹板 tile.bamboo_shoot.name=竹笋 item.bamboo.name=竹子 +item.peeled_bamboo.name=已杀青的竹子 item.bamboo_shoot.name=竹笋 -tile.peeled_bamboo_plank.name=竹板 (已杀青) +tile.peeled_bamboo_plank.name=已杀青的竹板 tile.azalea.name=映山红 tile.beanBracket.name=作物支架 diff --git a/src/main/resources/assets/chinacraft/lang/zh_TW.lang b/src/main/resources/assets/chinacraft/lang/zh_TW.lang index 9a9e4fa..3b3b2ae 100644 --- a/src/main/resources/assets/chinacraft/lang/zh_TW.lang +++ b/src/main/resources/assets/chinacraft/lang/zh_TW.lang @@ -90,11 +90,12 @@ item.bronze_ingot.name=青銅錠 tile.jade_ore.name=玉原石 item.jade.lore=等級: tile.bamboo.name=竹子 +item.peeled_bamboo.name=已杀青的竹子 tile.bamboo_plank.name=竹板 tile.bamboo_shoot.name=竹笋 item.bamboo.name=竹子 item.bamboo_shoot.name=竹笋 -tile.peeled_bamboo_window.name=竹板 (已杀青) +tile.peeled_bamboo_window.name=已杀青的竹板 tile.azalea.name=映山紅 tile.beanBracket.name=作物支架 tite.benincasa_pruriens.name=冬瓜 From d9860ce7ad941809240a772c6318c9871137f767 Mon Sep 17 00:00:00 2001 From: Trychen Date: Sat, 15 Jul 2017 17:13:05 +0800 Subject: [PATCH 36/36] Fixed Bugs --- .../unstudio/chinacraft/common/Recipes.java | 10 ++-- .../item/combat/ModelArmorCassock.java | 52 +++++++++---------- 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/src/main/java/unstudio/chinacraft/common/Recipes.java b/src/main/java/unstudio/chinacraft/common/Recipes.java index 70472a3..2c51db3 100644 --- a/src/main/java/unstudio/chinacraft/common/Recipes.java +++ b/src/main/java/unstudio/chinacraft/common/Recipes.java @@ -259,10 +259,7 @@ public static void init() { new Object[]{" ##", " X#", "X ", '#', ChinaCraft.bronzeIngot, 'X', Items.stick})); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.bronzeBroadSword, 1), new Object[]{" ##", " X#", "X ", '#', ChinaCraft.bronzeIngot, 'X', Items.stick})); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.blGiantSword, 1), - new Object[]{"#B#", "EDE", "CAC", '#', Item.getItemFromBlock(Blocks.obsidian), 'A', Items.stick, 'B', - Items.lava_bucket.setContainerItem(Items.bucket), 'C', Items.iron_ingot, 'D', - Item.getItemFromBlock(Blocks.soul_sand), 'E', ChinaCraft.bronzeBlock})); + GameRegistry.addRecipe(new ItemStack(ChinaCraft.bronzePickaxe, 1), new Object[]{"###", " X ", " X ", '#', ChinaCraft.bronzeIngot, 'X', Items.stick}); GameRegistry.addRecipe(new ItemStack(ChinaCraft.bronzeAxe, 1), @@ -288,13 +285,12 @@ public static void init() { // 冕冠 GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChinaCraft.chinaCrown, 1), - "TET", + "T#T", "#X#", "S#S", '#', Items.gold_ingot, - 'X', Items.nether_star.setContainerItem(Items.nether_star), + 'X', Items.nether_star, 'T', new ItemStack(ChinaCraft.itemSilk, 1, 12), - 'E', Item.getItemFromBlock(Blocks.dragon_egg).setContainerItem(Item.getItemFromBlock(Blocks.dragon_egg)), 'S', new ItemStack(ChinaCraft.itemSilk, 1, 14))); // TinOre diff --git a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java index f878257..b72221f 100644 --- a/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java +++ b/src/main/java/unstudio/chinacraft/item/combat/ModelArmorCassock.java @@ -17,7 +17,7 @@ */ public class ModelArmorCassock extends ModelArmor { @SideOnly(Side.CLIENT) - private ModelCassock armorModel = new ModelCassock(); + private Object armorModel; private static Integer itemId; @@ -28,38 +28,38 @@ public ModelArmorCassock() { @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { - if (armorModel != null) { - armorModel = new ModelCassock(); - armorModel.bipedBody.showModel = true; - armorModel.bipedRightArm.showModel = true; - armorModel.bipedLeftArm.showModel = true; - armorModel.bipedRightLeg.showModel = true; - armorModel.bipedLeftLeg.showModel = true; + if (armorModel == null) armorModel = new ModelCassock(); + ModelCassock model = (ModelCassock) armorModel; + model = new ModelCassock(); + model.bipedBody.showModel = true; + model.bipedRightArm.showModel = true; + model.bipedLeftArm.showModel = true; + model.bipedRightLeg.showModel = true; + model.bipedLeftLeg.showModel = true; - armorModel.isSneak = entityLiving.isSneaking(); - armorModel.isRiding = entityLiving.isRiding(); - armorModel.isChild = entityLiving.isChild(); + model.isSneak = entityLiving.isSneaking(); + model.isRiding = entityLiving.isRiding(); + model.isChild = entityLiving.isChild(); - armorModel.heldItemRight = 0; - armorModel.aimedBow = false; + model.heldItemRight = 0; + model.aimedBow = false; - EntityPlayer player = (EntityPlayer) entityLiving; + EntityPlayer player = (EntityPlayer) entityLiving; - ItemStack held_item = player.getEquipmentInSlot(0); + ItemStack held_item = player.getEquipmentInSlot(0); - if (held_item != null) { - armorModel.heldItemRight = 1; - if (player.getItemInUseCount() > 0) { - EnumAction enumaction = held_item.getItemUseAction(); - if (enumaction == EnumAction.bow) { - armorModel.aimedBow = true; - } else if (enumaction == EnumAction.block) { - armorModel.heldItemRight = 3; - } + if (held_item != null) { + model.heldItemRight = 1; + if (player.getItemInUseCount() > 0) { + EnumAction enumaction = held_item.getItemUseAction(); + if (enumaction == EnumAction.bow) { + model.aimedBow = true; + } else if (enumaction == EnumAction.block) { + model.heldItemRight = 3; } } } - return armorModel; + return model; } @Override @@ -69,7 +69,7 @@ public String getArmorTexture(ItemStack stack, Entity entity, int slot, String l } public static int getItemId() { - if (itemId == null){ + if (itemId == null) { itemId = Item.getIdFromItem(ChinaCraft.cassock); } return itemId;