From c47edf1a26f3db65e0bda21f89fd337a8b186450 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 26 Oct 2014 14:01:15 +0900 Subject: [PATCH 01/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E5=B8=83?= =?UTF-8?q?=E3=81=AA=E3=81=A9=E3=81=AE=E5=8A=A0=E5=B7=A5=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・布を追加 ・風車の羽を追加 ・ラージ鉄を追加 ・ラージ金を追加 --- build.gradle | 9 +++++++ .../java/shift/sextiarysector/SSBlocks.java | 9 +++++++ .../java/shift/sextiarysector/SSItems.java | 25 ++++++++++++++++-- .../assets/sextiarysector/lang/en_US.lang | 10 ++++++- .../textures/items/dust/gold_dust.png | Bin 0 -> 321 bytes .../textures/items/dust/iron_dust.png | Bin 0 -> 335 bytes .../textures/items/loom/canvas.png | Bin 0 -> 506 bytes .../textures/items/loom/cloth.png | Bin 0 -> 435 bytes .../textures/items/loom/paper.png | Bin 0 -> 156 bytes .../textures/items/loom/stick.png | Bin 0 -> 277 bytes .../textures/items/loom/string.png | Bin 0 -> 177 bytes .../textures/items/loom/string_bobbin.png | Bin 0 -> 318 bytes .../textures/items/loom/string_strong.png | Bin 0 -> 338 bytes .../items/loom/string_strong_bobbin.png | Bin 0 -> 334 bytes 14 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/assets/sextiarysector/textures/items/dust/gold_dust.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/dust/iron_dust.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/canvas.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/cloth.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/paper.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/stick.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/string.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/string_bobbin.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/string_strong.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/string_strong_bobbin.png diff --git a/build.gradle b/build.gradle index 44ca3eb..68ddc92 100644 --- a/build.gradle +++ b/build.gradle @@ -55,3 +55,12 @@ jar { } } +task devJar(type: Jar) { + from sourceSets.main.output + from sourceSets.main.allSource + classifier = 'dev' +} + +artifacts { + archives devJar +} diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index ebfcb84..021673a 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -75,6 +75,8 @@ public class SSBlocks { public static Block yellowStoneOre; public static Block coalLargeOre; + public static Block ironLargeOre; + public static Block goldLargeOre; public static Block shippingBox; public static Block creeperChest; @@ -114,6 +116,7 @@ public static void initBlicks(){ chunkLoader = new BlockChunkLoader().setHardness(1.5F).setBlockName("ss.chunk_loader").setBlockTextureName("sextiarysector:time_loader"); GameRegistry.registerBlock(chunkLoader, "ChunkLoader"); + //鉱石 blueStoneOre = new BlockPowerStone().setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(blueStoneOre, "BlueStoneOre"); @@ -123,7 +126,13 @@ public static void initBlicks(){ coalLargeOre = new BlockSSOre(SSItems.coalDust,Blocks.coal_ore,1).setBlockName("ss.coal_large_ore").setBlockTextureName("sextiarysector:ore/coal_large_ore"); GameRegistry.registerBlock(coalLargeOre, "CoalLargeOre"); + ironLargeOre = new BlockSSOre(SSItems.ironDust,Blocks.iron_ore,2).setBlockName("ss.iron_large_ore").setBlockTextureName("sextiarysector:ore/iron_large_ore"); + GameRegistry.registerBlock(ironLargeOre, "IronLargeOre"); + goldLargeOre = new BlockSSOre(SSItems.goldDust,Blocks.gold_ore,2).setBlockName("ss.gold_large_ore").setBlockTextureName("sextiarysector:ore/gold_large_ore"); + GameRegistry.registerBlock(goldLargeOre, "GoldLargeOre"); + + //GF GameRegistry.registerTileEntity(TileEntityShaft.class, "Shaft"); woodShaft = new BlockShaft(1).setBlockName("ss.wood_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 82f35de..a5c9b30 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -16,9 +16,7 @@ public class SSItems { - //Gear - public static Item unit; public static Item woodGear; @@ -40,9 +38,16 @@ public class SSItems { public static Item yellowStoneDust; public static Item coalDust; + public static Item ironDust; + public static Item goldDust; public static Item blueStoneSlimeBall; + //布 + public static Item stringBobbin; + public static Item cloth; + public static Item canvas; + //飲み物 public static Item drinkingWaterSmallBottle; @@ -116,9 +121,25 @@ public static void initItems(){ coalDust = new Item().setUnlocalizedName("ss.coal_dust").setTextureName("sextiarysector:dust/coal_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(coalDust, "CoalDust"); + ironDust = new Item().setUnlocalizedName("ss.iron_dust").setTextureName("sextiarysector:dust/iron_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(ironDust, "IronDust"); + + goldDust = new Item().setUnlocalizedName("ss.gold_dust").setTextureName("sextiarysector:dust/gold_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(goldDust, "GoldDust"); + blueStoneSlimeBall = new Item().setUnlocalizedName("ss.blue_stone_slime_ball").setTextureName("sextiarysector:slimeball/bluestone_slimeball").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(blueStoneSlimeBall, "BlueStoneSlimeBall"); + //布 + stringBobbin = new Item().setUnlocalizedName("ss.string_bobbin").setTextureName("sextiarysector:loom/string_bobbin").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(stringBobbin, "StringBobbin"); + + cloth = new Item().setUnlocalizedName("ss.cloth").setTextureName("sextiarysector:loom/cloth").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(cloth, "Cloth"); + + canvas = new Item().setUnlocalizedName("ss.canvas").setTextureName("sextiarysector:loom/canvas").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(canvas, "Canvas"); + //飲み物 drinkingWaterSmallBottle = new ItemFoodDrink(0, 3.5f, 2, 6.5f, 0, 0, false).setUnlocalizedName("ss.drinking_water_small_bottle").setTextureName("sextiarysector:drink/drinking_water_small_bottle"); GameRegistry.registerItem(drinkingWaterSmallBottle, "DrinkingWaterSmallBottle"); diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 558a996..4c86cfd 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -8,7 +8,7 @@ tile.ss.wood_grate.name=Wood Grate tile.ss.wood_plate.name=Wood Plate tile.ss.hole.name=Hole -tile.ss.farmland.name=farmland +tile.ss.farmland.name=Farm Land tile.ss.chunk_loader.name=Time Loader @@ -31,6 +31,8 @@ tile.ss.blue_stone.name=Blue Stone Ore tile.ss.yellow_stone.name=Yellow Stone Ore tile.ss.coal_large_ore.name=Coal Large Ore +tile.ss.iron_large_ore.name=Iron Large Ore +tile.ss.gold_large_ore.name=Gold Large Ore tile.ss.creeper_chest.name=Creeper Monger Chest tile.ss.shipping_box.name=Shipping Box @@ -62,6 +64,8 @@ item.ss.dust_blue_stone.name=Blue Stone Dust item.ss.dust_yellow_stone.name=Yellow Stone Dust item.ss.coal_dust.name=Coal Dust +item.ss.iron_dust.name=Iron Dust +item.ss.gold_dust.name=Gold Dust item.ss.blue_stone_slime_ball.name=Blue Stone Slime Ball @@ -82,6 +86,10 @@ item.ss.season_stone_winter.name=Season Stone -Winter- item.ss.wood_gf_storage.name=Wood GF Storage +item.ss.string_bobbin.name=String Bobbin +item.ss.cloth.name=Cloth +item.ss.canvas.name=Canvas + item.ss.drinking_water_small_bottle.name=Drinking Water Small Bottle diff --git a/src/main/resources/assets/sextiarysector/textures/items/dust/gold_dust.png b/src/main/resources/assets/sextiarysector/textures/items/dust/gold_dust.png new file mode 100644 index 0000000000000000000000000000000000000000..fc2038ca78c3cefaf17451f4fa763060801753ac GIT binary patch literal 321 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqqa=@&8kfGyE}+mkPZ!4!i_>=}?B!|-kZ6-X%GTT@ zBs42}7f<^7quK(yS{7&*WEN#)_bl7hFm2j11xFdzDSpkBM*o|Zy|~SHzjEH^dE)=7 zbG(JOE$v+Y@P&!k@v{qp7i~NE`f9+uSoh_=i_8w5c9m~XIAh@EwcI7U+LFUq&21mw z;wi7+_Pu`LptJ3_&q_`%3l3uj&iz3vdWF`$j8EM$=TS2IbMIel;+w5i7<|s!xK>Wd zVy|?WalR^u%j3dlVJT~ddEF6D)+!%dx$@CZ&zFAQO;H5X;GZ><=Pq^7ED-1R`|G^5l4yY%nug^>??Ss%XaId^1+qx7AykEYEUp7v_YGV9G5 z_H0zp)9w-5(t9ADX~T^3QbBVW4>-nVtpD;>R%7WJfvkoHrORvOuPlA}GW0^|W!3*@ b|9@h+#F{K;Cphgm(4P#Ru6{1-oD!M literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/canvas.png b/src/main/resources/assets/sextiarysector/textures/items/loom/canvas.png new file mode 100644 index 0000000000000000000000000000000000000000..63dc239281fc121db9345470d02ce5432291bcf5 GIT binary patch literal 506 zcmVRniN*%TKSjY)2KPdWVOvg)_E@_%#j3Ep|Y}@8L5H?(X{N(=t zAq1Z1;rl*=!GPoONF2ui=wotMu>`EwYw|p&C<=lgV6)j!tyXC^n=~2?xJnR35xrgy z0LvIdk|YQr$g+&xZpVJV$8j7S$Kh}|uv)Ed5`o5N?4X+_a?!`17KYqCX)%i?^CH% zuq+Fu6k2Q2G{v^2&aYpY!>Q<2e8Pg*!-CCrjy%ul^?H`j(_pP-Hk*-U*^AbEJ}1v}#^W&|1OZS*QLx|dQA#nHOg>z>-EKTX zce@?dS{921%jNP@!Fw<3^_s)sK&R88+wG#Yrr+;lt)*!iPNx&jIf|lSv)Me{;J7;>Rg^&vh9lQa6MzQy(gi=q3egen?r|7V%rVBh7K>m zy320mv4M_nF1dF+p2%_IScgmgCo4pu8RX3FVdQ&MBb@ E0Dy`+F#rGn literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/stick.png b/src/main/resources/assets/sextiarysector/textures/items/loom/stick.png new file mode 100644 index 0000000000000000000000000000000000000000..6f8ce13bd43e65b123e09e8ad7abfca83a0e81b3 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^aI2?_V~EA+dqvX1`2lLZeBMej&s0|K?69JlK}7g&GfsJ&ovGJ9Og zXb2$=GZ^n`SU&SbeI=(~8?Squ(UZ^;<9$_MyB^-$oX+F2^T1^vk-XwKS94`g&nuUG zzSO7h`c=!f=8;Wf}i@Ec)iQ9 ct6wU9!ut~Mp&xTqfo@>%boFyt=akR{0PJ8%S^xk5 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/string_bobbin.png b/src/main/resources/assets/sextiarysector/textures/items/loom/string_bobbin.png new file mode 100644 index 0000000000000000000000000000000000000000..3a57364bafcc5d5cd7d0a71b138020b9425ec36a GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPq6B8e|dFnseTR@@Ho-U3d7N?I+GUPhsAmAE*<(!|u zHjZt#ZbjU#;>doVpw%t1?cPBd<)!HY%LIIqCu$`KB_*s4Q*zs+*mRlq%>VcG5n|_br&VHv7=jb(0iSyCyTVC#!q^|M>axf%;Idm(_yC>7i#&Z%R>W z+HJpg=l*7yt354xNGPu%<#bG{Hp~e`S05u z1p{qYXPsS8qr9ka!Ml5%!Cnc^&YY25;NZ2u)Wx{DBjm=u_Z*4}EdhTzw zn#o_kaZ7&f7CVi{MT%tl8|r@jY=(A*RPAUUMw=jh(itjL&Uu{``ih fz?)a*U)4X9w{4oFXU9jNR~bBA{an^LB{Ts58rX+t literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/string_strong_bobbin.png b/src/main/resources/assets/sextiarysector/textures/items/loom/string_strong_bobbin.png new file mode 100644 index 0000000000000000000000000000000000000000..1516b60a80e8d5e40eedc62660332c609b4473fa GIT binary patch literal 334 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPq6N`YbrEy=S5>V*2r;B5V#p$Dy?YWyAB--a27iu|8 zm=nc(ylvUCXBm_2obDf6*ngosLm=nG`Ufwxc%2?72+cWR%K3Mq)%2?6);sRop5MEN z{lDHt^9{57MGiczQad(3=dNu6{1-oD!M Date: Sun, 26 Oct 2014 15:03:56 +0900 Subject: [PATCH 02/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E8=A3=BD?= =?UTF-8?q?=E6=9D=90=E6=A9=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・製材機を追加 ・布や機械などのレシピを追加 ・石の歯車を追加 --- .../java/shift/sextiarysector/SSBlocks.java | 5 + .../shift/sextiarysector/SSGuiHandler.java | 4 + .../java/shift/sextiarysector/SSItems.java | 12 +- .../java/shift/sextiarysector/SSRecipes.java | 7 +- .../shift/sextiarysector/gui/GuiSawmill.java | 19 ++++ .../nei/NEISextiarySectorConfig.java | 5 + .../nei/SawmillRecipeHandler.java | 41 +++++++ .../sextiarysector/recipe/RecipesCore.java | 8 ++ .../sextiarysector/recipe/RecipesLoom.java | 7 +- .../sextiarysector/recipe/RecipesMachine.java | 104 +++++++++++++----- .../sextiarysector/recipe/RecipesSawmill.java | 18 +++ .../assets/sextiarysector/lang/en_US.lang | 8 +- .../textures/blocks/machine/sawmill.png | Bin 0 -> 479 bytes .../textures/guis/machine/sawmill.png | Bin 0 -> 2785 bytes .../textures/guis/machine/sawmill_nei.png | Bin 0 -> 3067 bytes .../textures/items/machine/stone_gear.png | Bin 0 -> 563 bytes .../items/machine/stone_unit_gear.png | Bin 0 -> 1296 bytes 17 files changed, 205 insertions(+), 33 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/gui/GuiSawmill.java create mode 100644 src/main/java/shift/sextiarysector/nei/SawmillRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/sawmill.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/sawmill.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/sawmill_nei.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/machine/stone_gear.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/machine/stone_unit_gear.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 021673a..582959d 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -62,6 +62,8 @@ public class SSBlocks { public static Block millstone; public static Block loom; + public static Block sawmill; + public static Block hole; @@ -171,6 +173,9 @@ public static void initBlicks(){ loom = new BlockSimpleMachine("loom",21,SSRecipes.loom,1).setBlockName("ss.loom").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerBlock(loom, "Loom"); + sawmill = new BlockSimpleMachine("sawmill",25,SSRecipes.sawmill,2).setBlockName("ss.sawmill").setCreativeTab(SextiarySectorAPI.TabSSMachine); + GameRegistry.registerBlock(sawmill, "Sawmill"); + shippingBox = new BlockShippingBox().setBlockName("ss.shipping_box").setBlockTextureName("sextiarysector:shipping_box").setCreativeTab(SextiarySectorAPI.TabSSEconomy); GameRegistry.registerBlock(shippingBox, "ShippingBox"); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 97cfdc2..07c16fa 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -11,6 +11,7 @@ import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMillstone; +import shift.sextiarysector.gui.GuiSawmill; import shift.sextiarysector.gui.IServerGuiElement; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityLargeFurnace; @@ -40,6 +41,7 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x case 20: case 21: + case 25: return new ContainerSimpleMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); case 40: @@ -89,6 +91,8 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x case 20:return new GuiMillstone(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); case 21:return new GuiLoom(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 25:return new GuiSawmill(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 40:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),1); case 41:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),2); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index a5c9b30..0ef86e3 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -1,5 +1,6 @@ package shift.sextiarysector; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import shift.sextiarysector.api.SextiarySectorAPI; @@ -20,7 +21,10 @@ public class SSItems { public static Item unit; public static Item woodGear; + public static Item stoneGear; + public static Item woodUnitGear; + public static Item stoneUnitGear; public static Item woodGFStorage; @@ -91,9 +95,15 @@ public static void initItems(){ woodGear = new Item().setUnlocalizedName("ss.wood_gear").setTextureName("sextiarysector:machine/wood_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerItem(woodGear, "WoodGear"); + stoneGear = new Item().setUnlocalizedName("ss.stone_gear").setTextureName("sextiarysector:machine/stone_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); + GameRegistry.registerItem(stoneGear, "StoneGear"); + woodUnitGear = new Item().setUnlocalizedName("ss.wood_unit_gear").setTextureName("sextiarysector:machine/wood_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerItem(woodUnitGear, "WoodUnitGear"); + stoneUnitGear = new Item().setUnlocalizedName("ss.stone_unit_gear").setTextureName("sextiarysector:machine/stone_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); + GameRegistry.registerItem(stoneUnitGear, "StoneUnitGear"); + woodGFStorage = new ItemGearStorage(1, 10000, 1).setUnlocalizedName("ss.wood_gf_storage").setTextureName("sextiarysector:gearforce/gear_storage").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerItem(woodGFStorage, "WoodGFStorage"); @@ -141,7 +151,7 @@ public static void initItems(){ GameRegistry.registerItem(canvas, "Canvas"); //飲み物 - drinkingWaterSmallBottle = new ItemFoodDrink(0, 3.5f, 2, 6.5f, 0, 0, false).setUnlocalizedName("ss.drinking_water_small_bottle").setTextureName("sextiarysector:drink/drinking_water_small_bottle"); + drinkingWaterSmallBottle = new ItemFoodDrink(0, 3.5f, 2, 6.5f, 0, 0, false).setUnlocalizedName("ss.drinking_water_small_bottle").setTextureName("sextiarysector:drink/drinking_water_small_bottle").setContainerItem(Items.glass_bottle); GameRegistry.registerItem(drinkingWaterSmallBottle, "DrinkingWaterSmallBottle"); diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index f06106b..770fcae 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -9,17 +9,20 @@ import shift.sextiarysector.recipe.RecipesMachine; import shift.sextiarysector.recipe.RecipesMillstone; import shift.sextiarysector.recipe.RecipesNormalBlock; +import shift.sextiarysector.recipe.RecipesSawmill; import shift.sextiarysector.recipe.RecipesTool; public class SSRecipes { public static RecipeSimpleMachine millstone; public static RecipeSimpleMachine loom; + public static RecipeSimpleMachine sawmill; public static void initRecipeLists(){ millstone = new RecipeSimpleMachine(); loom = new RecipeSimpleMachine(); + sawmill = new RecipeSimpleMachine(); } @@ -37,11 +40,13 @@ public static void initRecipes(){ RecipesFurnaceCraft.addRecipes(fm); - //Millstone + //GF RecipesMillstone.addRecipes(millstone); RecipesLoom.addRecipes(loom); + RecipesSawmill.addRecipes(sawmill); + } } diff --git a/src/main/java/shift/sextiarysector/gui/GuiSawmill.java b/src/main/java/shift/sextiarysector/gui/GuiSawmill.java new file mode 100644 index 0000000..92107da --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiSawmill.java @@ -0,0 +1,19 @@ +package shift.sextiarysector.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import shift.sextiarysector.tileentity.TileEntitySimpleMachine; + +public class GuiSawmill extends GuiSimpleMachine{ + + private static final ResourceLocation machineGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/sawmill.png"); + + public GuiSawmill(InventoryPlayer par1InventoryPlayer, TileEntitySimpleMachine par2TileEntity) { + super(par1InventoryPlayer, par2TileEntity); + } + + @Override + protected ResourceLocation getBindTexture() { + return machineGuiTextures; + } +} diff --git a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java index 337f9d5..720ec29 100644 --- a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java +++ b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java @@ -3,6 +3,7 @@ import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMillstone; +import shift.sextiarysector.gui.GuiSawmill; import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; @@ -18,6 +19,9 @@ public void loadConfig() { API.registerRecipeHandler(new LoomRecipeHandler()); API.registerUsageHandler(new LoomRecipeHandler()); + API.registerRecipeHandler(new SawmillRecipeHandler()); + API.registerUsageHandler(new SawmillRecipeHandler()); + /* API.registerRecipeHandler(new LoomRecipeHandler()); API.registerUsageHandler(new LoomRecipeHandler()); @@ -51,6 +55,7 @@ public void loadConfig() { API.registerGuiOverlay(GuiMillstone.class, "SS_Millstone"); API.registerGuiOverlay(GuiLoom.class, "SS_Loom"); + API.registerGuiOverlay(GuiSawmill.class, "SS_Sawmill"); //API.registerGuiOverlay(GuiBrewingStand.class, "SextiarySectorBrewing"); } diff --git a/src/main/java/shift/sextiarysector/nei/SawmillRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/SawmillRecipeHandler.java new file mode 100644 index 0000000..659bd09 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/SawmillRecipeHandler.java @@ -0,0 +1,41 @@ +package shift.sextiarysector.nei; + +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiSawmill; +import shift.sextiarysector.gui.GuiSimpleMachine; +import shift.sextiarysector.recipe.RecipeSimpleMachine; + +public class SawmillRecipeHandler extends SimpleMachineRecipeHandler{ + + @Override + public Class getGuiClass() + { + return GuiSawmill.class; + } + + @Override + Class getHandlerClass() { + return SawmillRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_Sawmill"; + } + + @Override + RecipeSimpleMachine getRecipe() { + return SSRecipes.sawmill; + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/machine/sawmill_nei.png"; + } + + @Override + String getGuiRecipeName() { + return "ss.sawmill"; + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index 487da3c..ef2858a 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -3,6 +3,7 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; +import net.minecraftforge.oredict.ShapedOreRecipe; import shift.sextiarysector.SSItems; public class RecipesCore { @@ -16,6 +17,13 @@ public static void addRecipes(CraftingManager p_77608_1_) 'x', Items.redstone, 'y', Items.paper, }); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.stringBobbin, 1), + new Object[] { + "xxx", "xyx", "xxx", + 'x', Items.string, + 'y', "stickWood", + })); } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java b/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java index d461d57..c7d0c54 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java @@ -1,16 +1,15 @@ package shift.sextiarysector.recipe; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSItems; public class RecipesLoom { public static void addRecipes(RecipeSimpleMachine recipe) { - //バニラ - recipe.add(new ItemStack(Blocks.bedrock,1),new ItemStack(Items.dye, 4, 1)); + //風車 + recipe.add(new ItemStack(SSItems.stringBobbin,1),new ItemStack(SSItems.cloth, 1)); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index e285847..32f215e 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -1,6 +1,8 @@ package shift.sextiarysector.recipe; +import net.minecraft.block.Block; import net.minecraft.init.Blocks; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraftforge.oredict.ShapedOreRecipe; @@ -22,6 +24,13 @@ public static void addRecipes(CraftingManager p_77608_1_) 'a', Blocks.furnace }); + Object[] material = new Object[]{"plankWood","stone"}; + Item[] gear = new Item[]{SSItems.woodGear,SSItems.stoneGear}; + Item[] unit = new Item[]{SSItems.woodUnitGear,SSItems.stoneUnitGear}; + Block[] shaft = new Block[]{SSBlocks.woodShaft, SSBlocks.stoneShaft}; + Block[] tank = new Block[]{SSBlocks.woodGFTank, SSBlocks.stoneGFTank}; + Block[] box = new Block[]{SSBlocks.woodGearBox, SSBlocks.stoneGearBox}; + //GF Block p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.smallWindmill, 1), new Object[] { "xzx", "zyz","xzx", @@ -30,42 +39,91 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('z'), Blocks.wool })); - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.woodShaft, 4), - new Object[] { "xzx", "xyx","xzx", - Character.valueOf('y'), SSItems.blueStoneDust, - Character.valueOf('x'), "plankWood", - Character.valueOf('z'), SSItems.blueStoneSlimeBall + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.canvas, 1), + new Object[] { "xxy", "xxy"," y", + Character.valueOf('y'), Blocks.fence, + Character.valueOf('x'), SSItems.cloth })); - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.woodGFTank, 1), - new Object[] { "yay", "xzx","yxy", + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.windmill, 1), + new Object[] { " x ", "xyx"," x ", + Character.valueOf('y'), SSItems.blueStoneSlimeBall, + Character.valueOf('x'), SSItems.canvas + })); + + for(int i=0;i<2;i++){ + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(shaft[i], 4), + new Object[] { "xzx", "xyx","xzx", + Character.valueOf('y'), SSItems.blueStoneDust, + Character.valueOf('x'), material[i], + Character.valueOf('z'), SSItems.blueStoneSlimeBall + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(tank[i], 1), + new Object[] { "yay", "xzx","yxy", + Character.valueOf('y'), material[i], + Character.valueOf('x'), SSItems.woodGFStorage, + Character.valueOf('z'), unit[i], + Character.valueOf('a'), gear[i] + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(box[i], 1), + new Object[] { "yxy", "xzx","yxy", + Character.valueOf('y'), material[i], + Character.valueOf('x'), gear[i], + Character.valueOf('z'), unit[i] + })); + + } + + + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.millstone, 1), + new Object[] { "yyy", "aza","yxy", Character.valueOf('y'), "plankWood", Character.valueOf('x'), SSItems.woodGFStorage, Character.valueOf('z'), SSItems.woodUnitGear, - Character.valueOf('a'), SSItems.woodGear + Character.valueOf('a'), "stone" })); - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.woodGearBox, 1), - new Object[] { "yxy", "xzx","yxy", + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.loom, 1), + new Object[] { "yyy", "aza","yxy", Character.valueOf('y'), "plankWood", - Character.valueOf('x'), SSItems.woodGear, - Character.valueOf('z'), SSItems.woodUnitGear + Character.valueOf('x'), SSItems.woodGFStorage, + Character.valueOf('z'), SSItems.woodUnitGear, + Character.valueOf('a'), "stickWood" })); - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.millstone, 1), + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.sawmill, 1), new Object[] { "yyy", "aza","yxy", Character.valueOf('y'), "plankWood", Character.valueOf('x'), SSItems.woodGFStorage, - Character.valueOf('z'), SSItems.woodUnitGear, - Character.valueOf('a'), "stone" + Character.valueOf('z'), SSItems.stoneUnitGear, + Character.valueOf('a'), "ingotIron" })); //GF Item - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.woodGear, 2), - new Object[] { " x ", "xyx"," x ", - Character.valueOf('y'), SSItems.blueStoneDust, - Character.valueOf('x'), "plankWood" - })); + + for(int i=0;i<2;i++){ + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gear[i], 2), + new Object[] { " x ", "xyx"," x ", + Character.valueOf('y'), SSItems.blueStoneDust, + Character.valueOf('x'), material[i] + })); + + + + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(unit[i], 1), + new Object[] { + SSItems.unit, + gear[i] + })); + + } + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.woodGFStorage, 1), new Object[] { " y ", "xzx","xzx", @@ -74,12 +132,6 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('y'), SSItems.woodGear, })); - p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(SSItems.woodUnitGear, 1), - new Object[] { - SSItems.unit, - SSItems.woodGear - })); - } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java b/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java new file mode 100644 index 0000000..4f7e33a --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java @@ -0,0 +1,18 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSBlocks; + +public class RecipesSawmill { + + public static void addRecipes(RecipeSimpleMachine recipe) + { + + // + recipe.add(new ItemStack(Blocks.planks,1),new ItemStack(SSBlocks.woodPlate, 8)); + + + } + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 4c86cfd..1e9887f 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -25,7 +25,8 @@ tile.ss.wood_gf_tank.name=Wood GF Tank tile.ss.stone_gf_tank.name=Stone GF Tank tile.ss.millstone.name=Millstone -tile.ss.loom.name=loom +tile.ss.loom.name=Loom +tile.ss.sawmill.name=Sawmill tile.ss.blue_stone.name=Blue Stone Ore tile.ss.yellow_stone.name=Yellow Stone Ore @@ -72,7 +73,10 @@ item.ss.blue_stone_slime_ball.name=Blue Stone Slime Ball item.ss.unit.name=Unit item.ss.wood_gear.name=Wood Gear +item.ss.stone_gear.name=Stone Gear + item.ss.wood_unit_gear.name=Wood Unit Gear +item.ss.stone_unit_gear.name=Stone Unit Gear item.ss.hammer.name=Hammer item.ss.calendar.name=Calendar @@ -128,6 +132,7 @@ container.sub.inventory=Buffer gui.ss.millstone=Millstone gui.ss.loom=Loom +gui.ss.sawmill=Sawmill gui.ss.gf_tank_1=Wood GF Tank gui.ss.gf_tank_2=Stone GF Tank @@ -173,5 +178,6 @@ nei.ss.furnace.shapeless=Furnace Shapeless nei.ss.millstone=Millstone Recipe nei.ss.loom=Loom Recipe +nei.ss.sawmill=Sawmill Recipe nei.ss.fertilizer=Mutation Recipe diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/sawmill.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/sawmill.png new file mode 100644 index 0000000000000000000000000000000000000000..aac7f176d2694898d4677aa97cfcc180a804bd1d GIT binary patch literal 479 zcmV<50U-W~P)~dKa*CP5Ma;*w&4u+<-~~#(5*OjBW}Ps2?N^@E72j zX`9^M-gCZmRaMpCy$2wKfcKtZ7ziN%aKGOviURLF-g}&LbX`Z5Wjvox1i*H?MJdIS zthFRbGM$^IA&z4Jj>jY7cDvEGEq&hu&~+V$!{J9GDJA>;o;Z$CO5vO%gn$r2ptZ(1 zHx&Y0uh&_FvMi@Z#`W=dAjWZ&Qdn#GP48C5M#5T)wH7Jm^!g_`=Vn#`L=;6NNitdZ zOYc(*!+;pkynB;UQkLb9%YEO^YKo$GVH^>*ZHv~L-EKFt^9k{4wL)}V$LVxhEKo|( zG!0toDT7gYp3}DN3!_qsG)+05&wpkhrKGAVj4^YJ#+XI^-&K|+X`0S4{wsk|bzM(; z5k(Pso>SNL$Ml!7Nz?R&alKw+j6o^IX0ur=2Bxu%F*xUN&XHx=3*+T-`LFK`@C8{f V*;PmFBh3H+002ovPDHLkV1n^2%)|fy literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/sawmill.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/sawmill.png new file mode 100644 index 0000000000000000000000000000000000000000..6c1560d1c57207a28bb14c476b153e877fd1279b GIT binary patch literal 2785 zcmcImdo+~m8h;0a6r!YLD5Tu&6hfJ73=v8@Wn#pR%4M>1$!%ur#1xq`QP?gsy5UH& zb1R#fB$p0GO$fO}jd2|^HH^=E=WDNX)>&tr{qOm{^{)3@&%55|_j{i2eSYtA-OB@~ zsGy+$08n&waXbzH3i(6_kpUX zht45JxhU78PI4m(8faBTdVK8;02Crz9S@(lGB`Kvd0umJo7`Az#Tkr3s@4%@hqR&; zv+#{{X2;IEPPg3*YUQ_XF5Gaa3}uu{N&4Zwm%<&TS7ZKRzbf4hKYsp_`MP4XQ*-oA zy=+ajV>gs6BT{a%WwNJU6m`wI7*)i4`a|y|yxgFhbZ?TwAi9R% z%*beIZgzOkYxc>lH)qE&Sm^TA$I#VM=65t>%j(;=$L-?2=$ZOGKe2QGkH;_0HwaGZ zxL#BsiEdlmrc$4Va9WWu-d$*`LT~B0s(gz|otvApmbBuJs*hcjQ&w2(%rPTmUb}Yf zJPzz3#lIdL^v$5r`cv45Ye&aU4rjNDif55s*_3>6aI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9hKcrg z{P43+?=>judn%F zZggPaI-)W2E6a$=Od)GgRbDgbv}VEMlaGX=Ba66GGW!ad7i?{9afXt;s^A8zvNwNJ z{h-*&8(O*dU0#l&yr7C~)b);d9XksK+t_?pj1-6vC4ZJ%^K4%6?=x&Lk^{7x_4qh=7ll}9S@Y4LJ z^R18D64aj6l3C-Gbp%3;xa#-cRkO0P(lQV3-~W@Ssv%aO05n4SC+5}2;!~C~ha}4r zsSabzOZ+JLTq!o#1cVha^B?;&a5Syc(v-bwq{h(I)y9QrU_GtOKSlu9v`k4KU|!WY zNG1pdC6LoWIll|JWMi`ISSgNNf-3IX+0!mbvaqn|O;1o-pS*ShW;P3)=`(pN*|YTB1%M;=*Y zil#$bNE5ezF)r$ z))7Z7Gb4Y~D#@!05uA|Eu6cs5mF>Av*WZ-1S{s?c6-eOSflYTMgE%t7(|z z3~w>A@7)8X9c$>#XWO<RR(8U$V{q^{b#>Wl=~ASnN!ZWdwgupIVJUro)p#LM9sIu@ bF&jqRZu#VpTWpB`j^XO$;rQ4g;MacwaAh0~ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/sawmill_nei.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/sawmill_nei.png new file mode 100644 index 0000000000000000000000000000000000000000..f71e3d326fa48abad3c46d48f71d0658e114a5da GIT binary patch literal 3067 zcmcImeK-?p8-KRu%7-{o$LJf{_{T1^<4LJ-Ov5}?)$o*>-pVxk|)+# z9j*rl0I0hhbvOY4M6rbcRb_=Zd-drhg;4f$b#?&q@3Ww(BtxP3SLo5x;Q(m7`Mx0a z_kwu}rAma0yQ2yVuBW8E#fyop13-=9;&ABXH70M&J?`o?3LZxiwz zEPm0t_vm-y$BwnGTVJYf(4nq9SPHQ_1zGW*l3PUbAH}(ag1ES*5R*@ohZ55LvkMHcX%M|;rv)Zt28aFsN zNU)Dyl`Lh?EtGndY+Gi$mS@p+jY~O}hRYq)V3vrxH2xh!5ck^NH>IXiC_El-pF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*!(h;mk~s1J`$6AB7rN)U228Un=pSV*9iLBZg>W zZ_)27&^STU!9`k)DOo}5r%s=~d@WZ#Gw{5!wpQ22$0wQYP?%8Fwd`sKed;Y(R-*fM zujXHgqB~|^Yif4cK>C>m?UpzcK zY+}EC%(H_QoLAKpgRS&A!KZ{m8Pp{c(6vfXKtBP*iq$3J-9{n7JZ&rsp5}Nqepm=W7^N+KcWL? z!PJsFq(Etv2{{7pXKtXr!zeAyJJ@K#aE+=Y4iFkAYk ztW_V{#T~cVz1z#aA%L#+)LTl_jYlVssv2eE#_+;GNb93s-8hx~O?AVQHcDnw5iJ$e zpN|yeX_H_WDxBVnfE=>A#%w4f>}D*^{WQV*xGZ8{ov?VZ=F6Hlqon#H1uW@mfqpcX z@uAL3yvow9sL{V}MhKT(N+zLi?B!Vg1nSRd95Vpr_t{2&46bCwz*|C}*>J}3*7U5K zXnT9qcQfa_QFi33x8!*hm6g4H;e()H z&40?lqtA=W>~F-e=d>S|nC6EcsexnO;s;RAU5xT`&({X=MeIK?kd~fle`8+c16sxi zacQ<{!oCFLy=oHjM(Sz{^X`va{wm})!4n>@Cv*$~+c2U+j}LaX+fm0(#(Dt^z=Sb0 zlMjyKFT=s%7FD1H$N<2A(Oepiq4x_Ik%~v)0?;$m^<1 z(+Kc!jj@Z)Mm(KnlpS>GGAvC7WnSpe=hcj)pb}m{{*LIM5ajQ1s{%tsXHoDgSM^EW z+qxqnZiA_o&OKCu8{~Vh3ko(9Euc)@Q+AGlTj=Ii_HeQQ*`v|O3Mv^RY{%w6|2J&- zi@&gkbRQ&K^gjPRi2zFOQqV!~XZLPJT#cvTX&xg6Wg3DG`+X2Bzw#F@X j)7q&hB=~=gTP<>kzwm>`Yj3XOcONc}Scme%=db@8+q1!w literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/machine/stone_gear.png b/src/main/resources/assets/sextiarysector/textures/items/machine/stone_gear.png new file mode 100644 index 0000000000000000000000000000000000000000..ac623d050221787e49f697ab66c9198da2677f9f GIT binary patch literal 563 zcmV-30?hr1P)T0l-N_ zK~y-)m6Sbe+fW#VpQ{*51t|nARSY5Eu{ZW4G$n#Uh6FqWPeDV5bj;jLS=zslwL>7L zljvx?wpxrQJDv*NTnZ+NKN8ojA-Ne6U0aGe^h`p$&pq!wM@Z~loD-{lbOM0mIHc8T zwa8K~3mlC`*tV^f2OY-|SqB;MgXek5G)-lirUrfAr&_J*Lrv3Ep697@xvXc5`q2rO zXYVxN`@VLc&1Txkwr%CQF0ShW@S(c7xI$XK?FDMebi~2SLC_ z?oRCN?sHlHrlfo_D3wY8bUK}63+c51c6Rr9fBI3sACJc`@)B`{S%Ed1O#q~n8jhU- z+U>S50L~7JqVUiaKq4?HWde?Mur(ELU-yK*!f0^KFGH%h;R73r{!w^u|IMMO~qz}jk_y^Hgw4SK(C zSQpnCYIXsNiNNaN57q@@Z8iVwo?o=^zgqqUJOW^#(zB2HiDv)+002ovPDHLkV1mhq B^;rM_ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/machine/stone_unit_gear.png b/src/main/resources/assets/sextiarysector/textures/items/machine/stone_unit_gear.png new file mode 100644 index 0000000000000000000000000000000000000000..89126630727f8ea890aec55a2dbf111079d9308f GIT binary patch literal 1296 zcmV+r1@HQaP)WFU8GbZ8()Nlj2>E@cM*00eYNL_t(o!|j*PYaC@5 z$3M?Ilg(_*rj&RQY%A$aLqS4Wt6&ROENVf7o^tRHDR?Lr|B@a=LJuBFpcKIzj3oq? z_MnGSlR`B#xZO>6vh%+4JRW9tvOgl5yM170m)Uur=leX*_xZ8#TK?}M;}5?7?v|x# zpWU6OWc@x1rxp+qy4?f3&k%8_D&A*3@55Z0ri2g*MFM6J#}P?Vr&gQUilS&`e!jt( zv+r>0_U#FK@%V!@?bCYljNRui=ybX)EOZfsgM$NnmLX11RkAFb3n7s9diW5KQuP2p zJxQ3U&9208%=~U|ykjVc0~gcX`Gddr{$lS`JRLw%uTxJFB2x%`L^DvuM(kSwpfo#jA0WZN2@)w{ zf!H~sDE?+S64YaJY;Qc4KSjIcL8X(+cd6zQ`XoZQgU3;O#<*fBl8)md1bs% zQWyldbLURMm&3#AT=eiR&1MsT_4W1Y45k$bnY4c#fUp(3U%|8_mzGM7WZ?Ngu3x{- z-rgPnuU@?xBFiXOjuSWjKvkcpDrSn9Arv0u7r#2z^DN6ojBjjg(73u<7&Se*{zKyb zZjwX!FLOI?yvRK?o6RB5p?kjoy71}hP$cYR07RtZ${>7tY}nV<*2q^r2aL_ldn_+6 z190KO1pr#DR^`25CH>@t5wM}~l>o-WUPbAs@ac3qV`_%H7ePdpPM(4agpGuIK)7bJ z$>!!g0G5}RE90$JYiQCbf?}2vg2x9x9YD8xaO0rc;my!PtdD6%{{ANjhTDEHLbyTL z$31Ucxn4%+5V4q$_2_n9((QClPpyIw0zP<5b*O|CxBZ~1^I^h`8(&;pr2F$v)j2ao z1mZX*j%PSwE0%Jq7&0iQQU;|qLAcWRQ3@68s0}AcLcLy}-Un>FiC7VZcDv2``Z^mM z8!TM;VnR{l@-_DN_u1dyA0?q&t@1jLo8od%#*t1(-f z#l;asf@m?th8u}ccxL4WQoJz^z`!}Ayvz($oetoGOCR!R=NU=v=|1}thaom#hGME! z@2M71RdNkQ>R@O;G;%ZM1?J`#d1J0V9l+y9kBZ%J>sNfpsV50>91jK+-e+j8MRd+(O*Hzi5x6?;{c5JJ&eosj4G zkAf`u5SG%kcRKhmG)usHPufdaS}Gdg_V)JcKSHl%LjDB`*OdB2zQ%0;0000 Date: Sun, 26 Oct 2014 15:17:44 +0900 Subject: [PATCH 03/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=80=80:=20=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E8=A1=A8=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・バージョンを変更 --- build.gradle | 2 +- src/main/java/shift/sextiarysector/SextiarySector.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 68ddc92..0681c71 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.0.5.a-${project.minecraft.version}" +version = "2.0.6.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 2f1fdcb..9ea0519 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -32,7 +32,7 @@ public class SextiarySector { //public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.0.5"; + public static final String VERSION = "2.0.6"; @Mod.Instance("SextiarySector") public static SextiarySector instance; From 252a1aabdd64dd63cde5fcd7cbc7844038fa1aa2 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 26 Oct 2014 20:40:33 +0900 Subject: [PATCH 04/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E9=89=B1=E7=9F=B3=E3=81=8C=E7=94=9F=E6=88=90?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・ラージ鉱石がワールドに生成される --- .../sextiarysector/event/WorldEventHandler.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java index 2efc802..9940831 100644 --- a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java @@ -14,6 +14,10 @@ public class WorldEventHandler { private WorldGenMinable bluestoneGen; private WorldGenMinable yellowstoneGen; + private WorldGenMinable coaLargeGen; + private WorldGenMinable ironLarge; + private WorldGenMinable goldLarge; + private int chunk_X; private int chunk_Z; private World currentWorld; @@ -31,9 +35,17 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.bluestoneGen = new WorldGenMinable(SSBlocks.blueStoneOre, 7); this.yellowstoneGen = new WorldGenMinable(SSBlocks.yellowStoneOre, 7); + coaLargeGen = new WorldGenMinable(SSBlocks.coalLargeOre, 16); + ironLarge = new WorldGenMinable(SSBlocks.ironLargeOre, 8); + goldLarge = new WorldGenMinable(SSBlocks.goldLargeOre, 8); + this.genStandardOre1(8, this.bluestoneGen, 0, 16); this.genStandardOre1(8, this.yellowstoneGen, 0, 16); + + this.genStandardOre1(10, this.coaLargeGen, 0, 128); + this.genStandardOre1(10, this.ironLarge, 0, 64); + this.genStandardOre1(1, this.goldLarge, 0, 32); //System.out.println("onOreGenEvent"); } From 93a1ebf575f63401b0e14ac957a6e23bb129bde7 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 26 Oct 2014 23:13:24 +0900 Subject: [PATCH 05/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20gearbox=E3=81=8C?= =?UTF-8?q?=E6=AD=A3=E3=81=97=E3=81=8F=E5=87=BA=E5=8A=9B=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/shift/sextiarysector/tileentity/TileEntityGearBox.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java index 205bc92..3c2ee10 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java @@ -76,7 +76,7 @@ public int getConnect(){ TileEntity t = this.worldObj.getTileEntity(x, y, z); - if(t instanceof IEnergyHandler && ((IEnergyHandler) t).addEnergy(d.getOpposite(), 1, 1, true)>0){ + if(t instanceof IEnergyHandler && ((IEnergyHandler) t).addEnergy(d.getOpposite(), this.storage.getMaxPowerStored(), 1, true)>0){ i++; } From a9a0dcaedefbb85ba06862c358727b26b1490a6e Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 26 Oct 2014 23:15:59 +0900 Subject: [PATCH 06/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E8=A1=A8=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0681c71..29b55c2 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.0.6.a-${project.minecraft.version}" +version = "2.0.6.b-${project.minecraft.version}" minecraft { // replacing stuff in the source From d1f0c5bb8007048ab0e760ed1b2fb6765df525bb Mon Sep 17 00:00:00 2001 From: shift02 Date: Mon, 27 Oct 2014 23:51:52 +0900 Subject: [PATCH 07/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20GF=E5=A4=89?= =?UTF-8?q?=E6=8F=9B=E5=99=A8=E3=81=AE=E6=8F=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・GF変換器の描写部分だけ仮実装 --- .../java/shift/sextiarysector/SSBlocks.java | 9 + .../sextiarysector/block/BlockGearShaft.java | 147 ++++++++++++++++ .../item/ItemBlockGearShaft.java | 30 ++++ .../sextiarysector/proxy/ClientProxy.java | 9 + .../sextiarysector/proxy/CommonProxy.java | 3 + .../renderer/block/RendererGearShaft.java | 160 ++++++++++++++++++ .../renderer/model/ModelGearShaftDown.java | 87 ++++++++++ .../renderer/model/ModelGearShaftUp.java | 83 +++++++++ .../tileentity/TileEntityGearShaft.java | 103 +++++++++++ .../textures/guis/machine/press.png | Bin 0 -> 3056 bytes .../textures/models/gear_shaft.png | Bin 0 -> 1616 bytes 11 files changed, 631 insertions(+) create mode 100644 src/main/java/shift/sextiarysector/block/BlockGearShaft.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererGearShaft.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftDown.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftUp.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/press.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/gear_shaft.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 582959d..9bab336 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -8,6 +8,7 @@ import shift.sextiarysector.block.BlockChunkLoader; import shift.sextiarysector.block.BlockGFTank; import shift.sextiarysector.block.BlockGearBox; +import shift.sextiarysector.block.BlockGearShaft; import shift.sextiarysector.block.BlockHole; import shift.sextiarysector.block.BlockLargeFurnace; import shift.sextiarysector.block.BlockMonitor; @@ -27,6 +28,7 @@ import shift.sextiarysector.item.ItemBlockCrop; import shift.sextiarysector.item.ItemBlockMonitor; import shift.sextiarysector.item.ItemBlockShaft; +import shift.sextiarysector.tileentity.TileEntityGearShaft; import shift.sextiarysector.tileentity.TileEntityFarmland; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityGearBox; @@ -56,6 +58,8 @@ public class SSBlocks { public static Block woodGFTank; public static Block stoneGFTank; + public static Block woodStoneGearShaft; + public static Block smallWindmill; public static Block windmill; @@ -158,6 +162,11 @@ public static void initBlicks(){ stoneGFTank = new BlockGFTank(Material.rock,41,2).setBlockName("ss.stone_gf_tank").setBlockTextureName("sextiarysector:machine/stone_gf_tank").setStepSound(Block.soundTypeWood); GameRegistry.registerBlock(stoneGFTank, "StoneGFTank"); + + GameRegistry.registerTileEntity(TileEntityGearShaft.class, "GearShaft"); + woodStoneGearShaft = new BlockGearShaft(1).setBlockName("ss.wood_stone_gear_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); + GameRegistry.registerBlock(woodStoneGearShaft,ItemBlockShaft.class, "WoodStoneGearShaft"); + smallWindmill = new BlockSmallWindmill().setBlockName("ss.small_windmill").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerTileEntity(TileEntitySmallWindmill.class, "SmallWindmill"); GameRegistry.registerBlock(smallWindmill, "SmallWindmill"); diff --git a/src/main/java/shift/sextiarysector/block/BlockGearShaft.java b/src/main/java/shift/sextiarysector/block/BlockGearShaft.java new file mode 100644 index 0000000..ed33746 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockGearShaft.java @@ -0,0 +1,147 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.tileentity.TileEntityDirection; +import shift.sextiarysector.tileentity.TileEntityGearShaft; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockGearShaft extends BlockDirection{ + + private int type; + + public BlockGearShaft(int type) { + super(Material.wood); + this.setType(type); + this.setHardness(0.8F); + this.setCreativeTab(SextiarySectorAPI.TabSSMachine); + + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.GearShaftRenderType; + } + + /* + public int damageDropped(int p_149692_1_) + { + return p_149692_1_; + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) + { + for(int i=0;i<5;i++){ + p_149666_3_.add(new ItemStack(p_149666_1_,1,i)); + } + }*/ + + @Override + public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) + { + + double[] i = getBoxFromPool(par1IBlockAccess.getTileEntity(par2, par3, par4).getWorldObj(), par2, par3, par4); + + float x = (float)i[0] ; + float y = (float)i[1] ; + float z = (float)i[2] ; + + this.setBlockBounds((0.0F+x),(0.0F+y), (0.0F+z), (1.0F-x), (1.0F-y), (1.0F-z)); + } + + //当たり判定。サボテンやソウルサンドを参考にすると良い。ココの設定をすると、onEntityCollidedWithBlockが呼ばれるようになる + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + double[] i = getBoxFromPool(par1World, par2, par3, par4); + + double x = i[0] ; + double y = i[1] ; + double z = i[2] ; + + return AxisAlignedBB.getBoundingBox(par2+x, par3+y, par4+z, (par2 + 1)-x, (par3 + 1)-y, (par4 + 1)-z); + } + + //ブロックに視点を合わせた時に出てくる黒い線のアレ + @Override + @SideOnly(Side.CLIENT) + public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + double[] i = getBoxFromPool(par1World, par2, par3, par4); + + double x = i[0] ; + double y = i[1] ; + double z = i[2] ; + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + + return AxisAlignedBB.getBoundingBox(par2+x, par3+y, par4+z, (par2 + 1)-x, (par3 + 1)-y, (par4 + 1)-z); + } + + public double[] getBoxFromPool(World par1World, int par2, int par3, int par4) + { + double[] i = new double[3]; + + i[0]=0;//x + i[1]=0;//y + i[2]=0;//z + + TileEntityDirection tileEntity = (TileEntityDirection)par1World.getTileEntity(par2, par3, par4); + + if(tileEntity==null){ + return i ; + } + + ForgeDirection d = tileEntity.direction; + + if(d.ordinal()==0||d.ordinal()==1){ + i[0]=0.3125; + i[2]=0.3125; + } + if(d.ordinal()==2||d.ordinal()==3){ + i[0]=0.3125; + i[1]=0.3125; + } + if(d.ordinal()==4||d.ordinal()==5){ + i[1]=0.3125; + i[2]=0.3125; + } + + return i ; + } + + @Override + public TileEntity createNewTileEntity(World world, int p_149915_2_) { + return new TileEntityGearShaft(this.getType()); + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java b/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java new file mode 100644 index 0000000..40e9f10 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java @@ -0,0 +1,30 @@ +package shift.sextiarysector.item; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.tileentity.TileEntityDirection; + +public class ItemBlockGearShaft extends ItemBlock{ + + public ItemBlockGearShaft(Block par1) { + super(par1); + } + + + @Override + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) + { + boolean result = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ,metadata); + + if(result){ + TileEntityDirection tile = (TileEntityDirection)world.getTileEntity(x, y, z); + tile.direction = ForgeDirection.getOrientation(side); + } + + return result; + } +} diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 56fdc65..c1e8e7a 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -6,12 +6,14 @@ import net.minecraftforge.client.MinecraftForgeClient; import shift.sextiarysector.renderer.block.RendererChest; import shift.sextiarysector.renderer.block.RendererFarmland; +import shift.sextiarysector.renderer.block.RendererGearShaft; import shift.sextiarysector.renderer.block.RendererHole; import shift.sextiarysector.renderer.block.RendererMonitor; import shift.sextiarysector.renderer.block.RendererShaft; import shift.sextiarysector.renderer.block.RendererSmallWindmill; import shift.sextiarysector.renderer.block.RendererWindmill; import shift.sextiarysector.renderer.item.RenderGF; +import shift.sextiarysector.tileentity.TileEntityGearShaft; import shift.sextiarysector.tileentity.TileEntityMonitor; import shift.sextiarysector.tileentity.TileEntitySSChest; import shift.sextiarysector.tileentity.TileEntityShaft; @@ -37,6 +39,8 @@ public void setCustomRenderers() { this.ShaftRenderType = RenderingRegistry.getNextAvailableRenderId(); + this.GearShaftRenderType = RenderingRegistry.getNextAvailableRenderId(); + this.smallWindMillType = RenderingRegistry.getNextAvailableRenderId(); this.windMillType = RenderingRegistry.getNextAvailableRenderId(); @@ -50,6 +54,8 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererShaft()); + RenderingRegistry.registerBlockHandler(new RendererGearShaft()); + RenderingRegistry.registerBlockHandler(new RendererSmallWindmill()); RenderingRegistry.registerBlockHandler(new RendererWindmill()); @@ -67,6 +73,9 @@ public void setCustomRenderers() { public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShaft.class, new RendererShaft()); + + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGearShaft.class, new RendererGearShaft()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallWindmill.class, new RendererSmallWindmill()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWindmill.class, new RendererWindmill()); diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index c03098d..def2778 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -8,6 +8,9 @@ public class CommonProxy { public int holeType; public int ShaftRenderType; + + public int GearShaftRenderType; + public int smallWindMillType; public int windMillType; diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererGearShaft.java b/src/main/java/shift/sextiarysector/renderer/block/RendererGearShaft.java new file mode 100644 index 0000000..91fed4b --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererGearShaft.java @@ -0,0 +1,160 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.renderer.model.ModelGearShaftDown; +import shift.sextiarysector.renderer.model.ModelGearShaftUp; +import shift.sextiarysector.tileentity.TileEntityGearShaft; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererGearShaft extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + + if(modelID!=this.getRenderId()){ + return ; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + + GL11.glRotatef(90, 1, 0, 0); + + ModelGearShaftUp m; + if(metadata==0){ + m = this.modelShaftUp; + }else{ + m = this.modelShaftDown; + } + + + /* + if(block == SSBlocks.woodShaft){ + this.bind(woodShaftTextures); + }else if(block == SSBlocks.stoneShaft){ + this.bind(stoneShaftTextures); + }*/ + + this.bind(woodShaftTextures); + + m.render(null, 0,0,0, 0,0, 1.0f); + + GL11.glRotatef(-(FMLClientHandler.instance().getClient().getMinecraft().getSystemTime()/20)%360, 0, 0, 1); + + m.renderUp(null, 0,0,0, 0,0, 1.0f); + + GL11.glRotatef((FMLClientHandler.instance().getClient().getMinecraft().getSystemTime()/20)%360, 0, 0, 1); + GL11.glRotatef(-(FMLClientHandler.instance().getClient().getMinecraft().getSystemTime()/80)%360, 0, 0, 1); + + m.renderDown(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, + RenderBlocks renderer) { + return false; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.instance.proxy.GearShaftRenderType; + } + + private static final ResourceLocation woodShaftTextures = new ResourceLocation("sextiarysector:textures/models/gear_shaft.png"); + + private static final ResourceLocation stoneShaftTextures = new ResourceLocation("sextiarysector:textures/models/stone_shaft.png"); + + static public ModelGearShaftUp modelShaftUp = new ModelGearShaftUp(); + static public ModelGearShaftDown modelShaftDown = new ModelGearShaftDown(); + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + + TileEntityGearShaft tile = (TileEntityGearShaft)tileentity; + + //System.out.println("renderTileEntityAt"); + + GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + + this.bindTexture(woodShaftTextures); + + + switch(tile.direction){ + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + default: + break; + } + + ModelGearShaftUp m; + if(tileentity.getBlockMetadata()==0){ + m = this.modelShaftUp; + }else{ + m = this.modelShaftDown; + } + + m.render(null, 0,0,0, 0,0, 1.0f); + + //傾きのスピード + GL11.glRotatef(tile.rotateDownStep, 0, 0, 1); + + m.renderDown(null, 0,0,0, 0,0, 1.0f); + + //傾きのスピード + GL11.glRotatef(-tile.rotateDownStep, 0, 0, 1); + GL11.glRotatef(tile.rotateUpStep, 0, 0, 1); + + m.renderUp(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + } + + + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftDown.java b/src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftDown.java new file mode 100644 index 0000000..e41415b --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftDown.java @@ -0,0 +1,87 @@ +// Date: 2014/10/27 23:04:54 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelGearShaftDown extends ModelGearShaftUp { + // fields + ModelRenderer b; + ModelRenderer out; + ModelRenderer in; + ModelRenderer d1; + ModelRenderer d2; + ModelRenderer d3; + ModelRenderer d4; + ModelRenderer u1; + + public ModelGearShaftDown() { + textureWidth = 64; + textureHeight = 32; + + b = new ModelRenderer(this, 0, 0); + b.addBox(-1F, -1F, -7F, 2, 2, 14); + b.setRotationPoint(0F, 0F, 0F); + b.setTextureSize(64, 32); + b.mirror = true; + out = new ModelRenderer(this, 33, 0); + out.addBox(-4F, -4F, -8F, 8, 8, 4); + out.setRotationPoint(0F, 0F, 0F); + out.setTextureSize(64, 32); + out.mirror = true; + in = new ModelRenderer(this, 33, 13); + in.addBox(-4F, -4F, 4F, 8, 8, 4); + in.setRotationPoint(0F, 0F, 0F); + in.setTextureSize(64, 32); + in.mirror = true; + d1 = new ModelRenderer(this, 0, 0); + d1.addBox(-1F, -7F, -3F, 2, 2, 2); + d1.setRotationPoint(0F, 0F, 0F); + d1.setTextureSize(64, 32); + d1.mirror = true; + d2 = new ModelRenderer(this, 0, 0); + d2.addBox(-7F, -1F, -3F, 2, 2, 2); + d2.setRotationPoint(0F, 0F, 0F); + d2.setTextureSize(64, 32); + d2.mirror = true; + d3 = new ModelRenderer(this, 0, 0); + d3.addBox(5F, -1F, -3F, 2, 2, 2); + d3.setRotationPoint(0F, 0F, 0F); + d3.setTextureSize(64, 32); + d3.mirror = true; + d4 = new ModelRenderer(this, 0, 0); + d4.addBox(-1F, 5F, -3F, 2, 2, 2); + d4.setRotationPoint(0F, 0F, 0F); + d4.setTextureSize(64, 32); + d4.mirror = true; + u1 = new ModelRenderer(this, 0, 4); + u1.addBox(-1F, -7F, 1F, 2, 2, 2); + u1.setRotationPoint(0F, 0F, 0F); + u1.setTextureSize(64, 32); + u1.mirror = true; + } + + 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); + b.render(f5); + out.render(f5); + in.render(f5); + } + + public void renderDown(Entity entity, float f, float f1, float f2, float f3,float f4, float f5) { + d1.render(f5); + d2.render(f5); + d3.render(f5); + d4.render(f5); + } + + public void renderUp(Entity entity, float f, float f1, float f2, float f3,float f4, float f5) { + u1.render(f5); + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftUp.java b/src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftUp.java new file mode 100644 index 0000000..51dd1ec --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftUp.java @@ -0,0 +1,83 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelGearShaftUp extends ModelBase { + + ModelRenderer b; + ModelRenderer out; + ModelRenderer in; + ModelRenderer d1; + ModelRenderer d2; + ModelRenderer d3; + ModelRenderer d4; + ModelRenderer u1; + + public ModelGearShaftUp() { + textureWidth = 64; + textureHeight = 32; + + b = new ModelRenderer(this, 0, 0); + b.addBox(-1F, -1F, -7F, 2, 2, 14); + b.setRotationPoint(0F, 0F, 0F); + b.setTextureSize(64, 32); + b.mirror = true; + out = new ModelRenderer(this, 33, 0); + out.addBox(-4F, -4F, -8F, 8, 8, 4); + out.setRotationPoint(0F, 0F, 0F); + out.setTextureSize(64, 32); + out.mirror = true; + in = new ModelRenderer(this, 33, 13); + in.addBox(-4F, -4F, 4F, 8, 8, 4); + in.setRotationPoint(0F, 0F, 0F); + in.setTextureSize(64, 32); + in.mirror = true; + d1 = new ModelRenderer(this, 0, 0); + d1.addBox(-1F, -7F, 1F, 2, 2, 2); + d1.setRotationPoint(0F, 0F, 0F); + d1.setTextureSize(64, 32); + d1.mirror = true; + d2 = new ModelRenderer(this, 0, 0); + d2.addBox(-7F, -1F, 1F, 2, 2, 2); + d2.setRotationPoint(0F, 0F, 0F); + d2.setTextureSize(64, 32); + d2.mirror = true; + d3 = new ModelRenderer(this, 0, 0); + d3.addBox(5F, -1F, 1F, 2, 2, 2); + d3.setRotationPoint(0F, 0F, 0F); + d3.setTextureSize(64, 32); + d3.mirror = true; + d4 = new ModelRenderer(this, 0, 0); + d4.addBox(-1F, 5F, 1F, 2, 2, 2); + d4.setRotationPoint(0F, 0F, 0F); + d4.setTextureSize(64, 32); + d4.mirror = true; + u1 = new ModelRenderer(this, 0, 4); + u1.addBox(-1F, -7F, -3F, 2, 2, 2); + u1.setRotationPoint(0F, 0F, 0F); + u1.setTextureSize(64, 32); + u1.mirror = true; + } + + 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); + b.render(f5); + out.render(f5); + in.render(f5); + } + + public void renderDown(Entity entity, float f, float f1, float f2, float f3,float f4, float f5) { + d1.render(f5); + d2.render(f5); + d3.render(f5); + d4.render(f5); + } + + public void renderUp(Entity entity, float f, float f1, float f2, float f3,float f4, float f5) { + u1.render(f5); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java new file mode 100644 index 0000000..a539888 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java @@ -0,0 +1,103 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.machine.energy.EnergyStorage; +import shift.sextiarysector.api.machine.energy.IEnergyHandler; + +public class TileEntityGearShaft extends TileEntityDirection implements IEnergyHandler { + + public float rotateUpStep = 0; + public float rotateDownStep = 0; + private EnergyStorage storage = new EnergyStorage("Base", 1, 320, 160); + + public TileEntityGearShaft(){ + + } + + public TileEntityGearShaft(int i){ + storage.setPowerCapacity(i); + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() { + this.rotateUpStep+=2; + this.rotateDownStep+=8; + } + + private void updateServerEntity() { + // TODO 自動生成されたメソッド・スタブ + + } + + // NBT関係 + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + storage.readFromNBT(par1nbtTagCompound); + //this.lastSpeed = par1nbtTagCompound.getInteger("lastSpeed"); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + storage.writeToNBT(par1nbtTagCompound); + //par1nbtTagCompound.setInteger("lastSpeed", lastSpeed); + } + + @Override + public int addEnergy(ForgeDirection from, int power, int speed, + boolean simulate) { + // TODO 自動生成されたメソッド・スタブ + return 0; + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed, + boolean simulate) { + // TODO 自動生成されたメソッド・スタブ + return 0; + } + + @Override + public boolean canInterface(ForgeDirection from) { + // TODO 自動生成されたメソッド・スタブ + return false; + } + + @Override + public int getPowerStored(ForgeDirection from) { + // TODO 自動生成されたメソッド・スタブ + return 0; + } + + @Override + public long getSpeedStored(ForgeDirection from) { + // TODO 自動生成されたメソッド・スタブ + return 0; + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + // TODO 自動生成されたメソッド・スタブ + return 0; + } + + @Override + public long getMaxSpeedStored(ForgeDirection from) { + // TODO 自動生成されたメソッド・スタブ + return 0; + } +} diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/press.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/press.png new file mode 100644 index 0000000000000000000000000000000000000000..cd4eaf1135f22dc7555b677e5b7df26a18753859 GIT binary patch literal 3056 zcmcImdpOkT9)Aa!S<0noO2&vSibW~Pbz)R<8Cjb|ji|IP$^AN)YQ-v)PN5Ro(?QJ4 zN>Pj%g{38iFbvJqL`Io%otrUpe(gTzdG_r2`}}^-?|I+n^Sd+7pUv&l=)Wf_EV1e@MTi#N6146zze=sNk0Ila=KiJdj zQ9=lWCwlsLz_}U*+B#ON>BbO&CczWCFCdj8e1prmyR;EL8)2|*!e3*H(Z%dnM!E3k zM~>Mv|Iq%ZXm^12d;T_cjyk_0>UN&`=4S`LTUnPJSoIuHDDbe`8^8(~SZ|S}Kd_y{ zkE;&|s@3$#i?)v$YRo=0T#_=SbR=<0q?wo;TgNZGbjLn1fyfk>^7Qy#o~@zg|4`J? z>2zVQZA5PXy-3?|kKaLMPdJm%I8#bm=@iQ+k@^MAnVq=r3%vL^Ch_qDvvdKgB7bmL zB1tuLPJhgrMy0(TwmLZIs_MUz<>qgsGPw%BUDVOh@icuY($JMi=SK_=5A%OEyJwCq z4A7HLI#Q8roCwzu!FI`uxW&!Q`Bp@CF2iCo6DN;FbC*-cR;5l4Jn*JT+kajcw<8vV_21{`g(&gr0ud{ zs<*TTabez+^s+9zGwk%~EhZ+^kZ1nGuL9R6On2eqXD^JsN26&Fli4O^x6>hoe4#Jl znKkpiWMd*+%g`M1X}_$CSyy-XusovgUJF;j696mT+}U^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?Y{Eu!1(HqKUMdhJSLS&LCa=eI)m%FeEQK@wJ)9F&0l@7g>nk~ zE}$!5tOl5xnj)Lca`vyk2f*sI0r>Ta@1pDaK>4-|aPP@uN_+FTt{eZ>TlV0UN`c?@ zF^n!~I%CF-8#j12a|GY_aa|YB^O)M;-9hr94Y1NVsr~z=({pJEDJ9u#R%;;)eUnL0gfFzhLjR1CHwd9r`2j9rKDIa4oU<% zx~8%AFg=O^q?F`xxj315p2yRtPeb98yYQd+|C!%Nn&fi1(2Isa5Cq)6f1g63!0FSc zSz216Uaupi92fx_KsK9=!#I&Bsf761r>fQg9-eBY;DuT!tr0WeJy+wPyxjY!cb0-}%{3Mwjvqro&y z3WWmJ0g;J53k{ zn${&uSL1{las4*P&^wCCFS1zVfdFto?IE)_9PfG?=PN*G&pvwN z;T8FLCAWzn2=F|Q?@j)kTC+y^K$&DR$>n>OX*QdfrrB5iQbHxhZ@$z30SG>M!yZSx zS1Og5)b#HDTONV+^>rpDCKw>sqGSqi?b@|5=73M$P(Zu)yp%I9gdieEQC5%0&D7Ks zKrBxr5}PVS&p2vWM;q)AL}VuNRzGs%I1ba((^!@jlbu22sV^7!f5UMcW>-I_R4T<^ zgsRml2M->k)oM{J7O7M!96o$FzNMB*C1&-{<9-2=u1+qNOe(BvkQ$%J$DaII;YeaX{~H-KrHxG5-P z3f#VZdnj^KC=^)e5cm6$ryXwqAp|qQTd~ImksHTxsMTtG%X*7>F^}hYeaX|y;R0jC z#&3eI>msFmVHpg9ApRl*#2g@^^UotHjaRN**%5l~Vi&vE#V&TS!|-1j4HLOG{4})y O0000 Date: Thu, 30 Oct 2014 23:40:35 +0900 Subject: [PATCH 08/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20GearShaft?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・GF変換器を実装 ・飲料水が食べ物扱いになっていたのを修正 --- .../java/shift/sextiarysector/SSBlocks.java | 5 +- .../java/shift/sextiarysector/SSItems.java | 2 +- .../sextiarysector/block/BlockGearShaft.java | 13 ++ .../item/ItemBlockGearShaft.java | 18 +++ .../tileentity/TileEntityGearShaft.java | 137 +++++++++++------- .../assets/sextiarysector/lang/en_US.lang | 2 + 6 files changed, 121 insertions(+), 56 deletions(-) diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 9bab336..428745d 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -26,12 +26,13 @@ import shift.sextiarysector.block.BlockSmallWindmill; import shift.sextiarysector.block.BlockWindmill; import shift.sextiarysector.item.ItemBlockCrop; +import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMonitor; import shift.sextiarysector.item.ItemBlockShaft; -import shift.sextiarysector.tileentity.TileEntityGearShaft; import shift.sextiarysector.tileentity.TileEntityFarmland; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityGearBox; +import shift.sextiarysector.tileentity.TileEntityGearShaft; import shift.sextiarysector.tileentity.TileEntityLargeFurnace; import shift.sextiarysector.tileentity.TileEntityMonitor; import shift.sextiarysector.tileentity.TileEntitySSChest; @@ -165,7 +166,7 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntityGearShaft.class, "GearShaft"); woodStoneGearShaft = new BlockGearShaft(1).setBlockName("ss.wood_stone_gear_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); - GameRegistry.registerBlock(woodStoneGearShaft,ItemBlockShaft.class, "WoodStoneGearShaft"); + GameRegistry.registerBlock(woodStoneGearShaft,ItemBlockGearShaft.class, "WoodStoneGearShaft"); smallWindmill = new BlockSmallWindmill().setBlockName("ss.small_windmill").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerTileEntity(TileEntitySmallWindmill.class, "SmallWindmill"); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 0ef86e3..f4a9e16 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -151,7 +151,7 @@ public static void initItems(){ GameRegistry.registerItem(canvas, "Canvas"); //飲み物 - drinkingWaterSmallBottle = new ItemFoodDrink(0, 3.5f, 2, 6.5f, 0, 0, false).setUnlocalizedName("ss.drinking_water_small_bottle").setTextureName("sextiarysector:drink/drinking_water_small_bottle").setContainerItem(Items.glass_bottle); + drinkingWaterSmallBottle = new ItemFoodDrink(0, 3.5f, 2, 6.5f, 0, 0, false).setDrink().setUnlocalizedName("ss.drinking_water_small_bottle").setTextureName("sextiarysector:drink/drinking_water_small_bottle").setContainerItem(Items.glass_bottle); GameRegistry.registerItem(drinkingWaterSmallBottle, "DrinkingWaterSmallBottle"); diff --git a/src/main/java/shift/sextiarysector/block/BlockGearShaft.java b/src/main/java/shift/sextiarysector/block/BlockGearShaft.java index ed33746..08bb044 100644 --- a/src/main/java/shift/sextiarysector/block/BlockGearShaft.java +++ b/src/main/java/shift/sextiarysector/block/BlockGearShaft.java @@ -1,6 +1,11 @@ package shift.sextiarysector.block; +import java.util.List; + import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.IBlockAccess; @@ -136,6 +141,14 @@ public TileEntity createNewTileEntity(World world, int p_149915_2_) { return new TileEntityGearShaft(this.getType()); } + @SideOnly(Side.CLIENT) + 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)); + p_149666_3_.add(new ItemStack(p_149666_1_,1,1)); + } + public int getType() { return type; } diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java b/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java index 40e9f10..df3dc14 100644 --- a/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java +++ b/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java @@ -1,5 +1,7 @@ package shift.sextiarysector.item; +import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -14,6 +16,10 @@ public ItemBlockGearShaft(Block par1) { super(par1); } + public int getMetadata(int p_77647_1_) + { + return p_77647_1_; + } @Override public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) @@ -27,4 +33,16 @@ public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, i return result; } + + @Override + public void addInformation(ItemStack itemstack,EntityPlayer par1EntityPlayer, List list , boolean flag) + { + + if(itemstack.getItemDamage()==0){ + list.add("[Mode] Up"); + }else{ + list.add("[Mode] Down"); + } + + } } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java index a539888..e77f6da 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java @@ -1,6 +1,7 @@ package shift.sextiarysector.tileentity; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; import shift.sextiarysector.api.machine.energy.IEnergyHandler; @@ -11,11 +12,11 @@ public class TileEntityGearShaft extends TileEntityDirection implements IEnergyH public float rotateDownStep = 0; private EnergyStorage storage = new EnergyStorage("Base", 1, 320, 160); - public TileEntityGearShaft(){ + public TileEntityGearShaft() { } - public TileEntityGearShaft(int i){ + public TileEntityGearShaft(int i) { storage.setPowerCapacity(i); } @@ -33,71 +34,101 @@ public void updateEntity() { } public void updateClientEntity() { - this.rotateUpStep+=2; - this.rotateDownStep+=8; + this.rotateUpStep += 2; + this.rotateDownStep += 8; } private void updateServerEntity() { - // TODO 自動生成されたメソッド・スタブ + if(!(this.getOutTileEntity() instanceof IEnergyHandler)){ + return; + } + + IEnergyHandler out = (IEnergyHandler) this.getOutTileEntity(); + + int i = storage.drawEnergy(storage.getMaxPowerStored(), storage.getMaxSpeedStored(), true); + + if(this.isUP()){ + + int add = (int)((float)i/4.0f); + int a = out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPowerStored()+1, add, true); + storage.drawEnergy(storage.getMaxPowerStored(), a*4, false); + out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPowerStored()+1, add, false); + + }else{ + + int a = out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPowerStored(), i, true); + storage.drawEnergy(storage.getMaxPowerStored(), a, false); + out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPowerStored(), i, false); + + } + + } + + private TileEntity getOutTileEntity(){ + return this.worldObj.getTileEntity(xCoord+this.direction.offsetX, yCoord+this.direction.offsetY, zCoord+this.direction.offsetZ); + } + + private boolean isUP(){ + return this.getBlockMetadata()==0; } // NBT関係 - @Override - public void readFromNBT(NBTTagCompound par1nbtTagCompound) { - super.readFromNBT(par1nbtTagCompound); - storage.readFromNBT(par1nbtTagCompound); - //this.lastSpeed = par1nbtTagCompound.getInteger("lastSpeed"); - } + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + storage.readFromNBT(par1nbtTagCompound); + } - @Override - public void writeToNBT(NBTTagCompound par1nbtTagCompound) { - super.writeToNBT(par1nbtTagCompound); - storage.writeToNBT(par1nbtTagCompound); - //par1nbtTagCompound.setInteger("lastSpeed", lastSpeed); - } + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + storage.writeToNBT(par1nbtTagCompound); + } - @Override - public int addEnergy(ForgeDirection from, int power, int speed, - boolean simulate) { - // TODO 自動生成されたメソッド・スタブ - return 0; - } + @Override + public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { - @Override - public int drawEnergy(ForgeDirection from, int power, int speed, - boolean simulate) { - // TODO 自動生成されたメソッド・スタブ - return 0; - } + if(!this.canInterface(from))return 0; - @Override - public boolean canInterface(ForgeDirection from) { - // TODO 自動生成されたメソッド・スタブ - return false; - } - @Override - public int getPowerStored(ForgeDirection from) { - // TODO 自動生成されたメソッド・スタブ - return 0; + if(power==this.storage.getMaxPowerStored() && this.isUP()){ + return this.storage.addEnergy(power, speed, simulate); + }else if(power==this.storage.getMaxPowerStored()+1 && !this.isUP()){ + return (int)((float)this.storage.addEnergy(power-1, speed*4, simulate)/4.0f); } - @Override - public long getSpeedStored(ForgeDirection from) { - // TODO 自動生成されたメソッド・スタブ - return 0; - } + return 0; + } - @Override - public int getMaxPowerStored(ForgeDirection from) { - // TODO 自動生成されたメソッド・スタブ - return 0; - } + @Override + public int drawEnergy(ForgeDirection from, int power, int speed, + boolean simulate) { + return 0; + } - @Override - public long getMaxSpeedStored(ForgeDirection from) { - // TODO 自動生成されたメソッド・スタブ - return 0; - } + @Override + public boolean canInterface(ForgeDirection from) { + return this.direction.getOpposite().equals(from); + } + + @Override + public int getPowerStored(ForgeDirection from) { + return storage.getPowerStored(); + } + + @Override + public long getSpeedStored(ForgeDirection from) { + return storage.getSpeedStored(); + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + return storage.getMaxPowerStored(); + } + + @Override + public long getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeedStored(); + } } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 1e9887f..53d1d0d 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -24,6 +24,8 @@ tile.ss.stone_gear_box.name=Stone Gear Box tile.ss.wood_gf_tank.name=Wood GF Tank tile.ss.stone_gf_tank.name=Stone GF Tank +tile.ss.wood_stone_gear_shaft.name=Wood Stone Gear Shaft + tile.ss.millstone.name=Millstone tile.ss.loom.name=Loom tile.ss.sawmill.name=Sawmill From f38d405e098faf51a937690c4c1b5e506144d220 Mon Sep 17 00:00:00 2001 From: shift02 Date: Fri, 31 Oct 2014 00:14:20 +0900 Subject: [PATCH 09/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=90?= =?UTF-8?q?=E3=83=8B=E3=83=A9=E3=81=AE=E6=B0=B4=E5=85=A5=E3=82=8A=E7=93=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・空腹時間をかなり短縮 ・ポーション関係では減らないように --- .../shift/sextiarysector/api/event/VanillaFoodHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java b/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java index 45e5bc0..4cdc6d0 100644 --- a/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java +++ b/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java @@ -20,10 +20,11 @@ public void onPlayerEatenEvent(PlayerEatenEvent event) { EntityPlayer player = (EntityPlayer) event.entity; //水入り瓶 - if(food.getItem() == Items.potionitem){ + if(food.getItem() == Items.potionitem && food.getItemDamage()==0){ SextiarySectorAPI.playerManager.addMoistureStats(player, 3, 0); - player.addPotionEffect(new PotionEffect(Potion.hunger.getId(),600,0)); + player.addExhaustion(4.5f); + player.addPotionEffect(new PotionEffect(Potion.hunger.getId(),30,0)); } //きのこシチュー From e40f166febac3bdd7230a71682fe71c57101cbdd Mon Sep 17 00:00:00 2001 From: shift02 Date: Fri, 31 Oct 2014 22:39:51 +0900 Subject: [PATCH 10/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20Fluid=E3=81=8B?= =?UTF-8?q?=E3=81=BE=E3=81=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・Fluidかまどを追加。 --- .../java/shift/sextiarysector/SSBlocks.java | 7 + .../shift/sextiarysector/SSGuiHandler.java | 5 + .../java/shift/sextiarysector/SSRecipes.java | 8 + .../block/BlockFluidFurnace.java | 295 +++++++++++++++ .../block/BlockLargeFurnace.java | 7 + .../container/ContainerFluidFurnace.java | 186 +++++++++ .../sextiarysector/gui/GuiFluidFurnace.java | 146 ++++++++ .../sextiarysector/plugin/PluginTHKaguya.java | 1 - .../recipe/RecipeSimpleFluid.java | 112 ++++++ .../recipe/RecipesFluidFurnace.java | 17 + .../tileentity/TileEntityFluidFurnace.java | 353 ++++++++++++++++++ .../textures/guis/fluid_furnace.png | Bin 0 -> 1753 bytes 12 files changed, 1136 insertions(+), 1 deletion(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java create mode 100644 src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/fluid_furnace.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 428745d..8d8a6fa 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -6,6 +6,7 @@ import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.season.Season; import shift.sextiarysector.block.BlockChunkLoader; +import shift.sextiarysector.block.BlockFluidFurnace; import shift.sextiarysector.block.BlockGFTank; import shift.sextiarysector.block.BlockGearBox; import shift.sextiarysector.block.BlockGearShaft; @@ -30,6 +31,7 @@ import shift.sextiarysector.item.ItemBlockMonitor; import shift.sextiarysector.item.ItemBlockShaft; import shift.sextiarysector.tileentity.TileEntityFarmland; +import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityGearBox; import shift.sextiarysector.tileentity.TileEntityGearShaft; @@ -48,6 +50,7 @@ public class SSBlocks { public static String ID = "sextiarysector"; public static Block LargeFurnace; + public static Block fluidFurnace; public static Block woodShaft; public static Block stoneShaft; @@ -111,6 +114,10 @@ public static void initBlicks(){ GameRegistry.registerBlock(LargeFurnace, "LargeFurnace"); GameRegistry.registerTileEntity(TileEntityLargeFurnace.class, "LargeFurnace"); + fluidFurnace = new BlockFluidFurnace().setBlockName("ss.fluid_furnace").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(fluidFurnace, "FluidFurnace"); + GameRegistry.registerTileEntity(TileEntityFluidFurnace.class, "FluidFurnace"); + hole = new BlockHole().setBlockName("ss.hole").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(hole, "Hole"); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 07c16fa..0a275f5 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -4,15 +4,18 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import shift.sextiarysector.container.ContainerFluidFurnace; import shift.sextiarysector.container.ContainerGFTank; import shift.sextiarysector.container.ContainerLargeFurnace; import shift.sextiarysector.container.ContainerSimpleMachine; +import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiGFTank; import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMillstone; import shift.sextiarysector.gui.GuiSawmill; import shift.sextiarysector.gui.IServerGuiElement; +import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityLargeFurnace; import shift.sextiarysector.tileentity.TileEntitySimpleMachine; @@ -38,6 +41,7 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x switch(ID){ case 0 : return new ContainerLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); + case 1 : return new ContainerFluidFurnace(player.inventory, (TileEntityFluidFurnace) world.getTileEntity(x, y, z)); case 20: case 21: @@ -87,6 +91,7 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x switch(ID){ case 0 : return new GuiLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); + case 1 : return new GuiFluidFurnace(player.inventory, (TileEntityFluidFurnace) world.getTileEntity(x, y, z)); case 20:return new GuiMillstone(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); case 21:return new GuiLoom(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index 770fcae..1a4ed51 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -2,8 +2,10 @@ import net.minecraft.item.crafting.CraftingManager; import shift.sextiarysector.recipe.FurnaceCraftingManager; +import shift.sextiarysector.recipe.RecipeSimpleFluid; import shift.sextiarysector.recipe.RecipeSimpleMachine; import shift.sextiarysector.recipe.RecipesCore; +import shift.sextiarysector.recipe.RecipesFluidFurnace; import shift.sextiarysector.recipe.RecipesFurnaceCraft; import shift.sextiarysector.recipe.RecipesLoom; import shift.sextiarysector.recipe.RecipesMachine; @@ -14,12 +16,16 @@ public class SSRecipes { + public static RecipeSimpleFluid fluidFurnace; + public static RecipeSimpleMachine millstone; public static RecipeSimpleMachine loom; public static RecipeSimpleMachine sawmill; public static void initRecipeLists(){ + fluidFurnace = new RecipeSimpleFluid(); + millstone = new RecipeSimpleMachine(); loom = new RecipeSimpleMachine(); sawmill = new RecipeSimpleMachine(); @@ -40,6 +46,8 @@ public static void initRecipes(){ RecipesFurnaceCraft.addRecipes(fm); + RecipesFluidFurnace.addRecipes(fluidFurnace); + //GF RecipesMillstone.addRecipes(millstone); diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java b/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java new file mode 100644 index 0000000..4de62d5 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java @@ -0,0 +1,295 @@ +package shift.sextiarysector.block; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntityDirection; +import shift.sextiarysector.tileentity.TileEntityFluidFurnace; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockFluidFurnace extends BlockContainer{ + + private final Random furnaceRand = new Random(); + + private static boolean keepFurnaceInventory; + + @SideOnly(Side.CLIENT) + private IIcon furnaceIconTop; + @SideOnly(Side.CLIENT) + private IIcon[] furnaceIconFront = new IIcon[2]; + + public BlockFluidFurnace() { + super(Material.rock); + this.setHardness(1.0F); + } + + + public int getLightValue(IBlockAccess world, int x, int y, int z) + { + TileEntityFluidFurnace tileentityfurnace = (TileEntityFluidFurnace)world.getTileEntity(x, y, z); + if(tileentityfurnace.isFuel())return 15; + return 0; + } + + @Override + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + { + if (par1World.isRemote) + { + return true; + } + else + { + TileEntityFluidFurnace tileentityfurnace = (TileEntityFluidFurnace)par1World.getTileEntity(par2, par3, par4); + + if (tileentityfurnace != null) + { + par5EntityPlayer.openGui(SextiarySector.instance, 1, par1World, par2, par3, par4); + } + + return true; + } + } + + @Override + public void onBlockAdded(World par1World, int par2, int par3, int par4) + { + super.onBlockAdded(par1World, par2, par3, par4); + } + + private void setDefaultDirection(World par1World, int par2, int par3, int par4) + { + if (!par1World.isRemote) + { + Block block = par1World.getBlock(par2, par3, par4 - 1); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); + + TileEntityDirection tileEntity = (TileEntityDirection)par1World.getTileEntity(par2, par3, par4); + + + byte b0 = 3; + + if (block.func_149730_j() && !block1.func_149730_j()) + { + b0 = 3; + } + + if (block1.func_149730_j() && !block.func_149730_j()) + { + b0 = 2; + } + + if (block2.func_149730_j() && !block3.func_149730_j()) + { + b0 = 5; + } + + if (block3.func_149730_j() && !block2.func_149730_j()) + { + b0 = 4; + } + + //par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); + tileEntity.direction = ForgeDirection.getOrientation(b0); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int par1, int par2) + { + + return par1 == 1 ? this.furnaceIconTop : (par1 == 0 ? this.furnaceIconTop : (par1 != 3 ? this.blockIcon : this.furnaceIconFront[1])); + + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) + { + + TileEntityFluidFurnace tileEntity = (TileEntityFluidFurnace)p_149673_1_.getTileEntity(x, y, z); + + int meta = tileEntity.getDirection().ordinal();//p_149673_1_.getBlockMetadata(x, y, z); + + return side == 1 ? this.furnaceIconTop : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isFuel() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); + + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon("furnace_side"); + this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); + this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); + this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:furnace_top"); + } + + @Override + public TileEntity createNewTileEntity(World par1World, int p_149915_2_) + { + return new TileEntityFluidFurnace(); + } + + @Override + public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) + { + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + TileEntityDirection tileEntity = (TileEntityDirection)par1World.getTileEntity(par2, par3, par4); + + if (l == 0) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[2]; + } + + if (l == 1) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[5]; + } + + if (l == 2) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[3]; + } + + if (l == 3) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[4]; + } + + } + + @Override + public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) + { + if (!keepFurnaceInventory) + { + TileEntityFluidFurnace tileentityfurnace = (TileEntityFluidFurnace)par1World.getTileEntity(par2, par3, par4); + + if (tileentityfurnace != null) + { + for (int j1 = 0; j1 < tileentityfurnace.getSizeInventory(); ++j1) + { + ItemStack itemstack = tileentityfurnace.getStackInSlot(j1); + + this.dropItem(itemstack, par1World, par2, par3, par4); + + } + + par1World.func_147453_f(par2, par3, par4, par5); + } + } + + super.breakBlock(par1World, par2, par3, par4, par5, par6); + } + + private void dropItem(ItemStack itemstack ,World par1World,int par2, int par3, int par4){ + + if (itemstack != null) + { + float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + + while (itemstack.stackSize > 0) + { + int k1 = this.furnaceRand.nextInt(21) + 10; + + if (k1 > itemstack.stackSize) + { + k1 = itemstack.stackSize; + } + + itemstack.stackSize -= k1; + EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float)this.furnaceRand.nextGaussian() * f3; + entityitem.motionY = (float)this.furnaceRand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.furnaceRand.nextGaussian() * f3; + par1World.spawnEntityInWorld(entityitem); + } + } + + } + + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) + { + TileEntityFluidFurnace tileentityfurnace = (TileEntityFluidFurnace)p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); + + + if (tileentityfurnace.isFuel()) + { + int l = p_149734_1_.getBlockMetadata(p_149734_2_, p_149734_3_, p_149734_4_); + float f = (float)p_149734_2_ + 0.5F; + float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; + float f2 = (float)p_149734_4_ + 0.5F; + float f3 = 0.52F; + float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; + + if (l == 4) + { + p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + } + else if (l == 5) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + } + else if (l == 2) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + } + else if (l == 3) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + } + } + } + + @Override + public boolean hasComparatorInputOverride() + { + return true; + } + + @Override + public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) + { + return Container.calcRedstoneFromInventory((IInventory)par1World.getTileEntity(par2, par3, par4)); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockLargeFurnace.java b/src/main/java/shift/sextiarysector/block/BlockLargeFurnace.java index f29caa2..3b15548 100644 --- a/src/main/java/shift/sextiarysector/block/BlockLargeFurnace.java +++ b/src/main/java/shift/sextiarysector/block/BlockLargeFurnace.java @@ -42,6 +42,13 @@ public BlockLargeFurnace() { this.setHardness(1.0F); } + public int getLightValue(IBlockAccess world, int x, int y, int z) + { + TileEntityLargeFurnace tileentityfurnace = (TileEntityLargeFurnace)world.getTileEntity(x, y, z); + if(tileentityfurnace.isBurning())return 15; + return 0; + } + @Override public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { diff --git a/src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java b/src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java new file mode 100644 index 0000000..ca833bd --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java @@ -0,0 +1,186 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.inventory.SlotFurnace; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.tileentity.TileEntityFurnace; +import shift.sextiarysector.tileentity.TileEntityFluidFurnace; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ContainerFluidFurnace extends Container +{ + private TileEntityFluidFurnace tileFurnace; + private int lastFuel; + private int lastFuelMax; + private int workProgress; + + public ContainerFluidFurnace(InventoryPlayer p_i1812_1_, TileEntityFluidFurnace p_i1812_2_) + { + this.tileFurnace = p_i1812_2_; + this.addSlotToContainer(new Slot(p_i1812_2_, 0, 56, 17)); + this.addSlotToContainer(new Slot(p_i1812_2_, 1, 56, 53)); + this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 2, 107, 53)); + this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 3, 125, 53)); + this.addSlotToContainer(new Slot(p_i1812_2_, 4, 152, 17)); + this.addSlotToContainer(new Slot(p_i1812_2_, 5, 152, 53)); + int i; + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(p_i1812_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(p_i1812_1_, i, 8 + i * 18, 142)); + } + } + + public void addCraftingToCrafters(ICrafting p_75132_1_) + { + super.addCraftingToCrafters(p_75132_1_); + p_75132_1_.sendProgressBarUpdate(this, 0, this.tileFurnace.fuel); + p_75132_1_.sendProgressBarUpdate(this, 1, this.tileFurnace.fuelMax); + p_75132_1_.sendProgressBarUpdate(this, 2, this.tileFurnace.machineWorkProgressTime); + } + + /** + * Looks for changes made in the container, sends them to every listener. + */ + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + + for (int i = 0; i < this.crafters.size(); ++i) + { + ICrafting icrafting = (ICrafting)this.crafters.get(i); + + if (this.lastFuel != this.tileFurnace.fuel) + { + icrafting.sendProgressBarUpdate(this, 0, this.tileFurnace.fuel); + } + + if (this.lastFuelMax != this.tileFurnace.fuelMax) + { + icrafting.sendProgressBarUpdate(this, 1, this.tileFurnace.fuelMax); + } + + if (this.workProgress != this.tileFurnace.machineWorkProgressTime) + { + icrafting.sendProgressBarUpdate(this, 2, this.tileFurnace.machineWorkProgressTime); + } + } + + this.lastFuel = this.tileFurnace.fuel; + this.lastFuelMax = this.tileFurnace.fuelMax; + this.workProgress = this.tileFurnace.machineWorkProgressTime; + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int p_75137_1_, int p_75137_2_) + { + if (p_75137_1_ == 0) + { + this.tileFurnace.fuel = p_75137_2_; + } + + if (p_75137_1_ == 1) + { + this.tileFurnace.fuelMax = p_75137_2_; + } + + if (p_75137_1_ == 2) + { + this.tileFurnace.machineWorkProgressTime = p_75137_2_; + } + } + + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return this.tileFurnace.isUseableByPlayer(p_75145_1_); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot)this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ == 2) + { + if (!this.mergeItemStack(itemstack1, 3, 39, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (p_82846_2_ != 1 && p_82846_2_ != 0) + { + if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return null; + } + } + else if (TileEntityFurnace.isItemFuel(itemstack1)) + { + if (!this.mergeItemStack(itemstack1, 1, 2, false)) + { + return null; + } + } + else if (p_82846_2_ >= 3 && p_82846_2_ < 30) + { + if (!this.mergeItemStack(itemstack1, 30, 39, false)) + { + return null; + } + } + else if (p_82846_2_ >= 30 && p_82846_2_ < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 3, 39, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack)null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java b/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java new file mode 100644 index 0000000..81236a2 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java @@ -0,0 +1,146 @@ +package shift.sextiarysector.gui; + +import java.text.NumberFormat; +import java.util.ArrayList; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.container.ContainerFluidFurnace; +import shift.sextiarysector.tileentity.TileEntityFluidFurnace; + +public class GuiFluidFurnace extends GuiContainer +{ + private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("sextiarysector:textures/guis/fluid_furnace.png"); + private TileEntityFluidFurnace tileFurnace; + + public GuiFluidFurnace(InventoryPlayer p_i1091_1_, TileEntityFluidFurnace p_i1091_2_) + { + super(new ContainerFluidFurnace(p_i1091_1_, p_i1091_2_)); + this.tileFurnace = p_i1091_2_; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + String s = this.tileFurnace.hasCustomInventoryName() ? this.tileFurnace.getInventoryName() : I18n.format(this.tileFurnace.getInventoryName(), new Object[0]); + this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(furnaceGuiTextures); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + + + if (this.tileFurnace.isFuel()) + { + int i1 = this.tileFurnace.getEnergyProgressScaled(13); + this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1); + i1 = this.tileFurnace.getWorkProgressScaled(24); + this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); + } + + //Fluid + if (this.tileFurnace.isFluid()) + { + //FluidStack f = this.tileFurnace.getTank().getFluid(); + this.drawFluidTank(k + 107,l + 15,this.tileFurnace.getTank(),34,36); + + } + this.mc.getTextureManager().bindTexture(furnaceGuiTextures); + this.drawTexturedModalRect(k + 108, l + 17, 176, 31, 32, 36); + + } + + @Override + public void drawScreen(int par1, int par2, float par3) + { + super.drawScreen(par1, par2, par3); + + ArrayList arraylist = new ArrayList(); + + String f = "None"; + + if (this.tileFurnace.isFluid()) + { + f = this.tileFurnace.getTank().getFluid().getFluid().getName(); + } + + NumberFormat nfNum = NumberFormat.getNumberInstance(); + + arraylist.add(0,"" + EnumChatFormatting.RESET+ "Fluid Tank" + EnumChatFormatting.RESET ); + arraylist.add(1,"" + EnumChatFormatting.GRAY + "Fluid : "+f); + arraylist.add(2, ""+ EnumChatFormatting.GRAY + "Amount : " + nfNum.format(this.tileFurnace.getTank().getFluidAmount()) + " / " + nfNum.format(this.tileFurnace.getTank().getCapacity()) + " mB"); + + GL11.glPushMatrix(); + if (this.func_146978_c(106, 14, 36, 38, par1, par2)) + { + drawHoveringText(arraylist, par1, par2,fontRendererObj); + } + GL11.glPopMatrix(); + + + + } + + public void drawFluidTank(int x, int y, FluidTank fluidTank, int width, int height) { + + FluidStack fluidStack = fluidTank.getFluid(); + + ResourceLocation r; + if(fluidStack.getFluid().getSpriteNumber()==0){ + r = TextureMap.locationBlocksTexture; + }else{ + r = TextureMap.locationItemsTexture; + } + + this.mc.getTextureManager().bindTexture(r); + this.setColor3ubFromInt(fluidStack.getFluid().getColor(fluidStack)); + + int widthR = width;//*(fluidTank.getFluidAmount()/fluidTank.getCapacity()); + int heightR = (int) (width*((float)fluidTank.getFluidAmount()/(float)fluidTank.getCapacity())); + + int yR = y+(height-heightR); + + int widthL = 0; + int heightL = 0; + IIcon icon = (fluidStack.getFluid().getIcon(fluidStack)); + + for (int i = 0; i < widthR; i += 16) { + + for (int j = 0; j < heightR; j += 16) { + + widthL = Math.min(widthR - i, 16); + heightL = Math.min(heightR - j, 16); + this.drawTexturedModelRectFromIcon(x + i, yR + j, icon, widthL, heightL); + + } + } + + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); + + } + + public static void setColor3ubFromInt(int color) { + + GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java b/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java index 28c9a3f..0bd0556 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java @@ -12,7 +12,6 @@ public class PluginTHKaguya { public static void initPlugin() { - System.out.println("BBBBBBBBBBBBBBBBB"); thSpellCard = GameRegistry.findItem("THKaguyaMod", "Spell Card"); MCEconomyAPI.addPurchaseItem(new ItemStack(thSpellCard,1,OreDictionary.WILDCARD_VALUE), 500); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java new file mode 100644 index 0000000..e62a227 --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java @@ -0,0 +1,112 @@ +package shift.sextiarysector.recipe; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + +public class RecipeSimpleFluid { + + + protected final HashMap metaSimpleMachineList = new HashMap(); + protected final HashMap oreSimpleMachineList = new HashMap(); + + public void add(ItemStack par1ItemStack, ItemStack par2ItemStack, FluidStack par3FluidStack) + { + metaSimpleMachineList.put(par1ItemStack, new Object[]{par2ItemStack,par3FluidStack}); + } + + public void add(String par1String, ItemStack par2ItemStack, FluidStack par3FluidStack) + { + oreSimpleMachineList.put(par1String, new Object[]{par2ItemStack,par3FluidStack}); + } + + public ItemStack getResult(ItemStack item) + { + if (item == null) + { + return null; + } + for (String key : oreSimpleMachineList.keySet()) { + ArrayList items = OreDictionary.getOres(key); + for(int i = 0; i< items.size() ; i++){ + if(checkItem(item,items.get(i))){ + return ((ItemStack) oreSimpleMachineList.get(key)[0]).copy(); + } + } + } + + Iterator iterator = this.metaSimpleMachineList.entrySet().iterator(); + Entry entry; + + do + { + if (!iterator.hasNext()) + { + return null; + } + + entry = (Entry)iterator.next(); + } + while (!this.checkItem(item, (ItemStack)entry.getKey())); + + return (ItemStack) ((Object[])entry.getValue())[0]; + + //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); + } + + public FluidStack getFluidResult(ItemStack item) + { + if (item == null) + { + return null; + } + for (String key : oreSimpleMachineList.keySet()) { + ArrayList items = OreDictionary.getOres(key); + for(int i = 0; i< items.size() ; i++){ + if(checkItem(item,items.get(i))){ + return ((FluidStack) oreSimpleMachineList.get(key)[1]).copy(); + } + } + } + + Iterator iterator = this.metaSimpleMachineList.entrySet().iterator(); + Entry entry; + + do + { + if (!iterator.hasNext()) + { + return null; + } + + entry = (Entry)iterator.next(); + } + while (!this.checkItem(item, (ItemStack)entry.getKey())); + + return (FluidStack) ((Object[])entry.getValue())[1]; + + //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); + } + + private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } + + public Map getMetaList() + { + return metaSimpleMachineList; + } + + public Map getOreList() + { + return oreSimpleMachineList; + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java new file mode 100644 index 0000000..1d06a4a --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java @@ -0,0 +1,17 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SSItems; + +public class RecipesFluidFurnace { + + public static void addRecipes(RecipeSimpleFluid recipe) + { + + recipe.add(new ItemStack(SSItems.stringBobbin,1),new ItemStack(SSItems.cloth, 1), new FluidStack(FluidRegistry.WATER, 1000)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java new file mode 100644 index 0000000..34a9193 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java @@ -0,0 +1,353 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntityFurnace; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.container.ItemBox; + +public class TileEntityFluidFurnace extends TileEntityDirection implements ISidedInventory, IFluidHandler { + + protected static final int[] slots_top = new int[] { 0 }; + protected static final int[] slots_bottom = new int[] { 2, 1 }; + protected static final int[] slots_sides = new int[] { 1 }; + + //0 素材 ,1 燃料 ,2 完成品 ,3 素材のコンテナ ,4 空のボトル , 5 液体の入ったボトル + protected ItemBox items = new ItemBox("Base", 6); + + //液体 + private FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10); + + //作業の進捗 + public int machineWorkProgressTime; + + //作業の進捗の最大値 この数字になると完了する + public int machineMaxProgressTime = 200; + + //燃料と投入されている燃料のマックス状態の量 + public int fuel; + public int fuelMax; + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + } + + public void updateServerEntity() + { + if(fuel>0){ + fuel--; + if(fuel==0){ + this.fuelMax=0; + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + //this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + }else{ + if(this.canWork()){ + this.chargeFuel(); + } + + } + + if(this.isFuel() && this.canWork()){ + + machineWorkProgressTime++; + + if(machineWorkProgressTime>=machineMaxProgressTime){ + this.workItem(); + machineWorkProgressTime=0; + } + + } + + } + + private void chargeFuel(){ + + if(TileEntityFurnace.isItemFuel(this.items.getStackInSlot(1))){ + this.fuel = this.fuelMax = TileEntityFurnace.getItemBurnTime(this.items.getStackInSlot(1)); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + public boolean isFuel() + { + return this.fuel > 0; + } + + public boolean canWork() + { + if (this.items.getStackInSlot(0) == null) + { + return false; + } + else + { + ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); + FluidStack fluidstack = this.getFluidResult(this.items.getStackInSlot(0)); + if (itemstack == null && fluidstack == null) return false; + return this.checkItem(itemstack) && this.checkFluid(fluidstack); + } + } + + private boolean checkItem(ItemStack itemstack){ + + if (this.items.getStackInSlot(2) == null || itemstack == null) return true; + if (!this.items.getStackInSlot(2).isItemEqual(itemstack)) return false; + int result = this.items.getStackInSlot(2).stackSize + itemstack.stackSize; + return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); + } + + private boolean checkFluid(FluidStack fluidstack){ + + if (this.getTank().getFluidAmount()==0 || fluidstack == null) return true; + if (!this.getTank().getFluid().isFluidEqual(fluidstack)) return false; + int result = this.getTank().getFluidAmount() + fluidstack.amount; + return (result <= this.getTank().getCapacity()); + + } + + public void workItem() + { + if (this.canWork()) + { + ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); + FluidStack fluidstack = this.getFluidResult(this.items.getStackInSlot(0)); + + //item + if (this.items.getStackInSlot(2) == null) + { + this.setInventorySlotContents(2, itemstack.copy()); + } + else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) + { + this.items.getStackInSlot(2).stackSize += itemstack.stackSize; + } + + //fluid + this.getTank().fill(fluidstack, true); + + this.items.reduceStackSize(0, 1); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + } + + + private ItemStack getResult(ItemStack stackInSlot) { + return SSRecipes.fluidFurnace.getResult(stackInSlot); + } + + private FluidStack getFluidResult(ItemStack stackInSlot) { + return SSRecipes.fluidFurnace.getFluidResult(stackInSlot); + } + + + //GUI + public int getWorkProgressScaled(int par1) + { + return this.machineWorkProgressTime / (machineMaxProgressTime / par1); + } + + public int getEnergyProgressScaled(int par1) + { + return (int) (this.fuel / (this.fuelMax / par1)); + } + + public FluidTank getTank() { + return tank; + } + + public boolean isFluid(){ + return this.getTank().getFluidAmount() > 0; + } + + //IInventory関係 + @Override + public int getSizeInventory() { + return items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return items.getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return items.decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return items.getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + items.setInventorySlotContents(i, itemstack); + } + + @Override + public String getInventoryName() { + return "gui.fluid_furnace";//+SimpleMachine.values()[this.worldObj.getBlockMetadata(xCoord, yCoord, zCoord)].icon+".name"; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return items.getInventoryStackLimit(); + } + + @Override + public void markDirty(){ + super.markDirty(); + items.onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer + .getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + if (i == 1) { + return GearForceItem.manager.isGearForceItem(itemstack); + } + + return i != 2; + } + + //ISidedInventory関係 + @Override + public int[] getAccessibleSlotsFromSide(int var1) { + return var1 == 0 ? slots_bottom : (var1 == 1 ? slots_top : slots_sides); + } + + @Override + public boolean canInsertItem(int i, ItemStack itemstack, int j) { + return this.isItemValidForSlot(i, itemstack); + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) + { + return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket; + } + + //IFluidHandler関係 + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + return 0;//tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(getTank().getFluid())) + { + return null; + } + return getTank().drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return getTank().drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + return false; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { getTank().getInfo() }; + } + + //NBT関係 + @Override + public void readFromNBT(NBTTagCompound nbt) { + + super.readFromNBT(nbt); + items.readFromNBT(nbt); + getTank().readFromNBT(nbt); + this.machineWorkProgressTime = nbt.getShort("WorkTime"); + this.fuel = nbt.getInteger("fuel"); + this.fuelMax = nbt.getInteger("fuelMax"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + + super.writeToNBT(nbt); + items.writeToNBT(nbt); + getTank().writeToNBT(nbt); + nbt.setShort("WorkTime", (short)this.machineWorkProgressTime); + nbt.setInteger("fuel", this.fuel); + nbt.setInteger("fuelMax", this.fuelMax); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ + this.readFromNBT(pkt.func_148857_g()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + +} diff --git a/src/main/resources/assets/sextiarysector/textures/guis/fluid_furnace.png b/src/main/resources/assets/sextiarysector/textures/guis/fluid_furnace.png new file mode 100644 index 0000000000000000000000000000000000000000..50edaf5eab78ea124ec002ae1a263ffb9984dc65 GIT binary patch literal 1753 zcmcIkc{J2p9KSP0hQuUN%!KNdGNBS4#V?PTC$!Ha+atR?ON@G&882ICs5y~!lrma0 zwvKINnNqSP4~Z-@WnYSh$ujeP<8|IY?{v=l=iPhm`QFdxd%oNK-t)bB%+_+9jEW2Z zU>(8A`~(09_=*7NHL!3D&i91H8aHc8b08A$oN6W=W~2kH>_Y&Ms}mnY`E|c3n3TFe zu(6Qpmr;{dQIve)avC=DB$yvQ75;AOeUYCk5i9kH>1GuBMLsaK;dYipQ2<&|1znds zRP32#kh?!x`?mGQ7vZ}a8L#X552DiVM;a>|g&y6xpr-kLpR<&Gd_;=J^PSeD1rs&h zYxu97mnsK{HKgL~OGEU1knxuzBF*?a?3Gyy!2*-PTE5-b%U@c__K_V*IQ}`+V{^n; zUk;Jq=$kb|^XA){GC)2n>FRR_&cJJD~U=)h!NI1UY^t{)ez6B(ICiwI|Pd)D2C|+|olp#E8WW zgB@$TJ$iJMjiMXxA(7M+)v|dy3&~#ba{R)3JUF?SU>#jvkcNCW`Qgm^St82}{rkzM zq@F3Zj5-)i^x3m=dO$1wPG4UidzR%=C479?8gQM>`~${8rLUJ4bAFRgx<2=A`^wUS z>R#rIshnu(qYLGNr*LEpg@UZ_`8Z6Bl;HiE>xyb>2I2;I)4ZKS4{0rwM;fluV7-nM z3YcS&&XQ335jOTU0(zE31=L;Hrj!6_;H2GU@LRv5QGbb78w!-xZB00k$1Ouq;}To| z^z69~Q0H=$fu>N5a|GM8$q49AHyt5{Eo;^E@gg}_HEeQfs)bD^mAyZkI0hi8*ET-s zG5Dr~uZ9_$B-9BCjBxDOvizDW!4yi($nipy_xQWc?V4nSI_j4*pJD!utc41g+t^#2 zu&)dAa&Eb=duv~Bw$pMY5=XVo$(=qg|H{ z?(pjBlrG39XOzT?iYHzpMo~r)rb;z(uEU27?1+VvS1QhDLG)c@9M#Jzu3Dn}QI6+j z%FVX=^P^yVnTE6ldb2sWJ<=)1(WxsGH*XPZe;brYgx4sR;--G=)lM6Fx$I4yxm| zmO!^`LG7pVCBfCJ5NP)Mr=2~EFJ?04f;#6~38}*_p!8IF-V?G(Q*nd8)|rK;_*Wy% zFkh3vRt6}bYtvn}egn|W6;wT?Cj)95UZ@=^i3Gdd-Z`EE&^>{>Sk^|p)mK&m$8xnW z0OLbc7tfqhI!WS9c7uS$nM1sc>UxNf)UNcKou;*y3HsxfBvDVzoU zx8afchK7b{ji|uza6_Y*A`~2b)e#y%03ZPdMn@6fKwNz@NkV&^mz6}LCAw$&CGmK5 zL`9G*l|#cf)wj1_4@wM~3SwJ#D!_JB@Gn>2CA6CHA*DrzNdo8%FOsE)tJejWX!qnT;ydDhx{3wGAb@ zrmR*jSJkfq`?j?`i(GxK@0E=PCt-bDvQy->4na`)k71H|p_4NH;?_U_ Date: Sat, 1 Nov 2014 23:32:58 +0900 Subject: [PATCH 11/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=83=96?= =?UTF-8?q?=E3=83=AD=E3=83=83=E3=82=AF=E3=83=9C=E3=83=88=E3=83=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・ブロックボトルを追加 ・Shaftを設置時にクラッシュするのを修正 --- .../java/shift/sextiarysector/SSBlocks.java | 9 + .../java/shift/sextiarysector/SSItems.java | 5 + .../sextiarysector/block/BlockBottle.java | 88 +++++++ .../sextiarysector/block/BlockMonitor.java | 1 + .../sextiarysector/item/ItemBlockBottle.java | 210 +++++++++++++++++ .../sextiarysector/item/ItemBlockShaft.java | 2 +- .../sextiarysector/proxy/ClientProxy.java | 8 + .../sextiarysector/proxy/CommonProxy.java | 2 + .../renderer/block/RendererBlockBottle.java | 217 ++++++++++++++++++ .../renderer/model/ModelBlockBottle.java | 51 ++++ .../tileentity/TileEntityBlockBottle.java | 113 +++++++++ .../textures/items/drink/empty_bottle.png | Bin 0 -> 306 bytes .../textures/models/block_bottle.png | Bin 0 -> 647 bytes 13 files changed, 705 insertions(+), 1 deletion(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockBottle.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemBlockBottle.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelBlockBottle.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/drink/empty_bottle.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/block_bottle.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 8d8a6fa..135bcfc 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -5,6 +5,7 @@ import net.minecraft.init.Blocks; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.season.Season; +import shift.sextiarysector.block.BlockBottle; import shift.sextiarysector.block.BlockChunkLoader; import shift.sextiarysector.block.BlockFluidFurnace; import shift.sextiarysector.block.BlockGFTank; @@ -26,10 +27,12 @@ import shift.sextiarysector.block.BlockSimpleMachine; import shift.sextiarysector.block.BlockSmallWindmill; import shift.sextiarysector.block.BlockWindmill; +import shift.sextiarysector.item.ItemBlockBottle; import shift.sextiarysector.item.ItemBlockCrop; import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMonitor; import shift.sextiarysector.item.ItemBlockShaft; +import shift.sextiarysector.tileentity.TileEntityBlockBottle; import shift.sextiarysector.tileentity.TileEntityFarmland; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityGFTank; @@ -52,6 +55,8 @@ public class SSBlocks { public static Block LargeFurnace; public static Block fluidFurnace; + public static Block bottle; + public static Block woodShaft; public static Block stoneShaft; @@ -118,6 +123,10 @@ public static void initBlicks(){ GameRegistry.registerBlock(fluidFurnace, "FluidFurnace"); GameRegistry.registerTileEntity(TileEntityFluidFurnace.class, "FluidFurnace"); + bottle = new BlockBottle().setBlockName("ss.bottle"); + GameRegistry.registerBlock(bottle,ItemBlockBottle.class, "Bottle"); + GameRegistry.registerTileEntity(TileEntityBlockBottle.class, "Bottle"); + hole = new BlockHole().setBlockName("ss.hole").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(hole, "Hole"); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index f4a9e16..06779f4 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -55,6 +55,8 @@ public class SSItems { //飲み物 public static Item drinkingWaterSmallBottle; + //public static Item bottle; + //道具 public static Item woodScoop; public static Item stoneScoop; @@ -154,6 +156,9 @@ public static void initItems(){ drinkingWaterSmallBottle = new ItemFoodDrink(0, 3.5f, 2, 6.5f, 0, 0, false).setDrink().setUnlocalizedName("ss.drinking_water_small_bottle").setTextureName("sextiarysector:drink/drinking_water_small_bottle").setContainerItem(Items.glass_bottle); GameRegistry.registerItem(drinkingWaterSmallBottle, "DrinkingWaterSmallBottle"); + //bottle = new ItemBlockBottle().setUnlocalizedName("ss.bottle").setTextureName("sextiarysector:drink/empty_bottle"); + //GameRegistry.registerItem(bottle, "Bottle"); + //道具 woodScoop = new ItemScoop(ToolMaterial.WOOD).setUnlocalizedName("ss.wood_scoop").setTextureName("wood_scoop"); diff --git a/src/main/java/shift/sextiarysector/block/BlockBottle.java b/src/main/java/shift/sextiarysector/block/BlockBottle.java new file mode 100644 index 0000000..3a62264 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockBottle.java @@ -0,0 +1,88 @@ +package shift.sextiarysector.block; + +import java.util.Random; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.item.ItemBlockBottle; +import shift.sextiarysector.tileentity.TileEntityBlockBottle; + +public class BlockBottle extends BlockContainer{ + + public BlockBottle() { + super(Material.glass); + this.setHardness(0.4F); + this.setStepSound(soundTypeGlass); + this.setBlockBounds(2.0f/16.0f, 0, 2.0f/16.0f, 14.0f/16.0f, 1, 14.0f/16.0f); + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + { + TileEntityBlockBottle tileEntity = (TileEntityBlockBottle)world.getTileEntity(x, y, z); + + if(par5EntityPlayer.isSneaking()){ + + if(!world.isRemote){ + + ItemStack stack; + + if(tileEntity.hasFluid()){ + stack = new ItemStack(this,1,tileEntity.getFluidID()); + ((ItemBlockBottle)stack.getItem()).fill(stack, tileEntity.getFluidStack(), true); + }else{ + stack = new ItemStack(this,1); + } + + EntityItem item = new EntityItem(world, x+0.5d, y+0.5d, z+0.5d, stack); + + world.spawnEntityInWorld(item); + + world.setBlockToAir(x, y, z); + world.removeTileEntity(x, y, z); + + }else{ + return true; + } + + } + + return false; + + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + public int quantityDropped(Random p_149745_1_) + { + return 0; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.bottleType; + } + + @Override + public TileEntity createNewTileEntity(World world, int p_149915_2_) { + return new TileEntityBlockBottle(); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockMonitor.java b/src/main/java/shift/sextiarysector/block/BlockMonitor.java index b0ea436..4df9c97 100644 --- a/src/main/java/shift/sextiarysector/block/BlockMonitor.java +++ b/src/main/java/shift/sextiarysector/block/BlockMonitor.java @@ -69,6 +69,7 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p world.spawnEntityInWorld(item); world.setBlockToAir(x, y, z); + world.removeTileEntity(x, y, z); return true; } return false; diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java b/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java new file mode 100644 index 0000000..41f28c7 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java @@ -0,0 +1,210 @@ +package shift.sextiarysector.item; + +import java.text.NumberFormat; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.tileentity.TileEntityBlockBottle; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemBlockBottle extends ItemBlock implements IFluidContainerItem{ + + protected int capacity = FluidContainerRegistry.BUCKET_VOLUME*64; + + public ItemBlockBottle(Block block){ + super(block); + this.setHasSubtypes(true); + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + } + + /* Block */ + @Override + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) + { + boolean result = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ,metadata); + + if(result && world.getTileEntity(x, y, z) instanceof TileEntityBlockBottle){ + TileEntityBlockBottle tile = (TileEntityBlockBottle)world.getTileEntity(x, y, z); + tile.fill(ForgeDirection.UP, this.getFluid(stack), true); + } + + return result; + + } + + + + /* Item */ + @SideOnly(Side.CLIENT) + public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) + { + p_150895_3_.add(new ItemStack(p_150895_1_, 1, 0)); + + for(int i=1;i= capacity) + { + container.stackTagCompound.removeTag("Fluid"); + + if (container.stackTagCompound.hasNoTags()) + { + container.stackTagCompound = null; + } + return stack; + } + + NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid"); + fluidTag.setInteger("Amount", fluidTag.getInteger("Amount") - maxDrain); + container.stackTagCompound.setTag("Fluid", fluidTag); + } + return stack; + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockShaft.java b/src/main/java/shift/sextiarysector/item/ItemBlockShaft.java index a0de9db..17fd6ad 100644 --- a/src/main/java/shift/sextiarysector/item/ItemBlockShaft.java +++ b/src/main/java/shift/sextiarysector/item/ItemBlockShaft.java @@ -20,7 +20,7 @@ public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, i { boolean result = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ,metadata); - if(result){ + if(result && world.getTileEntity(x, y, z) instanceof TileEntityDirection){ TileEntityDirection tile = (TileEntityDirection)world.getTileEntity(x, y, z); tile.direction = ForgeDirection.getOrientation(side); } diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index c1e8e7a..e61b537 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -4,6 +4,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; +import shift.sextiarysector.renderer.block.RendererBlockBottle; import shift.sextiarysector.renderer.block.RendererChest; import shift.sextiarysector.renderer.block.RendererFarmland; import shift.sextiarysector.renderer.block.RendererGearShaft; @@ -13,6 +14,7 @@ import shift.sextiarysector.renderer.block.RendererSmallWindmill; import shift.sextiarysector.renderer.block.RendererWindmill; import shift.sextiarysector.renderer.item.RenderGF; +import shift.sextiarysector.tileentity.TileEntityBlockBottle; import shift.sextiarysector.tileentity.TileEntityGearShaft; import shift.sextiarysector.tileentity.TileEntityMonitor; import shift.sextiarysector.tileentity.TileEntitySSChest; @@ -37,6 +39,8 @@ public void setCustomRenderers() { this.holeType = RenderingRegistry.getNextAvailableRenderId(); + this.bottleType = RenderingRegistry.getNextAvailableRenderId(); + this.ShaftRenderType = RenderingRegistry.getNextAvailableRenderId(); this.GearShaftRenderType = RenderingRegistry.getNextAvailableRenderId(); @@ -52,6 +56,8 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererHole()); + RenderingRegistry.registerBlockHandler(new RendererBlockBottle()); + RenderingRegistry.registerBlockHandler(new RendererShaft()); RenderingRegistry.registerBlockHandler(new RendererGearShaft()); @@ -74,6 +80,8 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShaft.class, new RendererShaft()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlockBottle.class, new RendererBlockBottle()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGearShaft.class, new RendererGearShaft()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallWindmill.class, new RendererSmallWindmill()); diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index def2778..7a3b495 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -7,6 +7,8 @@ public class CommonProxy { public int holeType; + public int bottleType; + public int ShaftRenderType; public int GearShaftRenderType; diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java b/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java new file mode 100644 index 0000000..73e53a2 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java @@ -0,0 +1,217 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.fluids.FluidRegistry; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.renderer.model.ModelBlockBottle; +import shift.sextiarysector.tileentity.TileEntityBlockBottle; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererBlockBottle extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + private static final ResourceLocation bottleTextures = new ResourceLocation("sextiarysector:textures/models/block_bottle.png"); + + private final Minecraft mc = FMLClientHandler.instance().getClient(); + + private final RenderBlocks blockrender = new RenderBlocks(); + + static public ModelBlockBottle modelBottle = new ModelBlockBottle(); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + + GL11.glPushMatrix(); + + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + + this.bind(MC_BLOCK_SHEET); + + //GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + + if(metadata!=0&&FluidRegistry.getFluid(metadata)!=null){ + + IIcon icon = FluidRegistry.getFluid(metadata).getIcon(); + + setColor3ubFromInt(FluidRegistry.getFluid(metadata).getColor()); + + float i = 0.0625f; + + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + + renderer.renderAllFaces = true; + renderer.setOverrideBlockTexture(icon); + renderer.setRenderBounds(-5.5f/16.0f, -7.5f/16.0f, -5.5f/16.0f, 5.5f/16.0f, (10.0f/16.0d)-(7.5f/16.0f), 5.5f/16.0f); + Tessellator tessellator = Tessellator.instance; + + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + + renderer.renderAllFaces = false; + renderer.clearOverrideBlockTexture(); + + } + + + + this.bind(bottleTextures); + + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + GL11.glRotatef(180, 1, 0, 0); + + GL11.glColor3f(1,1,1); + + + modelBottle.render(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,RenderBlocks renderer) { + return true; + } + + @Override + public boolean shouldRender3DInInventory(int mate) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.bottleType; + } + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + + GL11.glPushMatrix(); + + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_LIGHT0); + + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + + if(((TileEntityBlockBottle)tileentity).hasFluid()){ + + IIcon icon = ((TileEntityBlockBottle)tileentity).getFluidIcon(); + float fluidHeight = ((TileEntityBlockBottle)tileentity).getFluidHeight(); + Block block = tileentity.getBlockType(); + + //float i = 0.3125f; + + this.bindTexture(MC_BLOCK_SHEET); + + this.setColor3ubFromInt(((TileEntityBlockBottle)tileentity).getFluidColor()); + + blockrender.blockAccess =tileentity.getWorldObj(); + + blockrender.renderAllFaces = true; + blockrender.setOverrideBlockTexture(icon); + //blockrender.setRenderBounds(i*2.3, -0.0625*6, i*2.3, 1-i*2.5,0.0625*1.8f, 1-i*2.3); + blockrender.setRenderBounds(-5.5f/16.0f, -7.5f/16.0f, -5.5f/16.0f, 5.5f/16.0f ,fluidHeight-7.5f/16.0f, 5.5f/16.0f); + //blockrender.setRenderBounds(i, 0.0625*2, i, 1-i,0.0625*8f, 1-i); + //blockrender.renderStandardBlock(Block.blocksList[tileentity.getWorldObj().getBlockId(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord)], tileentity.xCoord, tileentity.yCoord,tileentity.zCoord); + + + Tessellator tessellator = Tessellator.instance; + + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + blockrender.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + blockrender.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + blockrender.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + blockrender.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + blockrender.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + blockrender.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + + blockrender.renderAllFaces = false; + blockrender.clearOverrideBlockTexture(); + + } + + + this.bindTexture(bottleTextures); + + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + GL11.glRotatef(180, 1, 0, 0); + + GL11.glColor3f(1,1,1); + + modelBottle.render(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + } + + private void bind(ResourceLocation res) + { + mc.getTextureManager().bindTexture(res); + } + + public static void setColor3ubFromInt(int color) { + + GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelBlockBottle.java b/src/main/java/shift/sextiarysector/renderer/model/ModelBlockBottle.java new file mode 100644 index 0000000..816cf1f --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelBlockBottle.java @@ -0,0 +1,51 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelBlockBottle extends ModelBase +{ + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape1; + + public ModelBlockBottle() + { + textureWidth = 64; + textureHeight = 64; + + Shape2 = new ModelRenderer(this, 0, 0); + Shape2.addBox(-5.5F, -8F, -5.5F, 11, 2, 11); + Shape2.setRotationPoint(0F, 0F, 0F); + Shape2.setTextureSize(64, 64); + Shape2.mirror = true; + Shape3 = new ModelRenderer(this, 0, 14); + Shape3.addBox(-2F, -6F, -2F, 4, 5, 4); + Shape3.setRotationPoint(0F, 0F, 0F); + Shape3.setTextureSize(64, 64); + Shape3.mirror = true; + Shape4 = new ModelRenderer(this, 0, 23); + Shape4.addBox(-6F, -3F, -6F, 12, 11, 12); + Shape4.setRotationPoint(0F, 0F, 0F); + Shape4.setTextureSize(64, 64); + Shape4.mirror = true; + Shape1 = new ModelRenderer(this, 0, 46); + Shape1.addBox(-3F, -5F, -3F, 6, 2, 6); + Shape1.setRotationPoint(0F, 0F, 0F); + Shape1.setTextureSize(64, 64); + Shape1.mirror = true; + } + + 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); + Shape2.render(f5); + Shape3.render(f5); + Shape4.render(f5); + Shape1.render(f5); + } + + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java new file mode 100644 index 0000000..6c36f71 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java @@ -0,0 +1,113 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + +public class TileEntityBlockBottle extends TileEntity implements IFluidHandler{ + + protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME*64); + + + /* IFluidHandler */ + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + return tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(tank.getFluid())) + { + return null; + } + return tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return tank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { tank.getInfo() }; + } + + public boolean hasFluid(){ + return this.tank.getFluidAmount() > 0 ; + } + + public IIcon getFluidIcon(){ + return this.tank.getFluid().getFluid().getIcon(this.tank.getFluid()); + } + + public int getFluidColor(){ + return this.tank.getFluid().getFluid().getColor(this.tank.getFluid()); + } + + public float getFluidHeight(){ + return ((float)this.tank.getFluidAmount()/(float)this.tank.getCapacity())*(10.0f/16.0f); + } + + public int getFluidID(){ + return tank.getFluid().fluidID; + } + + public FluidStack getFluidStack(){ + return this.tank.getFluid(); + } + + /* NBT */ + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + tank.readFromNBT(par1nbtTagCompound); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + tank.writeToNBT(par1nbtTagCompound); + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + +} diff --git a/src/main/resources/assets/sextiarysector/textures/items/drink/empty_bottle.png b/src/main/resources/assets/sextiarysector/textures/items/drink/empty_bottle.png new file mode 100644 index 0000000000000000000000000000000000000000..9ea77612c30bb5468b450a89badd3a7923fe6fed GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPq6PKWcc!lYd2B6S>PZ!4!i_=>t>hc{j5IJ5SoA$B8 z>YT%b9jY-5evJ>gVi*sxZm5vp@-=F8PEgym#F+as|8|{)+3sTVs(j=B%{M5R^8WM2 zxDLa%O;wwB*zb&sde+T{Z}xQ7d~=&^+b}Dq ze{R-dy`K#XI_vcr)@+@$Y~`OMN6WI8p}x~nF9lud@pgQYtr$|Q;j-l#4`YDcOUDMg wH;&x8-_GgGF^$TeZR;tNKcTSU=l{=)Q;xXv{M)wE8t4@UPgg&ebxsLQ08#gJ!vFvP literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/block_bottle.png b/src/main/resources/assets/sextiarysector/textures/models/block_bottle.png new file mode 100644 index 0000000000000000000000000000000000000000..a766541396c6a18d3ab701e2665b1fb11af618df GIT binary patch literal 647 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=Y)RhkE)4%caKYZ?lYt_f1s;*b z3=DjSL74G){)!Z!AbW|YuPggKZbm*Ck-Pg<7cwv~iFmp=hE&{o8)@r(I6-2M$3%^@ z)5>{X1PO38<>fhvxBLBKf3xKO!HZXK`f;7hobG*wu77kDc>EWh3V=3~Kpf3?dlcP?=V zm~OScYxm03c*A4HGbuHK+fPUacp5VwTI8W=Tm1N7{hpraWs(o%Q?yP$OmMl{uE5wv|2TN?yD*n$OaTqPt<$z|KQCQhTb{s;B9*g7bl!L8pzb}d&fi=E)pH_=d(G|nbJs95DR6*L ZM{E4)+c{b3#oz?S;OXk;vd$@?2>?d59;W~R literal 0 HcmV?d00001 From 323cfc0410a58cca03114b18c72ec827bee98a11 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 2 Nov 2014 18:46:06 +0900 Subject: [PATCH 12/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=9C?= =?UTF-8?q?=E3=83=88=E3=83=AB=E3=83=96=E3=83=AD=E3=83=83=E3=82=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・飲めるように修正 ・デザインを変更 --- .../sextiarysector/item/ItemBlockBottle.java | 62 ++++++++++++++++++ .../tileentity/TileEntityBlockBottle.java | 26 ++++++++ .../assets/sextiarysector/lang/en_US.lang | 2 + .../textures/models/block_bottle.png | Bin 647 -> 934 bytes 4 files changed, 90 insertions(+) diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java b/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java index 41f28c7..98e593b 100644 --- a/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java +++ b/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java @@ -6,6 +6,7 @@ import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -17,6 +18,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.tileentity.TileEntityBlockBottle; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -49,6 +51,61 @@ public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, i /* Item */ + @Override + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4,int par5, int par6, int par7, float par8, float par9, float par10) + { + + if (par2EntityPlayer.isSneaking()) { + return super.onItemUse(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9,par10); + } else { + return false; + } + + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + + if (par3EntityPlayer.isSneaking()) { + return par1ItemStack; + } else if(this.getFluid(par1ItemStack)!=null && this.getFluid(par1ItemStack).amount>=1000 && this.canDrink(par3EntityPlayer, false)){ + par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); + + } + return par1ItemStack; + + } + + @Override + public ItemStack onEaten(ItemStack stack, World par2World,EntityPlayer par3EntityPlayer) { + + + this.drain(stack, 1000, true); + + return stack; + //--stack.stackSize; + + } + + @Override + public EnumAction getItemUseAction(ItemStack par1ItemStack) + { + return EnumAction.drink; + } + + public boolean canDrink(EntityPlayer par3EntityPlayer,boolean par1) + { + return (par1 || EntityPlayerManager.getMoistureStats(par3EntityPlayer).needMoisture()) && !par3EntityPlayer.capabilities.disableDamage; + } + + public int getMaxItemUseDuration(ItemStack p_77626_1_) + { + return 32; + } + + + @SideOnly(Side.CLIENT) public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) { @@ -138,6 +195,8 @@ public int fill(ItemStack container, FluidStack resource, boolean doFill) { NBTTagCompound fluidTag = resource.writeToNBT(new NBTTagCompound()); + container.setItemDamage(resource.fluidID); + if (capacity < resource.amount) { fluidTag.setInteger("Amount", capacity); @@ -197,6 +256,9 @@ public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) { container.stackTagCompound = null; } + + container.setItemDamage(0); + return stack; } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java index 6c36f71..2145bc5 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java @@ -18,6 +18,32 @@ public class TileEntityBlockBottle extends TileEntity implements IFluidHandler{ protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME*64); + private int lastFluid; + + @Override + public void updateEntity() { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() { + } + + private void updateServerEntity() { + + if((lastFluid)!=(tank.getFluidAmount()/100)){ + this.lastFluid = (tank.getFluidAmount()/100); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } /* IFluidHandler */ @Override diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 53d1d0d..db7b963 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -10,6 +10,8 @@ tile.ss.wood_plate.name=Wood Plate tile.ss.hole.name=Hole tile.ss.farmland.name=Farm Land +tile.ss.bottle.name=Fluid Bottle + tile.ss.chunk_loader.name=Time Loader tile.ss.small_windmill.name=Small Windmill diff --git a/src/main/resources/assets/sextiarysector/textures/models/block_bottle.png b/src/main/resources/assets/sextiarysector/textures/models/block_bottle.png index a766541396c6a18d3ab701e2665b1fb11af618df..a8fd3627194f643e25be7526007b8c40f91fdc3e 100644 GIT binary patch delta 864 zcmV-m1E2hd1*Qj(Q-1;g86Ph(iiiLJ12aiPK~#9!?O8o*+dvq8R74TMUgDD%TSFIv zAyDFOg${+((4kZN2b!t<4;{O9PNo(*XY1ghfer6xqkTN`8=Hqk zD!q^Ip4sgB=;-lI+==DdwJ?`!E_4*+aR+s?zv39RN z!byv`W;}qcj0a)!2a%Qm0=`_Zis&I2+2 z87iA)7JwpVKUM(zm|s>vQX*Q+Y{>y4P60o*kCXj8`5|@yHnoOJ^oUB1YTT@OC2!Fb zUg&p$>2zubY59FqAa8u9(@_#v0AGedWzDpG7=OIFn87qn`%s_H<5QagQO8ly@QDHt zm5qyrj~#$0WEQ3;v&N@Z0b!!eA8r&4e^4b@W^RzL!=jO0+T^%508ziJX!uY<$SWxJ zkxS9=iKOtZ2VRN1YeX^W+H5w3{DVXdn#b(;n_IL2xYjp0A82Gg1^)XZv8J&I2ZsfaQ-1*t92DKZC7}QS0u)I^K~#9!?O8ob!(bS^NRcSbmUj&3QVLC#9$59X>T3llrFT6Ew=^?AWzaGO zq?FKgeWu@4(0{7G<8VtOK&RV}?D24)PbSku+|mdTHMKk4KI%0yu;T&DWPA~~$Qe*c zGXuh+NGUyY6|73S( zIs;zYEjO*Z>va3LdwMVRO!$)zuuM_t=d8?pz@iGUd^jg3s3+GKmjNK1)u;F zfC6l+6*!*vLsE;p>d)D%017|>C;$b>VhgO>pPj4#f*=TjAP9npg Date: Sun, 2 Nov 2014 22:18:49 +0900 Subject: [PATCH 13/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E5=8C=A0?= =?UTF-8?q?=E8=8C=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・匠茶を追加 --- .../java/shift/sextiarysector/SSFluids.java | 54 ++++++++++++++++++ .../java/shift/sextiarysector/SSShops.java | 4 ++ .../shift/sextiarysector/SextiarySector.java | 1 + .../sextiarysector/block/BlockBottle.java | 10 ++++ .../event/ClientEventHandler.java | 10 ++++ .../sextiarysector/item/ItemBlockBottle.java | 3 +- .../tileentity/TileEntityBlockBottle.java | 2 +- .../assets/sextiarysector/lang/en_US.lang | 3 + .../textures/blocks/fluid/water_flow.png | Bin 0 -> 8083 bytes .../blocks/fluid/water_flow.png.mcmeta | 3 + .../textures/blocks/fluid/water_still.png | Bin 0 -> 11742 bytes .../blocks/fluid/water_still.png.mcmeta | 5 ++ 12 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/SSFluids.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_flow.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_flow.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_still.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_still.png.mcmeta diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java new file mode 100644 index 0000000..ecb81ee --- /dev/null +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -0,0 +1,54 @@ +package shift.sextiarysector; + +import net.minecraft.util.IIcon; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import shift.sextiarysector.event.ClientEventHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class SSFluids { + + public static Fluid takumiTea; + + public static void initFluids(){ + + takumiTea = new SSFluid("takumi_tea",0x006400); + + } + + public static class SSFluid extends Fluid{ + + private int color; + + public SSFluid(String fluidName, int color) { + super(fluidName); + this.color = color; + FluidRegistry.registerFluid(this); + } + + public String getUnlocalizedName() + { + return "fluid.ss." + this.unlocalizedName; + } + + public int getColor() + { + return color; + } + + @SideOnly(Side.CLIENT) + public IIcon getStillIcon() + { + return ClientEventHandler.waterStill; + } + + @SideOnly(Side.CLIENT) + public IIcon getFlowingIcon() + { + return ClientEventHandler.waterStill; + } + + } + +} diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index 4e8ce21..aadd960 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -2,9 +2,11 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; import shift.mceconomy2.api.MCEconomyAPI; import shift.mceconomy2.api.shop.ProductItem; import shift.mceconomy2.api.shop.ProductList; +import shift.sextiarysector.block.BlockBottle; import shift.sextiarysector.block.BlockMonitor.MonitorType; public class SSShops { @@ -19,6 +21,8 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.blueStoneDust,2),320)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.yellowStoneDust,2),320)); + creepers[i].addItemProduct(new ProductItem(((BlockBottle) SSBlocks.bottle).getFluidItem(new FluidStack(SSFluids.takumiTea,1000)),216)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.seasonStone,1),3000)); if(i==0){ diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 9ea0519..178fdcd 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -73,6 +73,7 @@ public void preInit(FMLPreInitializationEvent event) SextiarySectorAPI.playerManager = EntityPlayerManager.instance; SSCreativeTabs.initCreativeTabs(); + SSFluids.initFluids(); SSItems.initItems(); SSBlocks.initBlicks(); diff --git a/src/main/java/shift/sextiarysector/block/BlockBottle.java b/src/main/java/shift/sextiarysector/block/BlockBottle.java index 3a62264..0ee2245 100644 --- a/src/main/java/shift/sextiarysector/block/BlockBottle.java +++ b/src/main/java/shift/sextiarysector/block/BlockBottle.java @@ -9,6 +9,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidStack; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.item.ItemBlockBottle; @@ -59,6 +60,15 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p } + + public ItemStack getFluidItem(FluidStack resource){ + + ItemStack stack = new ItemStack(this,1,resource.fluidID); + ((ItemBlockBottle)stack.getItem()).fill(stack, resource, true); + + return stack; + } + @Override public boolean renderAsNormalBlock() { return false; diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 92fe8ba..7083633 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -25,9 +25,12 @@ import shift.sextiarysector.module.SeasonManager; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ClientEventHandler { + @SideOnly(Side.CLIENT) public static Minecraft mc = FMLClientHandler.instance().getClient(); @SubscribeEvent @@ -84,6 +87,9 @@ public void onItemTooltipEvent(ItemTooltipEvent event) { public static IIcon[] itemGF; + public static IIcon waterFlow; + public static IIcon waterStill; + @SubscribeEvent public void PreTextureStitchEvent(TextureStitchEvent.Pre event){ @@ -97,6 +103,10 @@ public void PreTextureStitchEvent(TextureStitchEvent.Pre event){ itemGF[0] = event.map.registerIcon("sextiarysector:damage/damage_0"); itemGF[1] = event.map.registerIcon("sextiarysector:damage/damage_1"); + + }else{ + waterFlow = event.map.registerIcon("sextiarysector:fluid/water_flow"); + waterStill = event.map.registerIcon("sextiarysector:fluid/water_still"); } } diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java b/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java index 98e593b..46602d9 100644 --- a/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java +++ b/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java @@ -25,11 +25,12 @@ public class ItemBlockBottle extends ItemBlock implements IFluidContainerItem{ - protected int capacity = FluidContainerRegistry.BUCKET_VOLUME*64; + protected int capacity = FluidContainerRegistry.BUCKET_VOLUME; public ItemBlockBottle(Block block){ super(block); this.setHasSubtypes(true); + this.setMaxStackSize(1); this.setCreativeTab(SextiarySectorAPI.TabSSCore); } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java index 2145bc5..8deed99 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java @@ -16,7 +16,7 @@ public class TileEntityBlockBottle extends TileEntity implements IFluidHandler{ - protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME*64); + protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME); private int lastFluid; diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index db7b963..bcc3c64 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -130,6 +130,9 @@ item.ss.radish.name=Radish item.ss.shift_hat.name=Shift's Hat +#Fluid +fluid.ss.takumi_tea=TAKUMI Tea + #GUI container.large_furnace=Large Furnace container.sub.inventory=Buffer diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_flow.png b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_flow.png new file mode 100644 index 0000000000000000000000000000000000000000..8f6ed730e8fa6607fc8e02c6a9ca33afffdc88e1 GIT binary patch literal 8083 zcmZ8m2V7GB+jWG9T58Tpb8pRAsSzq^?p?TNuGHKXDh>=6YMEOzM>%qvnOhu%Tgf!H zxuY~w93^J@UhDV%{_pz-E?h335BI|PKIb{-JaI+_ny2Z`(@{`RoYvM-HvwLGDJV`+ z(9!^V5m{CvzzdC|uBJN0@yR{Ett16F0`bwZ@TZ`lXF1s@DYA1ofrH=xZG8>!CweLd zwo5ar&}j+^9$syAwOh#P4Vw+Wl`F}o=y|7Zc{mwP`u-wb4CGn=>-XkM0X7`|!-wnD?MG(w zKSz1O4@vF7*3;fx6>l>U#RRu^IofELKl(L)eDt$ja-S8x;B1l3LbH{7(_+ z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_QgKMPK_jR&bl(thWmZv_5R- z?Y`qv!Lq($Vyde|tIpblR89`NCZ8LEz0t zOQor`7T?}Is?7Po@xuD?efr#6E!FW({1VfM-j4(_t?mA~JF&MG>kP$CD{ibjezd#~ z$nT_)Mp!!%&o&SoeEO|VEs$Gt*!VK%W#zQhe}PcfE@?yaDnD!1ZjVq#XKC2mOXLbl z*!Z@~dKpFR;}&#)AHofPqi$hKFWf$LT&@=FzI_vJ-$-<5s zzn3rA+$U$-a}a3bD)A=~{cDK;u-9QvB3#WXCzbPF2ws>741K*Mc1*@s!qO5^xZ6&6 z4t91_a%M#ycRl631z!k{lkX@xCoLayvvuR!VgVYVD zEeq1MM6D1wUMbYs$A&3U04WAyv0@8!68|{w%BIzIC5-`?GGWFyAmR7#jHoQ9&jBI1 z3Eksm#l8iKtA)GI`phY+*PCS+-ku{ifuw~B_|MXvGddunFSz>~SdebLK1&n-@-qoB zsW%@iM(xzOUS(C0Z4csfY8h9%Ji&;7s`Y4$6MSYs##WtQ;IX3$ZRR9FvD@<5!ST^I zpYiqi&He=DO`~~Di`D1V_JKJVxNZd`x*qjikscVqxjR?6K=X>fz7}^&FFMLBG^K}q zG|AI7ve}o({)%~CIl~SWbM$=`R=yrG*QW2-;fS}}qTB$Pk)ixN=IN^+u~$iGXA77A z2eFut?xIKBh>~knf62;D1lhXkB^`?}l$qHkWRZf*wH#C>%_T^iwWW>aw3`t^ldZjE z3l}}{DzhrQXHPG4Y0TL%V{LFT>2G65kC{X#L3AgA_`d=DJ7?q&#Yv!-jw$`7g%{mc TzmtLSIfb@{fqE6(KJtG6BmP^) literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_flow.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_flow.png.mcmeta new file mode 100644 index 0000000..4f0718a --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_flow.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} \ No newline at end of file diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_still.png b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_still.png new file mode 100644 index 0000000000000000000000000000000000000000..383fb1fd19159e93e4f9d41a7e8e2efc2b76e301 GIT binary patch literal 11742 zcmWk!2RM{}96w2CRELZs8HaR6_CCpsldP<>_qYg0R`#ADWE>@ta0o~CKKlrrBrD@c zMr4Nm@1MtW_q@;J?tOp1@9*>djBkSeqX*Y$*=a!_&^2u>bwl8l9t64sqP_yWOKSc# z3A|jf*Lk20`uG3uo3{5afh#m#TILuKi0;P!e-xlREEKp1_SM$a0MFB1y2?Uj`8nGh z1mXs1tE)T?_~sWflg%;cUDDDND9o0Hr*Kbvr+#ZRcVVh=)HIohm1IvhtebHK6&N@5 z{#cqtWX^>fOU1vs9WgXy_PyGw<=N=>i`kCz*?)=RL;}$npc@S@6giHYb6-h(LNi+1}iJm+N zI?op;h%tP`lQIq0x5!8-!s5+a40saCerb>@T_TAGm4O@O|{JR;;IL!@*u!X@tv zhuo8SnwT3%-=ND+a0lv+?zmVqPJ4U0V~(PUzIz60v_dzC(m6IcF~1G7LDC2xZLi3` zGeq*h?AIKKY^JtYOh0t_F**fLVsdy$$QjX{{7%Li;iN6lgHR)P+--u~kVv{Xp%*IP z@NoO@1sLX|uD*}xs6Dzk27bIb`p0;pD-a&bZCpM?9UOj<`KH4NV$3FCAaDmlLj5Rp zyYAygke>$DVM=P0UiH(^rp4+I3I;=ayu?`BC+kc~JqQg9Jkbj@n}Is0QVX1D@>Wkk z9k6FDl7wV+bv#L8Y=2}gEcpUh+a}*`QJ%Ni@p2_h$>P9=W*fq$QFQZ{+o_H`k`n^_ z%+mJ=cgP3}bi(Rv!Sl^$Ge374r;}fIQR49JBC9C01c9l^rq%xiR|6>nQzZbio<1mV zuUYIl)%$?Y!(w`A59YaI?T*dRB1cC@VTjjb%B7jvD6}Kla(G0IC=Yc=JPKWJ-u_5J z5xma~k>*CoVPMxXF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W7&zXO+6ur=JXH**7e{MJ{`Qv=MATp74QTqKBf@M9H_WqfF zv%oy_77p)$^V?Jy`}>)BA^$@qHqsH7^6nkydr3yWnn8onCFggci7cLE+1LUdpM1k8 z3w@W&ht0-G&tCpJ_$}e36GXrI! zV7+qjPt6Gzg;~KeZe7;3ISo611$NHudZI=#aA#)v)VaVaV0NqzS}^5MS1P9gf40M9 zjm81CHAS%IE%#lM+Y=3JOWIqWL9dJw;_rD+iWB@dZrfqqK2-4`w{q)Asl{Nwm6H)9bTx2+TcpB=*0XLKPpiYr{1@ zrg<>y<=*Pg!4ETvRZ(+#%!b;oSzk|j^z%~zi}e8(^R1M$)aohBv_e-txqIvGyUd0L zYwUExZ_pF;m(33c8ivpJW>1KJv!#^0yr-e7k6*udMRU^omuCdTVuhJ-BW|~r)|%`1 zlXsYuC~4f@m?c3+m*uEo%;52Ca4uJn z%A53$E=kzDWogdu6_iQ#)OOi&ADcF$&+XQLNh`o|av@_~MwBLVXSZ9ADz7(a8wNL} zE+5|@a=K$;@+6?X+D6N8b9j_%3C&J zK0uuLOZ6t2SIlIsf$@OPCB!x9UT2TIY*|metQA95%~q@bmuC@1SvLpQSmb994IV4C z0JeYI(fR))RGy8qqC-*cVu#c;0vQ=j=3s4L*MH{lR`xW>CiX5SUNZl;)!54~6q Date: Mon, 3 Nov 2014 17:52:22 +0900 Subject: [PATCH 14/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20BlockBottle?= =?UTF-8?q?=E3=82=92=E9=A3=B2=E3=82=93=E3=81=A0=E6=99=82=E3=81=AE=E5=8A=B9?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・バニラの水と溶岩を飲んだ時に水分が変化するように --- .../java/shift/sextiarysector/SSBlocks.java | 2 +- .../api/event/BlockBottleEvent.java | 16 ++++++ .../api/event/VanillaFoodHandler.java | 25 +++++++++ .../sextiarysector/item/ItemBlockBottle.java | 53 +++++++++++++++++-- 4 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/api/event/BlockBottleEvent.java diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 135bcfc..a3859a5 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -123,7 +123,7 @@ public static void initBlicks(){ GameRegistry.registerBlock(fluidFurnace, "FluidFurnace"); GameRegistry.registerTileEntity(TileEntityFluidFurnace.class, "FluidFurnace"); - bottle = new BlockBottle().setBlockName("ss.bottle"); + bottle = new BlockBottle().setBlockName("ss.bottle").setBlockTextureName("glass"); GameRegistry.registerBlock(bottle,ItemBlockBottle.class, "Bottle"); GameRegistry.registerTileEntity(TileEntityBlockBottle.class, "Bottle"); diff --git a/src/main/java/shift/sextiarysector/api/event/BlockBottleEvent.java b/src/main/java/shift/sextiarysector/api/event/BlockBottleEvent.java new file mode 100644 index 0000000..9c1a18e --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/event/BlockBottleEvent.java @@ -0,0 +1,16 @@ +package shift.sextiarysector.api.event; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.event.entity.player.PlayerEvent; +import net.minecraftforge.fluids.FluidStack; + +public class BlockBottleEvent extends PlayerEvent{ + + public FluidStack fluid; + + public BlockBottleEvent(EntityPlayer player , FluidStack fluid) { + super(player); + this.fluid = fluid; + } + +} diff --git a/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java b/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java index 4cdc6d0..42c0994 100644 --- a/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java +++ b/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java @@ -5,6 +5,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; import shift.sextiarysector.api.IDrink; import shift.sextiarysector.api.SextiarySectorAPI; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -117,4 +119,27 @@ public void onPlayerEatenEvent(PlayerEatenEvent event) { } + /**バニラの液体を飲んだ時の動作*/ + @SubscribeEvent + public void onPlayerEatenEvent(BlockBottleEvent event) { + + FluidStack fluid = event.fluid; + EntityPlayer player = (EntityPlayer) event.entity; + + if(fluid.fluidID == FluidRegistry.WATER.getID()){ + + SextiarySectorAPI.playerManager.addMoistureStats(player, 3, 0); + player.addExhaustion(4.5f); + player.addPotionEffect(new PotionEffect(Potion.hunger.getId(),30,0)); + + } + + if(fluid.fluidID == FluidRegistry.LAVA.getID()){ + + SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 12.0f); + + } + + } + } diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java b/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java index 46602d9..7409fff 100644 --- a/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java +++ b/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java @@ -11,13 +11,17 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.api.event.BlockBottleEvent; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.tileentity.TileEntityBlockBottle; import cpw.mods.fml.relauncher.Side; @@ -70,19 +74,62 @@ public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, Enti if (par3EntityPlayer.isSneaking()) { return par1ItemStack; - } else if(this.getFluid(par1ItemStack)!=null && this.getFluid(par1ItemStack).amount>=1000 && this.canDrink(par3EntityPlayer, false)){ - par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); + } else { + + if(this.getFluid(par1ItemStack)==null){ + return this.onEmptyItemRightClick(par1ItemStack, par2World, par3EntityPlayer); + }else if(this.getFluid(par1ItemStack)!=null && this.getFluid(par1ItemStack).amount>=100 && this.canDrink(par3EntityPlayer, false)){ + par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); + } } + + return par1ItemStack; + } + + private ItemStack onEmptyItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); + + + if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + int x = movingobjectposition.blockX; + int y = movingobjectposition.blockY; + int z = movingobjectposition.blockZ; + + if (!par3EntityPlayer.canPlayerEdit(x, y, z, movingobjectposition.sideHit, par1ItemStack)) + { + return par1ItemStack; + } + + Block block = par2World.getBlock(x, y, z); + + Fluid f = FluidRegistry.lookupFluidForBlock(block); + + if(f!=null){ + this.fill(par1ItemStack, new FluidStack(f, 1000), true); + par2World.setBlockToAir(x, y, z); + } + + } + + + return par1ItemStack; } @Override public ItemStack onEaten(ItemStack stack, World par2World,EntityPlayer par3EntityPlayer) { + if(par2World.isRemote){ + return stack; + } - this.drain(stack, 1000, true); + MinecraftForge.EVENT_BUS.post(new BlockBottleEvent(par3EntityPlayer, this.getFluid(stack))); + this.drain(stack, 100, true); return stack; //--stack.stackSize; From 47342ca404c2acf8f88226cdc37c6e6692b9e59c Mon Sep 17 00:00:00 2001 From: shift02 Date: Mon, 3 Nov 2014 22:31:07 +0900 Subject: [PATCH 15/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E6=B6=B2?= =?UTF-8?q?=E4=BD=93=E3=81=8B=E3=81=BE=E3=81=A9=E3=82=92NEI=E3=81=AB?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・液体かまどをNEIに対応 --- .../java/shift/sextiarysector/SSFluids.java | 11 +- .../event/CommonEventHandler.java | 19 ++ .../nei/FluidFurnaceRecipeHandler.java | 46 +++ .../nei/NEISextiarySectorConfig.java | 6 + .../nei/SimpleFluidRecipeHandler.java | 283 ++++++++++++++++++ .../recipe/RecipesFluidFurnace.java | 4 +- .../tileentity/TileEntityFluidFurnace.java | 29 +- .../textures/guis/fluid_furnace_nei.png | Bin 0 -> 1691 bytes 8 files changed, 393 insertions(+), 5 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/nei/FluidFurnaceRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/fluid_furnace_nei.png diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index ecb81ee..d42f4fb 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -13,17 +13,22 @@ public class SSFluids { public static void initFluids(){ - takumiTea = new SSFluid("takumi_tea",0x006400); + takumiTea = new SSFluid("takumi_tea", 0x006400, 5, 2.0f); } - public static class SSFluid extends Fluid{ + public static class SSFluid extends Fluid { private int color; - public SSFluid(String fluidName, int color) { + public int moisture; + public float moistureSaturation; + + public SSFluid(String fluidName, int color, int moisture, float moistureSaturation) { super(fluidName); this.color = color; + this.moisture = moisture; + this.moistureSaturation = moistureSaturation; FluidRegistry.registerFluid(this); } diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index d9e28d4..80ca489 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -11,7 +11,11 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.fluids.FluidStack; import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.SSFluids.SSFluid; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.api.event.BlockBottleEvent; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockMonitor.MonitorType; import shift.sextiarysector.module.ModuleAchievement; @@ -143,4 +147,19 @@ public void onSpawn(LivingSpawnEvent.CheckSpawn event) }*/ } + /** */ + @SubscribeEvent + public void onPlayerEatenEvent(BlockBottleEvent event) { + + FluidStack fluid = event.fluid; + EntityPlayer player = (EntityPlayer) event.entity; + + if(fluid.getFluid() instanceof SSFluid){ + + SextiarySectorAPI.playerManager.addMoistureStats(player, ((SSFluid)fluid.getFluid()).moisture, ((SSFluid)fluid.getFluid()).moistureSaturation); + + } + + } + } diff --git a/src/main/java/shift/sextiarysector/nei/FluidFurnaceRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/FluidFurnaceRecipeHandler.java new file mode 100644 index 0000000..866fd7e --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/FluidFurnaceRecipeHandler.java @@ -0,0 +1,46 @@ +package shift.sextiarysector.nei; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraftforge.fluids.FluidContainerRegistry; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiFluidFurnace; +import shift.sextiarysector.recipe.RecipeSimpleFluid; + +public class FluidFurnaceRecipeHandler extends SimpleFluidRecipeHandler{ + + @Override + Class getHandlerClass() { + return FluidFurnaceRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_FluidFurnace"; + } + + @Override + RecipeSimpleFluid getRecipe() { + return SSRecipes.fluidFurnace; + } + + @Override + String getGuiRecipeName() { + return "ss.fluid_furnace"; + } + + @Override + public Class getGuiClass() { + return GuiFluidFurnace.class; + } + + @Override + int getMaxFluid() { + return FluidContainerRegistry.BUCKET_VOLUME * 10; + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/fluid_furnace_nei.png"; + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java index 720ec29..c5b3f06 100644 --- a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java +++ b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java @@ -1,5 +1,6 @@ package shift.sextiarysector.nei; +import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMillstone; @@ -35,6 +36,9 @@ public void loadConfig() { API.registerRecipeHandler(new FurnaceShapelessRecipeHandler()); API.registerUsageHandler(new FurnaceShapelessRecipeHandler()); + API.registerRecipeHandler(new FluidFurnaceRecipeHandler()); + API.registerUsageHandler(new FluidFurnaceRecipeHandler()); + API.registerRecipeHandler(new FertilizerRecipeHandler()); API.registerUsageHandler(new FertilizerRecipeHandler()); @@ -53,6 +57,8 @@ public void loadConfig() { //API.registerGuiOverlay(GuiLoom.class, "SextiarySectorLoom"); API.registerGuiOverlay(GuiLargeFurnace.class, "furnaceCrafting"); + API.registerGuiOverlay(GuiFluidFurnace.class, "SS_FluidFurnace"); + API.registerGuiOverlay(GuiMillstone.class, "SS_Millstone"); API.registerGuiOverlay(GuiLoom.class, "SS_Loom"); API.registerGuiOverlay(GuiSawmill.class, "SS_Sawmill"); diff --git a/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java new file mode 100644 index 0000000..62ade4b --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java @@ -0,0 +1,283 @@ +package shift.sextiarysector.nei; + +import static codechicken.lib.gui.GuiDraw.*; + +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.resources.I18n; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.recipe.RecipeSimpleFluid; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.TemplateRecipeHandler; + +public abstract class SimpleFluidRecipeHandler extends TemplateSSRecipeHandler { + + public class SimpleFluidPair extends CachedRecipe + { + public SimpleFluidPair(ItemStack ingred, ItemStack result, FluidStack fluidStack) + { + ingred.stackSize = 1; + this.ingred = new PositionedStack(ingred, 51, 6); + this.result = new PositionedStack(result, 111 - 9, 24 + 18); + if(ingred.getItem().getContainerItem(ingred.copy())!=null){ + this.result2 = new PositionedStack(ingred.getItem().getContainerItem(ingred.copy()), 111 - 9 + 18, 24 + 18); + } + + this.fluidStack = fluidStack; + } + + public SimpleFluidPair(List ingred, ItemStack result, FluidStack fluidStack) + { + for(int i = 0;i recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + if(OreDictionary.getOres(recipe.getKey()).size()>=1){ + arecipes.add(new SimpleFluidPair(OreDictionary.getOres(recipe.getKey()), item, (FluidStack)recipe.getValue()[1])); + } + + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + arecipes.add(new SimpleFluidPair(recipe.getKey(), item, (FluidStack)recipe.getValue()[1])); + } + } + else + { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(ItemStack result) + { + + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + if(NEIServerUtils.areStacksSameType(item, result)) + { + if(OreDictionary.getOres(recipe.getKey()).size()>=1){ + arecipes.add(new SimpleFluidPair(OreDictionary.getOres(recipe.getKey()), item, (FluidStack)recipe.getValue()[1])); + } + + } + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + if(NEIServerUtils.areStacksSameType(item, result)) + { + arecipes.add(new SimpleFluidPair(recipe.getKey(), item, (FluidStack)recipe.getValue()[1])); + } + } + } + + @Override + public void loadUsageRecipes(ItemStack ingredient) + { + + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + ArrayList items = OreDictionary.getOres(recipe.getKey()); + for(int i = 0; i< items.size() ; i++){ + if(this.checkItem(items.get(i),ingredient)){ + arecipes.add(new SimpleFluidPair(items, item, (FluidStack)recipe.getValue()[1])); + break; + } + } + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + //if(ingredient.itemID == recipe.getKey().get(0) && ingredient.getItemDamage() == recipe.getKey().get(1)) + if(this.checkItem(ingredient, recipe.getKey())) + { + arecipes.add(new SimpleFluidPair(ingredient, item, (FluidStack)recipe.getValue()[1])); + } + } + } + + private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } + + @Override + public void drawExtras(int recipe) + { + drawProgressBar(52, 25, 176, 0, 14, 14, 48, 7); + drawProgressBar(74, 23, 176, 14, 24, 16, 48, 0); + + if(((SimpleFluidPair)this.arecipes.get(recipe)).fluidStack != null){ + this.drawFluidTank(102,4,((SimpleFluidPair)this.arecipes.get(recipe)).fluidStack,34,36); + } + + changeTexture(getGuiTexture()); + drawTexturedModalRect(103,6, 176, 31, 32, 36); + + } + + public void drawFluidTank(int x, int y, FluidStack fluidStack, int width, int height) { + + + ResourceLocation r; + if(fluidStack.getFluid().getSpriteNumber()==0){ + r = TextureMap.locationBlocksTexture; + }else{ + r = TextureMap.locationItemsTexture; + } + + renderEngine.bindTexture(r); + this.setColor3ubFromInt(fluidStack.getFluid().getColor(fluidStack)); + + int widthR = width;//*(fluidTank.getFluidAmount()/fluidTank.getCapacity()); + int heightR = (int) (width*((float)fluidStack.amount/(float)this.getMaxFluid())); + + int yR = y+(height-heightR); + + int widthL = 0; + int heightL = 0; + IIcon icon = (fluidStack.getFluid().getIcon(fluidStack)); + + for (int i = 0; i < widthR; i += 16) { + + for (int j = 0; j < heightR; j += 16) { + + widthL = Math.min(widthR - i, 16); + heightL = Math.min(heightR - j, 16); + gui.drawTexturedModelRectFromIcon(x + i, yR + j, icon, widthL, heightL); + + } + } + + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); + + } + + public static void setColor3ubFromInt(int color) { + + GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + + } + + abstract Class getHandlerClass(); + abstract String getHandlerName(); + abstract RecipeSimpleFluid getRecipe(); + abstract String getGuiRecipeName(); + public abstract Class getGuiClass(); + abstract int getMaxFluid(); + + @Override + public String getRecipeName() { + return I18n.format("nei."+getGuiRecipeName()); + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java index 1d06a4a..8f9cd87 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java @@ -1,5 +1,6 @@ package shift.sextiarysector.recipe; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; @@ -10,7 +11,8 @@ public class RecipesFluidFurnace { public static void addRecipes(RecipeSimpleFluid recipe) { - recipe.add(new ItemStack(SSItems.stringBobbin,1),new ItemStack(SSItems.cloth, 1), new FluidStack(FluidRegistry.WATER, 1000)); + recipe.add(new ItemStack(SSItems.stringBobbin,1),new ItemStack(SSItems.cloth, 1), null); + recipe.add(new ItemStack(Items.water_bucket,1),new ItemStack(Items.stick, 1), new FluidStack(FluidRegistry.WATER, 1000)); } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java index 34a9193..b8925e2 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java @@ -113,7 +113,7 @@ public boolean canWork() ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); FluidStack fluidstack = this.getFluidResult(this.items.getStackInSlot(0)); if (itemstack == null && fluidstack == null) return false; - return this.checkItem(itemstack) && this.checkFluid(fluidstack); + return this.checkItem(itemstack) && this.checkFluid(fluidstack) && this.checkContainerItem(this.items.getStackInSlot(0)); } } @@ -125,6 +125,17 @@ private boolean checkItem(ItemStack itemstack){ return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); } + private boolean checkContainerItem(ItemStack itemstack){ + + if(!itemstack.getItem().hasContainerItem(itemstack)) return true; + ItemStack itemstackC = itemstack.getItem().getContainerItem(itemstack.copy()); + if (this.items.getStackInSlot(3) == null || itemstackC == null) return true; + if (!this.items.getStackInSlot(3).isItemEqual(itemstackC)) return false; + int result = this.items.getStackInSlot(3).stackSize + itemstackC.stackSize; + return (result <= getInventoryStackLimit() && result <= itemstackC.getMaxStackSize()); + + } + private boolean checkFluid(FluidStack fluidstack){ if (this.getTank().getFluidAmount()==0 || fluidstack == null) return true; @@ -151,6 +162,22 @@ else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) this.items.getStackInSlot(2).stackSize += itemstack.stackSize; } + //CItem + if(this.items.getStackInSlot(0).getItem().hasContainerItem(this.items.getStackInSlot(0))){ + + ItemStack itemC = this.items.getStackInSlot(0).getItem().getContainerItem(this.items.getStackInSlot(0).copy()); + + if (this.items.getStackInSlot(3) == null) + { + this.setInventorySlotContents(3, itemC); + } + else if (this.items.getStackInSlot(3).isItemEqual(itemC)) + { + this.items.getStackInSlot(3).stackSize += itemC.stackSize; + } + } + + //fluid this.getTank().fill(fluidstack, true); diff --git a/src/main/resources/assets/sextiarysector/textures/guis/fluid_furnace_nei.png b/src/main/resources/assets/sextiarysector/textures/guis/fluid_furnace_nei.png new file mode 100644 index 0000000000000000000000000000000000000000..adc94a27e8037a48edbcd096c76137103f3af05d GIT binary patch literal 1691 zcmcIkSyYo(5We{nLkJSl1L8s;g4P8DRH{*d#0VlnVnnI|NkFX%Y6N6WiSV-t0$N-u zD9YjnH3bBULfDlMq*N#fY9g{(41_>JD`FF%KUiOSPJ8;&d(S;{=bM>tmWMgVWH{;K zm*4>ay3RWt+yFo!UlhP$5#e<@?&ZKHzjpfS6lxFARPsBG@^rFT4)^1VPg+EU~7k>3A79$GBLw^T;W)9M^mR-i8!4*WaZ6y^^M6NlhyaF=1>DSe&34YWqRYHFKh8w2;P*#tmcoA zHt|-t{A$i%Fq-kD4{K^nIF;e^3G?P9|00-FotD)MCMypn8C!+dEi%7(npG#l+!=Fje+cld9Wr zG(1$@U{aG|gQ8YQrrVW+if`{S$#(L&*t3r!R#HK$aGVm?zfyi14aYJkw(uq4HbQBS zPmhR+*urB=qsF_Q)xQ_-?sQ7)oRVK(gQ80L5|&8_b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Tue, 4 Nov 2014 23:27:26 +0900 Subject: [PATCH 16/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E6=B6=B2?= =?UTF-8?q?=E4=BD=93=E3=82=AF=E3=83=AA=E3=82=B9=E3=82=BF=E3=83=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・クラフト用の液体クリスタルを追加 --- .../java/shift/sextiarysector/SSBlocks.java | 8 + .../block/BlockFluidCrafter.java | 52 ++++ .../item/ItemBlockFluidCrafter.java | 77 ++++++ .../sextiarysector/proxy/ClientProxy.java | 8 + .../sextiarysector/proxy/CommonProxy.java | 2 + .../renderer/block/RendererFluidCrafter.java | 228 ++++++++++++++++++ .../renderer/model/ModelFluidCrafter.java | 28 +++ .../tileentity/TileEntityFluidCrafter.java | 101 ++++++++ .../textures/models/fluid_crafter.png | Bin 0 -> 450 bytes 9 files changed, 504 insertions(+) create mode 100644 src/main/java/shift/sextiarysector/block/BlockFluidCrafter.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemBlockFluidCrafter.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelFluidCrafter.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityFluidCrafter.java create mode 100644 src/main/resources/assets/sextiarysector/textures/models/fluid_crafter.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index a3859a5..057bf6a 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -7,6 +7,7 @@ import shift.sextiarysector.api.season.Season; import shift.sextiarysector.block.BlockBottle; import shift.sextiarysector.block.BlockChunkLoader; +import shift.sextiarysector.block.BlockFluidCrafter; import shift.sextiarysector.block.BlockFluidFurnace; import shift.sextiarysector.block.BlockGFTank; import shift.sextiarysector.block.BlockGearBox; @@ -29,11 +30,13 @@ import shift.sextiarysector.block.BlockWindmill; import shift.sextiarysector.item.ItemBlockBottle; import shift.sextiarysector.item.ItemBlockCrop; +import shift.sextiarysector.item.ItemBlockFluidCrafter; import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMonitor; import shift.sextiarysector.item.ItemBlockShaft; import shift.sextiarysector.tileentity.TileEntityBlockBottle; import shift.sextiarysector.tileentity.TileEntityFarmland; +import shift.sextiarysector.tileentity.TileEntityFluidCrafter; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityGearBox; @@ -56,6 +59,7 @@ public class SSBlocks { public static Block fluidFurnace; public static Block bottle; + public static Block fluidCrafter; public static Block woodShaft; public static Block stoneShaft; @@ -127,6 +131,10 @@ public static void initBlicks(){ GameRegistry.registerBlock(bottle,ItemBlockBottle.class, "Bottle"); GameRegistry.registerTileEntity(TileEntityBlockBottle.class, "Bottle"); + fluidCrafter = new BlockFluidCrafter().setBlockName("ss.bottle").setBlockTextureName("glass"); + GameRegistry.registerBlock(fluidCrafter,ItemBlockFluidCrafter.class, "FluidCrafter"); + GameRegistry.registerTileEntity(TileEntityFluidCrafter.class, "FluidCrafter"); + hole = new BlockHole().setBlockName("ss.hole").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(hole, "Hole"); diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidCrafter.java b/src/main/java/shift/sextiarysector/block/BlockFluidCrafter.java new file mode 100644 index 0000000..9a7d97e --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockFluidCrafter.java @@ -0,0 +1,52 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.tileentity.TileEntityFluidCrafter; + +public class BlockFluidCrafter extends BlockContainer{ + + public BlockFluidCrafter() { + super(Material.glass); + this.setHardness(0.4F); + this.setStepSound(soundTypeGlass); + this.setBlockBounds(4.0f/16.0f, 4.0f/16.0f, 4.0f/16.0f, 12.0f/16.0f, 12.0f/16.0f, 12.0f/16.0f); + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + } + + /* + @Override + public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) + { + if(par6ItemStack.getItemDamage()!=0){ + TileEntityFluidCrafter tileEntity = (TileEntityFluidCrafter)par1World.getTileEntity(par2, par3, par4); + tileEntity.f = new FluidStack(FluidRegistry.getFluid(par6ItemStack.getItemDamage()),1000); + } + + }*/ + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.fluidCrafterType; + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityFluidCrafter(); + } +} diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockFluidCrafter.java b/src/main/java/shift/sextiarysector/item/ItemBlockFluidCrafter.java new file mode 100644 index 0000000..23deaae --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemBlockFluidCrafter.java @@ -0,0 +1,77 @@ +package shift.sextiarysector.item; + +import java.text.NumberFormat; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.tileentity.TileEntityFluidCrafter; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemBlockFluidCrafter extends ItemBlock{ + + public ItemBlockFluidCrafter(Block par1) { + super(par1); + } + + public int getMetadata(int p_77647_1_) + { + return p_77647_1_; + } + + @Override + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) + { + boolean result = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ,metadata); + + if(result){ + + if(stack.getItemDamage()!=0){ + TileEntityFluidCrafter tileEntity = (TileEntityFluidCrafter)world.getTileEntity(x, y, z); + tileEntity.f = new FluidStack(FluidRegistry.getFluid(stack.getItemDamage()),1000); + } + + } + + return result; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) + { + p_150895_3_.add(new ItemStack(p_150895_1_, 1, 0)); + + for(int i=1;i> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelFluidCrafter.java b/src/main/java/shift/sextiarysector/renderer/model/ModelFluidCrafter.java new file mode 100644 index 0000000..fc1b8cf --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelFluidCrafter.java @@ -0,0 +1,28 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelFluidCrafter extends ModelBase { + ModelRenderer Shape1; + + public ModelFluidCrafter() { + textureWidth = 64; + textureHeight = 32; + + Shape1 = new ModelRenderer(this, 0, 0); + Shape1.addBox(-4F, -4F, -4F, 8, 8, 8); + Shape1.setRotationPoint(0F, 0F, 0F); + Shape1.setTextureSize(64, 32); + Shape1.mirror = true; + + } + + 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); + Shape1.render(f5); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidCrafter.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidCrafter.java new file mode 100644 index 0000000..524774c --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidCrafter.java @@ -0,0 +1,101 @@ +package shift.sextiarysector.tileentity; + +import java.util.Random; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraftforge.fluids.FluidStack; + +public class TileEntityFluidCrafter extends TileEntity { + + public static Random r = new Random(); + + public FluidStack f ; + + public int x = 0; + public int y = 0; + public int z = 0; + + @Override + public void updateEntity() { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() { + + x+=r.nextInt(2)+4; + y+=r.nextInt(2)+4; + z+=r.nextInt(2)+4; + + } + + private void updateServerEntity() { + + } + + public boolean hasFluid() { + return f!=null; + } + + public IIcon getFluidIcon(){ + return this.f.getFluid().getIcon(f); + } + + public int getFluidColor(){ + return this.f.getFluid().getColor(this.f); + } + + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + if(par1nbtTagCompound.hasKey("fluid")){ + + NBTTagCompound nbt = par1nbtTagCompound.getCompoundTag("fluid"); + + this.f = FluidStack.loadFluidStackFromNBT(nbt); + } + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + if(f!=null){ + + NBTTagCompound nbt = new NBTTagCompound(); + + f.writeToNBT(nbt); + + par1nbtTagCompound.setTag("fluid", nbt); + + } + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + //this.worldObj.func_147479_m(xCoord, yCoord, zCoord); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + + +} diff --git a/src/main/resources/assets/sextiarysector/textures/models/fluid_crafter.png b/src/main/resources/assets/sextiarysector/textures/models/fluid_crafter.png new file mode 100644 index 0000000000000000000000000000000000000000..5184065288f3c7f45d78de20bd3a7141d88e5fed GIT binary patch literal 450 zcmeAS@N?(olHy`uVBq!ia0vp^4nVBH!3HE3&8=$zQfx`y?k)`fL2$v|<&%LToCO|{ z#S9F5he4R}c>anMpdfpRr>`sfJ#H2rPS!0Cj!QEzF#3DCIEG~0dppfA?~sFl>;L$| z1{uaa$L`Z}lvxigt#)~TNqfR1Gu_x#9${8ev+gt~KVg|?a!$?cjnvVgO=h2OZCpEd z|Ns8>7Y;5gwhEpuXP(@$V`$(%8~5a5=ix7^t+uz)YVZ2**?%DB^M!Z0>UCq;(#+JgUKEZO? zWoynD7q4?SDZp7^~|N6h*ju&d2P-yY!k=%rGpJ!#Cr@K|} pknxwv`)9sFqiYcqoqGF`vw^Yf>vVBj9bjlPc)I$ztaD0e0stNgy}JMa literal 0 HcmV?d00001 From d01846963d230c5d5b8576faa3dc90d6e944e873 Mon Sep 17 00:00:00 2001 From: shift02 Date: Wed, 5 Nov 2014 22:43:08 +0900 Subject: [PATCH 17/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E6=B6=B2?= =?UTF-8?q?=E4=BD=93=E3=82=B3=E3=83=B3=E3=83=86=E3=83=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・Forgeの液体コンテナに液体クリスタルを登録 --- src/main/java/shift/sextiarysector/SSBlocks.java | 2 +- src/main/java/shift/sextiarysector/SSFluids.java | 11 +++++++++++ .../java/shift/sextiarysector/SextiarySector.java | 1 + .../resources/assets/sextiarysector/lang/en_US.lang | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 057bf6a..9cd53d0 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -131,7 +131,7 @@ public static void initBlicks(){ GameRegistry.registerBlock(bottle,ItemBlockBottle.class, "Bottle"); GameRegistry.registerTileEntity(TileEntityBlockBottle.class, "Bottle"); - fluidCrafter = new BlockFluidCrafter().setBlockName("ss.bottle").setBlockTextureName("glass"); + fluidCrafter = new BlockFluidCrafter().setBlockName("ss.fluid_crafter").setBlockTextureName("glass"); GameRegistry.registerBlock(fluidCrafter,ItemBlockFluidCrafter.class, "FluidCrafter"); GameRegistry.registerTileEntity(TileEntityFluidCrafter.class, "FluidCrafter"); diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index d42f4fb..9ea69d7 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -1,7 +1,9 @@ package shift.sextiarysector; +import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import shift.sextiarysector.event.ClientEventHandler; import cpw.mods.fml.relauncher.Side; @@ -17,6 +19,15 @@ public static void initFluids(){ } + public static void postFluids(){ + + for(int i=1;i Date: Fri, 7 Nov 2014 22:21:01 +0900 Subject: [PATCH 18/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E6=B6=B2?= =?UTF-8?q?=E4=BD=93=E3=81=8B=E3=81=BE=E3=81=A9=E3=81=AE=E6=8E=92=E5=87=BA?= =?UTF-8?q?=E6=A9=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・液体かまどの液体を外部に排出できるように ・レシピをいろいろ追加 --- .../java/shift/sextiarysector/SSFluids.java | 3 +- .../java/shift/sextiarysector/SSShops.java | 6 ++ .../block/BlockFluidFurnace.java | 21 ++++- .../container/ContainerFluidFurnace.java | 26 +++++++ .../sextiarysector/gui/GuiFluidFurnace.java | 2 + .../nei/SimpleFluidRecipeHandler.java | 4 +- .../recipe/RecipesFluidFurnace.java | 8 +- .../recipe/RecipesFurnaceCraft.java | 7 ++ .../renderer/block/RendererBlockBottle.java | 3 + .../renderer/block/RendererFluidCrafter.java | 3 +- .../tileentity/TileEntityFluidFurnace.java | 73 +++++++++++++++++- .../assets/sextiarysector/lang/en_US.lang | 6 ++ .../textures/blocks/fluid_furnace_top.png | Bin 0 -> 600 bytes .../textures/blocks/fluid_furnace_top_on.png | Bin 0 -> 565 bytes 14 files changed, 151 insertions(+), 11 deletions(-) create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid_furnace_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid_furnace_top_on.png diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index 9ea69d7..e829d8b 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -12,10 +12,12 @@ public class SSFluids { public static Fluid takumiTea; + public static Fluid drinkingWater; public static void initFluids(){ takumiTea = new SSFluid("takumi_tea", 0x006400, 5, 2.0f); + drinkingWater = new SSFluid("drinking_water", 0xF0FFFF, 4, 1.0f); } @@ -25,7 +27,6 @@ public static void postFluids(){ FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(i), new ItemStack(SSBlocks.fluidCrafter,1,i), new ItemStack(SSBlocks.fluidCrafter,1,0)); } - } public static class SSFluid extends Fluid { diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index aadd960..f32dc63 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -25,6 +25,9 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.seasonStone,1),3000)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,0),500)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,1),500)); + if(i==0){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.turnip,1),200)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.cucumber,1),380)); @@ -40,6 +43,9 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.eggplant,1),310)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.sweetPotato,1),120)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.greenPepper,1),340)); + + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.fluidCrafter,4,0),580)); + } if(i==3){ diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java b/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java index 4de62d5..3690793 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java @@ -20,6 +20,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.machine.item.IHammer; import shift.sextiarysector.tileentity.TileEntityDirection; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import cpw.mods.fml.relauncher.Side; @@ -35,6 +36,8 @@ public class BlockFluidFurnace extends BlockContainer{ private IIcon furnaceIconTop; @SideOnly(Side.CLIENT) private IIcon[] furnaceIconFront = new IIcon[2]; + @SideOnly(Side.CLIENT) + private IIcon furnaceIconTopOn; public BlockFluidFurnace() { super(Material.rock); @@ -60,6 +63,19 @@ public boolean onBlockActivated(World par1World, int par2, int par3, int par4, E { TileEntityFluidFurnace tileentityfurnace = (TileEntityFluidFurnace)par1World.getTileEntity(par2, par3, par4); + if(par5EntityPlayer.getCurrentEquippedItem() != null){ + if(par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof IHammer && ((IHammer)par5EntityPlayer.getCurrentEquippedItem().getItem()).canUse(par5EntityPlayer.getCurrentEquippedItem())){ + + tileentityfurnace.on = !tileentityfurnace.on; + ((IHammer)par5EntityPlayer.getCurrentEquippedItem().getItem()).use(par5EntityPlayer.getCurrentEquippedItem()); + par1World.markBlockForUpdate(par2, par3, par4); + return true; + + } + } + + + if (tileentityfurnace != null) { par5EntityPlayer.openGui(SextiarySector.instance, 1, par1World, par2, par3, par4); @@ -131,7 +147,7 @@ public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) int meta = tileEntity.getDirection().ordinal();//p_149673_1_.getBlockMetadata(x, y, z); - return side == 1 ? this.furnaceIconTop : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isFuel() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); + return side == 1 ? (tileEntity.on ? this.furnaceIconTopOn : this.furnaceIconTop) : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isFuel() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); } @@ -142,7 +158,8 @@ public void registerBlockIcons(IIconRegister par1IconRegister) this.blockIcon = par1IconRegister.registerIcon("furnace_side"); this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); - this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:furnace_top"); + this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top"); + this.furnaceIconTopOn = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top_on"); } @Override diff --git a/src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java b/src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java index ca833bd..6817bf5 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java @@ -19,6 +19,8 @@ public class ContainerFluidFurnace extends Container private int lastFuel; private int lastFuelMax; private int workProgress; + //private int lastFluid; + //private int lastFluidID; public ContainerFluidFurnace(InventoryPlayer p_i1812_1_, TileEntityFluidFurnace p_i1812_2_) { @@ -51,6 +53,13 @@ public void addCraftingToCrafters(ICrafting p_75132_1_) p_75132_1_.sendProgressBarUpdate(this, 0, this.tileFurnace.fuel); p_75132_1_.sendProgressBarUpdate(this, 1, this.tileFurnace.fuelMax); p_75132_1_.sendProgressBarUpdate(this, 2, this.tileFurnace.machineWorkProgressTime); + p_75132_1_.sendProgressBarUpdate(this, 3, this.tileFurnace.getTank().getFluidAmount()); + if(this.tileFurnace.getTank().getFluid()!=null){ + p_75132_1_.sendProgressBarUpdate(this, 4, this.tileFurnace.getTank().getFluid().fluidID); + }else{ + p_75132_1_.sendProgressBarUpdate(this, 4, 0); + } + } /** @@ -78,11 +87,22 @@ public void detectAndSendChanges() { icrafting.sendProgressBarUpdate(this, 2, this.tileFurnace.machineWorkProgressTime); } + + /*if (this.lastFluid != this.tileFurnace.getTank().getFluidAmount()) + { + icrafting.sendProgressBarUpdate(this, 3, this.tileFurnace.getTank().getFluidAmount()); + + ////if(this.tileFurnace.getTank().getFluidAmount()>0){ + // icrafting.sendProgressBarUpdate(this, 4, this.tileFurnace.getTank().getFluid().fluidID); + // } + + }*/ } this.lastFuel = this.tileFurnace.fuel; this.lastFuelMax = this.tileFurnace.fuelMax; this.workProgress = this.tileFurnace.machineWorkProgressTime; + //this.lastFluid = this.tileFurnace.getTank().getFluidAmount(); } @SideOnly(Side.CLIENT) @@ -102,6 +122,12 @@ public void updateProgressBar(int p_75137_1_, int p_75137_2_) { this.tileFurnace.machineWorkProgressTime = p_75137_2_; } + + /*if (p_75137_1_ == 3) + { + this.tileFurnace.amount = p_75137_2_; + }*/ + } public boolean canInteractWith(EntityPlayer p_75145_1_) diff --git a/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java b/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java index 81236a2..4316318 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java @@ -101,6 +101,8 @@ public void drawScreen(int par1, int par2, float par3) public void drawFluidTank(int x, int y, FluidTank fluidTank, int width, int height) { + GL11.glColor3f(1,1,1); + FluidStack fluidStack = fluidTank.getFluid(); ResourceLocation r; diff --git a/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java index 62ade4b..f40a052 100644 --- a/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java +++ b/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java @@ -32,7 +32,7 @@ public SimpleFluidPair(ItemStack ingred, ItemStack result, FluidStack fluidStack { ingred.stackSize = 1; this.ingred = new PositionedStack(ingred, 51, 6); - this.result = new PositionedStack(result, 111 - 9, 24 + 18); + if(result!=null)this.result = new PositionedStack(result, 111 - 9, 24 + 18); if(ingred.getItem().getContainerItem(ingred.copy())!=null){ this.result2 = new PositionedStack(ingred.getItem().getContainerItem(ingred.copy()), 111 - 9 + 18, 24 + 18); } @@ -47,7 +47,7 @@ public SimpleFluidPair(List ingred, ItemStack result, FluidStack flui } //ingred.stackSize = 1; this.ingred = new PositionedStack(ingred, 51, 6); - this.result = new PositionedStack(result, 111 - 8, 24 + 19); + if(result!=null)this.result = new PositionedStack(result, 111 - 8, 24 + 19); this.fluidStack = fluidStack; } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java index 8f9cd87..ef16d99 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java @@ -1,18 +1,18 @@ package shift.sextiarysector.recipe; +import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import shift.sextiarysector.SSItems; +import shift.sextiarysector.SSFluids; public class RecipesFluidFurnace { public static void addRecipes(RecipeSimpleFluid recipe) { - recipe.add(new ItemStack(SSItems.stringBobbin,1),new ItemStack(SSItems.cloth, 1), null); - recipe.add(new ItemStack(Items.water_bucket,1),new ItemStack(Items.stick, 1), new FluidStack(FluidRegistry.WATER, 1000)); + recipe.add(new ItemStack(Blocks.netherrack,1),null, new FluidStack(SSFluids.drinkingWater, 50)); + recipe.add(new ItemStack(Items.water_bucket,1),new ItemStack(Items.stick, 1), new FluidStack(SSFluids.drinkingWater, 1000)); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index b29e52f..f80115e 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -51,6 +51,13 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) Character.valueOf('y'), "stickWood", })); + //液体カマド + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.fluidFurnace, 1), + new Object[] { "xxx", "xyx","xxx", + Character.valueOf('x'), "cobblestone", + Character.valueOf('y'), Blocks.glass_pane, + })); + //time p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.chunkLoader, 1), new Object[] { "xyx", "yzy","xyx", diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java b/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java index 73e53a2..3218b37 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java @@ -39,6 +39,7 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glColor3f(1,1,1); this.bind(MC_BLOCK_SHEET); @@ -134,6 +135,8 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHT0); + GL11.glColor3f(1,1,1); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); if(((TileEntityBlockBottle)tileentity).hasFluid()){ diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java b/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java index 39a6cb4..30cde10 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java @@ -42,7 +42,7 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - + GL11.glColor3f(1,1,1); this.bind(MC_BLOCK_SHEET); @@ -139,6 +139,7 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHT0); + GL11.glColor3f(1,1,1); GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java index b8925e2..5b1ce81 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java @@ -11,6 +11,7 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; @@ -41,6 +42,8 @@ public class TileEntityFluidFurnace extends TileEntityDirection implements ISi public int fuel; public int fuelMax; + public boolean on; + @Override public void updateEntity() { @@ -86,8 +89,73 @@ public void updateServerEntity() } + this.chargeFluid(); + if(this.on && this.tank.getFluidAmount() > 0)this.chargeUPFluid(); + + } + + private void chargeUPFluid(){ + + if(this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord) instanceof IFluidHandler){ + IFluidHandler f = (IFluidHandler) this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); + + if(f.canFill(ForgeDirection.DOWN, this.tank.getFluid().getFluid())){ + int i = f.fill(ForgeDirection.DOWN, this.tank.getFluid(), true); + this.tank.drain(i, true); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + } + private void chargeFluid(){ + + if(canChargeFluid()){ + + ItemStack empty = items.getStackInSlot(4); + + for(FluidContainerData f : FluidContainerRegistry.getRegisteredFluidContainerData()){ + + if(f.emptyContainer.isItemEqual(empty) && f.fluid.isFluidEqual(this.tank.getFluid()) && f.fluid.amount <= this.tank.getFluidAmount()){ + + ItemStack item = FluidContainerRegistry.fillFluidContainer(this.tank.getFluid(), empty); + if (this.items.getStackInSlot(5) == null) + { + this.setInventorySlotContents(5, item.copy()); + } + else if (this.items.getStackInSlot(5).isItemEqual(item)) + { + this.items.getStackInSlot(5).stackSize += item.stackSize; + } + + this.tank.drain(f.fluid.amount, true); + + this.items.reduceStackSize(4, 1); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + return ; + } + + } + + } + + } + + public boolean canChargeFluid() + { + if(items.getStackInSlot(4) == null)return false; + ItemStack item = FluidContainerRegistry.fillFluidContainer(this.tank.getFluid(), items.getStackInSlot(4)); + if(item == null)return false; + if(this.items.getStackInSlot(5) == null)return true; + int result = this.items.getStackInSlot(5).stackSize + item.stackSize; + return (result <= getInventoryStackLimit() && result <= item.getMaxStackSize()); + } + private void chargeFuel(){ if(TileEntityFurnace.isItemFuel(this.items.getStackInSlot(1))){ @@ -247,7 +315,7 @@ public void setInventorySlotContents(int i, ItemStack itemstack) { @Override public String getInventoryName() { - return "gui.fluid_furnace";//+SimpleMachine.values()[this.worldObj.getBlockMetadata(xCoord, yCoord, zCoord)].icon+".name"; + return "gui.ss.fluid_furnace";//+SimpleMachine.values()[this.worldObj.getBlockMetadata(xCoord, yCoord, zCoord)].icon+".name"; } @Override @@ -355,9 +423,11 @@ public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); items.readFromNBT(nbt); getTank().readFromNBT(nbt); + if(nbt.hasKey("Empty") && tank.getFluidAmount() > 0)this.tank.setFluid(null); this.machineWorkProgressTime = nbt.getShort("WorkTime"); this.fuel = nbt.getInteger("fuel"); this.fuelMax = nbt.getInteger("fuelMax"); + this.on = nbt.getBoolean("on"); } @Override @@ -369,6 +439,7 @@ public void writeToNBT(NBTTagCompound nbt) { nbt.setShort("WorkTime", (short)this.machineWorkProgressTime); nbt.setInteger("fuel", this.fuel); nbt.setInteger("fuelMax", this.fuelMax); + nbt.setBoolean("on", this.on); } @Override diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 0023dd4..4e7c5c6 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -2,6 +2,7 @@ #Block tile.ss.large_furnace.name=Large Furnace +tile.ss.fluid_furnace.name=Fluid Furnace tile.ss.wood_grate.name=Wood Grate @@ -133,11 +134,14 @@ item.ss.shift_hat.name=Shift's Hat #Fluid fluid.ss.takumi_tea=TAKUMI Tea +fluid.ss.drinking_water=Drinking Water #GUI container.large_furnace=Large Furnace container.sub.inventory=Buffer +gui.ss.fluid_furnace=Fluid Furnace + gui.ss.millstone=Millstone gui.ss.loom=Loom gui.ss.sawmill=Sawmill @@ -184,6 +188,8 @@ nei.recipe=Recipes nei.ss.furnace.shaped=Furnace Shaped nei.ss.furnace.shapeless=Furnace Shapeless +nei.ss.fluid_furnace.=Fluid Furnace + nei.ss.millstone=Millstone Recipe nei.ss.loom=Loom Recipe nei.ss.sawmill=Sawmill Recipe diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid_furnace_top.png b/src/main/resources/assets/sextiarysector/textures/blocks/fluid_furnace_top.png new file mode 100644 index 0000000000000000000000000000000000000000..f22181877f7e35979f559f2f4837502e2c1ab466 GIT binary patch literal 600 zcmV-e0;m0nP)H1$#6QI&;VMk7Ov|egkZT`lFeo*6bb-Lr&A2WAdyHQrR3%11=n@S z<#NnsGt}K~$8x!(TrTtc{7j)xz_x8lr4qWXW11%0?Urh_O1WG{*L9lBCP5GoMG=~& zX+%-PVzHpp>2QhO5q^FCh-sQkCKJ?DDn+eUqgX5gaDRV~Wm#|P!@~oXW#K(N5{4l{ z2*NN#^*j&9aY!bUT+4hur{C`bpb8<-bsa@fu3k{7RIn_IIF8Yzl!Rf(Y&Ls$IGs+v z=?w-0eBURZ&!YmYRx1p{xcYvO%vbu|Jazz<@guQHY)XcJ#I7_0DSoJ1MlhaqWI_cZ*;p|*6TIe*~Xij z8-`y$;rl*92u7n3o6QEpFu1$BW4&Ip+wBlS0AN`by zpFh0Awr%F~IcheWrO{|msZ;<^RTbBD|9XS(--zQFAp~(8qXt2M=XvP5&Z}9iR*XiY zpM^pQ48uTCl$QauS`F8ANz)WfN=Y2YESJld0pszQFbpY`N~i$a?H0?jUIv^_Cz{PB zilU%KQA946qh7DS4CwWG%w{t#mka7sqvv@q116IRwrvxJ;V+G*Y4R_5YSf+@JsF9 literal 0 HcmV?d00001 From 8eee58d4f8b6eee1f4ef7ac5d291dcb56f7c6b96 Mon Sep 17 00:00:00 2001 From: shift02 Date: Fri, 7 Nov 2014 22:25:09 +0900 Subject: [PATCH 19/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E8=A1=A8=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・2.0.7に変更 --- build.gradle | 2 +- src/main/java/shift/sextiarysector/SextiarySector.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 29b55c2..22bca29 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.0.6.b-${project.minecraft.version}" +version = "2.0.7.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 04416ac..0d21bcd 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -32,7 +32,7 @@ public class SextiarySector { //public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.0.6"; + public static final String VERSION = "2.0.7"; @Mod.Instance("SextiarySector") public static SextiarySector instance; From de32e91f95b665a5235b2fa79320e5d09d8d793f Mon Sep 17 00:00:00 2001 From: shift02 Date: Fri, 7 Nov 2014 23:09:39 +0900 Subject: [PATCH 20/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20GUI=E3=81=AE?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=A9=E3=82=A4=E3=82=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・液体かまどのGUIがローカライズ出来ていなかったのを修正 --- build.gradle | 2 +- src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 22bca29..2a03fad 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.0.7.a-${project.minecraft.version}" +version = "2.0.7.b-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java b/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java index 4316318..98e1ca6 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java @@ -79,7 +79,7 @@ public void drawScreen(int par1, int par2, float par3) if (this.tileFurnace.isFluid()) { - f = this.tileFurnace.getTank().getFluid().getFluid().getName(); + f = this.tileFurnace.getTank().getFluid().getFluid().getLocalizedName(this.tileFurnace.getTank().getFluid()); } NumberFormat nfNum = NumberFormat.getNumberInstance(); From 786e8de142fbfd843bb415aa811ca2f821c38b1c Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 8 Nov 2014 00:18:31 +0900 Subject: [PATCH 21/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E6=B6=B2?= =?UTF-8?q?=E4=BD=93List=E3=81=AE=E6=9C=80=E5=BE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・<を<=に変更 --- build.gradle | 2 +- src/main/java/shift/sextiarysector/SSFluids.java | 2 +- src/main/java/shift/sextiarysector/item/ItemBlockBottle.java | 2 +- .../java/shift/sextiarysector/item/ItemBlockFluidCrafter.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 2a03fad..9c6cb48 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.0.7.b-${project.minecraft.version}" +version = "2.0.7.d-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index e829d8b..83e8ce4 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -23,7 +23,7 @@ public static void initFluids(){ public static void postFluids(){ - for(int i=1;i Date: Sun, 9 Nov 2014 20:13:21 +0900 Subject: [PATCH 22/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=AC?= =?UTF-8?q?=E3=82=B7=E3=83=94=E3=81=AEnull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・液体カマドのネザーラックレシピを削除 ・液体を扱うRendererのnullチェックを強化 --- .../java/shift/sextiarysector/recipe/RecipesFluidFurnace.java | 3 +-- .../sextiarysector/renderer/block/RendererBlockBottle.java | 2 +- .../sextiarysector/renderer/block/RendererFluidCrafter.java | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java index ef16d99..0a6fe76 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java @@ -1,6 +1,5 @@ package shift.sextiarysector.recipe; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -11,7 +10,7 @@ public class RecipesFluidFurnace { public static void addRecipes(RecipeSimpleFluid recipe) { - recipe.add(new ItemStack(Blocks.netherrack,1),null, new FluidStack(SSFluids.drinkingWater, 50)); + //recipe.add(new ItemStack(Blocks.netherrack,1),null, new FluidStack(SSFluids.drinkingWater, 50)); recipe.add(new ItemStack(Items.water_bucket,1),new ItemStack(Items.stick, 1), new FluidStack(SSFluids.drinkingWater, 1000)); } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java b/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java index 3218b37..d3a2420 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererBlockBottle.java @@ -45,7 +45,7 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB //GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); - if(metadata!=0&&FluidRegistry.getFluid(metadata)!=null){ + if(metadata!=0&&FluidRegistry.getFluid(metadata)!=null && FluidRegistry.getFluid(metadata).getIcon()!=null){ IIcon icon = FluidRegistry.getFluid(metadata).getIcon(); diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java b/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java index 30cde10..c305f9c 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java @@ -50,7 +50,7 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB GL11.glRotatef(-(FMLClientHandler.instance().getClient().getMinecraft().getSystemTime()/50)%360, 0, 1, 0); - if(metadata!=0&&FluidRegistry.getFluid(metadata)!=null){ + if(metadata!=0&&FluidRegistry.getFluid(metadata)!=null && FluidRegistry.getFluid(metadata).getIcon()!=null){ IIcon icon = FluidRegistry.getFluid(metadata).getIcon(); From a2a0124722ffbcc1f54b1cbee508ae3ebbc90c4b Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 9 Nov 2014 20:14:58 +0900 Subject: [PATCH 23/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E8=A1=A8=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9c6cb48..cee4cea 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.0.7.d-${project.minecraft.version}" +version = "2.0.7.e-${project.minecraft.version}" minecraft { // replacing stuff in the source From 557d26bb39444fd35146175ce2ca885c33a992eb Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 11 Nov 2014 22:42:25 +0900 Subject: [PATCH 24/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=83=B3=E3=82=BF=E3=82=B8=E3=83=BC=E9=87=91=E5=B1=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・ミスリルを追加 ・オリハルコンを追加 ・魔法の粉を追加 ・クリエイティブタブにMagicを追加 --- .../java/shift/sextiarysector/SSBlocks.java | 18 +++- .../shift/sextiarysector/SSCreativeTabs.java | 40 +++++++++ .../java/shift/sextiarysector/SSItems.java | 13 +++ .../sextiarysector/api/SextiarySectorAPI.java | 2 + .../sextiarysector/block/BlockBottle.java | 2 +- .../block/BlockFluidCrafter.java | 2 +- .../sextiarysector/block/BlockLargeOre.java | 77 ++++++++++++++++++ .../sextiarysector/block/BlockSSOre.java | 52 +----------- .../assets/sextiarysector/lang/en_US.lang | 9 ++ .../textures/blocks/ore/mithril_ore.png | Bin 0 -> 549 bytes .../textures/blocks/ore/orichalcum_ore.png | Bin 0 -> 539 bytes .../textures/items/dust/magic_dust.png | Bin 0 -> 314 bytes .../textures/items/dust/mana_dust.png | Bin 0 -> 308 bytes .../textures/items/gem/orichalcum_gem.png | Bin 0 -> 376 bytes .../textures/items/ingot/mithril_ingot.png | Bin 0 -> 325 bytes 15 files changed, 160 insertions(+), 55 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockLargeOre.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/mithril_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/orichalcum_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/dust/magic_dust.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/dust/mana_dust.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gem/orichalcum_gem.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ingot/mithril_ingot.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 9cd53d0..dc5d549 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -14,6 +14,7 @@ import shift.sextiarysector.block.BlockGearShaft; import shift.sextiarysector.block.BlockHole; import shift.sextiarysector.block.BlockLargeFurnace; +import shift.sextiarysector.block.BlockLargeOre; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockPowerStone; import shift.sextiarysector.block.BlockSSChest; @@ -90,9 +91,13 @@ public class SSBlocks { public static Block chunkLoader; + //鉱石 public static Block blueStoneOre; public static Block yellowStoneOre; + public static Block mithrilOre; + public static Block orichalcumOre; + public static Block coalLargeOre; public static Block ironLargeOre; public static Block goldLargeOre; @@ -100,6 +105,7 @@ public class SSBlocks { public static Block shippingBox; public static Block creeperChest; + //経済 public static Block monitor; public static Block farmland; @@ -154,13 +160,19 @@ public static void initBlicks(){ yellowStoneOre = new BlockPowerStone().setBlockName("ss.yellow_stone").setBlockTextureName("sextiarysector:yellowstone_ore").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(yellowStoneOre, "YellowStoneOre"); - coalLargeOre = new BlockSSOre(SSItems.coalDust,Blocks.coal_ore,1).setBlockName("ss.coal_large_ore").setBlockTextureName("sextiarysector:ore/coal_large_ore"); + mithrilOre = new BlockSSOre(null,2).setBlockName("ss.mithril_ore").setBlockTextureName("sextiarysector:ore/mithril_ore"); + GameRegistry.registerBlock(mithrilOre, "MithrilOre"); + + orichalcumOre = new BlockSSOre(SSItems.orichalcumGem,3).setBlockName("ss.orichalcum_ore").setBlockTextureName("sextiarysector:ore/orichalcum_ore"); + GameRegistry.registerBlock(orichalcumOre, "OrichalcumOre"); + + coalLargeOre = new BlockLargeOre(SSItems.coalDust,Blocks.coal_ore,1).setBlockName("ss.coal_large_ore").setBlockTextureName("sextiarysector:ore/coal_large_ore"); GameRegistry.registerBlock(coalLargeOre, "CoalLargeOre"); - ironLargeOre = new BlockSSOre(SSItems.ironDust,Blocks.iron_ore,2).setBlockName("ss.iron_large_ore").setBlockTextureName("sextiarysector:ore/iron_large_ore"); + ironLargeOre = new BlockLargeOre(SSItems.ironDust,Blocks.iron_ore,2).setBlockName("ss.iron_large_ore").setBlockTextureName("sextiarysector:ore/iron_large_ore"); GameRegistry.registerBlock(ironLargeOre, "IronLargeOre"); - goldLargeOre = new BlockSSOre(SSItems.goldDust,Blocks.gold_ore,2).setBlockName("ss.gold_large_ore").setBlockTextureName("sextiarysector:ore/gold_large_ore"); + goldLargeOre = new BlockLargeOre(SSItems.goldDust,Blocks.gold_ore,2).setBlockName("ss.gold_large_ore").setBlockTextureName("sextiarysector:ore/gold_large_ore"); GameRegistry.registerBlock(goldLargeOre, "GoldLargeOre"); //GF diff --git a/src/main/java/shift/sextiarysector/SSCreativeTabs.java b/src/main/java/shift/sextiarysector/SSCreativeTabs.java index bbdd932..66a7f0f 100644 --- a/src/main/java/shift/sextiarysector/SSCreativeTabs.java +++ b/src/main/java/shift/sextiarysector/SSCreativeTabs.java @@ -12,9 +12,11 @@ public class SSCreativeTabs { public static void initCreativeTabs(){ SextiarySectorAPI.TabSSCore = new CreativeTabSSCore(); + SextiarySectorAPI.TabSSFluid = new CreativeTabSSFluid(); SextiarySectorAPI.TabSSMachine = new CreativeTabSSMachine(); SextiarySectorAPI.TabSSAgriculture = new CreativeTabSSAgriculture(); SextiarySectorAPI.TabSSEconomy = new CreativeTabSSEconomy(); + SextiarySectorAPI.TabSSMagic = new CreativeTabSSMagic(); } @@ -37,6 +39,25 @@ public ItemStack getIconItemStack() } + private static class CreativeTabSSFluid extends CreativeTabs{ + + public CreativeTabSSFluid() { + super("ss.fluid"); + } + + @Override + public Item getTabIconItem() { + return null;//SSBlocks.LargeFurnace.g; + } + + @SideOnly(Side.CLIENT) + public ItemStack getIconItemStack() + { + return new ItemStack(SSBlocks.bottle,1); + } + + } + private static class CreativeTabSSMachine extends CreativeTabs{ public CreativeTabSSMachine() { @@ -94,4 +115,23 @@ public ItemStack getIconItemStack() } + private static class CreativeTabSSMagic extends CreativeTabs{ + + public CreativeTabSSMagic() { + super("ss.magic"); + } + + @Override + public Item getTabIconItem() { + return null;//SSBlocks.LargeFurnace.g; + } + + @SideOnly(Side.CLIENT) + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.magicDust,1); + } + + } + } diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 06779f4..4e2f54b 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -45,8 +45,13 @@ public class SSItems { public static Item ironDust; public static Item goldDust; + public static Item orichalcumGem; + public static Item blueStoneSlimeBall; + //魔法 + public static Item magicDust; + //布 public static Item stringBobbin; public static Item cloth; @@ -118,6 +123,7 @@ public static void initItems(){ seasonStone = new ItemSeasonStone().setUnlocalizedName("ss.season_stone").setTextureName("sextiarysector:season_stone").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(seasonStone, "SeasonStone"); + //素材 dustWaterLily = new Item().setUnlocalizedName("ss.dust_waterlily").setTextureName("sextiarysector:dust/waterlily_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(dustWaterLily, "DustWaterLily"); @@ -139,9 +145,16 @@ public static void initItems(){ goldDust = new Item().setUnlocalizedName("ss.gold_dust").setTextureName("sextiarysector:dust/gold_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(goldDust, "GoldDust"); + orichalcumGem = new Item().setUnlocalizedName("ss.orichalcum_gem").setTextureName("sextiarysector:gem/orichalcum_gem").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(orichalcumGem, "OrichalcumGem"); + blueStoneSlimeBall = new Item().setUnlocalizedName("ss.blue_stone_slime_ball").setTextureName("sextiarysector:slimeball/bluestone_slimeball").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(blueStoneSlimeBall, "BlueStoneSlimeBall"); + //魔法 + magicDust = new Item().setUnlocalizedName("ss.magic_dust").setTextureName("sextiarysector:dust/magic_dust").setCreativeTab(SextiarySectorAPI.TabSSMagic); + GameRegistry.registerItem(magicDust, "MagicDust"); + //布 stringBobbin = new Item().setUnlocalizedName("ss.string_bobbin").setTextureName("sextiarysector:loom/string_bobbin").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(stringBobbin, "StringBobbin"); diff --git a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java index 468a90b..ad92fd7 100644 --- a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java +++ b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java @@ -16,9 +16,11 @@ public class SextiarySectorAPI { //CreativeTabs public static CreativeTabs TabSSCore; + public static CreativeTabs TabSSFluid; public static CreativeTabs TabSSMachine; public static CreativeTabs TabSSAgriculture; public static CreativeTabs TabSSEconomy; + public static CreativeTabs TabSSMagic; /** * IPlayerManager Player関係のインターフェース
diff --git a/src/main/java/shift/sextiarysector/block/BlockBottle.java b/src/main/java/shift/sextiarysector/block/BlockBottle.java index 0ee2245..60a72a3 100644 --- a/src/main/java/shift/sextiarysector/block/BlockBottle.java +++ b/src/main/java/shift/sextiarysector/block/BlockBottle.java @@ -22,7 +22,7 @@ public BlockBottle() { this.setHardness(0.4F); this.setStepSound(soundTypeGlass); this.setBlockBounds(2.0f/16.0f, 0, 2.0f/16.0f, 14.0f/16.0f, 1, 14.0f/16.0f); - this.setCreativeTab(SextiarySectorAPI.TabSSCore); + this.setCreativeTab(SextiarySectorAPI.TabSSFluid); } @Override diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidCrafter.java b/src/main/java/shift/sextiarysector/block/BlockFluidCrafter.java index 9a7d97e..2ef44a3 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFluidCrafter.java +++ b/src/main/java/shift/sextiarysector/block/BlockFluidCrafter.java @@ -15,7 +15,7 @@ public BlockFluidCrafter() { this.setHardness(0.4F); this.setStepSound(soundTypeGlass); this.setBlockBounds(4.0f/16.0f, 4.0f/16.0f, 4.0f/16.0f, 12.0f/16.0f, 12.0f/16.0f, 12.0f/16.0f); - this.setCreativeTab(SextiarySectorAPI.TabSSCore); + this.setCreativeTab(SextiarySectorAPI.TabSSFluid); } /* diff --git a/src/main/java/shift/sextiarysector/block/BlockLargeOre.java b/src/main/java/shift/sextiarysector/block/BlockLargeOre.java new file mode 100644 index 0000000..02bfb24 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockLargeOre.java @@ -0,0 +1,77 @@ +package shift.sextiarysector.block; + +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class BlockLargeOre extends Block{ + + private Item oreItem; + private Block oreBlock; + + public BlockLargeOre(Item item,Block block, int level) { + super(Material.rock); + this.oreItem = item; + this.oreBlock = block; + this.setHarvestLevel("pickaxe", level); + this.setResistance(5.0F); + this.setStepSound(Block.soundTypeStone); + this.setHardness(3.0F); + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + } + + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + { + return oreItem; + } + + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) + { + ArrayList ret = new ArrayList(); + + int count = quantityDropped(metadata, fortune, world.rand); + for(int i = 0; i < count; i++) + { + Item item = getItemDropped(metadata, world.rand, fortune); + if (item != null) + { + ret.add(new ItemStack(item, 1, damageDropped(metadata))); + ret.add(new ItemStack(oreBlock, 1, damageDropped(metadata))); + } + } + return ret; + } + + /* + public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) + { + if(!willHarvest){ + return super.removedByPlayer(world, player, x, y, z, willHarvest); + }else if(world.getBlockMetadata(x, y, z)==0){ + return world.setBlock(x, y, z, oreBlock); + } + + return world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)-1, 4); + + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) + { + for(int i=0;i<4;i++){ + p_149666_3_.add(new ItemStack(p_149666_1_,1,i)); + } + }*/ + + protected boolean canSilkHarvest() + { + return false; + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockSSOre.java b/src/main/java/shift/sextiarysector/block/BlockSSOre.java index 2165a77..d52c2bc 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSSOre.java +++ b/src/main/java/shift/sextiarysector/block/BlockSSOre.java @@ -1,24 +1,19 @@ package shift.sextiarysector.block; -import java.util.ArrayList; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; import shift.sextiarysector.api.SextiarySectorAPI; public class BlockSSOre extends Block{ private Item oreItem; - private Block oreBlock; - public BlockSSOre(Item item,Block block, int level) { + public BlockSSOre(Item item,int level) { super(Material.rock); this.oreItem = item; - this.oreBlock = block; this.setHarvestLevel("pickaxe", level); this.setResistance(5.0F); this.setStepSound(Block.soundTypeStone); @@ -28,50 +23,7 @@ public BlockSSOre(Item item,Block block, int level) { public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { - return oreItem; - } - - public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) - { - ArrayList ret = new ArrayList(); - - int count = quantityDropped(metadata, fortune, world.rand); - for(int i = 0; i < count; i++) - { - Item item = getItemDropped(metadata, world.rand, fortune); - if (item != null) - { - ret.add(new ItemStack(item, 1, damageDropped(metadata))); - ret.add(new ItemStack(oreBlock, 1, damageDropped(metadata))); - } - } - return ret; - } - - /* - public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) - { - if(!willHarvest){ - return super.removedByPlayer(world, player, x, y, z, willHarvest); - }else if(world.getBlockMetadata(x, y, z)==0){ - return world.setBlock(x, y, z, oreBlock); - } - - return world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)-1, 4); - - } - - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) - { - for(int i=0;i<4;i++){ - p_149666_3_.add(new ItemStack(p_149666_1_,1,i)); - } - }*/ - - protected boolean canSilkHarvest() - { - return false; + return oreItem !=null ? this.oreItem : super.getItemDropped(p_149650_1_, p_149650_2_, p_149650_3_); } } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 4e7c5c6..06f7903 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -37,6 +37,9 @@ tile.ss.sawmill.name=Sawmill tile.ss.blue_stone.name=Blue Stone Ore tile.ss.yellow_stone.name=Yellow Stone Ore +tile.ss.mithril_ore.name=Mithril Ore +tile.ss.orichalcum_ore.name=Orichalcum Ore + tile.ss.coal_large_ore.name=Coal Large Ore tile.ss.iron_large_ore.name=Iron Large Ore tile.ss.gold_large_ore.name=Gold Large Ore @@ -74,8 +77,12 @@ item.ss.coal_dust.name=Coal Dust item.ss.iron_dust.name=Iron Dust item.ss.gold_dust.name=Gold Dust +item.ss.orichalcum_gem.name=Orichalcum + item.ss.blue_stone_slime_ball.name=Blue Stone Slime Ball +item.ss.magic_dust.name=Magic Dust + item.ss.unit.name=Unit item.ss.wood_gear.name=Wood Gear @@ -165,9 +172,11 @@ tooltip.season.winter=Winter #Tab itemGroup.ss.core=SextiarySector -Core- +itemGroup.ss.fluid=SextiarySector -Fluid- itemGroup.ss.machine=SextiarySector -Machine- itemGroup.ss.agriculture=SextiarySector -Agriculture- itemGroup.ss.economy=SextiarySector -Economy- +itemGroup.ss.magic=SextiarySector -Magic- #Achievement stat.sell=Sell diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/mithril_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/mithril_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..0de4ea7e6ec46c69ffd10b52d807756837d7845a GIT binary patch literal 549 zcmV+=0^0qFP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*z; z4=XkmFa>G=00E^*L_t(I%XO2#%JMK2haW|7I1U*K9dZHjqIv-i4jmK`gmw^W>Ea-G z1HGwUK!<=sz;?*gZ+JlJocZoh*u?n8tBrZX$wG3V^QbFvj4VqHYThLm^9S35?up@INy!TwM*SJg{GM>+8E|<$sxq?#jS1BSa n4u`|^t+_EKI?ruBYDoMKdu;!o|4|iU00000NkvXXu0mjf_&n}} literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/orichalcum_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/orichalcum_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..a587f90a72353c303b7302f8c8db163cc2baf035 GIT binary patch literal 539 zcmV+$0_6RPP)=t0jNnt zK~y-)ZIdx;95E1uzq7Xp%oRL>Gsxn&921En>TMpi@xvQVvI~7A}FN*u-4Kv4Iu>n7gx;_GMsY&)O8Jj zQVOLM)>^dI0K^y*f%m?!55rKB0E{s>=MWJ9wALu42qBymWQjjNZvc4wnv%bNgw1Ay zh!A6Bce~~BF5P!scP0Q*^568oI*gZh6lKO3I2~CXmb|{~F~(r6rHV18pe2|1a5l<& zPY8ito{6W38(Y;{QyF7;hcWr}*S_>U^(4buOBF&GZ9k^(ZIZG+cDONcYHV&vM3RC$ zq6hUm&HSaoozAY$tIlziXYQP%uIn=YTq*beO!g{>BSn*Rb+Ku)W z6N`LzgyoWlKYPNsea<=7bnN)Xny1m+^V?bUegBpV%wJpfXR2iSDn%r1;uOO$l)lT3 d%o3->{{UWw+1t9@4cq_#002ovPDHLkV1jHJ^xOad literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/dust/magic_dust.png b/src/main/resources/assets/sextiarysector/textures/items/dust/magic_dust.png new file mode 100644 index 0000000000000000000000000000000000000000..4a0cb9e35d5bd23aa277bec21465b14933df8c2d GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqH#e^|x;-vXi zq@}MVILG-ySbs*2MPu3Q3xZaMSQo@(@`xR3o6j2kxMcFo_h)Cb|Bn?clos5cZGBFv zhEM;>CZ>%17~RYF(sK9fr+{Z`jto+n*M2I;%|bfu20WkBXEh%8c2w9KWmo{;
2>_W{+d@tFFeTh@Gf_tml!-<{an^LB{Ts5 Dp{s6Y literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/dust/mana_dust.png b/src/main/resources/assets/sextiarysector/textures/items/dust/mana_dust.png new file mode 100644 index 0000000000000000000000000000000000000000..4ee3752c0c51f2a71403939a3fa999a28fd16d1c GIT binary patch literal 308 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqH#e^UYnh`+5>V)%r;B5V#p%0~ZH1Z)1l;x~NH}o0 zTV;FY?BJMpRJuZt|Dk8bf-Q%nq<@|iP!sbr3VeLaDsT7ixJ~y}4%CNFDHKhO2{e{t zU4C42k`jyRM~w(^)sHbB(&U*Let9W*h%afWx7xX0W!i1`=sD>nPg|C7Tucga*1b8~ z;c%@g4! zK~y-)rIWjE!Y~v-k0T@`wg|c67qT{=z;`e*cOpZX+rda3I`sn>`wJ}W&W1!67(nfS zs#FE3Wx*Ys1k%J&t9bF_>KtD`t}w>XqN9>-MIiKjyt%%S4;+xoeY&5ep^-x-j7xS5Z^|~v8skYUaJM&HpB~{19Ge^m}PSb zKabq6KnLWN9m<>ZvK(+B1CwZx|GcS&!-doVmyVDHGm(7KHsF8(L|rxhr4~ffa{d8Q W7nbe2vpC-X0000QL70(Y)*K0-AbW|YuPggqE>>0{jgSf9KoN$co-U3d7N@UH z+$h+hAmD0m9NsXKRbs*o2HOax)C-I+rzK`dX8B|!<#jM>idPsNDlB?<*KPNkJ?5Kh z9^`j**a-go@;9*QT%1?swm8kBc3eR#*1gX7FT~3Eo6Rfxw%M0j{-q+xE>Cu^V}8Ep z2mfIMm(7OHEE!$OaLPI5vZ{*l})WTPoVL|4s=nIzY z$v!i-Uej5k&|=~AP44$T_equWlwa&hzW%3Gz_EZmm38@%sOXlu)$_J-Wts;q+29WH Nk*BMl%Q~loCII0rcYFW< literal 0 HcmV?d00001 From 6b61c88bb6e9db03f259ef19e8c38c43697d815e Mon Sep 17 00:00:00 2001 From: shift02 Date: Thu, 13 Nov 2014 23:28:05 +0900 Subject: [PATCH 25/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20Magic=E3=82=AB?= =?UTF-8?q?=E3=83=9E=E3=83=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・魔法のカマドを追加 --- .../java/shift/sextiarysector/SSBlocks.java | 7 + .../shift/sextiarysector/SSGuiHandler.java | 8 + .../java/shift/sextiarysector/SSRecipes.java | 7 + .../shift/sextiarysector/SextiarySector.java | 8 + .../block/BlockMagicFurnace.java | 326 ++++++++++++++++++ .../sextiarysector/block/BlockSSCauldron.java | 42 +++ .../container/ContainerMagicFurnace.java | 183 ++++++++++ .../sextiarysector/gui/GuiMagicFurnace.java | 51 +++ .../recipe/RecipeSimpleFuel.java | 76 ++++ .../tileentity/TileEmptyCauldron.java | 46 +++ .../tileentity/TileEntityMagicFurnace.java | 290 ++++++++++++++++ 11 files changed, 1044 insertions(+) create mode 100644 src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockSSCauldron.java create mode 100644 src/main/java/shift/sextiarysector/container/ContainerMagicFurnace.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiMagicFurnace.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipeSimpleFuel.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEmptyCauldron.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityMagicFurnace.java diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index dc5d549..3606cb3 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -15,6 +15,7 @@ import shift.sextiarysector.block.BlockHole; import shift.sextiarysector.block.BlockLargeFurnace; import shift.sextiarysector.block.BlockLargeOre; +import shift.sextiarysector.block.BlockMagicFurnace; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockPowerStone; import shift.sextiarysector.block.BlockSSChest; @@ -43,6 +44,7 @@ import shift.sextiarysector.tileentity.TileEntityGearBox; import shift.sextiarysector.tileentity.TileEntityGearShaft; import shift.sextiarysector.tileentity.TileEntityLargeFurnace; +import shift.sextiarysector.tileentity.TileEntityMagicFurnace; import shift.sextiarysector.tileentity.TileEntityMonitor; import shift.sextiarysector.tileentity.TileEntitySSChest; import shift.sextiarysector.tileentity.TileEntitySSCrop; @@ -58,6 +60,7 @@ public class SSBlocks { public static Block LargeFurnace; public static Block fluidFurnace; + public static Block magicFurnace; public static Block bottle; public static Block fluidCrafter; @@ -133,6 +136,10 @@ public static void initBlicks(){ GameRegistry.registerBlock(fluidFurnace, "FluidFurnace"); GameRegistry.registerTileEntity(TileEntityFluidFurnace.class, "FluidFurnace"); + magicFurnace = new BlockMagicFurnace().setBlockName("ss.magic_furnace").setCreativeTab(SextiarySectorAPI.TabSSMagic); + GameRegistry.registerBlock(magicFurnace, "MagicFurnace"); + GameRegistry.registerTileEntity(TileEntityMagicFurnace.class, "MagicFurnace"); + bottle = new BlockBottle().setBlockName("ss.bottle").setBlockTextureName("glass"); GameRegistry.registerBlock(bottle,ItemBlockBottle.class, "Bottle"); GameRegistry.registerTileEntity(TileEntityBlockBottle.class, "Bottle"); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 0a275f5..f52d38f 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -7,17 +7,20 @@ import shift.sextiarysector.container.ContainerFluidFurnace; import shift.sextiarysector.container.ContainerGFTank; import shift.sextiarysector.container.ContainerLargeFurnace; +import shift.sextiarysector.container.ContainerMagicFurnace; import shift.sextiarysector.container.ContainerSimpleMachine; import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiGFTank; import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; +import shift.sextiarysector.gui.GuiMagicFurnace; import shift.sextiarysector.gui.GuiMillstone; import shift.sextiarysector.gui.GuiSawmill; import shift.sextiarysector.gui.IServerGuiElement; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityLargeFurnace; +import shift.sextiarysector.tileentity.TileEntityMagicFurnace; import shift.sextiarysector.tileentity.TileEntitySimpleMachine; import cpw.mods.fml.common.network.IGuiHandler; @@ -52,6 +55,9 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x case 41: return new ContainerGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z)); + + case 90 : return new ContainerMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); + } /* @@ -101,6 +107,8 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x case 40:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),1); case 41:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),2); + case 90:return new GuiMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); + } /* diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index 1a4ed51..909cda9 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -3,6 +3,7 @@ import net.minecraft.item.crafting.CraftingManager; import shift.sextiarysector.recipe.FurnaceCraftingManager; import shift.sextiarysector.recipe.RecipeSimpleFluid; +import shift.sextiarysector.recipe.RecipeSimpleFuel; import shift.sextiarysector.recipe.RecipeSimpleMachine; import shift.sextiarysector.recipe.RecipesCore; import shift.sextiarysector.recipe.RecipesFluidFurnace; @@ -17,6 +18,9 @@ public class SSRecipes { public static RecipeSimpleFluid fluidFurnace; + public static RecipeSimpleMachine magicFurnace; + + public static RecipeSimpleFuel magicFuel; public static RecipeSimpleMachine millstone; public static RecipeSimpleMachine loom; @@ -25,6 +29,9 @@ public class SSRecipes { public static void initRecipeLists(){ fluidFurnace = new RecipeSimpleFluid(); + magicFurnace = new RecipeSimpleMachine(); + + magicFuel = new RecipeSimpleFuel(); millstone = new RecipeSimpleMachine(); loom = new RecipeSimpleMachine(); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 0d21bcd..5f33635 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -85,6 +85,14 @@ public void preInit(FMLPreInitializationEvent event) m.preInit(event); } + /* + GameRegistry.registerTileEntity(TileEmptyCauldron.class, "SSCauldron"); + Iterable> cc = new ArrayList(); + ((ArrayList) cc).add(ITileEntityProvider.class); + ExtendedClassSupport.loadAndGenerateNewExtendedClass(BlockCauldron.class, Block.class, BlockSSCauldron.class, ITileEntityProvider.class, cc); + */ + + } @Mod.EventHandler diff --git a/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java b/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java new file mode 100644 index 0000000..58c6658 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java @@ -0,0 +1,326 @@ +package shift.sextiarysector.block; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntityDirection; +import shift.sextiarysector.tileentity.TileEntityLargeFurnace; +import shift.sextiarysector.tileentity.TileEntityMagicFurnace; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockMagicFurnace extends BlockContainer{ + + private final Random furnaceRand = new Random(); + + private static boolean keepFurnaceInventory; + + @SideOnly(Side.CLIENT) + private IIcon furnaceIconTop; + @SideOnly(Side.CLIENT) + private IIcon[] furnaceIconFront = new IIcon[2]; + + private int GUIID; + + public BlockMagicFurnace() { + super(Material.rock); + this.setHardness(1.0F); + } + + public int getLightValue(IBlockAccess world, int x, int y, int z) + { + TileEntityMagicFurnace tileentityfurnace = (TileEntityMagicFurnace)world.getTileEntity(x, y, z); + if(tileentityfurnace.isFuel())return 15; + return 0; + } + + @Override + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + { + if (par1World.isRemote) + { + return true; + } + else + { + TileEntityMagicFurnace tileentityfurnace = (TileEntityMagicFurnace)par1World.getTileEntity(par2, par3, par4); + + if (tileentityfurnace != null) + { + par5EntityPlayer.openGui(SextiarySector.instance, 90, par1World, par2, par3, par4); + } + + return true; + } + } + + public static void updateFurnaceBlockState(boolean par0, World par1World, int par2, int par3, int par4) + { + + } + + /** + * Called whenever the block is added into the world. Args: world, x, y, z + */ + @Override + public void onBlockAdded(World par1World, int par2, int par3, int par4) + { + super.onBlockAdded(par1World, par2, par3, par4); + //this.setDefaultDirection(par1World, par2, par3, par4); + } + + /** + * set a blocks direction + */ + private void setDefaultDirection(World par1World, int par2, int par3, int par4) + { + if (!par1World.isRemote) + { + Block block = par1World.getBlock(par2, par3, par4 - 1); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); + + TileEntityDirection tileEntity = (TileEntityDirection)par1World.getTileEntity(par2, par3, par4); + + + byte b0 = 3; + + if (block.func_149730_j() && !block1.func_149730_j()) + { + b0 = 3; + } + + if (block1.func_149730_j() && !block.func_149730_j()) + { + b0 = 2; + } + + if (block2.func_149730_j() && !block3.func_149730_j()) + { + b0 = 5; + } + + if (block3.func_149730_j() && !block2.func_149730_j()) + { + b0 = 4; + } + + par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); + tileEntity.direction = ForgeDirection.getOrientation(b0); + } + } + + @Override + @SideOnly(Side.CLIENT) + + /** + * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata + */ + public IIcon getIcon(int par1, int par2) + { + + return par1 == 1 ? this.furnaceIconTop : (par1 == 0 ? this.furnaceIconTop : (par1 != 3 ? this.blockIcon : this.furnaceIconFront[1])); + + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) + { + //System.out.println("Icon"); + TileEntityLargeFurnace tileEntity = (TileEntityLargeFurnace)p_149673_1_.getTileEntity(x, y, z); + + int meta = p_149673_1_.getBlockMetadata(x, y, z); + + return side == 1 ? this.furnaceIconTop : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isBurning() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); + + + } + + @Override + @SideOnly(Side.CLIENT) + + /** + * When this method is called, your block should register all the icons it needs with the given IconRegister. This + * is the only chance you get to register icons. + */ + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon("furnace_side"); + this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); + this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); + this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:furnace_top"); + } + + + /** + * Returns a new instance of a block's tile entity class. Called on placing the block. + */ + @Override + public TileEntity createNewTileEntity(World par1World, int p_149915_2_) + { + return new TileEntityMagicFurnace(); + } + + /** + * Called when the block is placed in the world. + */ + @Override + public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) + { + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + TileEntityDirection tileEntity = (TileEntityDirection)par1World.getTileEntity(par2, par3, par4); + + if (l == 0) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[2]; + } + + if (l == 1) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[5]; + } + + if (l == 2) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[3]; + } + + if (l == 3) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[4]; + } + + } + + @Override + public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) + { + if (!keepFurnaceInventory) + { + TileEntityMagicFurnace tileentityfurnace = (TileEntityMagicFurnace)par1World.getTileEntity(par2, par3, par4); + + if (tileentityfurnace != null) + { + for (int j1 = 0; j1 < tileentityfurnace.getSizeInventory(); ++j1) + { + ItemStack itemstack = tileentityfurnace.getStackInSlot(j1); + + this.dropItem(itemstack, par1World, par2, par3, par4); + + } + + par1World.func_147453_f(par2, par3, par4, par5); + } + } + + super.breakBlock(par1World, par2, par3, par4, par5, par6); + } + + private void dropItem(ItemStack itemstack ,World par1World,int par2, int par3, int par4){ + + if (itemstack != null) + { + float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + + while (itemstack.stackSize > 0) + { + int k1 = this.furnaceRand.nextInt(21) + 10; + + if (k1 > itemstack.stackSize) + { + k1 = itemstack.stackSize; + } + + itemstack.stackSize -= k1; + EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float)this.furnaceRand.nextGaussian() * f3; + entityitem.motionY = (float)this.furnaceRand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.furnaceRand.nextGaussian() * f3; + par1World.spawnEntityInWorld(entityitem); + } + } + + } + + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) + { + TileEntityMagicFurnace tileentityfurnace = (TileEntityMagicFurnace)p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); + + + if (tileentityfurnace.isFuel()) + { + int l = p_149734_1_.getBlockMetadata(p_149734_2_, p_149734_3_, p_149734_4_); + float f = (float)p_149734_2_ + 0.5F; + float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; + float f2 = (float)p_149734_4_ + 0.5F; + float f3 = 0.52F; + float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; + + if (l == 4) + { + p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + } + else if (l == 5) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + } + else if (l == 2) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + } + else if (l == 3) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + } + } + } + + @Override + public boolean hasComparatorInputOverride() + { + return true; + } + + @Override + public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) + { + return Container.calcRedstoneFromInventory((IInventory)par1World.getTileEntity(par2, par3, par4)); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockSSCauldron.java b/src/main/java/shift/sextiarysector/block/BlockSSCauldron.java new file mode 100644 index 0000000..b0c4c46 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockSSCauldron.java @@ -0,0 +1,42 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.tileentity.TileEmptyCauldron; + +public class BlockSSCauldron extends Block implements ITileEntityProvider +{ + + protected BlockSSCauldron(Material p_i45386_1_) + { + super(p_i45386_1_); + this.isBlockContainer = true; + } + + public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) + { + super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_); + } + + public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) + { + super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); + p_149749_1_.removeTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); + } + + public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_) + { + super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_); + TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_); + return tileentity != null ? tileentity.receiveClientEvent(p_149696_5_, p_149696_6_) : false; + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEmptyCauldron(); + } + +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerMagicFurnace.java b/src/main/java/shift/sextiarysector/container/ContainerMagicFurnace.java new file mode 100644 index 0000000..2ce6e18 --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerMagicFurnace.java @@ -0,0 +1,183 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.inventory.SlotFurnace; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.tileentity.TileEntityMagicFurnace; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ContainerMagicFurnace extends Container +{ + private TileEntityMagicFurnace tileFurnace; + private int lastCookTime; + private int lastBurnTime; + private int lastItemBurnTime; + private static final String __OBFID = "CL_00001748"; + + public ContainerMagicFurnace(InventoryPlayer p_i1812_1_, TileEntityMagicFurnace p_i1812_2_) + { + this.tileFurnace = p_i1812_2_; + this.addSlotToContainer(new Slot(p_i1812_2_, 0, 56, 17)); + this.addSlotToContainer(new Slot(p_i1812_2_, 1, 56, 53)); + this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 2, 116, 35)); + int i; + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(p_i1812_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(p_i1812_1_, i, 8 + i * 18, 142)); + } + } + + public void addCraftingToCrafters(ICrafting p_75132_1_) + { + super.addCraftingToCrafters(p_75132_1_); + p_75132_1_.sendProgressBarUpdate(this, 0, this.tileFurnace.machineWorkProgressTime); + p_75132_1_.sendProgressBarUpdate(this, 1, this.tileFurnace.fuel); + p_75132_1_.sendProgressBarUpdate(this, 2, this.tileFurnace.fuelMax); + } + + /** + * Looks for changes made in the container, sends them to every listener. + */ + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + + for (int i = 0; i < this.crafters.size(); ++i) + { + ICrafting icrafting = (ICrafting)this.crafters.get(i); + + if (this.lastCookTime != this.tileFurnace.machineWorkProgressTime) + { + icrafting.sendProgressBarUpdate(this, 0, this.tileFurnace.machineWorkProgressTime); + } + + if (this.lastBurnTime != this.tileFurnace.fuel) + { + icrafting.sendProgressBarUpdate(this, 1, this.tileFurnace.fuel); + } + + if (this.lastItemBurnTime != this.tileFurnace.fuelMax) + { + icrafting.sendProgressBarUpdate(this, 2, this.tileFurnace.fuelMax); + } + } + + this.lastCookTime = this.tileFurnace.machineWorkProgressTime; + this.lastBurnTime = this.tileFurnace.fuel; + this.lastItemBurnTime = this.tileFurnace.fuelMax; + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int p_75137_1_, int p_75137_2_) + { + if (p_75137_1_ == 0) + { + this.tileFurnace.machineWorkProgressTime = p_75137_2_; + } + + if (p_75137_1_ == 1) + { + this.tileFurnace.fuel = p_75137_2_; + } + + if (p_75137_1_ == 2) + { + this.tileFurnace.fuelMax = p_75137_2_; + } + } + + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return this.tileFurnace.isUseableByPlayer(p_75145_1_); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot)this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ == 2) + { + if (!this.mergeItemStack(itemstack1, 3, 39, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (p_82846_2_ != 1 && p_82846_2_ != 0) + { + if (SSRecipes.magicFurnace.getResult(itemstack1) != null) + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return null; + } + } + else if (TileEntityMagicFurnace.isItemFuel(itemstack1)) + { + if (!this.mergeItemStack(itemstack1, 1, 2, false)) + { + return null; + } + } + else if (p_82846_2_ >= 3 && p_82846_2_ < 30) + { + if (!this.mergeItemStack(itemstack1, 30, 39, false)) + { + return null; + } + } + else if (p_82846_2_ >= 30 && p_82846_2_ < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 3, 39, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack)null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/shift/sextiarysector/gui/GuiMagicFurnace.java b/src/main/java/shift/sextiarysector/gui/GuiMagicFurnace.java new file mode 100644 index 0000000..107e3f0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiMagicFurnace.java @@ -0,0 +1,51 @@ +package shift.sextiarysector.gui; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.container.ContainerMagicFurnace; +import shift.sextiarysector.tileentity.TileEntityMagicFurnace; + +public class GuiMagicFurnace extends GuiContainer +{ + private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("sextiarysector:textures/guis/magic_furnace.png"); + private TileEntityMagicFurnace tileFurnace; + private static final String __OBFID = "CL_00000758"; + + public GuiMagicFurnace(InventoryPlayer p_i1091_1_, TileEntityMagicFurnace p_i1091_2_) + { + super(new ContainerMagicFurnace(p_i1091_1_, p_i1091_2_)); + this.tileFurnace = p_i1091_2_; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + String s = this.tileFurnace.hasCustomInventoryName() ? this.tileFurnace.getInventoryName() : I18n.format(this.tileFurnace.getInventoryName(), new Object[0]); + this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(furnaceGuiTextures); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + + if (this.tileFurnace.isFuel()) + { + int i1 = this.tileFurnace.getEnergyProgressScaled(13); + this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1); + i1 = this.tileFurnace.getWorkProgressScaled(24); + this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); + } + } +} \ No newline at end of file diff --git a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFuel.java b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFuel.java new file mode 100644 index 0000000..496b426 --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFuel.java @@ -0,0 +1,76 @@ +package shift.sextiarysector.recipe; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class RecipeSimpleFuel { + + protected final HashMap metaSimpleFuelList = new HashMap(); + protected final HashMap oreSimpleFuelList = new HashMap(); + + public void add(ItemStack par1ItemStack, int par2ItemStack) + { + metaSimpleFuelList.put(par1ItemStack, par2ItemStack); + } + + public void add(String par1String, int par2ItemStack) + { + oreSimpleFuelList.put(par1String, par2ItemStack); + } + + public int getResult(ItemStack item) + { + if (item == null) + { + return 0; + } + for (String key : oreSimpleFuelList.keySet()) { + ArrayList items = OreDictionary.getOres(key); + for(int i = 0; i< items.size() ; i++){ + if(checkItem(item,items.get(i))){ + return oreSimpleFuelList.get(key); + } + } + } + + Iterator iterator = this.metaSimpleFuelList.entrySet().iterator(); + Entry entry; + + do + { + if (!iterator.hasNext()) + { + return 0; + } + + entry = (Entry)iterator.next(); + } + while (!this.checkItem(item, (ItemStack)entry.getKey())); + + return (Integer) entry.getValue(); + + //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); + } + + private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } + + public Map getMetaList() + { + return metaSimpleFuelList; + } + + public Map getOreList() + { + return oreSimpleFuelList; + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEmptyCauldron.java b/src/main/java/shift/sextiarysector/tileentity/TileEmptyCauldron.java new file mode 100644 index 0000000..fbdfd54 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEmptyCauldron.java @@ -0,0 +1,46 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + +public class TileEmptyCauldron extends TileEntity implements IFluidHandler{ + + private FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 1); + + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { + return tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource,boolean doDrain) { + return tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { + return tank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) { + return new FluidTankInfo[]{tank.getInfo()}; + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityMagicFurnace.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityMagicFurnace.java new file mode 100644 index 0000000..385be18 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityMagicFurnace.java @@ -0,0 +1,290 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.container.ItemBox; + +public class TileEntityMagicFurnace extends TileEntityDirection implements ISidedInventory{ + + protected static final int[] slots_top = new int[] { 0 }; + protected static final int[] slots_bottom = new int[] { 2, 1 }; + protected static final int[] slots_sides = new int[] { 1 }; + + //0 素材 ,1 燃料 ,2 完成品 + protected ItemBox items = new ItemBox("Base", 3); + + //作業の進捗 + public int machineWorkProgressTime; + + //作業の進捗の最大値 この数字になると完了する + public int machineMaxProgressTime = 200; + + //燃料と投入されている燃料のマックス状態の量 + public int fuel; + public int fuelMax; + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + } + + public void updateServerEntity() + { + if(fuel>0){ + fuel--; + if(fuel==0){ + this.fuelMax=0; + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + }else{ + if(this.canWork()){ + this.chargeFuel(); + } + + } + + if(this.isFuel() && this.canWork()){ + + machineWorkProgressTime++; + + if(machineWorkProgressTime>=machineMaxProgressTime){ + this.workItem(); + machineWorkProgressTime=0; + } + + } + + } + + + private void chargeFuel(){ + + if(this.isItemFuel(this.items.getStackInSlot(1))){ + this.fuel = this.fuelMax = this.getItemMagicTime(this.items.getStackInSlot(1)); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + public boolean isFuel() + { + return this.fuel > 0; + } + + public boolean canWork() + { + if (this.items.getStackInSlot(0) == null) + { + return false; + } + else + { + ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); + if (itemstack == null) return false; + return this.checkItem(itemstack) ; + } + } + + private boolean checkItem(ItemStack itemstack){ + + if (this.items.getStackInSlot(2) == null || itemstack == null) return true; + if (!this.items.getStackInSlot(2).isItemEqual(itemstack)) return false; + int result = this.items.getStackInSlot(2).stackSize + itemstack.stackSize; + return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); + } + + public void workItem() + { + if (this.canWork()) + { + ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); + + //item + if (this.items.getStackInSlot(2) == null) + { + this.setInventorySlotContents(2, itemstack.copy()); + } + else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) + { + this.items.getStackInSlot(2).stackSize += itemstack.stackSize; + } + + this.items.reduceStackSize(0, 1); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + } + + + private ItemStack getResult(ItemStack stackInSlot) { + return SSRecipes.magicFurnace.getResult(stackInSlot); + } + + public static int getItemMagicTime(ItemStack p_145952_0_) + { + if (p_145952_0_ == null) + { + return 0; + } + else + { + return SSRecipes.magicFuel.getResult(p_145952_0_); + } + } + + public static boolean isItemFuel(ItemStack p_145954_0_) + { + return getItemMagicTime(p_145954_0_) > 0; + } + + //GUI + public int getWorkProgressScaled(int par1) + { + return this.machineWorkProgressTime / (machineMaxProgressTime / par1); + } + + public int getEnergyProgressScaled(int par1) + { + return (int) (this.fuel / (this.fuelMax / par1)); + } + + + //IInventory関係 + @Override + public int getSizeInventory() { + return items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return items.getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return items.decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return items.getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + items.setInventorySlotContents(i, itemstack); + } + + @Override + public String getInventoryName() { + return "gui.ss.magic_furnace";//+SimpleMachine.values()[this.worldObj.getBlockMetadata(xCoord, yCoord, zCoord)].icon+".name"; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return items.getInventoryStackLimit(); + } + + @Override + public void markDirty(){ + super.markDirty(); + items.onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer + .getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + if (i == 1) { + return GearForceItem.manager.isGearForceItem(itemstack); + } + + return i != 2; + } + + //ISidedInventory関係 + @Override + public int[] getAccessibleSlotsFromSide(int var1) { + return var1 == 0 ? slots_bottom : (var1 == 1 ? slots_top : slots_sides); + } + + @Override + public boolean canInsertItem(int i, ItemStack itemstack, int j) { + return this.isItemValidForSlot(i, itemstack); + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) + { + return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket; + } + + //NBT関係 + @Override + public void readFromNBT(NBTTagCompound nbt) { + + super.readFromNBT(nbt); + items.readFromNBT(nbt); + this.machineWorkProgressTime = nbt.getShort("WorkTime"); + this.fuel = nbt.getInteger("fuel"); + this.fuelMax = nbt.getInteger("fuelMax"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + + super.writeToNBT(nbt); + items.writeToNBT(nbt); + nbt.setShort("WorkTime", (short)this.machineWorkProgressTime); + nbt.setInteger("fuel", this.fuel); + nbt.setInteger("fuelMax", this.fuelMax); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ + this.readFromNBT(pkt.func_148857_g()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + +} From 385a3745d43119d938c4cfdafe7f17c6b9891c07 Mon Sep 17 00:00:00 2001 From: shift02 Date: Fri, 14 Nov 2014 23:21:31 +0900 Subject: [PATCH 26/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E9=AD=94?= =?UTF-8?q?=E6=B3=95=E3=81=AE=E3=82=AB=E3=83=9E=E3=83=89=E3=81=AE=E3=83=AC?= =?UTF-8?q?=E3=82=B7=E3=83=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・魔法のカマドに仮のレシピを追加 ・魔法のカマドの画像を追加 --- src/main/java/shift/sextiarysector/SSItems.java | 4 ++++ .../java/shift/sextiarysector/SSRecipes.java | 5 +++++ .../sextiarysector/block/BlockMagicFurnace.java | 13 ++++++------- .../sextiarysector/recipe/RecipesMagicFuel.java | 13 +++++++++++++ .../recipe/RecipesMagicFurnace.java | 14 ++++++++++++++ .../assets/sextiarysector/lang/en_US.lang | 4 ++++ .../textures/blocks/magic/furnace_front_off.png | Bin 0 -> 829 bytes .../textures/blocks/magic/furnace_front_on.png | Bin 0 -> 877 bytes .../textures/blocks/magic/furnace_side.png | Bin 0 -> 787 bytes .../textures/blocks/magic/furnace_top.png | Bin 0 -> 824 bytes .../textures/guis/magic_furnace.png | Bin 0 -> 1539 bytes 11 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/magic/furnace_front_off.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/magic/furnace_front_on.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/magic/furnace_side.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/magic/furnace_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/magic_furnace.png diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 4e2f54b..309291a 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -45,6 +45,7 @@ public class SSItems { public static Item ironDust; public static Item goldDust; + public static Item mithrilIngot; public static Item orichalcumGem; public static Item blueStoneSlimeBall; @@ -145,6 +146,9 @@ public static void initItems(){ goldDust = new Item().setUnlocalizedName("ss.gold_dust").setTextureName("sextiarysector:dust/gold_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(goldDust, "GoldDust"); + mithrilIngot = new Item().setUnlocalizedName("ss.mithril_ingot").setTextureName("sextiarysector:ingot/mithril_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(mithrilIngot, "MithrilIngot"); + orichalcumGem = new Item().setUnlocalizedName("ss.orichalcum_gem").setTextureName("sextiarysector:gem/orichalcum_gem").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(orichalcumGem, "OrichalcumGem"); diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index 909cda9..22ebf92 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -10,6 +10,8 @@ import shift.sextiarysector.recipe.RecipesFurnaceCraft; import shift.sextiarysector.recipe.RecipesLoom; import shift.sextiarysector.recipe.RecipesMachine; +import shift.sextiarysector.recipe.RecipesMagicFuel; +import shift.sextiarysector.recipe.RecipesMagicFurnace; import shift.sextiarysector.recipe.RecipesMillstone; import shift.sextiarysector.recipe.RecipesNormalBlock; import shift.sextiarysector.recipe.RecipesSawmill; @@ -55,6 +57,9 @@ public static void initRecipes(){ RecipesFluidFurnace.addRecipes(fluidFurnace); + RecipesMagicFurnace.addRecipes(magicFurnace); + RecipesMagicFuel.addRecipes(magicFuel); + //GF RecipesMillstone.addRecipes(millstone); diff --git a/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java b/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java index 58c6658..3b121a1 100644 --- a/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java +++ b/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java @@ -21,7 +21,6 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.tileentity.TileEntityDirection; -import shift.sextiarysector.tileentity.TileEntityLargeFurnace; import shift.sextiarysector.tileentity.TileEntityMagicFurnace; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -145,11 +144,11 @@ public IIcon getIcon(int par1, int par2) public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) { //System.out.println("Icon"); - TileEntityLargeFurnace tileEntity = (TileEntityLargeFurnace)p_149673_1_.getTileEntity(x, y, z); + TileEntityMagicFurnace tileEntity = (TileEntityMagicFurnace)p_149673_1_.getTileEntity(x, y, z); int meta = p_149673_1_.getBlockMetadata(x, y, z); - return side == 1 ? this.furnaceIconTop : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isBurning() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); + return side == 1 ? this.furnaceIconTop : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isFuel() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); } @@ -163,10 +162,10 @@ public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) */ public void registerBlockIcons(IIconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("furnace_side"); - this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); - this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); - this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:furnace_top"); + this.blockIcon = par1IconRegister.registerIcon("sextiarysector:magic/furnace_side"); + this.furnaceIconFront[0] = par1IconRegister.registerIcon("sextiarysector:magic/furnace_front_on"); + this.furnaceIconFront[1] = par1IconRegister.registerIcon("sextiarysector:magic/furnace_front_off"); + this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:magic/furnace_top"); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java new file mode 100644 index 0000000..ad3e33e --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java @@ -0,0 +1,13 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +public class RecipesMagicFuel { + + public static void addRecipes(RecipeSimpleFuel recipe) + { + recipe.add(new ItemStack(Items.ender_pearl,1), 1000); + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java new file mode 100644 index 0000000..814cbd2 --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java @@ -0,0 +1,14 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.SSItems; + +public class RecipesMagicFurnace { + + public static void addRecipes(RecipeSimpleMachine recipe) + { + recipe.add(new ItemStack(SSBlocks.mithrilOre,1),new ItemStack(SSItems.mithrilIngot, 1)); + } + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 06f7903..f933a53 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -4,6 +4,8 @@ tile.ss.large_furnace.name=Large Furnace tile.ss.fluid_furnace.name=Fluid Furnace +tile.ss.magic_furnace.name=Magic Furnace + tile.ss.wood_grate.name=Wood Grate tile.ss.wood_plate.name=Wood Plate @@ -77,6 +79,7 @@ item.ss.coal_dust.name=Coal Dust item.ss.iron_dust.name=Iron Dust item.ss.gold_dust.name=Gold Dust +item.ss.mithril_ingot.name=Mithril Ingot item.ss.orichalcum_gem.name=Orichalcum item.ss.blue_stone_slime_ball.name=Blue Stone Slime Ball @@ -148,6 +151,7 @@ container.large_furnace=Large Furnace container.sub.inventory=Buffer gui.ss.fluid_furnace=Fluid Furnace +gui.ss.magic_furnace=Magic Furnace gui.ss.millstone=Millstone gui.ss.loom=Loom diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/magic/furnace_front_off.png b/src/main/resources/assets/sextiarysector/textures/blocks/magic/furnace_front_off.png new file mode 100644 index 0000000000000000000000000000000000000000..18ce7f3f890b57376fc266ff2b923e78da5d945a GIT binary patch literal 829 zcmV-D1H$}?P)Ivp*g1VAZ;loG8q zN+|%+G$jZEq?AZ0$+C>;bV{{ar6>w4fOfl${6$l;N<58zX4wm<-0}fU*gN?FBZ?x%KgCpA75<)_b7ScS?|%9=jYflog$3$w)cGqt=1Oyk z@&_e++vmO8w@77*QVPqmETopij}yx8_!K&4dwZKorGnO)D2i|#hu&9R)~?>!9M zmsW_@A|?+fSibKQw65Sd4$p?qc^*IG=;(;oX?b~>$>>1j}T(sSgBMn36Opd;XN!VB@;Oz`#wWT$=22uo12@&ag5d)Ap}KHptWXqcNfDj`0ddPk|H4p z0z|9T($^NR(Y)Qn_kB(VXPjgwXsxNaHKdm0YDy+2kpzzt zosZkBudj1@dW!G+gki|}#rbT3<2Ynl#=*e>gWiCtn$qw0|C2yU!h`z{=xlUoHk(K( zF$`n20O0WOkbbw%PH*S65nk3kN^ERw;CUW-o?|H#X__+nZp2P+hgz+M>$>wnAp}Y( z48tJHGQRD7!xvwE&Uie=wrwoiu<$$&fLg6a5CoTu&p-51)oK+X1h#FnxVShY@i;#w z-b;x7iKy4>2q7>{6Rq`}1Emx~2!s#>LBQGB8S!3%ZQJ|{)<{iLHo-zF00000NkvXX Hu0mjf1de(l literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/magic/furnace_front_on.png b/src/main/resources/assets/sextiarysector/textures/blocks/magic/furnace_front_on.png new file mode 100644 index 0000000000000000000000000000000000000000..0dbe80b59567c10a6f76ce9cd360594f084acf6d GIT binary patch literal 877 zcmV-z1CsoSP)=3>7I7Q-9w?r{s&&` zQIJYNSfsaj^Hk_zv9>f6WFsqLv>3A6rR$`2CzCXpWWMwDP&Oz1TwZv1-skc@ud=YP zAcYVB_`Z)20x2cF?*lL#4#{S-2q6$cFdB^*kH;hu2|Uk32dGpkO#V;^>k*E7Ei&OO ziBbfBr$0X@AH9knouCc^I1`)Gi|1s*Gc?bRP;J}h<(U*F1cN~) zlL@NhIP`yYF${wzFPa=39r1rO8V!~{|B$EcXB-|L0-y(jK_Yq#MNy_k(=<_46;0Fd zeIHHJP*oMnvd}b*;w6sLO-$zP`q9}Nthm?|o zg9B7m<*!H2xbQB>X0vFyTwa%eJ(+#(?P%S+FMjVsZgm@NT<_q2V$`p@pv2nAq1MH(d+eCSy=&~+wIb5G%!@- zvPhO?VHgIAqL54`>G%8GUS0)Y#04QD)V9ANl}d4Pa)P2LSeC`PbAA~xH#bK#8b#N2 zRzF>3?2q~Smvy?%Ez;&LUFQ~`-Ms_A!|xuVX&R+ciJhGt*xcNddwYAb-EPa9i#O#i zr*fB5`OkyubUrq>r}{^WAIomHE9>>TESJkt2gv91+`o69ubOKVAKadvGi~k?ukBL= zs9$PdHt$ZKED#8wtE!5sssI#Mw}{vFrvXKvw^k)y+ox39r?*xGKq||G!{N&&4u?Zr z*To*#bn5H$)~YIX_1zWf_blVf@A;y3i)7Lx+Fqc!xj>)- zHa9mpV?`B7`84D>Ne)#|wEe zd5R2zfE!D9$yVPoIvlb%Uc|jwkfsI6lOd5@!T%~}qrQf@C7$Q8{H5eh>uapFNMj6znb12JQl*LA0dbJSzOp RQtAKz002ovPDHLkV1gZVX{7)F literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/magic/furnace_top.png b/src/main/resources/assets/sextiarysector/textures/blocks/magic/furnace_top.png new file mode 100644 index 0000000000000000000000000000000000000000..89ae0d3489e74714d3cf72c43edccfd3878c15cf GIT binary patch literal 824 zcmV-81IPS{P)w#0 zK~y-)rPIxC+hhR8@vj{xj~mBz(?oOD3^jv6x{Z~If>wdn1FDdQxFGm9*-jiLO%c)# zND)Pv+Kf&W3Zu%3TX~s3HLhioB-NGHxG^O2cQ;JJSKOp`&#+=XREKgVD zaye8nW;7aMnkHIn;zY52SirVzdc7W#$pqWBiGI*LJ9!3xDTKhuIv9olKp2LMnq%yi zL-E56dZ&FBiv^`p38fT52*f8A56cInX^N$_Mruje3|O}|sO(nAR5L6ZE7B7aH+AX% z+96I9<&R6)w$1tX7cBJ>-}f;AUdAoFs>jB`I==5SYK=$=3EN-X!2LXr|EZ6=Q$W2) z=|3MZP<^g{RKYL|%qWVea)a{wWrPr%ot-i5Oz|GLbdEZhrioID!e#+Cb*Y$J9DZ|1 zr`ct>T>it@>-FgO`zWOdwFE$H3%cDdQ52z+q7$D3F#c}(hS9uYEEbCZNGZu0SuQUx z34#D21OTJvnDyKS;xp^7pC1s%G1e91@^r<&C)#Vsn*p=tf~8up^QcZ3h75;8*o8); z0f2SInAA13S`8^BLI`G0mkf^j_?s2(9PTh24w=nn2qBPC^00isX^uS?y3WDdpH2R4B408FG{qMN5dJQkIf274vFSGA*K|LgQn7 zl&E~Je9S~+RH~i6SQ_kznJq&aCPQZS9sksB=j?xb@44r>&+mEe?{}W(-h1BD!&L`I z!~p^{WH|LGsvE5RkRk%^uLaq0%JPiZgYw3^u)@W?W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B3=E3=83=88=E3=83=AA=E3=82=92=E6=8B=A1=E5=BC=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・プレイヤーインベントリの装備欄をふやした --- .../java/shift/sextiarysector/Config.java | 11 +- .../shift/sextiarysector/SSGuiHandler.java | 6 + .../java/shift/sextiarysector/SSShops.java | 2 + .../java/shift/sextiarysector/SSWorld.java | 22 ++ .../shift/sextiarysector/SextiarySector.java | 2 + .../block/BlockMagicFurnace.java | 2 +- .../container/ContainerPlayerNext.java | 174 ++++++++++++ .../container/InventoryPlayerNext.java | 91 +++++++ .../event/WorldEventHandler.java | 17 ++ .../sextiarysector/gui/GuiInventoryNext.java | 143 ++++++++++ .../nei/AbstractFuelRecipeHandler.java | 129 +++++++++ .../nei/AbstractSimpleRecipeHandler.java | 249 ++++++++++++++++++ .../nei/MagicFuelRecipeHandler.java | 50 ++++ .../nei/MagicFurnaceRecipeHandler.java | 51 ++++ .../nei/NEISextiarySectorConfig.java | 7 + .../player/CustomPlayerData.java | 13 +- .../player/EntityPlayerManager.java | 4 + .../sextiarysector/player/EquipmentStats.java | 43 +++ .../recipe/RecipesFurnaceCraft.java | 7 + .../world/biome/BiomeGenMagicDesert.java | 33 +++ .../assets/sextiarysector/lang/en_US.lang | 3 + .../textures/guis/inventory_next.png | Bin 0 -> 10671 bytes 22 files changed, 1055 insertions(+), 4 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/SSWorld.java create mode 100644 src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java create mode 100644 src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java create mode 100644 src/main/java/shift/sextiarysector/nei/AbstractFuelRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/AbstractSimpleRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/MagicFuelRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/MagicFurnaceRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/player/EquipmentStats.java create mode 100644 src/main/java/shift/sextiarysector/world/biome/BiomeGenMagicDesert.java create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/inventory_next.png diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index c1f9269..9fd31e1 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -5,6 +5,8 @@ public class Config { + //Biome + public static int magicDesert; //Mod public static boolean modDCsAppleMilk; @@ -18,8 +20,9 @@ public static void ConfigRead(FMLPreInitializationEvent event) { try { cfg.load(); + configForBiome(cfg); - ConfigForMCEconomy(cfg); + configForPlugin(cfg); } catch (Exception e) { //FMLLog.log(Level.SEVERE, "", e.getMessage()); @@ -29,7 +32,11 @@ public static void ConfigRead(FMLPreInitializationEvent event) { } - public static void ConfigForMCEconomy(Configuration cfg) { + public static void configForBiome(Configuration cfg) { + magicDesert = cfg.getInt("MagicDesertID", "biome", 120, 0, 255, ""); + } + + public static void configForPlugin(Configuration cfg) { modDCsAppleMilk = cfg.getBoolean("AppleMilk", "general", true, ""); modComputerCraft = cfg.getBoolean("ComputerCraft", "general", true, ""); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index f52d38f..77b323d 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -8,9 +8,11 @@ import shift.sextiarysector.container.ContainerGFTank; import shift.sextiarysector.container.ContainerLargeFurnace; import shift.sextiarysector.container.ContainerMagicFurnace; +import shift.sextiarysector.container.ContainerPlayerNext; import shift.sextiarysector.container.ContainerSimpleMachine; import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiGFTank; +import shift.sextiarysector.gui.GuiInventoryNext; import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMagicFurnace; @@ -58,6 +60,8 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x case 90 : return new ContainerMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); + case 200 : return new ContainerPlayerNext(player.inventory, player); + } /* @@ -109,6 +113,8 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x case 90:return new GuiMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); + case 200:return new GuiInventoryNext(player); + } /* diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index f32dc63..3c64942 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -37,6 +37,8 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.onion,1),200)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.tomato,1),200)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.corn,1),800)); + + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.magicDust,4),500)); } if(i==2){ diff --git a/src/main/java/shift/sextiarysector/SSWorld.java b/src/main/java/shift/sextiarysector/SSWorld.java new file mode 100644 index 0000000..47d1aed --- /dev/null +++ b/src/main/java/shift/sextiarysector/SSWorld.java @@ -0,0 +1,22 @@ +package shift.sextiarysector; + +import static net.minecraftforge.common.BiomeDictionary.Type.*; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.common.BiomeDictionary; +import shift.sextiarysector.world.biome.BiomeGenMagicDesert; +import cpw.mods.fml.common.event.FMLInitializationEvent; + +public class SSWorld { + + public static BiomeGenBase magicDesert; + + public static void init(FMLInitializationEvent event) { + + magicDesert = (new BiomeGenMagicDesert(Config.magicDesert)).setColor(0xff0000).setBiomeName("MagicDesert"); + + + BiomeDictionary.registerBiomeType(magicDesert, HOT, DRY, SANDY ,MAGICAL ); + + } + +} diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 5f33635..b389272 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -99,6 +99,7 @@ public void preInit(FMLPreInitializationEvent event) public void init(FMLInitializationEvent event) { + SSWorld.init(event); if(event.getSide().isClient()){ HUDMP.left_height += 10; @@ -113,6 +114,7 @@ public void init(FMLInitializationEvent event) SSVillages.initVillages(); + SSPlugins.initModHelper(); SSPlugins.initPlugins(event); diff --git a/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java b/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java index 3b121a1..f1f96b5 100644 --- a/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java +++ b/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java @@ -63,7 +63,7 @@ public boolean onBlockActivated(World par1World, int par2, int par3, int par4, E if (tileentityfurnace != null) { - par5EntityPlayer.openGui(SextiarySector.instance, 90, par1World, par2, par3, par4); + par5EntityPlayer.openGui(SextiarySector.instance, 200, par1World, par2, par3, par4); } return true; diff --git a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java new file mode 100644 index 0000000..65ae605 --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java @@ -0,0 +1,174 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import shift.sextiarysector.player.EntityPlayerManager; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + + +public class ContainerPlayerNext extends Container { + + public InventoryPlayerNext equipment; + private EntityPlayer player; + + public ContainerPlayerNext(InventoryPlayer par1InventoryPlayer,EntityPlayer p_i1819_3_) + { + //this.equipment = par2TileEntityFurnace; + this.player = p_i1819_3_; + this.equipment = EntityPlayerManager.getEquipmentStats(p_i1819_3_).inventory; + + int c = 0 ; + for(int i = 0;i<5;i++){ + + for(int j =0;j<4;j++){ + this.addSlotToContainer(new Slot(this.equipment,c, 80 + i * 18, 8 + j * 36)); + c++; + } + + } + + + //バニラ + int i; + + for (i = 0; i < 4; ++i) + { + final int k = i; + this.addSlotToContainer(new Slot(par1InventoryPlayer, par1InventoryPlayer.getSizeInventory() - 1 - i, 8, 8 + i * 18) + { + private static final String __OBFID = "CL_00001755"; + /** + * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 + * in the case of armor slots) + */ + public int getSlotStackLimit() + { + return 1; + } + /** + * Check if the stack is a valid item for this slot. Always true beside for the armor slots. + */ + public boolean isItemValid(ItemStack p_75214_1_) + { + if (p_75214_1_ == null) return false; + return p_75214_1_.getItem().isValidArmor(p_75214_1_, k, player); + } + /** + * Returns the icon index on items.png that is used as background image of the slot. + */ + @SideOnly(Side.CLIENT) + public IIcon getBackgroundIconIndex() + { + return ItemArmor.func_94602_b(k); + } + }); + } + + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142)); + } + } + + @Override + public boolean canInteractWith(EntityPlayer p_75145_1_) { + return true; + } + + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot)this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ == 0) + { + if (!this.mergeItemStack(itemstack1, 9, 45, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (p_82846_2_ >= 1 && p_82846_2_ < 5) + { + if (!this.mergeItemStack(itemstack1, 9, 45, false)) + { + return null; + } + } + else if (p_82846_2_ >= 5 && p_82846_2_ < 9) + { + if (!this.mergeItemStack(itemstack1, 9, 45, false)) + { + return null; + } + } + else if (itemstack.getItem() instanceof ItemArmor && !((Slot)this.inventorySlots.get(5 + ((ItemArmor)itemstack.getItem()).armorType)).getHasStack()) + { + int j = 5 + ((ItemArmor)itemstack.getItem()).armorType; + + if (!this.mergeItemStack(itemstack1, j, j + 1, false)) + { + return null; + } + } + else if (p_82846_2_ >= 9 && p_82846_2_ < 36) + { + if (!this.mergeItemStack(itemstack1, 36, 45, false)) + { + return null; + } + } + else if (p_82846_2_ >= 36 && p_82846_2_ < 45) + { + if (!this.mergeItemStack(itemstack1, 9, 36, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 9, 45, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack)null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } + +} diff --git a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java new file mode 100644 index 0000000..3762658 --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java @@ -0,0 +1,91 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + + +public class InventoryPlayerNext implements IInventory{ + + ItemBox items = new ItemBox("Base", 10); + + @Override + public int getSizeInventory() { + return items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return items.getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return items.decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return items.getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + items.setInventorySlotContents(i, itemstack); + } + + @Override + public String getInventoryName() { + return "gui"; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return items.getInventoryStackLimit(); + } + + @Override + public void markDirty(){ + items.onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return true; + } + + @Override + public void openInventory() { + this.markDirty(); + } + + @Override + public void closeInventory() { + this.markDirty(); + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + return true; + } + + //NBT + public NBTTagCompound writeToNBT(NBTTagCompound nbt) + { + this.items.writeToNBT(nbt);; + return nbt; + } + + public void readFromNBT(NBTTagCompound nbt) + { + this.items.readFromNBT(nbt); + } + +} diff --git a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java index 9940831..61143b0 100644 --- a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java @@ -1,10 +1,14 @@ package shift.sextiarysector.event; +import static net.minecraftforge.common.BiomeDictionary.Type.*; + import java.util.Random; import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenerator; +import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.event.terraingen.OreGenEvent; import shift.sextiarysector.SSBlocks; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -14,6 +18,9 @@ public class WorldEventHandler { private WorldGenMinable bluestoneGen; private WorldGenMinable yellowstoneGen; + private WorldGenMinable mithrilOreGen; + private WorldGenMinable orichalcumOreGen; + private WorldGenMinable coaLargeGen; private WorldGenMinable ironLarge; private WorldGenMinable goldLarge; @@ -21,6 +28,7 @@ public class WorldEventHandler { private int chunk_X; private int chunk_Z; private World currentWorld; + private BiomeGenBase biome; public Random randomGenerato; @@ -31,10 +39,14 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.chunk_X = event.worldX; this.chunk_Z = event.worldZ; this.currentWorld = event.world; + this.biome = event.world.getBiomeGenForCoords(chunk_X, chunk_Z); this.bluestoneGen = new WorldGenMinable(SSBlocks.blueStoneOre, 7); this.yellowstoneGen = new WorldGenMinable(SSBlocks.yellowStoneOre, 7); + mithrilOreGen = new WorldGenMinable(SSBlocks.mithrilOre, 8); + orichalcumOreGen = new WorldGenMinable(SSBlocks.orichalcumOre, 7); + coaLargeGen = new WorldGenMinable(SSBlocks.coalLargeOre, 16); ironLarge = new WorldGenMinable(SSBlocks.ironLargeOre, 8); goldLarge = new WorldGenMinable(SSBlocks.goldLargeOre, 8); @@ -43,6 +55,11 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.genStandardOre1(8, this.bluestoneGen, 0, 16); this.genStandardOre1(8, this.yellowstoneGen, 0, 16); + if(BiomeDictionary.isBiomeOfType(biome, MAGICAL)){ + this.genStandardOre1(4, mithrilOreGen, 0, 32); + this.genStandardOre1(1, orichalcumOreGen, 0, 18); + } + this.genStandardOre1(10, this.coaLargeGen, 0, 128); this.genStandardOre1(10, this.ironLarge, 0, 64); this.genStandardOre1(1, this.goldLarge, 0, 32); diff --git a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java new file mode 100644 index 0000000..6689e10 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java @@ -0,0 +1,143 @@ +package shift.sextiarysector.gui; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.achievement.GuiAchievements; +import net.minecraft.client.gui.achievement.GuiStats; +import net.minecraft.client.gui.inventory.GuiContainerCreative; +import net.minecraft.client.renderer.InventoryEffectRenderer; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import shift.sextiarysector.container.ContainerPlayerNext; + +public class GuiInventoryNext extends InventoryEffectRenderer +{ + + protected static final ResourceLocation field_147001_a = new ResourceLocation("sextiarysector:textures/guis/inventory_next.png"); + + /** x size of the inventory window in pixels. Defined as float, passed as int */ + private float xSizeFloat; + /** y size of the inventory window in pixels. Defined as float, passed as int. */ + private float ySizeFloat; + private static final String __OBFID = "CL_00000761"; + + public GuiInventoryNext(EntityPlayer p_i1094_1_) + { + super(new ContainerPlayerNext(p_i1094_1_.inventory, p_i1094_1_)); + this.allowUserInput = true; + } + + /** + * Called from the main game loop to update the screen. + */ + public void updateScreen() + { + if (this.mc.playerController.isInCreativeMode()) + { + this.mc.displayGuiScreen(new GuiContainerCreative(this.mc.thePlayer)); + } + } + + /** + * Adds the buttons (and other controls) to the screen in question. + */ + public void initGui() + { + this.buttonList.clear(); + + /* + if (this.mc.playerController.isInCreativeMode()) + { + this.mc.displayGuiScreen(new GuiContainerCreative(this.mc.thePlayer)); + } + else + {*/ + super.initGui(); + //} + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + //this.fontRendererObj.drawString(I18n.format("container.crafting", new Object[0]), 86, 16, 4210752); + } + + /** + * Draws the screen and all the components in it. + */ + public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) + { + super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); + this.xSizeFloat = (float)p_73863_1_; + this.ySizeFloat = (float)p_73863_2_; + } + + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(this.field_147001_a); + int k = this.guiLeft; + int l = this.guiTop; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + func_147046_a(k + 51, l + 75, 30, (float)(k + 51) - this.xSizeFloat, (float)(l + 75 - 50) - this.ySizeFloat, this.mc.thePlayer); + } + + public static void func_147046_a(int p_147046_0_, int p_147046_1_, int p_147046_2_, float p_147046_3_, float p_147046_4_, EntityLivingBase p_147046_5_) + { + GL11.glEnable(GL11.GL_COLOR_MATERIAL); + GL11.glPushMatrix(); + GL11.glTranslatef((float)p_147046_0_, (float)p_147046_1_, 50.0F); + GL11.glScalef((float)(-p_147046_2_), (float)p_147046_2_, (float)p_147046_2_); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); + float f2 = p_147046_5_.renderYawOffset; + float f3 = p_147046_5_.rotationYaw; + float f4 = p_147046_5_.rotationPitch; + float f5 = p_147046_5_.prevRotationYawHead; + float f6 = p_147046_5_.rotationYawHead; + GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); + RenderHelper.enableStandardItemLighting(); + GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-((float)Math.atan((double)(p_147046_4_ / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F); + p_147046_5_.renderYawOffset = (float)Math.atan((double)(p_147046_3_ / 40.0F)) * 20.0F; + p_147046_5_.rotationYaw = (float)Math.atan((double)(p_147046_3_ / 40.0F)) * 40.0F; + p_147046_5_.rotationPitch = -((float)Math.atan((double)(p_147046_4_ / 40.0F))) * 20.0F; + p_147046_5_.rotationYawHead = p_147046_5_.rotationYaw; + p_147046_5_.prevRotationYawHead = p_147046_5_.rotationYaw; + GL11.glTranslatef(0.0F, p_147046_5_.yOffset, 0.0F); + RenderManager.instance.playerViewY = 180.0F; + RenderManager.instance.renderEntityWithPosYaw(p_147046_5_, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F); + p_147046_5_.renderYawOffset = f2; + p_147046_5_.rotationYaw = f3; + p_147046_5_.rotationPitch = f4; + p_147046_5_.prevRotationYawHead = f5; + p_147046_5_.rotationYawHead = f6; + GL11.glPopMatrix(); + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); + GL11.glDisable(GL11.GL_TEXTURE_2D); + OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); + } + + protected void actionPerformed(GuiButton p_146284_1_) + { + if (p_146284_1_.id == 0) + { + this.mc.displayGuiScreen(new GuiAchievements(this, this.mc.thePlayer.getStatFileWriter())); + } + + if (p_146284_1_.id == 1) + { + this.mc.displayGuiScreen(new GuiStats(this, this.mc.thePlayer.getStatFileWriter())); + } + } +} diff --git a/src/main/java/shift/sextiarysector/nei/AbstractFuelRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/AbstractFuelRecipeHandler.java new file mode 100644 index 0000000..3e27df6 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/AbstractFuelRecipeHandler.java @@ -0,0 +1,129 @@ +package shift.sextiarysector.nei; + +import static codechicken.nei.NEIClientUtils.*; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; + +import net.minecraft.client.resources.I18n; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.GuiRecipe; + +public abstract class AbstractFuelRecipeHandler extends AbstractSimpleRecipeHandler { + + public class CachedFuelRecipe extends CachedRecipe + { + public FuelPair fuel; + + public CachedFuelRecipe(FuelPair fuel) { + this.fuel = fuel; + } + + @Override + public PositionedStack getIngredient() { + return mfurnace.get(cycleticks / 48 % mfurnace.size()).ingred; + } + + @Override + public PositionedStack getResult() { + return mfurnace.get(cycleticks / 48 % mfurnace.size()).result; + } + + @Override + public PositionedStack getOtherStack() { + return fuel.stack; + } + } + + private ArrayList mfurnace = new ArrayList(); + + public AbstractFuelRecipeHandler() { + super(); + loadAllSmelting(); + } + + public String getRecipeName() { + return I18n.format("nei."+getGuiRecipeName()); + } + + private void loadAllSmelting() { + + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = recipe.getValue(); + if(OreDictionary.getOres(recipe.getKey()).size()>=1){ + mfurnace.add(new SimpleMachinePair(OreDictionary.getOres(recipe.getKey()), item)); + } + + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = recipe.getValue(); + mfurnace.add(new SimpleMachinePair(recipe.getKey(), item)); + } + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) { + if (outputId.equals(getFuelHandlerName()) && getClass() == getFuelHandlerClass()) + for (FuelPair fuel : afuels) + arecipes.add(new CachedFuelRecipe(fuel)); + } + + public void loadUsageRecipes(ItemStack ingredient) { + for (FuelPair fuel : afuels) + if (fuel.stack.contains(ingredient)) + arecipes.add(new CachedFuelRecipe(fuel)); + } + + public String getOverlayIdentifier() { + return getFuelHandlerName(); + } + + @Override + public List handleItemTooltip(GuiRecipe gui, ItemStack stack, List currenttip, int recipe) { + CachedFuelRecipe crecipe = (CachedFuelRecipe) arecipes.get(recipe); + FuelPair fuel = crecipe.fuel; + float burnTime = fuel.burnTime / 200F; + + if (gui.isMouseOver(fuel.stack, recipe) && burnTime < 1) { + burnTime = 1F / burnTime; + String s_time = Float.toString(burnTime); + if (burnTime == Math.round(burnTime)) + s_time = Integer.toString((int) burnTime); + + currenttip.add(translate("recipe.fuel.required", s_time)); + } else if ((gui.isMouseOver(crecipe.getResult(), recipe) || gui.isMouseOver(crecipe.getIngredient(), recipe)) && burnTime > 1) { + String s_time = Float.toString(burnTime); + if (burnTime == Math.round(burnTime)) + s_time = Integer.toString((int) burnTime); + + currenttip.add(translate("recipe.fuel." + (gui.isMouseOver(crecipe.getResult(), recipe) ? "produced" : "processed"), s_time)); + } + + return currenttip; + } + + abstract Class getFuelHandlerClass(); + + @Override + Class getHandlerClass() { + return null; + } + + @Override + String getHandlerName() { + return ""; + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/AbstractSimpleRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/AbstractSimpleRecipeHandler.java new file mode 100644 index 0000000..bc5438d --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/AbstractSimpleRecipeHandler.java @@ -0,0 +1,249 @@ +package shift.sextiarysector.nei; + +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map.Entry; +import java.util.Set; + +import net.minecraft.client.resources.I18n; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import shift.sextiarysector.gui.GuiMagicFurnace; +import shift.sextiarysector.recipe.RecipeSimpleMachine; +import codechicken.nei.ItemList; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.TemplateRecipeHandler; + +public abstract class AbstractSimpleRecipeHandler extends TemplateSSRecipeHandler{ + + public class SimpleMachinePair extends CachedRecipe + { + public SimpleMachinePair(ItemStack ingred, ItemStack result) + { + ingred.stackSize = 1; + this.ingred = new PositionedStack(ingred, 51, 6); + this.result = new PositionedStack(result, 111, 24); + } + + public SimpleMachinePair(List ingred, ItemStack result) + { + for(int i = 0;i afuels; + + public PositionedStack getResult() { + return null; + } + + @Override + public String getOverlayIdentifier() { + return getHandlerName(); + } + + @Override + public void loadTransferRects() { + transferRects.add(new RecipeTransferRect(new Rectangle(50, 23, 18, 18), getFuelHandlerName())); + transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(74, 23, 24, 18), getHandlerName())); + } + + @Override + public TemplateRecipeHandler newInstance() { + if (afuels == null) + findFuels(); + return super.newInstance(); + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) + { + if(outputId.equals(getHandlerName()) && getClass() == getHandlerClass())//don't want subclasses getting a hold of this + { + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = recipe.getValue(); + if(OreDictionary.getOres(recipe.getKey()).size()>=1){ + arecipes.add(new SimpleMachinePair(OreDictionary.getOres(recipe.getKey()), item)); + } + + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = recipe.getValue(); + arecipes.add(new SimpleMachinePair(recipe.getKey(), item)); + } + } + else + { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(ItemStack result) + { + + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = recipe.getValue(); + if(NEIServerUtils.areStacksSameType(item, result)) + { + if(OreDictionary.getOres(recipe.getKey()).size()>=1){ + arecipes.add(new SimpleMachinePair(OreDictionary.getOres(recipe.getKey()), item)); + } + + } + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = recipe.getValue(); + if(NEIServerUtils.areStacksSameType(item, result)) + { + arecipes.add(new SimpleMachinePair(recipe.getKey(), item)); + } + } + } + + @Override + public void loadUsageRecipes(String inputId, Object... ingredients) { + if (inputId.equals(getFuelHandlerName()) && getClass() == getHandlerClass())//don't want subclasses getting a hold of this + loadCraftingRecipes(getHandlerName()); + else + super.loadUsageRecipes(inputId, ingredients); + } + + @Override + public void loadUsageRecipes(ItemStack ingredient) + { + + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = recipe.getValue(); + ArrayList items = OreDictionary.getOres(recipe.getKey()); + for(int i = 0; i< items.size() ; i++){ + if(this.checkItem(items.get(i),ingredient)){ + arecipes.add(new SimpleMachinePair(items, item)); + break; + } + } + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = recipe.getValue(); + //if(ingredient.itemID == recipe.getKey().get(0) && ingredient.getItemDamage() == recipe.getKey().get(1)) + if(this.checkItem(ingredient, recipe.getKey())) + { + arecipes.add(new SimpleMachinePair(ingredient, item)); + } + } + } + + private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } + + @Override + public void drawExtras(int recipe) + { + drawProgressBar(51, 25, 176, 0, 14, 14, 48, 7); + drawProgressBar(74, 23, 176, 14, 24, 16, 48, 0); + } + + private static Set excludedFuels() { + Set efuels = new HashSet(); + efuels.add(Item.getItemFromBlock(Blocks.brown_mushroom)); + efuels.add(Item.getItemFromBlock(Blocks.red_mushroom)); + efuels.add(Item.getItemFromBlock(Blocks.standing_sign)); + efuels.add(Item.getItemFromBlock(Blocks.wall_sign)); + efuels.add(Item.getItemFromBlock(Blocks.wooden_door)); + efuels.add(Item.getItemFromBlock(Blocks.trapped_chest)); + return efuels; + } + + private void findFuels() { + afuels = new ArrayList(); + Set efuels = excludedFuels(); + for (ItemStack item : ItemList.items) + if (!efuels.contains(item.getItem())) { + int burnTime = getFuelTime(item); + if (burnTime > 0) + afuels.add(new FuelPair(item.copy(), burnTime)); + } + } + + abstract Class getHandlerClass(); + abstract String getHandlerName(); + abstract RecipeSimpleMachine getRecipe(); + abstract String getGuiRecipeName(); + public abstract Class getGuiClass(); + abstract String getFuelHandlerName(); + abstract int getFuelTime(ItemStack item); + + @Override + public String getRecipeName() { + return I18n.format("nei."+getGuiRecipeName()); + } +} diff --git a/src/main/java/shift/sextiarysector/nei/MagicFuelRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/MagicFuelRecipeHandler.java new file mode 100644 index 0000000..6ca1581 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/MagicFuelRecipeHandler.java @@ -0,0 +1,50 @@ +package shift.sextiarysector.nei; + +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiMagicFurnace; +import shift.sextiarysector.recipe.RecipeSimpleMachine; + +public class MagicFuelRecipeHandler extends AbstractFuelRecipeHandler{ + + @Override + Class getFuelHandlerClass() { + return MagicFuelRecipeHandler.class; + } + + @Override + RecipeSimpleMachine getRecipe() { + return SSRecipes.magicFurnace; + } + + @Override + String getGuiRecipeName() { + return "ss.magic_fuel"; + } + + @Override + public Class getGuiClass() { + return GuiMagicFurnace.class; + } + + @Override + String getFuelHandlerName() { + return "SS_MagicFuel"; + } + + @Override + String getHandlerName() { + return "SS_MagicFurnace"; + } + + @Override + int getFuelTime(ItemStack item) { + return SSRecipes.magicFuel.getResult(item); + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/magic_furnace.png"; + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/MagicFurnaceRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/MagicFurnaceRecipeHandler.java new file mode 100644 index 0000000..3df4333 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/MagicFurnaceRecipeHandler.java @@ -0,0 +1,51 @@ +package shift.sextiarysector.nei; + +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiMagicFurnace; +import shift.sextiarysector.recipe.RecipeSimpleMachine; + +public class MagicFurnaceRecipeHandler extends AbstractSimpleRecipeHandler{ + + @Override + Class getHandlerClass() { + return MagicFurnaceRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_MagicFurnace"; + } + + + @Override + RecipeSimpleMachine getRecipe() { + return SSRecipes.magicFurnace; + } + + @Override + String getGuiRecipeName() { + return "ss.magic_furnace"; + } + + @Override + public Class getGuiClass() { + return GuiMagicFurnace.class; + } + + @Override + String getFuelHandlerName() { + return "SS_MagicFuel"; + } + + @Override + int getFuelTime(ItemStack item) { + return SSRecipes.magicFuel.getResult(item); + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/magic_furnace.png"; + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java index c5b3f06..215818b 100644 --- a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java +++ b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java @@ -3,6 +3,7 @@ import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; +import shift.sextiarysector.gui.GuiMagicFurnace; import shift.sextiarysector.gui.GuiMillstone; import shift.sextiarysector.gui.GuiSawmill; import codechicken.nei.api.API; @@ -39,6 +40,11 @@ public void loadConfig() { API.registerRecipeHandler(new FluidFurnaceRecipeHandler()); API.registerUsageHandler(new FluidFurnaceRecipeHandler()); + API.registerRecipeHandler(new MagicFurnaceRecipeHandler()); + API.registerUsageHandler(new MagicFurnaceRecipeHandler()); + API.registerRecipeHandler(new MagicFuelRecipeHandler()); + API.registerUsageHandler(new MagicFuelRecipeHandler()); + API.registerRecipeHandler(new FertilizerRecipeHandler()); API.registerUsageHandler(new FertilizerRecipeHandler()); @@ -58,6 +64,7 @@ public void loadConfig() { API.registerGuiOverlay(GuiLargeFurnace.class, "furnaceCrafting"); API.registerGuiOverlay(GuiFluidFurnace.class, "SS_FluidFurnace"); + API.registerGuiOverlay(GuiMagicFurnace.class, "SS_MagicFurnace"); API.registerGuiOverlay(GuiMillstone.class, "SS_Millstone"); API.registerGuiOverlay(GuiLoom.class, "SS_Loom"); diff --git a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java index 0dc42bd..158def4 100644 --- a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java +++ b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java @@ -17,6 +17,8 @@ public class CustomPlayerData implements IExtendedEntityProperties{ /** スタミナ */ private StaminaStats stamina; + /**装備**/ + private EquipmentStats equipment; public void onUpdateEntity(EntityPlayer entityPlayer) { @@ -25,7 +27,6 @@ public void onUpdateEntity(EntityPlayer entityPlayer) PacketHandler.INSTANCE.sendTo(new PacketPlayerData(this), (EntityPlayerMP) entityPlayer); //.out.println("onUpdateEntity"); } - //System.out.println("AAA"+this.moisture.getMoistureLevel()+" : "+this.stamina.getStaminaLevel()); this.moisture.onUpdate(entityPlayer); @@ -40,6 +41,8 @@ public void saveNBTData(NBTTagCompound compound) { this.stamina.writeNBT(compound); + this.equipment.writeNBT(compound); + } @Override @@ -49,6 +52,8 @@ public void loadNBTData(NBTTagCompound compound) { this.moisture.readNBT(compound); + this.equipment.readNBT(compound); + } @Override @@ -58,6 +63,8 @@ public void init(Entity entity, World world) { this.stamina = new StaminaStats(); + this.equipment = new EquipmentStats((EntityPlayer) entity); + } public MoistureStats getMoisture() { @@ -76,6 +83,10 @@ private void setStamina(StaminaStats stamina) { this.stamina = stamina; } + public EquipmentStats getEquipmentStats(){ + return equipment; + } + } diff --git a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java index fc52029..f2807ac 100644 --- a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java +++ b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java @@ -212,6 +212,10 @@ public static StaminaStats getStaminaStats(EntityPlayer entityPlayer) } + public static EquipmentStats getEquipmentStats(EntityPlayer entityPlayer){ + return getCustomPlayerData(entityPlayer).getEquipmentStats(); + } + //パケット用 /* public void onPacketData(INetworkManager manager,Packet250CustomPayload packet, Player player) { diff --git a/src/main/java/shift/sextiarysector/player/EquipmentStats.java b/src/main/java/shift/sextiarysector/player/EquipmentStats.java new file mode 100644 index 0000000..6fa4770 --- /dev/null +++ b/src/main/java/shift/sextiarysector/player/EquipmentStats.java @@ -0,0 +1,43 @@ +package shift.sextiarysector.player; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import shift.sextiarysector.container.InventoryPlayerNext; + + +public class EquipmentStats { + + public final String NBT_ID = "ssequipment"; + + public InventoryPlayerNext inventory; + + public EquipmentStats(EntityPlayer player){ + + inventory = new InventoryPlayerNext(); + + } + + public void onUpdateEntity() + { + + } + + public void writeNBT(NBTTagCompound compound) { + + NBTTagCompound nbt = new NBTTagCompound(); + + inventory.writeToNBT(nbt); + + compound.setTag(NBT_ID, nbt); + + } + + public void readNBT(NBTTagCompound compound) { + + if(compound.hasKey(NBT_ID)){ + inventory.readFromNBT(compound.getCompoundTag(NBT_ID)); + } + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index f80115e..2efb669 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -58,6 +58,13 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) Character.valueOf('y'), Blocks.glass_pane, })); + //魔法カマド + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.magicFurnace, 1), + new Object[] { "xxx", "xyx","xxx", + Character.valueOf('x'), "cobblestone", + Character.valueOf('y'), SSItems.magicDust, + })); + //time p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.chunkLoader, 1), new Object[] { "xyx", "yzy","xyx", diff --git a/src/main/java/shift/sextiarysector/world/biome/BiomeGenMagicDesert.java b/src/main/java/shift/sextiarysector/world/biome/BiomeGenMagicDesert.java new file mode 100644 index 0000000..d6b0baa --- /dev/null +++ b/src/main/java/shift/sextiarysector/world/biome/BiomeGenMagicDesert.java @@ -0,0 +1,33 @@ +package shift.sextiarysector.world.biome; + +import java.awt.Color; + +import net.minecraft.world.biome.BiomeGenDesert; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BiomeGenMagicDesert extends BiomeGenDesert{ + + public BiomeGenMagicDesert(int p_i1977_1_) { + super(p_i1977_1_); + } + + @SideOnly(Side.CLIENT) + public int getSkyColorByTemp(float p_76731_1_) + { + p_76731_1_ /= 3.0F; + + if (p_76731_1_ < -1.0F) + { + p_76731_1_ = -1.0F; + } + + if (p_76731_1_ > 1.0F) + { + p_76731_1_ = 1.0F; + } + + return Color.getHSBColor(0.62222224F - p_76731_1_ * 0.05F, 0.5F + p_76731_1_ * 0.1F, 1.0F).getRGB(); + } + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index f933a53..db8a430 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -203,6 +203,9 @@ nei.ss.furnace.shapeless=Furnace Shapeless nei.ss.fluid_furnace.=Fluid Furnace +nei.ss.magic_furnace=Magic Furnace +nei.ss.magic_fuel=Magic Fuel + nei.ss.millstone=Millstone Recipe nei.ss.loom=Loom Recipe nei.ss.sawmill=Sawmill Recipe diff --git a/src/main/resources/assets/sextiarysector/textures/guis/inventory_next.png b/src/main/resources/assets/sextiarysector/textures/guis/inventory_next.png new file mode 100644 index 0000000000000000000000000000000000000000..1d002cc95429800fc71e1a0df26d156fd5867442 GIT binary patch literal 10671 zcmbt(1yEeim+qaxeQY7 zzyI6XeYLe!yS1;T?%dmb>vo^-obQ}IeL6-r~)MBt;atKl=>F~HJ z&%{+%c3hpFBGxKh4;rpo5&NBEM&v+BDSt)=`U_CM6IG)dpfhhK5HXa~VCrW~iX!0D}&&+tj!)R0HENuh?)WD0Dj$Ak1nIqvRnZj}~Qp zk<8aL7Mn?x!DCCoYTLyjM>rfKX7K?}8o^Uvl=Q5_opGdDU-=pQ=d9$0J5VyL!s6A zNhPJGCyhQQ=$O0xXhJyw!4i$U6MZrEZ3G$=dP!hPMFarL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p%H03c1In{J3GmPt5|fG_|w*By!@YQ$|0VZkS{ Date: Tue, 18 Nov 2014 22:44:56 +0900 Subject: [PATCH 28/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E8=A3=85=E5=82=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・追加装備欄を追加 --- .gitignore | 1 + .../java/shift/sextiarysector/SSEvents.java | 2 + .../shift/sextiarysector/SextiarySector.java | 1 + .../block/BlockMagicFurnace.java | 2 +- .../container/ContainerPlayerNext.java | 2 +- .../container/InventoryPlayerNext.java | 2 +- .../sextiarysector/gui/GuiInventoryNext.java | 15 +- .../sextiarysector/gui/tab/AbstractTab.java | 13 ++ .../gui/tab/InventoryTabSextiarysector.java | 31 ++++ .../sextiarysector/gui/tab/TabButton.java | 75 ++++++++++ .../shift/sextiarysector/gui/tab/TabList.java | 8 ++ .../sextiarysector/gui/tab/TabManager.java | 135 ++++++++++++++++++ .../sextiarysector/packet/MessageGuiId.java | 29 ++++ .../sextiarysector/packet/PacketGuiId.java | 42 ++++++ .../sextiarysector/packet/PacketHandler.java | 2 + .../player/CustomPlayerData.java | 20 +++ .../shift/sextiarysector/player/TabStats.java | 21 +++ .../sextiarysector/proxy/ClientProxy.java | 21 ++- .../sextiarysector/proxy/CommonProxy.java | 9 ++ .../textures/guis/inventory_next.png | Bin 10671 -> 11138 bytes 20 files changed, 424 insertions(+), 7 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java create mode 100644 src/main/java/shift/sextiarysector/gui/tab/InventoryTabSextiarysector.java create mode 100644 src/main/java/shift/sextiarysector/gui/tab/TabButton.java create mode 100644 src/main/java/shift/sextiarysector/gui/tab/TabList.java create mode 100644 src/main/java/shift/sextiarysector/gui/tab/TabManager.java create mode 100644 src/main/java/shift/sextiarysector/packet/MessageGuiId.java create mode 100644 src/main/java/shift/sextiarysector/packet/PacketGuiId.java create mode 100644 src/main/java/shift/sextiarysector/player/TabStats.java diff --git a/.gitignore b/.gitignore index 97a0717..0d43df0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /api /build /src/api +/src/main/java/tconstruct /*.exe /*.classpath /*.project diff --git a/src/main/java/shift/sextiarysector/SSEvents.java b/src/main/java/shift/sextiarysector/SSEvents.java index 111f136..3612de4 100644 --- a/src/main/java/shift/sextiarysector/SSEvents.java +++ b/src/main/java/shift/sextiarysector/SSEvents.java @@ -8,6 +8,7 @@ import shift.sextiarysector.event.PlayerStatusEventHandler; import shift.sextiarysector.event.WorldEventHandler; import shift.sextiarysector.player.EntityPlayerManager; +import tconstruct.client.tabs.TabRegistry; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -22,6 +23,7 @@ public static void preInit(FMLPreInitializationEvent event){ MinecraftForge.EVENT_BUS.register(new PlayerStatusEventHandler()); MinecraftForge.EVENT_BUS.register(new VanillaFoodHandler()); if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new ClientEventHandler()); + if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new TabRegistry()); MinecraftForge.ORE_GEN_BUS.register(new WorldEventHandler()); } diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index b389272..11324c1 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -125,6 +125,7 @@ public void init(FMLInitializationEvent event) public void postInit(FMLPostInitializationEvent event) { + SextiarySector.proxy.registerInventoryTabs(); RecipesFurnaceCraft.addVanillaRecipes(); SSFluids.postFluids(); SSShops.initShops(); diff --git a/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java b/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java index f1f96b5..3b121a1 100644 --- a/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java +++ b/src/main/java/shift/sextiarysector/block/BlockMagicFurnace.java @@ -63,7 +63,7 @@ public boolean onBlockActivated(World par1World, int par2, int par3, int par4, E if (tileentityfurnace != null) { - par5EntityPlayer.openGui(SextiarySector.instance, 200, par1World, par2, par3, par4); + par5EntityPlayer.openGui(SextiarySector.instance, 90, par1World, par2, par3, par4); } return true; diff --git a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java index 65ae605..798b270 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java @@ -27,7 +27,7 @@ public ContainerPlayerNext(InventoryPlayer par1InventoryPlayer,EntityPlayer p_i1 for(int i = 0;i<5;i++){ for(int j =0;j<4;j++){ - this.addSlotToContainer(new Slot(this.equipment,c, 80 + i * 18, 8 + j * 36)); + this.addSlotToContainer(new Slot(this.equipment,c, 80 + i * 18, 8 + j * 18)); c++; } diff --git a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java index 3762658..148deb4 100644 --- a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java @@ -8,7 +8,7 @@ public class InventoryPlayerNext implements IInventory{ - ItemBox items = new ItemBox("Base", 10); + ItemBox items = new ItemBox("Base", 20); @Override public int getSizeInventory() { diff --git a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java index 6689e10..9e29105 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java +++ b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java @@ -3,7 +3,6 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.achievement.GuiAchievements; import net.minecraft.client.gui.achievement.GuiStats; -import net.minecraft.client.gui.inventory.GuiContainerCreative; import net.minecraft.client.renderer.InventoryEffectRenderer; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderHelper; @@ -16,6 +15,8 @@ import org.lwjgl.opengl.GL12; import shift.sextiarysector.container.ContainerPlayerNext; +import shift.sextiarysector.gui.tab.InventoryTabSextiarysector; +import tconstruct.client.tabs.TabRegistry; public class GuiInventoryNext extends InventoryEffectRenderer { @@ -41,7 +42,7 @@ public void updateScreen() { if (this.mc.playerController.isInCreativeMode()) { - this.mc.displayGuiScreen(new GuiContainerCreative(this.mc.thePlayer)); + //this.mc.displayGuiScreen(new GuiContainerCreative(this.mc.thePlayer)); } } @@ -59,8 +60,16 @@ public void initGui() } else {*/ - super.initGui(); + super.initGui(); //} + + int cornerX = this.guiLeft; + + int cornerY = this.guiTop; + + TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabSextiarysector.class); + TabRegistry.addTabsToList(this.buttonList); + } /** diff --git a/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java b/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java new file mode 100644 index 0000000..a534cba --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java @@ -0,0 +1,13 @@ +package shift.sextiarysector.gui.tab; + +import net.minecraft.entity.player.EntityPlayer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public abstract class AbstractTab { + + + @SideOnly(Side.CLIENT) + public abstract boolean shouldAddToList(EntityPlayer player); + +} diff --git a/src/main/java/shift/sextiarysector/gui/tab/InventoryTabSextiarysector.java b/src/main/java/shift/sextiarysector/gui/tab/InventoryTabSextiarysector.java new file mode 100644 index 0000000..6168c57 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/tab/InventoryTabSextiarysector.java @@ -0,0 +1,31 @@ +package shift.sextiarysector.gui.tab; + +import net.minecraft.client.Minecraft; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SextiarySector; +import tconstruct.client.tabs.AbstractTab; +import cpw.mods.fml.client.FMLClientHandler; + +public class InventoryTabSextiarysector extends AbstractTab { + + private static Minecraft mc = FMLClientHandler.instance().getClient(); + + public InventoryTabSextiarysector() { + super(0, 0, 0, new ItemStack(Items.chainmail_chestplate)); + } + + @Override + public void onTabClicked() { + + //mc.thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow(mc.thePlayer.openContainer.windowId)); + mc.thePlayer.openGui(SextiarySector.instance, 200, mc.thePlayer.worldObj, (int)mc.thePlayer.posX, (int)mc.thePlayer.posY, (int)mc.thePlayer.posZ); + //SextiarySector.proxy.openGUI(200); + } + + @Override + public boolean shouldAddToList() { + return true; + } + +} diff --git a/src/main/java/shift/sextiarysector/gui/tab/TabButton.java b/src/main/java/shift/sextiarysector/gui/tab/TabButton.java new file mode 100644 index 0000000..d756887 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/tab/TabButton.java @@ -0,0 +1,75 @@ +package shift.sextiarysector.gui.tab; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +public class TabButton extends GuiButton{ + + ResourceLocation texture = new ResourceLocation("textures/gui/container/creative_inventory/tabs.png"); + ItemStack renderStack; + RenderItem itemRenderer = new RenderItem(); + + public TabButton(int id, int posX, int posY, ItemStack renderStack) + { + super(id, posX, posY, 28, 32, ""); + this.renderStack = renderStack; + } + + @Override + public void drawButton (Minecraft mc, int mouseX, int mouseY) + { + if (this.visible) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + + int yTexPos = this.enabled ? 3 : 32; + int ySize = this.enabled ? 25 : 32; + int xOffset = this.id == 2 ? 0 : 1; + int yPos = this.yPosition + (this.enabled ? 3 : 0); + + mc.renderEngine.bindTexture(this.texture); + this.drawTexturedModalRect(this.xPosition, yPos, xOffset * 28, yTexPos, 28, ySize); + + RenderHelper.enableGUIStandardItemLighting(); + this.zLevel = 100.0F; + this.itemRenderer.zLevel = 100.0F; + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + this.itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, xPosition + 6, yPosition + 8); + this.itemRenderer.renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, xPosition + 6, yPosition + 8); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_BLEND); + this.itemRenderer.zLevel = 0.0F; + this.zLevel = 0.0F; + RenderHelper.disableStandardItemLighting(); + } + } + + @Override + public boolean mousePressed (Minecraft mc, int mouseX, int mouseY) + { + boolean inWindow = this.enabled && this.visible && mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; + + if (inWindow) + { + this.onTabClicked(); + } + + return inWindow; + } + + public void onTabClicked () { + } + + public boolean shouldAddToList () { + return false; + } + +} diff --git a/src/main/java/shift/sextiarysector/gui/tab/TabList.java b/src/main/java/shift/sextiarysector/gui/tab/TabList.java new file mode 100644 index 0000000..253fbf8 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/tab/TabList.java @@ -0,0 +1,8 @@ +package shift.sextiarysector.gui.tab; + +public class TabList { + + private int pageSize = 0; + private int tabSize = 0; + +} diff --git a/src/main/java/shift/sextiarysector/gui/tab/TabManager.java b/src/main/java/shift/sextiarysector/gui/tab/TabManager.java new file mode 100644 index 0000000..db0857a --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/tab/TabManager.java @@ -0,0 +1,135 @@ +package shift.sextiarysector.gui.tab; + +import java.util.ArrayList; + +import net.minecraft.entity.player.EntityPlayer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class TabManager { + + private static ArrayList tabList = new ArrayList(); + + public static void registerTab (AbstractTab tab) + { + tabList.add(tab); + } + + public static int getTabNumber(AbstractTab tab){ + + for(int i = 0;i tabs = new ArrayList(); + + for (int i = 1; i < tabList.size(); i++) + { + AbstractTab t = tabList.get(i); + if (t.shouldAddToList(player)) + { + tabs.add(t); + } + } + + //EntityPlayerManager.getCustomPlayerData(player).setTabList(tabs); + + } + + + public static void updateTabValues (EntityPlayer player,int cornerX, int cornerY, Class selectedButton) + { + int count = 2; + AbstractTab[] tabs = getTabList(player)[getPageNumber(player,selectedButton)]; + for (int i = 0; tabs[i]!=null; i++) + { + AbstractTab t = tabList.get(i); + + //t.id = count; + //t.xPosition = cornerX + (count - 2) * 28; + // t.yPosition = cornerY - 28; + //t.enabled = !t.getClass().equals(selectedButton); + //count++; + + + } + + } + + @SideOnly(Side.CLIENT) + private static AbstractTab[][] getTabList(EntityPlayer player){ + + updateTab(player); + + ArrayList tabList = null;//EntityPlayerManager.getCustomPlayerData(player).getTabList(); + int p = tabList.size()%5==0 ? 0 : 1; + AbstractTab[][] tabs = new AbstractTab[(tabList.size()/5)+p][5]; + + int page=0; + for(int i = 0;i selectedButton){ + + AbstractTab[][] tabs = getTabList(player); + for(int i = 0;iEntityPlayerManager.getCustomPlayerData(player).getSelectPage()+1){ + f = true; + }else{ + EntityPlayerManager.getCustomPlayerData(player).setSelectPage(i.length-1);; + }*/ + + return f; + } + + public static boolean isBackPage(EntityPlayer player){ + + AbstractTab[][] i = getTabList(player); + + boolean f = false; + + /*if(EntityPlayerManager.getCustomPlayerData(player).getSelectPage()>0){ + f = true; + }else if(EntityPlayerManager.getCustomPlayerData(player).getSelectPage()<0){ + EntityPlayerManager.getCustomPlayerData(player).setSelectPage(0); + }*/ + + return f; + } + + +} diff --git a/src/main/java/shift/sextiarysector/packet/MessageGuiId.java b/src/main/java/shift/sextiarysector/packet/MessageGuiId.java new file mode 100644 index 0000000..be6880f --- /dev/null +++ b/src/main/java/shift/sextiarysector/packet/MessageGuiId.java @@ -0,0 +1,29 @@ +package shift.sextiarysector.packet; + +import net.minecraft.entity.player.EntityPlayer; +import shift.sextiarysector.SextiarySector; +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; + +public class MessageGuiId implements IMessageHandler{ + + @Override + public IMessage onMessage(PacketGuiId message, MessageContext ctx) { + + EntityPlayer p = ctx.getServerHandler().playerEntity; + + //CustomPlayerData data = EntityPlayerManager.getCustomPlayerData(p); + + //data.loadNBTData(message.getData()); + + System.out.println("AAAAA" + message.getData().getInteger("gui")); + + int i = message.getData().getInteger("gui"); + + p.openGui(SextiarySector.instance, i, p.worldObj, (int)p.posX, (int)p.posY, (int)p.posZ); + + return null; + + } +} diff --git a/src/main/java/shift/sextiarysector/packet/PacketGuiId.java b/src/main/java/shift/sextiarysector/packet/PacketGuiId.java new file mode 100644 index 0000000..02753cf --- /dev/null +++ b/src/main/java/shift/sextiarysector/packet/PacketGuiId.java @@ -0,0 +1,42 @@ +package shift.sextiarysector.packet; + +import io.netty.buffer.ByteBuf; +import net.minecraft.nbt.NBTTagCompound; +import cpw.mods.fml.common.network.ByteBufUtils; +import cpw.mods.fml.common.network.simpleimpl.IMessage; + +public class PacketGuiId implements IMessage{ + + private NBTTagCompound data; + + public PacketGuiId(){ + + } + + public PacketGuiId(int id) { + + NBTTagCompound nbt = new NBTTagCompound(); + nbt.setInteger("gui", id); + this.setData(nbt); + + } + + @Override + public void fromBytes(ByteBuf buf) { + setData(ByteBufUtils.readTag(buf)); + } + + @Override + public void toBytes(ByteBuf buf) { + ByteBufUtils.writeTag(buf, getData()); + } + + public NBTTagCompound getData() { + return data; + } + + public void setData(NBTTagCompound data) { + this.data = data; + } + +} diff --git a/src/main/java/shift/sextiarysector/packet/PacketHandler.java b/src/main/java/shift/sextiarysector/packet/PacketHandler.java index eee9d45..99954ff 100644 --- a/src/main/java/shift/sextiarysector/packet/PacketHandler.java +++ b/src/main/java/shift/sextiarysector/packet/PacketHandler.java @@ -16,6 +16,8 @@ public static void init(FMLPreInitializationEvent event) { */ INSTANCE.registerMessage(MessagePlayer.class,PacketPlayerData.class, 0, Side.CLIENT); + INSTANCE.registerMessage(MessageGuiId.class,PacketGuiId.class, 1, Side.SERVER); + } diff --git a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java index 158def4..c933c20 100644 --- a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java +++ b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java @@ -20,6 +20,9 @@ public class CustomPlayerData implements IExtendedEntityProperties{ /**装備**/ private EquipmentStats equipment; + //@SideOnly(Side.CLIENT) + //private TabStats tab; + public void onUpdateEntity(EntityPlayer entityPlayer) { @@ -87,6 +90,23 @@ public EquipmentStats getEquipmentStats(){ return equipment; } + /* + @SideOnly(Side.CLIENT) + public void setTabList(ArrayList tabList){ + tab.setTabList(tabList); + } + + @SideOnly(Side.CLIENT) + public ArrayList getTabList(){ + return tab.getTabList(); + } + + public void setSelectPage(int i){ + tab.selectPage = i; + } + public int getSelectPage(){ + return tab.selectPage; + }*/ } diff --git a/src/main/java/shift/sextiarysector/player/TabStats.java b/src/main/java/shift/sextiarysector/player/TabStats.java new file mode 100644 index 0000000..f128a92 --- /dev/null +++ b/src/main/java/shift/sextiarysector/player/TabStats.java @@ -0,0 +1,21 @@ +package shift.sextiarysector.player; + +import java.util.ArrayList; + +import shift.sextiarysector.gui.tab.AbstractTab; + +public class TabStats { + + ArrayList tabList = new ArrayList(); + + public int selectPage = 0; + + public void setTabList(ArrayList tabList){ + this.tabList = tabList; + } + + public ArrayList getTabList(){ + return this.tabList; + } + +} diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index b12117b..5079a01 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -4,6 +4,9 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; +import shift.mceconomy2.packet.PacketHandler; +import shift.sextiarysector.gui.tab.InventoryTabSextiarysector; +import shift.sextiarysector.packet.PacketGuiId; import shift.sextiarysector.renderer.block.RendererBlockBottle; import shift.sextiarysector.renderer.block.RendererChest; import shift.sextiarysector.renderer.block.RendererFarmland; @@ -23,8 +26,11 @@ import shift.sextiarysector.tileentity.TileEntityShaft; import shift.sextiarysector.tileentity.TileEntitySmallWindmill; import shift.sextiarysector.tileentity.TileEntityWindmill; +import tconstruct.client.tabs.InventoryTabVanilla; +import tconstruct.client.tabs.TabRegistry; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -99,7 +105,6 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySSChest.class, new RendererChest()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMonitor.class, new RendererMonitor()); - } @Override @@ -107,4 +112,18 @@ public void registerItemRenderer(Item item) { MinecraftForgeClient.registerItemRenderer(item, new RenderGF()); } + public void openGUI(int id){ + PacketHandler.INSTANCE.sendToServer(new PacketGuiId(id)); + } + + public void registerInventoryTabs() + { + if (!Loader.isModLoaded("TConstruct") || TabRegistry.getTabList().size() < 3) + { + TabRegistry.registerTab(new InventoryTabVanilla()); + } + + TabRegistry.registerTab(new InventoryTabSextiarysector()); + } + } diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 8ae4e90..76b0299 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -35,5 +35,14 @@ public void registerItemRenderer(Item item) { } + public void openGUI(int id){ + + } + + public void registerInventoryTabs() + { + + } + } diff --git a/src/main/resources/assets/sextiarysector/textures/guis/inventory_next.png b/src/main/resources/assets/sextiarysector/textures/guis/inventory_next.png index 1d002cc95429800fc71e1a0df26d156fd5867442..6faef7987b8545e03f9b9d8d8b1d5c81f304f630 100644 GIT binary patch delta 8269 zcmX|mby!r-`}Wyofu)vKM3NH_3F$lwEP{xDfP^%NARUqtDC`B9CFJgfk~1!$|Q-1VPW z&kFLs>yxtCE}(6a{q`C?7bM@iq%Pnpw48~RsjEqgESzF%*g1mt8&_%T%!~S<{o-Hf zf~R#($U2RsdYP&DI*7{Wg6FzXfG`%rNCv@b`#$y#qlUZ1;YF8 zP_Tdb@+H<>jZH_E3KvF3*=V9=z8j@<0s*R=e(}S(*{EQbAOl3IJb*z}5WpsIt0fmj zmYP)}j%Y53J&f(mxJBPgcd=wYAGztf(KwF?1f4-RriCngwrMH*^I~s?=hn<8mAY9S z9i6Ix-Nl3_oD+r(pC?$10aZ9ThT&(C5I_~%@H=FB<=nxvV)^h!@gS!iFAGLx{iFiD zuu<2B!}}dwW5Pm}PrO6No3bsMp#5c*vkmZKSqHFpY*v~>6#{oz@;gN_FnV0nhOL5) z8(5*S=x|0DImTZb0`)xktw$zf$9yT9oD0hcQ0>Q-rXcnl?sf=b41lAa?S=LSUYj1; zWN;hmffqbn=SZ|6z#R)5nZu5PDC}Qn8vqm@J;+$H!)MC|27H{IO>4rx6Bqcvxm;=KoZlpJ0rB5O!Qe!BEmC z9wAE&|8kIr^g$8eo$LTNNjvz;FBS}pqOw(h1;b4^nf=Ka%|NZJBnyImu$_hDlS|Af zs38!|**86n3~LFo;xeQ{LFq)zVT1@4+*GehNaVa<`~Jo;8U(!-`D1}+!0cEqRvgN< zhq$O$tPkhKK;(ZtE8#ULHlp;Kr;=>tW&!33;4o%#tei7^grk6s8ld7L&)sF9#xbx! zR6CFtApbc%4cdr{6V0{}$Z4xq3#9jjQ8W0$R#7C$hwd=`b95LoEEuo&p};K)8Ah@T zh&2G<+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($K^Ky{*zf!E$Pb3`X+r_MXq(@*}Z{5gYZzt1Y#4Ub1xf zNmmvo!osKoEuFF->$^7_L7n%j)3G|Yw0}tNZ=s=*N01f`>PDuP(y1V@mSDEENp`H? z>F&vK6ZpM}V+9iAoZ8UtE*or{_%xkB^JmA%i|twP9LVNKiQ;-eiBY-g%l7NJILF0EoWXZZG9T3ul+E!8~+e>{Pg^V>xHVr zb0QFZ^#hWiu>kyT{lYA9%i)X1&~n<_r(_uxthdEUBIEF6POS4CMLV1B83=LBL`OT7 ziFKpDV*b1-Q^gkx9kFfG%EatxQnX4ma0tzDnXs0I#sM9~W!diJkp_08*aLVOF{mwl zEyIG&^VCxX-PF0!#62*4UClzxRv6zW_)L@3U!DGAn;hWr9OCs+NI&Y ze#b=%3s30coLtiDB8Z1^B!q|%sJZb$$Pf{@_V*9?{@}&FYzmPttC5tt{NVdIPH}Pj z2J7I~JlZL$SEE)e+qA1zf?y>V^iHjoz2lMRCA^N04w#FzaC^@R!G{Nj#rHv6R)3x? zN*rP_{g6m}B&o_!;6m8iX&oU)hp~>l99)R+@|#lJBLU4CKlFqG{vho6Dl;w-K%lDm z-E1Eh(|ru7F7Z_&xUiU`#(ZVcgrsQ~73I~2fJK=J8WfO)%qh2)ONOjb@Phn$(xQzh z3lGpx-K2pVZfW!3Rm6w1nI-VWQEMpY>pjef(%!oZrCRyNqQ~lgey=y!qx%PiML$%O vz&(iJg+L{Q Date: Wed, 19 Nov 2014 22:55:26 +0900 Subject: [PATCH 29/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20Tab=E3=82=B7?= =?UTF-8?q?=E3=82=B9=E3=83=86=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・Tabシステムを追加。 --- .../java/shift/sextiarysector/SSEvents.java | 4 +- .../sextiarysector/gui/GuiInventoryNext.java | 8 +- .../sextiarysector/gui/tab/AbstractTab.java | 9 +- .../sextiarysector/gui/tab/GuiBackButton.java | 35 ++++ .../sextiarysector/gui/tab/GuiNextButton.java | 35 ++++ .../gui/tab/InventoryTabEquipment.java | 28 +++ .../gui/tab/InventoryTabVanilla.java | 23 ++ .../sextiarysector/gui/tab/TabButton.java | 25 +-- .../sextiarysector/gui/tab/TabManager.java | 197 +++++++++++++++++- .../sextiarysector/packet/MessageGuiId.java | 2 +- .../player/CustomPlayerData.java | 15 +- .../sextiarysector/proxy/ClientProxy.java | 25 ++- 12 files changed, 365 insertions(+), 41 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java create mode 100644 src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java create mode 100644 src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java create mode 100644 src/main/java/shift/sextiarysector/gui/tab/InventoryTabVanilla.java diff --git a/src/main/java/shift/sextiarysector/SSEvents.java b/src/main/java/shift/sextiarysector/SSEvents.java index 3612de4..bc2a77f 100644 --- a/src/main/java/shift/sextiarysector/SSEvents.java +++ b/src/main/java/shift/sextiarysector/SSEvents.java @@ -7,8 +7,8 @@ import shift.sextiarysector.event.HUDEventHandler; import shift.sextiarysector.event.PlayerStatusEventHandler; import shift.sextiarysector.event.WorldEventHandler; +import shift.sextiarysector.gui.tab.TabManager; import shift.sextiarysector.player.EntityPlayerManager; -import tconstruct.client.tabs.TabRegistry; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -23,7 +23,7 @@ public static void preInit(FMLPreInitializationEvent event){ MinecraftForge.EVENT_BUS.register(new PlayerStatusEventHandler()); MinecraftForge.EVENT_BUS.register(new VanillaFoodHandler()); if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new ClientEventHandler()); - if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new TabRegistry()); + if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new TabManager()); MinecraftForge.ORE_GEN_BUS.register(new WorldEventHandler()); } diff --git a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java index 9e29105..d035da6 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java +++ b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java @@ -15,8 +15,8 @@ import org.lwjgl.opengl.GL12; import shift.sextiarysector.container.ContainerPlayerNext; -import shift.sextiarysector.gui.tab.InventoryTabSextiarysector; -import tconstruct.client.tabs.TabRegistry; +import shift.sextiarysector.gui.tab.InventoryTabEquipment; +import shift.sextiarysector.gui.tab.TabManager; public class GuiInventoryNext extends InventoryEffectRenderer { @@ -67,8 +67,8 @@ public void initGui() int cornerY = this.guiTop; - TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabSextiarysector.class); - TabRegistry.addTabsToList(this.buttonList); + TabManager.updateTabValues(cornerX, cornerY,this.buttonList, InventoryTabEquipment.class,false); + //TabRegistry.addTabsToList(this.buttonList); } diff --git a/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java b/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java index a534cba..c4d6218 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java +++ b/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java @@ -1,13 +1,16 @@ package shift.sextiarysector.gui.tab; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +@SideOnly(Side.CLIENT) public abstract class AbstractTab { + public abstract void onTabClicked (); - @SideOnly(Side.CLIENT) - public abstract boolean shouldAddToList(EntityPlayer player); + public abstract ItemStack getItemStack(); + + public abstract boolean shouldAddToList(); } diff --git a/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java b/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java new file mode 100644 index 0000000..2aca5d8 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java @@ -0,0 +1,35 @@ +package shift.sextiarysector.gui.tab; + +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; + +public class GuiBackButton extends GuiButton{ + + private int cornerX; + private int cornerY; + private List buttonList; + + public GuiBackButton(int p_i1021_1_, int p_i1021_2_, int p_i1021_3_,int p_i1021_4_, int p_i1021_5_, int x, int y, List buttonList) { + super(p_i1021_1_, p_i1021_2_, p_i1021_3_, p_i1021_4_, p_i1021_5_, "<"); + this.cornerX = x; + this.cornerY = y; + this.buttonList = buttonList; + } + + + @Override + public boolean mousePressed (Minecraft mc, int mouseX, int mouseY) + { + boolean inWindow = this.enabled && this.visible && mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; + + if (inWindow && (TabManager.getSelectPage()>1)) + { + TabManager.setSelectPage(TabManager.getSelectPage()-1); + TabManager.updateTabValues(cornerX, cornerY, buttonList, TabManager.getSelectedButton().getClass(),true); + } + + return inWindow; + } +} diff --git a/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java b/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java new file mode 100644 index 0000000..7daffe2 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java @@ -0,0 +1,35 @@ +package shift.sextiarysector.gui.tab; + +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; + +public class GuiNextButton extends GuiButton{ + + private int cornerX; + private int cornerY; + private List buttonList; + + public GuiNextButton(int p_i1021_1_, int p_i1021_2_, int p_i1021_3_,int p_i1021_4_, int p_i1021_5_, int x, int y, List buttonList) { + super(p_i1021_1_, p_i1021_2_, p_i1021_3_, p_i1021_4_, p_i1021_5_, ">"); + this.cornerX = x; + this.cornerY = y; + this.buttonList = buttonList; + } + + + @Override + public boolean mousePressed (Minecraft mc, int mouseX, int mouseY) + { + boolean inWindow = this.enabled && this.visible && mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; + + if (inWindow && (TabManager.getSelectPage() tabList = new ArrayList(); + //private static ArrayList tabList = new ArrayList(); + private static HashMap tabMap = new HashMap(); + private static int tabSize = 0; + + private static Minecraft mc = FMLClientHandler.instance().getClient(); + private static EntityPlayer getPlayer(){ + return FMLClientHandler.instance().getClient().thePlayer; + } + + private static final String Select_Page = "selectpage"; + private static final String Selected_Button = "selectedbutton"; public static void registerTab (AbstractTab tab) { - tabList.add(tab); + tabMap.put(tabSize, tab); + tabSize++; } public static int getTabNumber(AbstractTab tab){ - for(int i = 0;i selectedButton, boolean reset) + { + + + + if(reset){ + + GuiButton[] r = (GuiButton[]) buttonList.toArray(new GuiButton[0]); + + buttonList.clear(); + + for(int i=0;i tabs = getTabListFromPage(pCount); + System.out.println("AAAAA"+tabs.size()+ " : " + buttonList.size()); + + TabButton buttonV = new TabButton(tabMap.get(0)); + buttonV.id = 2; + buttonV.xPosition = cornerX ; + buttonV.yPosition = cornerY - 28; + buttonV.enabled = !InventoryTabVanilla.class.equals(selectedButton); + buttonList.add(buttonV); + + + for (int i = 0; i < tabs.size(); i++) + { + AbstractTab t = tabs.get(i); + + if (t.shouldAddToList()) + { + TabButton button = new TabButton(t); + button.id = count; + button.xPosition = cornerX + 32 + (count - 3) * 29; + button.yPosition = cornerY - 28; + button.enabled = !t.getClass().equals(selectedButton); + buttonList.add(button); + count++; + } + } + + int xSize = 176; + int ySize = 166; + int tabCount = getUpdateTab().size(); + if (tabCount > 5) + { + buttonList.add(new GuiBackButton(8, cornerX -24 , cornerY - 22, 20, 20,cornerX,cornerY,buttonList)); + buttonList.add(new GuiNextButton(9, cornerX + xSize - 20 + 24, cornerY - 22, 20, 20,cornerX,cornerY,buttonList)); + } + + setSelectedButton(selectedButton); + + } + + private static void setSelectedButton(Class selectedButton){ + + for (int i = 0; i < tabMap.size(); i++) + { + if(tabMap.get(i).getClass().equals(selectedButton)){ + getPlayer().getEntityData().setInteger(Selected_Button, i); + return; + } + } + + } + + public static AbstractTab getSelectedButton(){ + return tabMap.get(getPlayer().getEntityData().getInteger(Selected_Button)); + } + + private static ArrayList getTabListFromPage(int i){ + + ArrayList tabs = new ArrayList(); + ArrayList naw = getUpdateTab(); + int j = i - 1; + + if(i>getPageSize()){ + setSelectPage(1); + j = 0; + } + + for(int k=j*5; k getUpdateTab() + { + ArrayList tabs = new ArrayList(); + + for (int i = 1; i < tabMap.size(); i++) + { + AbstractTab t = tabMap.get(i); + if (t.shouldAddToList()) + { + tabs.add(t); + } + } + + return tabs; + + } + + public static int getPageSize(){ + ArrayList naw = getUpdateTab(); + + return naw.size()%5==0 ? naw.size()/5 :(naw.size()/5) + 1; + } + + public static int getSelectPage() + { + int i = getPlayer().getEntityData().getInteger(Select_Page); + if(i==0){ + setSelectPage(1); + return 1; + } + + return i; + } + + public static void setSelectPage(int i){ + getPlayer().getEntityData().setInteger(Select_Page, i); + } + + public static void openInventoryGui () + { + mc.thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow(mc.thePlayer.openContainer.windowId)); + GuiInventory inventory = new GuiInventory(mc.thePlayer); + mc.displayGuiScreen(inventory); + } + + /* @SideOnly(Side.CLIENT) public static void updateTab(EntityPlayer player) { @@ -107,11 +286,11 @@ public static boolean isNextPage(EntityPlayer player){ boolean f = false; - /*if(i.length>EntityPlayerManager.getCustomPlayerData(player).getSelectPage()+1){ + if(i.length>EntityPlayerManager.getCustomPlayerData(player).getSelectPage()+1){ f = true; }else{ EntityPlayerManager.getCustomPlayerData(player).setSelectPage(i.length-1);; - }*/ + } return f; } @@ -122,14 +301,14 @@ public static boolean isBackPage(EntityPlayer player){ boolean f = false; - /*if(EntityPlayerManager.getCustomPlayerData(player).getSelectPage()>0){ + if(EntityPlayerManager.getCustomPlayerData(player).getSelectPage()>0){ f = true; }else if(EntityPlayerManager.getCustomPlayerData(player).getSelectPage()<0){ EntityPlayerManager.getCustomPlayerData(player).setSelectPage(0); - }*/ + } return f; - } + }*/ } diff --git a/src/main/java/shift/sextiarysector/packet/MessageGuiId.java b/src/main/java/shift/sextiarysector/packet/MessageGuiId.java index be6880f..0c450c5 100644 --- a/src/main/java/shift/sextiarysector/packet/MessageGuiId.java +++ b/src/main/java/shift/sextiarysector/packet/MessageGuiId.java @@ -17,7 +17,7 @@ public IMessage onMessage(PacketGuiId message, MessageContext ctx) { //data.loadNBTData(message.getData()); - System.out.println("AAAAA" + message.getData().getInteger("gui")); + //System.out.println("AAAAA" + message.getData().getInteger("gui")); int i = message.getData().getInteger("gui"); diff --git a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java index c933c20..83a8457 100644 --- a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java +++ b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java @@ -1,13 +1,18 @@ package shift.sextiarysector.player; +import java.util.ArrayList; + import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.IExtendedEntityProperties; +import shift.sextiarysector.gui.tab.AbstractTab; import shift.sextiarysector.packet.PacketHandler; import shift.sextiarysector.packet.PacketPlayerData; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class CustomPlayerData implements IExtendedEntityProperties{ @@ -20,8 +25,8 @@ public class CustomPlayerData implements IExtendedEntityProperties{ /**装備**/ private EquipmentStats equipment; - //@SideOnly(Side.CLIENT) - //private TabStats tab; + @SideOnly(Side.CLIENT) + private TabStats tab; public void onUpdateEntity(EntityPlayer entityPlayer) { @@ -68,6 +73,8 @@ public void init(Entity entity, World world) { this.equipment = new EquipmentStats((EntityPlayer) entity); + this.tab = new TabStats(); + } public MoistureStats getMoisture() { @@ -90,7 +97,7 @@ public EquipmentStats getEquipmentStats(){ return equipment; } - /* + @SideOnly(Side.CLIENT) public void setTabList(ArrayList tabList){ tab.setTabList(tabList); @@ -107,6 +114,6 @@ public void setSelectPage(int i){ public int getSelectPage(){ return tab.selectPage; - }*/ + } } diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 5079a01..9abda77 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -5,7 +5,9 @@ import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; import shift.mceconomy2.packet.PacketHandler; -import shift.sextiarysector.gui.tab.InventoryTabSextiarysector; +import shift.sextiarysector.gui.tab.InventoryTabEquipment; +import shift.sextiarysector.gui.tab.InventoryTabVanilla; +import shift.sextiarysector.gui.tab.TabManager; import shift.sextiarysector.packet.PacketGuiId; import shift.sextiarysector.renderer.block.RendererBlockBottle; import shift.sextiarysector.renderer.block.RendererChest; @@ -26,11 +28,8 @@ import shift.sextiarysector.tileentity.TileEntityShaft; import shift.sextiarysector.tileentity.TileEntitySmallWindmill; import shift.sextiarysector.tileentity.TileEntityWindmill; -import tconstruct.client.tabs.InventoryTabVanilla; -import tconstruct.client.tabs.TabRegistry; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -118,12 +117,30 @@ public void openGUI(int id){ public void registerInventoryTabs() { + /* if (!Loader.isModLoaded("TConstruct") || TabRegistry.getTabList().size() < 3) { TabRegistry.registerTab(new InventoryTabVanilla()); } TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + */ + + TabManager.registerTab(new InventoryTabVanilla()); + TabManager.registerTab(new InventoryTabEquipment()); + TabManager.registerTab(new InventoryTabEquipment()); + TabManager.registerTab(new InventoryTabEquipment()); + TabManager.registerTab(new InventoryTabEquipment()); + TabManager.registerTab(new InventoryTabEquipment()); + TabManager.registerTab(new InventoryTabEquipment()); + TabManager.registerTab(new InventoryTabEquipment()); + } } From 2a21e91ddc30bd1ce9087f0e2b098e98a6d6fa3c Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 22 Nov 2014 17:35:33 +0900 Subject: [PATCH 30/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E8=A3=85?= =?UTF-8?q?=E5=82=99=E3=82=B9=E3=83=AD=E3=83=83=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・追加装備GUIの完成 ・GUIを開くパケットを修正 --- .../shift/sextiarysector/SSGuiHandler.java | 4 +- .../shift/sextiarysector/SextiarySector.java | 4 +- .../shift/sextiarysector/api/IEquipment.java | 13 ++ .../container/ContainerPlayerNext.java | 133 +++++++++++++--- .../container/InventoryPlayerNext.java | 20 +++ .../sextiarysector/container/ItemBox.java | 2 +- .../container/SlotEquipment.java | 46 ++++++ .../event/ClientEventHandler.java | 5 + .../sextiarysector/gui/GuiInventoryNext.java | 13 +- .../sextiarysector/gui/tab/AbstractTab.java | 6 +- .../sextiarysector/gui/tab/GuiBackButton.java | 2 +- .../sextiarysector/gui/tab/GuiNextButton.java | 2 +- .../gui/tab/InventoryTabEquipment.java | 10 ++ .../gui/tab/InventoryTabSS.java | 35 +++++ .../gui/tab/InventoryTabSextiarysector.java | 31 ---- .../gui/tab/InventoryTabVanilla.java | 5 + .../sextiarysector/gui/tab/TabButton.java | 114 +++++++++++++- .../shift/sextiarysector/gui/tab/TabList.java | 8 - .../sextiarysector/gui/tab/TabManager.java | 148 ++++-------------- .../sextiarysector/packet/MessageGuiId.java | 4 +- ...acketHandler.java => SSPacketHandler.java} | 3 +- .../player/CustomPlayerData.java | 43 +++-- .../player/EntityPlayerManager.java | 15 +- .../sextiarysector/player/EquipmentStats.java | 3 +- .../sextiarysector/player/EquipmentType.java | 37 +++++ .../shift/sextiarysector/player/TabStats.java | 21 --- .../sextiarysector/proxy/ClientProxy.java | 22 +-- .../sextiarysector/proxy/CommonProxy.java | 3 + .../assets/sextiarysector/lang/en_US.lang | 4 + .../textures/guis/inventory_next.png | Bin 11138 -> 10671 bytes .../textures/items/gui/slot_bag.png | Bin 0 -> 199 bytes .../textures/items/gui/slot_belt.png | Bin 0 -> 197 bytes .../textures/items/gui/slot_face.png | Bin 0 -> 203 bytes .../textures/items/gui/slot_hand.png | Bin 0 -> 182 bytes .../textures/items/gui/slot_necklace.png | Bin 0 -> 208 bytes .../textures/items/gui/slot_other.png | Bin 0 -> 174 bytes .../textures/items/gui/slot_ring.png | Bin 0 -> 234 bytes .../textures/items/gui/slot_unit.png | Bin 0 -> 176 bytes 38 files changed, 490 insertions(+), 266 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/api/IEquipment.java create mode 100644 src/main/java/shift/sextiarysector/container/SlotEquipment.java create mode 100644 src/main/java/shift/sextiarysector/gui/tab/InventoryTabSS.java delete mode 100644 src/main/java/shift/sextiarysector/gui/tab/InventoryTabSextiarysector.java delete mode 100644 src/main/java/shift/sextiarysector/gui/tab/TabList.java rename src/main/java/shift/sextiarysector/packet/{PacketHandler.java => SSPacketHandler.java} (96%) create mode 100644 src/main/java/shift/sextiarysector/player/EquipmentType.java delete mode 100644 src/main/java/shift/sextiarysector/player/TabStats.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_bag.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_belt.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_face.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_hand.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_necklace.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_other.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_ring.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_unit.png diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 77b323d..4c2043a 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -42,7 +42,7 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x return null; }*/ - + System.out.println("sss"); switch(ID){ case 0 : return new ContainerLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); @@ -97,7 +97,7 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x, int y, int z) { - + System.out.println("aaa"); switch(ID){ case 0 : return new GuiLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 11324c1..5682680 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -16,7 +16,7 @@ import shift.sextiarysector.module.ModuleAgriculture; import shift.sextiarysector.module.ModuleChunkLoader; import shift.sextiarysector.module.ModuleSeason; -import shift.sextiarysector.packet.PacketHandler; +import shift.sextiarysector.packet.SSPacketHandler; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.plugin.SSPlugins; import shift.sextiarysector.proxy.CommonProxy; @@ -54,7 +54,7 @@ public void preInit(FMLPreInitializationEvent event) Config.ConfigRead(event); - PacketHandler.init(event); + SSPacketHandler.init(event); SextiarySector.proxy.setCustomRenderers(); diff --git a/src/main/java/shift/sextiarysector/api/IEquipment.java b/src/main/java/shift/sextiarysector/api/IEquipment.java new file mode 100644 index 0000000..2cfb7d0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/IEquipment.java @@ -0,0 +1,13 @@ +package shift.sextiarysector.api; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.player.EquipmentType; + +public interface IEquipment { + + boolean canTakeStack(EquipmentType equipment,ItemStack stack, EntityPlayer player); + + boolean isItemValid(EquipmentType equipment, ItemStack stack); + +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java index 798b270..ae74bf3 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java @@ -7,7 +7,9 @@ import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import shift.sextiarysector.api.IEquipment; import shift.sextiarysector.player.EntityPlayerManager; +import shift.sextiarysector.player.EquipmentType; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -23,6 +25,7 @@ public ContainerPlayerNext(InventoryPlayer par1InventoryPlayer,EntityPlayer p_i1 this.player = p_i1819_3_; this.equipment = EntityPlayerManager.getEquipmentStats(p_i1819_3_).inventory; + /* int c = 0 ; for(int i = 0;i<5;i++){ @@ -31,12 +34,14 @@ public ContainerPlayerNext(InventoryPlayer par1InventoryPlayer,EntityPlayer p_i1 c++; } - } + }*/ //バニラ + int i; + //0 for (i = 0; i < 4; ++i) { final int k = i; @@ -70,7 +75,13 @@ public IIcon getBackgroundIconIndex() }); } + //4 + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142)); + } + //13 for (i = 0; i < 3; ++i) { for (int j = 0; j < 9; ++j) @@ -79,10 +90,37 @@ public IIcon getBackgroundIconIndex() } } - for (i = 0; i < 9; ++i) - { - this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142)); - } + + //40 + + this.addSlotToContainer(new SlotEquipment(EquipmentType.Necklace, this.equipment, 0, 80 + 0 * 18, 8 + 0 * 18)); + + this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 1, 80 + 0 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 2, 80 + 0 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 3, 80 + 0 * 18, 8 + 3 * 18)); + + this.addSlotToContainer(new SlotEquipment(EquipmentType.Face, this.equipment, 4, 80 + 1 * 18, 8 + 0 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Bag, this.equipment, 5, 80 + 1 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Hand, this.equipment, 6, 80 + 1 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Belt, this.equipment, 7, 80 + 1 * 18, 8 + 3 * 18)); + + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 8, 80 + 2 * 18, 8 + 0 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 9, 80 + 2 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 10, 80 + 2 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 11, 80 + 2 * 18, 8 + 3 * 18)); + + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 12, 80 + 3 * 18, 8 + 0 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 13, 80 + 3 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 14, 80 + 3 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 15, 80 + 3 * 18, 8 + 3 * 18)); + + this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 16, 80 + 4 * 18, 8 + 0 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 17, 80 + 4 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 18, 80 + 4 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 19, 80 + 4 * 18, 8 + 3 * 18)); + + + System.out.println("AAAA : "+this.inventorySlots.size()); } @Override @@ -90,6 +128,12 @@ public boolean canInteractWith(EntityPlayer p_75145_1_) { return true; } + /* + public ItemStack slotClick(int p_75144_1_, int p_75144_2_, int p_75144_3_, EntityPlayer p_75144_4_) + { + return super.slotClick(p_75144_1_, p_75144_2_, p_75144_3_, p_75144_4_); + }*/ + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { ItemStack itemstack = null; @@ -100,53 +144,102 @@ public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); - if (p_82846_2_ == 0) + if (itemstack.getItem() instanceof ItemArmor && !((Slot)this.inventorySlots.get(5 + ((ItemArmor)itemstack.getItem()).armorType)).getHasStack()) + { + int j = 0 + ((ItemArmor)itemstack.getItem()).armorType; + + if (!this.mergeItemStack(itemstack1, j, j + 1, false)) + { + return null; + } + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Necklace, itemstack)) + { + + if (!this.mergeItemStack(itemstack1,40,41, false)) + { + return null; + } + + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Ring, itemstack)) { - if (!this.mergeItemStack(itemstack1, 9, 45, true)) + + if (!this.mergeItemStack(itemstack1,41,44, false)) { return null; } - slot.onSlotChange(itemstack1, itemstack); } - else if (p_82846_2_ >= 1 && p_82846_2_ < 5) + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Face, itemstack)) { - if (!this.mergeItemStack(itemstack1, 9, 45, false)) + + if (!this.mergeItemStack(itemstack1,44,45, false)) { return null; } + } - else if (p_82846_2_ >= 5 && p_82846_2_ < 9) + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Bag, itemstack)) { - if (!this.mergeItemStack(itemstack1, 9, 45, false)) + + if (!this.mergeItemStack(itemstack1,45,46, false)) { return null; } + } - else if (itemstack.getItem() instanceof ItemArmor && !((Slot)this.inventorySlots.get(5 + ((ItemArmor)itemstack.getItem()).armorType)).getHasStack()) + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Hand, itemstack)) { - int j = 5 + ((ItemArmor)itemstack.getItem()).armorType; - if (!this.mergeItemStack(itemstack1, j, j + 1, false)) + if (!this.mergeItemStack(itemstack1,46,47, false)) + { + return null; + } + + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Belt, itemstack)) + { + + if (!this.mergeItemStack(itemstack1,47,48, false)) { return null; } + + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Unit, itemstack)) + { + + if (!this.mergeItemStack(itemstack1,48,56, false)) + { + return null; + } + + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Other, itemstack)) + { + + if (!this.mergeItemStack(itemstack1,56,60, false)) + { + return null; + } + } - else if (p_82846_2_ >= 9 && p_82846_2_ < 36) + else if (p_82846_2_ >= 4 && p_82846_2_ < 13) { - if (!this.mergeItemStack(itemstack1, 36, 45, false)) + if (!this.mergeItemStack(itemstack1, 13, 40, false)) { return null; } } - else if (p_82846_2_ >= 36 && p_82846_2_ < 45) + else if (p_82846_2_ >= 13 && p_82846_2_ < 40) { - if (!this.mergeItemStack(itemstack1, 9, 36, false)) + if (!this.mergeItemStack(itemstack1, 4, 13, false)) { return null; } } - else if (!this.mergeItemStack(itemstack1, 9, 45, false)) + else if (!this.mergeItemStack(itemstack1, 13, 40, false)) { return null; } diff --git a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java index 148deb4..fc25e1e 100644 --- a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java @@ -9,6 +9,11 @@ public class InventoryPlayerNext implements IInventory{ ItemBox items = new ItemBox("Base", 20); + private EntityPlayer player; + + public InventoryPlayerNext(EntityPlayer player) { + this.player = player; + } @Override public int getSizeInventory() { @@ -76,6 +81,21 @@ public boolean isItemValidForSlot(int i, ItemStack itemstack) { return true; } + public void dropAllItems() + { + int i; + + for (i = 0; i < this.items.getSizeInventory(); ++i) + { + if (this.items.getStackInSlot(i) != null) + { + this.player.func_146097_a(this.items.getStackInSlot(i), true, false); + this.items.setInventorySlotContents(i, null); + } + } + + } + //NBT public NBTTagCompound writeToNBT(NBTTagCompound nbt) { diff --git a/src/main/java/shift/sextiarysector/container/ItemBox.java b/src/main/java/shift/sextiarysector/container/ItemBox.java index d49a897..335c611 100644 --- a/src/main/java/shift/sextiarysector/container/ItemBox.java +++ b/src/main/java/shift/sextiarysector/container/ItemBox.java @@ -12,7 +12,7 @@ public class ItemBox{ public ItemBox(String name,int size){ - this(name,size,64); + this(name,size,0); } diff --git a/src/main/java/shift/sextiarysector/container/SlotEquipment.java b/src/main/java/shift/sextiarysector/container/SlotEquipment.java new file mode 100644 index 0000000..97d7043 --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/SlotEquipment.java @@ -0,0 +1,46 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import shift.sextiarysector.api.IEquipment; +import shift.sextiarysector.player.EquipmentType; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class SlotEquipment extends Slot{ + + private EquipmentType equipment; + + public SlotEquipment(EquipmentType type,IInventory p_i1824_1_, int p_i1824_2_, int x,int y) { + super(p_i1824_1_, p_i1824_2_, x, y); + equipment = type; + } + + @Override + public boolean isItemValid(ItemStack stack) { + + return stack.getItem() instanceof IEquipment &&((IEquipment)stack.getItem()).isItemValid(this.equipment, stack); + + } + + @Override + public boolean canTakeStack(EntityPlayer player) { + + return this.getStack()!=null && ((IEquipment)this.getStack().getItem()).canTakeStack(equipment, this.getStack(), player); + } + + @Override + public int getSlotStackLimit() + { + return 1; + } + + @SideOnly(Side.CLIENT) + public IIcon getBackgroundIconIndex() + { + return equipment.getIcon(); + } +} diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 7083633..0ea5454 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -23,6 +23,7 @@ import shift.sextiarysector.item.TextureSeason; import shift.sextiarysector.module.FertilizerManager; import shift.sextiarysector.module.SeasonManager; +import shift.sextiarysector.player.EquipmentType; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; @@ -103,6 +104,10 @@ public void PreTextureStitchEvent(TextureStitchEvent.Pre event){ itemGF[0] = event.map.registerIcon("sextiarysector:damage/damage_0"); itemGF[1] = event.map.registerIcon("sextiarysector:damage/damage_1"); + for(EquipmentType type :EquipmentType.values()){ + type.registerIcon(event.map); + } + }else{ waterFlow = event.map.registerIcon("sextiarysector:fluid/water_flow"); diff --git a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java index d035da6..5011109 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java +++ b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java @@ -14,8 +14,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import shift.sextiarysector.SextiarySector; import shift.sextiarysector.container.ContainerPlayerNext; -import shift.sextiarysector.gui.tab.InventoryTabEquipment; import shift.sextiarysector.gui.tab.TabManager; public class GuiInventoryNext extends InventoryEffectRenderer @@ -53,22 +53,13 @@ public void initGui() { this.buttonList.clear(); - /* - if (this.mc.playerController.isInCreativeMode()) - { - this.mc.displayGuiScreen(new GuiContainerCreative(this.mc.thePlayer)); - } - else - {*/ super.initGui(); - //} int cornerX = this.guiLeft; int cornerY = this.guiTop; - TabManager.updateTabValues(cornerX, cornerY,this.buttonList, InventoryTabEquipment.class,false); - //TabRegistry.addTabsToList(this.buttonList); + TabManager.updateTabValues(cornerX, cornerY,this.buttonList, SextiarySector.proxy.ss,false); } diff --git a/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java b/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java index c4d6218..ff8f0fb 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java +++ b/src/main/java/shift/sextiarysector/gui/tab/AbstractTab.java @@ -4,13 +4,17 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -@SideOnly(Side.CLIENT) public abstract class AbstractTab { + @SideOnly(Side.CLIENT) public abstract void onTabClicked (); public abstract ItemStack getItemStack(); + @SideOnly(Side.CLIENT) + public abstract String getTabName(); + + @SideOnly(Side.CLIENT) public abstract boolean shouldAddToList(); } diff --git a/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java b/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java index 2aca5d8..805d9ed 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java +++ b/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java @@ -27,7 +27,7 @@ public boolean mousePressed (Minecraft mc, int mouseX, int mouseY) if (inWindow && (TabManager.getSelectPage()>1)) { TabManager.setSelectPage(TabManager.getSelectPage()-1); - TabManager.updateTabValues(cornerX, cornerY, buttonList, TabManager.getSelectedButton().getClass(),true); + TabManager.updateTabValues(cornerX, cornerY, buttonList, TabManager.getSelectedButton(),true); } return inWindow; diff --git a/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java b/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java index 7daffe2..bad3da0 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java +++ b/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java @@ -27,7 +27,7 @@ public boolean mousePressed (Minecraft mc, int mouseX, int mouseY) if (inWindow && (TabManager.getSelectPage()= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; + //int k = this.getHoverState(this.field_146123_n); + + if(this.field_146123_n){ + //this.drawCenteredString(mc.fontRenderer, I18n.format(this.tab.getTabName()), mouseX, mouseY, 0xffffff); + List name = new ArrayList(); + name.add(I18n.format(this.tab.getTabName())); + this.drawHoveringText(name, mouseX, mouseY, mc.fontRenderer, mc.currentScreen); + //((GuiContainer)mc.currentScreen).drawHoveringText(name, mouseX + 20, mouseY + 5, mc.fontRenderer); + } + + GL11.glDisable(GL11.GL_DEPTH_TEST); + + } + } + + protected void drawHoveringText(List p_146283_1_, int p_146283_2_, int p_146283_3_, FontRenderer font , GuiScreen gui) + { + if (!p_146283_1_.isEmpty()) + { + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + //RenderHelper.disableStandardItemLighting(); + //GL11.glDisable(GL11.GL_LIGHTING); + //GL11.glDisable(GL11.GL_DEPTH_TEST); + int k = 0; + Iterator iterator = p_146283_1_.iterator(); + + while (iterator.hasNext()) + { + String s = (String)iterator.next(); + int l = font.getStringWidth(s); + + if (l > k) + { + k = l; + } + } + + int j2 = p_146283_2_ + 12; + int k2 = p_146283_3_ - 12; + int i1 = 8; + + if (p_146283_1_.size() > 1) + { + i1 += 2 + (p_146283_1_.size() - 1) * 10; + } + + if (j2 + k > gui.width) + { + j2 -= 28 + k; + } + + if (k2 + i1 + 6 > this.height + 25) + { + k2 = this.height + 25 - i1 - 6; + } + + this.zLevel = 300.0F; + itemRenderer.zLevel = 300.0F; + int j1 = -267386864; + this.drawGradientRect(j2 - 3, k2 - 4, j2 + k + 3, k2 - 3, j1, j1); + this.drawGradientRect(j2 - 3, k2 + i1 + 3, j2 + k + 3, k2 + i1 + 4, j1, j1); + this.drawGradientRect(j2 - 3, k2 - 3, j2 + k + 3, k2 + i1 + 3, j1, j1); + this.drawGradientRect(j2 - 4, k2 - 3, j2 - 3, k2 + i1 + 3, j1, j1); + this.drawGradientRect(j2 + k + 3, k2 - 3, j2 + k + 4, k2 + i1 + 3, j1, j1); + int k1 = 1347420415; + int l1 = (k1 & 16711422) >> 1 | k1 & -16777216; + this.drawGradientRect(j2 - 3, k2 - 3 + 1, j2 - 3 + 1, k2 + i1 + 3 - 1, k1, l1); + this.drawGradientRect(j2 + k + 2, k2 - 3 + 1, j2 + k + 3, k2 + i1 + 3 - 1, k1, l1); + this.drawGradientRect(j2 - 3, k2 - 3, j2 + k + 3, k2 - 3 + 1, k1, k1); + this.drawGradientRect(j2 - 3, k2 + i1 + 2, j2 + k + 3, k2 + i1 + 3, l1, l1); + + GL11.glDisable(GL11.GL_DEPTH_TEST); + for (int i2 = 0; i2 < p_146283_1_.size(); ++i2) + { + String s1 = (String)p_146283_1_.get(i2); + font.drawStringWithShadow(s1, j2, k2, -1); + + if (i2 == 0) + { + k2 += 2; + } + + k2 += 10; + } + GL11.glEnable(GL11.GL_DEPTH_TEST); + + this.zLevel = 0.0F; + itemRenderer.zLevel = 0.0F; + //GL11.glEnable(GL11.GL_LIGHTING); + //GL11.glEnable(GL11.GL_DEPTH_TEST); + //RenderHelper.enableStandardItemLighting(); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); } } @@ -59,6 +168,7 @@ public boolean mousePressed (Minecraft mc, int mouseX, int mouseY) if (inWindow) { + //mc.thePlayer.openContainer = null; this.tab.onTabClicked(); } diff --git a/src/main/java/shift/sextiarysector/gui/tab/TabList.java b/src/main/java/shift/sextiarysector/gui/tab/TabList.java deleted file mode 100644 index 253fbf8..0000000 --- a/src/main/java/shift/sextiarysector/gui/tab/TabList.java +++ /dev/null @@ -1,8 +0,0 @@ -package shift.sextiarysector.gui.tab; - -public class TabList { - - private int pageSize = 0; - private int tabSize = 0; - -} diff --git a/src/main/java/shift/sextiarysector/gui/tab/TabManager.java b/src/main/java/shift/sextiarysector/gui/tab/TabManager.java index bd398f6..2189463 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/TabManager.java +++ b/src/main/java/shift/sextiarysector/gui/tab/TabManager.java @@ -17,7 +17,6 @@ public class TabManager { - //private static ArrayList tabList = new ArrayList(); private static HashMap tabMap = new HashMap(); private static int tabSize = 0; @@ -29,8 +28,22 @@ private static EntityPlayer getPlayer(){ private static final String Select_Page = "selectpage"; private static final String Selected_Button = "selectedbutton"; + private static boolean init; + private static AbstractTab vanilla; + + public static void initTabManager(){ + + if(!init){ + init = true; + vanilla = new InventoryTabVanilla(); + registerTab(vanilla); + } + + } + public static void registerTab (AbstractTab tab) { + if(!init)initTabManager(); tabMap.put(tabSize, tab); tabSize++; } @@ -58,16 +71,14 @@ public void guiPostInit (GuiScreenEvent.InitGuiEvent.Post event) int guiLeft = (event.gui.width - xSize) / 2; int guiTop = (event.gui.height - ySize) / 2; - updateTabValues(guiLeft, guiTop,event.buttonList, InventoryTabVanilla.class,false); - //addTabsToList(event.buttonList); + updateTabValues(guiLeft, guiTop,event.buttonList, vanilla,false); + } } - public static void updateTabValues (int cornerX, int cornerY,List buttonList, Class selectedButton, boolean reset) + public static void updateTabValues (int cornerX, int cornerY,List buttonList, AbstractTab selectedButton, boolean reset) { - - if(reset){ GuiButton[] r = (GuiButton[]) buttonList.toArray(new GuiButton[0]); @@ -84,13 +95,12 @@ public static void updateTabValues (int cornerX, int cornerY,List buttonList, Cl int count = 3; int pCount = getSelectPage(); ArrayList tabs = getTabListFromPage(pCount); - System.out.println("AAAAA"+tabs.size()+ " : " + buttonList.size()); TabButton buttonV = new TabButton(tabMap.get(0)); buttonV.id = 2; buttonV.xPosition = cornerX ; buttonV.yPosition = cornerY - 28; - buttonV.enabled = !InventoryTabVanilla.class.equals(selectedButton); + buttonV.enabled = !tabMap.get(0).equals(selectedButton); buttonList.add(buttonV); @@ -104,7 +114,7 @@ public static void updateTabValues (int cornerX, int cornerY,List buttonList, Cl button.id = count; button.xPosition = cornerX + 32 + (count - 3) * 29; button.yPosition = cornerY - 28; - button.enabled = !t.getClass().equals(selectedButton); + button.enabled = !t.equals(selectedButton); buttonList.add(button); count++; } @@ -123,11 +133,12 @@ public static void updateTabValues (int cornerX, int cornerY,List buttonList, Cl } - private static void setSelectedButton(Class selectedButton){ + @SideOnly(Side.CLIENT) + private static void setSelectedButton(AbstractTab selectedButton){ for (int i = 0; i < tabMap.size(); i++) { - if(tabMap.get(i).getClass().equals(selectedButton)){ + if(tabMap.get(i).equals(selectedButton)){ getPlayer().getEntityData().setInteger(Selected_Button, i); return; } @@ -135,14 +146,16 @@ private static void setSelectedButton(Class selectedButto } + @SideOnly(Side.CLIENT) public static AbstractTab getSelectedButton(){ return tabMap.get(getPlayer().getEntityData().getInteger(Selected_Button)); } + @SideOnly(Side.CLIENT) private static ArrayList getTabListFromPage(int i){ ArrayList tabs = new ArrayList(); - ArrayList naw = getUpdateTab(); + ArrayList now = getUpdateTab(); int j = i - 1; if(i>getPageSize()){ @@ -150,8 +163,8 @@ private static ArrayList getTabListFromPage(int i){ j = 0; } - for(int k=j*5; k tabs = new ArrayList(); - - for (int i = 1; i < tabList.size(); i++) - { - AbstractTab t = tabList.get(i); - if (t.shouldAddToList(player)) - { - tabs.add(t); - } - } - - //EntityPlayerManager.getCustomPlayerData(player).setTabList(tabs); - - } - - - public static void updateTabValues (EntityPlayer player,int cornerX, int cornerY, Class selectedButton) - { - int count = 2; - AbstractTab[] tabs = getTabList(player)[getPageNumber(player,selectedButton)]; - for (int i = 0; tabs[i]!=null; i++) - { - AbstractTab t = tabList.get(i); - - //t.id = count; - //t.xPosition = cornerX + (count - 2) * 28; - // t.yPosition = cornerY - 28; - //t.enabled = !t.getClass().equals(selectedButton); - //count++; - - - } - - } - - @SideOnly(Side.CLIENT) - private static AbstractTab[][] getTabList(EntityPlayer player){ - - updateTab(player); - - ArrayList tabList = null;//EntityPlayerManager.getCustomPlayerData(player).getTabList(); - int p = tabList.size()%5==0 ? 0 : 1; - AbstractTab[][] tabs = new AbstractTab[(tabList.size()/5)+p][5]; - - int page=0; - for(int i = 0;i selectedButton){ - - AbstractTab[][] tabs = getTabList(player); - for(int i = 0;iEntityPlayerManager.getCustomPlayerData(player).getSelectPage()+1){ - f = true; - }else{ - EntityPlayerManager.getCustomPlayerData(player).setSelectPage(i.length-1);; - } - - return f; - } - - public static boolean isBackPage(EntityPlayer player){ - - AbstractTab[][] i = getTabList(player); - - boolean f = false; - - if(EntityPlayerManager.getCustomPlayerData(player).getSelectPage()>0){ - f = true; - }else if(EntityPlayerManager.getCustomPlayerData(player).getSelectPage()<0){ - EntityPlayerManager.getCustomPlayerData(player).setSelectPage(0); - } - - return f; - }*/ - - } diff --git a/src/main/java/shift/sextiarysector/packet/MessageGuiId.java b/src/main/java/shift/sextiarysector/packet/MessageGuiId.java index 0c450c5..018e0c8 100644 --- a/src/main/java/shift/sextiarysector/packet/MessageGuiId.java +++ b/src/main/java/shift/sextiarysector/packet/MessageGuiId.java @@ -1,6 +1,6 @@ package shift.sextiarysector.packet; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import shift.sextiarysector.SextiarySector; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; @@ -11,7 +11,7 @@ public class MessageGuiId implements IMessageHandler{ @Override public IMessage onMessage(PacketGuiId message, MessageContext ctx) { - EntityPlayer p = ctx.getServerHandler().playerEntity; + EntityPlayerMP p = ctx.getServerHandler().playerEntity; //CustomPlayerData data = EntityPlayerManager.getCustomPlayerData(p); diff --git a/src/main/java/shift/sextiarysector/packet/PacketHandler.java b/src/main/java/shift/sextiarysector/packet/SSPacketHandler.java similarity index 96% rename from src/main/java/shift/sextiarysector/packet/PacketHandler.java rename to src/main/java/shift/sextiarysector/packet/SSPacketHandler.java index 99954ff..bfb887d 100644 --- a/src/main/java/shift/sextiarysector/packet/PacketHandler.java +++ b/src/main/java/shift/sextiarysector/packet/SSPacketHandler.java @@ -5,7 +5,7 @@ import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.relauncher.Side; -public class PacketHandler { +public class SSPacketHandler { public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("sextiarysector"); @@ -18,7 +18,6 @@ public static void init(FMLPreInitializationEvent event) { INSTANCE.registerMessage(MessageGuiId.class,PacketGuiId.class, 1, Side.SERVER); - } } diff --git a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java index 83a8457..41c87ba 100644 --- a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java +++ b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java @@ -1,18 +1,13 @@ package shift.sextiarysector.player; -import java.util.ArrayList; - import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.IExtendedEntityProperties; -import shift.sextiarysector.gui.tab.AbstractTab; -import shift.sextiarysector.packet.PacketHandler; +import shift.sextiarysector.packet.SSPacketHandler; import shift.sextiarysector.packet.PacketPlayerData; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class CustomPlayerData implements IExtendedEntityProperties{ @@ -25,14 +20,14 @@ public class CustomPlayerData implements IExtendedEntityProperties{ /**装備**/ private EquipmentStats equipment; - @SideOnly(Side.CLIENT) - private TabStats tab; + //@SideOnly(Side.CLIENT) + //private TabStats tab; public void onUpdateEntity(EntityPlayer entityPlayer) { if(moisture.isPacket()||stamina.isPacket()){ - PacketHandler.INSTANCE.sendTo(new PacketPlayerData(this), (EntityPlayerMP) entityPlayer); + SSPacketHandler.INSTANCE.sendTo(new PacketPlayerData(this), (EntityPlayerMP) entityPlayer); //.out.println("onUpdateEntity"); } //System.out.println("AAA"+this.moisture.getMoistureLevel()+" : "+this.stamina.getStaminaLevel()); @@ -73,7 +68,7 @@ public void init(Entity entity, World world) { this.equipment = new EquipmentStats((EntityPlayer) entity); - this.tab = new TabStats(); + //this.tab = new TabStats(); } @@ -98,22 +93,22 @@ public EquipmentStats getEquipmentStats(){ } - @SideOnly(Side.CLIENT) - public void setTabList(ArrayList tabList){ - tab.setTabList(tabList); - } + //@SideOnly(Side.CLIENT) + //public void setTabList(ArrayList tabList){ + // tab.setTabList(tabList); + //} - @SideOnly(Side.CLIENT) - public ArrayList getTabList(){ - return tab.getTabList(); - } + //@SideOnly(Side.CLIENT) + //public ArrayList getTabList(){ + // return tab.getTabList(); + //} - public void setSelectPage(int i){ - tab.selectPage = i; - } + //public void setSelectPage(int i){ + // tab.selectPage = i; + //} - public int getSelectPage(){ - return tab.selectPage; - } + ///public int getSelectPage(){ + // return tab.selectPage; + //} } diff --git a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java index f2807ac..2fa6053 100644 --- a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java +++ b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java @@ -5,8 +5,9 @@ import net.minecraftforge.event.entity.EntityEvent; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; +import net.minecraftforge.event.entity.player.PlayerDropsEvent; import shift.sextiarysector.api.IPlayerManager; -import shift.sextiarysector.packet.PacketHandler; +import shift.sextiarysector.packet.SSPacketHandler; import shift.sextiarysector.packet.PacketPlayerData; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent; @@ -155,6 +156,12 @@ public static void onUpdateEntity(EntityPlayer entityPlayer) } + @SubscribeEvent + public void onPlayerDropsEvent(PlayerDropsEvent event) + { + this.getCustomPlayerData(event.entityPlayer).getEquipmentStats().inventory.dropAllItems(); + } + private void oneton(){ @@ -353,7 +360,7 @@ public void onEntityJoinWorld(EntityJoinWorldEvent event) { if (!event.entity.worldObj.isRemote && event.entity instanceof EntityPlayer) { - PacketHandler.INSTANCE.sendTo(new PacketPlayerData(this.getCustomPlayerData((EntityPlayer) event.entity)), (EntityPlayerMP) event.entity); + SSPacketHandler.INSTANCE.sendTo(new PacketPlayerData(this.getCustomPlayerData((EntityPlayer) event.entity)), (EntityPlayerMP) event.entity); } } @@ -362,7 +369,7 @@ public void onEntityJoinWorld(EntityJoinWorldEvent event) { public void onPlayerChangedDimension(PlayerEvent.PlayerChangedDimensionEvent event) { //プレイヤーがディメンション間を移動したときの処理 - if(!event.player.worldObj.isRemote)PacketHandler.INSTANCE.sendTo(new PacketPlayerData(this.getCustomPlayerData(event.player)), (EntityPlayerMP) event.player); + if(!event.player.worldObj.isRemote)SSPacketHandler.INSTANCE.sendTo(new PacketPlayerData(this.getCustomPlayerData(event.player)), (EntityPlayerMP) event.player); } @@ -370,7 +377,7 @@ public void onPlayerChangedDimension(PlayerEvent.PlayerChangedDimensionEvent eve public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) { //プレイヤーがリスポーンした時の処理 //System.out.println("onPlayerRespawn"); - if(!event.player.worldObj.isRemote)PacketHandler.INSTANCE.sendTo(new PacketPlayerData(this.getCustomPlayerData(event.player)), (EntityPlayerMP) event.player); + if(!event.player.worldObj.isRemote)SSPacketHandler.INSTANCE.sendTo(new PacketPlayerData(this.getCustomPlayerData(event.player)), (EntityPlayerMP) event.player); } diff --git a/src/main/java/shift/sextiarysector/player/EquipmentStats.java b/src/main/java/shift/sextiarysector/player/EquipmentStats.java index 6fa4770..d6df024 100644 --- a/src/main/java/shift/sextiarysector/player/EquipmentStats.java +++ b/src/main/java/shift/sextiarysector/player/EquipmentStats.java @@ -13,7 +13,7 @@ public class EquipmentStats { public EquipmentStats(EntityPlayer player){ - inventory = new InventoryPlayerNext(); + inventory = new InventoryPlayerNext(player); } @@ -22,6 +22,7 @@ public void onUpdateEntity() } + public void writeNBT(NBTTagCompound compound) { NBTTagCompound nbt = new NBTTagCompound(); diff --git a/src/main/java/shift/sextiarysector/player/EquipmentType.java b/src/main/java/shift/sextiarysector/player/EquipmentType.java new file mode 100644 index 0000000..f4c02aa --- /dev/null +++ b/src/main/java/shift/sextiarysector/player/EquipmentType.java @@ -0,0 +1,37 @@ +package shift.sextiarysector.player; + +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; + +public enum EquipmentType { + + Necklace("necklace"), + Ring("ring"), + Face("face"), + Hand("hand"), + Bag("bag"), + Belt("belt"), + Unit("unit"), + Other("other") + ; + + private IIcon icon; + private String iconName; + + EquipmentType(String name){ + this.iconName = name; + } + + public void registerIcon(TextureMap map){ + this.setIcon(map.registerIcon("sextiarysector:gui/slot_"+this.iconName)); + } + + public IIcon getIcon() { + return icon; + } + + public void setIcon(IIcon icon) { + this.icon = icon; + } + +} diff --git a/src/main/java/shift/sextiarysector/player/TabStats.java b/src/main/java/shift/sextiarysector/player/TabStats.java deleted file mode 100644 index f128a92..0000000 --- a/src/main/java/shift/sextiarysector/player/TabStats.java +++ /dev/null @@ -1,21 +0,0 @@ -package shift.sextiarysector.player; - -import java.util.ArrayList; - -import shift.sextiarysector.gui.tab.AbstractTab; - -public class TabStats { - - ArrayList tabList = new ArrayList(); - - public int selectPage = 0; - - public void setTabList(ArrayList tabList){ - this.tabList = tabList; - } - - public ArrayList getTabList(){ - return this.tabList; - } - -} diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 9abda77..58fd536 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -5,8 +5,7 @@ import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; import shift.mceconomy2.packet.PacketHandler; -import shift.sextiarysector.gui.tab.InventoryTabEquipment; -import shift.sextiarysector.gui.tab.InventoryTabVanilla; +import shift.sextiarysector.gui.tab.InventoryTabSS; import shift.sextiarysector.gui.tab.TabManager; import shift.sextiarysector.packet.PacketGuiId; import shift.sextiarysector.renderer.block.RendererBlockBottle; @@ -36,6 +35,7 @@ public class ClientProxy extends CommonProxy{ + @Override public EntityPlayer getClientPlayer(){ return Minecraft.getMinecraft().thePlayer; @@ -131,15 +131,15 @@ public void registerInventoryTabs() TabRegistry.registerTab(new InventoryTabSextiarysector()); TabRegistry.registerTab(new InventoryTabSextiarysector()); */ - - TabManager.registerTab(new InventoryTabVanilla()); - TabManager.registerTab(new InventoryTabEquipment()); - TabManager.registerTab(new InventoryTabEquipment()); - TabManager.registerTab(new InventoryTabEquipment()); - TabManager.registerTab(new InventoryTabEquipment()); - TabManager.registerTab(new InventoryTabEquipment()); - TabManager.registerTab(new InventoryTabEquipment()); - TabManager.registerTab(new InventoryTabEquipment()); + TabManager.initTabManager(); + ss = new InventoryTabSS(); + TabManager.registerTab(ss); + //TabManager.registerTab(new InventoryTabEquipment()); + //TabManager.registerTab(new InventoryTabEquipment()); + //TabManager.registerTab(new InventoryTabEquipment()); + //TabManager.registerTab(new InventoryTabEquipment()); + //TabManager.registerTab(new InventoryTabEquipment()); + //TabManager.registerTab(new InventoryTabEquipment()); } diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 76b0299..82f4c78 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -2,6 +2,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; +import shift.sextiarysector.gui.tab.AbstractTab; public class CommonProxy { @@ -24,6 +25,8 @@ public class CommonProxy { public int farmlandType; + public AbstractTab ss; + public EntityPlayer getClientPlayer(){ return null; } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index db8a430..45fbb78 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -182,6 +182,10 @@ itemGroup.ss.agriculture=SextiarySector -Agriculture- itemGroup.ss.economy=SextiarySector -Economy- itemGroup.ss.magic=SextiarySector -Magic- +#Player Tab +player.tab.vanilla=Vanilla +player.tab.equipment=Equipment + #Achievement stat.sell=Sell diff --git a/src/main/resources/assets/sextiarysector/textures/guis/inventory_next.png b/src/main/resources/assets/sextiarysector/textures/guis/inventory_next.png index 6faef7987b8545e03f9b9d8d8b1d5c81f304f630..51d2ec19028baaee9d8ca416c4a22c1ad91ba834 100644 GIT binary patch delta 7635 zcmZWu1yodDx4$zC5)wlr5<^Kzi2)4Vs30gM(yer-+@S<%X_XE^kdST=kO7er1SDoa zx;ut^^Z(xa-uu>icddKZz31M$&+oVQKKtymPq2RZvx+oQkdA`%&QI;%iU7cRtga-l z<1@LL;qUXz^8>n#$MKhd#w4v>5XVR~MV+3RPO(B?V-y*}4&t0gQJ?!|FZ%j?nCsGe zUGH>x>kM;`-&8X!uC`;IKvYVf7Mn4tQ~~W5173tfUqMps&@ZlognY-qGgUXuC%>jA zVZ58i`%=EYz@_y4rF5*s_VMv0#y!xP%Y##{rzR-hs5&^+QC!Kpj`L=M5hq4iT|p3< zziqd2zF?S_pC3wP4^!l$giJJf3%>|Eun)XC!x8}Z9VP&F7-x_OCm<=yP75dy6Qb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kAs^np1LmH{7Y_W%1=OEVs-PTO#tH}7ifImD>RfbQSw)n zeNRM8mb5o#`^TvB0FW9;;s=QW2Z=wDs~LfzJUMl0_%FMm1tc2KyD#D;BI_{ zKNqf|um`rPeO4t<%6%wMmN-BcjZBDw8#(rJV*!$WoE`c-ZKE00hWqnol^;K|c2;v>&Z&^BeXize84BiSirM$? zb9k&=lknx?gWLkz&5}7(K7Xby+B^+w@Vkm$cWMx!x!zyzw(Xz%gz(~hd@?i>I@ z3fh}-ks6qczN>M|(fWfW`67qe>}0d1W4cerYUeK*07(hRaK(5Qy_W_{=q^ z?q2%#f~WuX*o9XIje`K7qHvv$u^gEt8}N=ppM!9+jKUBB^7Y(JMj*klYW8qOTcWnk zruSLW`Zk6KU6}jh7xwm(m|2imarR|AcDNR?a8?FMFc<`6ni|gExKUc=aF&{uZoyC< zs=%8+$IO-#y-TBg`?pCngL{RE1|DffxR)3IJhGws9E$b~0gTqTq$V*b$hw@z@pCJ% zu9Ka_lrwz|TG7+HnUjEj=1~TbmG{BSYCG=PO!+2CQrtZQfYsxKTO%^OZ=8Y`NF<1ed>e76tVnYUUIPrN{b$h^x}r z^zd!9_V;<}D9Pq_nsJ0BHGFWe@1yavzxoG?qmI$KnK; znY=%|E&lCPjHye!#LV`Vk@dik&LF#pv6XpM!{M${COEjwb=;r)eOj6*DfC0vs$UoIFf+;9&i5<; zMOAgI`sY$WCm&@MF7<#BM;@nTo*4lmk7aPLxzF*|tV;#Hm+g+8f5=4HRUQMC6Ti_ oHy%k(SG;kFgL@-arWhN;aZl9+%zq;e0nKOdboFyt=akR{0HaSoUjP6A literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gui/slot_belt.png b/src/main/resources/assets/sextiarysector/textures/items/gui/slot_belt.png new file mode 100644 index 0000000000000000000000000000000000000000..217176896eaca723bf527892983085748984f7c2 GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqw?U@_s$f87}t1`cn9j>Q$7AlET?y85}Sb4q9e0Jv*EcK`qY literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gui/slot_hand.png b/src/main/resources/assets/sextiarysector/textures/items/gui/slot_hand.png new file mode 100644 index 0000000000000000000000000000000000000000..7ed0aff40da31a58a0eccf57d71066c8c3cc800f GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqwOdi9PZ!4!i_^((-n~m(z+zw+z@cH* zz${lh?ljcvgZrfn~jRLnnI^w=ma!ER&D#IWv+ Vn!mS^eI?L122WQ%mvv4FO#pn6G<5&~ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gui/slot_necklace.png b/src/main/resources/assets/sextiarysector/textures/items/gui/slot_necklace.png new file mode 100644 index 0000000000000000000000000000000000000000..4debade3f63d520216ac2d71bf055395620b2c98 GIT binary patch literal 208 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqw^(kh%(%67NEXV91Ph;kR vr8Bh}Pc(Tm-PGQZb3B_tv3IejBqM{*51odYmC?U@R=9l013Ij+3e{BUhP z$K55*cP(cv%+*Xu+&lH`ix(|tcxGx$=rM7ORc-Ux`rMCqJ7=5E*M=8*QxfF)W>%G7 zTDkE3E5`>1=SoE-xCE7{tXWmR-7UV*)PaHFi{F>x4ca{&2Ae*elzQFQlB~R!@!$8E ZdRMC=IbFqk4+5RQ;OXk;vd$@?2>^2(Q;z@u literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gui/slot_unit.png b/src/main/resources/assets/sextiarysector/textures/items/gui/slot_unit.png new file mode 100644 index 0000000000000000000000000000000000000000..be37e81f452fbe57697ab19ff10de2339b21bcf3 GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqw|1&H|Kvp*HLNEK9%V>zbYi$^)V0?j>%a;|3C)RDp7bO!Y&<#RRU8Au6%O8$Ic84B QfCe#my85}Sb4q9e09L>>t^fc4 literal 0 HcmV?d00001 From a5d0381acc7f27f485fa0f7f69c48083a5f6eb8f Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 22 Nov 2014 22:49:56 +0900 Subject: [PATCH 31/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=82=AF?= =?UTF-8?q?=E3=83=A9=E3=83=95=E3=83=88Unit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・クラフトUnitを追加 ・ダメージを受けた時の水分の減り具合を緩和 --- .../java/shift/sextiarysector/Config.java | 11 ++++ .../shift/sextiarysector/SSGuiHandler.java | 6 +- .../java/shift/sextiarysector/SSItems.java | 8 +++ .../shift/sextiarysector/SSPlayerTabs.java | 26 ++++++++ .../shift/sextiarysector/SextiarySector.java | 1 + .../shift/sextiarysector/api/IEquipment.java | 1 + .../sextiarysector/block/BlockSSCrop.java | 6 +- .../container/ContainerPlayerNext.java | 2 +- .../container/ContainerTabWorkbench.java | 20 ++++++ .../container/InventoryPlayerNext.java | 2 +- .../sextiarysector/container/ItemBox.java | 2 +- .../event/PlayerStatusEventHandler.java | 7 +-- .../sextiarysector/gui/GuiInventoryNext.java | 4 +- .../sextiarysector/gui/GuiTabCrafting.java | 57 ++++++++++++++++++ .../gui/tab/InventoryTabEquipment.java | 55 ++++++++++++++--- .../sextiarysector/item/ISSEquipment.java | 15 +++++ .../sextiarysector/item/ItemGuiUnit.java | 46 ++++++++++++++ .../player/EntityPlayerManager.java | 4 +- .../sextiarysector/player/EquipmentType.java | 52 +++++++++++++--- .../sextiarysector/player/MoistureStats.java | 3 +- .../sextiarysector/player/StaminaStats.java | 3 +- .../sextiarysector/proxy/ClientProxy.java | 3 - .../sextiarysector/proxy/CommonProxy.java | 2 - .../tileentity/TileEntitySSCrop.java | 4 ++ .../assets/sextiarysector/lang/en_US.lang | 4 ++ .../textures/items/unit/craft_unit.png | Bin 0 -> 1877 bytes .../textures/items/unit/unit.png | Bin 0 -> 1383 bytes 27 files changed, 307 insertions(+), 37 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/SSPlayerTabs.java create mode 100644 src/main/java/shift/sextiarysector/container/ContainerTabWorkbench.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiTabCrafting.java create mode 100644 src/main/java/shift/sextiarysector/item/ISSEquipment.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemGuiUnit.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/craft_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/unit.png diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index 9fd31e1..c704f12 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -8,6 +8,10 @@ public class Config { //Biome public static int magicDesert; + //Player + public static boolean peacefulMoisture; + public static boolean peacefulStamina; + //Mod public static boolean modDCsAppleMilk; public static boolean modComputerCraft; @@ -22,6 +26,8 @@ public static void ConfigRead(FMLPreInitializationEvent event) { cfg.load(); configForBiome(cfg); + configForPlayer(cfg); + configForPlugin(cfg); } catch (Exception e) { @@ -36,6 +42,11 @@ public static void configForBiome(Configuration cfg) { magicDesert = cfg.getInt("MagicDesertID", "biome", 120, 0, 255, ""); } + public static void configForPlayer(Configuration cfg) { + peacefulMoisture = cfg.getBoolean("PeacefulMoisture", "player", false, ""); + peacefulStamina = cfg.getBoolean("PeacefulStamina", "player", false, ""); + } + public static void configForPlugin(Configuration cfg) { modDCsAppleMilk = cfg.getBoolean("AppleMilk", "general", true, ""); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 4c2043a..4702ae3 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -10,6 +10,7 @@ import shift.sextiarysector.container.ContainerMagicFurnace; import shift.sextiarysector.container.ContainerPlayerNext; import shift.sextiarysector.container.ContainerSimpleMachine; +import shift.sextiarysector.container.ContainerTabWorkbench; import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiGFTank; import shift.sextiarysector.gui.GuiInventoryNext; @@ -18,6 +19,7 @@ import shift.sextiarysector.gui.GuiMagicFurnace; import shift.sextiarysector.gui.GuiMillstone; import shift.sextiarysector.gui.GuiSawmill; +import shift.sextiarysector.gui.GuiTabCrafting; import shift.sextiarysector.gui.IServerGuiElement; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityGFTank; @@ -42,7 +44,6 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x return null; }*/ - System.out.println("sss"); switch(ID){ case 0 : return new ContainerLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); @@ -61,6 +62,7 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x case 90 : return new ContainerMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); case 200 : return new ContainerPlayerNext(player.inventory, player); + case 201 : return new ContainerTabWorkbench(player.inventory, world, x, y, z); } @@ -97,7 +99,6 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x, int y, int z) { - System.out.println("aaa"); switch(ID){ case 0 : return new GuiLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); @@ -114,6 +115,7 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x case 90:return new GuiMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); case 200:return new GuiInventoryNext(player); + case 201:return new GuiTabCrafting(player.inventory, world, x, y, z); } diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 309291a..d10dd13 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -8,6 +8,7 @@ import shift.sextiarysector.item.ItemCrop; import shift.sextiarysector.item.ItemFoodDrink; import shift.sextiarysector.item.ItemGearStorage; +import shift.sextiarysector.item.ItemGuiUnit; import shift.sextiarysector.item.ItemHammer; import shift.sextiarysector.item.ItemScoop; import shift.sextiarysector.item.ItemSeasonStone; @@ -50,6 +51,9 @@ public class SSItems { public static Item blueStoneSlimeBall; + //unit + public static Item craftUnit; + //魔法 public static Item magicDust; @@ -155,6 +159,10 @@ public static void initItems(){ blueStoneSlimeBall = new Item().setUnlocalizedName("ss.blue_stone_slime_ball").setTextureName("sextiarysector:slimeball/bluestone_slimeball").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(blueStoneSlimeBall, "BlueStoneSlimeBall"); + //Unit + craftUnit = new ItemGuiUnit(201).setUnlocalizedName("ss.craft_unit").setTextureName("sextiarysector:unit/craft_unit").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(craftUnit, "CraftUnit"); + //魔法 magicDust = new Item().setUnlocalizedName("ss.magic_dust").setTextureName("sextiarysector:dust/magic_dust").setCreativeTab(SextiarySectorAPI.TabSSMagic); GameRegistry.registerItem(magicDust, "MagicDust"); diff --git a/src/main/java/shift/sextiarysector/SSPlayerTabs.java b/src/main/java/shift/sextiarysector/SSPlayerTabs.java new file mode 100644 index 0000000..fec9cea --- /dev/null +++ b/src/main/java/shift/sextiarysector/SSPlayerTabs.java @@ -0,0 +1,26 @@ +package shift.sextiarysector; + +import net.minecraft.item.ItemStack; +import shift.sextiarysector.gui.tab.AbstractTab; +import shift.sextiarysector.gui.tab.InventoryTabEquipment; +import shift.sextiarysector.gui.tab.InventoryTabSS; +import shift.sextiarysector.gui.tab.TabManager; +import shift.sextiarysector.player.EquipmentType; + +public class SSPlayerTabs { + + public static AbstractTab ss; + + public static AbstractTab craft; + + public static void initRecipes(){ + + ss = new InventoryTabSS(); + TabManager.registerTab(ss); + + craft = new InventoryTabEquipment(EquipmentType.Unit, new ItemStack(SSItems.craftUnit)); + TabManager.registerTab(craft); + + } + +} diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 5682680..425a019 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -114,6 +114,7 @@ public void init(FMLInitializationEvent event) SSVillages.initVillages(); + if(event.getSide().isClient())SSPlayerTabs.initRecipes(); SSPlugins.initModHelper(); diff --git a/src/main/java/shift/sextiarysector/api/IEquipment.java b/src/main/java/shift/sextiarysector/api/IEquipment.java index 2cfb7d0..f4ae482 100644 --- a/src/main/java/shift/sextiarysector/api/IEquipment.java +++ b/src/main/java/shift/sextiarysector/api/IEquipment.java @@ -10,4 +10,5 @@ public interface IEquipment { boolean isItemValid(EquipmentType equipment, ItemStack stack); + } diff --git a/src/main/java/shift/sextiarysector/block/BlockSSCrop.java b/src/main/java/shift/sextiarysector/block/BlockSSCrop.java index 737e5a0..e2c45c8 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSSCrop.java +++ b/src/main/java/shift/sextiarysector/block/BlockSSCrop.java @@ -66,7 +66,7 @@ public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlay //if(par1World.isRemote)return true; - if(par1World.getBlockMetadata(x, y, z)==3&&par5EntityPlayer.getCurrentEquippedItem()!= null&&par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof ItemShears){ + if(this.getStatus().i.length == 4 && par1World.getBlockMetadata(x, y, z)==3&&par5EntityPlayer.getCurrentEquippedItem()!= null&&par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof ItemShears){ ItemStack item = this.getAfter(par1World, x, y, z); @@ -136,6 +136,10 @@ public String getItemIconName() @SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) { + if(this.field_149867_a.length == 3 && p_149691_2_ == 4){ + return this.field_149867_a[3]; + } + return this.field_149867_a[p_149691_2_]; } diff --git a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java index ae74bf3..5bbaafc 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java @@ -94,6 +94,7 @@ public IIcon getBackgroundIconIndex() //40 this.addSlotToContainer(new SlotEquipment(EquipmentType.Necklace, this.equipment, 0, 80 + 0 * 18, 8 + 0 * 18)); + //this.addSlotToContainer(new Slot(this.equipment,0, 80 + 0 * 18, 8 + 0 * 18)); this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 1, 80 + 0 * 18, 8 + 1 * 18)); this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 2, 80 + 0 * 18, 8 + 2 * 18)); @@ -120,7 +121,6 @@ public IIcon getBackgroundIconIndex() this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 19, 80 + 4 * 18, 8 + 3 * 18)); - System.out.println("AAAA : "+this.inventorySlots.size()); } @Override diff --git a/src/main/java/shift/sextiarysector/container/ContainerTabWorkbench.java b/src/main/java/shift/sextiarysector/container/ContainerTabWorkbench.java new file mode 100644 index 0000000..8201269 --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerTabWorkbench.java @@ -0,0 +1,20 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ContainerWorkbench; +import net.minecraft.world.World; + +public class ContainerTabWorkbench extends ContainerWorkbench{ + + public ContainerTabWorkbench(InventoryPlayer p_i1808_1_, World p_i1808_2_,int p_i1808_3_, int p_i1808_4_, int p_i1808_5_) { + super(p_i1808_1_, p_i1808_2_, p_i1808_3_, p_i1808_4_, p_i1808_5_); + // TODO 自動生成されたコンストラクター・スタブ + } + + @Override + public boolean canInteractWith(EntityPlayer p_75145_1_) { + return true; + } + +} diff --git a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java index fc25e1e..98fec41 100644 --- a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java @@ -8,7 +8,7 @@ public class InventoryPlayerNext implements IInventory{ - ItemBox items = new ItemBox("Base", 20); + ItemBox items = new ItemBox("Base", 20, 1); private EntityPlayer player; public InventoryPlayerNext(EntityPlayer player) { diff --git a/src/main/java/shift/sextiarysector/container/ItemBox.java b/src/main/java/shift/sextiarysector/container/ItemBox.java index 335c611..e27cf7e 100644 --- a/src/main/java/shift/sextiarysector/container/ItemBox.java +++ b/src/main/java/shift/sextiarysector/container/ItemBox.java @@ -12,7 +12,7 @@ public class ItemBox{ public ItemBox(String name,int size){ - this(name,size,0); + this(name, size, 64); } diff --git a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java index 553de95..4fd1473 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java @@ -60,14 +60,13 @@ public void onBlockBreakEvent(BreakEvent event) { @SubscribeEvent public void onLivingHurtEvent(LivingHurtEvent event) { - if (event.entityLiving.worldObj.isRemote - || !(event.entityLiving instanceof EntityPlayer)) { + if (event.entityLiving.worldObj.isRemote|| !(event.entityLiving instanceof EntityPlayer)) { return; } EntityPlayer player = (EntityPlayer) event.entityLiving; - SextiarySectorAPI.addMoistureExhaustion(player, event.ammount * 1.4f); + SextiarySectorAPI.addMoistureExhaustion(player, event.ammount * 0.4f); } @@ -140,7 +139,7 @@ public void onLivingHurtEvent2(LivingHurtEvent event) { EntityPlayer player = (EntityPlayer) event.entityLiving; - SextiarySectorAPI.addStaminaExhaustion(player, event.ammount * 1.4f); + SextiarySectorAPI.addStaminaExhaustion(player, event.ammount * 5.0f); } diff --git a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java index 5011109..26ebde8 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java +++ b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java @@ -14,7 +14,7 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.SSPlayerTabs; import shift.sextiarysector.container.ContainerPlayerNext; import shift.sextiarysector.gui.tab.TabManager; @@ -59,7 +59,7 @@ public void initGui() int cornerY = this.guiTop; - TabManager.updateTabValues(cornerX, cornerY,this.buttonList, SextiarySector.proxy.ss,false); + TabManager.updateTabValues(cornerX, cornerY,this.buttonList, SSPlayerTabs.ss,false); } diff --git a/src/main/java/shift/sextiarysector/gui/GuiTabCrafting.java b/src/main/java/shift/sextiarysector/gui/GuiTabCrafting.java new file mode 100644 index 0000000..dec9291 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiTabCrafting.java @@ -0,0 +1,57 @@ +package shift.sextiarysector.gui; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SSPlayerTabs; +import shift.sextiarysector.container.ContainerTabWorkbench; +import shift.sextiarysector.gui.tab.TabManager; + +public class GuiTabCrafting extends GuiContainer{ + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation("textures/gui/container/crafting_table.png"); + private static final String __OBFID = "CL_00000750"; + + public GuiTabCrafting(InventoryPlayer p_i1084_1_, World p_i1084_2_, int p_i1084_3_, int p_i1084_4_, int p_i1084_5_) + { + super(new ContainerTabWorkbench(p_i1084_1_, p_i1084_2_, p_i1084_3_, p_i1084_4_, p_i1084_5_)); + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + this.fontRendererObj.drawString(I18n.format("container.crafting", new Object[0]), 28, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(craftingTableGuiTextures); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + } + + public void initGui() + { + this.buttonList.clear(); + + super.initGui(); + + int cornerX = this.guiLeft; + + int cornerY = this.guiTop; + + TabManager.updateTabValues(cornerX, cornerY,this.buttonList, SSPlayerTabs.craft,false); + + } + +} diff --git a/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java b/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java index c4169bf..7724d6c 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java +++ b/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java @@ -1,37 +1,78 @@ package shift.sextiarysector.gui.tab; import net.minecraft.client.Minecraft; -import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.item.ISSEquipment; +import shift.sextiarysector.player.EntityPlayerManager; +import shift.sextiarysector.player.EquipmentType; import cpw.mods.fml.client.FMLClientHandler; public class InventoryTabEquipment extends AbstractTab { private static Minecraft mc = FMLClientHandler.instance().getClient(); - public InventoryTabEquipment(int slot){ + EquipmentType type; + ItemStack item; + public InventoryTabEquipment(EquipmentType type,ItemStack item){ + this.type = type; + this.item = item; + } + + private boolean hasItem(){ + return false; + } + + private ItemStack getSlotItem(){ + + for(int i:type.getSlot()){ + + ItemStack slot = EntityPlayerManager.getEquipmentStats(mc.thePlayer).inventory.getStackInSlot(i); + + if(slot!=null && slot.isItemEqual(item)){ + return slot; + } + + } + + + return null; } @Override public void onTabClicked() { - mc.thePlayer.openGui(SextiarySector.instance, 200, mc.thePlayer.worldObj, (int)mc.thePlayer.posX, (int)mc.thePlayer.posY, (int)mc.thePlayer.posZ); + + if(getSlotItem()==null){ + return ; + } + + ((ISSEquipment)this.getItemStack().getItem()).onTabClicked(type, getSlotItem(), mc.thePlayer); + } @Override public ItemStack getItemStack() { - return new ItemStack(Items.chainmail_chestplate); + return item; } @Override public boolean shouldAddToList() { - return true; + + if(getSlotItem()==null){ + return false; + } + + return ((ISSEquipment)this.getItemStack().getItem()).shouldAddToList(type, getSlotItem(), mc.thePlayer); } @Override public String getTabName() { - return "player.tab.vanilla"; + + if(getSlotItem()==null){ + return "player.tab."+""; + } + + return "player.tab."+((ISSEquipment)this.getItemStack().getItem()).getTabName(type, getSlotItem(), mc.thePlayer); } diff --git a/src/main/java/shift/sextiarysector/item/ISSEquipment.java b/src/main/java/shift/sextiarysector/item/ISSEquipment.java new file mode 100644 index 0000000..e0522a1 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ISSEquipment.java @@ -0,0 +1,15 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.player.EquipmentType; + +public interface ISSEquipment { + + String getTabName(EquipmentType equipment, ItemStack stack, EntityPlayer player); + + boolean shouldAddToList(EquipmentType equipment, ItemStack stack, EntityPlayer player); + + void onTabClicked(EquipmentType equipment, ItemStack stack, EntityPlayer player); + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java b/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java new file mode 100644 index 0000000..b61d94a --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java @@ -0,0 +1,46 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.api.IEquipment; +import shift.sextiarysector.packet.PacketGuiId; +import shift.sextiarysector.packet.SSPacketHandler; +import shift.sextiarysector.player.EquipmentType; + +public class ItemGuiUnit extends Item implements IEquipment , ISSEquipment{ + + public int guiID; + + public ItemGuiUnit(int gui){ + this.guiID = gui; + this.setMaxStackSize(1); + } + + @Override + public boolean canTakeStack(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + return equipment.equals(EquipmentType.Unit); + } + + @Override + public boolean isItemValid(EquipmentType equipment, ItemStack stack) { + return equipment.equals(EquipmentType.Unit); + } + + @Override + public boolean shouldAddToList(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + return true; + } + + @Override + public void onTabClicked(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + SSPacketHandler.INSTANCE.sendToServer(new PacketGuiId(guiID)); + + } + + @Override + public String getTabName(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + return this.getUnlocalizedName() ; + } + +} diff --git a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java index 2fa6053..2b415de 100644 --- a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java +++ b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java @@ -7,8 +7,8 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.player.PlayerDropsEvent; import shift.sextiarysector.api.IPlayerManager; -import shift.sextiarysector.packet.SSPacketHandler; import shift.sextiarysector.packet.PacketPlayerData; +import shift.sextiarysector.packet.SSPacketHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent; @@ -159,7 +159,7 @@ public static void onUpdateEntity(EntityPlayer entityPlayer) @SubscribeEvent public void onPlayerDropsEvent(PlayerDropsEvent event) { - this.getCustomPlayerData(event.entityPlayer).getEquipmentStats().inventory.dropAllItems(); + //this.getCustomPlayerData(event.entityPlayer).getEquipmentStats().inventory.dropAllItems(); } private void oneton(){ diff --git a/src/main/java/shift/sextiarysector/player/EquipmentType.java b/src/main/java/shift/sextiarysector/player/EquipmentType.java index f4c02aa..9c6b588 100644 --- a/src/main/java/shift/sextiarysector/player/EquipmentType.java +++ b/src/main/java/shift/sextiarysector/player/EquipmentType.java @@ -5,21 +5,23 @@ public enum EquipmentType { - Necklace("necklace"), - Ring("ring"), - Face("face"), - Hand("hand"), - Bag("bag"), - Belt("belt"), - Unit("unit"), - Other("other") + Necklace("necklace",new int[]{0}), + Ring("ring",new int[]{1,2,3}), + Face("face",new int[]{4}), + Hand("hand",new int[]{5}), + Bag("bag",new int[]{6}), + Belt("belt",new int[]{7}), + Unit("unit",new int[]{8,9,10,11,12,13,14,15}), + Other("other",new int[]{16,17,18,19}) ; private IIcon icon; private String iconName; + private int[] slot; - EquipmentType(String name){ + EquipmentType(String name,int[] slot){ this.iconName = name; + this.slot = slot; } public void registerIcon(TextureMap map){ @@ -34,4 +36,36 @@ public void setIcon(IIcon icon) { this.icon = icon; } + public int[] getSlot(){ + return this.slot; + } + + public static EquipmentType getEquipmentTypeFromSlot(int slot){ + + switch(slot){ + case 0 : return Necklace; + + case 1 : + case 2 : + case 3 : + return Ring; + + case 4 : return Face; + case 5 : return Hand; + case 6 : return Bag; + case 7 : return Belt; + + case 8 : + case 9 : + case 10 : + case 11 : + case 12 : + case 13 : + case 14 : + case 15 : + return Unit; + } + return Other; + } + } diff --git a/src/main/java/shift/sextiarysector/player/MoistureStats.java b/src/main/java/shift/sextiarysector/player/MoistureStats.java index eea85ff..514d1db 100644 --- a/src/main/java/shift/sextiarysector/player/MoistureStats.java +++ b/src/main/java/shift/sextiarysector/player/MoistureStats.java @@ -4,6 +4,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.EnumDifficulty; +import shift.sextiarysector.Config; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -54,7 +55,7 @@ public void onUpdate(EntityPlayer par1EntityPlayer) { this.moistureSaturationLevel = Math.max(this.moistureSaturationLevel - 1.0F, 0.0F); } - else if (i.getDifficultyId() > 0) + else if (i.getDifficultyId() > 0 || Config.peacefulMoisture) { this.moistureLevel = Math.max(this.moistureLevel - 1, 0); } diff --git a/src/main/java/shift/sextiarysector/player/StaminaStats.java b/src/main/java/shift/sextiarysector/player/StaminaStats.java index 199e814..7ca5f8b 100644 --- a/src/main/java/shift/sextiarysector/player/StaminaStats.java +++ b/src/main/java/shift/sextiarysector/player/StaminaStats.java @@ -3,6 +3,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.EnumDifficulty; +import shift.sextiarysector.Config; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -58,7 +59,7 @@ public void onUpdate(EntityPlayer par1EntityPlayer) { this.staminaSaturationLevel = Math.max(this.staminaSaturationLevel - 1.0F, 0.0F); } - else if (i.getDifficultyId() > 0) + else if (i.getDifficultyId() > 0 || Config.peacefulStamina) { this.staminaLevel = Math.max(this.staminaLevel - 1, 0); } diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 58fd536..224d2f6 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -5,7 +5,6 @@ import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; import shift.mceconomy2.packet.PacketHandler; -import shift.sextiarysector.gui.tab.InventoryTabSS; import shift.sextiarysector.gui.tab.TabManager; import shift.sextiarysector.packet.PacketGuiId; import shift.sextiarysector.renderer.block.RendererBlockBottle; @@ -132,8 +131,6 @@ public void registerInventoryTabs() TabRegistry.registerTab(new InventoryTabSextiarysector()); */ TabManager.initTabManager(); - ss = new InventoryTabSS(); - TabManager.registerTab(ss); //TabManager.registerTab(new InventoryTabEquipment()); //TabManager.registerTab(new InventoryTabEquipment()); //TabManager.registerTab(new InventoryTabEquipment()); diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 82f4c78..1ee1d38 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -2,7 +2,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; -import shift.sextiarysector.gui.tab.AbstractTab; public class CommonProxy { @@ -25,7 +24,6 @@ public class CommonProxy { public int farmlandType; - public AbstractTab ss; public EntityPlayer getClientPlayer(){ return null; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java index 8c49ffe..ce39e68 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java @@ -37,6 +37,10 @@ public void updateEntity() { public void updateServerEntity() { + if(this.getBlockMetadata()==4 && this.getStatus().i.length<4){ + this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 3, 0); + } + if(lastMinutes==0){ lastMinutes=SeasonAPI.getMinute(getWorldObj()); } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 45fbb78..3ee9e83 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -84,6 +84,9 @@ item.ss.orichalcum_gem.name=Orichalcum item.ss.blue_stone_slime_ball.name=Blue Stone Slime Ball + +item.ss.craft_unit.name=Craft Unit + item.ss.magic_dust.name=Magic Dust item.ss.unit.name=Unit @@ -185,6 +188,7 @@ itemGroup.ss.magic=SextiarySector -Magic- #Player Tab player.tab.vanilla=Vanilla player.tab.equipment=Equipment +player.tab.item.ss.craft_unit=Craft #Achievement stat.sell=Sell diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/craft_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/craft_unit.png new file mode 100644 index 0000000000000000000000000000000000000000..d4cb5c591657be95cd7ede1375b32741ab9475a7 GIT binary patch literal 1877 zcmV-b2demqP)WFU8GbZ8()Nlj2>E@cM*00y~9L_t(o!_Aj%tQ1!n z$A8b6*`1x;y%#7(rCQLXlmaE%@S#FO+Yb`@Vj(7KO=}u#OcPCrv8I?Rq3 z8e^gfrY5Gw28g!4l7eDuLO=={vE0I5=nJ;My|cTsGv~}Xewf+WU2chOVvUo`?7Zwe z=l}ekmvaW^9L_ncwG7VR&VBus^-`RZdXMXeyzK8%2#|cNL&M^J*Ys}6@Oio4!LZ{O~rzxTYYb|M-VvHf~_0Yyp zyj}_jYc(p>0N?j%HYYf6^f-5at-cbo&(3FTcjeK76AaBeCqt z%aQ15ZR-Dl#39d{Tr=H1#l4$v<@aa$!aoi%-980gK5i+XAIDt0IP+FW)ZYY&HJ6ZZ z-#_q*oSWyvqDutS!jQ05D@lY)*C74`6#<-OGRv^eB9K>&%W%$Ovkd1P#RG64A}CK# z%0s*gf$lKy+*bBr!>N9$+_FtrIEq?Zk*Dr z2YG!Lg0H@RC*sV&^9wmDnJYl+lvJlB30wv?ALNH$*+iCQeEEBSV8`a`$LiS_gHo#W zYWtqQvh#u4NYj+hJiHsM0cQuE{|;Q4F92#Nz+kj4Nmy$DM>kGUO7Y-hzh&FT6+}s& z^PPw&=`+*oVU*C-DN)iVO8RWuxSXxu+*>#zd8lw)>iHZ3*4nbsq&mgg46ro9Di415 z*L-!;2YB+i)1+}s(5RONl5P)c9pOZyME}qotJwC~Z|KG;I9rO4x#JHBjF32Fv<7Dp z97&q-@TL!v8G|U{qpPoE^EC^wndP2!OSx~uY5;C;&F9|r%S$^uHeX-lh8;;GT%xocgEn)3MBUrv{{CYxay%7N#` zXtdFDLl8wBI??QqM1igmR>3)X7rU6uym2T6tabRlUnaCt9$A(Zp>qSzTX8QY?!|Kn z7-Pnil_CoK(QHD}?Xl~?2@+$d2LX>CJW0~+5j5&N@$8FKJs;&M1SzTr1dDUo!1If9yBcrBLKJmA-ic<(Ob>Ah&N+-Ryle3lSnIfR*+M?Ku0=mh*|g?8+_Ll?oPT|m zPpo}ETW+~Fx21+L7T3q5J)+qeqShS0D(#dU1yM z=u3pn20#7tRPKeRcxq|}H+2ylWLd`cUmmB|*JT^7)oO%cScKM5~i9wzORge3>v6oISp;-_3+^&P%a7CR&X9N{* zES}Gu@6nA@?tbX!BIDYKd7zyQj;0epNd=Y1}e8E$MX=Q+nUW39n~Qb@56zCC=;FZ;##nlMRNyJ{t?uDgz7?K9LeO?2io3WvBsW>}oH zWydZTqSlgGlZS4k%A9j#&e0U8Hy6^Vhb4)*3z9V9;PZbgA50&57Hu-ZT5YVuX`SYi zjez8be3>4{Xq}hrz`Qn^q!;tvB}=GlmzaLYph4_`B0Aozv zS(T7w*%N}av@xwX?kzCdjLapVwI=Sxv|23y4j(>TlDKRR9Dd=X{I@+{v2rC}|MsI} zBwje%&IJs<4d0^Y2!b|-IPURgJYRF|^08~)$^Xg6=|I5fQu^)QM#uU$?}}ZlT5tpJ P00000NkvXXu0mjfY)F20 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/unit.png new file mode 100644 index 0000000000000000000000000000000000000000..40ba101140c4bd390cc96ed83755eff3de721806 GIT binary patch literal 1383 zcmV-t1(^DYP)WFU8GbZ8()Nlj2>E@cM*00hfP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~)!e3>Q6h*!2nBIf6zLRFnHELS8b?|Q)N-}Ol!y|8803?Mw}!ZIeHFV zzm9Wm7QpE%!W9>?oO%7ROTfGE~F=UgB zm6a6$*4Nj)5_3JUe(QJnx0%0w;sl?4{zXTLTX#kkfacrq37I1Z##*v$!s9SseeKoG poagzUe4I7_RJG&Ir}=Bg`WrCF=zCtwt@!`|002ovPDHLkV1iS=bIkw% literal 0 HcmV?d00001 From 3f8ad7f7370259f87380fe3ba53481dc0788b24d Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 22 Nov 2014 23:50:04 +0900 Subject: [PATCH 32/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E5=8C=A0Shop?= =?UTF-8?q?=E3=81=AB=E3=82=AF=E3=83=A9=E3=83=95=E3=83=88Unit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・クラフトUnitをクリーパーショップで買えるように --- src/main/java/shift/sextiarysector/SSShops.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index 3c64942..a20103e 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -28,6 +28,8 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,0),500)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,1),500)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.craftUnit,1),50000)); + if(i==0){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.turnip,1),200)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.cucumber,1),380)); From 986428e1c0a1f3af2d9211da7e9594b7e6f3e0bf Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 23 Nov 2014 00:32:10 +0900 Subject: [PATCH 33/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E8=A1=A8=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・2.0.8に変更 --- build.gradle | 2 +- src/main/java/shift/sextiarysector/SextiarySector.java | 2 +- .../java/shift/sextiarysector/player/EntityPlayerManager.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index cee4cea..1b5630f 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.0.7.e-${project.minecraft.version}" +version = "2.0.8.b-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 425a019..f7bd929 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -32,7 +32,7 @@ public class SextiarySector { //public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.0.7"; + public static final String VERSION = "2.0.8"; @Mod.Instance("SextiarySector") public static SextiarySector instance; diff --git a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java index 2b415de..97d55e5 100644 --- a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java +++ b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java @@ -159,7 +159,7 @@ public static void onUpdateEntity(EntityPlayer entityPlayer) @SubscribeEvent public void onPlayerDropsEvent(PlayerDropsEvent event) { - //this.getCustomPlayerData(event.entityPlayer).getEquipmentStats().inventory.dropAllItems(); + this.getCustomPlayerData(event.entityPlayer).getEquipmentStats().inventory.dropAllItems(); } private void oneton(){ From 64a2d56a5ba89e19dea97584621df6e6adedb284 Mon Sep 17 00:00:00 2001 From: shift02 Date: Mon, 24 Nov 2014 22:40:04 +0900 Subject: [PATCH 34/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=83=8A?= =?UTF-8?q?=E3=82=A4=E3=83=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ナイフを追加 --- .../java/shift/sextiarysector/SSItems.java | 18 ++++ .../java/shift/sextiarysector/SSShops.java | 19 ++-- .../shift/sextiarysector/item/ItemKnife.java | 85 ++++++++++++++++++ .../shift/sextiarysector/item/ItemScoop.java | 5 +- .../assets/sextiarysector/lang/en_US.lang | 6 ++ .../textures/items/tool/diamond_knife.png | Bin 0 -> 315 bytes .../textures/items/tool/gold_knife.png | Bin 0 -> 315 bytes .../textures/items/tool/iron_knife.png | Bin 0 -> 310 bytes .../textures/items/tool/stone_knife.png | Bin 0 -> 317 bytes .../textures/items/tool/wood_knife.png | Bin 0 -> 314 bytes 10 files changed, 122 insertions(+), 11 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/item/ItemKnife.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/diamond_knife.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/gold_knife.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/iron_knife.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/stone_knife.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/wood_knife.png diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index d10dd13..be074ee 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -10,6 +10,7 @@ import shift.sextiarysector.item.ItemGearStorage; import shift.sextiarysector.item.ItemGuiUnit; import shift.sextiarysector.item.ItemHammer; +import shift.sextiarysector.item.ItemKnife; import shift.sextiarysector.item.ItemScoop; import shift.sextiarysector.item.ItemSeasonStone; import shift.sextiarysector.item.ItemShiftHat; @@ -74,6 +75,12 @@ public class SSItems { public static Item goldScoop; public static Item diamondScoop; + public static Item woodKnife; + public static Item stoneKnife; + public static Item ironKnife; + public static Item goldKnife; + public static Item diamondKnife; + public static Item woodWateringCan; @@ -197,6 +204,17 @@ public static void initItems(){ GameRegistry.registerItem(goldScoop, "GoldScoop"); GameRegistry.registerItem(diamondScoop, "DiamondScoop"); + woodKnife = new ItemKnife(ToolMaterial.WOOD).setUnlocalizedName("ss.wood_knife").setTextureName("wood_knife"); + stoneKnife = new ItemKnife(ToolMaterial.STONE).setUnlocalizedName("ss.stone_knife").setTextureName("stone_knife"); + ironKnife = new ItemKnife(ToolMaterial.IRON).setUnlocalizedName("ss.iron_knife").setTextureName("iron_knife"); + goldKnife = new ItemKnife(ToolMaterial.GOLD).setUnlocalizedName("ss.gold_knife").setTextureName("gold_knife"); + diamondKnife = new ItemKnife(ToolMaterial.EMERALD).setUnlocalizedName("ss.diamond_knife").setTextureName("diamond_knife"); + GameRegistry.registerItem(woodKnife, "WoodKnife"); + GameRegistry.registerItem(stoneKnife, "StoneKnife"); + GameRegistry.registerItem(ironKnife, "IronKnife"); + GameRegistry.registerItem(goldKnife, "GoldKnife"); + GameRegistry.registerItem(diamondKnife, "DiamondKnife"); + woodWateringCan = new ItemWateringCan(ToolMaterial.WOOD).setUnlocalizedName("ss.wood_watering_can").setTextureName("wood_watering_can"); GameRegistry.registerItem(woodWateringCan, "WoodWateringCan"); diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index a20103e..db1a3b1 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -31,29 +31,29 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.craftUnit,1),50000)); if(i==0){ - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.turnip,1),200)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.cucumber,1),380)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.turnip,1),180)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.cucumber,1),360)); } if(i==1){ - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.onion,1),200)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.tomato,1),200)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.corn,1),800)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.onion,1),180)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.tomato,1),190)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.corn,1),740)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.magicDust,4),500)); } if(i==2){ - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.eggplant,1),310)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.sweetPotato,1),120)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.greenPepper,1),340)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.eggplant,1),290)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.sweetPotato,1),110)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.greenPepper,1),320)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.fluidCrafter,4,0),580)); } if(i==3){ - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.radish,1),180)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.radish,1),170)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.stoneDust,4),500)); } @@ -97,6 +97,7 @@ public static void initPurchase(){ MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.cucumber,1,1), 3500); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.ironTurnip,1,1), 3000); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.onion), 320); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.tomato), 150); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.corn), 720); diff --git a/src/main/java/shift/sextiarysector/item/ItemKnife.java b/src/main/java/shift/sextiarysector/item/ItemKnife.java new file mode 100644 index 0000000..7369981 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemKnife.java @@ -0,0 +1,85 @@ +package shift.sextiarysector.item; + +import java.util.Set; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemTool; +import shift.sextiarysector.api.SextiarySectorAPI; + +import com.google.common.collect.Sets; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemKnife extends ItemTool +{ + + private static final Set field_150916_c = Sets.newHashSet(new Block[] {Blocks.crafting_table}); + + private boolean repair = false; + public ItemKnife(ToolMaterial p_i45343_1_) + { + super(1.0F, p_i45343_1_, field_150916_c); + int i = p_i45343_1_.getHarvestLevel(); + this.setHarvestLevel("knife", i); + if(i==0){ + this.setHarvestLevel("axe", 0); + }else{ + this.setHarvestLevel("axe", i-1); + } + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + FMLCommonHandler.instance().bus().register(this); + } + + //アイテムがクラフト後に戻らないようにする + @Override + public boolean doesContainerItemLeaveCraftingGrid(ItemStack par1ItemStack) + { + return false; + } + + //修理以外ならクラフト後にgetContainerItemStackを呼び出す + @Override + public boolean hasContainerItem() + { + return !repair; + } + + //修理かどうかを判定する + @SubscribeEvent + public void onCrafting(ItemCraftedEvent event) + { + //IDが無くなったので、アイテムインスタンスで比較。 + repair = this == event.crafting.getItem(); + } + + //クラフト後のアイテムを、ダメージを与えて返す + @Override + public ItemStack getContainerItem(ItemStack itemStack) + { + if (itemStack != null && itemStack.getItem() == this) + { + itemStack.setItemDamage(itemStack.getItemDamage() + 1); + } + return itemStack; + } + + @SideOnly(Side.CLIENT) + public boolean isFull3D() + { + return true; + } + + public Item setTextureName(String p_111206_1_) + { + this.iconString = "sextiarysector:tool/"+p_111206_1_; + return this; + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemScoop.java b/src/main/java/shift/sextiarysector/item/ItemScoop.java index 24948d5..ee090a0 100644 --- a/src/main/java/shift/sextiarysector/item/ItemScoop.java +++ b/src/main/java/shift/sextiarysector/item/ItemScoop.java @@ -26,10 +26,11 @@ public ItemScoop(ToolMaterial p_i45343_1_) { super(1.0F, p_i45343_1_, field_150916_c); int i = p_i45343_1_.getHarvestLevel(); + this.setHarvestLevel("scoop", i); if(i==0){ - this.setHarvestLevel("scoop", 0); + this.setHarvestLevel("shovel", 0); }else{ - this.setHarvestLevel("scoop", i-1); + this.setHarvestLevel("shovel", i-1); } this.setCreativeTab(SextiarySectorAPI.TabSSAgriculture); } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 3ee9e83..8316b94 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -122,6 +122,12 @@ item.ss.iron_scoop.name=Iron Scoop item.ss.gold_scoop.name=Gold Scoop item.ss.diamond_scoop.name=Diamond Scoop +item.ss.wood_knife.name=Wood Knife +item.ss.stone_knife.name=Stone Knife +item.ss.iron_knife.name=Iron Knife +item.ss.gold_knife.name=Gold Knife +item.ss.diamond_knife.name=Diamond Knife + item.ss.wood_watering_can.name=Wood Watering Can item.ss.crop.big=Big diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/diamond_knife.png b/src/main/resources/assets/sextiarysector/textures/items/tool/diamond_knife.png new file mode 100644 index 0000000000000000000000000000000000000000..ae523c2d917f1bf52d791a67904a16e8dd4de414 GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqw*-%oajbgiT%gbiPZ!4!i_^&o5*Y_Px{`{08~+=8 zJNa5(!qezLOz?yM^PP7~?vt@Ue*g#+0^*JpeEP-i<`!h~f5+zujn1y~8jqe6eaEC$ zWTL!#&P18B>g($pRv&!Lq!<^rXVyn1f8&e)=e~UP-}K3j|H|!lffrw7s{M+OYnuG< zK)78&qol`;+0CQG$xc~qF literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/gold_knife.png b/src/main/resources/assets/sextiarysector/textures/items/tool/gold_knife.png new file mode 100644 index 0000000000000000000000000000000000000000..29714dcf82247c7cd69e96595f69af9530f419cb GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqw*-%|eAyEYd!Wz>PZ!4!i_^&o5*Y_Px{`{08~+=8 zJNa7P;StIHp1%$nJ8anH{c)`uUv z+e@ZAy&+k%wtP{=+=()0)z{Z2D4b$-+Owv@^fBwav_=1|FJJwieWLI&uYp_4tf#6L zl6)~0rw;%@#p8?Nk1jQ~$$YPO<&DNOw(lX{=pr05#UHx3vIVCg!01cFa A{{R30 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/iron_knife.png b/src/main/resources/assets/sextiarysector/textures/items/tool/iron_knife.png new file mode 100644 index 0000000000000000000000000000000000000000..d067c0068b9a1b227fe78ac08c490cec860af335 GIT binary patch literal 310 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqw*-#~?gTe~DWM4fliG5n literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/stone_knife.png b/src/main/resources/assets/sextiarysector/textures/items/tool/stone_knife.png new file mode 100644 index 0000000000000000000000000000000000000000..24638b443a9415fffb9fe6fa263d0f788f47924c GIT binary patch literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqw*-$Vv&sI?-+)4=JY5_^EKVmUNMs!F=t}bUKmXt0 z+qbv3B_$;!BqBU6%1B6@`0(Xr@Qe%p-`?JCY&3Dv&%eLF^IW=giD$Xr+@{?Pog!zO znwofCUtgbI@%@2?a$sVE_ve$ZmJ|f%`R1R=f9}x4hb2aR*7f%^-clCZW0q#Ngie3wajA! zf@93j?@ydEW#)z4{r?|HgEeiERn^S5|5}w$q|7jDWwP3=Ah!EJUom*P`njxgN@xNA D)i!^O literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/wood_knife.png b/src/main/resources/assets/sextiarysector/textures/items/tool/wood_knife.png new file mode 100644 index 0000000000000000000000000000000000000000..b36c49c8e6645d3273aba3fdc42654973dea2e2a GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqw*-%&<+S_n9e_f|JzX3_EKVmUNMs!F=t?T~ZTxTW z?c{5D2}ubFi3pF2Z}OFoefV?P3JRtvg5zDSAn601ef8N`~O-Nr1cmmgc^4-0yXjgK@a=6 y{mPn}#tU!P{Xc3B)|6`P6?Cue)z<@0+!&@Uj%ejivit<}5`(9!pUXO@geCyYI(mx$ literal 0 HcmV?d00001 From 32a889f7f6deb5f5dfe7af8a47370fed8c0839d0 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 30 Nov 2014 22:55:17 +0900 Subject: [PATCH 35/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=82=A6?= =?UTF-8?q?=E3=83=83=E3=83=89=E3=83=9B=E3=83=83=E3=83=91=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ウッドホッパーを追加 ギアを鉱石辞書に登録 --- .../java/shift/sextiarysector/SSBlocks.java | 6 + .../shift/sextiarysector/SSOreDictionary.java | 8 + .../sextiarysector/block/BlockWoodHopper.java | 52 ++++ .../sextiarysector/proxy/ClientProxy.java | 5 + .../sextiarysector/proxy/CommonProxy.java | 2 + .../sextiarysector/recipe/RecipesCore.java | 10 + .../sextiarysector/recipe/RecipesMachine.java | 7 +- .../block/RendererSmallWaterwheel.java | 123 +++++++++ .../renderer/block/RendererWoodHopper.java | 237 ++++++++++++++++++ .../renderer/model/ModelSmallWaterwheel.java | 84 +++++++ .../assets/sextiarysector/lang/en_US.lang | 2 + .../textures/blocks/hopper_inside.png | Bin 0 -> 569 bytes .../textures/blocks/hopper_outside.png | Bin 0 -> 609 bytes .../textures/blocks/hopper_top.png | Bin 0 -> 389 bytes .../textures/items/wood_hopper.png | Bin 0 -> 832 bytes .../textures/models/small_waterwheel.png | Bin 0 -> 2144 bytes 16 files changed, 533 insertions(+), 3 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockWoodHopper.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererSmallWaterwheel.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererWoodHopper.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelSmallWaterwheel.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/hopper_inside.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/hopper_outside.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/hopper_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/wood_hopper.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/small_waterwheel.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 3606cb3..79a6093 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -30,6 +30,7 @@ import shift.sextiarysector.block.BlockSimpleMachine; import shift.sextiarysector.block.BlockSmallWindmill; import shift.sextiarysector.block.BlockWindmill; +import shift.sextiarysector.block.BlockWoodHopper; import shift.sextiarysector.item.ItemBlockBottle; import shift.sextiarysector.item.ItemBlockCrop; import shift.sextiarysector.item.ItemBlockFluidCrafter; @@ -65,6 +66,8 @@ public class SSBlocks { public static Block bottle; public static Block fluidCrafter; + public static Block woodHopper; + public static Block woodShaft; public static Block stoneShaft; @@ -151,6 +154,9 @@ public static void initBlicks(){ hole = new BlockHole().setBlockName("ss.hole").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(hole, "Hole"); + woodHopper = new BlockWoodHopper().setBlockName("ss.wood_hopper").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(woodHopper, "WoodHopper"); + woodGrate = (new BlockSSPane(ID+":wood_grate", ID+":wood_grate", Material.wood, false,0)).setHardness(0.5F).setBlockName("ss.wood_grate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodGrate, "WoodGrate"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index b664e5e..a336b0e 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -9,6 +9,14 @@ public static void init(){ OreDictionary.registerOre("craftingSugar", Items.sugar); + + //素材 プレート + OreDictionary.registerOre("plateWood", SSBlocks.woodPlate); + + + OreDictionary.registerOre("gearWood", SSItems.woodGear); + OreDictionary.registerOre("gearStone", SSItems.stoneGear); + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java b/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java new file mode 100644 index 0000000..6c3c3cb --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java @@ -0,0 +1,52 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.BlockHopper; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.SextiarySectorAPI; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockWoodHopper extends BlockHopper{ + + private IIcon field_149923_M; + private IIcon field_149921_b; + private IIcon field_149924_N; + + public BlockWoodHopper(){ + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + } + + public int getRenderType() + { + return SextiarySector.proxy.woodHopperType; + } + + @SideOnly(Side.CLIENT) + public String getItemIconName() + { + return "sextiarysector:wood_hopper"; + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + return p_149691_1_ == 1 ? this.field_149923_M : this.field_149921_b; + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) + { + this.field_149921_b = p_149651_1_.registerIcon("sextiarysector:hopper_outside"); + this.field_149923_M = p_149651_1_.registerIcon("sextiarysector:hopper_top"); + this.field_149924_N = p_149651_1_.registerIcon("sextiarysector:hopper_inside"); + } + + @SideOnly(Side.CLIENT) + public IIcon getHopperIcon2(String p_149916_0_) + { + return p_149916_0_.equals("hopper_outside") ? this.field_149921_b : (p_149916_0_.equals("hopper_inside") ? this.field_149924_N : null); + } + +} diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 224d2f6..88abf7f 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -17,6 +17,7 @@ import shift.sextiarysector.renderer.block.RendererShaft; import shift.sextiarysector.renderer.block.RendererSmallWindmill; import shift.sextiarysector.renderer.block.RendererWindmill; +import shift.sextiarysector.renderer.block.RendererWoodHopper; import shift.sextiarysector.renderer.item.RenderGF; import shift.sextiarysector.tileentity.TileEntityBlockBottle; import shift.sextiarysector.tileentity.TileEntityFluidCrafter; @@ -49,6 +50,8 @@ public void setCustomRenderers() { this.fluidCrafterType = RenderingRegistry.getNextAvailableRenderId(); + this.woodHopperType = RenderingRegistry.getNextAvailableRenderId(); + this.ShaftRenderType = RenderingRegistry.getNextAvailableRenderId(); this.GearShaftRenderType = RenderingRegistry.getNextAvailableRenderId(); @@ -68,6 +71,8 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererFluidCrafter()); + RenderingRegistry.registerBlockHandler(new RendererWoodHopper()); + RenderingRegistry.registerBlockHandler(new RendererShaft()); RenderingRegistry.registerBlockHandler(new RendererGearShaft()); diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 1ee1d38..88064f8 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -11,6 +11,8 @@ public class CommonProxy { public int fluidCrafterType; + public int woodHopperType; + public int ShaftRenderType; public int GearShaftRenderType; diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index ef2858a..e51b558 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -1,9 +1,11 @@ package shift.sextiarysector.recipe; +import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraftforge.oredict.ShapedOreRecipe; +import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SSItems; public class RecipesCore { @@ -24,6 +26,14 @@ public static void addRecipes(CraftingManager p_77608_1_) 'x', Items.string, 'y', "stickWood", })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.woodHopper, 1), + new Object[] { + "y y", "yxy", " y ", + 'x', Blocks.chest, + 'y', "plateWood", + })); + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index 32f215e..6229b50 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -26,6 +26,7 @@ public static void addRecipes(CraftingManager p_77608_1_) Object[] material = new Object[]{"plankWood","stone"}; Item[] gear = new Item[]{SSItems.woodGear,SSItems.stoneGear}; + String[] gearOre = new String[]{"gearWood","gearStone"}; Item[] unit = new Item[]{SSItems.woodUnitGear,SSItems.stoneUnitGear}; Block[] shaft = new Block[]{SSBlocks.woodShaft, SSBlocks.stoneShaft}; Block[] tank = new Block[]{SSBlocks.woodGFTank, SSBlocks.stoneGFTank}; @@ -65,13 +66,13 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('y'), material[i], Character.valueOf('x'), SSItems.woodGFStorage, Character.valueOf('z'), unit[i], - Character.valueOf('a'), gear[i] + Character.valueOf('a'), gearOre[i] })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(box[i], 1), new Object[] { "yxy", "xzx","yxy", Character.valueOf('y'), material[i], - Character.valueOf('x'), gear[i], + Character.valueOf('x'), gearOre[i], Character.valueOf('z'), unit[i] })); @@ -118,7 +119,7 @@ public static void addRecipes(CraftingManager p_77608_1_) p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(unit[i], 1), new Object[] { SSItems.unit, - gear[i] + gearOre[i] })); } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWaterwheel.java b/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWaterwheel.java new file mode 100644 index 0000000..fde1727 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWaterwheel.java @@ -0,0 +1,123 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.renderer.model.ModelSmallWaterwheel; +import shift.sextiarysector.renderer.model.ModelsmallWindMill; +import shift.sextiarysector.tileentity.TileEntitySmallWindmill; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererSmallWaterwheel extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler{ + + private static final ResourceLocation windmillTextures = new ResourceLocation("sextiarysector:textures/models/small_waterwheel.png"); + static public ModelBase modelWaterwheel = new ModelSmallWaterwheel(); + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + + if(modelID!=this.getRenderId()){ + return ; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f/2.0f; + GL11.glScalef(scale,scale,scale); + + //GL11.glRotatef(90, 1, 0, 0); + + GL11.glRotatef(90, 0, -1, 0); + this.bind(windmillTextures); + + ((ModelsmallWindMill) modelWaterwheel).renderinOut(null, 0,0,0, 0,0, 1.0f); + + GL11.glRotatef(-(FMLClientHandler.instance().getClient().getMinecraft().getSystemTime()/50)%360, 0, 0, 1); + + modelWaterwheel.render(null, 0,0,0, 0,0, 1.0f); + + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, + RenderBlocks renderer) { + // TODO 自動生成されたメソッド・スタブ + return false; + } + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + @Override + public int getRenderId() { + return SextiarySector.proxy.smallWindMillType; + } + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + + TileEntitySmallWindmill tile = (TileEntitySmallWindmill)tileentity; + + //System.out.println("renderTileEntityAt"); + + GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + float scale = 0.0625f; + //float scale = 0.125f; + GL11.glScalef(scale,scale,scale); + + switch(tile.direction){ + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + default: + break; + } + + this.bindTexture(windmillTextures); + + + ((ModelsmallWindMill) modelWaterwheel).renderinOut(null, 0,0,0, 0,0, 1.0f); + //傾きのスピード + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + + + + modelWaterwheel.render(null, 0,0,0, 0,0, 1.0f); + + + GL11.glPopMatrix(); + + } + + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererWoodHopper.java b/src/main/java/shift/sextiarysector/renderer/block/RendererWoodHopper.java new file mode 100644 index 0000000..5e2e0b1 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererWoodHopper.java @@ -0,0 +1,237 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockHopper; +import net.minecraft.client.renderer.EntityRenderer; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.block.BlockWoodHopper; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererWoodHopper implements ISimpleBlockRenderingHandler{ + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId,RenderBlocks renderer) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block block, int modelId, RenderBlocks renderer) { + return renderBlockHopper(world,(BlockWoodHopper) block, x, y, z, renderer); + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return false; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.woodHopperType; + } + + + public boolean renderBlockHopper(IBlockAccess world,BlockWoodHopper p_147803_1_, int p_147803_2_, int p_147803_3_, int p_147803_4_, RenderBlocks renderer) + { + Tessellator tessellator = Tessellator.instance; + tessellator.setBrightness(p_147803_1_.getMixedBrightnessForBlock((IBlockAccess) world, p_147803_2_, p_147803_3_, p_147803_4_)); + int l = p_147803_1_.colorMultiplier((IBlockAccess) world, p_147803_2_, p_147803_3_, p_147803_4_); + float f = (float)(l >> 16 & 255) / 255.0F; + float f1 = (float)(l >> 8 & 255) / 255.0F; + float f2 = (float)(l & 255) / 255.0F; + + if (EntityRenderer.anaglyphEnable) + { + float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F; + float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F; + float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F; + f = f3; + f1 = f4; + f2 = f5; + } + + tessellator.setColorOpaque_F(f, f1, f2); + return renderBlockHopperMetadata(world,p_147803_1_, p_147803_2_, p_147803_3_, p_147803_4_, world.getBlockMetadata(p_147803_2_, p_147803_3_, p_147803_4_), false, renderer); + } + + public boolean renderBlockHopperMetadata(IBlockAccess world, BlockWoodHopper p_147799_1_, int p_147799_2_, int p_147799_3_, int p_147799_4_, int p_147799_5_, boolean p_147799_6_, RenderBlocks renderer) + { + Tessellator tessellator = Tessellator.instance; + int i1 = BlockHopper.getDirectionFromMetadata(p_147799_5_); + double d0 = 0.625D; + renderer.setRenderBounds(0.0D, d0, 0.0D, 1.0D, 1.0D, 1.0D); + + if (p_147799_6_) + { + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + renderer.renderFaceYNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 0, p_147799_5_)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 1, p_147799_5_)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 2, p_147799_5_)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 3, p_147799_5_)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 4, p_147799_5_)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 5, p_147799_5_)); + tessellator.draw(); + } + else + { + renderer.renderStandardBlock(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_); + } + + float f1; + + if (!p_147799_6_) + { + tessellator.setBrightness(p_147799_1_.getMixedBrightnessForBlock(world, p_147799_2_, p_147799_3_, p_147799_4_)); + int j1 = p_147799_1_.colorMultiplier(world, p_147799_2_, p_147799_3_, p_147799_4_); + float f = (float)(j1 >> 16 & 255) / 255.0F; + f1 = (float)(j1 >> 8 & 255) / 255.0F; + float f2 = (float)(j1 & 255) / 255.0F; + + if (EntityRenderer.anaglyphEnable) + { + float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F; + float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F; + float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F; + f = f3; + f1 = f4; + f2 = f5; + } + + tessellator.setColorOpaque_F(f, f1, f2); + } + + IIcon iicon = p_147799_1_.getHopperIcon2("hopper_outside"); + IIcon iicon1 = p_147799_1_.getHopperIcon2("hopper_inside"); + f1 = 0.125F; + + if (p_147799_6_) + { + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(p_147799_1_, (double)(-1.0F + f1), 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(p_147799_1_, (double)(1.0F - f1), 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(p_147799_1_, 0.0D, 0.0D, (double)(-1.0F + f1), iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(p_147799_1_, 0.0D, 0.0D, (double)(1.0F - f1), iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(p_147799_1_, 0.0D, -1.0D + d0, 0.0D, iicon1); + tessellator.draw(); + } + else + { + renderer.renderFaceXPos(p_147799_1_, (double)((float)p_147799_2_ - 1.0F + f1), (double)p_147799_3_, (double)p_147799_4_, iicon); + renderer.renderFaceXNeg(p_147799_1_, (double)((float)p_147799_2_ + 1.0F - f1), (double)p_147799_3_, (double)p_147799_4_, iicon); + renderer.renderFaceZPos(p_147799_1_, (double)p_147799_2_, (double)p_147799_3_, (double)((float)p_147799_4_ - 1.0F + f1), iicon); + renderer.renderFaceZNeg(p_147799_1_, (double)p_147799_2_, (double)p_147799_3_, (double)((float)p_147799_4_ + 1.0F - f1), iicon); + renderer.renderFaceYPos(p_147799_1_, (double)p_147799_2_, (double)((float)p_147799_3_ - 1.0F) + d0, (double)p_147799_4_, iicon1); + } + + renderer.setOverrideBlockTexture(iicon); + double d3 = 0.25D; + double d4 = 0.25D; + renderer.setRenderBounds(d3, d4, d3, 1.0D - d3, d0 - 0.002D, 1.0D - d3); + + if (p_147799_6_) + { + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + renderer.renderFaceYNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + } + else + { + renderer.renderStandardBlock(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_); + } + + if (!p_147799_6_) + { + double d1 = 0.375D; + double d2 = 0.25D; + renderer.setOverrideBlockTexture(iicon); + + if (i1 == 0) + { + renderer.setRenderBounds(d1, 0.0D, d1, 1.0D - d1, 0.25D, 1.0D - d1); + renderer.renderStandardBlock(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_); + } + + if (i1 == 2) + { + renderer.setRenderBounds(d1, d4, 0.0D, 1.0D - d1, d4 + d2, d3); + renderer.renderStandardBlock(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_); + } + + if (i1 == 3) + { + renderer.setRenderBounds(d1, d4, 1.0D - d3, 1.0D - d1, d4 + d2, 1.0D); + renderer.renderStandardBlock(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_); + } + + if (i1 == 4) + { + renderer.setRenderBounds(0.0D, d4, d1, d3, d4 + d2, 1.0D - d1); + renderer.renderStandardBlock(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_); + } + + if (i1 == 5) + { + renderer.setRenderBounds(1.0D - d3, d4, d1, 1.0D, d4 + d2, 1.0D - d1); + renderer.renderStandardBlock(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_); + } + } + + renderer.clearOverrideBlockTexture(); + return true; + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelSmallWaterwheel.java b/src/main/java/shift/sextiarysector/renderer/model/ModelSmallWaterwheel.java new file mode 100644 index 0000000..23d7a3c --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelSmallWaterwheel.java @@ -0,0 +1,84 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelSmallWaterwheel extends ModelBase +{ + //fields + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape2_1; + ModelRenderer Shape2_2; + ModelRenderer Shape2_3; + ModelRenderer Shape3; + + public ModelSmallWaterwheel() + { + textureWidth = 64; + textureHeight = 64; + + Shape1 = new ModelRenderer(this, 18, 0); + Shape1.addBox(-2F, -2F, -8F, 4, 4, 16); + Shape1.setRotationPoint(0F, 0F, 0F); + Shape1.setTextureSize(64, 64); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 0, 0); + Shape2.addBox(-1F, -24F, -6F, 2, 48, 7); + Shape2.setRotationPoint(0F, 0F, 0F); + Shape2.setTextureSize(64, 64); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape2_1 = new ModelRenderer(this, 0, 0); + Shape2_1.addBox(-1F, -24F, -6F, 2, 48, 7); + Shape2_1.setRotationPoint(0F, 0F, 0F); + Shape2_1.setTextureSize(64, 64); + Shape2_1.mirror = true; + setRotation(Shape2_1, 0F, 0F, 0.7853982F); + Shape2_2 = new ModelRenderer(this, 0, 0); + Shape2_2.addBox(-1F, -24F, -6F, 2, 48, 7); + Shape2_2.setRotationPoint(0F, 0F, 0F); + Shape2_2.setTextureSize(64, 64); + Shape2_2.mirror = true; + setRotation(Shape2_2, 0F, 0F, -0.7853982F); + Shape2_3 = new ModelRenderer(this, 0, 0); + Shape2_3.addBox(-1F, -24F, -6F, 2, 48, 7); + Shape2_3.setRotationPoint(0F, 0F, 0F); + Shape2_3.setTextureSize(64, 64); + Shape2_3.mirror = true; + setRotation(Shape2_3, 0F, 0F, 1.570796F); + Shape3 = new ModelRenderer(this, 18, 20); + Shape3.addBox(-4F, -4F, 4.11F, 8, 8, 4); + Shape3.setRotationPoint(0F, 0F, 0F); + Shape3.setTextureSize(64, 64); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0F, 0F); + } + + 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); + Shape2.render(f5); + Shape2_1.render(f5); + Shape2_2.render(f5); + Shape2_3.render(f5); + Shape3.render(f5); + } + + public void renderinOut(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); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 8316b94..a164cfd 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -16,6 +16,8 @@ tile.ss.farmland.name=Farm Land tile.ss.bottle.name=Fluid Bottle tile.ss.fluid_crafter.name=Fluid Crafter +tile.ss.wood_hopper.name=Wood Hopper + tile.ss.chunk_loader.name=Time Loader tile.ss.small_windmill.name=Small Windmill diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/hopper_inside.png b/src/main/resources/assets/sextiarysector/textures/blocks/hopper_inside.png new file mode 100644 index 0000000000000000000000000000000000000000..c4ed6f37f0f7b39cadfecf7f5c0a33462ce0b269 GIT binary patch literal 569 zcmV-90>=G`P)u<0x*ksWucLk$n7= z!jJD?J?DXcmqr1=-D&3CzhAGXGx}-De0#n!h6NWTSj9yFm`nK(G^NB`3Qt0+lqBNmqu-dXcV5tya|`|ze%3Pj7CA-3|p_5!&=r( zQcFdX_I)P=Ue^_=hTDJ!5oCB^82v+FAJ@9}wj_`2lk$2AG-uP`cv+~nDgQYrYgv2n zy$01HoVT;%;=q7v6sDAT8scA-ZMkr0&OSeOGPzAtlQP}JS2x3}A+4|$gd^Rw|m)_6`8N8n#@w(cMVi^iXN<8CvOD z%%CeXa-T}*4+356S4o+`>B@-00000NkvXX Hu0mjfJ0|rs literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/hopper_outside.png b/src/main/resources/assets/sextiarysector/textures/blocks/hopper_outside.png new file mode 100644 index 0000000000000000000000000000000000000000..c4bfb02e1a31426b0ce6ecdacc449a8e7aac5a67 GIT binary patch literal 609 zcmV-n0-pVeP)000McNliru-U}WFBQ&|BQxgCH0q#je zK~y-)jgw1q6G04yzwXvdk2Cg^O>oG<6f0Q3ii2=gF2XUga5X(i#ad0kE9hjJ;2L0PZVIIPJNw-eylO6uotx5Di+4=596x zz}ou1k=)Iuh|x$+iP)b=8G08A66Xf2t;_q>AA!gIj2QwsX+&v_nM|0>@;`~M^4Oot zSkiW^Y|ZANh`Ap**c^@w(F1U+YkC(-@-+uO3VuHp+Z;1s5HXsCt$07F{^%S|d)7X& z>gENRe%YqAH47gBKXQ zK~y-)rIS5Q!$1&5-^@DkCbp5%q(ev`D4^mXoPmO#D{zM#fGcnjuD}IotSG-0-WdwZ zQ6wsx*R1rd^ma5mBM*019^;grEGPi(PBJH`kjzi{IqS`ytSll=kC6-6Vj%~hZjSsV z0kFs;b#r7ADn34q%*>hlf!FshVF0U_8xNwWs<5_}p;*WfRkTgU80zLon+(l@vaHI% zf@M{b1x4MAbl43Rq{9w3Lq(M^D+UX~tROk#EBM}Q0mfIb$YUpHlbvis(9{rw?iYI7 z=pNWl`@bIKMI1c`89==k-kz_$zvy3BR^{pJvqc`6Of%|zw>olvd+FsoqClbx15QE^ j96!qpaD-$K6wIAp#ISc{!d>qy00000NkvXXu0mjfC~BGz literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/wood_hopper.png b/src/main/resources/assets/sextiarysector/textures/items/wood_hopper.png new file mode 100644 index 0000000000000000000000000000000000000000..1897a89806898ec15c7e1b9fd7ef61524f876921 GIT binary patch literal 832 zcmV-G1Hb%000McNliru-U}WFB@D;>ObY-20?kQ8 zK~y-)eUe*9lnE5af9IQTE{-}HrCH>}Dn)3Qr3h-Mwhh{_eb6pY32l&N^-vUS7rH?O zQHxML3B?9s!PZl|vHQ>sDp5&tW^6thd9z4Hlw!cgQkj|K-bQ4VX0Y=bC5S&0pIkqv-I!k{al;qOvJek_>* zK(VWk=`%y7-6~YL9ppPLeEpBs?j!^8G~0Hbma``sh-xWR0GG`{I1%I5@*IHC`@X_( z+Qe=hl|MKbXWqhc9<}&T#vA^;*~qdjjRH{NcHl0yQIKoNMscA^D4OQL@hcLGC$fuG zfD26*C~=pQ>zYjSSRv1$U{!@keAEx|WQNR$N$}m<3CfhHmZEOc9{K~X8R+few=?Ym zkngl)?~f-l^hI_bt@$yxU(S-J{v`hQ8UgJGS+jLJxuunCt*v9n%9Y&ldJ#Z6AKt=|Q%LoyYNizx z;YQ>Bzz~HF2a{7NcGuL9J6*W^PdjVo&)~1N9#loa5aDS37Cr+i4kAQ6lQ7x<0000< KMNUMnLSTX$-h$@< literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/small_waterwheel.png b/src/main/resources/assets/sextiarysector/textures/models/small_waterwheel.png new file mode 100644 index 0000000000000000000000000000000000000000..8d42198f8d8459e0c7d57d02d36685fb6b9fa5b3 GIT binary patch literal 2144 zcmV-m2%qVGd000McNliru-U}TJFd2h%4*LKA2kl8j zK~#9!?V4R|99I>`f3qL6lifIu*E1zqXVY~;wlQ^ZQmPoG0-7oyH3}6{0jc5zMGyr6 z5{O550$zCN6HpQ%m8uW$0HLA?@?zwsqG{@UxGq*561#R9do6iC8hgFY?8nUIVRI+5 zYkTb^o;Wr>(n@>x?%X@~Kj-|<|J*wY4Xo$XadEp?MiCa8rg7xts|p_3AAb2&0T9;> zZWqg(?;qup**StfKil*z{PdN7c`|pPQKxB|Y|=D@2;#LFo11Fpe6Bl*Wm}{^$)frL zp3U2EWKGim@F^hh-sF68PQ~x%apO}6Ayx+f(=;pv=#o>Rxg%}l!HM>(nFfWd3k z5cuBLKj*kXIIIFNH&-GYR(bjLca@dm0Dy0Nc|SMOQ^a)x+qOLeK%I zs%7Rq^_!VAgI7j*{!oV}Bq%u`J)6ha+=S2Py912CrzqY4@Zym!7UO`MnKW_T;OzM! zC*A?h^bE}7fCshSE2GZ%0NwlBIQRY-M-D!L-{&J3@OdH!19I_$*D_B0%Ty%4cP8~E zIpF2j-+iDPkzOT1fAg(D$`y;h_5Md@1yA&NKrSe*8#N1ebAy``yyAd*fRBCYNqmap zZ~%zlD}TPc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Transfer-Encoding: 8bit 連携MODの読み込み方を変更 --- .../shift/sextiarysector/SextiarySector.java | 3 +- .../shift/sextiarysector/plugin/IPlugin.java | 12 ++- .../plugin/PluginAppleMilk.java | 25 +++++- .../plugin/PluginComputerCraft.java | 26 +++++- .../sextiarysector/plugin/PluginTHKaguya.java | 24 +++++- .../sextiarysector/plugin/SSPlugins.java | 80 ++++++++++++++++--- 6 files changed, 147 insertions(+), 23 deletions(-) diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index f7bd929..7ab06c2 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -91,7 +91,8 @@ public void preInit(FMLPreInitializationEvent event) ((ArrayList) cc).add(ITileEntityProvider.class); ExtendedClassSupport.loadAndGenerateNewExtendedClass(BlockCauldron.class, Block.class, BlockSSCauldron.class, ITileEntityProvider.class, cc); */ - + SSPlugins.initModHelper(); + SSPlugins.prePlugins(event); } diff --git a/src/main/java/shift/sextiarysector/plugin/IPlugin.java b/src/main/java/shift/sextiarysector/plugin/IPlugin.java index eb33e3b..056a761 100644 --- a/src/main/java/shift/sextiarysector/plugin/IPlugin.java +++ b/src/main/java/shift/sextiarysector/plugin/IPlugin.java @@ -1,11 +1,17 @@ package shift.sextiarysector.plugin; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + public interface IPlugin { - public void prePlugin(); + public String getModName(); + + public void prePlugin(FMLPreInitializationEvent event); - public void initPlugin(); + public void initPlugin(FMLInitializationEvent event); - public void postPlugin(); + public void postPlugin(FMLPostInitializationEvent event); } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java b/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java index 45f6ba2..c67a028 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java @@ -1,13 +1,34 @@ package shift.sextiarysector.plugin; +import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; -public class PluginAppleMilk { +public class PluginAppleMilk implements IPlugin { - public static void registeDCsAppleMilk(FMLPostInitializationEvent event) { + @Override + public void prePlugin(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + } + + @Override + public void initPlugin(FMLInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + @Override + public void postPlugin(FMLPostInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ } + @Override + public String getModName() { + // TODO 自動生成されたメソッド・スタブ + return "AppleMilk"; + } + + } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java b/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java index 8072919..02a47c6 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java @@ -9,6 +9,9 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SSItems; import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; import dan200.computercraft.api.ComputerCraftAPI; import dan200.computercraft.api.peripheral.IPeripheral; import dan200.computercraft.api.turtle.ITurtleAccess; @@ -18,14 +21,27 @@ import dan200.computercraft.api.turtle.TurtleUpgradeType; import dan200.computercraft.api.turtle.TurtleVerb; -public class PluginComputerCraft{ +public class PluginComputerCraft implements IPlugin{ - public static void initPlugin(){ + @Override + public void prePlugin(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void initPlugin(FMLInitializationEvent event) { ComputerCraftAPI.registerTurtleUpgrade(new TurtleGearTool(420,new ItemStack(SSItems.woodGear,1))); } + @Override + public void postPlugin(FMLPostInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + public static class TurtleGearTool implements ITurtleUpgrade{ public int id; @@ -145,4 +161,10 @@ public void update(ITurtleAccess turtle, TurtleSide side) { } + @Override + public String getModName() { + return "ComputerCraft"; + } + + } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java b/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java index 0bd0556..08a06db 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java @@ -4,13 +4,23 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import shift.mceconomy2.api.MCEconomyAPI; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; -public class PluginTHKaguya { +public class PluginTHKaguya implements IPlugin{ public static Item thSpellCard; - public static void initPlugin() { + + @Override + public void prePlugin(FMLPreInitializationEvent event) { + + } + + @Override + public void initPlugin(FMLInitializationEvent event) { thSpellCard = GameRegistry.findItem("THKaguyaMod", "Spell Card"); @@ -18,4 +28,14 @@ public static void initPlugin() { } + @Override + public void postPlugin(FMLPostInitializationEvent event) { + + } + + @Override + public String getModName() { + return "THKaguya"; + } + } diff --git a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java index bb544d9..568ce60 100644 --- a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java +++ b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java @@ -1,5 +1,7 @@ package shift.sextiarysector.plugin; +import java.util.ArrayList; + import org.apache.logging.log4j.Level; import shift.sextiarysector.Config; @@ -7,28 +9,28 @@ import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; public class SSPlugins { + public static ArrayList plugins = new ArrayList(); + public static boolean modDCsAppleMilk; public static boolean modComputerCraft; public static boolean modTHKaguya; public static void initModHelper() { - modDCsAppleMilk = Loader.isModLoaded("DCsAppleMilk"); - modComputerCraft = Loader.isModLoaded("ComputerCraft"); - modTHKaguya = Loader.isModLoaded("THKaguyaMod"); - - } - - public static void initPlugins(FMLInitializationEvent event) { + modDCsAppleMilk = Loader.isModLoaded("DCsAppleMilk") && Config.modDCsAppleMilk; + modComputerCraft = Loader.isModLoaded("ComputerCraft") && Config.modComputerCraft; + modTHKaguya = Loader.isModLoaded("THKaguyaMod") && Config.modTHKaguya; - if (modDCsAppleMilk && Config.modDCsAppleMilk) { + if (modDCsAppleMilk) { try { SextiarySector.Log.info("DCsAppleMilk Plugin is loaded"); + plugins.add(new PluginAppleMilk()); } catch (Exception e) { @@ -38,12 +40,12 @@ public static void initPlugins(FMLInitializationEvent event) { } } - if (modComputerCraft && Config.modComputerCraft) { + if (modComputerCraft) { try { - PluginComputerCraft.initPlugin(); SextiarySector.Log.info("ComputerCraft Plugin is loaded"); + plugins.add(new PluginComputerCraft()); } catch (Exception e) { @@ -53,13 +55,12 @@ public static void initPlugins(FMLInitializationEvent event) { } } - System.out.println("AAAAAA"+modTHKaguya+" : "+Config.modTHKaguya); - if (modTHKaguya && Config.modTHKaguya) { + if (modTHKaguya) { try { - PluginTHKaguya.initPlugin(); SextiarySector.Log.info("THKaguya Plugin is loaded"); + plugins.add(new PluginTHKaguya()); } catch (Exception e) { @@ -71,8 +72,61 @@ public static void initPlugins(FMLInitializationEvent event) { } + public static void prePlugins(FMLPreInitializationEvent event) { + + for(IPlugin p : plugins) + { + try { + + SextiarySector.Log.info(p.getModName()+" Plugin is pre init"); + p.prePlugin(event); + + } catch (Exception e) { + + SextiarySector.Log.log(Level.WARN, p.getModName() +" integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.catching(e); + + } + } + + } + + public static void initPlugins(FMLInitializationEvent event) { + + for(IPlugin p : plugins) + { + try { + + SextiarySector.Log.info(p.getModName()+" Plugin is init"); + p.initPlugin(event); + + } catch (Exception e) { + + SextiarySector.Log.log(Level.WARN, p.getModName() +" integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.catching(e); + + } + } + + } + public static void postPlugins(FMLPostInitializationEvent event) { + for(IPlugin p : plugins) + { + try { + + SextiarySector.Log.info(p.getModName()+" Plugin is post init"); + p.postPlugin(event); + + } catch (Exception e) { + + SextiarySector.Log.log(Level.WARN, p.getModName() +" integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.catching(e); + + } + } + } } From 4fbb5961d33d899a2d1f64b8810b8cb268dc65e7 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 6 Dec 2014 00:16:04 +0900 Subject: [PATCH 37/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=83=8A?= =?UTF-8?q?=E3=82=A4=E3=83=95=E3=81=A8=E3=82=AF=E3=83=AA=E3=83=BC=E3=83=91?= =?UTF-8?q?=E3=82=92=E5=80=92=E3=81=99=E3=81=A8=E9=A0=AD=E3=82=92=E3=83=89?= =?UTF-8?q?=E3=83=AD=E3=83=83=E3=83=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・ナイフに効果を追加 ・鉱石粉を製錬できるように --- .../java/shift/sextiarysector/SSEvents.java | 2 + .../shift/sextiarysector/SSOreDictionary.java | 5 +- .../java/shift/sextiarysector/SSRecipes.java | 2 + .../event/CommonEventHandler.java | 50 ++++++ .../event/SantaEventHandler.java | 150 ++++++++++++++++++ .../sextiarysector/recipe/RecipesFurnace.java | 16 ++ .../sextiarysector/recipe/RecipesTool.java | 11 ++ 7 files changed, 234 insertions(+), 2 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/event/SantaEventHandler.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java diff --git a/src/main/java/shift/sextiarysector/SSEvents.java b/src/main/java/shift/sextiarysector/SSEvents.java index bc2a77f..4ff817f 100644 --- a/src/main/java/shift/sextiarysector/SSEvents.java +++ b/src/main/java/shift/sextiarysector/SSEvents.java @@ -26,6 +26,8 @@ public static void preInit(FMLPreInitializationEvent event){ if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new TabManager()); MinecraftForge.ORE_GEN_BUS.register(new WorldEventHandler()); + //MinecraftForge.EVENT_BUS.register(new SantaEventHandler()); + } } diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index a336b0e..8fc0220 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -9,14 +9,15 @@ public static void init(){ OreDictionary.registerOre("craftingSugar", Items.sugar); - //素材 プレート OreDictionary.registerOre("plateWood", SSBlocks.woodPlate); - OreDictionary.registerOre("gearWood", SSItems.woodGear); OreDictionary.registerOre("gearStone", SSItems.stoneGear); + OreDictionary.registerOre("dustIron", SSItems.ironDust); + OreDictionary.registerOre("dustGold", SSItems.goldDust); + } } diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index 22ebf92..2a7d952 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -7,6 +7,7 @@ import shift.sextiarysector.recipe.RecipeSimpleMachine; import shift.sextiarysector.recipe.RecipesCore; import shift.sextiarysector.recipe.RecipesFluidFurnace; +import shift.sextiarysector.recipe.RecipesFurnace; import shift.sextiarysector.recipe.RecipesFurnaceCraft; import shift.sextiarysector.recipe.RecipesLoom; import shift.sextiarysector.recipe.RecipesMachine; @@ -45,6 +46,7 @@ public static void initRecipes(){ CraftingManager m = CraftingManager.getInstance(); + RecipesFurnace.addRecipes(); RecipesNormalBlock.addRecipes(m); RecipesMachine.addRecipes(m); diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index 80ca489..d76923d 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -1,5 +1,8 @@ package shift.sextiarysector.event; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Items; @@ -8,6 +11,7 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.world.World; +import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; @@ -18,6 +22,7 @@ import shift.sextiarysector.api.event.BlockBottleEvent; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockMonitor.MonitorType; +import shift.sextiarysector.item.ItemKnife; import shift.sextiarysector.module.ModuleAchievement; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -162,4 +167,49 @@ public void onPlayerEatenEvent(BlockBottleEvent event) { } + @SubscribeEvent + public void onLivingDrops(LivingDropsEvent event) + { + + if (event.source.getSourceOfDamage() == null || event.source.getEntity() == null) { + return; + } + + Entity entity = event.source.getEntity(); + + if (entity instanceof EntityPlayer) + { + EntityPlayer p = (EntityPlayer)entity; + + ItemStack item = p.getCurrentEquippedItem(); + + if(item == null){ + return; + } + + if(item.getItem() instanceof ItemKnife){ + + double x = event.entityLiving.posX; + double y = event.entityLiving.posY; + double z = event.entityLiving.posZ; + + if(event.entityLiving instanceof EntityCreeper){ + event.drops.add(new EntityItem(event.entityLiving.worldObj, x, y, z, new ItemStack(Items.skull, 1, 4))); + } + + } + + + } + + } + + + + + + + + + } diff --git a/src/main/java/shift/sextiarysector/event/SantaEventHandler.java b/src/main/java/shift/sextiarysector/event/SantaEventHandler.java new file mode 100644 index 0000000..b0a1af7 --- /dev/null +++ b/src/main/java/shift/sextiarysector/event/SantaEventHandler.java @@ -0,0 +1,150 @@ +package shift.sextiarysector.event; + +import java.util.Calendar; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntityChest; +import net.minecraft.world.World; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +/** + * クリスマス用のEvent
+ * FMLPreInitializationEvent内でMinecraftForge.EVENT_BUSに登録すると
+ * サンタさんが枕元にプレゼントを置きに来ます + * + * @version 1.0.0 + * @see FMLPreInitializationEvent + * @author Shift02 + */ +public class SantaEventHandler { + + /** クリスマスの月 */ + private static final int CHRISTMAS_MONTH = 12; + + /** クリスマスの日 */ + private static final int CHRISTMAS_DATE = 25; + + /** + * プレイヤーが寝ているかの監視Event + * @param event + */ + @SubscribeEvent + public void LivingSleepingEvent(LivingUpdateEvent event) { + + //Clientはキャンセル + if (event.entityLiving.worldObj.isRemote) { + return; + } + + //クリスマス以外はキャンセル + if (!this.isChristmas()) { + return; + } + + //プレイヤー以外はキャンセル + //村人にあげるプレゼントはありません┃━┏┃ + if (!(event.entityLiving instanceof EntityPlayer)) { + return; + } + + EntityPlayer player = (EntityPlayer) event.entityLiving; + + //すでに受け取っている場合はキャンセル + if (this.hasPresent(player)){ + return; + } + + if (!event.entityLiving.worldObj.isRemote) { + + if (player.isPlayerFullyAsleep()) { + + int x = (int) player.posX; + int y = (int) player.posY; + int z = (int) player.posZ; + World world = player.worldObj; + + int range = 2; + for (int i = -range; i < range; i++){ + for (int j = -range; j < range; j++) { + for(int k = -range; k < range; k++){ + if (world.isAirBlock(x + i, y + k, z + j)) { + if (generateChest(world, x + i, y + k, z + j)) { + this.receivePresent(player); + return; + } + } + } + } + } + + } + + } + + } + + /** + * プレゼント用チェストの生成 + * @param world ワールド + * @param x x座標 + * @param y y座標 + * @param z z座標 + * @return 生成できたらtrue + */ + protected boolean generateChest(World world, int x, int y, int z) + { + boolean isGen = world.setBlock(x, y, z,Blocks.chest); + + if (isGen) + { + TileEntityChest tileEntityChest = (TileEntityChest)world.getTileEntity(x, y, z); + if (tileEntityChest != null) { + + for(int i=0; i<27; i++){ + tileEntityChest.setInventorySlotContents(i,new ItemStack(Blocks.gravel,64)); + } + + return true; + + } + } + + return false; + } + + /** + * 今日がクリスマスかどうか調べる + * @return クリスマスならtrue + */ + private boolean isChristmas(){ + + Calendar calendar = Calendar.getInstance(); + + return calendar.get(Calendar.DATE) == CHRISTMAS_DATE && calendar.get(calendar.MONTH) == CHRISTMAS_MONTH - 1; + + } + + /** + * サンタさんからプレゼントを受け取ったかどうか
+ * 一人一個ですよ! + * @param player 調べるプレイヤー + * @return 受けとっている場合はtrue + */ + private boolean hasPresent(EntityPlayer player){ + return player.getEntityData().hasKey("santa:"+Calendar.getInstance().get(Calendar.YEAR)); + } + + + /** + * プレゼントを渡す時に呼ぶメソッド + * @param player 渡すプレイヤー + */ + private void receivePresent(EntityPlayer player){ + player.getEntityData().setBoolean("santa:"+Calendar.getInstance().get(Calendar.YEAR), true); + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java new file mode 100644 index 0000000..afc23ad --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java @@ -0,0 +1,16 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSItems; +import cpw.mods.fml.common.registry.GameRegistry; + +public class RecipesFurnace { + + public static void addRecipes() + { + GameRegistry.addSmelting(new ItemStack(SSItems.ironDust),new ItemStack(Items.iron_ingot),0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.goldDust),new ItemStack(Items.gold_ingot),0.1f); + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java index e990e0b..d03e382 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java @@ -22,6 +22,17 @@ public static void addRecipes(CraftingManager p_77608_1_) })); } + //Knife + Item[] knife = new Item[]{SSItems.woodKnife,SSItems.stoneKnife,SSItems.ironKnife,SSItems.goldKnife,SSItems.diamondKnife}; + for(int i = 0;i Date: Sat, 6 Dec 2014 23:43:13 +0900 Subject: [PATCH 38/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E6=B0=B4?= =?UTF-8?q?=E8=BB=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 水車を追加 --- .../java/shift/sextiarysector/SSBlocks.java | 7 + .../block/BlockSmallWaterwheel.java | 129 ++++++++++++++++++ .../event/ClientEventHandler.java | 119 ++++++++++++++++ .../sextiarysector/proxy/ClientProxy.java | 5 + .../sextiarysector/proxy/CommonProxy.java | 1 + .../block/RendererSmallWaterwheel.java | 19 +-- .../renderer/model/ModelSmallWaterwheel.java | 4 +- .../tileentity/TileEntitySmallWaterwheel.java | 74 ++++++++++ .../assets/sextiarysector/lang/en_US.lang | 1 + 9 files changed, 348 insertions(+), 11 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockSmallWaterwheel.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 79a6093..bd2d433 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -28,6 +28,7 @@ import shift.sextiarysector.block.BlockShaft; import shift.sextiarysector.block.BlockShippingBox; import shift.sextiarysector.block.BlockSimpleMachine; +import shift.sextiarysector.block.BlockSmallWaterwheel; import shift.sextiarysector.block.BlockSmallWindmill; import shift.sextiarysector.block.BlockWindmill; import shift.sextiarysector.block.BlockWoodHopper; @@ -51,6 +52,7 @@ import shift.sextiarysector.tileentity.TileEntitySSCrop; import shift.sextiarysector.tileentity.TileEntityShaft; import shift.sextiarysector.tileentity.TileEntitySimpleMachine; +import shift.sextiarysector.tileentity.TileEntitySmallWaterwheel; import shift.sextiarysector.tileentity.TileEntitySmallWindmill; import shift.sextiarysector.tileentity.TileEntityWindmill; import cpw.mods.fml.common.registry.GameRegistry; @@ -82,6 +84,7 @@ public class SSBlocks { public static Block smallWindmill; public static Block windmill; + public static Block smallWaterwheel; public static Block millstone; public static Block loom; @@ -225,6 +228,10 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntityWindmill.class, "Windmill"); GameRegistry.registerBlock(windmill, "Windmill"); + smallWaterwheel = new BlockSmallWaterwheel().setBlockName("ss.small_waterwheel").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSMachine); + GameRegistry.registerTileEntity(TileEntitySmallWaterwheel.class, "SmallWaterwheel"); + GameRegistry.registerBlock(smallWaterwheel, "SmallWaterwheel"); + GameRegistry.registerTileEntity(TileEntitySimpleMachine.class, "SimpleMachine"); millstone = new BlockSimpleMachine("millstone",20,SSRecipes.millstone,1).setBlockName("ss.millstone").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerBlock(millstone, "Millstone"); diff --git a/src/main/java/shift/sextiarysector/block/BlockSmallWaterwheel.java b/src/main/java/shift/sextiarysector/block/BlockSmallWaterwheel.java new file mode 100644 index 0000000..1780928 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockSmallWaterwheel.java @@ -0,0 +1,129 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntityDirection; +import shift.sextiarysector.tileentity.TileEntitySmallWaterwheel; + +public class BlockSmallWaterwheel extends BlockContainer{ + + public BlockSmallWaterwheel() { + super(Material.wood); + this.setHardness(0.8F); + } + + @Override + public void onBlockAdded(World par1World, int par2, int par3, int par4) + { + super.onBlockAdded(par1World, par2, par3, par4); + this.setDefaultDirection(par1World, par2, par3, par4); + } + + private void setDefaultDirection(World par1World, int par2, int par3, int par4) + { + if (!par1World.isRemote) + { + Block block = par1World.getBlock(par2, par3, par4 - 1); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); + + byte b0 = 3; + + if (block.func_149730_j() && !block1.func_149730_j()) + { + b0 = 3; + } + + if (block1.func_149730_j() && !block.func_149730_j()) + { + b0 = 2; + } + + if (block2.func_149730_j() && !block3.func_149730_j()) + { + b0 = 5; + } + + if (block3.func_149730_j() && !block2.func_149730_j()) + { + b0 = 4; + } + + ((TileEntityDirection) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection + .getOrientation(b0); + + //par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); + } + } + + @Override + public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, + ItemStack par6ItemStack) + { + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + + if (l == 0) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); + ((TileEntityDirection) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection + .getOrientation(2); + } + + if (l == 1) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); + ((TileEntityDirection) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection + .getOrientation(5); + + } + + if (l == 2) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); + ((TileEntityDirection) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection + .getOrientation(3); + + } + + if (l == 3) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); + ((TileEntityDirection) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection + .getOrientation(4); + + } + + par1World.markBlockForUpdate(par2, par3, par4); + + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.smallWaterwheel; + } + + @Override + public TileEntity createNewTileEntity(World world, int p_149915_2_) { + return new TileEntitySmallWaterwheel(); + } +} diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 0ea5454..01be10a 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -8,11 +8,13 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiIngameMenu; import net.minecraft.client.gui.achievement.GuiStats; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.client.event.TextureStitchEvent; @@ -179,4 +181,121 @@ public void preVanillaTextureStitchEvent(TextureStitchEvent.Pre event){ } + /* + //車軸の線の描写 + @SubscribeEvent + public void onDrawBlockHighlight(DrawBlockHighlightEvent event) { + + EntityPlayer player = event.player; + ItemStack itemstack = event.currentItem; + MovingObjectPosition target = event.target; + + if(player == null) + { + return; + } + + + //if(itemstack == null) + //{ + // return; + // } + + // /*if(!(Item.itemsList[itemstack.itemID] instanceof ItemMachineHammer)) + //{ + // return; + //} + + //if(target.typeOfHit != EnumMovingObjectType.TILE) + //{ + // return; + //} +// + //if(player.worldObj.getBlockId(target.blockX, target.blockY, target.blockZ)!=PluginPI.Axle.blockID){ + // return; + //} + + + double x = target.blockX; + double y = target.blockY; + double z = target.blockZ; + + //TileEntityAxle tileEntity = (TileEntityAxle)player.worldObj.getBlockTileEntity(target.blockX, target.blockY, target.blockZ); + + //if(tileEntity==null){ + // return ; + //}/ + + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + //GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + GL11.glLineWidth(2.0F); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDepthMask(false); + + ForgeDirection d = ForgeDirection.getOrientation(event.target.sideHit); + + d = d.getRotation(ForgeDirection.UP); + + double d0 = player.lastTickPosX + (player.posX - player.lastTickPosX) * event.partialTicks; + double d1 = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks; + double d2 = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks; + + float f1 = 0.002F; + + GL11.glColor4f(1.0F, 0.0F, 0.0F, 0.8F); + double x1 = x + d.offsetX; + double y1 = y + d.offsetY; + double z1 = z + d.offsetZ; + AxisAlignedBB axisAlignedBB = AxisAlignedBB.getBoundingBox(x1, y1, z1, x1 + 1.0D, y1 + 1.0D, z1 + 1.0D); + axisAlignedBB = axisAlignedBB.expand(f1, f1, f1).getOffsetBoundingBox(-d0, -d1, -d2); + this.drawOutlinedBoundingBox(axisAlignedBB); + + GL11.glColor4f(0.0F, 1.0F, 0.0F, 0.7F); + double x2 = x - d.offsetX; + double y2 = y - d.offsetY; + double z2 = z - d.offsetZ; + AxisAlignedBB axisAlignedBB2 = AxisAlignedBB.getBoundingBox(x2, y2, z2, x2 + 1.0D, y2 + 1.0D, z2 + 1.0D); + axisAlignedBB2 = axisAlignedBB2.expand(f1, f1, f1).getOffsetBoundingBox(-d0, -d1, -d2); + this.drawOutlinedBoundingBox(axisAlignedBB2); + + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + + GL11.glDepthMask(true); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_BLEND); + + + }*/ + + private void drawOutlinedBoundingBox(AxisAlignedBB par1AxisAlignedBB) + { + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawing(3); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); + tessellator.draw(); + tessellator.startDrawing(3); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); + tessellator.draw(); + tessellator.startDrawing(1); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); + tessellator.draw(); + } + + } diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 88abf7f..fe58593 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -15,6 +15,7 @@ import shift.sextiarysector.renderer.block.RendererHole; import shift.sextiarysector.renderer.block.RendererMonitor; import shift.sextiarysector.renderer.block.RendererShaft; +import shift.sextiarysector.renderer.block.RendererSmallWaterwheel; import shift.sextiarysector.renderer.block.RendererSmallWindmill; import shift.sextiarysector.renderer.block.RendererWindmill; import shift.sextiarysector.renderer.block.RendererWoodHopper; @@ -25,6 +26,7 @@ import shift.sextiarysector.tileentity.TileEntityMonitor; import shift.sextiarysector.tileentity.TileEntitySSChest; import shift.sextiarysector.tileentity.TileEntityShaft; +import shift.sextiarysector.tileentity.TileEntitySmallWaterwheel; import shift.sextiarysector.tileentity.TileEntitySmallWindmill; import shift.sextiarysector.tileentity.TileEntityWindmill; import cpw.mods.fml.client.registry.ClientRegistry; @@ -58,6 +60,7 @@ public void setCustomRenderers() { this.smallWindMillType = RenderingRegistry.getNextAvailableRenderId(); this.windMillType = RenderingRegistry.getNextAvailableRenderId(); + this.smallWaterwheel = RenderingRegistry.getNextAvailableRenderId(); this.chestType = RenderingRegistry.getNextAvailableRenderId(); @@ -79,6 +82,7 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererSmallWindmill()); RenderingRegistry.registerBlockHandler(new RendererWindmill()); + RenderingRegistry.registerBlockHandler(new RendererSmallWaterwheel()); RenderingRegistry.registerBlockHandler(new RendererChest()); @@ -103,6 +107,7 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallWindmill.class, new RendererSmallWindmill()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWindmill.class, new RendererWindmill()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallWaterwheel.class, new RendererSmallWaterwheel()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySSChest.class, new RendererChest()); diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 88064f8..f75fa63 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -19,6 +19,7 @@ public class CommonProxy { public int smallWindMillType; public int windMillType; + public int smallWaterwheel; public int monitorType; diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWaterwheel.java b/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWaterwheel.java index fde1727..368867c 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWaterwheel.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWaterwheel.java @@ -12,8 +12,7 @@ import shift.sextiarysector.SextiarySector; import shift.sextiarysector.renderer.model.ModelSmallWaterwheel; -import shift.sextiarysector.renderer.model.ModelsmallWindMill; -import shift.sextiarysector.tileentity.TileEntitySmallWindmill; +import shift.sextiarysector.tileentity.TileEntitySmallWaterwheel; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; @@ -41,7 +40,7 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB GL11.glRotatef(90, 0, -1, 0); this.bind(windmillTextures); - ((ModelsmallWindMill) modelWaterwheel).renderinOut(null, 0,0,0, 0,0, 1.0f); + ((ModelSmallWaterwheel) modelWaterwheel).renderinOut(null, 0,0,0, 0,0, 1.0f); GL11.glRotatef(-(FMLClientHandler.instance().getClient().getMinecraft().getSystemTime()/50)%360, 0, 0, 1); @@ -53,24 +52,26 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB this.bind(MC_BLOCK_SHEET); } + @Override - public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, - RenderBlocks renderer) { - // TODO 自動生成されたメソッド・スタブ + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,RenderBlocks renderer) { return false; } + @Override public boolean shouldRender3DInInventory(int modelId) { return true; } + @Override public int getRenderId() { - return SextiarySector.proxy.smallWindMillType; + return SextiarySector.proxy.smallWaterwheel; } + @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { - TileEntitySmallWindmill tile = (TileEntitySmallWindmill)tileentity; + TileEntitySmallWaterwheel tile = (TileEntitySmallWaterwheel)tileentity; //System.out.println("renderTileEntityAt"); @@ -103,7 +104,7 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double this.bindTexture(windmillTextures); - ((ModelsmallWindMill) modelWaterwheel).renderinOut(null, 0,0,0, 0,0, 1.0f); + ((ModelSmallWaterwheel) modelWaterwheel).renderinOut(null, 0,0,0, 0,0, 1.0f); //傾きのスピード GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelSmallWaterwheel.java b/src/main/java/shift/sextiarysector/renderer/model/ModelSmallWaterwheel.java index 23d7a3c..04ebafd 100644 --- a/src/main/java/shift/sextiarysector/renderer/model/ModelSmallWaterwheel.java +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelSmallWaterwheel.java @@ -64,13 +64,13 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f Shape2_1.render(f5); Shape2_2.render(f5); Shape2_3.render(f5); - Shape3.render(f5); + Shape1.render(f5); } public void renderinOut(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); + Shape3.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java new file mode 100644 index 0000000..262b71f --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java @@ -0,0 +1,74 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.machine.energy.IEnergyHandler; + +public class TileEntitySmallWaterwheel extends TileEntityDirection{ + + public float rotateStep = 0; + + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + if(!this.isWork()){ + return; + } + + if(this.rotateStep>360){ + this.rotateStep-=360; + } + + this.rotateStep+=2; + + } + + public void updateServerEntity() + { + TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); + if(t!=null && t instanceof IEnergyHandler && this.isWork()){ + + ((IEnergyHandler)t).addEnergy(this.direction, 3, 20, false); + } + + } + + public float getRotateStep() { + return -rotateStep; + } + + boolean isWork(){ + + ForgeDirection d1 = this.getDirection().getRotation(ForgeDirection.UP); + ForgeDirection d2 = this.getDirection().getRotation(ForgeDirection.UP).getOpposite(); + + Block b1 = this.getWorldObj().getBlock(xCoord + d1.offsetX, yCoord - 1, zCoord + d1.offsetZ); + Block b2 = this.getWorldObj().getBlock(xCoord, yCoord - 1, zCoord); + Block b3 = this.getWorldObj().getBlock(xCoord + d2.offsetX, yCoord - 1, zCoord + d1.offsetZ); + + if(!(b1 instanceof BlockLiquid) || !(b2 instanceof BlockLiquid) || !(b3 instanceof BlockLiquid)){ + return false; + } + + return true; + } + + + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index a164cfd..ed3f43a 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -22,6 +22,7 @@ tile.ss.chunk_loader.name=Time Loader tile.ss.small_windmill.name=Small Windmill tile.ss.windmill.name=Windmill +tile.ss.small_waterwheel.name=Small Waterwheel tile.ss.wood_shaft.name=Wood Shaft tile.ss.stone_shaft.name=Stone Shaft From f47e5042bff0bb7f20bd06d7d4e5ef2339572848 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 7 Dec 2014 22:01:51 +0900 Subject: [PATCH 39/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20Steel(Power=203)?= =?UTF-8?q?=E3=81=AE=E6=A9=9F=E6=A2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・Power 3を追加 ・粉砕機を追加 --- .../java/shift/sextiarysector/SSBlocks.java | 25 ++++++++- .../shift/sextiarysector/SSGuiHandler.java | 14 +++-- .../java/shift/sextiarysector/SSItems.java | 23 +++++++- .../shift/sextiarysector/SSOreDictionary.java | 4 ++ .../java/shift/sextiarysector/SSRecipes.java | 6 +- .../shift/sextiarysector/gui/GuiGFTank.java | 2 + .../sextiarysector/gui/GuiPulverizer.java | 19 +++++++ .../nei/NEISextiarySectorConfig.java | 5 ++ .../nei/PulverizerRecipeHandler.java | 40 ++++++++++++++ .../recipe/RecipesFurnaceCraft.java | 8 +++ .../sextiarysector/recipe/RecipesMachine.java | 52 ++++++++++++------ .../recipe/RecipesPulverizer.java | 18 ++++++ .../sextiarysector/recipe/RecipesSawmill.java | 2 +- .../renderer/block/RendererShaft.java | 4 ++ .../assets/sextiarysector/lang/en_US.lang | 14 +++++ .../textures/blocks/machine/pulverizer.png | Bin 0 -> 471 bytes .../blocks/machine/steel_gear_box.png | Bin 0 -> 376 bytes .../blocks/machine/steel_gear_box_in.png | Bin 0 -> 727 bytes .../blocks/machine/steel_gear_box_out.png | Bin 0 -> 738 bytes .../textures/blocks/machine/steel_gf_tank.png | Bin 0 -> 495 bytes .../blocks/machine/steel_gf_tank_in.png | Bin 0 -> 744 bytes .../blocks/machine/steel_gf_tank_out.png | Bin 0 -> 760 bytes .../textures/guis/machine/pulverizer.png | Bin 0 -> 2779 bytes .../textures/guis/machine/pulverizer_nei.png | Bin 0 -> 3049 bytes .../textures/guis/machine/steel_gf_tank.png | Bin 0 -> 2670 bytes .../items/gearforce/steel_gear_storage.png | Bin 0 -> 427 bytes .../gearforce/steel_gear_storage_full.png | Bin 0 -> 943 bytes ...eta => steel_gear_storage_full.png.mcmeta} | 0 .../items/gearforce/stone_gear_storage.png | Bin 0 -> 445 bytes .../gearforce/stone_gear_storage_full.png | Bin 0 -> 934 bytes .../stone_gear_storage_full.png.mcmeta | 5 ++ ...gear_storage.png => wood_gear_storage.png} | Bin ...ge_full.png => wood_gear_storage_full.png} | Bin .../wood_gear_storage_full.png.mcmeta | 5 ++ .../textures/items/ingot/bluestone_ingot.png | Bin 0 -> 351 bytes .../textures/items/ingot/steel_ingot.png | Bin 0 -> 322 bytes .../items/ingot/yellowstone_ingot.png | Bin 0 -> 351 bytes .../textures/items/machine/steel_gear.png | Bin 0 -> 557 bytes .../items/machine/steel_unit_gear.png | Bin 0 -> 1295 bytes .../textures/models/steel_shaft.png | Bin 0 -> 1712 bytes 40 files changed, 219 insertions(+), 27 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/gui/GuiPulverizer.java create mode 100644 src/main/java/shift/sextiarysector/nei/PulverizerRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/pulverizer.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gear_box.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gear_box_in.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gear_box_out.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gf_tank.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gf_tank_in.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gf_tank_out.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/pulverizer.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/pulverizer_nei.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/steel_gf_tank.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/steel_gear_storage.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/steel_gear_storage_full.png rename src/main/resources/assets/sextiarysector/textures/items/gearforce/{gear_storage_full.png.mcmeta => steel_gear_storage_full.png.mcmeta} (100%) create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/stone_gear_storage.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/stone_gear_storage_full.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/stone_gear_storage_full.png.mcmeta rename src/main/resources/assets/sextiarysector/textures/items/gearforce/{gear_storage.png => wood_gear_storage.png} (100%) rename src/main/resources/assets/sextiarysector/textures/items/gearforce/{gear_storage_full.png => wood_gear_storage_full.png} (100%) create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/wood_gear_storage_full.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ingot/bluestone_ingot.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ingot/steel_ingot.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ingot/yellowstone_ingot.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/machine/steel_gear.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/machine/steel_unit_gear.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/steel_shaft.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index bd2d433..0f887f1 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -70,15 +70,18 @@ public class SSBlocks { public static Block woodHopper; + //GF public static Block woodShaft; public static Block stoneShaft; - + public static Block steelShaft; public static Block woodGearBox; public static Block stoneGearBox; + public static Block steelGearBox; public static Block woodGFTank; public static Block stoneGFTank; + public static Block steelGFTank; public static Block woodStoneGearShaft; @@ -91,6 +94,8 @@ public class SSBlocks { public static Block sawmill; + public static Block pulverizer; + public static Block hole; @@ -200,6 +205,10 @@ public static void initBlicks(){ stoneShaft = new BlockShaft(2).setBlockName("ss.stone_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeStone); GameRegistry.registerBlock(stoneShaft,ItemBlockShaft.class, "StoneShaft"); + steelShaft = new BlockShaft(3).setBlockName("ss.steel_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeMetal); + GameRegistry.registerBlock(steelShaft,ItemBlockShaft.class, "SteelShaft"); + + GameRegistry.registerTileEntity(TileEntityGearBox.class, "GearBox"); woodGearBox = new BlockGearBox(Material.wood,1).setBlockName("ss.wood_gear_box").setBlockTextureName("sextiarysector:machine/wood_gear_box").setStepSound(Block.soundTypeWood); GameRegistry.registerBlock(woodGearBox, "WoodGearBox"); @@ -207,14 +216,20 @@ public static void initBlicks(){ stoneGearBox = new BlockGearBox(Material.rock,2).setBlockName("ss.stone_gear_box").setBlockTextureName("sextiarysector:machine/stone_gear_box").setStepSound(Block.soundTypeStone); GameRegistry.registerBlock(stoneGearBox, "StoneGearBox"); + steelGearBox = new BlockGearBox(Material.iron,3).setBlockName("ss.steel_gear_box").setBlockTextureName("sextiarysector:machine/steel_gear_box").setStepSound(Block.soundTypeMetal); + GameRegistry.registerBlock(steelGearBox, "SteelGearBox"); + GameRegistry.registerTileEntity(TileEntityGFTank.class, "GFTank"); - woodGFTank = new BlockGFTank(Material.wood,40,1).setBlockName("ss.wood_gf_tank").setBlockTextureName("sextiarysector:machine/wood_gf_tank").setStepSound(Block.soundTypeWood); + woodGFTank = new BlockGFTank(Material.wood,50,1).setBlockName("ss.wood_gf_tank").setBlockTextureName("sextiarysector:machine/wood_gf_tank").setStepSound(Block.soundTypeWood); GameRegistry.registerBlock(woodGFTank, "WoodGFTank"); - stoneGFTank = new BlockGFTank(Material.rock,41,2).setBlockName("ss.stone_gf_tank").setBlockTextureName("sextiarysector:machine/stone_gf_tank").setStepSound(Block.soundTypeWood); + stoneGFTank = new BlockGFTank(Material.rock,51,2).setBlockName("ss.stone_gf_tank").setBlockTextureName("sextiarysector:machine/stone_gf_tank").setStepSound(Block.soundTypeWood); GameRegistry.registerBlock(stoneGFTank, "StoneGFTank"); + steelGFTank = new BlockGFTank(Material.iron,52,3).setBlockName("ss.steel_gf_tank").setBlockTextureName("sextiarysector:machine/steel_gf_tank").setStepSound(Block.soundTypeMetal); + GameRegistry.registerBlock(steelGFTank, "SteelGFTank"); + GameRegistry.registerTileEntity(TileEntityGearShaft.class, "GearShaft"); woodStoneGearShaft = new BlockGearShaft(1).setBlockName("ss.wood_stone_gear_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); @@ -242,6 +257,10 @@ public static void initBlicks(){ sawmill = new BlockSimpleMachine("sawmill",25,SSRecipes.sawmill,2).setBlockName("ss.sawmill").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerBlock(sawmill, "Sawmill"); + pulverizer = new BlockSimpleMachine("pulverizer",30,SSRecipes.pulverizer,3).setBlockName("ss.pulverizer").setCreativeTab(SextiarySectorAPI.TabSSMachine); + GameRegistry.registerBlock(pulverizer, "Pulverizer"); + + shippingBox = new BlockShippingBox().setBlockName("ss.shipping_box").setBlockTextureName("sextiarysector:shipping_box").setCreativeTab(SextiarySectorAPI.TabSSEconomy); GameRegistry.registerBlock(shippingBox, "ShippingBox"); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 4702ae3..7ec077e 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -18,6 +18,7 @@ import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMagicFurnace; import shift.sextiarysector.gui.GuiMillstone; +import shift.sextiarysector.gui.GuiPulverizer; import shift.sextiarysector.gui.GuiSawmill; import shift.sextiarysector.gui.GuiTabCrafting; import shift.sextiarysector.gui.IServerGuiElement; @@ -52,10 +53,12 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x case 20: case 21: case 25: + case 30: return new ContainerSimpleMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); - case 40: - case 41: + case 50: + case 51: + case 52: return new ContainerGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z)); @@ -109,8 +112,11 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x case 25:return new GuiSawmill(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); - case 40:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),1); - case 41:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),2); + case 30:return new GuiPulverizer(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + + case 50:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),1); + case 51:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),2); + case 52:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),3); case 90:return new GuiMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index be074ee..9d4414d 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -24,11 +24,15 @@ public class SSItems { public static Item woodGear; public static Item stoneGear; + public static Item steelGear; public static Item woodUnitGear; public static Item stoneUnitGear; + public static Item steelUnitGear; public static Item woodGFStorage; + public static Item stoneGFStorage; + public static Item steelGFStorage; public static Item hammer; @@ -47,6 +51,8 @@ public class SSItems { public static Item ironDust; public static Item goldDust; + public static Item steelIngot; + public static Item mithrilIngot; public static Item orichalcumGem; @@ -117,15 +123,27 @@ public static void initItems(){ stoneGear = new Item().setUnlocalizedName("ss.stone_gear").setTextureName("sextiarysector:machine/stone_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerItem(stoneGear, "StoneGear"); + steelGear = new Item().setUnlocalizedName("ss.steel_gear").setTextureName("sextiarysector:machine/steel_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); + GameRegistry.registerItem(steelGear, "SteelGear"); + woodUnitGear = new Item().setUnlocalizedName("ss.wood_unit_gear").setTextureName("sextiarysector:machine/wood_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerItem(woodUnitGear, "WoodUnitGear"); stoneUnitGear = new Item().setUnlocalizedName("ss.stone_unit_gear").setTextureName("sextiarysector:machine/stone_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerItem(stoneUnitGear, "StoneUnitGear"); - woodGFStorage = new ItemGearStorage(1, 10000, 1).setUnlocalizedName("ss.wood_gf_storage").setTextureName("sextiarysector:gearforce/gear_storage").setCreativeTab(SextiarySectorAPI.TabSSMachine); + steelUnitGear = new Item().setUnlocalizedName("ss.steel_unit_gear").setTextureName("sextiarysector:machine/steel_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); + GameRegistry.registerItem(steelUnitGear, "steelUnitGear"); + + woodGFStorage = new ItemGearStorage(1, 10000, 1).setUnlocalizedName("ss.wood_gf_storage").setTextureName("sextiarysector:gearforce/wood_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerItem(woodGFStorage, "WoodGFStorage"); + stoneGFStorage = new ItemGearStorage(2, 10000, 2).setUnlocalizedName("ss.stone_gf_storage").setTextureName("sextiarysector:gearforce/stone_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSMachine); + GameRegistry.registerItem(stoneGFStorage, "StoneGFStorage"); + + steelGFStorage = new ItemGearStorage(3, 10000, 3).setUnlocalizedName("ss.steel_gf_storage").setTextureName("sextiarysector:gearforce/steel_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSMachine); + GameRegistry.registerItem(steelGFStorage, "SteelGFStorage"); + hammer = new ItemHammer().setUnlocalizedName("ss.hammer").setTextureName("sextiarysector:machine/hammer").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerItem(hammer, "Hammer"); @@ -157,6 +175,9 @@ public static void initItems(){ goldDust = new Item().setUnlocalizedName("ss.gold_dust").setTextureName("sextiarysector:dust/gold_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(goldDust, "GoldDust"); + steelIngot = new Item().setUnlocalizedName("ss.steel_ingot").setTextureName("sextiarysector:ingot/steel_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(steelIngot, "SteelIngot"); + mithrilIngot = new Item().setUnlocalizedName("ss.mithril_ingot").setTextureName("sextiarysector:ingot/mithril_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(mithrilIngot, "MithrilIngot"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index 8fc0220..d71ac31 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -14,10 +14,14 @@ public static void init(){ OreDictionary.registerOre("gearWood", SSItems.woodGear); OreDictionary.registerOre("gearStone", SSItems.stoneGear); + OreDictionary.registerOre("gearSteel", SSItems.steelGear); + OreDictionary.registerOre("dustCoal", SSItems.coalDust); OreDictionary.registerOre("dustIron", SSItems.ironDust); OreDictionary.registerOre("dustGold", SSItems.goldDust); + OreDictionary.registerOre("ingotSteel", SSItems.steelIngot); + } } diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index 2a7d952..f406b7f 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -15,6 +15,7 @@ import shift.sextiarysector.recipe.RecipesMagicFurnace; import shift.sextiarysector.recipe.RecipesMillstone; import shift.sextiarysector.recipe.RecipesNormalBlock; +import shift.sextiarysector.recipe.RecipesPulverizer; import shift.sextiarysector.recipe.RecipesSawmill; import shift.sextiarysector.recipe.RecipesTool; @@ -28,6 +29,7 @@ public class SSRecipes { public static RecipeSimpleMachine millstone; public static RecipeSimpleMachine loom; public static RecipeSimpleMachine sawmill; + public static RecipeSimpleMachine pulverizer; public static void initRecipeLists(){ @@ -39,7 +41,7 @@ public static void initRecipeLists(){ millstone = new RecipeSimpleMachine(); loom = new RecipeSimpleMachine(); sawmill = new RecipeSimpleMachine(); - + pulverizer = new RecipeSimpleMachine(); } public static void initRecipes(){ @@ -69,6 +71,8 @@ public static void initRecipes(){ RecipesSawmill.addRecipes(sawmill); + RecipesPulverizer.addRecipes(pulverizer); + } } diff --git a/src/main/java/shift/sextiarysector/gui/GuiGFTank.java b/src/main/java/shift/sextiarysector/gui/GuiGFTank.java index d99bee9..bd84844 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiGFTank.java +++ b/src/main/java/shift/sextiarysector/gui/GuiGFTank.java @@ -17,6 +17,7 @@ public class GuiGFTank extends GUIGearMachine{ private static final ResourceLocation woodGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/wood_gf_tank.png"); private static final ResourceLocation stoneGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/stone_gf_tank.png"); + private static final ResourceLocation steelGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/steel_gf_tank.png"); private int type; protected final TileEntityGFTank tankInventory; float s =0; @@ -158,6 +159,7 @@ protected ResourceLocation getBindTexture() { switch(this.type){ case 1:return this.woodGuiTextures; case 2:return this.stoneGuiTextures; + case 3:return this.steelGuiTextures; } return this.woodGuiTextures; } diff --git a/src/main/java/shift/sextiarysector/gui/GuiPulverizer.java b/src/main/java/shift/sextiarysector/gui/GuiPulverizer.java new file mode 100644 index 0000000..f2fd127 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiPulverizer.java @@ -0,0 +1,19 @@ +package shift.sextiarysector.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import shift.sextiarysector.tileentity.TileEntitySimpleMachine; + +public class GuiPulverizer extends GuiSimpleMachine{ + + private static final ResourceLocation machineGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/pulverizer.png"); + + public GuiPulverizer(InventoryPlayer par1InventoryPlayer, TileEntitySimpleMachine par2TileEntity) { + super(par1InventoryPlayer, par2TileEntity); + } + + @Override + protected ResourceLocation getBindTexture() { + return machineGuiTextures; + } +} diff --git a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java index 215818b..5cba1a8 100644 --- a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java +++ b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java @@ -5,6 +5,7 @@ import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMagicFurnace; import shift.sextiarysector.gui.GuiMillstone; +import shift.sextiarysector.gui.GuiPulverizer; import shift.sextiarysector.gui.GuiSawmill; import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; @@ -24,6 +25,9 @@ public void loadConfig() { API.registerRecipeHandler(new SawmillRecipeHandler()); API.registerUsageHandler(new SawmillRecipeHandler()); + API.registerRecipeHandler(new PulverizerRecipeHandler()); + API.registerUsageHandler(new PulverizerRecipeHandler()); + /* API.registerRecipeHandler(new LoomRecipeHandler()); API.registerUsageHandler(new LoomRecipeHandler()); @@ -69,6 +73,7 @@ public void loadConfig() { API.registerGuiOverlay(GuiMillstone.class, "SS_Millstone"); API.registerGuiOverlay(GuiLoom.class, "SS_Loom"); API.registerGuiOverlay(GuiSawmill.class, "SS_Sawmill"); + API.registerGuiOverlay(GuiPulverizer.class, "SS_Pulverizer"); //API.registerGuiOverlay(GuiBrewingStand.class, "SextiarySectorBrewing"); } diff --git a/src/main/java/shift/sextiarysector/nei/PulverizerRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/PulverizerRecipeHandler.java new file mode 100644 index 0000000..49016d0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/PulverizerRecipeHandler.java @@ -0,0 +1,40 @@ +package shift.sextiarysector.nei; + +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiPulverizer; +import shift.sextiarysector.gui.GuiSimpleMachine; +import shift.sextiarysector.recipe.RecipeSimpleMachine; + +public class PulverizerRecipeHandler extends SimpleMachineRecipeHandler{ + + @Override + public Class getGuiClass() + { + return GuiPulverizer.class; + } + + @Override + Class getHandlerClass() { + return PulverizerRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_Pulverizer"; + } + + @Override + RecipeSimpleMachine getRecipe() { + return SSRecipes.pulverizer; + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/machine/pulverizer_nei.png"; + } + + @Override + String getGuiRecipeName() { + return "ss.pulverizer"; + } +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index 2efb669..a104508 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -38,6 +38,12 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) Items.slime_ball })); + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.steelIngot, 1), + new Object[] { + "dustCoal", + "dustIron" + })); + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.unit, 1), new Object[] { "xxx", "xyx","xxx", Character.valueOf('y'), SSItems.blueStoneSlimeBall, @@ -51,6 +57,8 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) Character.valueOf('y'), "stickWood", })); + + //液体カマド p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.fluidFurnace, 1), new Object[] { "xxx", "xyx","xxx", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index 6229b50..11317e3 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -24,13 +24,14 @@ public static void addRecipes(CraftingManager p_77608_1_) 'a', Blocks.furnace }); - Object[] material = new Object[]{"plankWood","stone"}; - Item[] gear = new Item[]{SSItems.woodGear,SSItems.stoneGear}; - String[] gearOre = new String[]{"gearWood","gearStone"}; - Item[] unit = new Item[]{SSItems.woodUnitGear,SSItems.stoneUnitGear}; - Block[] shaft = new Block[]{SSBlocks.woodShaft, SSBlocks.stoneShaft}; - Block[] tank = new Block[]{SSBlocks.woodGFTank, SSBlocks.stoneGFTank}; - Block[] box = new Block[]{SSBlocks.woodGearBox, SSBlocks.stoneGearBox}; + Object[] material = new Object[]{"plankWood", "stone", "ingotSteel"}; + Item[] gear = new Item[]{SSItems.woodGear, SSItems.stoneGear, SSItems.steelGear}; + String[] gearOre = new String[]{"gearWood", "gearStone", "gearSteel"}; + Item[] unit = new Item[]{SSItems.woodUnitGear, SSItems.stoneUnitGear, SSItems.steelUnitGear}; + Item[] storage = new Item[]{SSItems.woodGFStorage, SSItems.stoneGFStorage, SSItems.steelGFStorage}; + Block[] shaft = new Block[]{SSBlocks.woodShaft, SSBlocks.stoneShaft, SSBlocks.steelShaft}; + Block[] tank = new Block[]{SSBlocks.woodGFTank, SSBlocks.stoneGFTank, SSBlocks.steelGFTank}; + Block[] box = new Block[]{SSBlocks.woodGearBox, SSBlocks.stoneGearBox, SSBlocks.steelGearBox}; //GF Block p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.smallWindmill, 1), @@ -52,7 +53,13 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('x'), SSItems.canvas })); - for(int i=0;i<2;i++){ + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.smallWaterwheel, 1), + new Object[] { "xxx", "xyx","xxx", + Character.valueOf('x'), "plateWood", + Character.valueOf('y'), SSBlocks.steelShaft + })); + + for(int i=0;i<3;i++){ p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(shaft[i], 4), new Object[] { "xzx", "xyx","xzx", @@ -64,7 +71,7 @@ public static void addRecipes(CraftingManager p_77608_1_) p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(tank[i], 1), new Object[] { "yay", "xzx","yxy", Character.valueOf('y'), material[i], - Character.valueOf('x'), SSItems.woodGFStorage, + Character.valueOf('x'), storage[i], Character.valueOf('z'), unit[i], Character.valueOf('a'), gearOre[i] })); @@ -99,14 +106,22 @@ public static void addRecipes(CraftingManager p_77608_1_) p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.sawmill, 1), new Object[] { "yyy", "aza","yxy", Character.valueOf('y'), "plankWood", - Character.valueOf('x'), SSItems.woodGFStorage, + Character.valueOf('x'), SSItems.stoneGFStorage, Character.valueOf('z'), SSItems.stoneUnitGear, Character.valueOf('a'), "ingotIron" })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.pulverizer, 1), + new Object[] { "yay", "aza","yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.steelGFStorage, + Character.valueOf('z'), SSItems.steelUnitGear, + Character.valueOf('a'), "gemDiamond" + })); + //GF Item - for(int i=0;i<2;i++){ + for(int i=0;i<3;i++){ p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gear[i], 2), new Object[] { " x ", "xyx"," x ", @@ -125,13 +140,16 @@ public static void addRecipes(CraftingManager p_77608_1_) } + for(int i=0;i<3;i++){ - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.woodGFStorage, 1), - new Object[] { " y ", "xzx","xzx", - Character.valueOf('z'), SSItems.blueStoneDust, - Character.valueOf('x'), "plankWood", - Character.valueOf('y'), SSItems.woodGear, - })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(storage[i], 1), + new Object[] { " y ", "xzx","xzx", + Character.valueOf('z'), SSItems.blueStoneDust, + Character.valueOf('x'), material[i], + Character.valueOf('y'), gearOre[i], + })); + + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java b/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java new file mode 100644 index 0000000..80a73cc --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java @@ -0,0 +1,18 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSItems; + +public class RecipesPulverizer { + + public static void addRecipes(RecipeSimpleMachine recipe) + { + + recipe.add(new ItemStack(Blocks.coal_ore,1),new ItemStack(SSItems.coalDust, 2)); + recipe.add(new ItemStack(Blocks.iron_ore,1),new ItemStack(SSItems.ironDust, 2)); + recipe.add(new ItemStack(Blocks.gold_ore,1),new ItemStack(SSItems.goldDust, 2)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java b/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java index 4f7e33a..cac87c3 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java @@ -10,7 +10,7 @@ public static void addRecipes(RecipeSimpleMachine recipe) { // - recipe.add(new ItemStack(Blocks.planks,1),new ItemStack(SSBlocks.woodPlate, 8)); + recipe.add(new ItemStack(Blocks.planks,1),new ItemStack(SSBlocks.woodPlate, 4)); } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java b/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java index feb0761..bd5e48c 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java @@ -39,6 +39,8 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB this.bind(woodShaftTextures); }else if(block == SSBlocks.stoneShaft){ this.bind(stoneShaftTextures); + } if(block == SSBlocks.steelShaft){ + this.bind(this.steelShaftTextures); } modelShaft.render(null, 0,0,0, 0,0, 1.0f); @@ -69,6 +71,7 @@ public int getRenderId() { private static final ResourceLocation woodShaftTextures = new ResourceLocation("sextiarysector:textures/models/wood_shaft.png"); private static final ResourceLocation stoneShaftTextures = new ResourceLocation("sextiarysector:textures/models/stone_shaft.png"); + private static final ResourceLocation steelShaftTextures = new ResourceLocation("sextiarysector:textures/models/steel_shaft.png"); static public ModelShaft modelShaft = new ModelShaft(); @@ -87,6 +90,7 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double switch(tile.getStorage().getMaxPowerStored()){ case 1:this.bindTexture(woodShaftTextures);break; case 2:this.bindTexture(stoneShaftTextures);break; + case 3:this.bindTexture(steelShaftTextures);break; } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index ed3f43a..12e4f7c 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -20,24 +20,29 @@ tile.ss.wood_hopper.name=Wood Hopper tile.ss.chunk_loader.name=Time Loader + tile.ss.small_windmill.name=Small Windmill tile.ss.windmill.name=Windmill tile.ss.small_waterwheel.name=Small Waterwheel tile.ss.wood_shaft.name=Wood Shaft tile.ss.stone_shaft.name=Stone Shaft +tile.ss.steel_shaft.name=Steel Shaft tile.ss.wood_gear_box.name=Wood Gear Box tile.ss.stone_gear_box.name=Stone Gear Box +tile.ss.steel_gear_box.name=Steel Gear Box tile.ss.wood_gf_tank.name=Wood GF Tank tile.ss.stone_gf_tank.name=Stone GF Tank +tile.ss.steel_gf_tank.name=Steel GF Tank tile.ss.wood_stone_gear_shaft.name=Wood Stone Gear Shaft tile.ss.millstone.name=Millstone tile.ss.loom.name=Loom tile.ss.sawmill.name=Sawmill +tile.ss.pulverizer.name=Pulverizer tile.ss.blue_stone.name=Blue Stone Ore tile.ss.yellow_stone.name=Yellow Stone Ore @@ -82,6 +87,8 @@ item.ss.coal_dust.name=Coal Dust item.ss.iron_dust.name=Iron Dust item.ss.gold_dust.name=Gold Dust +item.ss.steel_ingot.name=Steel Ingot + item.ss.mithril_ingot.name=Mithril Ingot item.ss.orichalcum_gem.name=Orichalcum @@ -96,9 +103,11 @@ item.ss.unit.name=Unit item.ss.wood_gear.name=Wood Gear item.ss.stone_gear.name=Stone Gear +item.ss.steel_gear.name=Steel Gear item.ss.wood_unit_gear.name=Wood Unit Gear item.ss.stone_unit_gear.name=Stone Unit Gear +item.ss.steel_unit_gear.name=Steel Unit Gear item.ss.hammer.name=Hammer item.ss.calendar.name=Calendar @@ -111,6 +120,8 @@ item.ss.season_stone_autumn.name=Season Stone -Autumn- item.ss.season_stone_winter.name=Season Stone -Winter- item.ss.wood_gf_storage.name=Wood GF Storage +item.ss.stone_gf_storage.name=Stone GF Storage +item.ss.steel_gf_storage.name=Steel GF Storage item.ss.string_bobbin.name=String Bobbin item.ss.cloth.name=Cloth @@ -168,9 +179,11 @@ gui.ss.magic_furnace=Magic Furnace gui.ss.millstone=Millstone gui.ss.loom=Loom gui.ss.sawmill=Sawmill +gui.ss.pulverizer=Pulverizer gui.ss.gf_tank_1=Wood GF Tank gui.ss.gf_tank_2=Stone GF Tank +gui.ss.gf_tank_3=Steel GF Tank shop.ss.creeper=Simple Creeper Shop shop.ss.robot=Blue Robot Shop @@ -226,5 +239,6 @@ nei.ss.magic_fuel=Magic Fuel nei.ss.millstone=Millstone Recipe nei.ss.loom=Loom Recipe nei.ss.sawmill=Sawmill Recipe +nei.ss.pulverizer=Pulverizer Recipe nei.ss.fertilizer=Mutation Recipe diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/pulverizer.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/pulverizer.png new file mode 100644 index 0000000000000000000000000000000000000000..91b43b9f2dfea64db0f9b6c1a60f48dd269cc8fc GIT binary patch literal 471 zcmV;|0Vw{7P)BTU{Skk_eW4T+i)m|`Sqv>RP)C^y z;ql<+<-U8#q9_XQoC9DO2Ap$v?-_;xfXCxOmSs5SaL!?^rRzH4IOh3$A^^7AElMfo zV2mLQ!>O;TiuHO8z~OK}+-^6Trr~%z@+s=NX1Cih36%fHX}h%MvLi zd7i%=Fs|&qN32#WwALu4*laelWMGo5wZ>YDwU#)Jzhk^yF8}(@0AFVz>|q0P|6Kq8 N002ovPDHLkV1gY@%CrCg literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gear_box.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gear_box.png new file mode 100644 index 0000000000000000000000000000000000000000..fd30503400ba12f988f7a3ca5adf22e3c52d741c GIT binary patch literal 376 zcmV-;0f+vHP)4! zK~y-)os&V1!Y~X)pQ%L!S#;T}u;b`Ry%9nc5aM_iC{ZY#(WrkDIf|VB{SrByPHtuZ zF6i}o#oYlu zZvKyQ&Zw%AQmRc_E!~uOY{I{6l7 zn|rOU7`I0F6Jr@#anwF(cdt>k?|VWBA9B=s$DTQt<1^pN;3VsTAuH1=VKyc;4 zU6BUbIw&cDtlUWuN~y!Ndk~5 zd!EPj^);qxV%s+Pe4cW-%*MtBLWqnYj$?!n0;N<&GJi?_@c`|^v;f$U>pVn;0a}~c z*)R+duIu7BPO7dW&dxoglsqjyXD}YHdViHdp}_med%k?_u(!9D2}Mza;rl*O6w&E) zI6Lb|@V5HfY4_innQA*)B4v`H@3riG> z#Z4`GoKLS(q*_FX?u> z+!IZzwJL=|fiMg)T-QZP$@=;_tyT-mvN$<8VKSMZltL**zu%|Z?NYDT+1c5l*=%Mu zin)z*Y;QlJ)4AZ?&sQ)5BA^5nXN$G9HNr4Vr~fNoJ+IV_;`d{k|@C!|(Iorr7@~Qv;002ov JPDHLkV1l4lJ-q+` literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gear_box_out.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gear_box_out.png new file mode 100644 index 0000000000000000000000000000000000000000..d369e73a4e23d8e916eb6c4fcf63bb158df06dc3 GIT binary patch literal 738 zcmV<80v-K{P)OOw49yXLfr?v#p0h>ATL%do%NU|1sBfBWo=HVHjeqC5j@# zFa*H!JW8b!)>^E!3U1-Boh27V+?;&wOU1VIvt`Y0*I4q zwHnvg*Eo(tI-Mq&Op?#%Sy)&=2oW2EVTceyV2p`PMmPB+S`flX)`ui~>^w&M9@aYX zUf=f-N+~j#%rM;s939utTC=)ct6CtG}2m)HI7CYnToIl&a^E}?q zyoAxKy71b3W@BT6+4?&^bQaKB6GagTYb{DClv21il0u=t)z#JTVCy@apT=p0LIL-O zL`sR{IFw4IAx5n={eGX5hdyU#XG~5`f&zpCP8xt_vq`(%rjYmX`rdEsT5F6kWHK4t zmZVatkj-X?k@+%AJp!OuEK;ddaBn2ZWRf5VxVyU>V$5c z%VkzpR#;qIj4_H4#*vnnpHi=%vbp;PfRhJ4l@xr-JYjZr7T@=WzyGW9LQ08J>RuBk zCMI|_K8_HA+uK`0FJyXp3Mu8iS%{(t;W!Rj>w63H^Yi?Ra=F|PET;c5T?0eneB zK~y-)g_Aq3<1h?Gk3N=z7=eof@K&<_9R)6IOCmW%Ai;j~2BU@zFLilHy7&8SA_9P_ zA|jX>stUliZ7j=zh#(^D`%cc8d7i1Y5&`b_JI*=wedl(&0Z?mY7zUotC$&~W2mm}D z4@87v7^t=4Kc5dGLe9A-nHkPG0FL9p%m8rCp{k7I*d50hBdXd3W=5^Gi@o=hQV1b1 z3QST>`qmCE6cLr`NwO&{`OkS&N*Vv`66i6 zesdB+=y|Hjwr$@rHgFBjc^`g?oBcNCI89TB=$vC5M@lJ|-p|68+hE3ZU3tA;0OXuW zDUnjTKsy&`E8eE$$8qdyoKm{jcFqxF>`uDK`~E>pDP1b6YG=?k)O&x~!cqz`M&^0` lUgNfH|2^kg>tE*#@CVcdLpUBolsy0d002ovPDHLkV1jzE)m;Dp literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gf_tank_in.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/steel_gf_tank_in.png new file mode 100644 index 0000000000000000000000000000000000000000..1f3996b5a5cd22b4484972711d913cef8c168c7b GIT binary patch literal 744 zcmVP)W*UW35Fg#r^#~D$6pWC_-yZzP-hN*Ecxlc%J^svRtzNcpt4bZ^}1l ztx40AD2fOn;G9ENRW+zye_SDi;PmvAq9`~xI3P(9#^W((XJosV&xVT_%Zx1p+88E%A%jJ@yC_pm2E`&f?Yk^+1 zN#IHTq^AKG|IjaBI-Rn$wZ(-4@u9b~u4}~M;bE8OIZe|HsK>|0%w{vH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A%C2Z)B=m@D@ddnxagzK$qiH$=H=t>zy{5xDhol5O-IPAS z{#`qLs+dwTi+$C1DjNlbMUNh68(7p`8veSwMZGp0#A$$aaez^bXYQ zrw~DHB&2%?ZbL-d*cm6lz&?FY7(}xYtdhiT9pZ#>8jZ>NAp{H{Bwq}-icv3XJbF1{ zoW!3Pd_mGxY5`@pld}!MzDV{&{o5vGu>pCv0Vq5wI`Fu|d38M!OLU7r$Q>}Wq1+_K zFZ64$g9wXJEzMSf>Jw#8lcySwBqmJy3i?YdCkCCz*j#&pA) z8X$oU0C1oH5&@8w41fI){$(=w{Uk+hgh&qwaj;Z6w@){3Z%nh|^@KSYOL#B=$^M9u z_VV+SWN&(77=h9ucUd|Il39D5Wj?{I*RX_pO8tkse~+L5tllucYim8nFLMxBZ53&mzK{~Jch`fnJGOs;fSy?XN3 zQI)Gh!&*c;+w!x|_R{HeYaat9vh0wl>D;jYjSFBYTZky+I;svcE`tA8DFk9fn(1zX Ts|fn3uQ8nLoNcR4`2X@x&)B@8 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/steel_gf_tank.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/steel_gf_tank.png new file mode 100644 index 0000000000000000000000000000000000000000..b9e900360fb91a90b19580e073ec6f3dd078b1da GIT binary patch literal 2670 zcmcImX;2eL7VZEch;oew84fu{5o9smU=V^Di3}K2R1PtSNTOUZ1_@`#j50Df0&-;p zCCoBh3S=cFDOMxL_FV45^T29EJu91rluyv z2-g}{^O2H3BJFZeb&sYlQ)Zmi6IruLsgYCHgCFlBEa;sms(R`xx0hvQWzA#}cH&LM zUbDKEmcn^?TJlfJU;I4DFsV{)@siqPBV^UX&inTZUY26&8XE^c?{Rf?B~A2~ZRvkp z_RiObosULWGnrlEU0DoEdgs_6-pqugRw-SSoy^1?T)zrz{z@t?ARv8UU;vH=_EgWm z4-TI7!D1V4ayvUc(dfS*5EUjSS)1J=CiH|tp{=dp^T+4C>{ipjb__b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0Mj@yw96@;gH*k0yxX zV-9QrTV26J=5QxL({x4yyDZA)jLZ=7cm03u>FEh`qWXbI@We?KleI8a&99X;bY(Wk zt^*{3{mk8LiL?Y3jErWVkAwj1% z>g)=pOa|2$eGx~YWSv%=xn#gK;|83=;Wqz1!l4Tg#Y$!fr&hZU(&yWeG`UI|-li|6 zof-Ass%#puNr|yaiLFl3`vhXalNsH~{h}erCr~N59|Go|YF~&oNP2+)oyRm4la>ZW zprIBEmNZPXe3UiI;YG7C4hrlnu;^Uj9)o)1$GyK-SXh4#bLTcnFj16{Vbj;!pc0Ft zke`ggVrcJAwGG0}ilNAA1N8I4fwT$_r=+p%SW+v(}el-V)18{`(t?t;ePY?&Y{9WTM4 zeSCZ@kNa9)zaomKNS9gCX_5YX}HR$ir)rwV?6+PE?zbSc`P z#LB8GWopoA99|(JwQ0ZJ0F1#2-olNCO>(#65D!g_t^Pwa&jz$K8X5pP!1_M?1_~5^4Dtu| z(79D?!DEMiOZGp}X<+UP4I>f1*K#|n6fWyB&wumffjH=X=pQ6io|pTkwi%mvP^>|7k71> zmbxXhMC8Z5{#BnUY&Kj=>QVF!e)rw_+O6-B3=+vV-j?lur#AWI23-^1&noM~w4Z&p zWH|nK;_I)!;tpn*ByGM~u>0zopr0M&@9=l}o! literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/steel_gear_storage_full.png b/src/main/resources/assets/sextiarysector/textures/items/gearforce/steel_gear_storage_full.png new file mode 100644 index 0000000000000000000000000000000000000000..ff434f6fc7bf76be2c100dcb75247273199f0775 GIT binary patch literal 943 zcmV;g15o^lP)HZfxiJJbLG03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00R?AL_t(&-tF4IOB-Pr z!0~UAGl@}43jvLy1RYXbi=++_hg3vCR5}QmI(F(N6xzws&i)&vf&|jiLJ3r95KD$` zQVkeMG@z#8a!Go6xenU2XD-c;QqlH3$Z(gum*;)o7b`#0$uEWE_#N%;7p%B?@7N^r$GgQmPe-8u#HGiB+rAQpJCf8C6v&l}c=HZ&NH5QB{?Ox=<>W2#3RlYi_rjh6Yj7G&V<802m)1XJ}{$ zfNz0S^7(xIF$jf1Z}Y!yiE?UBpn=;`UHc+gN6 zB9RCHgM)+E?RJVYyO7zy@+Mfn3r9ysjE;^1kVqs*r_(t5KzloZuIu$9F!SK+^Ba`Q zW#NJFKzJZL5FQ8*uCoVgy(>8TsF=`{2jOs-)653G_xI|0@OScsNF-v&7nIRg$g*sj zFVyuwf4Ga(?Z@SEwdTR`vrep5tMEX0a9ur!+7^*|{bwe;Ypdx&)c`ImEa;LX>5?Sr z!C+AL`Fxf0j*gD1*)UxnOixc6Jow}FK{}lVFrAIxdQg0@MR8`AuDSKrJUChQP<2 z2oHn@*SMb8HMfp5=*Jm=lVy)-R8p<=0l=N?6ZSsuv9q%SfWzTvEMK@99(a~c$WCk_ z`(IY-iA{NMvh2YI6l9t9_I6QE6dwEw?-#n})^V)OHkU8J&-#JX?WgV0e&h9niyk;u z`^lf>35|6jes`5p3U2NCTJymBdW_S|Mx}nxk_V12vpC#t@qR&gAUqHr2oHn@V*i1O z2VHaPX!rLov7Y#`f0a)+mkj$4YSj}ZGY@Vj$B4yZ$iH0wvHzgydg6cJ!FQ0{5%yoy RZD;@h002ovPDHLkV1mr?u7v;q literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/gear_storage_full.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/items/gearforce/steel_gear_storage_full.png.mcmeta similarity index 100% rename from src/main/resources/assets/sextiarysector/textures/items/gearforce/gear_storage_full.png.mcmeta rename to src/main/resources/assets/sextiarysector/textures/items/gearforce/steel_gear_storage_full.png.mcmeta diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/stone_gear_storage.png b/src/main/resources/assets/sextiarysector/textures/items/gearforce/stone_gear_storage.png new file mode 100644 index 0000000000000000000000000000000000000000..119bd4b03e32e437294b082d481c6b2bd79d08f0 GIT binary patch literal 445 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPq4?BaEvD&`98bBf0%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6_|fq_xc)5S5w;`GtUhNqhnL|Wy)GCM}e%G^@ws8D}?tZiD^ zOY<*_rGClsp38IWZgyU<&}B&m-?zHU>TbU@O-i(59<@0;1Jv4u^Xvr_y+9=?} zrI>PkcjtVwPbF5V8zVlr7s;@n|7_qJe5`QIpW6%vw&liLPu+cYk_u;AVo6lMEJZHG zCs|ux>F_l*9De8!d~|lx$&{uklb(O}jGXqQ^4!M?mGi}N{qFT_46cD2ZoiHDr*m4$ ztaa6@tWQ;Y)9mIm3$!VI|GhW9aam@Lne--|!{2MyUDtm6afXSn=INptt$*wI59F9R zUoUM^V91zzYgTe~DWM4f@HVz8 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/stone_gear_storage_full.png b/src/main/resources/assets/sextiarysector/textures/items/gearforce/stone_gear_storage_full.png new file mode 100644 index 0000000000000000000000000000000000000000..733cab560fa81ec0712ec2984dfe05691790272a GIT binary patch literal 934 zcmV;X16lluP)WFU8GbZ8()Nlj2>E@cM*00Rn1L_t(&-tF2?NYh~) z$MN^(VorAm6lACwq=T^`h|n~&Qxfwqk7Zs8yBZQAQU_7ULxcyrc-=uEBE%>=7>xW! zM$u)qLmOXH{eJq}BxvzGxBb}f+4KDN?8UyH=YfB+*=)9q&1TCe zz0Pe~xtq;qGyVPj$2a!&_F^`hsjja6qZ6H6udS`EEH5uJFfc$Q5}~4^LUFX3-#^{q za45bx5D4IQyNN_18pRPbHa3#UWRN6@R4PRxk-+2ekVqs*CX=X|!ok4-E|)9sn#p8B z)k93D(@Z7@0dP8u!e?; z_u#^-4$_h&JP;lT4}=H81K~j_dobZ2q`VfYp0^b4fy?FMFucy4gVEwV=72!UN$!X?ife){d^meq@5TMbQJD zk_QdAa9W)BJ$^QRdSEaZ3h^MGmmi$z|G}>aKi zw~F)N=H4)e;q|=zg@Qe3i;scHB=#4C2f_p4f$%_hAkH7ico1xw=HsO^c+jDHr09Wc zp7=O8#MBo@-uVNiJW(g-!EM7Zi(eP<=3F-#jj}&!asB{)0L>e5)vz#y7XSbN07*qo IM6N<$f~WSVp#T5? literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/stone_gear_storage_full.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/items/gearforce/stone_gear_storage_full.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/items/gearforce/stone_gear_storage_full.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/gear_storage.png b/src/main/resources/assets/sextiarysector/textures/items/gearforce/wood_gear_storage.png similarity index 100% rename from src/main/resources/assets/sextiarysector/textures/items/gearforce/gear_storage.png rename to src/main/resources/assets/sextiarysector/textures/items/gearforce/wood_gear_storage.png diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/gear_storage_full.png b/src/main/resources/assets/sextiarysector/textures/items/gearforce/wood_gear_storage_full.png similarity index 100% rename from src/main/resources/assets/sextiarysector/textures/items/gearforce/gear_storage_full.png rename to src/main/resources/assets/sextiarysector/textures/items/gearforce/wood_gear_storage_full.png diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/wood_gear_storage_full.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/items/gearforce/wood_gear_storage_full.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/items/gearforce/wood_gear_storage_full.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/src/main/resources/assets/sextiarysector/textures/items/ingot/bluestone_ingot.png b/src/main/resources/assets/sextiarysector/textures/items/ingot/bluestone_ingot.png new file mode 100644 index 0000000000000000000000000000000000000000..f619abdbd982c7965cc45043a9b04e13d1b23257 GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPq6E}krf1OT*K2Ye5r;B5V#p&b(38Mzrn9ugzJD%0^ z6gtgH$SL#nm-zgD{`BjTg;EXcPTH-T_3+Bn>KCUTv>80QbmYK+247`nAUOQJ__SnQ z-2HPOo4p&D0|yR#`2INfN<@R@%!zZSKRmrpuW6RSqK~Kl$$=EJrPXEb zk^2At-^mZ(-^RAw+0EYbAtGVorRG(?j(_-nJzT{3-<}<9i#QLnUa)YLaB>hfN^tRa i`CnhJz9O@Lk>TIQ9JMW82{k}}GkCiCxvX2Z~4}Z(GDK%a}1s?bO`j z^_)G1S4w+3Vw@tU)tWH~2>#mV?xLsIP$=_Qca5^Tr_=3i+b?AH#$IQfuTK6qTT2E zl0q@3SqVAr)?pH#|L^Rsmn@WOShsT9r3nvDJ=K13>Oq^qqf18)9BA-WW(I=8zjXIY zev|)ow&2~PcsDoY+Gqd8mg(^1`nnac?l9R_^55a1ebp!aN3Gk`l-pMAD&`4Xm{Vb@ zscDdC-q6_CsHioiH}U4Hc!;o}fq}uEil6+ZVhMiFo}{GAu=}p==qqv2qWGUb8weN% z{*l^W+ioGvw(jna(;WS*xxQ&2@wWQ^5)%9B-F@}V^A=|vDquA6d)Ov$sf9=4qVUE3 f`7NfrdJGIqFSF#9wyT^3`kTSi)z4*}Q$iB}>H~sc literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/machine/steel_gear.png b/src/main/resources/assets/sextiarysector/textures/items/machine/steel_gear.png new file mode 100644 index 0000000000000000000000000000000000000000..d0ac5910ffcfe18138b110b39ad2a197fb091ff8 GIT binary patch literal 557 zcmV+|0@D47P)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X*|xRseAVlameNi9<|7GsD#C3NREiWA5ywqALPcGBTKOm@)hD zh1vx%Ee8=efjEk3G#cXpM9$$Nx7W9&9`YlJc5!5{v;DiC6c|K6Tp8MN02+-3lZ{DS z96=58(8fMILQ#ljNSx_Fp&*u_`kZQ>}YX zy@;xkYbZho1N)(on=vggHT^bkO&uZ$A3u6j?1t;V<3mm}Nr>aP8dP|np}7|H7B@l& zq-l!xzNn&VvIbATmoj(a1WB{W@%fJqu@m002ovPDHLk FV1gXvPAvcc literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/steel_shaft.png b/src/main/resources/assets/sextiarysector/textures/models/steel_shaft.png new file mode 100644 index 0000000000000000000000000000000000000000..8473b0667eda11a900233a22b78afa464b984429 GIT binary patch literal 1712 zcmV;h22c5kP)bVUFF010qNS#tmY4#NNd4#NS*Z>VGd000McNliru-V6r;77)BD&BFiy20ckc zK~!ko?U-F?Tw4{#e|w*=X^%0PfqC>kWj zdo4Erj_nXd5rPm!25nhrrI7#9{*r9?V~8Z@71eUxqkh+Se8W;MMP0VtJNY5Lk0&2>2x}{ zu1l|e%d(VZS3kwSXT)TFS+qZ9X{P=N1 zgn@wp0A^-p0JwDN617^5`}gm6)jiK+V`GD%p&^Echgn=)MCYHsfPjcfCLDucjKQ+3 z+>;N2fU&VL-u>&%tZjRHo0;+V_?~=)@ADSlYJP!wy^inu1VO-e|9qXXv9XLdHa0dm zcI+5iTU(5djxseh#fcLq2!bF#09~%I>#Viza>Z9Q-}fmNiy4`PVaW66&*RQ#>+p}o z7sl5dk7BVHv%GC%jN!?XCzQ)&E?&II>gp=hY8Bu2`vZWyq-5JRfBebkb8$ek*<^Wn znVREeZLL--iD53d1pq3QN;baK-eGxpIa~KfjvOJ1BC6FYb8~ZSZf>%*wMDbp%*O$L z`QfD#Z9K!XS(phW;-dpoj$_NzX_^E}GsGNq-RtnKL0qj6#AQ}F=|4-XRr0iNek zBfjRrg9mt?N1;%lR4Oq(KF-e04xZ<6@7_H;&&vnE<7Xe~(;|ohrBw3WH7F1iBJfeQ z7UqdIuIo~%RQTzeUx$PQJDm=1-~JKP)6+DYO&&dZ#D{?6IJmCMucoh1OFY7LU3}lC zQmIg@)iM$s9UaAW-FyHHe_}vq4lja;iouY?EtI1C>5)&uYOW=gvUwWrW@l#sSYKby z+INS>G+OMfr(y8v)2FPgtl;~8J^%`Zg5IAIVhw=6%{Vx}+F*VnW4 zfA{X)?k{pc|IN?*fL{#!EdxN!&CQ8|gvm8pDYRB7rBNtUQr0@|cN~{`y@pZ>ooN4q z4ohp)u5+`wiAc=mA`;7H5ika`t1e=A|2ywzNzGoZzn``Tvi`K*D|fIn`I7vJ2nLN( zCZ43xpbcUaqJ(xkq*yFcumAI?kP0WqX5BgtfuWHCt+Rg83L`Sfe{ z()K|RFflRFhb|IKkvAsY-AQ(Mj3G*Qdc+X6+Z2mKSe6~%Ae%%|&NxwZLnDgK z%}qcs5bq)-*J9!}+4bBs7nrSo@UgW$z}VOrv-*Rq-Ya*|`{l&x3m6fi#4Ry`q`(+M zI}Gt$7uWM}T^Fq_5Q7Mq$Yc`o0e?6pO_;ZXclS zAs$OBzV@Kp!M=R?vf?$_Z-0DA{rYz+>QBG9%7+iC>RJ6?>fF13==8eg%$YNS!%MY& zwOY+2bF|8PM7QRjaCALRnA0+a{JJbd`@Ky43D zE|*zulhu3W4zCq}SIq^c%{$o_J4o9HK|rNa;ftkrSacT&!?0)Wp#IkZ*u5pzYPDV( z28}V Date: Sun, 7 Dec 2014 23:25:49 +0900 Subject: [PATCH 40/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E8=A1=A8=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- src/main/java/shift/sextiarysector/SextiarySector.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 1b5630f..51f68bd 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.0.8.b-${project.minecraft.version}" +version = "2.0.9.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 7ab06c2..207d310 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -32,7 +32,7 @@ public class SextiarySector { //public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.0.8"; + public static final String VERSION = "2.0.9"; @Mod.Instance("SextiarySector") public static SextiarySector instance; From 800c758035da0e73ff0874f26d3c224cd26dc3d2 Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 9 Dec 2014 23:10:20 +0900 Subject: [PATCH 41/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E9=9B=BB?= =?UTF-8?q?=E6=B0=97=E3=83=A2=E3=83=BC=E3=82=BF=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・電気モーターを仮追加 --- .../java/shift/sextiarysector/Config.java | 2 + .../java/shift/sextiarysector/SSBlocks.java | 8 +- .../java/shift/sextiarysector/SSItems.java | 5 + .../shift/sextiarysector/SextiarySector.java | 5 +- .../block/BlockElectricMotor.java | 21 ++++ .../sextiarysector/block/BlockMotor.java | 54 ++++++++ .../sextiarysector/block/BlockWoodHopper.java | 1 + ...lockShaft.java => ItemBlockDirection.java} | 4 +- .../shift/sextiarysector/plugin/IPlugin.java | 5 + .../plugin/PluginAppleMilk.java | 9 ++ .../plugin/PluginComputerCraft.java | 9 ++ .../sextiarysector/plugin/PluginIC2.java | 57 +++++++++ .../sextiarysector/plugin/PluginTHKaguya.java | 9 ++ .../sextiarysector/plugin/SSPlugins.java | 17 +++ .../sextiarysector/proxy/ClientProxy.java | 27 ++++ .../sextiarysector/proxy/CommonProxy.java | 6 + .../renderer/block/RendereElectricMotor.java | 117 ++++++++++++++++++ .../renderer/model/ModelElectricMotor.java | 49 ++++++++ .../tileentity/TileEntityElectricMotor.java | 56 +++++++++ .../assets/sextiarysector/lang/en_US.lang | 2 + .../textures/items/ingot/ninja_ingot.png | Bin 0 -> 328 bytes .../textures/models/electric_motor.png | Bin 0 -> 1885 bytes 22 files changed, 456 insertions(+), 7 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockElectricMotor.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockMotor.java rename src/main/java/shift/sextiarysector/item/{ItemBlockShaft.java => ItemBlockDirection.java} (90%) create mode 100644 src/main/java/shift/sextiarysector/plugin/PluginIC2.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelElectricMotor.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ingot/ninja_ingot.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/electric_motor.png diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index c704f12..a00a267 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -16,6 +16,7 @@ public class Config { public static boolean modDCsAppleMilk; public static boolean modComputerCraft; public static boolean modTHKaguya; + public static boolean modIC2; public static void ConfigRead(FMLPreInitializationEvent event) { @@ -52,6 +53,7 @@ public static void configForPlugin(Configuration cfg) { modDCsAppleMilk = cfg.getBoolean("AppleMilk", "general", true, ""); modComputerCraft = cfg.getBoolean("ComputerCraft", "general", true, ""); modTHKaguya = cfg.getBoolean("THKaguya", "general", true, ""); + modIC2 = cfg.getBoolean("IC2", "general", true, ""); } diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 0f887f1..f6bfabe 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -37,7 +37,7 @@ import shift.sextiarysector.item.ItemBlockFluidCrafter; import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMonitor; -import shift.sextiarysector.item.ItemBlockShaft; +import shift.sextiarysector.item.ItemBlockDirection; import shift.sextiarysector.tileentity.TileEntityBlockBottle; import shift.sextiarysector.tileentity.TileEntityFarmland; import shift.sextiarysector.tileentity.TileEntityFluidCrafter; @@ -200,13 +200,13 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntityShaft.class, "Shaft"); woodShaft = new BlockShaft(1).setBlockName("ss.wood_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); - GameRegistry.registerBlock(woodShaft,ItemBlockShaft.class, "WoodShaft"); + GameRegistry.registerBlock(woodShaft,ItemBlockDirection.class, "WoodShaft"); stoneShaft = new BlockShaft(2).setBlockName("ss.stone_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeStone); - GameRegistry.registerBlock(stoneShaft,ItemBlockShaft.class, "StoneShaft"); + GameRegistry.registerBlock(stoneShaft,ItemBlockDirection.class, "StoneShaft"); steelShaft = new BlockShaft(3).setBlockName("ss.steel_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeMetal); - GameRegistry.registerBlock(steelShaft,ItemBlockShaft.class, "SteelShaft"); + GameRegistry.registerBlock(steelShaft,ItemBlockDirection.class, "SteelShaft"); GameRegistry.registerTileEntity(TileEntityGearBox.class, "GearBox"); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 9d4414d..a22d16b 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -56,6 +56,8 @@ public class SSItems { public static Item mithrilIngot; public static Item orichalcumGem; + public static Item ninjaIngot; + public static Item blueStoneSlimeBall; //unit @@ -184,6 +186,9 @@ public static void initItems(){ orichalcumGem = new Item().setUnlocalizedName("ss.orichalcum_gem").setTextureName("sextiarysector:gem/orichalcum_gem").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(orichalcumGem, "OrichalcumGem"); + ninjaIngot = new Item().setUnlocalizedName("ss.ninja_ingot").setTextureName("sextiarysector:ingot/ninja_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(ninjaIngot, "NinjaIngot"); + blueStoneSlimeBall = new Item().setUnlocalizedName("ss.blue_stone_slime_ball").setTextureName("sextiarysector:slimeball/bluestone_slimeball").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(blueStoneSlimeBall, "BlueStoneSlimeBall"); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 207d310..859cc39 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -92,6 +92,9 @@ public void preInit(FMLPreInitializationEvent event) ExtendedClassSupport.loadAndGenerateNewExtendedClass(BlockCauldron.class, Block.class, BlockSSCauldron.class, ITileEntityProvider.class, cc); */ SSPlugins.initModHelper(); + + proxy.setPluginCustomRenderers(event); + SSPlugins.prePlugins(event); } @@ -117,7 +120,7 @@ public void init(FMLInitializationEvent event) if(event.getSide().isClient())SSPlayerTabs.initRecipes(); - SSPlugins.initModHelper(); + //SSPlugins.initModHelper(); SSPlugins.initPlugins(event); diff --git a/src/main/java/shift/sextiarysector/block/BlockElectricMotor.java b/src/main/java/shift/sextiarysector/block/BlockElectricMotor.java new file mode 100644 index 0000000..753d99e --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockElectricMotor.java @@ -0,0 +1,21 @@ +package shift.sextiarysector.block; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.plugin.PluginIC2; +import shift.sextiarysector.tileentity.TileEntityElectricMotor; + +public class BlockElectricMotor extends BlockMotor{ + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityElectricMotor(); + } + + @Override + public int getRenderType() + { + return PluginIC2.electricMotorType; + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockMotor.java b/src/main/java/shift/sextiarysector/block/BlockMotor.java new file mode 100644 index 0000000..b3d5241 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockMotor.java @@ -0,0 +1,54 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.machine.item.IHammer; +import shift.sextiarysector.tileentity.TileEntityDirection; + +public abstract class BlockMotor extends BlockDirection{ + + public BlockMotor() { + super(Material.iron); + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6,float par7, float par8, float par9) { + + ItemStack item = par5EntityPlayer.getCurrentEquippedItem(); + + if(item == null || !(item.getItem() instanceof IHammer))return false; + + if(!((IHammer)item.getItem()).canUse(item))return false; + + TileEntityDirection t = (TileEntityDirection) par1World.getTileEntity(x, y, z); + + ForgeDirection d = t.getDirection(); + + if(d.ordinal()>6){ + t.direction = d.getOrientation(0); + }else{ + t.direction = d.getOrientation(d.ordinal()+1); + } + + ((IHammer)item.getItem()).use(item); + + par1World.playSoundEffect(x, y, z, this.stepSound.getStepResourcePath(), 1.0F, par1World.rand.nextFloat() * 0.1F + 0.6F); + par1World.markBlockForUpdate(x, y, z); + + return true; + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java b/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java index 6c3c3cb..f80c2e6 100644 --- a/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java +++ b/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java @@ -15,6 +15,7 @@ public class BlockWoodHopper extends BlockHopper{ private IIcon field_149924_N; public BlockWoodHopper(){ + this.setHardness(0.5f); this.setCreativeTab(SextiarySectorAPI.TabSSCore); } diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockShaft.java b/src/main/java/shift/sextiarysector/item/ItemBlockDirection.java similarity index 90% rename from src/main/java/shift/sextiarysector/item/ItemBlockShaft.java rename to src/main/java/shift/sextiarysector/item/ItemBlockDirection.java index 17fd6ad..0c52cdd 100644 --- a/src/main/java/shift/sextiarysector/item/ItemBlockShaft.java +++ b/src/main/java/shift/sextiarysector/item/ItemBlockDirection.java @@ -8,9 +8,9 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.tileentity.TileEntityDirection; -public class ItemBlockShaft extends ItemBlock{ +public class ItemBlockDirection extends ItemBlock{ - public ItemBlockShaft(Block par1) { + public ItemBlockDirection(Block par1) { super(par1); } diff --git a/src/main/java/shift/sextiarysector/plugin/IPlugin.java b/src/main/java/shift/sextiarysector/plugin/IPlugin.java index 056a761..b110191 100644 --- a/src/main/java/shift/sextiarysector/plugin/IPlugin.java +++ b/src/main/java/shift/sextiarysector/plugin/IPlugin.java @@ -3,6 +3,8 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public interface IPlugin { @@ -10,6 +12,9 @@ public interface IPlugin { public void prePlugin(FMLPreInitializationEvent event); + @SideOnly(Side.CLIENT) + public void preClientPlugin(FMLPreInitializationEvent event); + public void initPlugin(FMLInitializationEvent event); public void postPlugin(FMLPostInitializationEvent event); diff --git a/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java b/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java index c67a028..dea5161 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java @@ -3,6 +3,8 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class PluginAppleMilk implements IPlugin { @@ -30,5 +32,12 @@ public String getModName() { return "AppleMilk"; } + @Override + @SideOnly(Side.CLIENT) + public void preClientPlugin(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java b/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java index 02a47c6..ad9d7ba 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java @@ -12,6 +12,8 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dan200.computercraft.api.ComputerCraftAPI; import dan200.computercraft.api.peripheral.IPeripheral; import dan200.computercraft.api.turtle.ITurtleAccess; @@ -166,5 +168,12 @@ public String getModName() { return "ComputerCraft"; } + @Override + @SideOnly(Side.CLIENT) + public void preClientPlugin(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginIC2.java b/src/main/java/shift/sextiarysector/plugin/PluginIC2.java new file mode 100644 index 0000000..e71cb87 --- /dev/null +++ b/src/main/java/shift/sextiarysector/plugin/PluginIC2.java @@ -0,0 +1,57 @@ +package shift.sextiarysector.plugin; + +import net.minecraft.block.Block; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.block.BlockElectricMotor; +import shift.sextiarysector.item.ItemBlockDirection; +import shift.sextiarysector.renderer.block.RendereElectricMotor; +import shift.sextiarysector.tileentity.TileEntityElectricMotor; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PluginIC2 implements IPlugin { + + @Override + public String getModName() { + return "IC2"; + } + + public static int electricMotorType; + public static Block electricMotor; + + @Override + public void prePlugin(FMLPreInitializationEvent event) { + + electricMotor = new BlockElectricMotor().setBlockName("ss.electric_motor").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(electricMotor, ItemBlockDirection.class, "ElectricMotor"); + GameRegistry.registerTileEntity(TileEntityElectricMotor.class, "ElectricMotor"); + + } + + @Override + @SideOnly(Side.CLIENT) + public void preClientPlugin(FMLPreInitializationEvent event) { + + electricMotorType = cpw.mods.fml.client.registry.RenderingRegistry.getNextAvailableRenderId(); + cpw.mods.fml.client.registry.RenderingRegistry.registerBlockHandler(new RendereElectricMotor()); + cpw.mods.fml.client.registry.ClientRegistry.bindTileEntitySpecialRenderer(TileEntityElectricMotor.class, new RendereElectricMotor()); + + } + + @Override + public void initPlugin(FMLInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void postPlugin(FMLPostInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + +} diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java b/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java index 08a06db..0e95760 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTHKaguya.java @@ -8,6 +8,8 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class PluginTHKaguya implements IPlugin{ @@ -38,4 +40,11 @@ public String getModName() { return "THKaguya"; } + @Override + @SideOnly(Side.CLIENT) + public void preClientPlugin(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + } diff --git a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java index 568ce60..b071c6a 100644 --- a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java +++ b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java @@ -18,12 +18,14 @@ public class SSPlugins { public static boolean modDCsAppleMilk; public static boolean modComputerCraft; public static boolean modTHKaguya; + public static boolean modIC2; public static void initModHelper() { modDCsAppleMilk = Loader.isModLoaded("DCsAppleMilk") && Config.modDCsAppleMilk; modComputerCraft = Loader.isModLoaded("ComputerCraft") && Config.modComputerCraft; modTHKaguya = Loader.isModLoaded("THKaguyaMod") && Config.modTHKaguya; + modIC2 = Loader.isModLoaded("IC2") && Config.modIC2; if (modDCsAppleMilk) { @@ -70,6 +72,21 @@ public static void initModHelper() { } } + if (modIC2) { + + try { + + SextiarySector.Log.info("IC2 Plugin is loaded"); + plugins.add(new PluginIC2()); + + } catch (Exception e) { + + SextiarySector.Log.log(Level.WARN, "IC2 integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.catching(e); + + } + } + } public static void prePlugins(FMLPreInitializationEvent event) { diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index fe58593..322f7d7 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -4,9 +4,15 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; + +import org.apache.logging.log4j.Level; + import shift.mceconomy2.packet.PacketHandler; +import shift.sextiarysector.SextiarySector; import shift.sextiarysector.gui.tab.TabManager; import shift.sextiarysector.packet.PacketGuiId; +import shift.sextiarysector.plugin.IPlugin; +import shift.sextiarysector.plugin.SSPlugins; import shift.sextiarysector.renderer.block.RendererBlockBottle; import shift.sextiarysector.renderer.block.RendererChest; import shift.sextiarysector.renderer.block.RendererFarmland; @@ -31,6 +37,7 @@ import shift.sextiarysector.tileentity.TileEntityWindmill; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -148,6 +155,26 @@ public void registerInventoryTabs() //TabManager.registerTab(new InventoryTabEquipment()); //TabManager.registerTab(new InventoryTabEquipment()); + } + + public void setPluginCustomRenderers(FMLPreInitializationEvent event) + { + + for(IPlugin p : SSPlugins.plugins) + { + try { + + p.preClientPlugin(event); + + } catch (Exception e) { + + SextiarySector.Log.log(Level.WARN, p.getModName() +" integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.catching(e); + + } + } + + } } diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index f75fa63..ec25797 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -2,6 +2,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; public class CommonProxy { @@ -46,6 +47,11 @@ public void openGUI(int id){ public void registerInventoryTabs() { + } + + public void setPluginCustomRenderers(FMLPreInitializationEvent event) + { + } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java b/src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java new file mode 100644 index 0000000..323293f --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java @@ -0,0 +1,117 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.plugin.PluginIC2; +import shift.sextiarysector.renderer.model.ModelElectricMotor; +import shift.sextiarysector.tileentity.TileEntityDirection; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendereElectricMotor extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + + if(modelID!=this.getRenderId()){ + return ; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + + GL11.glRotatef(90, 1, 0, 0); + GL11.glRotatef(180, 0, 1, 0); + + this.bind(electricMotorTextures); + + modelElectricMotor.render(null, 0,0,0, 0,0, 1.0f); + modelElectricMotor.renderShaft(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, + RenderBlocks renderer) { + return false; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return PluginIC2.electricMotorType; + } + + private static final ResourceLocation electricMotorTextures = new ResourceLocation("sextiarysector:textures/models/electric_motor.png"); + + static public ModelElectricMotor modelElectricMotor = new ModelElectricMotor(); + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + + TileEntityDirection tile = (TileEntityDirection)tileentity; + + //System.out.println("renderTileEntityAt"); + + GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + + this.bindTexture(electricMotorTextures); + + switch(tile.direction){ + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + default: + break; + } + + //傾きのスピード + //GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + + modelElectricMotor.render(null, 0,0,0, 0,0, 1.0f); + modelElectricMotor.renderShaft(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + } + + + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelElectricMotor.java b/src/main/java/shift/sextiarysector/renderer/model/ModelElectricMotor.java new file mode 100644 index 0000000..a501f65 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelElectricMotor.java @@ -0,0 +1,49 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelElectricMotor extends ModelBase +{ + //fields + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + + public ModelElectricMotor() + { + textureWidth = 64; + textureHeight = 64; + + Shape1 = new ModelRenderer(this, 0, 40); + Shape1.addBox(-2F, -2F, -7F, 4, 4, 14); + Shape1.setRotationPoint(0F, 0F, 0F); + Shape1.setTextureSize(64, 64); + Shape1.mirror = true; + Shape2 = new ModelRenderer(this, 0, 0); + Shape2.addBox(-8F, -8F, -8F, 16, 16, 6); + Shape2.setRotationPoint(0F, 0F, 0F); + Shape2.setTextureSize(64, 64); + Shape2.mirror = true; + Shape3 = new ModelRenderer(this, 0, 22); + Shape3.addBox(-4F, -4F, -2F, 8, 8, 10); + Shape3.setRotationPoint(0F, 0F, 0F); + Shape3.setTextureSize(64, 64); + Shape3.mirror = true; + } + + 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); + + Shape2.render(f5); + Shape3.render(f5); + } + + public void renderShaft(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + { + Shape1.render(f5); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java new file mode 100644 index 0000000..2ded1f7 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java @@ -0,0 +1,56 @@ +package shift.sextiarysector.tileentity; + +import ic2.api.energy.prefab.BasicSink; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileEntityElectricMotor extends TileEntityDirection { + + private BasicSink ic2EnergySink = new BasicSink(this, 1000, 1){ + + @Override + public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction) { + + return ((TileEntityDirection)this.parent).direction.ordinal() == direction.ordinal(); + + } + + }; + + @Override + public void invalidate() { + ic2EnergySink.invalidate(); // notify the energy sink + + super.invalidate(); // this is important for mc! + } + + @Override + public void onChunkUnload() { + ic2EnergySink.onChunkUnload(); // notify the energy sink + + } + + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + + ic2EnergySink.readFromNBT(tag); + + } + + @Override + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + + ic2EnergySink.writeToNBT(tag); + + } + + @Override + public void updateEntity() { + ic2EnergySink.updateEntity(); + + } + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 12e4f7c..012e772 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -92,6 +92,8 @@ item.ss.steel_ingot.name=Steel Ingot item.ss.mithril_ingot.name=Mithril Ingot item.ss.orichalcum_gem.name=Orichalcum +item.ss.ninja_ingot.name=Ninja Ingot + item.ss.blue_stone_slime_ball.name=Blue Stone Slime Ball diff --git a/src/main/resources/assets/sextiarysector/textures/items/ingot/ninja_ingot.png b/src/main/resources/assets/sextiarysector/textures/items/ingot/ninja_ingot.png new file mode 100644 index 0000000000000000000000000000000000000000..1022970564dd73260c8cbc0208e2d62605787144 GIT binary patch literal 328 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPq4+oE~n56^DX`s+mPZ!4!i_^&o5=IWu1*hwC59cdMf??>=DUR$#Ce7{opBaVGd000McNliru-V6y12@?Ul9IyZY2I@&f zK~#9!?OIK26Gs&OX1umH4lWgV5o&8()0Urt3W_LLL9`&~frvvzRSw+BAtDDZ&_fSZ zrP6CFaiKIlRJ~VC)k5Gx6+q>uK%JsgpeiN7kO0DVC6d_QwY@Vv*t6cX*Nzh>{%fAJ zN_O77xAWe-_r15XCMZMUaG0Zk)Ya8R>hT<@5;GVKB9qC$>2!i~4nhbRV<3cp5c~CU z4m@};z98}qcK~Ay*=!aLha=EVL8Q@W z-{|Tf0YD%SFwolJaA0g~3}RfLp~CTSmdkGJL?Y3VeY&gP$~Ds80Q>; zK%ivYEFTC2Eb`Upt(N98x28V8?CFV#i3O|kb~`wiU0tjQkN_Z?&7z~DW5Jb|)9Z9P ztJX1>x$|~_+wC?&%#79|8l|zEUc0f`Lcf~1HT41I9wLl2*K0Eg zV=FDvZhS5VEtc^m4zL3n5e1SY+16q+FqQ+VW(7ba1(L}mJRXnj1W~hv@x@M{lwxLP z##X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や銅などを粉砕できるように --- .../shift/sextiarysector/SSOreDictionary.java | 9 +++ .../sextiarysector/plugin/PluginIC2.java | 29 +++++++++- .../recipe/RecipesPulverizer.java | 7 +-- .../renderer/block/RendereElectricMotor.java | 10 ++-- .../tileentity/TileEntityElectricMotor.java | 56 ++++++++++++++++++- .../tileentity/TileEntitySimpleMachine.java | 2 +- 6 files changed, 102 insertions(+), 11 deletions(-) diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index d71ac31..0810601 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -1,6 +1,8 @@ package shift.sextiarysector; import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; public class SSOreDictionary { @@ -22,6 +24,13 @@ public static void init(){ OreDictionary.registerOre("ingotSteel", SSItems.steelIngot); + Item[] Knife = new Item[]{SSItems.woodKnife, SSItems.stoneKnife, SSItems.ironKnife, SSItems.goldKnife, SSItems.diamondKnife}; + for(int i =0;i 3Power 2Speed + @Override public String getModName() { return "IC2"; @@ -23,6 +32,9 @@ public String getModName() { public static int electricMotorType; public static Block electricMotor; + public static Item ic2Dust;//3 Copper , 7 Tin + public static Item cable; + @Override public void prePlugin(FMLPreInitializationEvent event) { @@ -44,7 +56,22 @@ public void preClientPlugin(FMLPreInitializationEvent event) { @Override public void initPlugin(FMLInitializationEvent event) { - // TODO 自動生成されたメソッド・スタブ + + ic2Dust = GameRegistry.findItem("IC2", "itemDust"); + cable = GameRegistry.findItem("IC2", "itemCable"); + + SSRecipes.pulverizer.add("oreCopper", new ItemStack(ic2Dust,2,3)); + SSRecipes.pulverizer.add("oreTin", new ItemStack(ic2Dust,2,7)); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(this.electricMotor, 1), + new Object[] { "xzx", "xyx","pbp", + Character.valueOf('x'), "paneGlassColorless", + Character.valueOf('y'), "plankWood", + Character.valueOf('z'), SSBlocks.steelShaft, + Character.valueOf('b'), new ItemStack(cable,1,0), + Character.valueOf('p'), "plateDenseTin" + })); + } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java b/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java index 80a73cc..53b5bd6 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java @@ -1,6 +1,5 @@ package shift.sextiarysector.recipe; -import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import shift.sextiarysector.SSItems; @@ -9,9 +8,9 @@ public class RecipesPulverizer { public static void addRecipes(RecipeSimpleMachine recipe) { - recipe.add(new ItemStack(Blocks.coal_ore,1),new ItemStack(SSItems.coalDust, 2)); - recipe.add(new ItemStack(Blocks.iron_ore,1),new ItemStack(SSItems.ironDust, 2)); - recipe.add(new ItemStack(Blocks.gold_ore,1),new ItemStack(SSItems.goldDust, 2)); + recipe.add("oreCoal",new ItemStack(SSItems.coalDust, 2)); + recipe.add("oreIron",new ItemStack(SSItems.ironDust, 2)); + recipe.add("oreGold",new ItemStack(SSItems.goldDust, 2)); } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java b/src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java index 323293f..ab7b2eb 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java @@ -11,7 +11,7 @@ import shift.sextiarysector.plugin.PluginIC2; import shift.sextiarysector.renderer.model.ModelElectricMotor; -import shift.sextiarysector.tileentity.TileEntityDirection; +import shift.sextiarysector.tileentity.TileEntityElectricMotor; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; @@ -68,7 +68,7 @@ public int getRenderId() { @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { - TileEntityDirection tile = (TileEntityDirection)tileentity; + TileEntityElectricMotor tile = (TileEntityElectricMotor)tileentity; //System.out.println("renderTileEntityAt"); @@ -99,10 +99,12 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double break; } + modelElectricMotor.render(null, 0,0,0, 0,0, 1.0f); + //傾きのスピード - //GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + - modelElectricMotor.render(null, 0,0,0, 0,0, 1.0f); modelElectricMotor.renderShaft(null, 0,0,0, 0,0, 1.0f); GL11.glPopMatrix(); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java index 2ded1f7..e473c4b 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java @@ -4,10 +4,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.machine.energy.IEnergyHandler; public class TileEntityElectricMotor extends TileEntityDirection { - private BasicSink ic2EnergySink = new BasicSink(this, 1000, 1){ + private BasicSink ic2EnergySink = new BasicSink(this, 2000, 1){ @Override public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction) { @@ -18,6 +19,10 @@ public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction) { }; + private double lastEnergy; + + public float rotateStep = 360; + @Override public void invalidate() { ic2EnergySink.invalidate(); // notify the energy sink @@ -51,6 +56,55 @@ public void writeToNBT(NBTTagCompound tag) { public void updateEntity() { ic2EnergySink.updateEntity(); + + + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + } + + public void updateClientEntity() { + if(this.ic2EnergySink.getEnergyStored()>0){ + rotateStep-=8; + if(rotateStep<0){ + rotateStep+=360; + } + } + } + + private void updateServerEntity() { + + if(this.ic2EnergySink.getEnergyStored()!=lastEnergy){ + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + this.lastEnergy = this.ic2EnergySink.getEnergyStored(); + } + + if(this.ic2EnergySink.canUseEnergy(20)){ + + TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); + if(t!=null && t instanceof IEnergyHandler){ + + int i = ((IEnergyHandler)t).addEnergy(this.direction, 3, 40, false); + this.ic2EnergySink.useEnergy(i); + + + } + + } + + } + + + + public float getRotateStep() { + return rotateStep; + } + + } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java index 2bdb2c7..edbc37e 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java @@ -25,7 +25,7 @@ public class TileEntitySimpleMachine extends TileEntityDirection implements ISid //作業の進捗 public int machineWorkProgressTime; - //作業の進捗の最大値 この数字になると完了する + //作業の進捗の最大値 この数字になると完了する 200Speed消費 public int machineMaxProgressTime = 2000; //表示用 From 4b5ea16d7d24f5b835e25c5e7cba0939e7c91403 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 13 Dec 2014 22:50:41 +0900 Subject: [PATCH 43/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E7=87=BB?= =?UTF-8?q?=E8=A3=BD=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・燻製器を追加 ・塩を追加 --- .../java/shift/sextiarysector/SSBlocks.java | 9 +- .../java/shift/sextiarysector/SSFluids.java | 20 +- .../shift/sextiarysector/SSGuiHandler.java | 12 +- .../java/shift/sextiarysector/SSItems.java | 23 + .../shift/sextiarysector/SSOreDictionary.java | 5 + .../java/shift/sextiarysector/SSRecipes.java | 4 + .../block/BlockFluidFurnace.java | 12 +- .../block/BlockFluidMachineBase.java | 304 ++++++++++++ .../block/BlockFoodSmokers.java | 101 ++++ .../sextiarysector/block/BlockTofuMotor.java | 20 + ...ce.java => ContainerFluidMachineBase.java} | 8 +- .../event/ClientEventHandler.java | 3 + .../sextiarysector/gui/GuiFluidFurnace.java | 142 +----- .../gui/GuiFluidMachineBase.java | 150 ++++++ .../sextiarysector/gui/GuiFoodSmokers.java | 19 + .../nei/FoodSmokersRecipeHandler.java | 45 ++ .../nei/NEISextiarySectorConfig.java | 4 + .../sextiarysector/plugin/PluginIC2.java | 11 +- .../sextiarysector/plugin/PluginTofu.java | 56 +++ .../recipe/RecipesFoodSmokers.java | 18 + .../sextiarysector/recipe/RecipesFurnace.java | 2 + .../sextiarysector/recipe/RecipesMachine.java | 6 + ...cMotor.java => RendererElectricMotor.java} | 6 +- .../renderer/block/RendererTofuMotor.java | 119 +++++ ...odelElectricMotor.java => ModelMotor.java} | 4 +- .../tileentity/TileEntityFluidFurnace.java | 437 +---------------- .../TileEntityFluidMachineBase.java | 443 ++++++++++++++++++ .../tileentity/TileEntityFoodSmokers.java | 36 ++ .../tileentity/TileEntityTofuMotor.java | 26 + .../assets/sextiarysector/lang/en_US.lang | 22 +- .../textures/blocks/fluid/portal.png | Bin 0 -> 18207 bytes .../textures/blocks/fluid/portal.png.mcmeta | 3 + .../blocks/food_smokers_front_off.png | Bin 0 -> 651 bytes .../textures/blocks/food_smokers_front_on.png | Bin 0 -> 691 bytes .../textures/blocks/food_smokers_side.png | Bin 0 -> 405 bytes .../textures/blocks/food_smokers_top.png | Bin 0 -> 423 bytes .../textures/blocks/food_smokers_top_on.png | Bin 0 -> 397 bytes .../textures/blocks/iron_block.png | Bin 0 -> 333 bytes .../textures/items/energy_ring.png | Bin 0 -> 296 bytes .../textures/items/food/condiment/salt.png | Bin 0 -> 172 bytes .../textures/models/electric_motor.png | Bin 1885 -> 1760 bytes .../textures/models/tofu_motor.png | Bin 0 -> 1885 bytes 42 files changed, 1473 insertions(+), 597 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockTofuMotor.java rename src/main/java/shift/sextiarysector/container/{ContainerFluidFurnace.java => ContainerFluidMachineBase.java} (96%) create mode 100644 src/main/java/shift/sextiarysector/gui/GuiFluidMachineBase.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiFoodSmokers.java create mode 100644 src/main/java/shift/sextiarysector/nei/FoodSmokersRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/plugin/PluginTofu.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesFoodSmokers.java rename src/main/java/shift/sextiarysector/renderer/block/{RendereElectricMotor.java => RendererElectricMotor.java} (92%) create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererTofuMotor.java rename src/main/java/shift/sextiarysector/renderer/model/{ModelElectricMotor.java => ModelMotor.java} (94%) create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityFoodSmokers.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid/portal.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid/portal.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_front_off.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_front_on.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_side.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_top_on.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/iron_block.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/energy_ring.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/condiment/salt.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/tofu_motor.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index f6bfabe..7582d14 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -9,6 +9,7 @@ import shift.sextiarysector.block.BlockChunkLoader; import shift.sextiarysector.block.BlockFluidCrafter; import shift.sextiarysector.block.BlockFluidFurnace; +import shift.sextiarysector.block.BlockFoodSmokers; import shift.sextiarysector.block.BlockGFTank; import shift.sextiarysector.block.BlockGearBox; import shift.sextiarysector.block.BlockGearShaft; @@ -34,14 +35,15 @@ import shift.sextiarysector.block.BlockWoodHopper; import shift.sextiarysector.item.ItemBlockBottle; import shift.sextiarysector.item.ItemBlockCrop; +import shift.sextiarysector.item.ItemBlockDirection; import shift.sextiarysector.item.ItemBlockFluidCrafter; import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMonitor; -import shift.sextiarysector.item.ItemBlockDirection; import shift.sextiarysector.tileentity.TileEntityBlockBottle; import shift.sextiarysector.tileentity.TileEntityFarmland; import shift.sextiarysector.tileentity.TileEntityFluidCrafter; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; +import shift.sextiarysector.tileentity.TileEntityFoodSmokers; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityGearBox; import shift.sextiarysector.tileentity.TileEntityGearShaft; @@ -63,6 +65,7 @@ public class SSBlocks { public static Block LargeFurnace; public static Block fluidFurnace; + public static Block foodSmokers; public static Block magicFurnace; public static Block bottle; @@ -147,6 +150,10 @@ public static void initBlicks(){ GameRegistry.registerBlock(fluidFurnace, "FluidFurnace"); GameRegistry.registerTileEntity(TileEntityFluidFurnace.class, "FluidFurnace"); + foodSmokers = new BlockFoodSmokers().setBlockName("ss.food_smokers").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(foodSmokers, "FoodSmokers"); + GameRegistry.registerTileEntity(TileEntityFoodSmokers.class, "FoodSmokers"); + magicFurnace = new BlockMagicFurnace().setBlockName("ss.magic_furnace").setCreativeTab(SextiarySectorAPI.TabSSMagic); GameRegistry.registerBlock(magicFurnace, "MagicFurnace"); GameRegistry.registerTileEntity(TileEntityMagicFurnace.class, "MagicFurnace"); diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index 83e8ce4..73188b7 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -14,10 +14,14 @@ public class SSFluids { public static Fluid takumiTea; public static Fluid drinkingWater; + public static Fluid steam; + public static void initFluids(){ - takumiTea = new SSFluid("takumi_tea", 0x006400, 5, 2.0f); - drinkingWater = new SSFluid("drinking_water", 0xF0FFFF, 4, 1.0f); + takumiTea = new SSFluid("takumi_tea", 0, 0x006400, 5, 2.0f); + drinkingWater = new SSFluid("drinking_water", 0, 0xF0FFFF, 4, 1.0f); + + steam = new SSFluid("steam", 1, 0xFFFFFF, 1, 1.0f); } @@ -31,13 +35,15 @@ public static void postFluids(){ public static class SSFluid extends Fluid { + private int type; private int color; public int moisture; public float moistureSaturation; - public SSFluid(String fluidName, int color, int moisture, float moistureSaturation) { + public SSFluid(String fluidName, int type, int color, int moisture, float moistureSaturation) { super(fluidName); + this.type = type; this.color = color; this.moisture = moisture; this.moistureSaturation = moistureSaturation; @@ -57,12 +63,20 @@ public int getColor() @SideOnly(Side.CLIENT) public IIcon getStillIcon() { + switch(type){ + case 0:return ClientEventHandler.waterStill; + case 1:return ClientEventHandler.portal; + } return ClientEventHandler.waterStill; } @SideOnly(Side.CLIENT) public IIcon getFlowingIcon() { + switch(type){ + case 0:return ClientEventHandler.waterStill; + case 1:return ClientEventHandler.portal; + } return ClientEventHandler.waterStill; } diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 7ec077e..bdb0b5a 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -4,7 +4,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; -import shift.sextiarysector.container.ContainerFluidFurnace; +import shift.sextiarysector.container.ContainerFluidMachineBase; import shift.sextiarysector.container.ContainerGFTank; import shift.sextiarysector.container.ContainerLargeFurnace; import shift.sextiarysector.container.ContainerMagicFurnace; @@ -12,6 +12,7 @@ import shift.sextiarysector.container.ContainerSimpleMachine; import shift.sextiarysector.container.ContainerTabWorkbench; import shift.sextiarysector.gui.GuiFluidFurnace; +import shift.sextiarysector.gui.GuiFoodSmokers; import shift.sextiarysector.gui.GuiGFTank; import shift.sextiarysector.gui.GuiInventoryNext; import shift.sextiarysector.gui.GuiLargeFurnace; @@ -22,7 +23,7 @@ import shift.sextiarysector.gui.GuiSawmill; import shift.sextiarysector.gui.GuiTabCrafting; import shift.sextiarysector.gui.IServerGuiElement; -import shift.sextiarysector.tileentity.TileEntityFluidFurnace; +import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityLargeFurnace; import shift.sextiarysector.tileentity.TileEntityMagicFurnace; @@ -48,7 +49,9 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x switch(ID){ case 0 : return new ContainerLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); - case 1 : return new ContainerFluidFurnace(player.inventory, (TileEntityFluidFurnace) world.getTileEntity(x, y, z)); + case 1 : + case 2 : + return new ContainerFluidMachineBase(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); case 20: case 21: @@ -105,7 +108,8 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x switch(ID){ case 0 : return new GuiLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); - case 1 : return new GuiFluidFurnace(player.inventory, (TileEntityFluidFurnace) world.getTileEntity(x, y, z)); + case 1 : return new GuiFluidFurnace(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); + case 2 : return new GuiFoodSmokers(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); case 20:return new GuiMillstone(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); case 21:return new GuiLoom(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index a22d16b..606bebd 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -53,6 +53,9 @@ public class SSItems { public static Item steelIngot; + public static Item blueStoneIngot; + public static Item yellowStoneIngot; + public static Item mithrilIngot; public static Item orichalcumGem; @@ -60,6 +63,9 @@ public class SSItems { public static Item blueStoneSlimeBall; + + public static Item energyRing; + //unit public static Item craftUnit; @@ -111,6 +117,9 @@ public class SSItems { public static Item radish; + //料理 + public static Item salt; + //装備 public static Item shiftHat; @@ -180,6 +189,12 @@ public static void initItems(){ steelIngot = new Item().setUnlocalizedName("ss.steel_ingot").setTextureName("sextiarysector:ingot/steel_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(steelIngot, "SteelIngot"); + blueStoneIngot = new Item().setUnlocalizedName("ss.bluestone_ingot").setTextureName("sextiarysector:ingot/bluestone_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(blueStoneIngot, "BlueStoneIngot"); + + yellowStoneIngot = new Item().setUnlocalizedName("ss.yellowstone_ingot").setTextureName("sextiarysector:ingot/yellowstone_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(yellowStoneIngot, "YellowStoneIngot"); + mithrilIngot = new Item().setUnlocalizedName("ss.mithril_ingot").setTextureName("sextiarysector:ingot/mithril_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(mithrilIngot, "MithrilIngot"); @@ -192,6 +207,10 @@ public static void initItems(){ blueStoneSlimeBall = new Item().setUnlocalizedName("ss.blue_stone_slime_ball").setTextureName("sextiarysector:slimeball/bluestone_slimeball").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(blueStoneSlimeBall, "BlueStoneSlimeBall"); + + energyRing = new Item().setUnlocalizedName("ss.energy_ring").setTextureName("sextiarysector:energy_ring").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(energyRing, "EnergyRing"); + //Unit craftUnit = new ItemGuiUnit(201).setUnlocalizedName("ss.craft_unit").setTextureName("sextiarysector:unit/craft_unit").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(craftUnit, "CraftUnit"); @@ -280,6 +299,10 @@ public static void initItems(){ radish = new ItemCrop(3, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.radish").setTextureName("sextiarysector:crop/radish"); GameRegistry.registerItem(radish, "Radish"); + //料理 + salt = new Item().setUnlocalizedName("ss.salt").setTextureName("sextiarysector:food/condiment/salt").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(salt, "Salt"); + shiftHat = new ItemShiftHat().setUnlocalizedName("ss.shift_hat").setTextureName("sextiarysector:shift_hat"); GameRegistry.registerItem(shiftHat, "ShiftHat"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index 0810601..1e30f63 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -21,8 +21,13 @@ public static void init(){ OreDictionary.registerOre("dustCoal", SSItems.coalDust); OreDictionary.registerOre("dustIron", SSItems.ironDust); OreDictionary.registerOre("dustGold", SSItems.goldDust); + OreDictionary.registerOre("dustBluestone", SSItems.blueStoneDust); + OreDictionary.registerOre("dustYellowstone", SSItems.yellowStoneDust); OreDictionary.registerOre("ingotSteel", SSItems.steelIngot); + OreDictionary.registerOre("ingotBluestone", SSItems.blueStoneIngot); + OreDictionary.registerOre("ingotYellowstone", SSItems.yellowStoneIngot); + OreDictionary.registerOre("ingotNinja", SSItems.ninjaIngot); Item[] Knife = new Item[]{SSItems.woodKnife, SSItems.stoneKnife, SSItems.ironKnife, SSItems.goldKnife, SSItems.diamondKnife}; for(int i =0;i 0) + { + int k1 = this.furnaceRand.nextInt(21) + 10; + + if (k1 > itemstack.stackSize) + { + k1 = itemstack.stackSize; + } + + itemstack.stackSize -= k1; + EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float)this.furnaceRand.nextGaussian() * f3; + entityitem.motionY = (float)this.furnaceRand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.furnaceRand.nextGaussian() * f3; + par1World.spawnEntityInWorld(entityitem); + } + } + + } + + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); + + + if (tileentityfurnace.isFuel()) + { + int l = p_149734_1_.getBlockMetadata(p_149734_2_, p_149734_3_, p_149734_4_); + float f = (float)p_149734_2_ + 0.5F; + float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; + float f2 = (float)p_149734_4_ + 0.5F; + float f3 = 0.52F; + float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; + + if (l == 4) + { + p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + } + else if (l == 5) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + } + else if (l == 2) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + } + else if (l == 3) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + } + } + } + + @Override + public boolean hasComparatorInputOverride() + { + return true; + } + + @Override + public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) + { + return Container.calcRedstoneFromInventory((IInventory)par1World.getTileEntity(par2, par3, par4)); + } +} diff --git a/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java b/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java new file mode 100644 index 0000000..8e53dc6 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java @@ -0,0 +1,101 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.machine.item.IHammer; +import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; +import shift.sextiarysector.tileentity.TileEntityFoodSmokers; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockFoodSmokers extends BlockFluidMachineBase{ + + @SideOnly(Side.CLIENT) + private IIcon furnaceIconTop; + @SideOnly(Side.CLIENT) + private IIcon[] furnaceIconFront = new IIcon[2]; + @SideOnly(Side.CLIENT) + private IIcon furnaceIconTopOn; + + public BlockFoodSmokers() { + super(Material.iron); + } + + @Override + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + { + if (par1World.isRemote) + { + return true; + } + else + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)par1World.getTileEntity(par2, par3, par4); + + if(par5EntityPlayer.getCurrentEquippedItem() != null){ + if(par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof IHammer && ((IHammer)par5EntityPlayer.getCurrentEquippedItem().getItem()).canUse(par5EntityPlayer.getCurrentEquippedItem())){ + + tileentityfurnace.on = !tileentityfurnace.on; + ((IHammer)par5EntityPlayer.getCurrentEquippedItem().getItem()).use(par5EntityPlayer.getCurrentEquippedItem()); + par1World.markBlockForUpdate(par2, par3, par4); + return true; + + } + } + + + + if (tileentityfurnace != null) + { + par5EntityPlayer.openGui(SextiarySector.instance, 2, par1World, par2, par3, par4); + } + + return true; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int par1, int par2) + { + + return par1 == 1 ? this.furnaceIconTop : (par1 == 0 ? this.furnaceIconTop : (par1 != 3 ? this.blockIcon : this.furnaceIconFront[1])); + + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) + { + + TileEntityFoodSmokers tileEntity = (TileEntityFoodSmokers)p_149673_1_.getTileEntity(x, y, z); + + int meta = tileEntity.getDirection().ordinal();//p_149673_1_.getBlockMetadata(x, y, z); + + return side == 1 ? (tileEntity.on ? this.furnaceIconTopOn : this.furnaceIconTop) : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isFuel() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); + + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon("sextiarysector:food_smokers_side"); + this.furnaceIconFront[0] = par1IconRegister.registerIcon("sextiarysector:food_smokers_front_on"); + this.furnaceIconFront[1] = par1IconRegister.registerIcon("sextiarysector:food_smokers_front_off"); + this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:food_smokers_top"); + this.furnaceIconTopOn = par1IconRegister.registerIcon("sextiarysector:food_smokers_top_on"); + } + + @Override + public TileEntity createNewTileEntity(World par1World, int p_149915_2_) + { + return new TileEntityFoodSmokers(); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockTofuMotor.java b/src/main/java/shift/sextiarysector/block/BlockTofuMotor.java new file mode 100644 index 0000000..65d7310 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockTofuMotor.java @@ -0,0 +1,20 @@ +package shift.sextiarysector.block; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.plugin.PluginTofu; +import shift.sextiarysector.tileentity.TileEntityTofuMotor; + +public class BlockTofuMotor extends BlockMotor{ + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityTofuMotor(); + } + + @Override + public int getRenderType() + { + return PluginTofu.tofuMotorType; + } +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java b/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java similarity index 96% rename from src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java rename to src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java index 6817bf5..cc097a2 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java @@ -9,20 +9,20 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.tileentity.TileEntityFurnace; -import shift.sextiarysector.tileentity.TileEntityFluidFurnace; +import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ContainerFluidFurnace extends Container +public class ContainerFluidMachineBase extends Container { - private TileEntityFluidFurnace tileFurnace; + private TileEntityFluidMachineBase tileFurnace; private int lastFuel; private int lastFuelMax; private int workProgress; //private int lastFluid; //private int lastFluidID; - public ContainerFluidFurnace(InventoryPlayer p_i1812_1_, TileEntityFluidFurnace p_i1812_2_) + public ContainerFluidMachineBase(InventoryPlayer p_i1812_1_, TileEntityFluidMachineBase p_i1812_2_) { this.tileFurnace = p_i1812_2_; this.addSlotToContainer(new Slot(p_i1812_2_, 0, 56, 17)); diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 01be10a..bc622a9 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -93,6 +93,8 @@ public void onItemTooltipEvent(ItemTooltipEvent event) { public static IIcon waterFlow; public static IIcon waterStill; + public static IIcon portal; + @SubscribeEvent public void PreTextureStitchEvent(TextureStitchEvent.Pre event){ @@ -114,6 +116,7 @@ public void PreTextureStitchEvent(TextureStitchEvent.Pre event){ }else{ waterFlow = event.map.registerIcon("sextiarysector:fluid/water_flow"); waterStill = event.map.registerIcon("sextiarysector:fluid/water_still"); + portal = event.map.registerIcon("sextiarysector:fluid/portal"); } } diff --git a/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java b/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java index 98e1ca6..d80bf25 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/gui/GuiFluidFurnace.java @@ -1,148 +1,20 @@ package shift.sextiarysector.gui; -import java.text.NumberFormat; -import java.util.ArrayList; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; +import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; -import shift.sextiarysector.container.ContainerFluidFurnace; -import shift.sextiarysector.tileentity.TileEntityFluidFurnace; +public class GuiFluidFurnace extends GuiFluidMachineBase{ -public class GuiFluidFurnace extends GuiContainer -{ private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("sextiarysector:textures/guis/fluid_furnace.png"); - private TileEntityFluidFurnace tileFurnace; - - public GuiFluidFurnace(InventoryPlayer p_i1091_1_, TileEntityFluidFurnace p_i1091_2_) - { - super(new ContainerFluidFurnace(p_i1091_1_, p_i1091_2_)); - this.tileFurnace = p_i1091_2_; - } - - /** - * Draw the foreground layer for the GuiContainer (everything in front of the items) - */ - protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) - { - String s = this.tileFurnace.hasCustomInventoryName() ? this.tileFurnace.getInventoryName() : I18n.format(this.tileFurnace.getInventoryName(), new Object[0]); - this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752); - this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - } - - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(furnaceGuiTextures); - int k = (this.width - this.xSize) / 2; - int l = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); - - - if (this.tileFurnace.isFuel()) - { - int i1 = this.tileFurnace.getEnergyProgressScaled(13); - this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1); - i1 = this.tileFurnace.getWorkProgressScaled(24); - this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); - } - - //Fluid - if (this.tileFurnace.isFluid()) - { - //FluidStack f = this.tileFurnace.getTank().getFluid(); - this.drawFluidTank(k + 107,l + 15,this.tileFurnace.getTank(),34,36); - - } - this.mc.getTextureManager().bindTexture(furnaceGuiTextures); - this.drawTexturedModalRect(k + 108, l + 17, 176, 31, 32, 36); - - } - - @Override - public void drawScreen(int par1, int par2, float par3) - { - super.drawScreen(par1, par2, par3); - - ArrayList arraylist = new ArrayList(); - - String f = "None"; - - if (this.tileFurnace.isFluid()) - { - f = this.tileFurnace.getTank().getFluid().getFluid().getLocalizedName(this.tileFurnace.getTank().getFluid()); - } - - NumberFormat nfNum = NumberFormat.getNumberInstance(); - - arraylist.add(0,"" + EnumChatFormatting.RESET+ "Fluid Tank" + EnumChatFormatting.RESET ); - arraylist.add(1,"" + EnumChatFormatting.GRAY + "Fluid : "+f); - arraylist.add(2, ""+ EnumChatFormatting.GRAY + "Amount : " + nfNum.format(this.tileFurnace.getTank().getFluidAmount()) + " / " + nfNum.format(this.tileFurnace.getTank().getCapacity()) + " mB"); - - GL11.glPushMatrix(); - if (this.func_146978_c(106, 14, 36, 38, par1, par2)) - { - drawHoveringText(arraylist, par1, par2,fontRendererObj); - } - GL11.glPopMatrix(); - - - - } - - public void drawFluidTank(int x, int y, FluidTank fluidTank, int width, int height) { - - GL11.glColor3f(1,1,1); - - FluidStack fluidStack = fluidTank.getFluid(); - - ResourceLocation r; - if(fluidStack.getFluid().getSpriteNumber()==0){ - r = TextureMap.locationBlocksTexture; - }else{ - r = TextureMap.locationItemsTexture; - } - - this.mc.getTextureManager().bindTexture(r); - this.setColor3ubFromInt(fluidStack.getFluid().getColor(fluidStack)); - - int widthR = width;//*(fluidTank.getFluidAmount()/fluidTank.getCapacity()); - int heightR = (int) (width*((float)fluidTank.getFluidAmount()/(float)fluidTank.getCapacity())); - - int yR = y+(height-heightR); - - int widthL = 0; - int heightL = 0; - IIcon icon = (fluidStack.getFluid().getIcon(fluidStack)); - - for (int i = 0; i < widthR; i += 16) { - - for (int j = 0; j < heightR; j += 16) { - - widthL = Math.min(widthR - i, 16); - heightL = Math.min(heightR - j, 16); - this.drawTexturedModelRectFromIcon(x + i, yR + j, icon, widthL, heightL); - - } - } - - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); + public GuiFluidFurnace(InventoryPlayer p_i1091_1_,TileEntityFluidMachineBase p_i1091_2_) { + super(p_i1091_1_, p_i1091_2_); } - public static void setColor3ubFromInt(int color) { - - GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); - + @Override + protected ResourceLocation getBindTexture() { + return furnaceGuiTextures; } } diff --git a/src/main/java/shift/sextiarysector/gui/GuiFluidMachineBase.java b/src/main/java/shift/sextiarysector/gui/GuiFluidMachineBase.java new file mode 100644 index 0000000..aabcc23 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiFluidMachineBase.java @@ -0,0 +1,150 @@ +package shift.sextiarysector.gui; + +import java.text.NumberFormat; +import java.util.ArrayList; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.container.ContainerFluidMachineBase; +import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; + +public abstract class GuiFluidMachineBase extends GuiContainer +{ + private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("sextiarysector:textures/guis/fluid_furnace.png"); + private TileEntityFluidMachineBase tileFurnace; + + public GuiFluidMachineBase(InventoryPlayer p_i1091_1_, TileEntityFluidMachineBase p_i1091_2_) + { + super(new ContainerFluidMachineBase(p_i1091_1_, p_i1091_2_)); + this.tileFurnace = p_i1091_2_; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + String s = this.tileFurnace.hasCustomInventoryName() ? this.tileFurnace.getInventoryName() : I18n.format(this.tileFurnace.getInventoryName(), new Object[0]); + this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(getBindTexture()); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + + + if (this.tileFurnace.isFuel()) + { + int i1 = this.tileFurnace.getEnergyProgressScaled(13); + this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1); + i1 = this.tileFurnace.getWorkProgressScaled(24); + this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); + } + + //Fluid + if (this.tileFurnace.isFluid()) + { + //FluidStack f = this.tileFurnace.getTank().getFluid(); + this.drawFluidTank(k + 107,l + 15,this.tileFurnace.getTank(),34,36); + + } + this.mc.getTextureManager().bindTexture(getBindTexture()); + this.drawTexturedModalRect(k + 108, l + 17, 176, 31, 32, 36); + + } + + @Override + public void drawScreen(int par1, int par2, float par3) + { + super.drawScreen(par1, par2, par3); + + ArrayList arraylist = new ArrayList(); + + String f = "None"; + + if (this.tileFurnace.isFluid()) + { + f = this.tileFurnace.getTank().getFluid().getFluid().getLocalizedName(this.tileFurnace.getTank().getFluid()); + } + + NumberFormat nfNum = NumberFormat.getNumberInstance(); + + arraylist.add(0,"" + EnumChatFormatting.RESET+ "Fluid Tank" + EnumChatFormatting.RESET ); + arraylist.add(1,"" + EnumChatFormatting.GRAY + "Fluid : "+f); + arraylist.add(2, ""+ EnumChatFormatting.GRAY + "Amount : " + nfNum.format(this.tileFurnace.getTank().getFluidAmount()) + " / " + nfNum.format(this.tileFurnace.getTank().getCapacity()) + " mB"); + + GL11.glPushMatrix(); + if (this.func_146978_c(106, 14, 36, 38, par1, par2)) + { + drawHoveringText(arraylist, par1, par2,fontRendererObj); + } + GL11.glPopMatrix(); + + + + } + + public void drawFluidTank(int x, int y, FluidTank fluidTank, int width, int height) { + + GL11.glColor3f(1,1,1); + + FluidStack fluidStack = fluidTank.getFluid(); + + ResourceLocation r; + if(fluidStack.getFluid().getSpriteNumber()==0){ + r = TextureMap.locationBlocksTexture; + }else{ + r = TextureMap.locationItemsTexture; + } + + this.mc.getTextureManager().bindTexture(r); + this.setColor3ubFromInt(fluidStack.getFluid().getColor(fluidStack)); + + int widthR = width;//*(fluidTank.getFluidAmount()/fluidTank.getCapacity()); + int heightR = (int) (width*((float)fluidTank.getFluidAmount()/(float)fluidTank.getCapacity())); + + int yR = y+(height-heightR); + + int widthL = 0; + int heightL = 0; + IIcon icon = (fluidStack.getFluid().getIcon(fluidStack)); + + for (int i = 0; i < widthR; i += 16) { + + for (int j = 0; j < heightR; j += 16) { + + widthL = Math.min(widthR - i, 16); + heightL = Math.min(heightR - j, 16); + this.drawTexturedModelRectFromIcon(x + i, yR + j, icon, widthL, heightL); + + } + } + + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); + + } + + public static void setColor3ubFromInt(int color) { + + GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + + } + + protected abstract ResourceLocation getBindTexture(); + +} diff --git a/src/main/java/shift/sextiarysector/gui/GuiFoodSmokers.java b/src/main/java/shift/sextiarysector/gui/GuiFoodSmokers.java new file mode 100644 index 0000000..e681513 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiFoodSmokers.java @@ -0,0 +1,19 @@ +package shift.sextiarysector.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; + +public class GuiFoodSmokers extends GuiFluidMachineBase{ + + private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("sextiarysector:textures/guis/fluid_furnace.png"); + + public GuiFoodSmokers(InventoryPlayer p_i1091_1_,TileEntityFluidMachineBase p_i1091_2_) { + super(p_i1091_1_, p_i1091_2_); + } + + @Override + protected ResourceLocation getBindTexture() { + return furnaceGuiTextures; + } +} diff --git a/src/main/java/shift/sextiarysector/nei/FoodSmokersRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/FoodSmokersRecipeHandler.java new file mode 100644 index 0000000..c728b2b --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/FoodSmokersRecipeHandler.java @@ -0,0 +1,45 @@ +package shift.sextiarysector.nei; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraftforge.fluids.FluidContainerRegistry; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiFoodSmokers; +import shift.sextiarysector.recipe.RecipeSimpleFluid; + +public class FoodSmokersRecipeHandler extends SimpleFluidRecipeHandler{ + + @Override + Class getHandlerClass() { + return FoodSmokersRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_FoodSmokers"; + } + + @Override + RecipeSimpleFluid getRecipe() { + return SSRecipes.foodSmokers; + } + + @Override + String getGuiRecipeName() { + return "ss.food_smokers"; + } + + @Override + public Class getGuiClass() { + return GuiFoodSmokers.class; + } + + @Override + int getMaxFluid() { + return FluidContainerRegistry.BUCKET_VOLUME * 10; + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/fluid_furnace_nei.png"; + } +} diff --git a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java index 5cba1a8..bc5d0c3 100644 --- a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java +++ b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java @@ -1,6 +1,7 @@ package shift.sextiarysector.nei; import shift.sextiarysector.gui.GuiFluidFurnace; +import shift.sextiarysector.gui.GuiFoodSmokers; import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMagicFurnace; @@ -43,6 +44,8 @@ public void loadConfig() { API.registerRecipeHandler(new FluidFurnaceRecipeHandler()); API.registerUsageHandler(new FluidFurnaceRecipeHandler()); + API.registerRecipeHandler(new FoodSmokersRecipeHandler()); + API.registerUsageHandler(new FoodSmokersRecipeHandler()); API.registerRecipeHandler(new MagicFurnaceRecipeHandler()); API.registerUsageHandler(new MagicFurnaceRecipeHandler()); @@ -68,6 +71,7 @@ public void loadConfig() { API.registerGuiOverlay(GuiLargeFurnace.class, "furnaceCrafting"); API.registerGuiOverlay(GuiFluidFurnace.class, "SS_FluidFurnace"); + API.registerGuiOverlay(GuiFoodSmokers.class, "SS_FoodSmokers"); API.registerGuiOverlay(GuiMagicFurnace.class, "SS_MagicFurnace"); API.registerGuiOverlay(GuiMillstone.class, "SS_Millstone"); diff --git a/src/main/java/shift/sextiarysector/plugin/PluginIC2.java b/src/main/java/shift/sextiarysector/plugin/PluginIC2.java index 2c5ca73..b3173cf 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginIC2.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginIC2.java @@ -6,11 +6,12 @@ import net.minecraft.item.crafting.CraftingManager; import net.minecraftforge.oredict.ShapedOreRecipe; import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.SSItems; import shift.sextiarysector.SSRecipes; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.block.BlockElectricMotor; import shift.sextiarysector.item.ItemBlockDirection; -import shift.sextiarysector.renderer.block.RendereElectricMotor; +import shift.sextiarysector.renderer.block.RendererElectricMotor; import shift.sextiarysector.tileentity.TileEntityElectricMotor; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; @@ -38,7 +39,7 @@ public String getModName() { @Override public void prePlugin(FMLPreInitializationEvent event) { - electricMotor = new BlockElectricMotor().setBlockName("ss.electric_motor").setCreativeTab(SextiarySectorAPI.TabSSCore); + electricMotor = new BlockElectricMotor().setBlockName("ss.electric_motor").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerBlock(electricMotor, ItemBlockDirection.class, "ElectricMotor"); GameRegistry.registerTileEntity(TileEntityElectricMotor.class, "ElectricMotor"); @@ -49,8 +50,8 @@ public void prePlugin(FMLPreInitializationEvent event) { public void preClientPlugin(FMLPreInitializationEvent event) { electricMotorType = cpw.mods.fml.client.registry.RenderingRegistry.getNextAvailableRenderId(); - cpw.mods.fml.client.registry.RenderingRegistry.registerBlockHandler(new RendereElectricMotor()); - cpw.mods.fml.client.registry.ClientRegistry.bindTileEntitySpecialRenderer(TileEntityElectricMotor.class, new RendereElectricMotor()); + cpw.mods.fml.client.registry.RenderingRegistry.registerBlockHandler(new RendererElectricMotor()); + cpw.mods.fml.client.registry.ClientRegistry.bindTileEntitySpecialRenderer(TileEntityElectricMotor.class, new RendererElectricMotor()); } @@ -66,7 +67,7 @@ public void initPlugin(FMLInitializationEvent event) { CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(this.electricMotor, 1), new Object[] { "xzx", "xyx","pbp", Character.valueOf('x'), "paneGlassColorless", - Character.valueOf('y'), "plankWood", + Character.valueOf('y'), SSItems.energyRing, Character.valueOf('z'), SSBlocks.steelShaft, Character.valueOf('b'), new ItemStack(cable,1,0), Character.valueOf('p'), "plateDenseTin" diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java new file mode 100644 index 0000000..aca62ef --- /dev/null +++ b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java @@ -0,0 +1,56 @@ +package shift.sextiarysector.plugin; + +import net.minecraft.block.Block; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.block.BlockElectricMotor; +import shift.sextiarysector.item.ItemBlockDirection; +import shift.sextiarysector.renderer.block.RendererTofuMotor; +import shift.sextiarysector.tileentity.TileEntityTofuMotor; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PluginTofu implements IPlugin{ + + @Override + public String getModName() { + return "TofuCraft"; + } + + public static int tofuMotorType; + public static Block tofuMotor; + + @Override + public void prePlugin(FMLPreInitializationEvent event) { + tofuMotor = new BlockElectricMotor().setBlockName("ss.electric_motor").setCreativeTab(SextiarySectorAPI.TabSSMachine); + GameRegistry.registerBlock(tofuMotor, ItemBlockDirection.class, "TofuMotor"); + GameRegistry.registerTileEntity(TileEntityTofuMotor.class, "ElectricMotor"); + + } + + @Override + @SideOnly(Side.CLIENT) + public void preClientPlugin(FMLPreInitializationEvent event) { + + tofuMotorType = cpw.mods.fml.client.registry.RenderingRegistry.getNextAvailableRenderId(); + cpw.mods.fml.client.registry.RenderingRegistry.registerBlockHandler(new RendererTofuMotor()); + cpw.mods.fml.client.registry.ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTofuMotor.class, new RendererTofuMotor()); + + } + + @Override + public void initPlugin(FMLInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void postPlugin(FMLPostInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFoodSmokers.java b/src/main/java/shift/sextiarysector/recipe/RecipesFoodSmokers.java new file mode 100644 index 0000000..d574060 --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFoodSmokers.java @@ -0,0 +1,18 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SSFluids; +import shift.sextiarysector.SSItems; + +public class RecipesFoodSmokers { + + public static void addRecipes(RecipeSimpleFluid recipe) + { + + recipe.add(new ItemStack(Items.water_bucket,1),new ItemStack(SSItems.salt, 1), new FluidStack(SSFluids.steam, 500)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java index afc23ad..b8a4da6 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java @@ -11,6 +11,8 @@ public static void addRecipes() { GameRegistry.addSmelting(new ItemStack(SSItems.ironDust),new ItemStack(Items.iron_ingot),0.1f); GameRegistry.addSmelting(new ItemStack(SSItems.goldDust),new ItemStack(Items.gold_ingot),0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.blueStoneDust),new ItemStack(SSItems.blueStoneIngot),0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.yellowStoneDust),new ItemStack(SSItems.yellowStoneIngot),0.1f); } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index 11317e3..9883dd7 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -24,6 +24,12 @@ public static void addRecipes(CraftingManager p_77608_1_) 'a', Blocks.furnace }); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.energyRing, 2), + new Object[] { "xxx", "xyx","xxx", + Character.valueOf('y'), "ingotNinja", + Character.valueOf('x'), "ingotYellowstone" + })); + Object[] material = new Object[]{"plankWood", "stone", "ingotSteel"}; Item[] gear = new Item[]{SSItems.woodGear, SSItems.stoneGear, SSItems.steelGear}; String[] gearOre = new String[]{"gearWood", "gearStone", "gearSteel"}; diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java b/src/main/java/shift/sextiarysector/renderer/block/RendererElectricMotor.java similarity index 92% rename from src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java rename to src/main/java/shift/sextiarysector/renderer/block/RendererElectricMotor.java index ab7b2eb..3395305 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendereElectricMotor.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererElectricMotor.java @@ -10,12 +10,12 @@ import org.lwjgl.opengl.GL11; import shift.sextiarysector.plugin.PluginIC2; -import shift.sextiarysector.renderer.model.ModelElectricMotor; +import shift.sextiarysector.renderer.model.ModelMotor; import shift.sextiarysector.tileentity.TileEntityElectricMotor; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -public class RendereElectricMotor extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { +public class RendererElectricMotor extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); @@ -63,7 +63,7 @@ public int getRenderId() { private static final ResourceLocation electricMotorTextures = new ResourceLocation("sextiarysector:textures/models/electric_motor.png"); - static public ModelElectricMotor modelElectricMotor = new ModelElectricMotor(); + static public ModelMotor modelElectricMotor = new ModelMotor(); @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererTofuMotor.java b/src/main/java/shift/sextiarysector/renderer/block/RendererTofuMotor.java new file mode 100644 index 0000000..59af517 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererTofuMotor.java @@ -0,0 +1,119 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.plugin.PluginTofu; +import shift.sextiarysector.renderer.model.ModelMotor; +import shift.sextiarysector.tileentity.TileEntityTofuMotor; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererTofuMotor extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + + if(modelID!=this.getRenderId()){ + return ; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + + GL11.glRotatef(90, 1, 0, 0); + GL11.glRotatef(180, 0, 1, 0); + + this.bind(tofuMotorTextures); + + modelElectricMotor.render(null, 0,0,0, 0,0, 1.0f); + modelElectricMotor.renderShaft(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, + RenderBlocks renderer) { + return false; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return PluginTofu.tofuMotorType; + } + + private static final ResourceLocation tofuMotorTextures = new ResourceLocation("sextiarysector:textures/models/tofu_motor.png"); + + static public ModelMotor modelElectricMotor = new ModelMotor(); + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + + TileEntityTofuMotor tile = (TileEntityTofuMotor)tileentity; + + //System.out.println("renderTileEntityAt"); + + GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + + this.bindTexture(tofuMotorTextures); + + switch(tile.direction){ + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + default: + break; + } + + modelElectricMotor.render(null, 0,0,0, 0,0, 1.0f); + + //傾きのスピード + //GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + + + modelElectricMotor.renderShaft(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + } + + + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelElectricMotor.java b/src/main/java/shift/sextiarysector/renderer/model/ModelMotor.java similarity index 94% rename from src/main/java/shift/sextiarysector/renderer/model/ModelElectricMotor.java rename to src/main/java/shift/sextiarysector/renderer/model/ModelMotor.java index a501f65..631d962 100644 --- a/src/main/java/shift/sextiarysector/renderer/model/ModelElectricMotor.java +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelMotor.java @@ -4,14 +4,14 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelElectricMotor extends ModelBase +public class ModelMotor extends ModelBase { //fields ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; - public ModelElectricMotor() + public ModelMotor() { textureWidth = 64; textureHeight = 64; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java index 5b1ce81..88d04d2 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFurnace.java @@ -1,451 +1,24 @@ package shift.sextiarysector.tileentity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.tileentity.TileEntityFurnace; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import shift.sextiarysector.SSRecipes; -import shift.sextiarysector.api.machine.item.GearForceItem; -import shift.sextiarysector.container.ItemBox; -public class TileEntityFluidFurnace extends TileEntityDirection implements ISidedInventory, IFluidHandler { - - protected static final int[] slots_top = new int[] { 0 }; - protected static final int[] slots_bottom = new int[] { 2, 1 }; - protected static final int[] slots_sides = new int[] { 1 }; - - //0 素材 ,1 燃料 ,2 完成品 ,3 素材のコンテナ ,4 空のボトル , 5 液体の入ったボトル - protected ItemBox items = new ItemBox("Base", 6); - - //液体 - private FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10); - - //作業の進捗 - public int machineWorkProgressTime; - - //作業の進捗の最大値 この数字になると完了する - public int machineMaxProgressTime = 200; - - //燃料と投入されている燃料のマックス状態の量 - public int fuel; - public int fuelMax; - - public boolean on; +public class TileEntityFluidFurnace extends TileEntityFluidMachineBase{ @Override - public void updateEntity() - { - super.updateEntity(); - if (this.worldObj.isRemote) { - this.updateClientEntity(); - } else { - - this.updateServerEntity(); - - } - - } - - public void updateClientEntity() - { - } - - public void updateServerEntity() - { - if(fuel>0){ - fuel--; - if(fuel==0){ - this.fuelMax=0; - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - //this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - }else{ - if(this.canWork()){ - this.chargeFuel(); - } - - } - - if(this.isFuel() && this.canWork()){ - - machineWorkProgressTime++; - - if(machineWorkProgressTime>=machineMaxProgressTime){ - this.workItem(); - machineWorkProgressTime=0; - } - - } - - this.chargeFluid(); - if(this.on && this.tank.getFluidAmount() > 0)this.chargeUPFluid(); - - } - - private void chargeUPFluid(){ - - if(this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord) instanceof IFluidHandler){ - IFluidHandler f = (IFluidHandler) this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); - - if(f.canFill(ForgeDirection.DOWN, this.tank.getFluid().getFluid())){ - int i = f.fill(ForgeDirection.DOWN, this.tank.getFluid(), true); - this.tank.drain(i, true); - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - - } - - } - - private void chargeFluid(){ - - if(canChargeFluid()){ - - ItemStack empty = items.getStackInSlot(4); - - for(FluidContainerData f : FluidContainerRegistry.getRegisteredFluidContainerData()){ - - if(f.emptyContainer.isItemEqual(empty) && f.fluid.isFluidEqual(this.tank.getFluid()) && f.fluid.amount <= this.tank.getFluidAmount()){ - - ItemStack item = FluidContainerRegistry.fillFluidContainer(this.tank.getFluid(), empty); - if (this.items.getStackInSlot(5) == null) - { - this.setInventorySlotContents(5, item.copy()); - } - else if (this.items.getStackInSlot(5).isItemEqual(item)) - { - this.items.getStackInSlot(5).stackSize += item.stackSize; - } - - this.tank.drain(f.fluid.amount, true); - - this.items.reduceStackSize(4, 1); - - this.markDirty(); - - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - - return ; - } - - } - - } - - } - - public boolean canChargeFluid() - { - if(items.getStackInSlot(4) == null)return false; - ItemStack item = FluidContainerRegistry.fillFluidContainer(this.tank.getFluid(), items.getStackInSlot(4)); - if(item == null)return false; - if(this.items.getStackInSlot(5) == null)return true; - int result = this.items.getStackInSlot(5).stackSize + item.stackSize; - return (result <= getInventoryStackLimit() && result <= item.getMaxStackSize()); - } - - private void chargeFuel(){ - - if(TileEntityFurnace.isItemFuel(this.items.getStackInSlot(1))){ - this.fuel = this.fuelMax = TileEntityFurnace.getItemBurnTime(this.items.getStackInSlot(1)); - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - - } - - public boolean isFuel() - { - return this.fuel > 0; - } - - public boolean canWork() - { - if (this.items.getStackInSlot(0) == null) - { - return false; - } - else - { - ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); - FluidStack fluidstack = this.getFluidResult(this.items.getStackInSlot(0)); - if (itemstack == null && fluidstack == null) return false; - return this.checkItem(itemstack) && this.checkFluid(fluidstack) && this.checkContainerItem(this.items.getStackInSlot(0)); - } - } - - private boolean checkItem(ItemStack itemstack){ - - if (this.items.getStackInSlot(2) == null || itemstack == null) return true; - if (!this.items.getStackInSlot(2).isItemEqual(itemstack)) return false; - int result = this.items.getStackInSlot(2).stackSize + itemstack.stackSize; - return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); - } - - private boolean checkContainerItem(ItemStack itemstack){ - - if(!itemstack.getItem().hasContainerItem(itemstack)) return true; - ItemStack itemstackC = itemstack.getItem().getContainerItem(itemstack.copy()); - if (this.items.getStackInSlot(3) == null || itemstackC == null) return true; - if (!this.items.getStackInSlot(3).isItemEqual(itemstackC)) return false; - int result = this.items.getStackInSlot(3).stackSize + itemstackC.stackSize; - return (result <= getInventoryStackLimit() && result <= itemstackC.getMaxStackSize()); - - } - - private boolean checkFluid(FluidStack fluidstack){ - - if (this.getTank().getFluidAmount()==0 || fluidstack == null) return true; - if (!this.getTank().getFluid().isFluidEqual(fluidstack)) return false; - int result = this.getTank().getFluidAmount() + fluidstack.amount; - return (result <= this.getTank().getCapacity()); - - } - - public void workItem() - { - if (this.canWork()) - { - ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); - FluidStack fluidstack = this.getFluidResult(this.items.getStackInSlot(0)); - - //item - if (this.items.getStackInSlot(2) == null) - { - this.setInventorySlotContents(2, itemstack.copy()); - } - else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) - { - this.items.getStackInSlot(2).stackSize += itemstack.stackSize; - } - - //CItem - if(this.items.getStackInSlot(0).getItem().hasContainerItem(this.items.getStackInSlot(0))){ - - ItemStack itemC = this.items.getStackInSlot(0).getItem().getContainerItem(this.items.getStackInSlot(0).copy()); - - if (this.items.getStackInSlot(3) == null) - { - this.setInventorySlotContents(3, itemC); - } - else if (this.items.getStackInSlot(3).isItemEqual(itemC)) - { - this.items.getStackInSlot(3).stackSize += itemC.stackSize; - } - } - - - //fluid - this.getTank().fill(fluidstack, true); - - this.items.reduceStackSize(0, 1); - - this.markDirty(); - - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - - } - } - - - private ItemStack getResult(ItemStack stackInSlot) { + protected ItemStack getResult(ItemStack stackInSlot) { return SSRecipes.fluidFurnace.getResult(stackInSlot); } - private FluidStack getFluidResult(ItemStack stackInSlot) { - return SSRecipes.fluidFurnace.getFluidResult(stackInSlot); - } - - - //GUI - public int getWorkProgressScaled(int par1) - { - return this.machineWorkProgressTime / (machineMaxProgressTime / par1); - } - - public int getEnergyProgressScaled(int par1) - { - return (int) (this.fuel / (this.fuelMax / par1)); - } - - public FluidTank getTank() { - return tank; - } - - public boolean isFluid(){ - return this.getTank().getFluidAmount() > 0; - } - - //IInventory関係 - @Override - public int getSizeInventory() { - return items.getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(int i) { - return items.getStackInSlot(i); - } - - @Override - public ItemStack decrStackSize(int i, int j) { - return items.decrStackSize(i, j); - } - - @Override - public ItemStack getStackInSlotOnClosing(int i) { - return items.getStackInSlotOnClosing(i); - } - @Override - public void setInventorySlotContents(int i, ItemStack itemstack) { - items.setInventorySlotContents(i, itemstack); + protected FluidStack getFluidResult(ItemStack stackInSlot) { + return SSRecipes.fluidFurnace.getFluidResult(stackInSlot); } @Override public String getInventoryName() { - return "gui.ss.fluid_furnace";//+SimpleMachine.values()[this.worldObj.getBlockMetadata(xCoord, yCoord, zCoord)].icon+".name"; - } - - @Override - public boolean hasCustomInventoryName() { - return false; - } - - @Override - public int getInventoryStackLimit() { - return items.getInventoryStackLimit(); - } - - @Override - public void markDirty(){ - super.markDirty(); - items.onInventoryChanged(); - } - - @Override - public boolean isUseableByPlayer(EntityPlayer entityplayer) { - return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer - .getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; - } - - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { - } - - @Override - public boolean isItemValidForSlot(int i, ItemStack itemstack) { - - if (i == 1) { - return GearForceItem.manager.isGearForceItem(itemstack); - } - - return i != 2; - } - - //ISidedInventory関係 - @Override - public int[] getAccessibleSlotsFromSide(int var1) { - return var1 == 0 ? slots_bottom : (var1 == 1 ? slots_top : slots_sides); - } - - @Override - public boolean canInsertItem(int i, ItemStack itemstack, int j) { - return this.isItemValidForSlot(i, itemstack); - } - - @Override - public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) - { - return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket; - } - - //IFluidHandler関係 - @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill) - { - return 0;//tank.fill(resource, doFill); - } - - @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) - { - if (resource == null || !resource.isFluidEqual(getTank().getFluid())) - { - return null; - } - return getTank().drain(resource.amount, doDrain); - } - - @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) - { - return getTank().drain(maxDrain, doDrain); - } - - @Override - public boolean canFill(ForgeDirection from, Fluid fluid) - { - return false; - } - - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) - { - return true; - } - - @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from) - { - return new FluidTankInfo[] { getTank().getInfo() }; - } - - //NBT関係 - @Override - public void readFromNBT(NBTTagCompound nbt) { - - super.readFromNBT(nbt); - items.readFromNBT(nbt); - getTank().readFromNBT(nbt); - if(nbt.hasKey("Empty") && tank.getFluidAmount() > 0)this.tank.setFluid(null); - this.machineWorkProgressTime = nbt.getShort("WorkTime"); - this.fuel = nbt.getInteger("fuel"); - this.fuelMax = nbt.getInteger("fuelMax"); - this.on = nbt.getBoolean("on"); - } - - @Override - public void writeToNBT(NBTTagCompound nbt) { - - super.writeToNBT(nbt); - items.writeToNBT(nbt); - getTank().writeToNBT(nbt); - nbt.setShort("WorkTime", (short)this.machineWorkProgressTime); - nbt.setInteger("fuel", this.fuel); - nbt.setInteger("fuelMax", this.fuelMax); - nbt.setBoolean("on", this.on); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ - this.readFromNBT(pkt.func_148857_g()); - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + return "gui.ss.fluid_furnace"; } } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java new file mode 100644 index 0000000..2432a29 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java @@ -0,0 +1,443 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntityFurnace; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.container.ItemBox; + +public abstract class TileEntityFluidMachineBase extends TileEntityDirection implements ISidedInventory, IFluidHandler { + + protected static final int[] slots_top = new int[] { 0 }; + protected static final int[] slots_bottom = new int[] { 2, 1 }; + protected static final int[] slots_sides = new int[] { 1 }; + + //0 素材 ,1 燃料 ,2 完成品 ,3 素材のコンテナ ,4 空のボトル , 5 液体の入ったボトル + protected ItemBox items = new ItemBox("Base", 6); + + //液体 + private FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10); + + //作業の進捗 + public int machineWorkProgressTime; + + //作業の進捗の最大値 この数字になると完了する + public int machineMaxProgressTime = 200; + + //燃料と投入されている燃料のマックス状態の量 + public int fuel; + public int fuelMax; + + public boolean on; + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + } + + public void updateServerEntity() + { + if(fuel>0){ + fuel--; + if(fuel==0){ + this.fuelMax=0; + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + //this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + }else{ + if(this.canWork()){ + this.chargeFuel(); + } + + } + + if(this.isFuel() && this.canWork()){ + + machineWorkProgressTime++; + + if(machineWorkProgressTime>=machineMaxProgressTime){ + this.workItem(); + machineWorkProgressTime=0; + } + + } + + this.chargeFluid(); + if(this.on && this.tank.getFluidAmount() > 0)this.chargeUPFluid(); + + } + + private void chargeUPFluid(){ + + if(this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord) instanceof IFluidHandler){ + IFluidHandler f = (IFluidHandler) this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); + + if(f.canFill(ForgeDirection.DOWN, this.tank.getFluid().getFluid())){ + int i = f.fill(ForgeDirection.DOWN, this.tank.getFluid(), true); + this.tank.drain(i, true); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + } + + private void chargeFluid(){ + + if(canChargeFluid()){ + + ItemStack empty = items.getStackInSlot(4); + + for(FluidContainerData f : FluidContainerRegistry.getRegisteredFluidContainerData()){ + + if(f.emptyContainer.isItemEqual(empty) && f.fluid.isFluidEqual(this.tank.getFluid()) && f.fluid.amount <= this.tank.getFluidAmount()){ + + ItemStack item = FluidContainerRegistry.fillFluidContainer(this.tank.getFluid(), empty); + if (this.items.getStackInSlot(5) == null) + { + this.setInventorySlotContents(5, item.copy()); + } + else if (this.items.getStackInSlot(5).isItemEqual(item)) + { + this.items.getStackInSlot(5).stackSize += item.stackSize; + } + + this.tank.drain(f.fluid.amount, true); + + this.items.reduceStackSize(4, 1); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + return ; + } + + } + + } + + } + + public boolean canChargeFluid() + { + if(items.getStackInSlot(4) == null)return false; + ItemStack item = FluidContainerRegistry.fillFluidContainer(this.tank.getFluid(), items.getStackInSlot(4)); + if(item == null)return false; + if(this.items.getStackInSlot(5) == null)return true; + int result = this.items.getStackInSlot(5).stackSize + item.stackSize; + return (result <= getInventoryStackLimit() && result <= item.getMaxStackSize()); + } + + protected void chargeFuel(){ + + if(TileEntityFurnace.isItemFuel(this.items.getStackInSlot(1))){ + this.fuel = this.fuelMax = TileEntityFurnace.getItemBurnTime(this.items.getStackInSlot(1)); + this.items.reduceStackSize(1, 1); + this.markDirty(); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + public boolean isFuel() + { + return this.fuel > 0; + } + + public boolean canWork() + { + if (this.items.getStackInSlot(0) == null) + { + return false; + } + else + { + ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); + FluidStack fluidstack = this.getFluidResult(this.items.getStackInSlot(0)); + if (itemstack == null && fluidstack == null) return false; + return this.checkItem(itemstack) && this.checkFluid(fluidstack) && this.checkContainerItem(this.items.getStackInSlot(0)); + } + } + + private boolean checkItem(ItemStack itemstack){ + + if (this.items.getStackInSlot(2) == null || itemstack == null) return true; + if (!this.items.getStackInSlot(2).isItemEqual(itemstack)) return false; + int result = this.items.getStackInSlot(2).stackSize + itemstack.stackSize; + return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); + } + + private boolean checkContainerItem(ItemStack itemstack){ + + if(!itemstack.getItem().hasContainerItem(itemstack)) return true; + ItemStack itemstackC = itemstack.getItem().getContainerItem(itemstack.copy()); + if (this.items.getStackInSlot(3) == null || itemstackC == null) return true; + if (!this.items.getStackInSlot(3).isItemEqual(itemstackC)) return false; + int result = this.items.getStackInSlot(3).stackSize + itemstackC.stackSize; + return (result <= getInventoryStackLimit() && result <= itemstackC.getMaxStackSize()); + + } + + private boolean checkFluid(FluidStack fluidstack){ + + if (this.getTank().getFluidAmount()==0 || fluidstack == null) return true; + if (!this.getTank().getFluid().isFluidEqual(fluidstack)) return false; + int result = this.getTank().getFluidAmount() + fluidstack.amount; + return (result <= this.getTank().getCapacity()); + + } + + public void workItem() + { + if (this.canWork()) + { + ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); + FluidStack fluidstack = this.getFluidResult(this.items.getStackInSlot(0)); + + //item + if (this.items.getStackInSlot(2) == null) + { + this.setInventorySlotContents(2, itemstack.copy()); + } + else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) + { + this.items.getStackInSlot(2).stackSize += itemstack.stackSize; + } + + //CItem + if(this.items.getStackInSlot(0).getItem().hasContainerItem(this.items.getStackInSlot(0))){ + + ItemStack itemC = this.items.getStackInSlot(0).getItem().getContainerItem(this.items.getStackInSlot(0).copy()); + + if (this.items.getStackInSlot(3) == null) + { + this.setInventorySlotContents(3, itemC); + } + else if (this.items.getStackInSlot(3).isItemEqual(itemC)) + { + this.items.getStackInSlot(3).stackSize += itemC.stackSize; + } + } + + + //fluid + this.getTank().fill(fluidstack, true); + + this.items.reduceStackSize(0, 1); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + } + + + abstract protected ItemStack getResult(ItemStack stackInSlot); + + abstract protected FluidStack getFluidResult(ItemStack stackInSlot); + + + //GUI + public int getWorkProgressScaled(int par1) + { + return this.machineWorkProgressTime / (machineMaxProgressTime / par1); + } + + public int getEnergyProgressScaled(int par1) + { + return (int) (this.fuel / (this.fuelMax / par1)); + } + + public FluidTank getTank() { + return tank; + } + + public boolean isFluid(){ + return this.getTank().getFluidAmount() > 0; + } + + //IInventory関係 + @Override + public int getSizeInventory() { + return items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return items.getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return items.decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return items.getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + items.setInventorySlotContents(i, itemstack); + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return items.getInventoryStackLimit(); + } + + @Override + public void markDirty(){ + super.markDirty(); + items.onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer + .getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + if (i == 1) { + return GearForceItem.manager.isGearForceItem(itemstack); + } + + return i != 2; + } + + //ISidedInventory関係 + @Override + public int[] getAccessibleSlotsFromSide(int var1) { + return var1 == 0 ? slots_bottom : (var1 == 1 ? slots_top : slots_sides); + } + + @Override + public boolean canInsertItem(int i, ItemStack itemstack, int j) { + return this.isItemValidForSlot(i, itemstack); + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) + { + return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket; + } + + //IFluidHandler関係 + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + return 0;//tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(getTank().getFluid())) + { + return null; + } + return getTank().drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return getTank().drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + return false; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { getTank().getInfo() }; + } + + //NBT関係 + @Override + public void readFromNBT(NBTTagCompound nbt) { + + super.readFromNBT(nbt); + items.readFromNBT(nbt); + getTank().readFromNBT(nbt); + if(nbt.hasKey("Empty") && tank.getFluidAmount() > 0)this.tank.setFluid(null); + this.machineWorkProgressTime = nbt.getShort("WorkTime"); + this.fuel = nbt.getInteger("fuel"); + this.fuelMax = nbt.getInteger("fuelMax"); + this.on = nbt.getBoolean("on"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + + super.writeToNBT(nbt); + items.writeToNBT(nbt); + getTank().writeToNBT(nbt); + nbt.setShort("WorkTime", (short)this.machineWorkProgressTime); + nbt.setInteger("fuel", this.fuel); + nbt.setInteger("fuelMax", this.fuelMax); + nbt.setBoolean("on", this.on); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ + this.readFromNBT(pkt.func_148857_g()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFoodSmokers.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFoodSmokers.java new file mode 100644 index 0000000..4415ef1 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFoodSmokers.java @@ -0,0 +1,36 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntityFurnace; +import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SSRecipes; + +public class TileEntityFoodSmokers extends TileEntityFluidMachineBase{ + + @Override + protected ItemStack getResult(ItemStack stackInSlot) { + return SSRecipes.foodSmokers.getResult(stackInSlot); + } + + @Override + protected FluidStack getFluidResult(ItemStack stackInSlot) { + return SSRecipes.foodSmokers.getFluidResult(stackInSlot); + } + + protected void chargeFuel(){ + + if(TileEntityFurnace.isItemFuel(this.items.getStackInSlot(1))){ + this.fuel = this.fuelMax = ( TileEntityFurnace.getItemBurnTime(this.items.getStackInSlot(1))/2 ); + this.items.reduceStackSize(1, 1); + this.markDirty(); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + @Override + public String getInventoryName() { + return "gui.ss.food_smokers"; + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java new file mode 100644 index 0000000..1fe7940 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java @@ -0,0 +1,26 @@ +package shift.sextiarysector.tileentity; + + +public class TileEntityTofuMotor extends TileEntityDirection{ + + /* + @Override + public double getMaxTfCapacity() { + return 0; + } + + @Override + public double getCurrentTfConsumed() { + return 0; + } + + @Override + public void chargeTf(double amount) { + + } + + public float getRotateStep() { + return 0; + }*/ + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 012e772..5115236 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -4,6 +4,8 @@ tile.ss.large_furnace.name=Large Furnace tile.ss.fluid_furnace.name=Fluid Furnace +tile.ss.food_smokers.name=Food Smokers + tile.ss.magic_furnace.name=Magic Furnace tile.ss.wood_grate.name=Wood Grate @@ -75,6 +77,8 @@ monitor.type=Type monitor.creeper=Simple Creeper Shop monitor.robot=Blue Robot Shop +tile.electric_motor.name=Electric Motor + #Item item.ss.dust_waterlily.name=WaterLily Dust @@ -89,6 +93,9 @@ item.ss.gold_dust.name=Gold Dust item.ss.steel_ingot.name=Steel Ingot +item.ss.bluestone_ingot.name=Blue Stone Ingot +item.ss.yellowstone_ingot.name=Yellow Stone Ingot + item.ss.mithril_ingot.name=Mithril Ingot item.ss.orichalcum_gem.name=Orichalcum @@ -97,6 +104,9 @@ item.ss.ninja_ingot.name=Ninja Ingot item.ss.blue_stone_slime_ball.name=Blue Stone Slime Ball +item.ss.energy_ring.name=Energy Ring + + item.ss.craft_unit.name=Craft Unit item.ss.magic_dust.name=Magic Dust @@ -165,17 +175,24 @@ item.ss.green_pepper.name=Green Pepper item.ss.radish.name=Radish + +item.ss.salt.name=Salt + + item.ss.shift_hat.name=Shift's Hat #Fluid fluid.ss.takumi_tea=TAKUMI Tea fluid.ss.drinking_water=Drinking Water +fluid.ss.steam=Steam + #GUI container.large_furnace=Large Furnace container.sub.inventory=Buffer gui.ss.fluid_furnace=Fluid Furnace +gui.ss.food_smokers=Food Smokers gui.ss.magic_furnace=Magic Furnace gui.ss.millstone=Millstone @@ -233,9 +250,10 @@ nei.recipe=Recipes nei.ss.furnace.shaped=Furnace Shaped nei.ss.furnace.shapeless=Furnace Shapeless -nei.ss.fluid_furnace.=Fluid Furnace +nei.ss.fluid_furnace.=Fluid Furnace Recipe +nei.ss.food_smokers.=Food Smokers Recipe -nei.ss.magic_furnace=Magic Furnace +nei.ss.magic_furnace=Magic Furnace Recipe nei.ss.magic_fuel=Magic Fuel nei.ss.millstone=Millstone Recipe diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid/portal.png b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/portal.png new file mode 100644 index 0000000000000000000000000000000000000000..0400a5e9ab4629419ff8192210e4b694c726df9e GIT binary patch literal 18207 zcmX9`2{@Gd_kS%#*&~gTr4&;Vq3l~^Un5M`CZUPQo^6u7i3mxS!YHzo8nTOwWSK;x zON_EiHK7`s?EmBUe{T2b<~}pM^SVUN4U4c zf8A>QIRw9LzhG``h-_~C^RVUdUHHk402AjR1mO|h`j-vK%SXWvxq?kCjkqRw`F3z0 zZ!7U%M-VB*)KK3(eDq?=a=MIZj>O-F{V|c@;TH|houmHO-S<;aLrQR^1Z^PrXgBAv zdonWeq|b-CW-gn~_bmoHj@%a$OQIz;Jb2I$^NoI!-CmFFb_HQ)*o&~Jg-BZDoW;=M zJ-c`N5b<`-_9Mh=NZP`xCeF`sB&2oR-<{p0ij+RWSh^+H(OdiToC!LXLyzqVa)pi8 zZ!CwPG}~A`!ip{-NmP;wsExyzbkoeA34-hh3cp>CXHpE`=$jYTTl;C;Kdc)y)*ZMu z_az{_A7!pZY1)Rbl`j(S_C)MXQkVx3j!CyO& z;-q?*YixQ8(-9lGekUJ1U@Wa59t|xm>&NhX_#f9A*1oOAG|Ts%NW<3C7TnohvAuV2 zSn|y)yRk$1vu|D&qw)3J+}u?}{9C8)vEB>Wc2$f<9fbb-_itm|oG@O+a%e%kJ22nN zc|%CgyUGuRtw9ze3OD(YV!3xnJ5x&lKc>>}E8ZQ`Mr%WUiMQWpdy?p>7UnvFyh33W z@`H}^cG{yq4!&MS;$%$Sf(DEV>FF4T03y#J*jUXNBFXpG%C{~g!EFc>*K91`hiD>v zSPKN7b&aciH-aJBOLFRSd&tIr;_v*`sYTJ~t<^-fAxYI5mP5l1X4#9QXXJ>NadT^n zi;EipYEIH`p30bR^k`8e?|C^RrO5W$yXAgk>1O4k$ZSMm!oq6G!YXBdwE{szq>8jL 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q{oQTs0xI6E0N&T844sLxh0Q+>zJb%YfldG)pu z$H4>JU&;pUJsA8;eW%qu`3M{#!^dKU@Z5>}Ih+;cH{-88H^Wo58Ak^M2<>}<88I9V z>>kuDq5zlnB0LYvXO2)uBg0B=?(sHM33g>AM?hfbY``xMyPqNMbz^fV&exiT$ItC) zcAco3J8pFs)^ZM0f(C4;u&*17sXFKQzg522mbY$7hNYu*>$*hy$dHgFQ2b-NY?B-8 z>JJtBiFaT9aztL*>0307j$zz1e=w83$(BHOls4=b+#^`M6RIM+WPg$;s-Jnq)6=b! zK5CBM+R#-dYb7#Iv~erj+KL=9NRC$uomt%gkIdZouL}7y_RSU=m!~kt%%dpVVkhQ! zRI9hMb9ss<>YJh&Ad&2crA67wl!75gk0+u)%dqg(6Q^Z~&E45}a`z5x3Re7hXucjS zm~tJ+gIw}1+avMZ;L{s_w}z?m>TS4@VSb1!YhPjoNT7QLBJjsHwi|2SL{}%vS!YhG z(zPJ8^Hk|fAaS?{@^qvNt`lej!F$ZW-u5< zE>_S!+rHfR0dhvXpwioa)`l;gYep7O*c)){H}U9k=?ei@@@B#H*&g<@d*v;JbORbF z0T<`Dj@JuDW5?^T6rW7HLV($oB+;1I5z!NVWAiuI8lk~m($ieIx7XMM&cK$`Hhn=e^wV+wJ%WS# z;-ea6{`NUL%|i?V7X(sgex zRP*Lf6BvD-&P|CC)FZ?V*f4lQqP}CTv&F6+u^fVM2)_@_^%YXm=rJxubLj996326fLm@3q~*bl%f`>^%^jfcJm|J%cSHkta}BK9wQl?`HQ LWMx=w;1TzKDTU}L literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid/portal.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/portal.png.mcmeta new file mode 100644 index 0000000..4f0718a --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/portal.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} \ No newline at end of file diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_front_off.png b/src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_front_off.png new file mode 100644 index 0000000000000000000000000000000000000000..1ee4ee96e07b75b35a4cb448963ca6317719a61f GIT binary patch literal 651 zcmV;60(AX}P)5DyAsXLYc% z3KEb+jX8h2Yav+@KK-T~c3)=Rc}H|Q9bXg$LI{*nD5a26B80$u&kRBcvMfUgvB2pl zirCuP3WSuBd6Z?zUl+p=N#U9y!U~dR{)^1ETgI_thJP7$=ll- z{eB-~4BmUj<1w{bjV#O9-rlC&Ziiuco}=S9re3dOt>yaqn%CD?o}Zt8mAtXBL7JxQ z?d<^&$1!p?sj4boUS4>7eEie%!@~o|$H$8n@;s*~3IJ-g8UV%^q?9P7aL$EfhQlFJ z%8*8uWj`qxV{p!4jN$C;jH9C?K0iP4-Xnydsw%wq+~40Lr6i7H0HP>Dbh}-@zP=6+ zKKu{!Zw7+_dUto1ot>Q!<@_DY4oONGY+7rB-84H-EMPuco-rCSYBR63n7?HCRl5^yu9T0_Lj+H!rk57g7o2VNUzu9;NXDM)6<|( ze|&r}olY5#$6Q@qktE5l-e>&M(h?^pCn%+uPN!&N42?#EPNzeXBs7~%q9|G@jB_r; zcXM+?p68sOpA*M1+I!FY`#S*5W|Pg$O`LORtwSGXSY2IZG#V`|S(jx=nx?c`E%x{K l|B*hgV7^RGPfrLT_y#l{0?DZegrxug002ovPDHLkV1nF48;bw{ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_front_on.png b/src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_front_on.png new file mode 100644 index 0000000000000000000000000000000000000000..046d2b1c9fd58074312f57eeb3e29bd7213adb8e GIT binary patch literal 691 zcmV;k0!;mhP)-8&MR6zxQTHUK3}bSQpZjxNilwAs`6iAE*$hU3AlBz=He!fYP6kMHeEt zk%|FV4hoWuh>M9kSE&SqXksQa@6GKZI*q0Fz=g}2&aymX=stT+E}Kyo0Ah(pu*>opZU}D2ni> zrly#gnaQU%H=YZN`;k`l{`X#QmKTmlwvR#;GAQBf1l&yV+Ml( z&65+_z+2!PsCT>U?d?&mR@vCt$QAnc_xB8kLwda)&1RENVaOZ6G=NQ@0q-{9YZ%f8 zz8k~(`Z`)`hQlEo92`iy-Ii*#Di*{xCJMybiT<%_wVGUBUdrz7uJ|It-QC^TR0F8} zwe}y6Ts*Dn_NUEr#b5o7+m_2L=$OsB)^tjcf>H+u z5WU{j)M3=uYq;ZXUT1*U!=BpvA7zgfvQ)npbn;m8U2Z?)`qy2LEsQ2|tSv3G>tj}$ zw8--LfooAAp{)W=r`Aq6^(p`Mx3CLQ+d&8<#dfuVaRA+P; zod4|p&6UN*S9n_L&a~unGIOiB6dkgAQzH-fUS9CpszpFSDUw}@>AmfoVvVjxMn|H! w#U}1|z42Z4ut5x$kNAwu>udX*Tz)WhUfJ9-QQYl4j62S8bt{}ADD z3YT8)Sg+SuYl$&ZIOpj1`#&;vc<;X>bj|n;s)~%qV;v5M0NmWpSbct6G`>AQVT{>* zW$!(8U8AbJKRz7of~t~pKG}yZLa*1OP}M(0C{ju+7K^=bSOl=vp50Cn;R_lCk&@Iy Ry959L002ovPDHLkV1oP(rkwx) literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_top_on.png b/src/main/resources/assets/sextiarysector/textures/blocks/food_smokers_top_on.png new file mode 100644 index 0000000000000000000000000000000000000000..fe247d829d2520f73567d9e293e37ed6e36f0d0c GIT binary patch literal 397 zcmV;80doF{P)H8i4V+`~8{N(xh@lFVV z5CYzN-0;$^xSTVkl&gk@G*U|6DNH7lqeY&>dk;X@b^l=DFojErF=DMH=Zy2-Gaiqx z`Za{`V_{gvEvPCk#<)*m72)ai?IH`t7)mL)5CYTb6jkNr@!_Zos!D6^S04roqtOVb rs(-UkYh}G&?}ful0Bh~Zc8UmJv@(!0Q?i%000000NkvXXu0mjfQoN{I literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/iron_block.png b/src/main/resources/assets/sextiarysector/textures/blocks/iron_block.png new file mode 100644 index 0000000000000000000000000000000000000000..7816799ef142d7c6b44adab2106a417a257f6af5 GIT binary patch literal 333 zcmV-T0kZyyP)`9`Q@MTKnOHx`g-4>#Sz1o)Y8n&2Q5Lwb?W8avJkA6nV9apUax~@ncQ# zqyv$?nL0;1&t?5ksqy%5aQkmF0Hm0uIa7MH$n1SJ_-)_z@tVtdssnh&SukC%B{At(rnwby84YU%ayf1bdE>4y1{A=(x l`RN61nPnfdW>}b?lb@E-6#li@!T{(222WQ%mvv4FO#pnbbFTmZ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/condiment/salt.png b/src/main/resources/assets/sextiarysector/textures/items/food/condiment/salt.png new file mode 100644 index 0000000000000000000000000000000000000000..0864df94f1cc31c3dff0e5fd1414f45520aec0ba GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`#hxyXAr-fh6C~~_sHi-)=a{@! zl4V`oUjJQ+24@YJJ&ahEe7L$gJmIW@R7+c2gyfIjY4vB>lBN0?q4mzp+j-x-_q{ixC4aP#TrMXVqRh_D(jcDW zwrk8}GN{#RNF)*v5fBlW8AJr4`1y$d&z@}@$oQcHz|5%E>u?+=n4H*eV~kP?%xuT( z?(QDg_@M((tJR>jMx{~#5y5r$x+|rukzp~$9>n;e1CU50kVqt;wYHNp*X429l2Q$8oT}z7BKW^E{+dDa+iUu+XoJ)3KN#+d8k&a5fXd;{5dL>3Phxdu$UPe8yhXhx6^CL z(epfLt?ehQdl2O40)W;UN-3mLDa+1=#M0?BwAS!EFMq<~MofF$_;z}a3OQPfOkrYj zH2~|T#_;e&o5&<)d^dV8T)5D7f=f$FHUtktlrhX08Gcasp6j~E=kt-3P)b25Wyk09 z`N;Tg^mbgK9{TPZfOfHG?uiJ}>2%Zm@c48(9U0$^-fpFrzJ1jJVWc-VHxDe&$E{#5 zt9n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y!-)xPolfK8`IO%h(scoMB(iI zO3Iq+b`>F=PS2{Ru4S;ezKcZ`mw&KCB0=mx$~2c(DtAJcIa=)IhQr~ymce;H?A)ot zT$W{vB97cAEY3Oh9sRB)+F@zFf`h;PUD#cx0|(yOgvo#7@cR^K=}gPC!t-{(_N^}g z0Q^1$y3TOv=6%GcW^j`}hHts2{T-kz^BN^hmSybT{yI1~CgZV1`;yyK4u1du3kDE? zfWYrlTIxV#K`;OSK74O0BGG5?`;QMZ3H}u<$klbzk4H8RmHZqIQ%{Zgb-+&22Eu$fMnY`Kw0KBFd#ZJ4P}`Z zl+wIoI4B|Q?SP^1IFiXir+>F&>&v+O=L789z8(%r;gqPmtwC^q_eLWX{5}Q0T>1-{ ztd5_DMnqNcw6y~SiL!U#-A$nR-xF(^27q^b{lg#a>i_|Q!U3FfXz8?32`D8UZ5;vk z$DSiTmB39r#>y8u5!w=fN0u=Wk3rAF)7;Yob3 zZwnsAqENgqpqPJu>^b)Ac*D5&`xIQh^$*qtmm8&U==V{)wzhD8{_0)q=?Wq`J%u$s z1wUTAgPxu1KzOc-_*bts^nLW{*}C=8RF-8VlWEIOTR0)$gaCxVjvt>&Sd0gN*z>|^ z4(A;4DeHYQna-8Xynk*^2xN~3+(C0!k-oY)pg5=3Uw2US&J$5*@_3*YZs1;y*h z$ufpDD^`}=6V5Radj?fiv3Z@(c!82-8I)L`w?s>{L`$?pOBhri`VXflf|+M+HVXg% N002ovPDHLkV1gVpe`Wvx diff --git a/src/main/resources/assets/sextiarysector/textures/models/tofu_motor.png b/src/main/resources/assets/sextiarysector/textures/models/tofu_motor.png new file mode 100644 index 0000000000000000000000000000000000000000..64f108e848914a4134947e82a36511e858ce843d GIT binary patch literal 1885 zcmV-j2cr0iP)VGd000McNliru-V6y12@?Ul9IyZY2I@&f zK~#9!?OIK26Gs&OX1umH4lWgV5o&8()0Urt3W_LLL9`&~frvvzRSw+BAtDDZ&_fSZ zrP6CFaiKIlRJ~VC)k5Gx6+q>uK%J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R0)$gaCxV zjvt>&Sd0gN*z>|^4(A;4DeHYQna-8XylzeiWRC~jL33A;zPdS}IH%X-7jWU)J!G0eY@`-Mr2RRaIff zSG*nz-|t%m#p}t*GKMuPR+iio&M^^t231wDd7aOAfs$nzlvtm)L`$?pOSD8wR3G{e XrznD%XKgkM00000NkvXXu0mjf-G_ Date: Wed, 17 Dec 2014 22:29:01 +0900 Subject: [PATCH 44/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=83=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・ファンを追加 --- .../java/shift/sextiarysector/Config.java | 2 + .../java/shift/sextiarysector/SSBlocks.java | 6 + .../shift/sextiarysector/SSCreativeTabs.java | 20 +++ .../java/shift/sextiarysector/SSItems.java | 16 ++- .../sextiarysector/api/SextiarySectorAPI.java | 1 + .../shift/sextiarysector/block/BlockFan.java | 38 ++++++ .../sextiarysector/block/BlockMotor.java | 2 +- .../shift/sextiarysector/item/ItemKnife.java | 2 +- .../sextiarysector/plugin/PluginTofu.java | 6 +- .../sextiarysector/plugin/SSPlugins.java | 17 +++ .../sextiarysector/proxy/ClientProxy.java | 8 ++ .../sextiarysector/proxy/CommonProxy.java | 2 + .../recipe/RecipesFoodSmokers.java | 6 +- .../renderer/block/RendererFan.java | 116 ++++++++++++++++++ .../renderer/block/RendererShaft.java | 1 - .../renderer/block/RendererTofuMotor.java | 2 +- .../renderer/model/ModelFan.java | 91 ++++++++++++++ .../tileentity/TileEntityFan.java | 71 +++++++++++ .../tileentity/TileEntityTofuMotor.java | 85 +++++++++++-- .../assets/sextiarysector/lang/en_US.lang | 12 +- .../textures/items/food/beef_smoked.png | Bin 0 -> 494 bytes .../textures/items/food/chicken_smoked.png | Bin 0 -> 510 bytes .../textures/items/food/porkchop_smoked.png | Bin 0 -> 585 bytes .../sextiarysector/textures/models/fan.png | Bin 0 -> 3806 bytes .../textures/models/tofu_motor.png | Bin 1885 -> 1197 bytes 25 files changed, 485 insertions(+), 19 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockFan.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererFan.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelFan.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/beef_smoked.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/chicken_smoked.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/porkchop_smoked.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/fan.png diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index a00a267..539a938 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -17,6 +17,7 @@ public class Config { public static boolean modComputerCraft; public static boolean modTHKaguya; public static boolean modIC2; + public static boolean modTofu; public static void ConfigRead(FMLPreInitializationEvent event) { @@ -54,6 +55,7 @@ public static void configForPlugin(Configuration cfg) { modComputerCraft = cfg.getBoolean("ComputerCraft", "general", true, ""); modTHKaguya = cfg.getBoolean("THKaguya", "general", true, ""); modIC2 = cfg.getBoolean("IC2", "general", true, ""); + modTofu = cfg.getBoolean("Tofu", "general", true, ""); } diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 7582d14..f4d8cb4 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -7,6 +7,7 @@ import shift.sextiarysector.api.season.Season; import shift.sextiarysector.block.BlockBottle; import shift.sextiarysector.block.BlockChunkLoader; +import shift.sextiarysector.block.BlockFan; import shift.sextiarysector.block.BlockFluidCrafter; import shift.sextiarysector.block.BlockFluidFurnace; import shift.sextiarysector.block.BlockFoodSmokers; @@ -40,6 +41,7 @@ import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMonitor; import shift.sextiarysector.tileentity.TileEntityBlockBottle; +import shift.sextiarysector.tileentity.TileEntityFan; import shift.sextiarysector.tileentity.TileEntityFarmland; import shift.sextiarysector.tileentity.TileEntityFluidCrafter; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; @@ -99,6 +101,7 @@ public class SSBlocks { public static Block pulverizer; + public static Block fan; public static Block hole; @@ -267,6 +270,9 @@ public static void initBlicks(){ pulverizer = new BlockSimpleMachine("pulverizer",30,SSRecipes.pulverizer,3).setBlockName("ss.pulverizer").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerBlock(pulverizer, "Pulverizer"); + fan = new BlockFan().setBlockName("ss.fan"); + GameRegistry.registerTileEntity(TileEntityFan.class, "Fan"); + GameRegistry.registerBlock(fan, ItemBlockDirection.class, "Fan"); shippingBox = new BlockShippingBox().setBlockName("ss.shipping_box").setBlockTextureName("sextiarysector:shipping_box").setCreativeTab(SextiarySectorAPI.TabSSEconomy); GameRegistry.registerBlock(shippingBox, "ShippingBox"); diff --git a/src/main/java/shift/sextiarysector/SSCreativeTabs.java b/src/main/java/shift/sextiarysector/SSCreativeTabs.java index 66a7f0f..c4c99db 100644 --- a/src/main/java/shift/sextiarysector/SSCreativeTabs.java +++ b/src/main/java/shift/sextiarysector/SSCreativeTabs.java @@ -15,6 +15,7 @@ public static void initCreativeTabs(){ SextiarySectorAPI.TabSSFluid = new CreativeTabSSFluid(); SextiarySectorAPI.TabSSMachine = new CreativeTabSSMachine(); SextiarySectorAPI.TabSSAgriculture = new CreativeTabSSAgriculture(); + SextiarySectorAPI.TabSSCooking = new CreativeTabSSCooking(); SextiarySectorAPI.TabSSEconomy = new CreativeTabSSEconomy(); SextiarySectorAPI.TabSSMagic = new CreativeTabSSMagic(); @@ -115,6 +116,25 @@ public ItemStack getIconItemStack() } + private static class CreativeTabSSCooking extends CreativeTabs{ + + public CreativeTabSSCooking() { + super("ss.cooking"); + } + + @Override + public Item getTabIconItem() { + return null;//SSBlocks.LargeFurnace.g; + } + + @SideOnly(Side.CLIENT) + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.ironKnife,1); + } + + } + private static class CreativeTabSSMagic extends CreativeTabs{ public CreativeTabSSMagic() { diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 606bebd..709257c 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -120,6 +120,10 @@ public class SSItems { //料理 public static Item salt; + public static Item chickenSmoked; + public static Item porkchopSmoked; + public static Item beefSmoked; + //装備 public static Item shiftHat; @@ -300,9 +304,19 @@ public static void initItems(){ GameRegistry.registerItem(radish, "Radish"); //料理 - salt = new Item().setUnlocalizedName("ss.salt").setTextureName("sextiarysector:food/condiment/salt").setCreativeTab(SextiarySectorAPI.TabSSCore); + salt = new Item().setUnlocalizedName("ss.salt").setTextureName("sextiarysector:food/condiment/salt").setCreativeTab(SextiarySectorAPI.TabSSCooking); GameRegistry.registerItem(salt, "Salt"); + chickenSmoked = new ItemFoodDrink(2, 4.6f, 0, 0, 4, 2.0f, false).setUnlocalizedName("ss.chicken_smoked").setTextureName("sextiarysector:food/chicken_smoked").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(chickenSmoked, "ChickenSmoked"); + + porkchopSmoked = new ItemFoodDrink(3, 7.6f, 0, 0, 4, 2.0f, false).setUnlocalizedName("ss.porkchop_smoked").setTextureName("sextiarysector:food/porkchop_smoked").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(porkchopSmoked, "PorkchopSmoked"); + + beefSmoked = new ItemFoodDrink(3, 7.6f, 0, 0, 4, 2.0f, false).setUnlocalizedName("ss.beef_smoked").setTextureName("sextiarysector:food/beef_smoked").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(beefSmoked, "BeefSmoked"); + + shiftHat = new ItemShiftHat().setUnlocalizedName("ss.shift_hat").setTextureName("sextiarysector:shift_hat"); GameRegistry.registerItem(shiftHat, "ShiftHat"); diff --git a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java index ad92fd7..4a4a773 100644 --- a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java +++ b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java @@ -19,6 +19,7 @@ public class SextiarySectorAPI { public static CreativeTabs TabSSFluid; public static CreativeTabs TabSSMachine; public static CreativeTabs TabSSAgriculture; + public static CreativeTabs TabSSCooking; public static CreativeTabs TabSSEconomy; public static CreativeTabs TabSSMagic; diff --git a/src/main/java/shift/sextiarysector/block/BlockFan.java b/src/main/java/shift/sextiarysector/block/BlockFan.java new file mode 100644 index 0000000..499e499 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockFan.java @@ -0,0 +1,38 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.tileentity.TileEntityFan; + +public class BlockFan extends BlockDirection{ + + public BlockFan() { + super(Material.iron); + this.setCreativeTab(SextiarySectorAPI.TabSSMachine); + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.fanType; + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityFan(); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockMotor.java b/src/main/java/shift/sextiarysector/block/BlockMotor.java index b3d5241..19b6897 100644 --- a/src/main/java/shift/sextiarysector/block/BlockMotor.java +++ b/src/main/java/shift/sextiarysector/block/BlockMotor.java @@ -37,7 +37,7 @@ public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlay ForgeDirection d = t.getDirection(); - if(d.ordinal()>6){ + if(d.ordinal()>5){ t.direction = d.getOrientation(0); }else{ t.direction = d.getOrientation(d.ordinal()+1); diff --git a/src/main/java/shift/sextiarysector/item/ItemKnife.java b/src/main/java/shift/sextiarysector/item/ItemKnife.java index 7369981..ab4ad0d 100644 --- a/src/main/java/shift/sextiarysector/item/ItemKnife.java +++ b/src/main/java/shift/sextiarysector/item/ItemKnife.java @@ -33,7 +33,7 @@ public ItemKnife(ToolMaterial p_i45343_1_) }else{ this.setHarvestLevel("axe", i-1); } - this.setCreativeTab(SextiarySectorAPI.TabSSCore); + this.setCreativeTab(SextiarySectorAPI.TabSSCooking); FMLCommonHandler.instance().bus().register(this); } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java index aca62ef..88e8391 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java @@ -2,7 +2,7 @@ import net.minecraft.block.Block; import shift.sextiarysector.api.SextiarySectorAPI; -import shift.sextiarysector.block.BlockElectricMotor; +import shift.sextiarysector.block.BlockTofuMotor; import shift.sextiarysector.item.ItemBlockDirection; import shift.sextiarysector.renderer.block.RendererTofuMotor; import shift.sextiarysector.tileentity.TileEntityTofuMotor; @@ -25,9 +25,9 @@ public String getModName() { @Override public void prePlugin(FMLPreInitializationEvent event) { - tofuMotor = new BlockElectricMotor().setBlockName("ss.electric_motor").setCreativeTab(SextiarySectorAPI.TabSSMachine); + tofuMotor = new BlockTofuMotor().setBlockName("ss.tofu_motor").setCreativeTab(SextiarySectorAPI.TabSSMachine); GameRegistry.registerBlock(tofuMotor, ItemBlockDirection.class, "TofuMotor"); - GameRegistry.registerTileEntity(TileEntityTofuMotor.class, "ElectricMotor"); + GameRegistry.registerTileEntity(TileEntityTofuMotor.class, "TofuMotor"); } diff --git a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java index b071c6a..b09c387 100644 --- a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java +++ b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java @@ -19,6 +19,7 @@ public class SSPlugins { public static boolean modComputerCraft; public static boolean modTHKaguya; public static boolean modIC2; + public static boolean modTofu; public static void initModHelper() { @@ -26,6 +27,7 @@ public static void initModHelper() { modComputerCraft = Loader.isModLoaded("ComputerCraft") && Config.modComputerCraft; modTHKaguya = Loader.isModLoaded("THKaguyaMod") && Config.modTHKaguya; modIC2 = Loader.isModLoaded("IC2") && Config.modIC2; + modTofu = Loader.isModLoaded("TofuCraft") && Config.modTofu; if (modDCsAppleMilk) { @@ -87,6 +89,21 @@ public static void initModHelper() { } } + if (modTofu) { + + try { + + SextiarySector.Log.info("TofuCraft Plugin is loaded"); + plugins.add(new PluginTofu()); + + } catch (Exception e) { + + SextiarySector.Log.log(Level.WARN, "IC2 integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.catching(e); + + } + } + } public static void prePlugins(FMLPreInitializationEvent event) { diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 322f7d7..6b684b5 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -15,6 +15,7 @@ import shift.sextiarysector.plugin.SSPlugins; import shift.sextiarysector.renderer.block.RendererBlockBottle; import shift.sextiarysector.renderer.block.RendererChest; +import shift.sextiarysector.renderer.block.RendererFan; import shift.sextiarysector.renderer.block.RendererFarmland; import shift.sextiarysector.renderer.block.RendererFluidCrafter; import shift.sextiarysector.renderer.block.RendererGearShaft; @@ -27,6 +28,7 @@ import shift.sextiarysector.renderer.block.RendererWoodHopper; import shift.sextiarysector.renderer.item.RenderGF; import shift.sextiarysector.tileentity.TileEntityBlockBottle; +import shift.sextiarysector.tileentity.TileEntityFan; import shift.sextiarysector.tileentity.TileEntityFluidCrafter; import shift.sextiarysector.tileentity.TileEntityGearShaft; import shift.sextiarysector.tileentity.TileEntityMonitor; @@ -69,6 +71,8 @@ public void setCustomRenderers() { this.windMillType = RenderingRegistry.getNextAvailableRenderId(); this.smallWaterwheel = RenderingRegistry.getNextAvailableRenderId(); + this.fanType = RenderingRegistry.getNextAvailableRenderId(); + this.chestType = RenderingRegistry.getNextAvailableRenderId(); this.monitorType = RenderingRegistry.getNextAvailableRenderId(); @@ -91,6 +95,8 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererWindmill()); RenderingRegistry.registerBlockHandler(new RendererSmallWaterwheel()); + RenderingRegistry.registerBlockHandler(new RendererFan()); + RenderingRegistry.registerBlockHandler(new RendererChest()); RenderingRegistry.registerBlockHandler(new RendererMonitor()); @@ -116,6 +122,8 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWindmill.class, new RendererWindmill()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallWaterwheel.class, new RendererSmallWaterwheel()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFan.class, new RendererFan()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySSChest.class, new RendererChest()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMonitor.class, new RendererMonitor()); diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index ec25797..57ed8b4 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -22,6 +22,8 @@ public class CommonProxy { public int windMillType; public int smallWaterwheel; + public int fanType; + public int monitorType; public int chestType; diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFoodSmokers.java b/src/main/java/shift/sextiarysector/recipe/RecipesFoodSmokers.java index d574060..cff4a3c 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFoodSmokers.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFoodSmokers.java @@ -11,7 +11,11 @@ public class RecipesFoodSmokers { public static void addRecipes(RecipeSimpleFluid recipe) { - recipe.add(new ItemStack(Items.water_bucket,1),new ItemStack(SSItems.salt, 1), new FluidStack(SSFluids.steam, 500)); + recipe.add(new ItemStack(Items.water_bucket,1),new ItemStack(SSItems.salt, 1), new FluidStack(SSFluids.steam, 1000)); + + recipe.add(new ItemStack(Items.chicken,1),new ItemStack(SSItems.chickenSmoked, 1), new FluidStack(SSFluids.steam, 100)); + recipe.add(new ItemStack(Items.porkchop,1),new ItemStack(SSItems.porkchopSmoked, 1), new FluidStack(SSFluids.steam, 100)); + recipe.add(new ItemStack(Items.beef,1),new ItemStack(SSItems.beefSmoked, 1), new FluidStack(SSFluids.steam, 100)); } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererFan.java b/src/main/java/shift/sextiarysector/renderer/block/RendererFan.java new file mode 100644 index 0000000..8c2baa0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererFan.java @@ -0,0 +1,116 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.renderer.model.ModelFan; +import shift.sextiarysector.tileentity.TileEntityFan; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererFan extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId,RenderBlocks renderer) { + + if(modelId!=this.getRenderId()){ + return ; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + + GL11.glRotatef(180, 1, 0, 0); + + this.bind(this.fanShaftTextures); + + modelFan.render(null, 0,0,0, 0,0, 1.0f); + modelFan.renderFan(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block block, int modelId, RenderBlocks renderer) { + return true; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.fanType; + } + + private static final ResourceLocation fanShaftTextures = new ResourceLocation("sextiarysector:textures/models/fan.png"); + + static public ModelFan modelFan = new ModelFan(); + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x,double y, double z, float p_147500_8_) { + + TileEntityFan tile = (TileEntityFan)tileentity; + + //System.out.println("renderTileEntityAt"); + + GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + float scale = 0.0624f; + GL11.glScalef(scale,scale,scale); + + this.bindTexture(fanShaftTextures); + + switch(tile.direction){ + case UP: + GL11.glRotatef(90, -1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, 1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, -1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, 1, 0); + break; + case NORTH: + GL11.glRotatef(180, 0, 1, 0); + break; + default: + break; + } + + modelFan.render(null, 0,0,0, 0,0, 1.0f); + + //傾きのスピード + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + + modelFan.renderFan(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + } + + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java b/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java index bd5e48c..24709c1 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java @@ -20,7 +20,6 @@ public class RendererShaft extends TileEntitySpecialRenderer implements ISimpleB public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); - @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererTofuMotor.java b/src/main/java/shift/sextiarysector/renderer/block/RendererTofuMotor.java index 59af517..7f7c437 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererTofuMotor.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererTofuMotor.java @@ -102,7 +102,7 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double modelElectricMotor.render(null, 0,0,0, 0,0, 1.0f); //傾きのスピード - //GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); modelElectricMotor.renderShaft(null, 0,0,0, 0,0, 1.0f); diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelFan.java b/src/main/java/shift/sextiarysector/renderer/model/ModelFan.java new file mode 100644 index 0000000..365b6cc --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelFan.java @@ -0,0 +1,91 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelFan extends ModelBase +{ + //fields + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + ModelRenderer Shape6; + ModelRenderer Shape7; + + public ModelFan() + { + textureWidth = 64; + textureHeight = 64; + + Shape1 = new ModelRenderer(this, 0, 0); + Shape1.addBox(-8F, -8F, -8F, 16, 16, 12); + Shape1.setRotationPoint(0F, 0F, 0F); + Shape1.setTextureSize(64, 64); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 0, 48); + Shape2.addBox(-2F, -2F, 4.5F, 4, 4, 3); + Shape2.setRotationPoint(0F, 0F, 0F); + Shape2.setTextureSize(64, 64); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape3 = new ModelRenderer(this, 0, 55); + Shape3.addBox(-2F, -6F, 5.5F, 2, 4, 1); + Shape3.setRotationPoint(0F, 0F, 0F); + Shape3.setTextureSize(64, 64); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0.1745329F, 0F); + Shape4 = new ModelRenderer(this, 0, 55); + Shape4.addBox(0F, 2F, 5.5F, 2, 4, 1); + Shape4.setRotationPoint(0F, 0F, 0F); + Shape4.setTextureSize(64, 64); + Shape4.mirror = true; + setRotation(Shape4, 0F, -0.1745329F, 0F); + Shape5 = new ModelRenderer(this, 6, 55); + Shape5.addBox(2F, -2F, 5.5F, 4, 2, 1); + Shape5.setRotationPoint(0F, 0F, 0F); + Shape5.setTextureSize(64, 64); + Shape5.mirror = true; + setRotation(Shape5, -0.1745329F, 0F, 0F); + Shape6 = new ModelRenderer(this, 6, 55); + Shape6.addBox(-6F, 0F, 5.5F, 4, 2, 1); + Shape6.setRotationPoint(0F, 0F, 0F); + Shape6.setTextureSize(64, 64); + Shape6.mirror = true; + setRotation(Shape6, 0.1745329F, 0F, 0F); + Shape7 = new ModelRenderer(this, 0, 28); + Shape7.addBox(-8F, -8F, 4F, 16, 16, 4); + Shape7.setRotationPoint(0F, 0F, 0F); + Shape7.setTextureSize(64, 64); + Shape7.mirror = true; + setRotation(Shape7, 0F, 0F, 0F); + } + + 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); + Shape1.render(f5); + Shape7.render(f5); + } + + public void renderFan(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + { + Shape2.render(f5); + Shape3.render(f5); + Shape4.render(f5); + Shape5.render(f5); + Shape6.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java new file mode 100644 index 0000000..a10514a --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java @@ -0,0 +1,71 @@ +package shift.sextiarysector.tileentity; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.util.AxisAlignedBB; + +public class TileEntityFan extends TileEntityDirection{ + + public float rotateStep = 360; + + @Override + public void updateEntity() { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + + AxisAlignedBB aabb = getDirectionAABB(); + + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity)null, aabb, null); + + for(Entity e :list){ + e.motionX+=(this.direction.offsetX/10.0f); + e.motionY+=(this.direction.offsetY/10.0f); + e.motionZ+=(this.direction.offsetZ/10.0f); + } + + } + + public void updateClientEntity() { + + this.rotateStep += 12; + + } + + private void updateServerEntity() { + + + + } + + private AxisAlignedBB getDirectionAABB(){ + + int minX = 0, minY = 0, minZ = 0; + int maxX = 1, maxY = 1, maxZ = 1; + + switch(direction){ + case DOWN: minY = -5; break; + case UP: maxY = 6; break; + case NORTH: minZ = -5; break; + case SOUTH: maxZ = 6; break; + case WEST: minX = -5; break; + case EAST: maxX = 6; break; + default:break; + } + + return AxisAlignedBB.getBoundingBox(this.xCoord + minX, this.yCoord + minY, this.zCoord + minZ, this.xCoord + maxX, this.yCoord + maxY, this.zCoord + maxZ); + + } + + public float getRotateStep() { + return rotateStep; + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java index 1fe7940..cfe7f11 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java @@ -1,26 +1,97 @@ package shift.sextiarysector.tileentity; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import tsuteto.tofu.api.tileentity.ITfConsumer; -public class TileEntityTofuMotor extends TileEntityDirection{ - /* +public class TileEntityTofuMotor extends TileEntityDirection implements ITfConsumer{ + + private double lastEnergy; + + public float rotateStep = 360; + + public double tofu = 0; + public final double MAX_TOFU = 80.0d; + + @Override + public void updateEntity() { + + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() { + if(this.tofu>0){ + rotateStep-=8; + if(rotateStep<0){ + rotateStep+=360; + } + } + } + + private void updateServerEntity() { + + if(this.tofu!=lastEnergy){ + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + this.lastEnergy = this.tofu; + } + + if(this.tofu>0.4){ + + TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); + + if(t!=null && t instanceof IEnergyHandler){ + + int i = ((IEnergyHandler)t).addEnergy(this.direction, 2, 40, false); + this.tofu-=(i/100.0); + + } + + } + + } + + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + + tofu = tag.getDouble("tofu"); + + } + + @Override + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + + tag.setDouble("tofu", tofu); + + } + @Override public double getMaxTfCapacity() { - return 0; + return MAX_TOFU; } @Override public double getCurrentTfConsumed() { - return 0; + return 40; } @Override public void chargeTf(double amount) { - + tofu = Math.max(0, Math.min(tofu+amount, MAX_TOFU)); } public float getRotateStep() { - return 0; - }*/ + return rotateStep; + } } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 5115236..c63b954 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -77,7 +77,8 @@ monitor.type=Type monitor.creeper=Simple Creeper Shop monitor.robot=Blue Robot Shop -tile.electric_motor.name=Electric Motor +tile.ss.electric_motor.name=Electric Motor +tile.ss.tofu_motor.name=Tofu Motor #Item item.ss.dust_waterlily.name=WaterLily Dust @@ -178,6 +179,10 @@ item.ss.radish.name=Radish item.ss.salt.name=Salt +item.ss.chicken_smoked.name=Smoked Chicken +item.ss.porkchop_smoked.name=Smoked Porkchop +item.ss.beef_smoked.name=Smoked Beef + item.ss.shift_hat.name=Shift's Hat @@ -223,6 +228,7 @@ itemGroup.ss.core=SextiarySector -Core- itemGroup.ss.fluid=SextiarySector -Fluid- itemGroup.ss.machine=SextiarySector -Machine- itemGroup.ss.agriculture=SextiarySector -Agriculture- +itemGroup.ss.cooking=SextiarySector -Cooking- itemGroup.ss.economy=SextiarySector -Economy- itemGroup.ss.magic=SextiarySector -Magic- @@ -250,8 +256,8 @@ nei.recipe=Recipes nei.ss.furnace.shaped=Furnace Shaped nei.ss.furnace.shapeless=Furnace Shapeless -nei.ss.fluid_furnace.=Fluid Furnace Recipe -nei.ss.food_smokers.=Food Smokers Recipe +nei.ss.fluid_furnace=Fluid Furnace Recipe +nei.ss.food_smokers=Food Smokers Recipe nei.ss.magic_furnace=Magic Furnace Recipe nei.ss.magic_fuel=Magic Fuel diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/beef_smoked.png b/src/main/resources/assets/sextiarysector/textures/items/food/beef_smoked.png new file mode 100644 index 0000000000000000000000000000000000000000..4aa402bbbf3a84dc9a2d7ada4143ebc6faba2198 GIT binary patch literal 494 zcmV744?OpPX=6J8n~Bh)@S?d z%}aJ%kZ##bHG%I*vs4wVtDJACrqqqucsU0^vlVgB4y?x}uf(b zv5>0{r#Fhj9~m{1&}>Cal<4Fs?>4HqS;o&_3Y}|eb-{7X>3n=5?2?4fj@-DictpU=Aq-=oBum_+H8&9ayq+v~mY k;g|m!q~WAZ0{>av0z*WaYvqg5)&Kwi07*qoM6N<$f)`ca3jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/chicken_smoked.png b/src/main/resources/assets/sextiarysector/textures/items/food/chicken_smoked.png new file mode 100644 index 0000000000000000000000000000000000000000..5ff12a31080d4603f0845029106f27df31347fc6 GIT binary patch literal 510 zcmVIEp_&-1P^zinFVugNU=UIH))& zT?8!@L~1Ko5Tj`dRU$VIvDYLvh-bPv+~+;-Ip;>uB}_v`zT2K6DMUATe_r|F+}gPm zNkS0;qepPK;QLlalFj8w4K{dc&r>TMYoWME#H&(1aTp+9Si;H#&P+o_S`=~X`N9%u zuYzk#lJ+X31{v%#Ex3EW;+ag9kv&GQJ{ zvb%3WhV4&Gk5QcK!?{19)g1W~2I!3^UhH8U`+;l@N*C`q-*CtJW4-oU;4`%L=cl@E zWpTMbG`uQSM&j6tnBJ>&@TVZ|o-hK;&Tg?#-14t2@L5~nDtgdi(`=Bp& zL>kp09_uw-x$MH$<!qE!?B1=El`?^^!O-mA_ffr(Mf4*cu>7kdA%q>5hNmjD0&07*qoM6N<$f=cGt A7XSbN literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/porkchop_smoked.png b/src/main/resources/assets/sextiarysector/textures/items/food/porkchop_smoked.png new file mode 100644 index 0000000000000000000000000000000000000000..f5b04733f01f0848a0a51a4cd5060b9ee20c6705 GIT binary patch literal 585 zcmV-P0=E5$P)F6JZpFpSi@w(UeT4O^t1eh_q7L)LTJZbWyCJ5bRnPT?-mqxaogzFI~6@ zxDa$9orgBmslb@h;%A zkV?i|XA-JEHResvS%qmLm8RKT4N%NCBz^GV;M{KEn8!V znMk9^l4UHRG05(_ec$)o=iKu==ic+4_r2%0oQpDt8E~-w%MJp8IE)PSEP?*!-^RuQ z-0}AxO#&T@`)va~(DC0ZudNsZjGPWMv=0J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U(% zPLrg0p{H_Fv9S$S5rh4%QXO{L5ZQb2EH5|%eh#NGW5d-FQ^{{I;v-ipP0VbWb_4~r z?U6PEbRnoJ((Wo9mTNUu+@e{G0AoP`6Z3&mM zFo3=}IO;5H!8Nk2fpjl-Mpw#@HIN(Sb00Vr%Yi(laA_ZCHC(7x7tMp@=K%2R#Zts zdwoIyZl=Zt+qV#V(upwiy_q??`(w53`a(rRdly{exvfi>z18oS=QONsCHl|srGWS? zndo>MhdG+fKRjDCpOw6iZzAw&+Si~^QT;8`9QBYVB&u-AJmM?dqVzPOpalmG{5G&( zH=KWcbYp}b`s_;+#2T~SydtlrQg54Z1F@qGef&6!Iza!_jdJ+?HUG-{6NnrIY-CD1 z;*~^^-nnhwwxBBKc@gY+qMPmgEckL)6C2bm#zmEgS>LYGSxi3R`y~$2AhvR zm)9`fJnQYxu9|W#vc7zQA>uG0Y_NKJTeZmjT8K-$?b#RN31sWTf&zg?25<6_MYtF&cstqYe~y1 zem1i(-XiY3w2-Y62-@7KAUdY{JTs*|@WxqmWn()=|Ewi<$)$$URgMH^4f(anpVC;e z()nz+cO9tb#8b^oaoYQFA9<-d{pw$t3M`M(!AGAPoSm<>Z~B6tbCOLqqOpgBX)r&% zza!j}=)0*C4zVmOyB1K*L68esr@-pUll2Xm3 Qfj?1@kv>eXQpYvwKR^e7_W%F@ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/tofu_motor.png b/src/main/resources/assets/sextiarysector/textures/models/tofu_motor.png index 64f108e848914a4134947e82a36511e858ce843d..dbc4cce528567f4e7a83d7f19a74aa692bcc2702 100644 GIT binary patch delta 1129 zcmV-v1eW{V4y_50Q-2N)AptPSMX~?@1UgAXK~#9!?O9D|+*T0&o+^vQ(t-{(D(F)8 zvMHq$OiG2Jm*&z_+JrQR9(yqH!BCPOda7x1bum4JblXd>Nkc+f=%J)E7(#s5t^=lp zB_&`t!id-)Sc!FIqu0awy-2%~yg#;NDH>SV)w~_;d^7XSjD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iq+b`>F=PS2{Ru4S;ezKcZ`mw&KCB0=mx$~2c(DtAJcIa=)IhQr~ymce;H?A)ot zT$W{vB97cAEY3Oh9sRB)+F@zFf`h;PUD#cx0|(yOgvo#7@cR^K=}gPC!t-{(_N^}g z0Q^1$y3TOv=6%GcW^j`}hHts2{T-kz^BN^hmSybT{yI1~CgZV1`;yyK4u1du3kDE? zfWYrlTIxV#K`;OSK74O0BGG5?`;QMZ3H}u<$klbzk4H8RmHZqIQ%{Zgb-+&22Eu$fMnY`Kw0KBFd#ZJ4P}`Z zl+wIoI4B|Q?SP^1IFiXir+>F&>&v+O=L789z8(%r;gqPmtwC^q_eLWX{5}Q0T>1-{ ztd5_DMnqNcw6y~SiL!U#-A$nR-xF(^27q^b{lg#a>i_|Q!U3FfXz8?32`D8UZ5;vk z$DSiTmB39r#>y8u5!w=fN0u=Wk3rAF)7;Yob3 zZwnsAqENgqpqPJu>^b)Ac*D5&`xIQh^$*qtmm8&U==V{)wzhD8{_0)q=?Wq`J%u$s z1wUTAgPxu1KzOc-_*bts^nLW{*}C=8RF-8VlWEIOTR0)$gaCxVjvt>&Sd0gN*z>|^ z4(A;4DeHYQna-8Xynk*^2xN~3+(C0!k-oY)pg5=3Uw2US&J$5*@_3*YZs1;y*h z$ufpDD^`}=6V5Radj?fiv3Z@(c!82-8I)L`w?s>{L`$?pOBhri`VXflf|+M+HVXg% N002ovPDHLkV1kr!e=h(4 From f8ca211f217177fc0eb9b6dae9574bdcfe923eea Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 20 Dec 2014 01:34:04 +0900 Subject: [PATCH 45/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=82=AF?= =?UTF-8?q?=E3=83=AA=E3=83=BC=E3=83=91=E3=83=BC=E3=83=AA=E3=83=B3=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・青い炎を追加 ・クリーパーリングを追加 --- .../java/shift/sextiarysector/SSBlocks.java | 6 + .../java/shift/sextiarysector/SSItems.java | 8 + .../shift/sextiarysector/SSPlayerTabs.java | 7 + .../java/shift/sextiarysector/SSShops.java | 14 ++ .../sextiarysector/block/BlockBlueFire.java | 218 ++++++++++++++++++ .../sextiarysector/block/BlockMonitor.java | 1 + .../sextiarysector/item/ItemShopRing.java | 108 +++++++++ .../tileentity/TileEntityFan.java | 141 ++++++++++- .../assets/sextiarysector/lang/en_US.lang | 5 + .../textures/blocks/blue_fire_layer_0.png | Bin 0 -> 16137 bytes .../blocks/blue_fire_layer_0.png.mcmeta | 38 +++ .../textures/blocks/blue_fire_layer_1.png | Bin 0 -> 17108 bytes .../blocks/blue_fire_layer_1.png.mcmeta | 3 + .../textures/items/ring/creeper_ring.png | Bin 0 -> 303 bytes .../textures/items/ring/slot_ring.png | Bin 0 -> 234 bytes 15 files changed, 538 insertions(+), 11 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockBlueFire.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemShopRing.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_0.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_1.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ring/creeper_ring.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ring/slot_ring.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index f4d8cb4..c067333 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -5,6 +5,7 @@ import net.minecraft.init.Blocks; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.season.Season; +import shift.sextiarysector.block.BlockBlueFire; import shift.sextiarysector.block.BlockBottle; import shift.sextiarysector.block.BlockChunkLoader; import shift.sextiarysector.block.BlockFan; @@ -75,6 +76,8 @@ public class SSBlocks { public static Block woodHopper; + public static Block blueFire; + //GF public static Block woodShaft; public static Block stoneShaft; @@ -184,6 +187,9 @@ public static void initBlicks(){ chunkLoader = new BlockChunkLoader().setHardness(1.5F).setBlockName("ss.chunk_loader").setBlockTextureName("sextiarysector:time_loader"); GameRegistry.registerBlock(chunkLoader, "ChunkLoader"); + blueFire = new BlockBlueFire().setBlockName("ss.blue_fire").setBlockTextureName("sextiarysector:blue_fire"); + GameRegistry.registerBlock(blueFire, "BlueFire"); + //鉱石 blueStoneOre = new BlockPowerStone().setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(blueStoneOre, "BlueStoneOre"); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 709257c..907d85f 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -14,6 +14,7 @@ import shift.sextiarysector.item.ItemScoop; import shift.sextiarysector.item.ItemSeasonStone; import shift.sextiarysector.item.ItemShiftHat; +import shift.sextiarysector.item.ItemShopRing; import shift.sextiarysector.item.ItemWateringCan; import cpw.mods.fml.common.registry.GameRegistry; @@ -69,6 +70,9 @@ public class SSItems { //unit public static Item craftUnit; + //ring + public static Item creeperRing; + //魔法 public static Item magicDust; @@ -219,6 +223,10 @@ public static void initItems(){ craftUnit = new ItemGuiUnit(201).setUnlocalizedName("ss.craft_unit").setTextureName("sextiarysector:unit/craft_unit").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(craftUnit, "CraftUnit"); + //Ring + creeperRing = new ItemShopRing().setUnlocalizedName("ss.creeper_ring").setTextureName("sextiarysector:ring/creeper_ring"); + GameRegistry.registerItem(creeperRing, "CreeperRing"); + //魔法 magicDust = new Item().setUnlocalizedName("ss.magic_dust").setTextureName("sextiarysector:dust/magic_dust").setCreativeTab(SextiarySectorAPI.TabSSMagic); GameRegistry.registerItem(magicDust, "MagicDust"); diff --git a/src/main/java/shift/sextiarysector/SSPlayerTabs.java b/src/main/java/shift/sextiarysector/SSPlayerTabs.java index fec9cea..6edbd31 100644 --- a/src/main/java/shift/sextiarysector/SSPlayerTabs.java +++ b/src/main/java/shift/sextiarysector/SSPlayerTabs.java @@ -5,6 +5,7 @@ import shift.sextiarysector.gui.tab.InventoryTabEquipment; import shift.sextiarysector.gui.tab.InventoryTabSS; import shift.sextiarysector.gui.tab.TabManager; +import shift.sextiarysector.item.ItemShopRing; import shift.sextiarysector.player.EquipmentType; public class SSPlayerTabs { @@ -13,6 +14,8 @@ public class SSPlayerTabs { public static AbstractTab craft; + public static AbstractTab creeperShop; + public static void initRecipes(){ ss = new InventoryTabSS(); @@ -21,6 +24,10 @@ public static void initRecipes(){ craft = new InventoryTabEquipment(EquipmentType.Unit, new ItemStack(SSItems.craftUnit)); TabManager.registerTab(craft); + creeperShop = new InventoryTabEquipment(EquipmentType.Ring, new ItemStack(SSItems.creeperRing)); + TabManager.registerTab(creeperShop); + ((ItemShopRing) SSItems.creeperRing).setTab(creeperShop); + } } diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index db1a3b1..6b42567 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -8,6 +8,7 @@ import shift.mceconomy2.api.shop.ProductList; import shift.sextiarysector.block.BlockBottle; import shift.sextiarysector.block.BlockMonitor.MonitorType; +import shift.sextiarysector.item.ItemShopRing; public class SSShops { @@ -61,6 +62,11 @@ public static void initShops(){ } MonitorType.creeper.setList(creepers); + SSProductList[] creepersR = new SSProductList[4]; + for(int i=0; i<4; i++){ + creepersR[i] = creepers[i].copySSProductList(); + } + ((ItemShopRing) SSItems.creeperRing).setList(creepersR); SSProductList robot = new SSProductList("shop.ss.robot"); @@ -85,6 +91,14 @@ public String getProductListName() { return this.name; } + public SSProductList copySSProductList(){ + + SSProductList c = new SSProductList(name); + c.ProductItemList = this.ProductItemList; + + return c; + } + } public static void initPurchase(){ diff --git a/src/main/java/shift/sextiarysector/block/BlockBlueFire.java b/src/main/java/shift/sextiarysector/block/BlockBlueFire.java new file mode 100644 index 0000000..dbd4a39 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockBlueFire.java @@ -0,0 +1,218 @@ +package shift.sextiarysector.block; + +import static net.minecraftforge.common.util.ForgeDirection.*; + +import java.util.Random; + +import net.minecraft.block.BlockFire; +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityFurnace; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class BlockBlueFire extends BlockFire{ + + public BlockBlueFire() + { + super(); + this.setTickRandomly(true); + } + + public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) + { + + this.addFuel(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_5_); + + if (p_149674_1_.getGameRules().getGameRuleBooleanValue("doFireTick")) + { + boolean flag = p_149674_1_.getBlock(p_149674_2_, p_149674_3_ - 1, p_149674_4_).isFireSource(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, UP); + + if (!this.canPlaceBlockAt(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_)) + { + p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_); + } + + if (!flag && p_149674_1_.isRaining() && (p_149674_1_.canLightningStrikeAt(p_149674_2_, p_149674_3_, p_149674_4_) || p_149674_1_.canLightningStrikeAt(p_149674_2_ - 1, p_149674_3_, p_149674_4_) || p_149674_1_.canLightningStrikeAt(p_149674_2_ + 1, p_149674_3_, p_149674_4_) || p_149674_1_.canLightningStrikeAt(p_149674_2_, p_149674_3_, p_149674_4_ - 1) || p_149674_1_.canLightningStrikeAt(p_149674_2_, p_149674_3_, p_149674_4_ + 1))) + { + p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_); + } + else + { + int l = p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_); + + if (l < 15) + { + p_149674_1_.setBlockMetadataWithNotify(p_149674_2_, p_149674_3_, p_149674_4_, l + p_149674_5_.nextInt(3) / 2, 4); + } + + p_149674_1_.scheduleBlockUpdate(p_149674_2_, p_149674_3_, p_149674_4_, this, this.tickRate(p_149674_1_) + p_149674_5_.nextInt(10)); + + if (!flag && !this.canNeighborBurn(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_)) + { + if (!World.doesBlockHaveSolidTopSurface(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_) || l > 3) + { + p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_); + } + } + else if (!flag && !this.canCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, UP) && l == 15 && p_149674_5_.nextInt(4) == 0) + { + p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_); + } + else + { + boolean flag1 = p_149674_1_.isBlockHighHumidity(p_149674_2_, p_149674_3_, p_149674_4_); + byte b0 = 0; + + if (flag1) + { + b0 = -50; + } + + this.tryCatchFire(p_149674_1_, p_149674_2_ + 1, p_149674_3_, p_149674_4_, 300 + b0, p_149674_5_, l, WEST ); + this.tryCatchFire(p_149674_1_, p_149674_2_ - 1, p_149674_3_, p_149674_4_, 300 + b0, p_149674_5_, l, EAST ); + this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, 250 + b0, p_149674_5_, l, UP ); + this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ + 1, p_149674_4_, 250 + b0, p_149674_5_, l, DOWN ); + this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_ - 1, 300 + b0, p_149674_5_, l, SOUTH); + this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_ + 1, 300 + b0, p_149674_5_, l, NORTH); + + for (int i1 = p_149674_2_ - 1; i1 <= p_149674_2_ + 1; ++i1) + { + for (int j1 = p_149674_4_ - 1; j1 <= p_149674_4_ + 1; ++j1) + { + for (int k1 = p_149674_3_ - 1; k1 <= p_149674_3_ + 4; ++k1) + { + if (i1 != p_149674_2_ || k1 != p_149674_3_ || j1 != p_149674_4_) + { + int l1 = 100; + + if (k1 > p_149674_3_ + 1) + { + l1 += (k1 - (p_149674_3_ + 1)) * 100; + } + + int i2 = this.getChanceOfNeighborsEncouragingFire(p_149674_1_, i1, k1, j1); + + if (i2 > 0) + { + int j2 = (i2 + 40 + p_149674_1_.difficultySetting.getDifficultyId() * 7) / (l + 30); + + if (flag1) + { + j2 /= 2; + } + + if (j2 > 0 && p_149674_5_.nextInt(l1) <= j2 && (!p_149674_1_.isRaining() || !p_149674_1_.canLightningStrikeAt(i1, k1, j1)) && !p_149674_1_.canLightningStrikeAt(i1 - 1, k1, p_149674_4_) && !p_149674_1_.canLightningStrikeAt(i1 + 1, k1, j1) && !p_149674_1_.canLightningStrikeAt(i1, k1, j1 - 1) && !p_149674_1_.canLightningStrikeAt(i1, k1, j1 + 1)) + { + int k2 = l + p_149674_5_.nextInt(5) / 4; + + if (k2 > 15) + { + k2 = 15; + } + + p_149674_1_.setBlock(i1, k1, j1, Blocks.fire, k2, 3); + } + } + } + } + } + } + } + } + } + + if(p_149674_5_.nextInt(10)<=2)p_149674_1_.setBlock(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.fire); + //p_149674_1_.scheduleBlockUpdate(p_149674_2_, p_149674_3_, p_149674_4_, this, 4); + + } + + public int tickRate(World p_149738_1_) + { + return 30; + } + + private void tryCatchFire(World p_149841_1_, int p_149841_2_, int p_149841_3_, int p_149841_4_, int p_149841_5_, Random p_149841_6_, int p_149841_7_, ForgeDirection face) + { + int j1 = p_149841_1_.getBlock(p_149841_2_, p_149841_3_, p_149841_4_).getFlammability(p_149841_1_, p_149841_2_, p_149841_3_, p_149841_4_, face); + + if (p_149841_6_.nextInt(p_149841_5_) < j1) + { + boolean flag = p_149841_1_.getBlock(p_149841_2_, p_149841_3_, p_149841_4_) == Blocks.tnt; + + if (p_149841_6_.nextInt(p_149841_7_ + 10) < 5 && !p_149841_1_.canLightningStrikeAt(p_149841_2_, p_149841_3_, p_149841_4_)) + { + int k1 = p_149841_7_ + p_149841_6_.nextInt(5) / 4; + + if (k1 > 15) + { + k1 = 15; + } + + p_149841_1_.setBlock(p_149841_2_, p_149841_3_, p_149841_4_, Blocks.fire, k1, 3); + } + else + { + p_149841_1_.setBlockToAir(p_149841_2_, p_149841_3_, p_149841_4_); + } + + if (flag) + { + Blocks.tnt.onBlockDestroyedByPlayer(p_149841_1_, p_149841_2_, p_149841_3_, p_149841_4_, 1); + } + } + } + + private boolean canNeighborBurn(World p_149847_1_, int p_149847_2_, int p_149847_3_, int p_149847_4_) + { + return this.canCatchFire(p_149847_1_, p_149847_2_ + 1, p_149847_3_, p_149847_4_, WEST ) || + this.canCatchFire(p_149847_1_, p_149847_2_ - 1, p_149847_3_, p_149847_4_, EAST ) || + this.canCatchFire(p_149847_1_, p_149847_2_, p_149847_3_ - 1, p_149847_4_, UP ) || + this.canCatchFire(p_149847_1_, p_149847_2_, p_149847_3_ + 1, p_149847_4_, DOWN ) || + this.canCatchFire(p_149847_1_, p_149847_2_, p_149847_3_, p_149847_4_ - 1, SOUTH) || + this.canCatchFire(p_149847_1_, p_149847_2_, p_149847_3_, p_149847_4_ + 1, NORTH); + } + + private int getChanceOfNeighborsEncouragingFire(World p_149845_1_, int p_149845_2_, int p_149845_3_, int p_149845_4_) + { + byte b0 = 0; + + if (!p_149845_1_.isAirBlock(p_149845_2_, p_149845_3_, p_149845_4_)) + { + return 0; + } + else + { + int l = b0; + l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_ + 1, p_149845_3_, p_149845_4_, l, WEST ); + l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_ - 1, p_149845_3_, p_149845_4_, l, EAST ); + l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_, p_149845_3_ - 1, p_149845_4_, l, UP ); + l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_, p_149845_3_ + 1, p_149845_4_, l, DOWN ); + l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_, p_149845_3_, p_149845_4_ - 1, l, SOUTH); + l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_, p_149845_3_, p_149845_4_ + 1, l, NORTH); + return l; + } + } + + //ss2 + + private void addFuel(World world, int x, int y, int z, Random p_149674_5_){ + + + TileEntity t = world.getTileEntity(x, y + 1, z); + + if(t instanceof TileEntityFurnace){ + + TileEntityFurnace furnace = (TileEntityFurnace)t; + + boolean f = furnace.currentItemBurnTime==0; + + furnace.currentItemBurnTime = furnace.furnaceBurnTime = 800; + + if(f)world.markBlockForUpdate(x, y + 1, z); + + } + + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockMonitor.java b/src/main/java/shift/sextiarysector/block/BlockMonitor.java index 4df9c97..fd4df15 100644 --- a/src/main/java/shift/sextiarysector/block/BlockMonitor.java +++ b/src/main/java/shift/sextiarysector/block/BlockMonitor.java @@ -123,6 +123,7 @@ public void setList(SSProductList list) { public void setList(SSProductList[] list) { this.sList = list; + this.list = list[0]; } } diff --git a/src/main/java/shift/sextiarysector/item/ItemShopRing.java b/src/main/java/shift/sextiarysector/item/ItemShopRing.java new file mode 100644 index 0000000..2390105 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemShopRing.java @@ -0,0 +1,108 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import shift.mceconomy2.api.MCEconomyAPI; +import shift.sextiarysector.SSShops.SSProductList; +import shift.sextiarysector.api.IEquipment; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.api.season.SeasonAPI; +import shift.sextiarysector.gui.tab.AbstractTab; +import shift.sextiarysector.gui.tab.TabManager; +import shift.sextiarysector.player.EquipmentType; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemShopRing extends Item implements IEquipment , ISSEquipment{ + + private SSProductList list; + private SSProductList[] sList; + public AbstractTab tab; + + public ItemShopRing(){ + this.setMaxStackSize(1); + this.setCreativeTab(SextiarySectorAPI.TabSSEconomy); + MinecraftForge.EVENT_BUS.register(this); + } + + public SSProductList getList(World world) { + + if(world==null||sList==null)return this.getList(); + + return sList[SeasonAPI.getSeason(world).ordinal()]; + } + + public SSProductList getList() { + return list; + } + + public void setList(SSProductList list) { + this.list = list; + } + + public void setList(SSProductList[] list) { + this.sList = list; + this.list = list[0]; + } + + public void setTab(AbstractTab tab) { + this.tab = tab; + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void onOpenShopGuiEvent(shift.mceconomy2.api.shop.OpenShopGuiEvent event) { + + if(!isShop(event.shopID))return; + + int xSize = 176; + int ySize = 166; + int guiLeft = (event.gui.width - xSize) / 2; + int guiTop = (event.gui.height - ySize) / 2; + + TabManager.updateTabValues(guiLeft, guiTop,event.buttonList, tab,false); + + } + + private boolean isShop(int id){ + + if(sList!=null){ + for(SSProductList l:sList){ + if(l.id==id)return true; + } + } + + return list.id == id; + + } + + @Override + public String getTabName(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + return this.getUnlocalizedName(); + } + + @Override + public boolean shouldAddToList(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + return true; + } + + @Override + public void onTabClicked(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + MCEconomyAPI.openShopGui(this.getList(player.worldObj).id, player, player.worldObj, (int)player.posX, (int)player.posY, (int)player.posZ); + } + + @Override + public boolean canTakeStack(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + return equipment.equals(EquipmentType.Ring); + } + + @Override + public boolean isItemValid(EquipmentType equipment, ItemStack stack) { + return equipment.equals(EquipmentType.Ring); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java index a10514a..4ec4fcc 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java @@ -3,45 +3,110 @@ import java.util.List; import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.api.machine.energy.EnergyStorage; +import shift.sextiarysector.api.machine.energy.IEnergyHandler; -public class TileEntityFan extends TileEntityDirection{ +public class TileEntityFan extends TileEntityDirection implements IEnergyHandler{ public float rotateStep = 360; + private int speed = 0; + private int time = 0; + + public EnergyStorage storage = new EnergyStorage("Base", 3, 3000); @Override public void updateEntity() { + super.updateEntity(); + if (this.worldObj.isRemote) { this.updateClientEntity(); } else { - this.updateServerEntity(); + } + if(this.canWork()){ + this.workFan(); + this.addFire(); } + } - AxisAlignedBB aabb = getDirectionAABB(); + public void updateClientEntity() { - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity)null, aabb, null); + this.rotateStep += speed; - for(Entity e :list){ - e.motionX+=(this.direction.offsetX/10.0f); - e.motionY+=(this.direction.offsetY/10.0f); - e.motionZ+=(this.direction.offsetZ/10.0f); + } + + private void updateServerEntity() { + + if(time>=10){ + this.changeSpeed(); + time=0; + }else{ + time++; } } - public void updateClientEntity() { + private void addFire(){ + + for(int i=1; i<6; i++){ + + int x = this.xCoord + this.direction.offsetX * i; + int y = this.yCoord + this.direction.offsetY * i; + int z = this.zCoord + this.direction.offsetZ * i; - this.rotateStep += 12; + if(this.worldObj.getBlock(x, y, z) != Blocks.fire)continue; + + this.worldObj.setBlock(x, y, z, SSBlocks.blueFire); + + } } - private void updateServerEntity() { + private void changeSpeed(){ + + int use = this.storage.drawEnergy(3, 200, false); + int i = this.speed; + if(use>=180){ + speed = Math.min(16, speed + 1); + }else{ + speed = Math.max(0, speed - 1); + } + + if(i!=speed){ + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + private boolean canWork(){ + + return speed >= 14; + + } + + private void workFan(){ + + AxisAlignedBB aabb = getDirectionAABB(); + + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity)null, aabb, null); + + for(Entity e :list){ + if(e instanceof EntityPlayer)continue; + e.motionX+=(this.direction.offsetX/10.0f); + e.motionY+=(this.direction.offsetY/10.0f); + e.motionZ+=(this.direction.offsetZ/10.0f); + } } @@ -68,4 +133,58 @@ public float getRotateStep() { return rotateStep; } + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + this.speed = par1nbtTagCompound.getInteger("speed"); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + par1nbtTagCompound.setInteger("speed", this.speed); + } + + @Override + public int addEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + + if(!canInterface(from))return 0; + + int i = storage.addEnergy(power, speed, simulate); + + return i; + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + + return 0; + + } + + @Override + public boolean canInterface(ForgeDirection from) { + return this.getDirection().getOpposite().ordinal() == from.ordinal(); + } + + @Override + public int getPowerStored(ForgeDirection from) { + return storage.getPowerStored(); + } + + @Override + public long getSpeedStored(ForgeDirection from) { + return storage.getSpeedStored(); + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + return storage.getMaxPowerStored(); + } + + @Override + public long getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeedStored(); + } + } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index c63b954..3cb83b5 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -110,6 +110,9 @@ item.ss.energy_ring.name=Energy Ring item.ss.craft_unit.name=Craft Unit +item.ss.creeper_ring.name=Creeper Shop Ring + + item.ss.magic_dust.name=Magic Dust item.ss.unit.name=Unit @@ -237,6 +240,8 @@ player.tab.vanilla=Vanilla player.tab.equipment=Equipment player.tab.item.ss.craft_unit=Craft +player.tab.item.ss.creeper_ring=Creeper Shop + #Achievement stat.sell=Sell diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_0.png b/src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_0.png new file mode 100644 index 0000000000000000000000000000000000000000..caf5db309ec93e5b9e85fb6579496ffa6689349b GIT binary patch literal 16137 zcmV+kKlZ?hP)vXN?s|V~{q8Tb z)-1_moqhJ%=X{^?eZJ2grM2e2^RoDFzW&<-sDJlCX(1GZArOLKAuOA*UIR4jTddMa z&>Fmcs2{&dWBWi^Y;T$dFY7Mr}2a7J*p|Na8Mj_EpytjqsqAKj7GNzX)&KXxm^TexJR@<%VI?DPN zW~yuktSH#U5g=4bSw$sXUEL5Y;+&BYrk6p=(WJ6)^(e)4weUbq36C5)kMEtQb>lk+ z_|@+wDSNOV=xm}ZT+Suq%BT!#LN-(eK`F%zV>Ji+;H6dw+3?G`@azdV8J$3R71+ba z0%PZL*GxaJw872}MSogTqMkN$5DTpMf5*`#XT{qx{#) zMY2Ne2O(U^|GIWEMLzjxeG{Bt0Y7@NgV!26!S;bSKsp6hI0B=_PLu-=Zi9kyuq-A= z@{jA{I{3kbaBgh{^tHf=M%MkUP66=vEa0czI_qeib+j({oum26b{%=p(OF09WBu~^ z7hl%;XN^wo??(JtYyRzJZF_9U-Yus)5rwp)Akoi)!cFMZ~(4+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XuM;cC;-CcA{FSB&6smAPxM3A(f1WDPY*E4tFda%BjVFAteUQt<8nsx6)Hn5(P;yy z&pj;^Xi*ijDWT&B!XqU51(pBs5(+D&wh$~4%hYjLqLe<-BAsb$PEUF6d_q%JOJtbr zkp$43smT{A0{g8uh0>hyA~<2H$@RJW7bV z_PFAemtH{MJ5S&|d%`F_I#F}5SCMpNua}{(IaTnXQJU|)1$`+cn^wCOj?nM4Zun6C ztH7Q(cJ@epTMP6w9~RSBS|i08z>Xi;3Cv=_NSIV2GUBJ2Vfonnw;(tgzIvWw>&bE4 zb3Sw@DKyX71%dm{bDWP6D&n=qQF$Lk_ zerF#1enRq&b)wnzhlT#?Ymq2LJ70kmSQuIBa##0X=%`#N5Gd&E0*y+pU>f1)yT0V^Ubp9@U{w4JM5wcA|Q$Kv` z4f!fsH+z{SB&PN z{ZL(?a*LSAz|uN+;+X9A3NnjV+y4KlPdrl{WdB|KpAosc2c8*h|NR++N^=AKBTbTh z*0a~lX7ac(>^po!4)z8l2?-Yc{Q=Y$o|lrLd$61BOuvrFrbUn4PyBsFl)4{1IxOFs zx~~@|m%v3sR58cQKIH6v;Nr#r(*xyFdk*`-f)FOagYRn1kK46d^%%-A{&Kf-8rOKFPwU}- b()#}aW4o^0^DmJy00000NkvXXu0mjfUy;dA literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_0.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_0.png.mcmeta new file mode 100644 index 0000000..7644671 --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_0.png.mcmeta @@ -0,0 +1,38 @@ +{ + "animation": { + "frames": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ] + } +} diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_1.png b/src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_1.png new file mode 100644 index 0000000000000000000000000000000000000000..0cb1f0bb31edb17d472e61ac0d36d74c33d74e7f GIT binary patch literal 17108 zcmV*&KsUdMP)37NJ1=+0mndq5KbT=ha48% zFoggI2a4nr712FDJLXB^1j6HG=YaU4(aJjkPD&10*_dcQw*Rac9^<=pSwb-#7j z*K74sORC|ms(0`A+0TCVZl$&6zweZNuWZFX`gR zmlLsJD5IeJv>e?Zgu-e#y%VLt)?nH;plyg%vhcDUnotq7_2ZaTu9;e@*x8}kAFbu& zAdpEz-#IXYm;nd|oDmdEpHE3Zak6_D68)U+OH&o`(-4FD0!439&K9%$%$Yid-@O&a z3V{NQkIq@C@0zBVS*D4EgK{^!TR7IIIo_|CUaI-=<(lzDP!xcdTfr(Ur}?UbdQ>eK z*2T9nu?W_GKrwGL6qlAUreQn_8x%EB#T`==vnv!U=R;XgQxbrwrGP(7VhEJ=3$0gQ z3rQPZZ-ZCcpd$|DVffmGaJW}9u~@P4ux5Lk;&fjcl7sR@j=qGMI`#&;E||;f=b8Vm)?C%6;#>j!mY^aKnA17{91Yibj3Es=k&cmX1Q_{|^R06W8sIhV2f z&`@-}>chExLjd!eHTOw%XUrwsY0 zMs_s);PcC8t(~{+eO5}|rq2M=lnw1H&JpB*reDsQNrTSFXTv8W30FX?0K)`31Evp5%M#Ny3`iwq1pWZ{E!l8U<4TQbfzOg7rQ)o6cbT%YVB25@ zEGQ^-tTiqpxMkLQO~a+~$5b5R-SXLIK{mzWrj`1!H&!THgQ^sXQ5Z9a zh7z&HqkYgaFct$`!F;X!Y3xm&mv24W=KP2=N;8>q#pr>2RIb1?XC787C=RkKOr-u~h?U?TuU(>qw zQLP`|CnmhR!`6Q|A)kwXZR=mwf@)l;^*86h(?>PWo`T`5;>v1ReJzX%!=ne~QO>V{ zEk~z?JklOK6X!)o-jNASb5?RgDf7t_ehN_7d(t74J zR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LfggirGOXwKNRg_a3)oA^ts{}@Wa%El>fB> P00000NkvXXu0mjf0t8V2 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_1.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_1.png.mcmeta new file mode 100644 index 0000000..4f0718a --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/blocks/blue_fire_layer_1.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} \ No newline at end of file diff --git a/src/main/resources/assets/sextiarysector/textures/items/ring/creeper_ring.png b/src/main/resources/assets/sextiarysector/textures/items/ring/creeper_ring.png new file mode 100644 index 0000000000000000000000000000000000000000..be5fa8358852ede3d0873aacdc1eee49f6844926 GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqkFbDI^o-U3d7N@TU8}c18;Mt?V_G?n# z$qV}x3=iu+(!BYLWyZt_62DlFz%wB?&;8+tP^{CRiDK1;z~{IlBymp@)EybF4-Br(nEm@RP6`j%a;lSHRa z--P$w_or9vk4@|qbS}U5yE0uS>Z(hO<@dXdrfzFC^=Lm2uw-8;!tCHa&8v4#uS`U8 sO9+?jN8!pMc7H*+q>XVO|IdHP*jMb=-C+9sJJ25tp00i_>zopr0Mi_BYXATM literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/ring/slot_ring.png b/src/main/resources/assets/sextiarysector/textures/items/ring/slot_ring.png new file mode 100644 index 0000000000000000000000000000000000000000..ba07dfaa902c8707b55dc3f31905d21750d9cf85 GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqwR=9l013Ij+3e{BUhP z$K55*cP(cv%+*Xu+&lH`ix(|tcxGx$=rM7ORc-Ux`rMCqJ7=5E*M=8*QxfF)W>%G7 zTDkE3E5`>1=SoE-xCE7{tXWmR-7UV*)PaHFi{F>x4ca{&2Ae*elzQFQlB~R!@!$8E ZdRMC=IbFqk4+5RQ;OXk;vd$@?2>^2(Q;z@u literal 0 HcmV?d00001 From 2627cfbc02a95fa09ddfe0296c6131938f8d0d3c Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 23 Dec 2014 11:38:07 +0900 Subject: [PATCH 46/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E6=A9=9F?= =?UTF-8?q?=E6=A2=B0=E3=81=AE=E3=83=AC=E3=82=B7=E3=83=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・機械のレシピを増やした ・ダイアモンドの粉を追加 ・鉄のリングを追加 --- .../java/shift/sextiarysector/SSBlocks.java | 6 +- .../shift/sextiarysector/SSCreativeTabs.java | 48 +++++++++- .../java/shift/sextiarysector/SSItems.java | 54 +++++++---- .../shift/sextiarysector/SSOreDictionary.java | 8 ++ .../java/shift/sextiarysector/SSShops.java | 5 ++ .../sextiarysector/api/SextiarySectorAPI.java | 2 + .../api/machine/energy/IGearForceGrid.java | 11 +++ .../sextiarysector/block/BlockBlueFire.java | 5 ++ .../shift/sextiarysector/block/BlockFan.java | 3 + .../block/BlockFluidFurnace.java | 1 + .../block/BlockFoodSmokers.java | 2 + .../sextiarysector/block/BlockLargeOre.java | 2 +- .../block/BlockMagicFurnace.java | 1 + .../sextiarysector/block/BlockSSOre.java | 2 +- .../sextiarysector/block/BlockWoodHopper.java | 1 + .../event/ClientEventHandler.java | 78 +++++++++++----- .../event/CommonEventHandler.java | 8 ++ .../item/ItemBlockFluidCrafter.java | 84 ++++++++++++++++++ .../sextiarysector/item/ItemShiftHat.java | 2 +- .../sextiarysector/plugin/PluginIC2.java | 2 +- .../recipe/RecipesFurnaceCraft.java | 29 ++++++ .../sextiarysector/recipe/RecipesLoom.java | 3 + .../sextiarysector/recipe/RecipesMachine.java | 17 +++- .../recipe/RecipesMagicFuel.java | 3 + .../recipe/RecipesMagicFurnace.java | 3 + .../recipe/RecipesPulverizer.java | 3 + .../sextiarysector/recipe/RecipesSawmill.java | 11 ++- .../renderer/block/RendererFan.java | 2 +- .../tileentity/TileEntitySmallWaterwheel.java | 46 +++++++++- .../tileentity/TileEntitySmallWindmill.java | 49 +++++++++- .../tileentity/TileEntityWindmill.java | 49 +++++++++- .../assets/sextiarysector/lang/en_US.lang | 13 ++- .../textures/items/dust/diamond_dust.png | Bin 0 -> 336 bytes .../textures/items/dust/mithril_dust.png | Bin 0 -> 251 bytes .../textures/items/energy_reactor.png | Bin 0 -> 296 bytes .../textures/items/ingot/brass_ingot.png | Bin 0 -> 309 bytes .../{energy_ring.png => object_reactor.png} | Bin 296 -> 296 bytes .../textures/items/ring/iron_ring.png | Bin 0 -> 294 bytes .../textures/items/ring/slot_ring.png | Bin 234 -> 234 bytes 39 files changed, 495 insertions(+), 58 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/api/machine/energy/IGearForceGrid.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/dust/diamond_dust.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/dust/mithril_dust.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/energy_reactor.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ingot/brass_ingot.png rename src/main/resources/assets/sextiarysector/textures/items/{energy_ring.png => object_reactor.png} (88%) create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index c067333..7b025d8 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -169,7 +169,7 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntityBlockBottle.class, "Bottle"); fluidCrafter = new BlockFluidCrafter().setBlockName("ss.fluid_crafter").setBlockTextureName("glass"); - GameRegistry.registerBlock(fluidCrafter,ItemBlockFluidCrafter.class, "FluidCrafter"); + GameRegistry.registerBlock(fluidCrafter, ItemBlockFluidCrafter.class, "FluidCrafter"); GameRegistry.registerTileEntity(TileEntityFluidCrafter.class, "FluidCrafter"); hole = new BlockHole().setBlockName("ss.hole").setCreativeTab(SextiarySectorAPI.TabSSCore); @@ -191,10 +191,10 @@ public static void initBlicks(){ GameRegistry.registerBlock(blueFire, "BlueFire"); //鉱石 - blueStoneOre = new BlockPowerStone().setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSCore); + blueStoneOre = new BlockPowerStone().setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(blueStoneOre, "BlueStoneOre"); - yellowStoneOre = new BlockPowerStone().setBlockName("ss.yellow_stone").setBlockTextureName("sextiarysector:yellowstone_ore").setCreativeTab(SextiarySectorAPI.TabSSCore); + yellowStoneOre = new BlockPowerStone().setBlockName("ss.yellow_stone").setBlockTextureName("sextiarysector:yellowstone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(yellowStoneOre, "YellowStoneOre"); mithrilOre = new BlockSSOre(null,2).setBlockName("ss.mithril_ore").setBlockTextureName("sextiarysector:ore/mithril_ore"); diff --git a/src/main/java/shift/sextiarysector/SSCreativeTabs.java b/src/main/java/shift/sextiarysector/SSCreativeTabs.java index c4c99db..2241b87 100644 --- a/src/main/java/shift/sextiarysector/SSCreativeTabs.java +++ b/src/main/java/shift/sextiarysector/SSCreativeTabs.java @@ -14,7 +14,9 @@ public static void initCreativeTabs(){ SextiarySectorAPI.TabSSCore = new CreativeTabSSCore(); SextiarySectorAPI.TabSSFluid = new CreativeTabSSFluid(); SextiarySectorAPI.TabSSMachine = new CreativeTabSSMachine(); + SextiarySectorAPI.TabSSPlayer = new CreativeTabSSPlayer(); SextiarySectorAPI.TabSSAgriculture = new CreativeTabSSAgriculture(); + SextiarySectorAPI.TabSSMining = new CreativeTabSSMining(); SextiarySectorAPI.TabSSCooking = new CreativeTabSSCooking(); SextiarySectorAPI.TabSSEconomy = new CreativeTabSSEconomy(); SextiarySectorAPI.TabSSMagic = new CreativeTabSSMagic(); @@ -78,6 +80,25 @@ public ItemStack getIconItemStack() } + private static class CreativeTabSSPlayer extends CreativeTabs{ + + public CreativeTabSSPlayer() { + super("ss.player"); + } + + @Override + public Item getTabIconItem() { + return null;//SSBlocks.LargeFurnace.g; + } + + @SideOnly(Side.CLIENT) + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.ironRing,1); + } + + } + private static class CreativeTabSSAgriculture extends CreativeTabs{ public CreativeTabSSAgriculture() { @@ -97,10 +118,10 @@ public ItemStack getIconItemStack() } - private static class CreativeTabSSEconomy extends CreativeTabs{ + private static class CreativeTabSSMining extends CreativeTabs{ - public CreativeTabSSEconomy() { - super("ss.economy"); + public CreativeTabSSMining() { + super("ss.mining"); } @Override @@ -111,7 +132,7 @@ public Item getTabIconItem() { @SideOnly(Side.CLIENT) public ItemStack getIconItemStack() { - return new ItemStack(SSBlocks.creeperChest,1); + return new ItemStack(SSBlocks.ironLargeOre,1); } } @@ -135,6 +156,25 @@ public ItemStack getIconItemStack() } + private static class CreativeTabSSEconomy extends CreativeTabs{ + + public CreativeTabSSEconomy() { + super("ss.economy"); + } + + @Override + public Item getTabIconItem() { + return null;//SSBlocks.LargeFurnace.g; + } + + @SideOnly(Side.CLIENT) + public ItemStack getIconItemStack() + { + return new ItemStack(SSBlocks.creeperChest,1); + } + + } + private static class CreativeTabSSMagic extends CreativeTabs{ public CreativeTabSSMagic() { diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 907d85f..9ddafee 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -51,8 +51,12 @@ public class SSItems { public static Item coalDust; public static Item ironDust; public static Item goldDust; + public static Item diamondDust; + + public static Item mithrilDust; public static Item steelIngot; + public static Item brassIngot; public static Item blueStoneIngot; public static Item yellowStoneIngot; @@ -65,12 +69,14 @@ public class SSItems { public static Item blueStoneSlimeBall; - public static Item energyRing; + public static Item energyReactor; + public static Item objectReactor; //unit public static Item craftUnit; //ring + public static Item ironRing; public static Item creeperRing; //魔法 @@ -176,54 +182,70 @@ public static void initItems(){ dustWaterLily = new Item().setUnlocalizedName("ss.dust_waterlily").setTextureName("sextiarysector:dust/waterlily_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(dustWaterLily, "DustWaterLily"); - stoneDust = new Item().setUnlocalizedName("ss.stone_dust").setTextureName("sextiarysector:dust/stone_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); + stoneDust = new Item().setUnlocalizedName("ss.stone_dust").setTextureName("sextiarysector:dust/stone_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(stoneDust, "StoneDust"); - blueStoneDust = new Item().setUnlocalizedName("ss.dust_blue_stone").setTextureName("sextiarysector:dust/bluestone_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); + blueStoneDust = new Item().setUnlocalizedName("ss.dust_blue_stone").setTextureName("sextiarysector:dust/bluestone_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(blueStoneDust, "DustBlueStone"); - yellowStoneDust = new Item().setUnlocalizedName("ss.dust_yellow_stone").setTextureName("sextiarysector:dust/yellowstone_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); + yellowStoneDust = new Item().setUnlocalizedName("ss.dust_yellow_stone").setTextureName("sextiarysector:dust/yellowstone_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(yellowStoneDust, "DustYellowStone"); - coalDust = new Item().setUnlocalizedName("ss.coal_dust").setTextureName("sextiarysector:dust/coal_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); + coalDust = new Item().setUnlocalizedName("ss.coal_dust").setTextureName("sextiarysector:dust/coal_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(coalDust, "CoalDust"); - ironDust = new Item().setUnlocalizedName("ss.iron_dust").setTextureName("sextiarysector:dust/iron_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); + ironDust = new Item().setUnlocalizedName("ss.iron_dust").setTextureName("sextiarysector:dust/iron_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(ironDust, "IronDust"); - goldDust = new Item().setUnlocalizedName("ss.gold_dust").setTextureName("sextiarysector:dust/gold_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); + goldDust = new Item().setUnlocalizedName("ss.gold_dust").setTextureName("sextiarysector:dust/gold_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(goldDust, "GoldDust"); - steelIngot = new Item().setUnlocalizedName("ss.steel_ingot").setTextureName("sextiarysector:ingot/steel_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); + diamondDust = new Item().setUnlocalizedName("ss.diamond_dust").setTextureName("sextiarysector:dust/diamond_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(diamondDust, "DiamondDust"); + + mithrilDust = new Item().setUnlocalizedName("ss.mithril_dust").setTextureName("sextiarysector:dust/mithril_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(mithrilDust, "MithrilDust"); + + + steelIngot = new Item().setUnlocalizedName("ss.steel_ingot").setTextureName("sextiarysector:ingot/steel_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(steelIngot, "SteelIngot"); - blueStoneIngot = new Item().setUnlocalizedName("ss.bluestone_ingot").setTextureName("sextiarysector:ingot/bluestone_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); + brassIngot = new Item().setUnlocalizedName("ss.brass_ingot").setTextureName("sextiarysector:ingot/brass_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(brassIngot, "BrassIngot"); + + blueStoneIngot = new Item().setUnlocalizedName("ss.bluestone_ingot").setTextureName("sextiarysector:ingot/bluestone_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(blueStoneIngot, "BlueStoneIngot"); - yellowStoneIngot = new Item().setUnlocalizedName("ss.yellowstone_ingot").setTextureName("sextiarysector:ingot/yellowstone_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); + yellowStoneIngot = new Item().setUnlocalizedName("ss.yellowstone_ingot").setTextureName("sextiarysector:ingot/yellowstone_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(yellowStoneIngot, "YellowStoneIngot"); - mithrilIngot = new Item().setUnlocalizedName("ss.mithril_ingot").setTextureName("sextiarysector:ingot/mithril_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); + mithrilIngot = new Item().setUnlocalizedName("ss.mithril_ingot").setTextureName("sextiarysector:ingot/mithril_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(mithrilIngot, "MithrilIngot"); - orichalcumGem = new Item().setUnlocalizedName("ss.orichalcum_gem").setTextureName("sextiarysector:gem/orichalcum_gem").setCreativeTab(SextiarySectorAPI.TabSSCore); + orichalcumGem = new Item().setUnlocalizedName("ss.orichalcum_gem").setTextureName("sextiarysector:gem/orichalcum_gem").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(orichalcumGem, "OrichalcumGem"); - ninjaIngot = new Item().setUnlocalizedName("ss.ninja_ingot").setTextureName("sextiarysector:ingot/ninja_ingot").setCreativeTab(SextiarySectorAPI.TabSSCore); + ninjaIngot = new Item().setUnlocalizedName("ss.ninja_ingot").setTextureName("sextiarysector:ingot/ninja_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(ninjaIngot, "NinjaIngot"); blueStoneSlimeBall = new Item().setUnlocalizedName("ss.blue_stone_slime_ball").setTextureName("sextiarysector:slimeball/bluestone_slimeball").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(blueStoneSlimeBall, "BlueStoneSlimeBall"); - energyRing = new Item().setUnlocalizedName("ss.energy_ring").setTextureName("sextiarysector:energy_ring").setCreativeTab(SextiarySectorAPI.TabSSCore); - GameRegistry.registerItem(energyRing, "EnergyRing"); + energyReactor = new Item().setUnlocalizedName("ss.energy_reactor").setTextureName("sextiarysector:energy_reactor").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(energyReactor, "EnergyReactor"); + + objectReactor = new Item().setUnlocalizedName("ss.object_reactor").setTextureName("sextiarysector:object_reactor").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(objectReactor, "ObjectReactor"); //Unit - craftUnit = new ItemGuiUnit(201).setUnlocalizedName("ss.craft_unit").setTextureName("sextiarysector:unit/craft_unit").setCreativeTab(SextiarySectorAPI.TabSSCore); + craftUnit = new ItemGuiUnit(201).setUnlocalizedName("ss.craft_unit").setTextureName("sextiarysector:unit/craft_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(craftUnit, "CraftUnit"); //Ring + ironRing = new Item().setUnlocalizedName("ss.iron_ring").setTextureName("sextiarysector:ring/iron_ring").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(ironRing, "IronRing"); + creeperRing = new ItemShopRing().setUnlocalizedName("ss.creeper_ring").setTextureName("sextiarysector:ring/creeper_ring"); GameRegistry.registerItem(creeperRing, "CreeperRing"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index 1e30f63..597a418 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -21,13 +21,21 @@ public static void init(){ OreDictionary.registerOre("dustCoal", SSItems.coalDust); OreDictionary.registerOre("dustIron", SSItems.ironDust); OreDictionary.registerOre("dustGold", SSItems.goldDust); + OreDictionary.registerOre("dustDiamond", SSItems.diamondDust); + OreDictionary.registerOre("dustMithril", SSItems.mithrilDust); OreDictionary.registerOre("dustBluestone", SSItems.blueStoneDust); OreDictionary.registerOre("dustYellowstone", SSItems.yellowStoneDust); OreDictionary.registerOre("ingotSteel", SSItems.steelIngot); + OreDictionary.registerOre("ingotBrass", SSItems.brassIngot); OreDictionary.registerOre("ingotBluestone", SSItems.blueStoneIngot); OreDictionary.registerOre("ingotYellowstone", SSItems.yellowStoneIngot); OreDictionary.registerOre("ingotNinja", SSItems.ninjaIngot); + OreDictionary.registerOre("ingotMithril", SSItems.mithrilIngot); + + OreDictionary.registerOre("oreMithril", SSBlocks.mithrilOre); + + OreDictionary.registerOre("ringIron", SSItems.ironRing); Item[] Knife = new Item[]{SSItems.woodKnife, SSItems.stoneKnife, SSItems.ironKnife, SSItems.goldKnife, SSItems.diamondKnife}; for(int i =0;i!)XxIA49y7Jqo}Q@xyXZ?;czlDi|>_c+d6_mfJi&W^kCj1PV>e% zPp33&-OK85Q7WeY+++u@bb-5`tE0M>I`C9|<~+$W&#yyH&eL6~aJ%_@mH#RE6Yi-w c|7$K~=bD?%zopr0BGBVVE_OC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/dust/mithril_dust.png b/src/main/resources/assets/sextiarysector/textures/items/dust/mithril_dust.png new file mode 100644 index 0000000000000000000000000000000000000000..f78fe68728e376f95e3b4565ef8f679067ae5131 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqj|i(7FF)^9QJ_$Vr;B5V#p$~f4)PvW;Bl?r#hP=R zWnL?%#Nq52iaf~^CNE70nDs5>tE}$ccEb<%1uiNq`nWZxMrP-!RaP!fDxYXcD}B=0 zG+Fn+neX>MZd#=${l={FXFxVDgFteO+{?ZCn>7Qn?{>LyJp9X;>)SkY`ON(XH+C~P qcxBF-4)lrT^T%cnoZH0f+lAv79V$pa#&{3tCI(MeKbLh*2~7a7r&<>P literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/energy_reactor.png b/src/main/resources/assets/sextiarysector/textures/items/energy_reactor.png new file mode 100644 index 0000000000000000000000000000000000000000..5c175c293fdc5178f8b2a8bff8d61fdc3cbcb476 GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqj|i)Q30u&w*+8MKo-U3d7N?g6J90G}2%I_Apl~C- z!gPjy#oO?zH_~11^~x1rqF&r=7il?E5wtB)c&ZMI)1;Ym6*sduES>U^e~xM3vG32_ z9huU3f352%E4kJ%`9fM_v;6t>9M8U6b241LBDrkg5tAtyuXq@yY*|u1tNceY-;eKC zU(UF{Cu?H3uHIiJ_WSSF*X}>Fc!kgEBV1Y$&nBAvT=*`qNqIrW!uMSnLQ5B@vUmP4 onA^E&zUZgrA72>+zOq<B+3qXN4YOm9p)ui0V;6xb4C5%^^N-Jg9)9Lk2XE--FV?9of(`ET4LDbW;T z!P(~Q^0Qpz-{$K)JUTo)0%u=;t2v&c*su9(+k)ZNH_TlGcz+EZe!*!DJ=_sV+~Q$=PmHnt8mHa504j`BZJ^?%!bNVE0Dq$IQ)Z))XpdUUWj#97Y9`D)8U wri?j@q?+7?&rNxebnL_bFVdQ&MBb@0LDvcasU7T literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/energy_ring.png b/src/main/resources/assets/sextiarysector/textures/items/object_reactor.png similarity index 88% rename from src/main/resources/assets/sextiarysector/textures/items/energy_ring.png rename to src/main/resources/assets/sextiarysector/textures/items/object_reactor.png index 0df46d7f447f208be849cd39c4fac1c4ff38a59a..4a18e242278c29e501de3b872c0f55b67313c70c 100644 GIT binary patch delta 18 acmZ3%w1R0uFoy`MA=f>PYlRb|&jJ88S_YZ` delta 18 acmZ3%w1R0uFb6M(uIB!ag%T5^&jJ89e+HcZ diff --git a/src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring.png b/src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring.png new file mode 100644 index 0000000000000000000000000000000000000000..27559aca030519b02bed10c9724ac733ad350ea4 GIT binary patch literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqj|iKn6?gnjC7{q|PZ!4!i_>R=4fzfk@Ysac^e7rV zV$JCgeAu~H|HZ5G5tZ!DDo5spx2z1Et)?0zp0|0??jLWAc@H<(zStnVo0V@XyRrA@ zSumdKI;Vst06Xq&!~g&Q literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/ring/slot_ring.png b/src/main/resources/assets/sextiarysector/textures/items/ring/slot_ring.png index ba07dfaa902c8707b55dc3f31905d21750d9cf85..9e4e07043b2f88e132d0e415596bf3bd29b1bcc8 100644 GIT binary patch delta 19 bcmaFG_=<5t5GRian;7T(Mcv;gM)v~%LgWWU delta 19 acmaFG_=<5t5GS`NuaLUpMe!9Aqx%6q9R^eY From 61622c289102d4d7e3d021337d7ede3b109376c3 Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 23 Dec 2014 13:30:38 +0900 Subject: [PATCH 47/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20GF=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=82=BF=E3=82=AF=E3=83=88=E3=83=AC=E3=83=B3=E3=82=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GFコンタクトレンズを追加 --- .../java/shift/sextiarysector/SSItems.java | 7 +++ .../api/machine/item/IGearForceGridItem.java | 5 ++ .../sextiarysector/block/BlockLargeOre.java | 9 +++- .../sextiarysector/block/BlockMotor.java | 1 + .../event/ClientEventHandler.java | 28 +++++++--- .../item/ItemGFContactLenses.java | 28 ++++++++++ .../tileentity/TileEntityElectricMotor.java | 49 +++++++++++++++++- .../tileentity/TileEntityFan.java | 13 ++++- .../tileentity/TileEntityGFTank.java | 13 ++++- .../tileentity/TileEntityGearBox.java | 13 ++++- .../tileentity/TileEntityGearShaft.java | 14 ++++- .../tileentity/TileEntityMonitor.java | 13 ++++- .../tileentity/TileEntityShaft.java | 13 ++++- .../tileentity/TileEntitySimpleMachine.java | 15 +++++- .../assets/sextiarysector/lang/en_US.lang | 1 + .../textures/items/face/gf_contact_lenses.png | Bin 0 -> 394 bytes 16 files changed, 206 insertions(+), 16 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/api/machine/item/IGearForceGridItem.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/face/gf_contact_lenses.png diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 9ddafee..0d7d895 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -7,6 +7,7 @@ import shift.sextiarysector.item.ItemCalendar; import shift.sextiarysector.item.ItemCrop; import shift.sextiarysector.item.ItemFoodDrink; +import shift.sextiarysector.item.ItemGFContactLenses; import shift.sextiarysector.item.ItemGearStorage; import shift.sextiarysector.item.ItemGuiUnit; import shift.sextiarysector.item.ItemHammer; @@ -137,6 +138,8 @@ public class SSItems { //装備 public static Item shiftHat; + public static Item gfContactLenses; + public static void initItems(){ unit = new Item().setUnlocalizedName("ss.unit").setTextureName("sextiarysector:machine/unit").setCreativeTab(SextiarySectorAPI.TabSSMachine); @@ -347,9 +350,13 @@ public static void initItems(){ GameRegistry.registerItem(beefSmoked, "BeefSmoked"); + //装備 shiftHat = new ItemShiftHat().setUnlocalizedName("ss.shift_hat").setTextureName("sextiarysector:shift_hat"); GameRegistry.registerItem(shiftHat, "ShiftHat"); + gfContactLenses = new ItemGFContactLenses().setUnlocalizedName("ss.gf_contact_lenses").setTextureName("sextiarysector:face/gf_contact_lenses"); + GameRegistry.registerItem(gfContactLenses, "GFContactLenses"); + } } diff --git a/src/main/java/shift/sextiarysector/api/machine/item/IGearForceGridItem.java b/src/main/java/shift/sextiarysector/api/machine/item/IGearForceGridItem.java new file mode 100644 index 0000000..6b97c14 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/machine/item/IGearForceGridItem.java @@ -0,0 +1,5 @@ +package shift.sextiarysector.api.machine.item; + +public interface IGearForceGridItem { + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockLargeOre.java b/src/main/java/shift/sextiarysector/block/BlockLargeOre.java index 78a2ea8..6b2d1c3 100644 --- a/src/main/java/shift/sextiarysector/block/BlockLargeOre.java +++ b/src/main/java/shift/sextiarysector/block/BlockLargeOre.java @@ -5,9 +5,11 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import shift.sextiarysector.SSBlocks; import shift.sextiarysector.api.SextiarySectorAPI; public class BlockLargeOre extends Block{ @@ -42,7 +44,12 @@ public ArrayList getDrops(World world, int x, int y, int z, int metad if (item != null) { ret.add(new ItemStack(item, 1, damageDropped(metadata))); - ret.add(new ItemStack(oreBlock, 1, damageDropped(metadata))); + if(world.getBlock(x, y, z)==SSBlocks.coalLargeOre){ + ret.add(new ItemStack(Items.coal, 2)); + }else{ + ret.add(new ItemStack(oreBlock, 1, damageDropped(metadata))); + } + } } return ret; diff --git a/src/main/java/shift/sextiarysector/block/BlockMotor.java b/src/main/java/shift/sextiarysector/block/BlockMotor.java index 19b6897..cb19e9f 100644 --- a/src/main/java/shift/sextiarysector/block/BlockMotor.java +++ b/src/main/java/shift/sextiarysector/block/BlockMotor.java @@ -12,6 +12,7 @@ public abstract class BlockMotor extends BlockDirection{ public BlockMotor() { super(Material.iron); + this.setHardness(0.8F); } @Override diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 1d5ff5b..3811606 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -30,10 +30,12 @@ import shift.sextiarysector.api.agriculture.AgricultureAPI; import shift.sextiarysector.api.agriculture.IFertilizer; import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.machine.item.IGearForceGridItem; import shift.sextiarysector.gui.GuiStatsNext; import shift.sextiarysector.item.TextureSeason; import shift.sextiarysector.module.FertilizerManager; import shift.sextiarysector.module.SeasonManager; +import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.player.EquipmentType; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -213,10 +215,14 @@ public void onDrawBlockHighlight(DrawBlockHighlightEvent event) { // return; // } - // /*if(!(Item.itemsList[itemstack.itemID] instanceof ItemMachineHammer)) - //{ - // return; - //} + if(EntityPlayerManager.getCustomPlayerData(player).getEquipmentStats().inventory.getStackInSlot(EquipmentType.Face.getSlot()[0]) == null){ + return; + } + + if(!(EntityPlayerManager.getCustomPlayerData(player).getEquipmentStats().inventory.getStackInSlot(EquipmentType.Face.getSlot()[0]).getItem() instanceof IGearForceGridItem)) + { + return; + } if(target.typeOfHit != MovingObjectType.BLOCK) { @@ -252,17 +258,21 @@ public void onDrawBlockHighlight(DrawBlockHighlightEvent event) { float f1 = 0.002F; for(ForgeDirection d:ForgeDirection.VALID_DIRECTIONS){ - if(tileEntity.canOut(d)){ - this.drawOutFromDirection((int)x, (int)y, (int)z, d0, d1, d2, d); + if(tileEntity.canIn(d)){ + this.drawInFromDirection((int)x, (int)y, (int)z, d0, d1, d2, d); } } + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + for(ForgeDirection d:ForgeDirection.VALID_DIRECTIONS){ - if(tileEntity.canIn(d)){ + if(tileEntity.canOut(d)){ this.drawOutFromDirection((int)x, (int)y, (int)z, d0, d1, d2, d); } } + + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); GL11.glDepthMask(true); @@ -284,6 +294,8 @@ private void drawOutFromDirection(int x, int y, int z, double d0, double d1, dou axisAlignedBB = axisAlignedBB.expand(f1, f1, f1).getOffsetBoundingBox(-d0, -d1, -d2); this.drawOutlinedBoundingBox(axisAlignedBB); + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + } private void drawInFromDirection(int x, int y, int z, double d0, double d1, double d2, ForgeDirection d){ @@ -298,6 +310,8 @@ private void drawInFromDirection(int x, int y, int z, double d0, double d1, doub axisAlignedBB2 = axisAlignedBB2.expand(f1, f1, f1).getOffsetBoundingBox(-d0, -d1, -d2); this.drawOutlinedBoundingBox(axisAlignedBB2); + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + } diff --git a/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java b/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java new file mode 100644 index 0000000..64c487d --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java @@ -0,0 +1,28 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.api.IEquipment; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.api.machine.item.IGearForceGridItem; +import shift.sextiarysector.player.EquipmentType; + +public class ItemGFContactLenses extends Item implements IEquipment, IGearForceGridItem{ + + public ItemGFContactLenses(){ + this.setCreativeTab(SextiarySectorAPI.TabSSPlayer); + } + + + @Override + public boolean canTakeStack(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + return equipment.ordinal() == EquipmentType.Face.ordinal(); + } + + @Override + public boolean isItemValid(EquipmentType equipment, ItemStack stack) { + return equipment.ordinal() == EquipmentType.Face.ordinal(); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java index e473c4b..be38d02 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java @@ -5,8 +5,9 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityElectricMotor extends TileEntityDirection { +public class TileEntityElectricMotor extends TileEntityDirection implements IEnergyHandler, IGearForceGrid{ private BasicSink ic2EnergySink = new BasicSink(this, 2000, 1){ @@ -107,4 +108,50 @@ public float getRotateStep() { } + @Override + public int addEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + return 0; + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + return 0; + } + + @Override + public boolean canInterface(ForgeDirection from) { + return this.direction.getOpposite().ordinal() == from.ordinal(); + } + + @Override + public int getPowerStored(ForgeDirection from) { + return 0; + } + + @Override + public long getSpeedStored(ForgeDirection from) { + return 0; + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + return 0; + } + + @Override + public long getMaxSpeedStored(ForgeDirection from) { + return 0; + } + + @Override + public boolean canIn(ForgeDirection from) { + return false; + } + + @Override + public boolean canOut(ForgeDirection from) { + return this.direction.getOpposite().ordinal() == from.ordinal(); + } + + } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java index 4ec4fcc..1703700 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java @@ -11,8 +11,9 @@ import shift.sextiarysector.SSBlocks; import shift.sextiarysector.api.machine.energy.EnergyStorage; import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityFan extends TileEntityDirection implements IEnergyHandler{ +public class TileEntityFan extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ public float rotateStep = 360; private int speed = 0; @@ -187,4 +188,14 @@ public long getMaxSpeedStored(ForgeDirection from) { return storage.getMaxSpeedStored(); } + @Override + public boolean canIn(ForgeDirection from) { + return this.getDirection().getOpposite().ordinal() == from.ordinal(); + } + + @Override + public boolean canOut(ForgeDirection from) { + return false; + } + } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java index 568ced6..f420c2e 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java @@ -8,10 +8,11 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; import shift.sextiarysector.api.machine.item.GearForceItem; import shift.sextiarysector.container.ItemBox; -public class TileEntityGFTank extends TileEntityDirection implements ISidedInventory, IEnergyHandler { +public class TileEntityGFTank extends TileEntityDirection implements ISidedInventory, IEnergyHandler ,IGearForceGrid{ protected static final int[] slots_top = new int[] { 0 }; protected static final int[] slots_bottom = new int[] { 1 }; @@ -293,4 +294,14 @@ public void writeToNBT(NBTTagCompound nbt) { nbt.setInteger("inSpeed", this.inSpeed); } + @Override + public boolean canIn(ForgeDirection from) { + return this.getDirection().ordinal() != from.ordinal(); + } + + @Override + public boolean canOut(ForgeDirection from) { + return this.getDirection().ordinal() == from.ordinal(); + } + } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java index 3c2ee10..3b6cef5 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java @@ -5,8 +5,9 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityGearBox extends TileEntityDirection implements IEnergyHandler { +public class TileEntityGearBox extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ public EnergyStorage storage = new EnergyStorage("Base", 1, 960, 160); @@ -153,4 +154,14 @@ public long getMaxSpeedStored(ForgeDirection from) { } + @Override + public boolean canIn(ForgeDirection from) { + return this.getDirection().ordinal() == from.ordinal(); + } + + @Override + public boolean canOut(ForgeDirection from) { + return this.getDirection().ordinal() != from.ordinal(); + } + } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java index e77f6da..14e78cd 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java @@ -5,8 +5,9 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityGearShaft extends TileEntityDirection implements IEnergyHandler { +public class TileEntityGearShaft extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ public float rotateUpStep = 0; public float rotateDownStep = 0; @@ -131,4 +132,15 @@ public int getMaxPowerStored(ForgeDirection from) { public long getMaxSpeedStored(ForgeDirection from) { return storage.getMaxSpeedStored(); } + + + @Override + public boolean canIn(ForgeDirection from) { + return this.direction.getOpposite().ordinal() == from.ordinal(); + } + + @Override + public boolean canOut(ForgeDirection from) { + return this.direction.ordinal() == from.ordinal(); + } } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java index 89140ac..70414a6 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java @@ -4,9 +4,10 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; import shift.sextiarysector.block.BlockMonitor.MonitorType; -public class TileEntityMonitor extends TileEntityDirection implements IEnergyHandler{ +public class TileEntityMonitor extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ public EnergyStorage storage = new EnergyStorage("Base", 1, 10000); public MonitorType type = MonitorType.unknown; @@ -106,4 +107,14 @@ public long getMaxSpeedStored(ForgeDirection from) { return this.storage.getMaxSpeedStored(); } + @Override + public boolean canIn(ForgeDirection from) { + return from.ordinal() == ForgeDirection.DOWN.ordinal(); + } + + @Override + public boolean canOut(ForgeDirection from) { + return false; + } + } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java index aed0357..81bb8df 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java @@ -5,8 +5,9 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityShaft extends TileEntityDirection implements IEnergyHandler { +public class TileEntityShaft extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ public float rotateStep = 360; private EnergyStorage storage = new EnergyStorage("Base", 1, 320, 160); @@ -268,4 +269,14 @@ public long getMaxSpeedStored(ForgeDirection from) { } + @Override + public boolean canIn(ForgeDirection from) { + return this.getInDirection().ordinal() == from.ordinal(); + } + + @Override + public boolean canOut(ForgeDirection from) { + return this.getOutDirection().ordinal() == from.ordinal(); + } + } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java index edbc37e..12eb379 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java @@ -7,11 +7,12 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; import shift.sextiarysector.api.machine.item.GearForceItem; import shift.sextiarysector.block.BlockSimpleMachine; import shift.sextiarysector.container.ItemBox; -public class TileEntitySimpleMachine extends TileEntityDirection implements ISidedInventory, IEnergyHandler { +public class TileEntitySimpleMachine extends TileEntityDirection implements ISidedInventory, IEnergyHandler ,IGearForceGrid{ protected static final int[] slots_top = new int[] { 0 }; protected static final int[] slots_bottom = new int[] { 2, 1 }; @@ -387,4 +388,16 @@ public void writeToNBT(NBTTagCompound nbt) { nbt.setInteger("inSpeed", this.inSpeed); } + + @Override + public boolean canIn(ForgeDirection from) { + return true; + } + + + @Override + public boolean canOut(ForgeDirection from) { + return false; + } + } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index ca79c80..e759e21 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -197,6 +197,7 @@ item.ss.beef_smoked.name=Smoked Beef item.ss.shift_hat.name=Shift's Hat +item.ss.gf_contact_lenses.name=GF Contact Lenses #Fluid fluid.ss.takumi_tea=TAKUMI Tea diff --git a/src/main/resources/assets/sextiarysector/textures/items/face/gf_contact_lenses.png b/src/main/resources/assets/sextiarysector/textures/items/face/gf_contact_lenses.png new file mode 100644 index 0000000000000000000000000000000000000000..4a20e8b79acb2c3008719ee6b72c4324e6c65e7a GIT binary patch literal 394 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)41nh72Zs`;9AsBAf*t zk;M!Q+`=Ht$S`Y;1W=H@#M9T6{T`1vGn3A{vZoIi7#PJpT^vI!PA4ZwWE|-5c8Xfh z(E9(&C6+a>A__96ThwtBymxzm*-+Y@Pb1xH{;>Ab*FYo@j z;l|Yy6C!_gHUfd*O#vQp2UFuV^(%`z*2i2pVX$}h`+5%(K7EhZq6Q~k9XYHzFXqjE z`RK~#kAIi%*O2fv9KPv0}KUH%RPgBhqi{wVm=|`Tg zub1qb_y5R=0|yR#crWkt2k4X?ybY~o6;8I!sa-lTHrh^IjACj&XL5F2Zrl>bc=!}+ z@BfcW`u{6lJgTv=;Zf86{re9rdS!3MGxhL%Ayt!LkhKyOM|A@ZKY7YI<%0T*DT!CB{0iWLXX{)EGQn{an^LB{Ts5QedK> literal 0 HcmV?d00001 From 60f17165034cdd28b1a480d1bbe363e2c62ea69b Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 23 Dec 2014 13:37:09 +0900 Subject: [PATCH 48/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20GF=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=82=BF=E3=82=AF=E3=83=88=E3=83=AC=E3=83=B3=E3=82=BA?= =?UTF-8?q?=E3=82=92Shop=E3=81=AE=E5=95=86=E5=93=81=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/shift/sextiarysector/SSShops.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index e26b09a..e193461 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -32,6 +32,7 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,0),500)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,1),500)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.gfContactLenses,1),300)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.craftUnit,1),50000)); if(i==0){ From 0ea85931be6f0017259d07757d2959999797d350 Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 23 Dec 2014 13:40:26 +0900 Subject: [PATCH 49/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E8=A1=A8=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- src/main/java/shift/sextiarysector/SextiarySector.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 51f68bd..6e7fa1f 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.0.9.a-${project.minecraft.version}" +version = "2.1.0.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 859cc39..6640428 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -32,7 +32,7 @@ public class SextiarySector { //public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.0.9"; + public static final String VERSION = "2.1.0"; @Mod.Instance("SextiarySector") public static SextiarySector instance; From f608722602fafb0d5f7c5045951fbc63160b57e2 Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 23 Dec 2014 14:21:17 +0900 Subject: [PATCH 50/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E7=9F=B3?= =?UTF-8?q?=E7=82=AD=E3=81=AE=E3=83=89=E3=83=AD=E3=83=83=E3=83=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- src/main/java/shift/sextiarysector/block/BlockLargeOre.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 6e7fa1f..ac59a9d 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.0.a-${project.minecraft.version}" +version = "2.1.0.b-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/block/BlockLargeOre.java b/src/main/java/shift/sextiarysector/block/BlockLargeOre.java index 6b2d1c3..12bceeb 100644 --- a/src/main/java/shift/sextiarysector/block/BlockLargeOre.java +++ b/src/main/java/shift/sextiarysector/block/BlockLargeOre.java @@ -5,11 +5,11 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import shift.sextiarysector.SSBlocks; import shift.sextiarysector.api.SextiarySectorAPI; public class BlockLargeOre extends Block{ @@ -44,7 +44,7 @@ public ArrayList getDrops(World world, int x, int y, int z, int metad if (item != null) { ret.add(new ItemStack(item, 1, damageDropped(metadata))); - if(world.getBlock(x, y, z)==SSBlocks.coalLargeOre){ + if(oreBlock==Blocks.coal_ore){ ret.add(new ItemStack(Items.coal, 2)); }else{ ret.add(new ItemStack(oreBlock, 1, damageDropped(metadata))); From 1e80690164ec1ed08c185eab62ae119ebc456a5f Mon Sep 17 00:00:00 2001 From: Yves Date: Tue, 23 Dec 2014 11:10:29 +0100 Subject: [PATCH 51/96] Create fr_FR.lang --- .../assets/sextiarysector/lang/fr_FR.lang | 287 ++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 src/main/resources/assets/sextiarysector/lang/fr_FR.lang diff --git a/src/main/resources/assets/sextiarysector/lang/fr_FR.lang b/src/main/resources/assets/sextiarysector/lang/fr_FR.lang new file mode 100644 index 0000000..485977c --- /dev/null +++ b/src/main/resources/assets/sextiarysector/lang/fr_FR.lang @@ -0,0 +1,287 @@ +#French fr_FR + +#Block +tile.ss.large_furnace.name=Grand four +tile.ss.fluid_furnace.name=Four à fluide + +tile.ss.food_smokers.name=Fumoire + +tile.ss.magic_furnace.name=Four magique + +tile.ss.wood_grate.name=Grille en bois + +tile.ss.wood_plate.name=Assiette en bois + +tile.ss.hole.name=Trou +tile.ss.farmland.name=Terre agricole + +tile.ss.bottle.name=Bouteille de fluide +tile.ss.fluid_crafter.name=Etabli de fluide + +tile.ss.wood_hopper.name=Trémie en bois + +tile.ss.chunk_loader.name=Chargeur de temps + + +tile.ss.small_windmill.name=Petite éolienne +tile.ss.windmill.name=Éolienne +tile.ss.small_waterwheel.name=Petite noria + +tile.ss.wood_shaft.name=Puits en bois +tile.ss.stone_shaft.name=Puits en pierre +tile.ss.steel_shaft.name=Puits en acier + +tile.ss.wood_gear_box.name=Boîte de mécanisme en bois +tile.ss.stone_gear_box.name=Boîte de mécanisme en pierre +tile.ss.steel_gear_box.name=Boîte de mécanisme en acier + +tile.ss.wood_gf_tank.name=Réservoir GF en bois +tile.ss.stone_gf_tank.name=Réservoir GF en pierre +tile.ss.steel_gf_tank.name=Réservoir GF en acier + +tile.ss.wood_stone_gear_shaft.name=Puits mécanique en pierre et en bois + +tile.ss.millstone.name=Meule +tile.ss.loom.name=Métier à tisser +tile.ss.sawmill.name=Scierie +tile.ss.pulverizer.name=Pulvériseur + +tile.ss.fan.name=Ventilateur + +tile.ss.blue_stone.name=Minerai de pierre bleue +tile.ss.yellow_stone.name=Minerai de pierre jaune + +tile.ss.mithril_ore.name=Minerai de mithril +tile.ss.orichalcum_ore.name=Minerai d'orichalcum + +tile.ss.coal_large_ore.name=Grand minerai de charbon +tile.ss.iron_large_ore.name=Grand minerai de fer +tile.ss.gold_large_ore.name=Grand minerai d'or + +tile.ss.creeper_chest.name=Coffre de marchand de pousse +tile.ss.shipping_box.name=Boîte d'expédition + +tile.ss.turnip.name=Graine de navet +tile.ss.cucumber.name=Graine de concombre + +tile.ss.onion.name=Graine d'oignon +tile.ss.tomato.name=Graine de tomate +tile.ss.corn.name=Graine de maïs + +tile.ss.eggplant.name=Graine d'aubergine +tile.ss.sweet_potato.name=Graine de patate douce +tile.ss.green_pepper.name=Graine de poivron vert + +tile.ss.radish.name=Graine de radis + +tile.ss.monitor.name=Moniteur +monitor.type=Type +monitor.creeper=Magasin de pousse simple +monitor.robot=Magasin du robot bleu + +tile.ss.electric_motor.name=Moteur électrique +tile.ss.tofu_motor.name=Moteur de tofu + +#Item +item.ss.dust_waterlily.name=Poussière de nénuphar + +item.ss.stone_dust.name=Poussière de pierre + +item.ss.dust_blue_stone.name=Poussière de pierre bleue +item.ss.dust_yellow_stone.name=Poussière de pierre jaune + +item.ss.coal_dust.name=Poussière de charbon +item.ss.iron_dust.name=Poussière de fer +item.ss.gold_dust.name=Poussière d'or +item.ss.diamond_dust.name=Poussière de diamant + +item.ss.mithril_dust.name=Poussière de mithril + + +item.ss.steel_ingot.name=Lingot d'acier +item.ss.brass_ingot.name=Lingot de laiton + +item.ss.bluestone_ingot.name=Lingot de pierre bleue +item.ss.yellowstone_ingot.name=Lingot de pierre jaune + +item.ss.mithril_ingot.name=Lingot de mithril +item.ss.orichalcum_gem.name=Orichalcum + +item.ss.ninja_ingot.name=Lingot de ninja + +item.ss.blue_stone_slime_ball.name=Boule de pituite en pierre bleue + + +item.ss.energy_reactor.name=Réacteur d'énergie +item.ss.object_reactor.name=Réacteur d'objet + + +item.ss.craft_unit.name=Unité artisanale + +item.ss.iron_ring.name=Anneau de fer +item.ss.creeper_ring.name=Anneau de magasin de pousse + + +item.ss.magic_dust.name=Poussière magique + +item.ss.unit.name=Unité + +item.ss.wood_gear.name=Mécanisme en bois +item.ss.stone_gear.name=Mécanisme en pierre +item.ss.steel_gear.name=Mécanisme en acier + +item.ss.wood_unit_gear.name=Mécanisme d'unité en bois +item.ss.stone_unit_gear.name=Mécanisme d'unité en pierre +item.ss.steel_unit_gear.name=Mécanisme d'unité en acier + +item.ss.hammer.name=Marteau +item.ss.calendar.name=Calendrier + +item.ss.calendar.name=Calendrier +item.ss.season_stone.name=Pierre de saison +item.ss.season_stone_spring.name=Pierre de saison -Printemps- +item.ss.season_stone_summer.name=Pierre de saison -Été- +item.ss.season_stone_autumn.name=Pierre de saison -Automne- +item.ss.season_stone_winter.name=Pierre de saison -Hiver- + +item.ss.wood_gf_storage.name=Stockage GF en bois +item.ss.stone_gf_storage.name=Stockage GF en pierre +item.ss.steel_gf_storage.name=Stockage GF en acier + +item.ss.string_bobbin.name=Bobine de fils +item.ss.cloth.name=Tissu +item.ss.canvas.name=Toile + +item.ss.drinking_water_small_bottle.name=Petite bouteille d'eau potable + + +item.ss.wood_scoop.name=Écope en bois +item.ss.stone_scoop.name=Écope en pierre +item.ss.iron_scoop.name=Écope en fer +item.ss.gold_scoop.name=Écope en or +item.ss.diamond_scoop.name=Écope en diamant + +item.ss.wood_knife.name=Couteau en bois +item.ss.stone_knife.name=Couteau en pierre +item.ss.iron_knife.name=Couteau en fer +item.ss.gold_knife.name=Couteau en or +item.ss.diamond_knife.name=Couteau en diamant + +item.ss.wood_watering_can.name=Arrosoir en bois + +item.ss.crop.big=Gros + +item.ss.turnip.name=Navet +item.ss.cucumber.name=Concombre + +item.ss.iron_turnip.name=Navet de fer + +item.ss.onion.name=Oignon +item.ss.tomato.name=Tomate +item.ss.corn.name=Maïs + +item.ss.golden_corn.name=Maïs doré + +item.ss.eggplant.name=Aubergine +item.ss.sweet_potato.name=patate douce +item.ss.green_pepper.name=Poivron vert + +item.ss.radish.name=Radis + + +item.ss.salt.name=Sel + +item.ss.chicken_smoked.name=Poulet fumé +item.ss.porkchop_smoked.name=Cotelette de porc fumé +item.ss.beef_smoked.name=Boeuf fumé + + +item.ss.shift_hat.name=Chapeau d'élévation +item.ss.gf_contact_lenses.name=Lentilles de contact GF + +#Fluid +fluid.ss.takumi_tea=Thé TAKUMI +fluid.ss.drinking_water=Eau potable + +fluid.ss.steam=Vapeur + +#GUI +container.large_furnace=Grand four +container.sub.inventory=Tampon + +gui.ss.fluid_furnace=Four à fluide +gui.ss.food_smokers=Fumoir +gui.ss.magic_furnace=Four magique + +gui.ss.millstone=Meule +gui.ss.loom=Métier à tisser +gui.ss.sawmill=Scirie +gui.ss.pulverizer=Pulvériseur + +gui.ss.gf_tank_1=Réservoir GF en bois +gui.ss.gf_tank_2=Réservoir GF en pierre +gui.ss.gf_tank_3=Réservoir GF d'acier + +shop.ss.creeper=Magasin de pousse simple +shop.ss.robot=Magasin du robot bleu + +#ToolTip +tooltip.season.pm=PM +tooltip.season.am=AM + +tooltip.season=Saison +tooltip.season.seed=Saison +tooltip.season.spring=Printemps +tooltip.season.summer=Été +tooltip.season.autumn=Automne +tooltip.season.winter=Hiver + +#Tab +itemGroup.ss.core=SextiarySector -Coeur- +itemGroup.ss.fluid=SextiarySector -Fluide- +itemGroup.ss.machine=SextiarySector -Machine- +itemGroup.ss.player=SextiarySector -Joueur- +itemGroup.ss.agriculture=SextiarySector -Agriculture- +itemGroup.ss.mining=SextiarySector -Minage- +itemGroup.ss.cooking=SextiarySector -Cuisine- +itemGroup.ss.economy=SextiarySector -Économie- +itemGroup.ss.magic=SextiarySector -Magie- + +#Player Tab +player.tab.vanilla=Vanilla +player.tab.equipment=Équipement +player.tab.item.ss.craft_unit=Artisanat + +player.tab.item.ss.creeper_ring=Magasin de pousse + +#Achievement +stat.sell=Vendre + +achievement.ss.economy=SextiarySector -Économie- + +achievement.creeper_firework=Creeper Monger +achievement.creeper_firework.desc=The attempt to communicate with fireworks ! + +achievement.creeper_chest=Coffre de pousse +achievement.creeper_chest.desc=Santa Creeper ? + +achievement.shipping=Boîte d'expédition +achievement.shipping.desc=Trying to shipment + +#NEI +nei.recipe=Recette +nei.ss.furnace.shaped=Four formé +nei.ss.furnace.shapeless=Four sans forme + +nei.ss.fluid_furnace=Recette du four à fluide +nei.ss.food_smokers=Recette du fumoir + +nei.ss.magic_furnace=Recette du four magique +nei.ss.magic_fuel=Carburant magique + +nei.ss.millstone=Recette de la meule +nei.ss.loom=Recette du métier à tisser +nei.ss.sawmill=Recette de la scierie +nei.ss.pulverizer=Recette du pulvériseur + +nei.ss.fertilizer=Recette de mutation From 93e05a4eb41aea60abd525d48332a348f76548a4 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 27 Dec 2014 23:05:26 +0900 Subject: [PATCH 52/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E6=96=99?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・スープを追加 ・水田を追加 ・米を追加 ・海苔を追加 ・チェストボートを追加 --- build.gradle | 2 +- .../java/shift/sextiarysector/SSBlocks.java | 56 ++- .../shift/sextiarysector/SSCreativeTabs.java | 40 ++ .../java/shift/sextiarysector/SSEntitys.java | 14 + .../shift/sextiarysector/SSGuiHandler.java | 7 + .../java/shift/sextiarysector/SSItems.java | 101 ++++- .../shift/sextiarysector/SSOreDictionary.java | 59 ++- .../java/shift/sextiarysector/SSShops.java | 38 +- .../shift/sextiarysector/SextiarySector.java | 3 + .../sextiarysector/api/SextiarySectorAPI.java | 2 + .../api/agriculture/FarmlandType.java | 8 + .../api/agriculture/IFarmland.java | 11 + .../api/agriculture/IFertilizerManager.java | 2 +- .../sextiarysector/block/BlcokPaddy.java | 140 +++++++ .../block/BlockCraftFurnace.java | 356 ++++++++++++++++ .../shift/sextiarysector/block/BlockHole.java | 5 +- .../sextiarysector/block/BlockSSCrop.java | 54 ++- .../sextiarysector/block/BlockSSFarmland.java | 38 +- .../sextiarysector/block/BlockSandpit.java | 188 +++++++++ .../sextiarysector/block/BlockStoneFrame.java | 83 ++++ .../container/ContainerCraftFurnace.java | 186 +++++++++ .../container/ContainerMagicFurnace.java | 3 +- .../sextiarysector/entity/EntityMineboat.java | 173 ++++++++ .../entity/EntityMineboatChest.java | 52 +++ .../entity/EntityMineboatContainer.java | 228 +++++++++++ .../event/ClientEventHandler.java | 2 +- .../event/CommonEventHandler.java | 22 +- .../event/PlayerStatusEventHandler.java | 6 +- .../sextiarysector/gui/GuiCraftFurnace.java | 93 +++++ .../item/ItemBlockFluidCrafter.java | 1 + .../shift/sextiarysector/item/ItemCrop.java | 12 +- .../sextiarysector/item/ItemFoodCrop.java | 48 +++ .../sextiarysector/item/ItemMineboat.java | 114 ++++++ .../shift/sextiarysector/item/ItemSoup.java | 14 + .../module/FertilizerManager.java | 47 ++- .../module/ModuleAgriculture.java | 12 +- .../sextiarysector/module/ModuleSandpit.java | 53 +++ .../nei/FertilizerRecipeHandler.java | 2 +- .../sextiarysector/proxy/ClientProxy.java | 12 + .../sextiarysector/proxy/CommonProxy.java | 1 + .../recipe/RecipeSimpleFluid.java | 4 +- .../recipe/RecipeSimpleMachine.java | 2 +- .../sextiarysector/recipe/RecipesCore.java | 7 + .../sextiarysector/recipe/RecipesFurnace.java | 5 +- .../recipe/RecipesFurnaceCraft.java | 49 ++- .../recipe/RecipesMagicFuel.java | 2 +- .../recipe/RecipesMagicFurnace.java | 4 + .../recipe/RecipesMillstone.java | 1 + .../renderer/block/RendererCraftFurnace.java | 61 +++ .../renderer/block/RendererFarmland.java | 2 +- .../renderer/block/RendererHole.java | 13 +- .../renderer/block/RendererPaddy.java | 85 ++++ .../renderer/entity/RenderMineboat.java | 90 ++++ .../renderer/model/ModelCraftFurnace.java | 34 ++ .../renderer/model/ModelMineboat.java | 55 +++ .../tileentity/TileEntityCraftFurnace.java | 384 ++++++++++++++++++ .../tileentity/TileEntityFarmland.java | 15 +- .../TileEntityFluidMachineBase.java | 53 ++- .../tileentity/TileEntityMagicFurnace.java | 244 +---------- .../tileentity/TileEntityPaddy.java | 114 ++++++ .../tileentity/TileEntitySSCrop.java | 51 +-- .../tileentity/TileEntitySimpleFurnace.java | 298 ++++++++++++++ .../tileentity/TileEntityStoneFrame.java | 82 ++++ .../assets/sextiarysector/lang/en_US.lang | 30 ++ .../textures/blocks/crop/rice_stage_0.png | Bin 0 -> 257 bytes .../textures/blocks/crop/rice_stage_1.png | Bin 0 -> 454 bytes .../textures/blocks/crop/rice_stage_2.png | Bin 0 -> 534 bytes .../textures/blocks/crop/rice_stage_3.png | Bin 0 -> 621 bytes .../textures/guis/craft_furnace.png | Bin 0 -> 1593 bytes .../items/food/condiment/curry_powder.png | Bin 0 -> 321 bytes .../textures/items/food/fish/laver.png | Bin 0 -> 403 bytes .../items/food/fish/laver_roasted.png | Bin 0 -> 388 bytes .../textures/items/food/grain/rice.png | Bin 0 -> 283 bytes .../textures/items/food/grain/white_rice.png | Bin 0 -> 251 bytes .../items/food/{ => meat}/beef_smoked.png | Bin .../items/food/{ => meat}/chicken_smoked.png | Bin .../items/food/{ => meat}/porkchop_smoked.png | Bin .../textures/items/food/rice/curry_rice.png | Bin 0 -> 367 bytes .../textures/items/food/rice/rice_ball.png | Bin 0 -> 468 bytes .../textures/items/food/rice/tuna_sushi.png | Bin 0 -> 477 bytes .../textures/items/food/soup/carrot_soup.png | Bin 0 -> 339 bytes .../textures/items/food/soup/corn_soup.png | Bin 0 -> 375 bytes .../textures/items/food/soup/egg_soup.png | Bin 0 -> 308 bytes .../textures/items/food/soup/ender_soup.png | Bin 0 -> 385 bytes .../textures/items/food/soup/onion_soup.png | Bin 0 -> 300 bytes .../textures/items/food/soup/tomato_soup.png | Bin 0 -> 306 bytes .../items/{crop => food/vegetable}/corn.png | Bin .../{crop => food/vegetable}/cucumber.png | Bin .../{crop => food/vegetable}/eggplant.png | Bin .../{crop => food/vegetable}/golden_corn.png | Bin .../{crop => food/vegetable}/green_pepper.png | Bin .../{crop => food/vegetable}/iron_turnip.png | Bin .../items/{crop => food/vegetable}/onion.png | Bin .../items/{crop => food/vegetable}/radish.png | Bin .../{crop => food/vegetable}/sweet_potato.png | Bin .../items/{crop => food/vegetable}/tomato.png | Bin .../items/{crop => food/vegetable}/turnip.png | Bin .../textures/items/mineboat_chest.png | Bin 0 -> 366 bytes .../textures/models/craft_furnace.png | Bin 0 -> 6893 bytes 99 files changed, 3600 insertions(+), 373 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/SSEntitys.java create mode 100644 src/main/java/shift/sextiarysector/api/agriculture/FarmlandType.java create mode 100644 src/main/java/shift/sextiarysector/api/agriculture/IFarmland.java create mode 100644 src/main/java/shift/sextiarysector/block/BlcokPaddy.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockCraftFurnace.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockSandpit.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockStoneFrame.java create mode 100644 src/main/java/shift/sextiarysector/container/ContainerCraftFurnace.java create mode 100644 src/main/java/shift/sextiarysector/entity/EntityMineboat.java create mode 100644 src/main/java/shift/sextiarysector/entity/EntityMineboatChest.java create mode 100644 src/main/java/shift/sextiarysector/entity/EntityMineboatContainer.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiCraftFurnace.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemFoodCrop.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemMineboat.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemSoup.java create mode 100644 src/main/java/shift/sextiarysector/module/ModuleSandpit.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererCraftFurnace.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererPaddy.java create mode 100644 src/main/java/shift/sextiarysector/renderer/entity/RenderMineboat.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelCraftFurnace.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelMineboat.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityCraftFurnace.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityPaddy.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleFurnace.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityStoneFrame.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_3.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/craft_furnace.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/condiment/curry_powder.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/fish/laver.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/fish/laver_roasted.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/grain/rice.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/grain/white_rice.png rename src/main/resources/assets/sextiarysector/textures/items/food/{ => meat}/beef_smoked.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/food/{ => meat}/chicken_smoked.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/food/{ => meat}/porkchop_smoked.png (100%) create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/rice/curry_rice.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/rice/rice_ball.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/rice/tuna_sushi.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/soup/carrot_soup.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/soup/corn_soup.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/soup/egg_soup.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/soup/ender_soup.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/soup/onion_soup.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/soup/tomato_soup.png rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/corn.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/cucumber.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/eggplant.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/golden_corn.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/green_pepper.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/iron_turnip.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/onion.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/radish.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/sweet_potato.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/tomato.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{crop => food/vegetable}/turnip.png (100%) create mode 100644 src/main/resources/assets/sextiarysector/textures/items/mineboat_chest.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/craft_furnace.png diff --git a/build.gradle b/build.gradle index ac59a9d..a2c9107 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.0.b-${project.minecraft.version}" +version = "2.1.0.c-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 7b025d8..3f8dda5 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -5,6 +5,7 @@ import net.minecraft.init.Blocks; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.season.Season; +import shift.sextiarysector.block.BlcokPaddy; import shift.sextiarysector.block.BlockBlueFire; import shift.sextiarysector.block.BlockBottle; import shift.sextiarysector.block.BlockChunkLoader; @@ -28,6 +29,7 @@ import shift.sextiarysector.block.BlockSSFarmland; import shift.sextiarysector.block.BlockSSOre; import shift.sextiarysector.block.BlockSSPane; +import shift.sextiarysector.block.BlockSandpit; import shift.sextiarysector.block.BlockShaft; import shift.sextiarysector.block.BlockShippingBox; import shift.sextiarysector.block.BlockSimpleMachine; @@ -53,6 +55,7 @@ import shift.sextiarysector.tileentity.TileEntityLargeFurnace; import shift.sextiarysector.tileentity.TileEntityMagicFurnace; import shift.sextiarysector.tileentity.TileEntityMonitor; +import shift.sextiarysector.tileentity.TileEntityPaddy; import shift.sextiarysector.tileentity.TileEntitySSChest; import shift.sextiarysector.tileentity.TileEntitySSCrop; import shift.sextiarysector.tileentity.TileEntityShaft; @@ -67,10 +70,16 @@ public class SSBlocks { public static String ID = "sextiarysector"; public static Block LargeFurnace; + + //public static Block craftFurnace; + //public static Block stoneFrame; + public static Block fluidFurnace; public static Block foodSmokers; public static Block magicFurnace; + + public static Block bottle; public static Block fluidCrafter; @@ -132,6 +141,7 @@ public class SSBlocks { public static Block monitor; public static Block farmland; + public static Block paddy; public static Block turnip; public static Block cucumber; @@ -146,12 +156,25 @@ public class SSBlocks { public static Block radish; + public static Block rice; + + + //水産 + public static Block sandpit; + public static void initBlicks(){ LargeFurnace = new BlockLargeFurnace().setBlockName("ss.large_furnace").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(LargeFurnace, "LargeFurnace"); GameRegistry.registerTileEntity(TileEntityLargeFurnace.class, "LargeFurnace"); + //craftFurnace = new BlockCraftFurnace().setBlockName("ss.large_furnace").setCreativeTab(SextiarySectorAPI.TabSSCore); + //GameRegistry.registerBlock(craftFurnace, "CraftFurnace"); + //GameRegistry.registerTileEntity(TileEntityCraftFurnace.class, "CraftFurnace"); + //stoneFrame = new BlockStoneFrame().setBlockName("ss.stone_frame").setCreativeTab(SextiarySectorAPI.TabSSCore); + //GameRegistry.registerBlock(stoneFrame, "StoneFrame"); + //GameRegistry.registerTileEntity(TileEntityStoneFrame.class, "StoneFrame"); + fluidFurnace = new BlockFluidFurnace().setBlockName("ss.fluid_furnace").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(fluidFurnace, "FluidFurnace"); GameRegistry.registerTileEntity(TileEntityFluidFurnace.class, "FluidFurnace"); @@ -296,38 +319,51 @@ public static void initBlicks(){ GameRegistry.registerBlock(farmland,"Farmland"); GameRegistry.registerTileEntity(TileEntityFarmland.class, "SSFarmland"); + paddy = new BlcokPaddy().setBlockName("ss.paddy").setBlockTextureName("farmland").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); + GameRegistry.registerBlock(paddy,"Paddy"); + GameRegistry.registerTileEntity(TileEntityPaddy.class, "SSPaddy"); + //野菜 GameRegistry.registerTileEntity(TileEntitySSCrop.class, "SSCrop"); - turnip = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,3,4},Season.SPRING), SSItems.turnip, false).setBlockName("ss.turnip").setBlockTextureName("turnip"); + turnip = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,3,4},Season.SPRING), farmland, SSItems.turnip, false).setBlockName("ss.turnip").setBlockTextureName("turnip"); GameRegistry.registerBlock(turnip,ItemBlockCrop.class,"BlockTurnip"); - cucumber = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{2,6,10,3},Season.SPRING), SSItems.cucumber, true).setBlockName("ss.cucumber").setBlockTextureName("cucumber"); + cucumber = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{2,6,10,3},Season.SPRING), farmland, SSItems.cucumber, true).setBlockName("ss.cucumber").setBlockTextureName("cucumber"); GameRegistry.registerBlock(cucumber,ItemBlockCrop.class,"BlockCucumber"); - - onion = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,4,8},Season.SUMMER), SSItems.onion, false).setBlockName("ss.onion").setBlockTextureName("onion"); + onion = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,4,8},Season.SUMMER), farmland, SSItems.onion, false).setBlockName("ss.onion").setBlockTextureName("onion"); GameRegistry.registerBlock(onion,ItemBlockCrop.class,"BlockOnion"); - tomato = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{4,10,14,2},Season.SUMMER), SSItems.tomato, true).setBlockName("ss.tomato").setBlockTextureName("tomato"); + tomato = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{4,10,14,2},Season.SUMMER), farmland, SSItems.tomato, true).setBlockName("ss.tomato").setBlockTextureName("tomato"); GameRegistry.registerBlock(tomato,ItemBlockCrop.class,"BlockTomato"); - corn = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{5,10,16,4},Season.SUMMER), SSItems.corn, true).setBlockName("ss.corn").setBlockTextureName("corn"); + corn = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{5,10,16,4},Season.SUMMER), farmland, SSItems.corn, true).setBlockName("ss.corn").setBlockTextureName("corn"); GameRegistry.registerBlock(corn,ItemBlockCrop.class,"BlockCorn"); - eggplant = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{3,7,12,3},Season.AUTUMN), SSItems.eggplant, true).setBlockName("ss.eggplant").setBlockTextureName("eggplant"); + eggplant = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{3,7,12,3},Season.AUTUMN), farmland, SSItems.eggplant, true).setBlockName("ss.eggplant").setBlockTextureName("eggplant"); GameRegistry.registerBlock(eggplant,ItemBlockCrop.class,"BlockEggplant"); - sweetPotato = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,4,6,2},Season.AUTUMN), SSItems.sweetPotato, true).setBlockName("ss.sweet_potato").setBlockTextureName("sweet_potato"); + sweetPotato = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,4,6,2},Season.AUTUMN), farmland, SSItems.sweetPotato, true).setBlockName("ss.sweet_potato").setBlockTextureName("sweet_potato"); GameRegistry.registerBlock(sweetPotato,ItemBlockCrop.class,"BlockSweetPotato"); - greenPepper = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{4,8,14,3},Season.AUTUMN), SSItems.greenPepper, true).setBlockName("ss.green_pepper").setBlockTextureName("green_pepper"); + greenPepper = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{4,8,14,3},Season.AUTUMN), farmland, SSItems.greenPepper, true).setBlockName("ss.green_pepper").setBlockTextureName("green_pepper"); GameRegistry.registerBlock(greenPepper,ItemBlockCrop.class,"BlockGreenPepper"); - radish = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,3,4},Season.WINTER), SSItems.radish, false).setBlockName("ss.radish").setBlockTextureName("radish"); + radish = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,3,4},Season.WINTER), farmland, SSItems.radish, false).setBlockName("ss.radish").setBlockTextureName("radish"); GameRegistry.registerBlock(radish,ItemBlockCrop.class,"BlockRadish"); + //米 + + rice = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{28,46,68},Season.SPRING,Season.SUMMER,Season.AUTUMN), paddy, SSItems.radish, false).setBlockName("ss.rice").setBlockTextureName("rice"); + GameRegistry.registerBlock(rice,ItemBlockCrop.class,"BlockRice"); + + + //水産 + sandpit = new BlockSandpit().setBlockName("ss.sandpit").setBlockTextureName("sand"); + GameRegistry.registerBlock(sandpit, "Sandpit"); + //initVanillaBlock(); diff --git a/src/main/java/shift/sextiarysector/SSCreativeTabs.java b/src/main/java/shift/sextiarysector/SSCreativeTabs.java index 2241b87..3e543c7 100644 --- a/src/main/java/shift/sextiarysector/SSCreativeTabs.java +++ b/src/main/java/shift/sextiarysector/SSCreativeTabs.java @@ -16,7 +16,9 @@ public static void initCreativeTabs(){ SextiarySectorAPI.TabSSMachine = new CreativeTabSSMachine(); SextiarySectorAPI.TabSSPlayer = new CreativeTabSSPlayer(); SextiarySectorAPI.TabSSAgriculture = new CreativeTabSSAgriculture(); + SextiarySectorAPI.TabSSFishery = new CreativeTabSSFishery(); SextiarySectorAPI.TabSSMining = new CreativeTabSSMining(); + SextiarySectorAPI.TabSSTransport = new CreativeTabSSTransport(); SextiarySectorAPI.TabSSCooking = new CreativeTabSSCooking(); SextiarySectorAPI.TabSSEconomy = new CreativeTabSSEconomy(); SextiarySectorAPI.TabSSMagic = new CreativeTabSSMagic(); @@ -118,6 +120,25 @@ public ItemStack getIconItemStack() } + private static class CreativeTabSSFishery extends CreativeTabs{ + + public CreativeTabSSFishery() { + super("ss.fishery"); + } + + @Override + public Item getTabIconItem() { + return null;//SSBlocks.LargeFurnace.g; + } + + @SideOnly(Side.CLIENT) + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.laver,1); + } + + } + private static class CreativeTabSSMining extends CreativeTabs{ public CreativeTabSSMining() { @@ -137,6 +158,25 @@ public ItemStack getIconItemStack() } + private static class CreativeTabSSTransport extends CreativeTabs{ + + public CreativeTabSSTransport() { + super("ss.transport"); + } + + @Override + public Item getTabIconItem() { + return null;//SSBlocks.LargeFurnace.g; + } + + @SideOnly(Side.CLIENT) + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.mineboatChest,1); + } + + } + private static class CreativeTabSSCooking extends CreativeTabs{ public CreativeTabSSCooking() { diff --git a/src/main/java/shift/sextiarysector/SSEntitys.java b/src/main/java/shift/sextiarysector/SSEntitys.java new file mode 100644 index 0000000..df10f15 --- /dev/null +++ b/src/main/java/shift/sextiarysector/SSEntitys.java @@ -0,0 +1,14 @@ +package shift.sextiarysector; + +import shift.sextiarysector.entity.EntityMineboatChest; +import cpw.mods.fml.common.registry.EntityRegistry; + +public class SSEntitys { + + public static void initEntity(){ + + EntityRegistry.registerModEntity(EntityMineboatChest.class, "MineboatChest", 0, SextiarySector.instance, 250, 5, true); + + } + +} diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index bdb0b5a..d0ea01b 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -4,6 +4,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import shift.sextiarysector.container.ContainerCraftFurnace; import shift.sextiarysector.container.ContainerFluidMachineBase; import shift.sextiarysector.container.ContainerGFTank; import shift.sextiarysector.container.ContainerLargeFurnace; @@ -11,6 +12,7 @@ import shift.sextiarysector.container.ContainerPlayerNext; import shift.sextiarysector.container.ContainerSimpleMachine; import shift.sextiarysector.container.ContainerTabWorkbench; +import shift.sextiarysector.gui.GuiCraftFurnace; import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiFoodSmokers; import shift.sextiarysector.gui.GuiGFTank; @@ -23,6 +25,7 @@ import shift.sextiarysector.gui.GuiSawmill; import shift.sextiarysector.gui.GuiTabCrafting; import shift.sextiarysector.gui.IServerGuiElement; +import shift.sextiarysector.tileentity.TileEntityCraftFurnace; import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityLargeFurnace; @@ -53,6 +56,8 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x case 2 : return new ContainerFluidMachineBase(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); + case 5 : return new ContainerCraftFurnace(player.inventory, (TileEntityCraftFurnace) world.getTileEntity(x, y, z)); + case 20: case 21: case 25: @@ -111,6 +116,8 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x case 1 : return new GuiFluidFurnace(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); case 2 : return new GuiFoodSmokers(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); + case 5 : return new GuiCraftFurnace(player.inventory, (TileEntityCraftFurnace) world.getTileEntity(x, y, z)); + case 20:return new GuiMillstone(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); case 21:return new GuiLoom(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 0d7d895..8da5a9a 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -6,16 +6,19 @@ import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.item.ItemCalendar; import shift.sextiarysector.item.ItemCrop; +import shift.sextiarysector.item.ItemFoodCrop; import shift.sextiarysector.item.ItemFoodDrink; import shift.sextiarysector.item.ItemGFContactLenses; import shift.sextiarysector.item.ItemGearStorage; import shift.sextiarysector.item.ItemGuiUnit; import shift.sextiarysector.item.ItemHammer; import shift.sextiarysector.item.ItemKnife; +import shift.sextiarysector.item.ItemMineboat; import shift.sextiarysector.item.ItemScoop; import shift.sextiarysector.item.ItemSeasonStone; import shift.sextiarysector.item.ItemShiftHat; import shift.sextiarysector.item.ItemShopRing; +import shift.sextiarysector.item.ItemSoup; import shift.sextiarysector.item.ItemWateringCan; import cpw.mods.fml.common.registry.GameRegistry; @@ -108,6 +111,10 @@ public class SSItems { public static Item woodWateringCan; + //水産 + public static Item mineboatChest; + + public static Item laver; //野菜 public static Item turnip; @@ -128,13 +135,32 @@ public class SSItems { public static Item radish; + public static Item rice; + + //料理 + public static Item whiteRice; + public static Item salt; + public static Item curryPowder; + + public static Item laverRoasted; public static Item chickenSmoked; public static Item porkchopSmoked; public static Item beefSmoked; + public static Item curryRice; + + public static Item carrotSoup; + public static Item cornSoup; + public static Item eggSoup; + public static Item mushroomStew; + public static Item onionSoup; + public static Item enderSoup; + public static Item tomatoSoup; + + //装備 public static Item shiftHat; @@ -300,55 +326,97 @@ public static void initItems(){ woodWateringCan = new ItemWateringCan(ToolMaterial.WOOD).setUnlocalizedName("ss.wood_watering_can").setTextureName("wood_watering_can"); GameRegistry.registerItem(woodWateringCan, "WoodWateringCan"); - turnip = new ItemCrop(3, 1, 1, 4, 0, 0, false).setUnlocalizedName("ss.turnip").setTextureName("sextiarysector:crop/turnip"); + //水産 + mineboatChest = new ItemMineboat().setUnlocalizedName("ss.mineboat_chest").setTextureName("sextiarysector:mineboat_chest"); + GameRegistry.registerItem(mineboatChest, "MineboatChest"); + + laver = new Item().setUnlocalizedName("ss.laver").setTextureName("sextiarysector:food/fish/laver").setCreativeTab(SextiarySectorAPI.TabSSFishery); + GameRegistry.registerItem(laver, "Laver"); + + //野菜 + turnip = new ItemFoodCrop(3, 1, 1, 4, 0, 0, false).setUnlocalizedName("ss.turnip").setTextureName("sextiarysector:food/vegetable/turnip"); GameRegistry.registerItem(turnip, "Turnip"); - cucumber = new ItemCrop(1, 1, 3, 4, 0, 2, false).setUnlocalizedName("ss.cucumber").setTextureName("sextiarysector:crop/cucumber"); + cucumber = new ItemFoodCrop(1, 1, 3, 4, 0, 2, false).setUnlocalizedName("ss.cucumber").setTextureName("sextiarysector:food/vegetable/cucumber"); GameRegistry.registerItem(cucumber, "Cucumber"); - ironTurnip = new ItemCrop(0, 1, 0, 0, 0, 0, false).setUnlocalizedName("ss.iron_turnip").setTextureName("sextiarysector:crop/iron_turnip"); + ironTurnip = new ItemFoodCrop(0, 1, 0, 0, 0, 0, false).setUnlocalizedName("ss.iron_turnip").setTextureName("sextiarysector:food/vegetable/iron_turnip"); GameRegistry.registerItem(ironTurnip, "IronTurnip"); - onion = new ItemCrop(2, 1, 1, 0, 0, 0, false).setUnlocalizedName("ss.onion").setTextureName("sextiarysector:crop/onion"); + onion = new ItemFoodCrop(2, 1, 1, 0, 0, 0, false).setUnlocalizedName("ss.onion").setTextureName("sextiarysector:food/vegetable/onion"); GameRegistry.registerItem(onion, "Onion"); - tomato = new ItemCrop(1, 1, 4, 5, 0, 0, false).setUnlocalizedName("ss.tomato").setTextureName("sextiarysector:crop/tomato"); + tomato = new ItemFoodCrop(1, 1, 4, 5, 0, 0, false).setUnlocalizedName("ss.tomato").setTextureName("sextiarysector:food/vegetable/tomato"); GameRegistry.registerItem(tomato, "Tomato"); - corn = new ItemCrop(0, 1, 1, 6, 4, 2, false).setUnlocalizedName("ss.corn").setTextureName("sextiarysector:crop/corn"); + corn = new ItemFoodCrop(0, 1, 1, 6, 4, 2, false).setUnlocalizedName("ss.corn").setTextureName("sextiarysector:food/vegetable/corn"); GameRegistry.registerItem(corn, "corn"); - goldenCorn = new ItemCrop(0, 2, 0, 0, 0, 0, false).setUnlocalizedName("ss.golden_corn").setTextureName("sextiarysector:crop/golden_corn"); + goldenCorn = new ItemFoodCrop(0, 2, 0, 0, 0, 0, false).setUnlocalizedName("ss.golden_corn").setTextureName("sextiarysector:food/vegetable/golden_corn"); GameRegistry.registerItem(goldenCorn, "GoldCorn"); - eggplant = new ItemCrop(1, 1, 4, 2, 0, 0, false).setUnlocalizedName("ss.eggplant").setTextureName("sextiarysector:crop/eggplant"); + eggplant = new ItemFoodCrop(1, 1, 4, 2, 0, 0, false).setUnlocalizedName("ss.eggplant").setTextureName("sextiarysector:food/vegetable/eggplant"); GameRegistry.registerItem(eggplant, "Eggplant"); - sweetPotato = new ItemCrop(4, 1, 0, 0, 6, 0, false).setUnlocalizedName("ss.sweet_potato").setTextureName("sextiarysector:crop/sweet_potato"); + sweetPotato = new ItemFoodCrop(4, 1, 0, 0, 6, 0, false).setUnlocalizedName("ss.sweet_potato").setTextureName("sextiarysector:food/vegetable/sweet_potato"); GameRegistry.registerItem(sweetPotato, "SweetPotato"); - greenPepper = new ItemCrop(2, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.green_pepper").setTextureName("sextiarysector:crop/green_pepper"); + greenPepper = new ItemFoodCrop(2, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.green_pepper").setTextureName("sextiarysector:food/vegetable/green_pepper"); GameRegistry.registerItem(greenPepper, "GreenPepper"); - radish = new ItemCrop(3, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.radish").setTextureName("sextiarysector:crop/radish"); + radish = new ItemFoodCrop(3, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.radish").setTextureName("sextiarysector:food/vegetable/radish"); GameRegistry.registerItem(radish, "Radish"); + rice = new ItemCrop().setUnlocalizedName("ss.rice").setTextureName("sextiarysector:food/grain/rice").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); + GameRegistry.registerItem(rice, "Rice"); + //料理 + whiteRice = new Item().setUnlocalizedName("ss.white_rice").setTextureName("sextiarysector:food/grain/white_rice").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(whiteRice, "WhiteRice"); + salt = new Item().setUnlocalizedName("ss.salt").setTextureName("sextiarysector:food/condiment/salt").setCreativeTab(SextiarySectorAPI.TabSSCooking); GameRegistry.registerItem(salt, "Salt"); - chickenSmoked = new ItemFoodDrink(2, 4.6f, 0, 0, 4, 2.0f, false).setUnlocalizedName("ss.chicken_smoked").setTextureName("sextiarysector:food/chicken_smoked").setCreativeTab(SextiarySectorAPI.TabSSCooking); + curryPowder = new Item().setUnlocalizedName("ss.curry_powder").setTextureName("sextiarysector:food/condiment/curry_powder").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(curryPowder, "CurryPowder"); + + laverRoasted = new ItemFoodDrink(3, 1.2f, 0, 0, 2, 0, false).setUnlocalizedName("ss.laver_roasted").setTextureName("sextiarysector:food/fish/laver_roasted").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(laverRoasted, "LaverRoasted"); + + chickenSmoked = new ItemFoodDrink(2, 4.6f, 0, 0, 4, 2.0f, false).setUnlocalizedName("ss.chicken_smoked").setTextureName("sextiarysector:food/meat/chicken_smoked").setCreativeTab(SextiarySectorAPI.TabSSCooking); GameRegistry.registerItem(chickenSmoked, "ChickenSmoked"); - porkchopSmoked = new ItemFoodDrink(3, 7.6f, 0, 0, 4, 2.0f, false).setUnlocalizedName("ss.porkchop_smoked").setTextureName("sextiarysector:food/porkchop_smoked").setCreativeTab(SextiarySectorAPI.TabSSCooking); + porkchopSmoked = new ItemFoodDrink(3, 7.6f, 0, 0, 4, 2.0f, false).setUnlocalizedName("ss.porkchop_smoked").setTextureName("sextiarysector:food/meat/porkchop_smoked").setCreativeTab(SextiarySectorAPI.TabSSCooking); GameRegistry.registerItem(porkchopSmoked, "PorkchopSmoked"); - beefSmoked = new ItemFoodDrink(3, 7.6f, 0, 0, 4, 2.0f, false).setUnlocalizedName("ss.beef_smoked").setTextureName("sextiarysector:food/beef_smoked").setCreativeTab(SextiarySectorAPI.TabSSCooking); + beefSmoked = new ItemFoodDrink(3, 7.6f, 0, 0, 4, 2.0f, false).setUnlocalizedName("ss.beef_smoked").setTextureName("sextiarysector:food/meat/beef_smoked").setCreativeTab(SextiarySectorAPI.TabSSCooking); GameRegistry.registerItem(beefSmoked, "BeefSmoked"); + curryRice = new ItemFoodDrink(9, 12.6f, 0, 0, 10, 2.0f, false).setUnlocalizedName("ss.curry_rice").setTextureName("sextiarysector:food/rice/curry_rice").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(curryRice, "CurryRice"); + + + carrotSoup = new ItemSoup(2, 0.6f, 4, 1, 0, 0.0f, false).setUnlocalizedName("ss.carrot_soup").setTextureName("sextiarysector:food/soup/carrot_soup"); + GameRegistry.registerItem(carrotSoup, "CarrotSoup"); + + cornSoup = new ItemSoup(1, 0.6f, 5, 1, 0, 0.0f, false).setUnlocalizedName("ss.corn_soup").setTextureName("sextiarysector:food/soup/corn_soup"); + GameRegistry.registerItem(cornSoup, "CornSoup"); + + eggSoup = new ItemSoup(3, 0.6f, 4, 2, 0, 0.0f, false).setUnlocalizedName("ss.egg_soup").setTextureName("sextiarysector:food/soup/egg_soup"); + GameRegistry.registerItem(eggSoup, "EggSoup"); + + onionSoup = new ItemSoup(1, 0.6f, 5, 1, 0, 0.0f, false).setUnlocalizedName("ss.onion_soup").setTextureName("sextiarysector:food/soup/onion_soup"); + GameRegistry.registerItem(onionSoup, "OnionSoup"); + + enderSoup = new ItemSoup(0, 0.6f, 4, 1, 20, 0.0f, false).setUnlocalizedName("ss.ender_soup").setTextureName("sextiarysector:food/soup/ender_soup"); + GameRegistry.registerItem(enderSoup, "EnderSoup"); + + tomatoSoup = new ItemSoup(1, 0.6f, 3, 4.0f, 0, 0.0f, false).setUnlocalizedName("ss.tomato_soup").setTextureName("sextiarysector:food/soup/tomato_soup"); + GameRegistry.registerItem(tomatoSoup, "TomatoSoup"); + //装備 shiftHat = new ItemShiftHat().setUnlocalizedName("ss.shift_hat").setTextureName("sextiarysector:shift_hat"); @@ -359,4 +427,9 @@ public static void initItems(){ } + + + + + } diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index 597a418..df0e8ac 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -1,15 +1,34 @@ package shift.sextiarysector; +import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.oredict.OreDictionary; public class SSOreDictionary { public static void init(){ - OreDictionary.registerOre("craftingSugar", Items.sugar); + OreDictionary.registerOre("condimentSugar", Items.sugar); + + OreDictionary.registerOre("eggChicken", Items.egg); + OreDictionary.registerOre("cookingEgg", Items.egg); + + OreDictionary.registerOre("cropRedMushroom", Blocks.brown_mushroom); + OreDictionary.registerOre("cropBrownMushroom", Blocks.brown_mushroom); + OreDictionary.registerOre("cookingMushroom", Blocks.red_mushroom); + OreDictionary.registerOre("cookingMushroom", Blocks.brown_mushroom); + + OreDictionary.registerOre("cookingVegetable", Items.potato); + OreDictionary.registerOre("cookingVegetable", Items.carrot); + + OreDictionary.registerOre("containerWoodBowl", Items.bowl); + OreDictionary.registerOre("containerBucket", Items.bucket); + + OreDictionary.registerOre("fluidWater", Items.water_bucket); + OreDictionary.registerOre("fluidWater", new ItemStack(Items.potionitem, 1 ,0)); //素材 プレート OreDictionary.registerOre("plateWood", SSBlocks.woodPlate); @@ -35,6 +54,9 @@ public static void init(){ OreDictionary.registerOre("oreMithril", SSBlocks.mithrilOre); + OreDictionary.registerOre("oreIron", SSItems.ironTurnip); + OreDictionary.registerOre("oreGold", SSItems.goldenCorn); + OreDictionary.registerOre("ringIron", SSItems.ironRing); Item[] Knife = new Item[]{SSItems.woodKnife, SSItems.stoneKnife, SSItems.ironKnife, SSItems.goldKnife, SSItems.diamondKnife}; @@ -43,6 +65,41 @@ public static void init(){ OreDictionary.registerOre("craftingToolKnife", new ItemStack(Knife[i],1,OreDictionary.WILDCARD_VALUE)); } + //食べ物 + + OreDictionary.registerOre("condimentCurryPowder", SSItems.curryPowder); + + OreDictionary.registerOre("cropTurnip", SSItems.turnip); + OreDictionary.registerOre("cookingVegetable", SSItems.turnip); + OreDictionary.registerOre("cropCucumber", SSItems.cucumber); + OreDictionary.registerOre("cookingVegetable", SSItems.cucumber); + + + OreDictionary.registerOre("cropOnion", SSItems.onion); + OreDictionary.registerOre("cookingVegetable", SSItems.onion); + OreDictionary.registerOre("cropTomato", SSItems.tomato); + OreDictionary.registerOre("cookingVegetable", SSItems.tomato); + OreDictionary.registerOre("cropCorn", SSItems.corn); + + + OreDictionary.registerOre("cropEggplant", SSItems.eggplant); + OreDictionary.registerOre("cookingVegetable", SSItems.eggplant); + OreDictionary.registerOre("cropSweetPotato", SSItems.sweetPotato); + OreDictionary.registerOre("cropGreenPepper", SSItems.greenPepper); + OreDictionary.registerOre("cookingVegetable", SSItems.greenPepper); + + + OreDictionary.registerOre("cropRadish", SSItems.radish); + OreDictionary.registerOre("cookingVegetable", SSItems.radish); + + + OreDictionary.registerOre("cropRice", SSItems.rice); + + OreDictionary.registerOre("cookingRice", SSItems.whiteRice); + + //飲み物 + OreDictionary.registerOre("fluidWater", new ItemStack(SSBlocks.fluidCrafter, 1, FluidRegistry.WATER.getID())); + } diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index e193461..596ce9f 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -1,11 +1,14 @@ package shift.sextiarysector; +import java.util.ArrayList; + import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import shift.mceconomy2.api.MCEconomyAPI; +import shift.mceconomy2.api.shop.IProductItem; +import shift.mceconomy2.api.shop.IProductList; import shift.mceconomy2.api.shop.ProductItem; -import shift.mceconomy2.api.shop.ProductList; import shift.sextiarysector.block.BlockBottle; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockMonitor.MonitorType; @@ -23,7 +26,7 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.blueStoneDust,2),320)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.yellowStoneDust,2),320)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.brassIngot,2),2300)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.brassIngot,2),230)); creepers[i].addItemProduct(new ProductItem(((BlockBottle) SSBlocks.bottle).getFluidItem(new FluidStack(SSFluids.takumiTea,1000)),216)); @@ -38,6 +41,8 @@ public static void initShops(){ if(i==0){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.turnip,1),180)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.cucumber,1),360)); + + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.rice,1),280)); } if(i==1){ @@ -63,6 +68,8 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.stoneDust,4),500)); } + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.curryPowder,4),200)); + creepers[i].addItemProduct(new ProductItem(BlockMonitor.getMonitor(MonitorType.creeper),100000)); } @@ -82,8 +89,9 @@ public static void initShops(){ } - public static class SSProductList extends ProductList{ + public static class SSProductList implements IProductList{ + public ArrayList productItemList = new ArrayList(); String name; public int id; @@ -99,12 +107,27 @@ public String getProductListName() { public SSProductList copySSProductList(){ - SSProductList c = new SSProductList(name); - c.ProductItemList = this.ProductItemList; + SSProductList c = new SSProductList(this.name); + c.productItemList = this.getProductList(); return c; } + @Override + public void addItemProduct(IProductItem item) { + productItemList.add(item); + } + + @Override + public int getItemProductSize() { + return productItemList.size(); + } + + @Override + public ArrayList getProductList() { + return productItemList; + } + } public static void initPurchase(){ @@ -142,6 +165,11 @@ public static void initPurchase(){ MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.radish,1,1), 2200); + + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.rice), 400); + + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.rice,1,1), 4000); + } } diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 6640428..b7ee897 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -15,6 +15,7 @@ import shift.sextiarysector.module.ModuleAchievement; import shift.sextiarysector.module.ModuleAgriculture; import shift.sextiarysector.module.ModuleChunkLoader; +import shift.sextiarysector.module.ModuleSandpit; import shift.sextiarysector.module.ModuleSeason; import shift.sextiarysector.packet.SSPacketHandler; import shift.sextiarysector.player.EntityPlayerManager; @@ -67,6 +68,7 @@ public void preInit(FMLPreInitializationEvent event) modules.add(ModuleChunkLoader.getInstance()); modules.add(ModuleSeason.getInstance()); modules.add(ModuleAgriculture.getInstance()); + modules.add(ModuleSandpit.getInstance()); SSRecipes.initRecipeLists(); @@ -76,6 +78,7 @@ public void preInit(FMLPreInitializationEvent event) SSFluids.initFluids(); SSItems.initItems(); SSBlocks.initBlicks(); + SSEntitys.initEntity(); NetworkRegistry.INSTANCE.registerGuiHandler(this, new SSGuiHandler()); diff --git a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java index 973517e..811b186 100644 --- a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java +++ b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java @@ -20,7 +20,9 @@ public class SextiarySectorAPI { public static CreativeTabs TabSSMachine; public static CreativeTabs TabSSPlayer; public static CreativeTabs TabSSAgriculture; + public static CreativeTabs TabSSFishery; public static CreativeTabs TabSSMining; + public static CreativeTabs TabSSTransport; public static CreativeTabs TabSSCooking; public static CreativeTabs TabSSEconomy; public static CreativeTabs TabSSMagic; diff --git a/src/main/java/shift/sextiarysector/api/agriculture/FarmlandType.java b/src/main/java/shift/sextiarysector/api/agriculture/FarmlandType.java new file mode 100644 index 0000000..3b81018 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/agriculture/FarmlandType.java @@ -0,0 +1,8 @@ +package shift.sextiarysector.api.agriculture; + +public enum FarmlandType { + + Normal, + Paddy; + +} diff --git a/src/main/java/shift/sextiarysector/api/agriculture/IFarmland.java b/src/main/java/shift/sextiarysector/api/agriculture/IFarmland.java new file mode 100644 index 0000000..768b1e8 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/agriculture/IFarmland.java @@ -0,0 +1,11 @@ +package shift.sextiarysector.api.agriculture; + +import net.minecraftforge.fluids.IFluidHandler; + +public interface IFarmland extends IFluidHandler{ + + public boolean canGrowth(); + + public void growth(); + +} diff --git a/src/main/java/shift/sextiarysector/api/agriculture/IFertilizerManager.java b/src/main/java/shift/sextiarysector/api/agriculture/IFertilizerManager.java index 1f01257..b1f9b8a 100644 --- a/src/main/java/shift/sextiarysector/api/agriculture/IFertilizerManager.java +++ b/src/main/java/shift/sextiarysector/api/agriculture/IFertilizerManager.java @@ -3,6 +3,6 @@ public interface IFertilizerManager { - public void registerFertilizer(IFertilizer fertilizer); + public void registerFertilizer(FarmlandType type ,IFertilizer fertilizer); } diff --git a/src/main/java/shift/sextiarysector/block/BlcokPaddy.java b/src/main/java/shift/sextiarysector/block/BlcokPaddy.java new file mode 100644 index 0000000..fb1d807 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlcokPaddy.java @@ -0,0 +1,140 @@ +package shift.sextiarysector.block; + +import java.util.List; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.module.FertilizerManager; +import shift.sextiarysector.tileentity.TileEntityPaddy; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlcokPaddy extends BlockContainer{ + + public BlcokPaddy() { + super(Material.grass); + this.setLightOpacity(255); + this.setStepSound(soundTypeGrass); + this.useNeighborBrightness = true; + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + return Blocks.dirt.getIcon(p_149691_1_, p_149691_2_); + } + + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() + { + return 1; + } + + public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) + { + + if(FertilizerManager.getFertilizer(p_149727_5_.getCurrentEquippedItem())!=null && par1World.isAirBlock(x, y+1, z)){ + + return this.setFertilizer(par1World, x, y, z, p_149727_5_); + + } + + return false; + + } + + private boolean setFertilizer(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer){ + + TileEntityPaddy t = (TileEntityPaddy) par1World.getTileEntity(x, y, z); + + if(t.getFertilizer()!=null){ + return false; + } + + t.setFertilizer(FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem()).getFertilizer()); + + if (!par5EntityPlayer.capabilities.isCreativeMode && !par1World.isRemote) + { + --par5EntityPlayer.getCurrentEquippedItem().stackSize; + } + + par1World.markBlockForUpdate(x, y, z); + + return true; + + } + + //当たり判定 + public void addCollisionBoxesToList(World p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_) + { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.625f, 1.0F); + super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); + float f = 0.125F; + + if(!this.isSame(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, ForgeDirection.getOrientation(4))){ + this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); + super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); + } + + if(!this.isSame(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, ForgeDirection.getOrientation(2))){ + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); + super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); + } + + if(!this.isSame(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, ForgeDirection.getOrientation(5))){ + this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); + } + + if(!this.isSame(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, ForgeDirection.getOrientation(3))){ + this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); + super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); + } + + this.setBlockBoundsForItemRender(); + + } + + private boolean isSame(World p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_ ,ForgeDirection d){ + + if(p_149743_1_.getBlock(p_149743_2_ + d.offsetX, p_149743_3_ + d.offsetY, p_149743_4_ + d.offsetZ) == this)return true; + + return false; + } + + //ブロックの線 + public void setBlockBoundsForItemRender() + { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + + public boolean isOpaqueCube() + { + return false; + } + + public boolean renderAsNormalBlock() + { + return false; + } + + public int getRenderType() + { + return SextiarySector.proxy.paddyType; + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityPaddy(); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockCraftFurnace.java b/src/main/java/shift/sextiarysector/block/BlockCraftFurnace.java new file mode 100644 index 0000000..2f1331c --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockCraftFurnace.java @@ -0,0 +1,356 @@ +package shift.sextiarysector.block; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntityCraftFurnace; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockCraftFurnace extends BlockDirection{ + + private final Random furnaceRand = new Random(); + + private static boolean keepFurnaceInventory; + + @SideOnly(Side.CLIENT) + private IIcon furnaceIconTop; + @SideOnly(Side.CLIENT) + private IIcon[] furnaceIconFront = new IIcon[2]; + + private int GUIID; + + public BlockCraftFurnace() { + super(Material.rock); + this.setHardness(1.0F); + } + + public int getLightValue(IBlockAccess world, int x, int y, int z) + { + TileEntityCraftFurnace tileentityfurnace = (TileEntityCraftFurnace)world.getTileEntity(x, y, z); + if(tileentityfurnace.isFuel() || tileentityfurnace.isLarge())return 15; + return 0; + } + + /* + @Override + public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) + { + + this.setBlockBounds(-1, -1, -1, 2, 2, 2); + } + + //当たり判定。サボテンやソウルサンドを参考にすると良い。ココの設定をすると、onEntityCollidedWithBlockが呼ばれるようになる + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + return AxisAlignedBB.getBoundingBox(par2-1, par3-1, par4-1, par2+2, par3+2, par4+2); + } + + //ブロックに視点を合わせた時に出てくる黒い線のアレ + @Override + @SideOnly(Side.CLIENT) + public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + this.setBlockBoundsBasedOnState(par1World, par2, par3, par4); + return AxisAlignedBB.getBoundingBox(par2-1, par3-1, par4-1, par2+2, par3+2, par4+2); + }*/ + + @Override + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + { + if (par1World.isRemote) + { + return true; + } + else + { + TileEntityCraftFurnace tileentityfurnace = (TileEntityCraftFurnace)par1World.getTileEntity(par2, par3, par4); + + if (tileentityfurnace != null) + { + + if(!tileentityfurnace.isLarge())return true; + + par5EntityPlayer.openGui(SextiarySector.instance, 5, par1World, par2, par3, par4); + } + + return true; + } + } + + /** + * Called whenever the block is added into the world. Args: world, x, y, z + */ + @Override + public void onBlockAdded(World par1World, int par2, int par3, int par4) + { + super.onBlockAdded(par1World, par2, par3, par4); + this.setDefaultDirection(par1World, par2, par3, par4); + } + + /** + * set a blocks direction + */ + private void setDefaultDirection(World par1World, int par2, int par3, int par4) + { + if (!par1World.isRemote) + { + Block block = par1World.getBlock(par2, par3, par4 - 1); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); + + TileEntityCraftFurnace tileEntity = (TileEntityCraftFurnace)par1World.getTileEntity(par2, par3, par4); + + + byte b0 = 3; + + if (block.func_149730_j() && !block1.func_149730_j()) + { + b0 = 3; + } + + if (block1.func_149730_j() && !block.func_149730_j()) + { + b0 = 2; + } + + if (block2.func_149730_j() && !block3.func_149730_j()) + { + b0 = 5; + } + + if (block3.func_149730_j() && !block2.func_149730_j()) + { + b0 = 4; + } + + par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); + tileEntity.direction = ForgeDirection.getOrientation(b0); + } + } + + @Override + @SideOnly(Side.CLIENT) + + /** + * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata + */ + public IIcon getIcon(int par1, int par2) + { + + return par1 == 1 ? this.furnaceIconTop : (par1 == 0 ? this.furnaceIconTop : (par1 != 3 ? this.blockIcon : this.furnaceIconFront[1])); + + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) + { + //System.out.println("Icon"); + TileEntityCraftFurnace tileEntity = (TileEntityCraftFurnace)p_149673_1_.getTileEntity(x, y, z); + + int meta = p_149673_1_.getBlockMetadata(x, y, z); + + return side == 1 ? this.furnaceIconTop : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isFuel() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); + + + } + + @Override + @SideOnly(Side.CLIENT) + + /** + * When this method is called, your block should register all the icons it needs with the given IconRegister. This + * is the only chance you get to register icons. + */ + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon("furnace_side"); + this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); + this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); + this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:furnace_top"); + } + + + /** + * Returns a new instance of a block's tile entity class. Called on placing the block. + */ + @Override + public TileEntity createNewTileEntity(World par1World, int p_149915_2_) + { + return new TileEntityCraftFurnace(); + } + + /** + * Called when the block is placed in the world. + */ + @Override + public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) + { + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + TileEntityCraftFurnace tileEntity = (TileEntityCraftFurnace)par1World.getTileEntity(par2, par3, par4); + + if (l == 0) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[2]; + } + + if (l == 1) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[5]; + } + + if (l == 2) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[3]; + } + + if (l == 3) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[4]; + } + + } + + @Override + public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) + { + if (!keepFurnaceInventory) + { + TileEntityCraftFurnace tileentityfurnace = (TileEntityCraftFurnace)par1World.getTileEntity(par2, par3, par4); + + if (tileentityfurnace != null) + { + for (int j1 = 0; j1 < tileentityfurnace.getSizeInventory(); ++j1) + { + ItemStack itemstack = tileentityfurnace.getStackInSlot(j1); + + this.dropItem(itemstack, par1World, par2, par3, par4); + + } + + for (int j1 = 0; j1 < tileentityfurnace.craftMatrix.getSizeInventory(); ++j1) + { + ItemStack itemstack = tileentityfurnace.craftMatrix.getStackInSlot(j1); + + this.dropItem(itemstack, par1World, par2, par3, par4); + } + + par1World.func_147453_f(par2, par3, par4, par5); + } + } + + super.breakBlock(par1World, par2, par3, par4, par5, par6); + } + + private void dropItem(ItemStack itemstack ,World par1World,int par2, int par3, int par4){ + + if (itemstack != null) + { + float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + + while (itemstack.stackSize > 0) + { + int k1 = this.furnaceRand.nextInt(21) + 10; + + if (k1 > itemstack.stackSize) + { + k1 = itemstack.stackSize; + } + + itemstack.stackSize -= k1; + EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float)this.furnaceRand.nextGaussian() * f3; + entityitem.motionY = (float)this.furnaceRand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.furnaceRand.nextGaussian() * f3; + par1World.spawnEntityInWorld(entityitem); + } + } + + } + + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) + { + TileEntityCraftFurnace tileentityfurnace = (TileEntityCraftFurnace)p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); + + + if (tileentityfurnace.isFuel()) + { + int l = p_149734_1_.getBlockMetadata(p_149734_2_, p_149734_3_, p_149734_4_); + float f = (float)p_149734_2_ + 0.5F; + float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; + float f2 = (float)p_149734_4_ + 0.5F; + float f3 = 0.52F; + float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; + + if (l == 4) + { + p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + } + else if (l == 5) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + } + else if (l == 2) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + } + else if (l == 3) + { + p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + } + } + } + + @Override + public boolean hasComparatorInputOverride() + { + return true; + } + + /** + * If hasComparatorInputOverride returns true, the return value from this is used instead of the redstone signal + * strength when this block inputs to a comparator. + */ + @Override + public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) + { + return Container.calcRedstoneFromInventory((IInventory)par1World.getTileEntity(par2, par3, par4)); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockHole.java b/src/main/java/shift/sextiarysector/block/BlockHole.java index 524a291..d45773d 100644 --- a/src/main/java/shift/sextiarysector/block/BlockHole.java +++ b/src/main/java/shift/sextiarysector/block/BlockHole.java @@ -13,11 +13,12 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SextiarySector; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockHole extends Block{ +public class BlockHole extends Block { public BlockHole() { super(Material.grass); @@ -56,7 +57,7 @@ public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727 public void addWater(World w, int x, int y, int z){ - w.setBlockMetadataWithNotify(x, y, z, 1, 4); + w.setBlock(x, y, z, SSBlocks.paddy); w.markBlockForUpdate(x, y, z); for(int i = 2;i<6;i++){ diff --git a/src/main/java/shift/sextiarysector/block/BlockSSCrop.java b/src/main/java/shift/sextiarysector/block/BlockSSCrop.java index e2c45c8..59fd2b3 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSSCrop.java +++ b/src/main/java/shift/sextiarysector/block/BlockSSCrop.java @@ -33,16 +33,18 @@ public class BlockSSCrop extends BlockBush implements ITileEntityProvider{ private CropType type; private Item drop; private CropStatus status; + private Block farmland; private boolean re_harvest; private static Random r = new Random(); - public BlockSSCrop(CropType type, CropStatus status, Item drop, Boolean re_harvest) + public BlockSSCrop(CropType type, CropStatus status,Block farmland, Item drop, Boolean re_harvest) { this.setTickRandomly(true); this.type = type; this.drop = drop; this.status = status; + this.farmland = farmland; this.re_harvest = re_harvest; if(type.equals(CropType.Normal)){ @@ -64,9 +66,24 @@ public BlockSSCrop(CropType type, CropStatus status, Item drop, Boolean re_harve @Override public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6,float par7, float par8, float par9) { - //if(par1World.isRemote)return true; + if(par5EntityPlayer.getCurrentEquippedItem()!= null && par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof ItemShears){ - if(this.getStatus().i.length == 4 && par1World.getBlockMetadata(x, y, z)==3&&par5EntityPlayer.getCurrentEquippedItem()!= null&&par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof ItemShears){ + return this.doHarvestFromShears(par1World, x, y, z, par5EntityPlayer); + + } + + + if(this.hasFarmland(par1World, x, y, z)){ + return par1World.getBlock(x, y-1, z).onBlockActivated(par1World, x, y-1, z, par5EntityPlayer, par6, par7, par8, par9); + } + + return false; + + } + + private boolean doHarvestFromShears(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer){ + + if(this.re_harvest && this.getStatus().isReHarvest() && par1World.getBlockMetadata(x, y, z)==3){ ItemStack item = this.getAfter(par1World, x, y, z); @@ -101,18 +118,17 @@ public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlay } + return false; + } - if(this.hasFarmland(par1World, x, y, z)){ - return par1World.getBlock(x, y-1, z).onBlockActivated(par1World, x, y-1, z, par5EntityPlayer, par6, par7, par8, par9); - } - - return false; - + public boolean canBlockStay(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_) + { + return p_149718_1_.getBlock(p_149718_2_, p_149718_3_ - 1, p_149718_4_) == this.farmland; } protected boolean canPlaceBlockOn(Block p_149854_1_) { - return /*p_149854_1_ == Blocks.farmland ||*/ p_149854_1_ == SSBlocks.farmland; + return p_149854_1_ == this.farmland; } @Override @@ -282,21 +298,33 @@ public enum CropType{ public static class CropStatus{ - public int i[] ;//= new int[3]; + private int days[] ;//= new int[3]; public Season[] season; public CropStatus(int[] i1,Season... s){ - this.i= i1; + this.days= i1; this.season= s; } - public Season[] getSeason() { + public synchronized int[] getDays() { + return days; + } + + private synchronized void setDay(int[] day) { + this.days = day; + } + + public Season[] getSeason() { return season; } + public boolean isReHarvest(){ + return this.days.length == 4; + } + } diff --git a/src/main/java/shift/sextiarysector/block/BlockSSFarmland.java b/src/main/java/shift/sextiarysector/block/BlockSSFarmland.java index 3f752f3..e372fe5 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSSFarmland.java +++ b/src/main/java/shift/sextiarysector/block/BlockSSFarmland.java @@ -37,22 +37,7 @@ public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlay if(FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem())!=null && par1World.isAirBlock(x, y+1, z)){ - TileEntityFarmland t = (TileEntityFarmland) par1World.getTileEntity(x, y, z); - - if(t.getFertilizer()!=null){ - return false; - } - - t.setFertilizer(FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem()).getFertilizer()); - - if (!par5EntityPlayer.capabilities.isCreativeMode && !par1World.isRemote) - { - --par5EntityPlayer.getCurrentEquippedItem().stackSize; - } - - par1World.markBlockForUpdate(x, y, z); - - return true; + return this.setFertilizer(par1World, x, y, z, par5EntityPlayer); } @@ -102,6 +87,27 @@ public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlay return false; } + private boolean setFertilizer(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer){ + + TileEntityFarmland t = (TileEntityFarmland) par1World.getTileEntity(x, y, z); + + if(t.getFertilizer()!=null){ + return false; + } + + t.setFertilizer(FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem()).getFertilizer()); + + if (!par5EntityPlayer.capabilities.isCreativeMode && !par1World.isRemote) + { + --par5EntityPlayer.getCurrentEquippedItem().stackSize; + } + + par1World.markBlockForUpdate(x, y, z); + + return true; + + } + public boolean addWater(World par1World, int x, int y, int z){ TileEntityFarmland t = (TileEntityFarmland) par1World.getTileEntity(x, y, z); diff --git a/src/main/java/shift/sextiarysector/block/BlockSandpit.java b/src/main/java/shift/sextiarysector/block/BlockSandpit.java new file mode 100644 index 0000000..a005622 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockSandpit.java @@ -0,0 +1,188 @@ +package shift.sextiarysector.block; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandom; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class BlockSandpit extends Block{ + + public BlockSandpit() { + super(Material.sand); + + this.setCreativeTab(SextiarySectorAPI.TabSSFishery); + this.setHarvestLevel("scoop", 0); + this.setHardness(0.5F); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, (1.0f/16.0f)*1 , 1.0F); + this.setStepSound(soundTypeSand); + this.setLightOpacity(0); + this.useNeighborBrightness = true; + } + + + @Override + public ArrayList getDrops(World world, int x, int y, int z, int meta, int fortune) + { + ArrayList ret = new ArrayList(); + if (world.rand.nextInt(3) != 0) return ret; + ItemStack shell = getShell(world); + if (shell != null) ret.add(shell); + return ret; + } + + public boolean isOpaqueCube() + { + return false; + } + + public boolean renderAsNormalBlock() + { + return false; + } + + public boolean canBlockStay(World p_149718_1_, int x, int y, int z) + { + return p_149718_1_.getBlock(x, y - 1, z).isOpaqueCube() && !p_149718_1_.getBlock(x, y - 1, z).isAir(p_149718_1_, x, y-1, z); + } + + public boolean canPlaceBlockAt(World p_149742_1_, int x, int y, int z) + { + return p_149742_1_.getBlock(x, y - 1, z).isOpaqueCube() && !p_149742_1_.getBlock(x, y - 1, z).isAir(p_149742_1_, x, y-1, z); + } + + public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) + { + this.func_150155_m(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_); + } + + private boolean func_150155_m(World p_150155_1_, int p_150155_2_, int p_150155_3_, int p_150155_4_) + { + if (!this.canPlaceBlockAt(p_150155_1_, p_150155_2_, p_150155_3_, p_150155_4_)) + { + p_150155_1_.setBlockToAir(p_150155_2_, p_150155_3_, p_150155_4_); + return false; + } + else + { + return true; + } + } + + public boolean isReplaceable(IBlockAccess world, int x, int y, int z) + { + return true; + } + + public boolean canHarvestBlock(EntityPlayer player, int meta) + { + + ItemStack stack = player.inventory.getCurrentItem(); + String tool = this.getHarvestTool(meta); + if (stack == null || tool == null) + { + return player.canHarvestBlock(this); + } + + int toolLevel = stack.getItem().getHarvestLevel(stack, tool); + if (toolLevel < 0) + { + return player.canHarvestBlock(this); + } + + return toolLevel >= this.getHarvestLevel(meta); + + } + + public int getMobilityFlag() + { + return 1; + } + + public static void addShell(ItemStack seed, int weight) + { + addShell(new ShellEntry(seed, weight)); + } + + public static void addShell(ShellEntry shellEntry){ + shellList.add(shellEntry); + } + + public static class ShellEntry extends WeightedRandom.Item + { + public final ItemStack shell; + private float damage; + private boolean enchant; + + public ShellEntry(ItemStack seed, int weight) + { + super(weight); + this.shell = seed; + } + + public ItemStack addCustom(Random p_150708_1_) + { + ItemStack itemstack = this.shell.copy(); + + if (this.damage > 0.0F) + { + int i = (int)(this.damage * (float)this.shell.getMaxDamage()); + int j = itemstack.getMaxDamage() - p_150708_1_.nextInt(p_150708_1_.nextInt(i) + 1); + + if (j > i) + { + j = i; + } + + if (j < 1) + { + j = 1; + } + + itemstack.setItemDamage(j); + } + + if (this.enchant) + { + EnchantmentHelper.addRandomEnchantment(p_150708_1_, itemstack, 30); + } + + return itemstack; + } + + public ShellEntry setDamage(float p_150709_1_) + { + this.damage = p_150709_1_; + return this; + } + + public ShellEntry setEnchant() + { + this.enchant = true; + return this; + } + + } + static final List shellList = new ArrayList(); + + public static ItemStack getShell(World world) + { + ShellEntry entry = (ShellEntry)WeightedRandom.getRandomItem(world.rand, shellList); + if (entry == null || entry.shell == null) + { + return null; + } + + return entry.addCustom(world.rand); + + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockStoneFrame.java b/src/main/java/shift/sextiarysector/block/BlockStoneFrame.java new file mode 100644 index 0000000..07c11b5 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockStoneFrame.java @@ -0,0 +1,83 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntityCraftFurnace; +import shift.sextiarysector.tileentity.TileEntityStoneFrame; + +public class BlockStoneFrame extends BlockContainer{ + + public BlockStoneFrame() { + super(Material.rock); + } + + @Override + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + { + if (par1World.isRemote) + { + return true; + } + else + { + TileEntityStoneFrame tileentityfurnace = (TileEntityStoneFrame)par1World.getTileEntity(par2, par3, par4); + + System.out.println("AAA"); + + if (tileentityfurnace != null) + { + + if(!tileentityfurnace.large)return true; + + System.out.println("BBB"); + + par5EntityPlayer.openGui(SextiarySector.instance, 5, par1World, tileentityfurnace.largeX, tileentityfurnace.largeY, tileentityfurnace.largeZ); + } + + return true; + } + } + + public int getLightValue(IBlockAccess world, int x, int y, int z) + { + + TileEntityStoneFrame stoneFrame = (TileEntityStoneFrame)world.getTileEntity(x, y, z); + + if(!stoneFrame.large)return 0; + + TileEntityCraftFurnace tileentityfurnace = stoneFrame.getCraftFurnace(); + + if(tileentityfurnace==null ||tileentityfurnace instanceof TileEntityCraftFurnace){ + stoneFrame.large = false; + return 0; + } + + if(tileentityfurnace.isFuel())return 15; + return 0; + } + + @Override + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) + { + TileEntityStoneFrame stoneFrame = (TileEntityStoneFrame)world.getTileEntity(x, y, z); + + if(!stoneFrame.large)return; + + stoneFrame.breakLarge(); + + super.breakBlock(world, x, y, z, par5, par6); + + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityStoneFrame(); + } + +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerCraftFurnace.java b/src/main/java/shift/sextiarysector/container/ContainerCraftFurnace.java new file mode 100644 index 0000000..ce34ae0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerCraftFurnace.java @@ -0,0 +1,186 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.inventory.SlotFurnace; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.tileentity.TileEntityCraftFurnace; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ContainerCraftFurnace extends Container +{ + private TileEntityCraftFurnace tileFurnace; + private InventoryFurnaceCrafting craftMatrix; + private int lastCookTime; + private int lastBurnTime; + private int lastItemBurnTime; + + public ContainerCraftFurnace(InventoryPlayer p_i1812_1_, TileEntityCraftFurnace p_i1812_2_) + { + this.tileFurnace = p_i1812_2_; + this.craftMatrix = p_i1812_2_.craftMatrix; + this.addSlotToContainer(new Slot(p_i1812_2_, 0, 15, 46));//0 + this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 1, 135, 35));//1 + int i; + + for (i = 0; i < 3; ++i)//2-10 + { + for (int j = 0; j < 3; ++j) + { + this.addSlotToContainer(new Slot(this.craftMatrix, i + j * 3, 41 + i * 18, 17 + j * 18)); + } + } + + for (i = 0; i < 3; ++i)//11-37 + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(p_i1812_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (i = 0; i < 9; ++i)//38-46 + { + this.addSlotToContainer(new Slot(p_i1812_1_, i, 8 + i * 18, 142)); + } + + + + } + + public void addCraftingToCrafters(ICrafting p_75132_1_) + { + super.addCraftingToCrafters(p_75132_1_); + p_75132_1_.sendProgressBarUpdate(this, 0, this.tileFurnace.machineWorkProgressTime); + p_75132_1_.sendProgressBarUpdate(this, 1, this.tileFurnace.fuel); + p_75132_1_.sendProgressBarUpdate(this, 2, this.tileFurnace.fuelMax); + } + + /** + * Looks for changes made in the container, sends them to every listener. + */ + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + + for (int i = 0; i < this.crafters.size(); ++i) + { + ICrafting icrafting = (ICrafting)this.crafters.get(i); + + if (this.lastCookTime != this.tileFurnace.machineWorkProgressTime) + { + icrafting.sendProgressBarUpdate(this, 0, this.tileFurnace.machineWorkProgressTime); + } + + if (this.lastBurnTime != this.tileFurnace.fuel) + { + icrafting.sendProgressBarUpdate(this, 1, this.tileFurnace.fuel); + } + + if (this.lastItemBurnTime != this.tileFurnace.fuelMax) + { + icrafting.sendProgressBarUpdate(this, 2, this.tileFurnace.fuelMax); + } + } + + this.lastCookTime = this.tileFurnace.machineWorkProgressTime; + this.lastBurnTime = this.tileFurnace.fuel; + this.lastItemBurnTime = this.tileFurnace.fuelMax; + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int p_75137_1_, int p_75137_2_) + { + if (p_75137_1_ == 0) + { + this.tileFurnace.machineWorkProgressTime = p_75137_2_; + } + + if (p_75137_1_ == 1) + { + this.tileFurnace.fuel = p_75137_2_; + } + + if (p_75137_1_ == 2) + { + this.tileFurnace.fuelMax = p_75137_2_; + } + } + + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return this.tileFurnace.isUseableByPlayer(p_75145_1_); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot)this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ == 1) + { + if (!this.mergeItemStack(itemstack1, 3, 39, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if ( !(1<=p_82846_2_&& p_82846_2_ <= 10)) + { + if (tileFurnace.isItemFuel(itemstack1)) + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return null; + } + } + else if (p_82846_2_ >= 11 && p_82846_2_ < 38) + { + if (!this.mergeItemStack(itemstack1, 38, 46, false)) + { + return null; + } + } + else if (p_82846_2_ >= 38 && p_82846_2_ < 46 && !this.mergeItemStack(itemstack1, 11, 38, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 11, 46, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack)null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerMagicFurnace.java b/src/main/java/shift/sextiarysector/container/ContainerMagicFurnace.java index 2ce6e18..fd3aaa5 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerMagicFurnace.java +++ b/src/main/java/shift/sextiarysector/container/ContainerMagicFurnace.java @@ -18,7 +18,6 @@ public class ContainerMagicFurnace extends Container private int lastCookTime; private int lastBurnTime; private int lastItemBurnTime; - private static final String __OBFID = "CL_00001748"; public ContainerMagicFurnace(InventoryPlayer p_i1812_1_, TileEntityMagicFurnace p_i1812_2_) { @@ -137,7 +136,7 @@ else if (p_82846_2_ != 1 && p_82846_2_ != 0) return null; } } - else if (TileEntityMagicFurnace.isItemFuel(itemstack1)) + else if (tileFurnace.isItemFuel(itemstack1)) { if (!this.mergeItemStack(itemstack1, 1, 2, false)) { diff --git a/src/main/java/shift/sextiarysector/entity/EntityMineboat.java b/src/main/java/shift/sextiarysector/entity/EntityMineboat.java new file mode 100644 index 0000000..adb88a6 --- /dev/null +++ b/src/main/java/shift/sextiarysector/entity/EntityMineboat.java @@ -0,0 +1,173 @@ +package shift.sextiarysector.entity; + +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityBoat; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; + +public class EntityMineboat extends EntityBoat{ + + protected String entityName;; + + public EntityMineboat(World par1World) { + super(par1World); + + } + + public EntityMineboat(World par1World, double par2, double par4, double par6) { + super(par1World, par2, par4, par6); + + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(20, new Integer(0)); + this.dataWatcher.addObject(21, new Integer(6)); + this.dataWatcher.addObject(22, Byte.valueOf((byte)0)); + } + + @Override + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { + if (this.isEntityInvulnerable()) + { + return false; + } + else if (!this.worldObj.isRemote && !this.isDead) + { + this.setForwardDirection(-this.getForwardDirection()); + this.setTimeSinceHit(10); + this.setDamageTaken(this.getDamageTaken() + par2 * 10.0F); + this.setBeenAttacked(); + boolean flag = par1DamageSource.getEntity() instanceof EntityPlayer && ((EntityPlayer)par1DamageSource.getEntity()).capabilities.isCreativeMode; + + if (flag || this.getDamageTaken() > 40.0F) + { + if (this.riddenByEntity != null) + { + this.riddenByEntity.mountEntity(this); + } + + if (flag && !this.isInvNameLocalized()) + { + this.setDead(); + } + else + { + this.killMineBoat(par1DamageSource); + } + } + + return true; + } + else + { + return true; + } + } + + public void killMineBoat(DamageSource par1DamageSource) + { + this.setDead(); + ItemStack itemstack = new ItemStack(Items.boat, 1); + + if (this.entityName != null) + { + itemstack.setStackDisplayName(this.entityName); + } + + this.entityDropItem(itemstack, 0.0F); + } + + public boolean isInvNameLocalized() + { + return this.entityName != null; + } + + public Block getDisplayTile() + { + if (!this.hasDisplayTile()) + { + return this.getDefaultDisplayTile(); + } + else + { + int i = this.getDataWatcher().getWatchableObjectInt(20) & 65535; + return Block.getBlockById(i); + } + } + + public Block getDefaultDisplayTile() + { + return null; + } + + public int getDisplayTileData() + { + return !this.hasDisplayTile() ? this.getDefaultDisplayTileData() : this.getDataWatcher().getWatchableObjectInt(20) >> 16; + } + + public int getDefaultDisplayTileData() + { + return 0; + } + + public int getDisplayTileOffset() + { + return !this.hasDisplayTile() ? this.getDefaultDisplayTileOffset() : this.getDataWatcher().getWatchableObjectInt(21); + } + + public int getDefaultDisplayTileOffset() + { + return 6; + } + + public void setDisplayTile(int par1) + { + this.getDataWatcher().updateObject(20, Integer.valueOf(par1 & 65535 | this.getDisplayTileData() << 16)); + this.setHasDisplayTile(true); + } + + public void setDisplayTileData(int par1) + { + this.getDataWatcher().updateObject(20, Integer.valueOf(Block.getIdFromBlock(this.getDisplayTile()) & 65535 | par1 << 16)); + this.setHasDisplayTile(true); + } + + public void setDisplayTileOffset(int par1) + { + this.getDataWatcher().updateObject(21, Integer.valueOf(par1)); + this.setHasDisplayTile(true); + } + + public boolean hasDisplayTile() + { + //return false;//this.getDataWatcher().getWatchableObjectByte(22) == 1; + return this.getDataWatcher().getWatchableObjectByte(22) == 1; + } + + public void setHasDisplayTile(boolean par1) + { + this.getDataWatcher().updateObject(22, Byte.valueOf((byte)(par1 ? 1 : 0))); + } + + public void setMineboatName(String par1Str) + { + this.entityName = par1Str; + } + + public String getCommandSenderName() + { + return this.entityName != null ? this.entityName : super.getCommandSenderName(); + } + + public String func_95999_t() + { + return this.entityName; + } + +} diff --git a/src/main/java/shift/sextiarysector/entity/EntityMineboatChest.java b/src/main/java/shift/sextiarysector/entity/EntityMineboatChest.java new file mode 100644 index 0000000..9dadfd9 --- /dev/null +++ b/src/main/java/shift/sextiarysector/entity/EntityMineboatChest.java @@ -0,0 +1,52 @@ +package shift.sextiarysector.entity; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; + +public class EntityMineboatChest extends EntityMineboatContainer{ + + public EntityMineboatChest(World par1World) { + super(par1World); + + } + + public EntityMineboatChest(World par1World, double par2, double par4, double par6) { + super(par1World, par2, par4, par6); + + } + + @Override + public void killMineBoat(DamageSource par1DamageSource) + { + super.killMineBoat(par1DamageSource); + this.func_145778_a(Item.getItemFromBlock(Blocks.chest), 1, 0.0F); + } + + @Override + public int getSizeInventory() + { + return 27; + } + + @Override + public String getInventoryName() + { + return this.isInvNameLocalized() ? this.func_95999_t() : "container.mineboat_chest"; + } + + @Override + public Block getDefaultDisplayTile() + { + return Blocks.chest; + } + + @Override + public int getDefaultDisplayTileOffset() + { + return 8; + } + +} diff --git a/src/main/java/shift/sextiarysector/entity/EntityMineboatContainer.java b/src/main/java/shift/sextiarysector/entity/EntityMineboatContainer.java new file mode 100644 index 0000000..e277993 --- /dev/null +++ b/src/main/java/shift/sextiarysector/entity/EntityMineboatContainer.java @@ -0,0 +1,228 @@ +package shift.sextiarysector.entity; + +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; +import shift.sextiarysector.container.ItemBox; + +public class EntityMineboatContainer extends EntityMineboat implements IInventory{ + + //private ItemStack[] mineboatContainerItems = new ItemStack[36]; + protected ItemBox items = new ItemBox("Base", 36); + + private boolean dropContentsWhenDead = true; + + public EntityMineboatContainer(World par1World) { + super(par1World); + + } + + public EntityMineboatContainer(World par1World, double par2, double par4, double par6) { + super(par1World, par2, par4, par6); + + } + + @Override + public void killMineBoat(DamageSource par1DamageSource) + { + super.killMineBoat(par1DamageSource); + + for (int i = 0; i < this.getSizeInventory(); ++i) + { + ItemStack itemstack = this.getStackInSlot(i); + + if (itemstack != null) + { + float f = this.rand.nextFloat() * 0.8F + 0.1F; + float f1 = this.rand.nextFloat() * 0.8F + 0.1F; + float f2 = this.rand.nextFloat() * 0.8F + 0.1F; + + while (itemstack.stackSize > 0) + { + int j = this.rand.nextInt(21) + 10; + + if (j > itemstack.stackSize) + { + j = itemstack.stackSize; + } + + itemstack.stackSize -= j; + EntityItem entityitem = new EntityItem(this.worldObj, this.posX + f, this.posY + f1, this.posZ + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage())); + float f3 = 0.05F; + entityitem.motionX = (float)this.rand.nextGaussian() * f3; + entityitem.motionY = (float)this.rand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.rand.nextGaussian() * f3; + this.worldObj.spawnEntityInWorld(entityitem); + } + } + } + } + + @Override + public int getSizeInventory() { + return this.items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int par1) + { + return this.items.getStackInSlot(par1); + } + + @Override + public ItemStack decrStackSize(int par1, int par2) + { + return this.items.decrStackSize(par1, par2); + } + + @Override + public ItemStack getStackInSlotOnClosing(int par1) + { + return this.getStackInSlotOnClosing(par1); + } + + @Override + public void setInventorySlotContents(int par1, ItemStack par2ItemStack) + { + this.items.setInventorySlotContents(par1, par2ItemStack); + } + + @Override + public void openInventory() {} + + @Override + public void closeInventory() {} + + @Override + public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) + { + return this.isDead ? false : par1EntityPlayer.getDistanceSqToEntity(this) <= 64.0D; + } + + @Override + public boolean isInvNameLocalized() + { + return this.entityName != null; + } + + @Override + public boolean isItemValidForSlot(int par1, ItemStack par2ItemStack) + { + return true; + } + + @Override + public String getInventoryName() + { + return this.isInvNameLocalized() ? this.func_95999_t() : "container.mineboat"; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public void markDirty() { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + @Override + public void travelToDimension(int par1) + { + this.dropContentsWhenDead = false; + super.travelToDimension(par1); + } + + @Override + public void setDead() + { + if (this.dropContentsWhenDead) + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + ItemStack itemstack = this.getStackInSlot(i); + + if (itemstack != null) + { + float f = this.rand.nextFloat() * 0.8F + 0.1F; + float f1 = this.rand.nextFloat() * 0.8F + 0.1F; + float f2 = this.rand.nextFloat() * 0.8F + 0.1F; + + while (itemstack.stackSize > 0) + { + int j = this.rand.nextInt(21) + 10; + + if (j > itemstack.stackSize) + { + j = itemstack.stackSize; + } + + itemstack.stackSize -= j; + EntityItem entityitem = new EntityItem(this.worldObj, this.posX + f, this.posY + f1, this.posZ + f2, new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float)this.rand.nextGaussian() * f3; + entityitem.motionY = (float)this.rand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.rand.nextGaussian() * f3; + this.worldObj.spawnEntityInWorld(entityitem); + } + } + } + } + + super.setDead(); + } + + @Override + protected void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + items.writeToNBT(par1NBTTagCompound); + } + + @Override + protected void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + items.readFromNBT(par1NBTTagCompound); + } + + @Override + //ここに重要な事がある。 + public boolean interactFirst(EntityPlayer par1EntityPlayer) + { + /* + if(MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent((EntityMinecart)this, par1EntityPlayer))) + { + return true; + } + */ + + if (!this.worldObj.isRemote) + { + + + par1EntityPlayer.displayGUIChest(this); + } + + return true; + } + +} diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 3811606..885d9d7 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -137,7 +137,7 @@ public void preFertilizerTextureStitchEvent(TextureStitchEvent.Pre event){ if(event.map.getTextureType()==0){ - for(IFertilizer f : ((FertilizerManager)AgricultureAPI.fertilizerManager).fertilizers){ + for(IFertilizer f : ((FertilizerManager)AgricultureAPI.fertilizerManager).fertilizerIcons){ f.registerFertilizerIcons(event.map); } diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index 2573d52..ebfa6f3 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -1,16 +1,21 @@ package shift.sextiarysector.event; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.IMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.world.World; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; @@ -133,23 +138,28 @@ protected boolean generateChest(World world, int x, int y, int z) @SubscribeEvent public void onSpawn(LivingSpawnEvent.CheckSpawn event) { - /* + World world = event.world; EntityLivingBase living = event.entityLiving; + if(world.rand.nextInt(14) != 0)return; + if (living instanceof IMob) { int x = (int)event.x; int y = (int)event.y; int z = (int)event.z; - System.out.println( x+" : "+ y + " : "+ z); + if(!world.getBlock(x, y, z).isAir(world, x, y, z))return; - if(world.getBlock(x, y-1, z)!=Blocks.stone){ - world.setBlock(x, y, z, Blocks.stone); - } + if(world.getBlock(x, y-1, z) != Blocks.sand)return; - }*/ + if(!BiomeDictionary.isBiomeOfType(world.getBiomeGenForCoords(x, z), Type.BEACH))return; + + System.out.println("AAA"); + world.setBlock(x, y, z, SSBlocks.sandpit); + + } } /** */ diff --git a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java index 4fd1473..39755d4 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java @@ -66,7 +66,7 @@ public void onLivingHurtEvent(LivingHurtEvent event) { EntityPlayer player = (EntityPlayer) event.entityLiving; - SextiarySectorAPI.addMoistureExhaustion(player, event.ammount * 0.4f); + SextiarySectorAPI.addMoistureExhaustion(player, event.ammount * 0.3f); } @@ -91,9 +91,9 @@ public void onLivingJump(LivingJumpEvent event) { } if (player.isSprinting()) { - SextiarySectorAPI.addMoistureExhaustion(player, 0.8f * i); - } else { SextiarySectorAPI.addMoistureExhaustion(player, 0.2f * i); + } else { + SextiarySectorAPI.addMoistureExhaustion(player, 0.05f * i); } } diff --git a/src/main/java/shift/sextiarysector/gui/GuiCraftFurnace.java b/src/main/java/shift/sextiarysector/gui/GuiCraftFurnace.java new file mode 100644 index 0000000..8a3c7a9 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiCraftFurnace.java @@ -0,0 +1,93 @@ +package shift.sextiarysector.gui; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import shift.sextiarysector.container.ContainerCraftFurnace; +import shift.sextiarysector.recipe.FurnaceCraftingManager; +import shift.sextiarysector.tileentity.TileEntityCraftFurnace; + +public class GuiCraftFurnace extends GuiContainer{ + + private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("sextiarysector:textures/guis/craft_furnace.png"); + private final TileEntityCraftFurnace furnaceInventory; + + public GuiCraftFurnace(InventoryPlayer par1InventoryPlayer, TileEntityCraftFurnace par2TileEntityFurnace) + { + super(new ContainerCraftFurnace(par1InventoryPlayer, par2TileEntityFurnace)); + this.furnaceInventory = par2TileEntityFurnace; + //this.ySize =222; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) + { + String s = this.furnaceInventory.hasCustomInventoryName() ? this.furnaceInventory.getInventoryName() : I18n.format(this.furnaceInventory.getInventoryName()); + this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + /** + * Draw the background layer for the GuiContainer (everything behind the items) + */ + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(furnaceGuiTextures); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + int i1; + + if (this.furnaceInventory.isFuel()) + { + i1 = this.furnaceInventory.getEnergyProgressScaled(12); + this.drawTexturedModalRect(k + 15, l + 29 + 12 - i1, 176, 12 - i1, 14, i1 + 2); + } + + i1 = this.furnaceInventory.getWorkProgressScaled(24); + this.drawTexturedModalRect(k + 100 + 1, l + 41, 176, 14, i1 + 1, 16); + + ItemStack itemstack = FurnaceCraftingManager.getInstance().findMatchingRecipe(this.furnaceInventory.craftMatrix, this.furnaceInventory.getWorldObj()); + + if (itemstack != null ) + { + int k1 = (this.width - this.xSize) / 2; + int l1 = (this.height - this.ySize) / 2; + GL11.glPushMatrix(); + RenderHelper.enableGUIStandardItemLighting(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glEnable(GL11.GL_COLOR_MATERIAL); + GL11.glEnable(GL11.GL_LIGHTING); + itemRender.zLevel = 100.0F; + + itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), itemstack, k1 + 105, l1 + 23); + itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), itemstack, k1 + 105, l1 + 23); + itemRender.zLevel = 0.0F; + GL11.glDisable(GL11.GL_LIGHTING); + + if(this.func_146978_c(105, 23, 16, 16, par2, par3)) + { + this.renderToolTip(itemstack, par2, par3); + } + + GL11.glPopMatrix(); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_DEPTH_TEST); + RenderHelper.enableStandardItemLighting(); + } + + } +} diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockFluidCrafter.java b/src/main/java/shift/sextiarysector/item/ItemBlockFluidCrafter.java index 18d25ea..50c7819 100644 --- a/src/main/java/shift/sextiarysector/item/ItemBlockFluidCrafter.java +++ b/src/main/java/shift/sextiarysector/item/ItemBlockFluidCrafter.java @@ -20,6 +20,7 @@ public class ItemBlockFluidCrafter extends ItemBlock{ public ItemBlockFluidCrafter(Block par1) { super(par1); + this.setHasSubtypes(true); } public int getMetadata(int p_77647_1_) diff --git a/src/main/java/shift/sextiarysector/item/ItemCrop.java b/src/main/java/shift/sextiarysector/item/ItemCrop.java index 992ab1f..071dda2 100644 --- a/src/main/java/shift/sextiarysector/item/ItemCrop.java +++ b/src/main/java/shift/sextiarysector/item/ItemCrop.java @@ -1,6 +1,5 @@ package shift.sextiarysector.item; -import java.util.ArrayList; import java.util.List; import net.minecraft.creativetab.CreativeTabs; @@ -12,17 +11,12 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ItemCrop extends ItemFoodDrink{ +public class ItemCrop extends Item{ - public static ArrayList crops = new ArrayList(); - - public int cost; - - public ItemCrop(int food, float foodM, int drink, float drinkM,int stamina, float staminaM, boolean p_i45339_3_) { - super(food, foodM, drink, drinkM, stamina, staminaM, p_i45339_3_); + public ItemCrop() { this.hasSubtypes = true; - crops.add(this); + ItemFoodCrop.crops.add(this); this.setCreativeTab(SextiarySectorAPI.TabSSAgriculture); diff --git a/src/main/java/shift/sextiarysector/item/ItemFoodCrop.java b/src/main/java/shift/sextiarysector/item/ItemFoodCrop.java new file mode 100644 index 0000000..26d6997 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemFoodCrop.java @@ -0,0 +1,48 @@ +package shift.sextiarysector.item; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import shift.sextiarysector.api.SextiarySectorAPI; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemFoodCrop extends ItemFoodDrink{ + + public static ArrayList crops = new ArrayList(); + + + public ItemFoodCrop(int food, float foodM, int drink, float drinkM,int stamina, float staminaM, boolean p_i45339_3_) { + super(food, foodM, drink, drinkM, stamina, staminaM, p_i45339_3_); + this.hasSubtypes = true; + + crops.add(this); + + this.setCreativeTab(SextiarySectorAPI.TabSSAgriculture); + + } + + public String getItemStackDisplayName(ItemStack p_77653_1_) + { + + String s = ""; + if(p_77653_1_.getItemDamage()==1){ + s ="" + EnumChatFormatting.AQUA + StatCollector.translateToLocal("item.ss.crop.big"); + } + + return ("" + s + " " + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(p_77653_1_) + ".name")).trim(); + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) + { + p_150895_3_.add(new ItemStack(p_150895_1_, 1, 0)); + p_150895_3_.add(new ItemStack(p_150895_1_, 1, 1)); + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemMineboat.java b/src/main/java/shift/sextiarysector/item/ItemMineboat.java new file mode 100644 index 0000000..6aa9f50 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemMineboat.java @@ -0,0 +1,114 @@ +package shift.sextiarysector.item; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.entity.EntityMineboatChest; + +public class ItemMineboat extends Item{ + + public ItemMineboat() { + super(); + this.maxStackSize = 1; + this.setCreativeTab(SextiarySectorAPI.TabSSTransport); + } + + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) + { + float f = 1.0F; + float f1 = p_77659_3_.prevRotationPitch + (p_77659_3_.rotationPitch - p_77659_3_.prevRotationPitch) * f; + float f2 = p_77659_3_.prevRotationYaw + (p_77659_3_.rotationYaw - p_77659_3_.prevRotationYaw) * f; + double d0 = p_77659_3_.prevPosX + (p_77659_3_.posX - p_77659_3_.prevPosX) * (double)f; + double d1 = p_77659_3_.prevPosY + (p_77659_3_.posY - p_77659_3_.prevPosY) * (double)f + 1.62D - (double)p_77659_3_.yOffset; + double d2 = p_77659_3_.prevPosZ + (p_77659_3_.posZ - p_77659_3_.prevPosZ) * (double)f; + Vec3 vec3 = Vec3.createVectorHelper(d0, d1, d2); + float f3 = MathHelper.cos(-f2 * 0.017453292F - (float)Math.PI); + float f4 = MathHelper.sin(-f2 * 0.017453292F - (float)Math.PI); + float f5 = -MathHelper.cos(-f1 * 0.017453292F); + float f6 = MathHelper.sin(-f1 * 0.017453292F); + float f7 = f4 * f5; + float f8 = f3 * f5; + double d3 = 5.0D; + Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3); + MovingObjectPosition movingobjectposition = p_77659_2_.rayTraceBlocks(vec3, vec31, true); + + if (movingobjectposition == null) + { + return p_77659_1_; + } + else + { + Vec3 vec32 = p_77659_3_.getLook(f); + boolean flag = false; + float f9 = 1.0F; + List list = p_77659_2_.getEntitiesWithinAABBExcludingEntity(p_77659_3_, p_77659_3_.boundingBox.addCoord(vec32.xCoord * d3, vec32.yCoord * d3, vec32.zCoord * d3).expand((double)f9, (double)f9, (double)f9)); + int i; + + for (i = 0; i < list.size(); ++i) + { + Entity entity = (Entity)list.get(i); + + if (entity.canBeCollidedWith()) + { + float f10 = entity.getCollisionBorderSize(); + AxisAlignedBB axisalignedbb = entity.boundingBox.expand((double)f10, (double)f10, (double)f10); + + if (axisalignedbb.isVecInside(vec3)) + { + flag = true; + } + } + } + + if (flag) + { + return p_77659_1_; + } + else + { + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (p_77659_2_.getBlock(i, j, k) == Blocks.snow_layer) + { + --j; + } + + EntityMineboatChest entityboat = new EntityMineboatChest(p_77659_2_, (double)((float)i + 0.5F), (double)((float)j + 1.0F), (double)((float)k + 0.5F)); + entityboat.rotationYaw = (float)(((MathHelper.floor_double((double)(p_77659_3_.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3) - 1) * 90); + + if (!p_77659_2_.getCollidingBoundingBoxes(entityboat, entityboat.boundingBox.expand(-0.1D, -0.1D, -0.1D)).isEmpty()) + { + return p_77659_1_; + } + + if (!p_77659_2_.isRemote) + { + p_77659_2_.spawnEntityInWorld(entityboat); + } + + if (!p_77659_3_.capabilities.isCreativeMode) + { + --p_77659_1_.stackSize; + } + } + + return p_77659_1_; + } + } + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemSoup.java b/src/main/java/shift/sextiarysector/item/ItemSoup.java new file mode 100644 index 0000000..b1ba4c2 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemSoup.java @@ -0,0 +1,14 @@ +package shift.sextiarysector.item; + +import net.minecraft.init.Items; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class ItemSoup extends ItemFoodDrink{ + + public ItemSoup(int food, float foodM, int drink, float drinkM, int stamina, float staminaM, boolean p_i45339_3_) { + super(food, foodM, drink, drinkM, stamina, staminaM, p_i45339_3_); + this.setCreativeTab(SextiarySectorAPI.TabSSCooking); + this.setContainerItem(Items.bowl); + } + +} diff --git a/src/main/java/shift/sextiarysector/module/FertilizerManager.java b/src/main/java/shift/sextiarysector/module/FertilizerManager.java index a4b966e..38e6980 100644 --- a/src/main/java/shift/sextiarysector/module/FertilizerManager.java +++ b/src/main/java/shift/sextiarysector/module/FertilizerManager.java @@ -4,21 +4,48 @@ import java.util.Random; import net.minecraft.item.ItemStack; +import shift.sextiarysector.api.agriculture.FarmlandType; import shift.sextiarysector.api.agriculture.IFertilizer; import shift.sextiarysector.api.agriculture.IFertilizerManager; public class FertilizerManager implements IFertilizerManager { //public static HashMap fertilizers = new HashMap(); + public static ArrayList fertilizerIcons = new ArrayList(); + public static ArrayList fertilizers = new ArrayList(); + + public static ArrayList normal = new ArrayList(); + public static ArrayList paddy = new ArrayList(); //public static HashMap fertilizersS = new HashMap(); private static Random r = new Random(); @Override - public void registerFertilizer(IFertilizer fertilizer) { + public void registerFertilizer(FarmlandType type , IFertilizer fertilizer) { //fertilizersS.put(fertilizer.getName(), fertilizer); fertilizers.add(fertilizer); + + this.addIcon(fertilizer); + + switch(type){ + + case Normal:normal.add(fertilizer); + case Paddy : paddy.add(fertilizer); + + } + } + + private void addIcon(IFertilizer fertilizer){ + + for(IFertilizer f :fertilizerIcons){ + + if(this.checkItem(fertilizer.getFertilizer(), f.getFertilizer()))return; + + } + + fertilizerIcons.add(fertilizer); + } public static IFertilizer getFertilizer(ItemStack item) @@ -38,6 +65,24 @@ public static IFertilizer getFertilizer(ItemStack item) return null; + } + + public static IFertilizer getFertilizerIcon(ItemStack item) + { + if (item == null) + { + return null; + } + + for(IFertilizer f:fertilizerIcons){ + + if(checkItem(item,f.getFertilizer())){ + return f; + } + + } + + return null; } private static boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) diff --git a/src/main/java/shift/sextiarysector/module/ModuleAgriculture.java b/src/main/java/shift/sextiarysector/module/ModuleAgriculture.java index 92c62b3..2ad292c 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleAgriculture.java +++ b/src/main/java/shift/sextiarysector/module/ModuleAgriculture.java @@ -1,11 +1,13 @@ package shift.sextiarysector.module; import net.minecraft.init.Items; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import shift.sextiarysector.SSItems; import shift.sextiarysector.api.agriculture.AgricultureAPI; +import shift.sextiarysector.api.agriculture.FarmlandType; import shift.sextiarysector.api.agriculture.SimpleFertilizer; -import shift.sextiarysector.item.ItemCrop; +import shift.sextiarysector.item.ItemFoodCrop; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -36,12 +38,12 @@ public void load(FMLInitializationEvent event) { String t = "sextiarysector:fertilizer/"; - for(ItemCrop item :ItemCrop.crops){ - AgricultureAPI.fertilizerManager.registerFertilizer(new SimpleFertilizer("bone",t+"bone",new ItemStack(Items.dye, 1, 15), new ItemStack(item), new ItemStack(item,1,1))); + for(Item item :ItemFoodCrop.crops){ + AgricultureAPI.fertilizerManager.registerFertilizer(FarmlandType.Normal, new SimpleFertilizer("bone",t+"bone",new ItemStack(Items.dye, 1, 15), new ItemStack(item), new ItemStack(item,1,1))); } - AgricultureAPI.fertilizerManager.registerFertilizer(new SimpleFertilizer("stone",t+"stone",new ItemStack(SSItems.stoneDust), new ItemStack(SSItems.corn), new ItemStack(SSItems.goldenCorn))); - AgricultureAPI.fertilizerManager.registerFertilizer(new SimpleFertilizer("stone",t+"stone",new ItemStack(SSItems.stoneDust), new ItemStack(SSItems.turnip), new ItemStack(SSItems.ironTurnip))); + AgricultureAPI.fertilizerManager.registerFertilizer(FarmlandType.Normal, new SimpleFertilizer("stone",t+"stone",new ItemStack(SSItems.stoneDust), new ItemStack(SSItems.corn), new ItemStack(SSItems.goldenCorn))); + AgricultureAPI.fertilizerManager.registerFertilizer(FarmlandType.Normal, new SimpleFertilizer("stone",t+"stone",new ItemStack(SSItems.stoneDust), new ItemStack(SSItems.turnip), new ItemStack(SSItems.ironTurnip))); //AgricultureAPI.fertilizerManager.registerFertilizer(new SimpleFertilizer("bone",t+"bone",new ItemStack(Items.dye, 4, 15), new ItemStack(SSItems.cucumber), new ItemStack(SSItems.tomato))); diff --git a/src/main/java/shift/sextiarysector/module/ModuleSandpit.java b/src/main/java/shift/sextiarysector/module/ModuleSandpit.java new file mode 100644 index 0000000..88a2dcd --- /dev/null +++ b/src/main/java/shift/sextiarysector/module/ModuleSandpit.java @@ -0,0 +1,53 @@ +package shift.sextiarysector.module; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSItems; +import shift.sextiarysector.block.BlockSandpit; +import shift.sextiarysector.block.BlockSandpit.ShellEntry; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class ModuleSandpit implements IModule { + + private static ModuleSandpit instance; + + private ModuleSandpit() { + } + + public static ModuleSandpit getInstance() { + if(instance==null){ + instance = new ModuleSandpit(); + } + return instance; + } + + @Override + public void preInit(FMLPreInitializationEvent event) { + + } + + @Override + public void load(FMLInitializationEvent event) { + + } + + @Override + public void postInit(FMLPostInitializationEvent event) { + + BlockSandpit.addShell(new ItemStack(Items.stick), 20); + + BlockSandpit.addShell(new ItemStack(Items.glass_bottle), 2); + + BlockSandpit.addShell(new ShellEntry(new ItemStack(Items.book), 3).setEnchant()); + + BlockSandpit.addShell(new ItemStack(SSItems.laver), 12); + + BlockSandpit.addShell(new ItemStack(Items.redstone), 3); + BlockSandpit.addShell(new ItemStack(SSItems.blueStoneDust), 3); + BlockSandpit.addShell(new ItemStack(SSItems.yellowStoneDust), 3); + + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/FertilizerRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/FertilizerRecipeHandler.java index f6b19da..0116a5c 100644 --- a/src/main/java/shift/sextiarysector/nei/FertilizerRecipeHandler.java +++ b/src/main/java/shift/sextiarysector/nei/FertilizerRecipeHandler.java @@ -160,7 +160,7 @@ private String getHandlerName(){ return "SS_Fertilizer"; } private ArrayList getRecipe(){ - return FertilizerManager.fertilizers; + return FertilizerManager.normal; } String getGuiRecipeName(){ return "ss.fertilizer"; diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 6b684b5..1d6e028 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -9,6 +9,8 @@ import shift.mceconomy2.packet.PacketHandler; import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.entity.EntityMineboat; +import shift.sextiarysector.entity.EntityMineboatChest; import shift.sextiarysector.gui.tab.TabManager; import shift.sextiarysector.packet.PacketGuiId; import shift.sextiarysector.plugin.IPlugin; @@ -21,11 +23,13 @@ import shift.sextiarysector.renderer.block.RendererGearShaft; import shift.sextiarysector.renderer.block.RendererHole; import shift.sextiarysector.renderer.block.RendererMonitor; +import shift.sextiarysector.renderer.block.RendererPaddy; import shift.sextiarysector.renderer.block.RendererShaft; import shift.sextiarysector.renderer.block.RendererSmallWaterwheel; import shift.sextiarysector.renderer.block.RendererSmallWindmill; import shift.sextiarysector.renderer.block.RendererWindmill; import shift.sextiarysector.renderer.block.RendererWoodHopper; +import shift.sextiarysector.renderer.entity.RenderMineboat; import shift.sextiarysector.renderer.item.RenderGF; import shift.sextiarysector.tileentity.TileEntityBlockBottle; import shift.sextiarysector.tileentity.TileEntityFan; @@ -79,6 +83,8 @@ public void setCustomRenderers() { this.farmlandType = RenderingRegistry.getNextAvailableRenderId(); + this.paddyType = RenderingRegistry.getNextAvailableRenderId(); + RenderingRegistry.registerBlockHandler(new RendererHole()); RenderingRegistry.registerBlockHandler(new RendererBlockBottle()); @@ -102,6 +108,7 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererMonitor()); RenderingRegistry.registerBlockHandler(new RendererFarmland()); + RenderingRegistry.registerBlockHandler(new RendererPaddy()); this.setCustomClientRenderers(); @@ -110,6 +117,8 @@ public void setCustomRenderers() { @SideOnly(Side.CLIENT) public void setCustomClientRenderers() { + //ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCraftFurnace.class, new RendererCraftFurnace()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShaft.class, new RendererShaft()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlockBottle.class, new RendererBlockBottle()); @@ -128,6 +137,9 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySSChest.class, new RendererChest()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMonitor.class, new RendererMonitor()); + RenderingRegistry.registerEntityRenderingHandler(EntityMineboatChest.class, new RenderMineboat()); + RenderingRegistry.registerEntityRenderingHandler(EntityMineboat.class, new RenderMineboat()); + } @Override diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 57ed8b4..2dad813 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -29,6 +29,7 @@ public class CommonProxy { public int chestType; public int farmlandType; + public int paddyType; public EntityPlayer getClientPlayer(){ diff --git a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java index e62a227..8074523 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java @@ -55,7 +55,7 @@ public ItemStack getResult(ItemStack item) } while (!this.checkItem(item, (ItemStack)entry.getKey())); - return (ItemStack) ((Object[])entry.getValue())[0]; + return ((ItemStack) ((Object[])entry.getValue())[0]).copy(); //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); } @@ -89,7 +89,7 @@ public FluidStack getFluidResult(ItemStack item) } while (!this.checkItem(item, (ItemStack)entry.getKey())); - return (FluidStack) ((Object[])entry.getValue())[1]; + return ((FluidStack) ((Object[])entry.getValue())[1]).copy(); //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleMachine.java index c2fa4cb..d46de88 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleMachine.java @@ -53,7 +53,7 @@ public ItemStack getResult(ItemStack item) } while (!this.checkItem(item, (ItemStack)entry.getKey())); - return (ItemStack) entry.getValue(); + return ((ItemStack) entry.getValue()).copy(); //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index e51b558..03ce416 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -34,6 +34,13 @@ public static void addRecipes(CraftingManager p_77608_1_) 'y', "plateWood", })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.mineboatChest, 1), + new Object[] { + "x", "y", + 'x', Blocks.chest, + 'y', Items.boat, + })); + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java index b8a4da6..71b255a 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java @@ -11,8 +11,9 @@ public static void addRecipes() { GameRegistry.addSmelting(new ItemStack(SSItems.ironDust),new ItemStack(Items.iron_ingot),0.1f); GameRegistry.addSmelting(new ItemStack(SSItems.goldDust),new ItemStack(Items.gold_ingot),0.1f); - GameRegistry.addSmelting(new ItemStack(SSItems.blueStoneDust),new ItemStack(SSItems.blueStoneIngot),0.1f); - GameRegistry.addSmelting(new ItemStack(SSItems.yellowStoneDust),new ItemStack(SSItems.yellowStoneIngot),0.1f); + + GameRegistry.addSmelting(new ItemStack(SSItems.laver),new ItemStack(SSItems.laverRoasted),0.1f); + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index 4f2f2e5..d966685 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -30,7 +30,7 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.slime_ball, 2), new Object[] { SSItems.dustWaterLily, - "craftingSugar", + "condimentSugar", Items.water_bucket, })); @@ -110,6 +110,53 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) Character.valueOf('z'), Items.clock, })); + //料理 + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.curryRice, 1), + new Object[] { + "containerWoodBowl", + "condimentCurryPowder", + "cookingRice", + "cropPotato", + "cropCarrot" + })); + + + //スープ + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.carrotSoup, 1), + new Object[] { + "containerWoodBowl", + "fluidWater", + "cropCarrot" + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.cornSoup, 1), + new Object[] { + "containerWoodBowl", + "fluidWater", + "cropCorn" + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.eggSoup, 1), + new Object[] { + "containerWoodBowl", + "fluidWater", + "eggChicken" + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.onionSoup, 1), + new Object[] { + "containerWoodBowl", + "fluidWater", + "cropOnion" + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.tomatoSoup, 1), + new Object[] { + "containerWoodBowl", + "fluidWater", + "cropTomato" + })); + } public static void addVanillaRecipes() diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java index b798e86..98e2695 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java @@ -8,7 +8,7 @@ public class RecipesMagicFuel { public static void addRecipes(RecipeSimpleFuel recipe) { recipe.add(new ItemStack(Items.ender_pearl,1), 1000); - recipe.add("redBluestone", 400); + recipe.add("dustRedstone", 400); recipe.add("dustBluestone", 400); recipe.add("dustYellowstone", 400); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java index 800008a..9f5b654 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java @@ -12,6 +12,10 @@ public static void addRecipes(RecipeSimpleMachine recipe) recipe.add(new ItemStack(SSBlocks.mithrilOre,1),new ItemStack(SSItems.mithrilIngot, 1)); recipe.add(new ItemStack(Items.slime_ball,1),new ItemStack(Items.ender_pearl, 1)); recipe.add(new ItemStack(Items.gunpowder,1),new ItemStack(Items.blaze_powder, 1)); + + recipe.add("dustBluestone",new ItemStack(SSItems.blueStoneIngot)); + recipe.add("dustYellowstone",new ItemStack(SSItems.yellowStoneIngot)); + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMillstone.java b/src/main/java/shift/sextiarysector/recipe/RecipesMillstone.java index 509e5c5..c06af10 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMillstone.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMillstone.java @@ -21,6 +21,7 @@ public static void addRecipes(RecipeSimpleMachine recipe) //Mod recipe.add(new ItemStack(Blocks.waterlily,1),new ItemStack(SSItems.dustWaterLily, 4)); + recipe.add("cropRice",new ItemStack(SSItems.whiteRice, 2)); } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererCraftFurnace.java b/src/main/java/shift/sextiarysector/renderer/block/RendererCraftFurnace.java new file mode 100644 index 0000000..22231d8 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererCraftFurnace.java @@ -0,0 +1,61 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.renderer.model.ModelCraftFurnace; +import shift.sextiarysector.tileentity.TileEntityCraftFurnace; + +public class RendererCraftFurnace extends TileEntitySpecialRenderer{ + + private static final ResourceLocation craftFurnaceTextures = new ResourceLocation("sextiarysector:textures/models/craft_furnace.png"); + + static public ModelCraftFurnace modelCraftFurnace = new ModelCraftFurnace(); + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x,double y, double z, float p_147500_8_) { + + + TileEntityCraftFurnace tile = (TileEntityCraftFurnace)tileentity; + + + if(!tile.isLarge())return; + + + //System.out.println("renderTileEntityAt"); + + GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + float scale = 0.0625f + 0.0001f; + GL11.glScalef(scale,scale,scale); + + this.bindTexture(craftFurnaceTextures); + + switch(tile.direction){ + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 1, 0, 0); + GL11.glRotatef(180, 0, 1, 0); + break; + case NORTH: + GL11.glRotatef(180, 1, 0, 0); + break; + default: + break; + } + + modelCraftFurnace.render(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererFarmland.java b/src/main/java/shift/sextiarysector/renderer/block/RendererFarmland.java index 23c9719..9986a46 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererFarmland.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererFarmland.java @@ -51,7 +51,7 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block bl if(t!=null&&t.getFertilizer()!=null){ if(FertilizerManager.getFertilizer(t.getFertilizer())!=null){ - renderer.setOverrideBlockTexture(FertilizerManager.getFertilizer(t.getFertilizer()).getFertilizerIcon()); + renderer.setOverrideBlockTexture(FertilizerManager.getFertilizerIcon(t.getFertilizer()).getFertilizerIcon()); }else{ t.setFertilizer(null); } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererHole.java b/src/main/java/shift/sextiarysector/renderer/block/RendererHole.java index 1f8a39e..d35db4e 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererHole.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererHole.java @@ -86,17 +86,6 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block bl //IIcon iicon = BlockLiquid.getLiquidIcon("water_still"); //this.renderer.renderFaceYPos(block, (double)x, (double)((float)y - 1.0F + (15f/16f)), (double)z, iicon); - - if(world.getBlockMetadata(x, y, z)==1){ - this.renderer.setRenderBounds(minx, 0.3125F, minz, maxx , 0.9375F, maxz); - this.renderer.setOverrideBlockTexture(Blocks.water.getIcon(0, 0)); - this.renderer.renderStandardBlock(block, x, y, z,ForgeDirection.getOrientation(1)); - this.renderer.clearOverrideBlockTexture(); - - this.renderer.clearOverrideBlockTexture(); - } - - this.renderer.field_152631_f = false; this.renderer.renderAllFaces = false; @@ -137,7 +126,7 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block bl } - private boolean isSame(IBlockAccess p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_ ,Block b, ForgeDirection d){ + protected boolean isSame(IBlockAccess p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_ ,Block b, ForgeDirection d){ if(p_149743_1_.getBlock(p_149743_2_ + d.offsetX, p_149743_3_ + d.offsetY, p_149743_4_ + d.offsetZ) == b)return true; diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererPaddy.java b/src/main/java/shift/sextiarysector/renderer/block/RendererPaddy.java new file mode 100644 index 0000000..c241b82 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererPaddy.java @@ -0,0 +1,85 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.init.Blocks; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.module.FertilizerManager; +import shift.sextiarysector.tileentity.TileEntityPaddy; + +public class RendererPaddy extends RendererHole{ + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block block, int modelId, RenderBlocks renderer) { + + super.renderWorldBlock(world, x, y, z, block, modelId, renderer); + + this.renderer.renderAllFaces = true; + this.renderer.field_152631_f = true; + + + float f = 0.125F; + + float minx = 0; + float minz = 0; + float maxx = 1; + float maxz = 1; + + + if(!this.isSame(world, x, y, z,block, ForgeDirection.getOrientation(4))){ + minx = f; + } + + if(!this.isSame(world, x, y, z,block, ForgeDirection.getOrientation(2))){ + minz = f; + } + + if(!this.isSame(world, x, y, z,block, ForgeDirection.getOrientation(5))){ + maxx = 1-f; + } + + if(!this.isSame(world, x, y, z,block, ForgeDirection.getOrientation(3))){ + maxz = 1-f; + } + + //水の描写 + //renderer.setRenderBounds(minx, 0.3125F, minz, maxx , 0.9375F, maxz); + renderer.setRenderBounds(minx, 0.9375F-0.001f, minz, maxx , 0.9375F, maxz); + renderer.setOverrideBlockTexture(Blocks.water.getIcon(0, 0)); + renderer.renderStandardBlock(block, x, y, z); + renderer.clearOverrideBlockTexture(); + + this.renderer.clearOverrideBlockTexture(); + // + + TileEntityPaddy t = (TileEntityPaddy) world.getTileEntity(x, y, z); + + if(t!=null&&t.getFertilizer()!=null){ + + if(FertilizerManager.getFertilizer(t.getFertilizer())!=null){ + renderer.setOverrideBlockTexture(FertilizerManager.getFertilizerIcon(t.getFertilizer()).getFertilizerIcon()); + }else{ + t.setFertilizer(null); + } + + renderer.setRenderBounds(minx, 1 - 0.01f, minz, maxx , 1 - 0.009f, maxz); + renderer.renderStandardBlock(block, x, y, z); + } + + renderer.clearOverrideBlockTexture(); + + this.renderer.field_152631_f = false; + this.renderer.renderAllFaces = false; + + return true; + + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.paddyType; + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/entity/RenderMineboat.java b/src/main/java/shift/sextiarysector/renderer/entity/RenderMineboat.java new file mode 100644 index 0000000..1f438fe --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/entity/RenderMineboat.java @@ -0,0 +1,90 @@ +package shift.sextiarysector.renderer.entity; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.entity.RenderBoat; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.Entity; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.entity.EntityMineboat; +import shift.sextiarysector.renderer.model.ModelMineboat; + +public class RenderMineboat extends RenderBoat{ + + private static final ResourceLocation field_110782_f = new ResourceLocation("textures/entity/boat.png"); + + protected final RenderBlocks field_94145_f; + + public RenderMineboat() + { + this.shadowSize = 0.5F; + this.modelBoat = new ModelMineboat(); + // + this.field_94145_f = new RenderBlocks(); + } + + public void renderMineboat(EntityMineboat par1EntityBoat, double par2, double par4, double par6, float par8, float par9) + { + GL11.glPushMatrix(); + GL11.glTranslatef((float)par2, (float)par4, (float)par6); + GL11.glRotatef(180.0F - par8, 0.0F, 1.0F, 0.0F); + float f2 = par1EntityBoat.getTimeSinceHit() - par9; + float f3 = par1EntityBoat.getDamageTaken() - par9; + + if (f3 < 0.0F) + { + f3 = 0.0F; + } + + if (f2 > 0.0F) + { + GL11.glRotatef(MathHelper.sin(f2) * f2 * f3 / 10.0F * par1EntityBoat.getForwardDirection(), 1.0F, 0.0F, 0.0F); + } + + //kokokara + int j = 4;//par1EntityBoat.getDisplayTileOffset(); + Block block = par1EntityBoat.getDisplayTile(); + int k = par1EntityBoat.getDisplayTileData(); + + if (block != null) + { + GL11.glPushMatrix(); + this.bindTexture(TextureMap.locationBlocksTexture); + float f8 = 1.0f;//0.75F; + GL11.glScalef(f8, f8, f8); + GL11.glTranslatef(0.0F, j / 16.0F, 0.0F); + this.renderBlockInMinecart(par1EntityBoat, par9, block, k); + GL11.glPopMatrix(); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.bindEntityTexture(par1EntityBoat); + } + //kokomade + + float f4 = 0.75F; + GL11.glScalef(f4, f4, f4); + GL11.glScalef(1.0F / f4, 1.0F / f4, 1.0F / f4); + this.bindEntityTexture(par1EntityBoat); + GL11.glScalef(-1.0F, -1.0F, 1.0F); + this.modelBoat.render(par1EntityBoat, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + } + + // + protected void renderBlockInMinecart(EntityMineboat par1EntityMineboat, float par2, Block par3Block, int par4) + { + float f1 = par1EntityMineboat.getBrightness(par2); + GL11.glPushMatrix(); + this.field_94145_f.renderBlockAsItem(par3Block, par4, f1); + GL11.glPopMatrix(); + } + + @Override + public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) + { + this.renderMineboat((EntityMineboat)par1Entity, par2, par4, par6, par8, par9); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelCraftFurnace.java b/src/main/java/shift/sextiarysector/renderer/model/ModelCraftFurnace.java new file mode 100644 index 0000000..48633d5 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelCraftFurnace.java @@ -0,0 +1,34 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelCraftFurnace extends ModelBase { + + ModelRenderer Shape1; + + public ModelCraftFurnace() { + textureWidth = 256; + textureHeight = 128; + + Shape1 = new ModelRenderer(this, 0, 0); + Shape1.addBox(-24F, -24F, -24F, 48, 48, 48); + Shape1.setRotationPoint(0F, 0F, 0F); + Shape1.setTextureSize(256, 128); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + } + + 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); + Shape1.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelMineboat.java b/src/main/java/shift/sextiarysector/renderer/model/ModelMineboat.java new file mode 100644 index 0000000..4f4b9f6 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelMineboat.java @@ -0,0 +1,55 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBoat; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelMineboat extends ModelBoat{ + + public ModelRenderer[] boatSides = new ModelRenderer[7]; + + public ModelMineboat() + { + this.boatSides[0] = new ModelRenderer(this, 0, 8); + this.boatSides[1] = new ModelRenderer(this, 0, 0); + this.boatSides[2] = new ModelRenderer(this, 0, 0); + this.boatSides[3] = new ModelRenderer(this, 0, 0); + this.boatSides[4] = new ModelRenderer(this, 0, 0); + this.boatSides[5] = new ModelRenderer(this, 44, 10); + byte b0 = 24; + byte b1 = 6; + byte b2 = 20; + byte b3 = 4; + this.boatSides[0].addBox(-b0 / 2, -b2 / 2 + 2, -3.0F, b0, b2 - 4, 4, 0.0F); + this.boatSides[0].setRotationPoint(0.0F, b3, 0.0F); + this.boatSides[5].addBox(-b0 / 2 + 1, -b2 / 2 + 1, -1.0F, b0 - 2, b2 - 2, 1, 0.0F); + this.boatSides[5].setRotationPoint(0.0F, b3, 0.0F); + this.boatSides[1].addBox(-b0 / 2 + 2, -b1 - 1, -1.0F, b0 - 4, b1, 2, 0.0F); + this.boatSides[1].setRotationPoint(-b0 / 2 + 1, b3, 0.0F); + this.boatSides[2].addBox(-b0 / 2 + 2, -b1 - 1, -1.0F, b0 - 4, b1, 2, 0.0F); + this.boatSides[2].setRotationPoint(b0 / 2 - 1, b3, 0.0F); + this.boatSides[3].addBox(-b0 / 2 + 2, -b1 - 1, -1.0F, b0 - 4, b1, 2, 0.0F); + this.boatSides[3].setRotationPoint(0.0F, b3, -b2 / 2 + 1); + this.boatSides[4].addBox(-b0 / 2 + 2, -b1 - 1, -1.0F, b0 - 4, b1, 2, 0.0F); + this.boatSides[4].setRotationPoint(0.0F, b3, b2 / 2 - 1); + this.boatSides[0].rotateAngleX = ((float)Math.PI / 2F); + this.boatSides[1].rotateAngleY = ((float)Math.PI * 3F / 2F); + this.boatSides[2].rotateAngleY = ((float)Math.PI / 2F); + this.boatSides[3].rotateAngleY = (float)Math.PI; + this.boatSides[5].rotateAngleX = -((float)Math.PI / 2F); + } + + /** + * Sets the models various rotation angles then renders the model. + */ + @Override + public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) + { + this.boatSides[5].rotationPointY = 4.0F - par4; + + for (int i = 0; i < 6; ++i) + { + this.boatSides[i].render(par7); + } + } +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityCraftFurnace.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityCraftFurnace.java new file mode 100644 index 0000000..ef51e20 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityCraftFurnace.java @@ -0,0 +1,384 @@ +package shift.sextiarysector.tileentity; + +import java.util.UUID; + +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntityFurnace; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; +import shift.sextiarysector.container.InventoryFurnaceCrafting; +import shift.sextiarysector.container.ItemBox; +import shift.sextiarysector.recipe.FurnaceCraftingManager; + +import com.mojang.authlib.GameProfile; + +public class TileEntityCraftFurnace extends TileEntitySimpleFurnace { + + protected static final int[] slots_top = new int[] { 2,3,4,5,6,7,8,9,10 }; + protected static final int[] slots_bottom = new int[] { 1, 0 }; + protected static final int[] slots_sides = new int[] { 1 }; + + protected static FakePlayer player;// = new FakePlayer(worldObj, null); + + private int time = 0; + + //0 燃料 ,1 完成品 + protected ItemBox items = new ItemBox("Base", 2); + + //2,3,4,5,6,7,8,9,10 素材 + public InventoryFurnaceCrafting craftMatrix = new InventoryFurnaceCrafting(3, 3); + + + private boolean large = false; + + + @Override + public void updateServerEntity() + { + super.updateServerEntity(); + + if(large)return; + + if(time<=100){ + time++; + return; + }else{ + time = 0; + } + + + if(!checkLarge()){ + return; + }else{ + this.large = true; + setLarge(); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + private boolean checkLarge(){ + + System.out.println("AAA"); + int h = 1; + + for(int i = h*-1; i<=h; i++){ + for(int j = h*-1; j<=h; j++){ + for(int k = h*-1; k<=h; k++){ + + if(i == 0 && j == 0 && k==0)continue; + + int x = this.xCoord + i; + int y = this.yCoord + j; + int z = this.zCoord + k; + + //if(this.worldObj.getBlock(x, y, z) != SSBlocks.stoneFrame)return false; + + } + } + } + + return true; + } + + private void setLarge(){ + + int h = 1; + + for(int i = h*-1; i<=h; i++){ + for(int j = h*-1; j<=h; j++){ + for(int k = h*-1; k<=h; k++){ + + if(i == 0 && j == 0 && k==0)continue; + + int x = this.xCoord + i; + int y = this.yCoord + j; + int z = this.zCoord + k; + + TileEntityStoneFrame t = (TileEntityStoneFrame) this.worldObj.getTileEntity(x, y, z); + + t.setLarge(xCoord, yCoord, zCoord); + + } + } + } + + } + + public void breakLarge(){ + + int h = 1; + + for(int i = h*-1; i<=h; i++){ + for(int j = h*-1; j<=h; j++){ + for(int k = h*-1; k<=h; k++){ + + if(i == 0 && j == 0 && k==0)continue; + + int x = this.xCoord + i; + int y = this.yCoord + j; + int z = this.zCoord + k; + + TileEntityStoneFrame t = (TileEntityStoneFrame) this.worldObj.getTileEntity(x, y, z); + + t.large = false; + + Block block = this.worldObj.getBlock(x, y, z); + block.dropBlockAsItem(worldObj, x, y, z, 0, 0); + worldObj.setBlock(x, y, z, Blocks.air, 0, 3); + + + this.worldObj.markBlockForUpdate(x, y, z); + + } + } + } + + Block block = this.worldObj.getBlock(xCoord, yCoord, zCoord); + block.dropBlockAsItem(worldObj, xCoord, yCoord, zCoord, 0, 0); + worldObj.setBlock(xCoord, yCoord, zCoord, Blocks.air, 0, 3); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + + public boolean canWork() + { + if (!hasMaterialItems() || !isLarge())return false; + + + ItemStack itemstack = this.getResult(); + + if (itemstack == null) return false; + + return this.checkItem(itemstack) ; + + } + + public boolean isLarge(){ + + return large; + + } + + private boolean hasMaterialItems(){ + + for(ItemStack item : craftMatrix.stackList){ + if(item!=null)return true; + } + + return false; + } + + public void workItem() + { + if (this.canWork()) + { + ItemStack itemstack = this.getResult(); + + //item + if (this.getItems().getStackInSlot(getResultItemSlot()) == null) + { + this.setInventorySlotContents(getResultItemSlot(), itemstack.copy()); + } + else if (this.getItems().getStackInSlot(getResultItemSlot()).isItemEqual(itemstack)) + { + this.getItems().getStackInSlot(getResultItemSlot()).stackSize += itemstack.stackSize; + } + + this.reduceMaterialStackSize(); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + } + + + @Override + protected ItemStack getFuelItem() { + return items.getStackInSlot(0); + } + + protected int getFuelItemSlot(){ + return 0; + } + + @Override + protected void reduceFuelStackSize(){ + this.items.reduceStackSize(0, 1); + } + + @Override + @Deprecated + protected ItemStack getMaterialItem() { + return null; + } + + @Override + protected int getResultItemSlot(){ + return 1; + } + + @Override + protected void reduceMaterialStackSize() { + + for (int i = 0; i < this.craftMatrix.getSizeInventory(); ++i) + { + ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i); + + if (itemstack1 != null) + { + this.craftMatrix.decrStackSize(i, 1); + + if (itemstack1.getItem().hasContainerItem(itemstack1)) + { + ItemStack itemstack2 = itemstack1.getItem().getContainerItem(itemstack1); + + if(itemstack2 == null){ + continue; + } + + if (itemstack2 != null && itemstack2.isItemStackDamageable() && itemstack2.getItemDamage() > itemstack2.getMaxDamage()) + { + MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(player, itemstack2)); + continue; + } + + if (!itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1)) + { + if (this.craftMatrix.getStackInSlot(i) == null) + { + this.craftMatrix.setInventorySlotContents(i, itemstack2); + } + else + { + this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, xCoord + 0.5f, yCoord + 3, zCoord + 0.5f, itemstack2)); + } + } + } + } + } + + } + + private FakePlayer getFakePlayer(){ + + if(player == null){ + this.player = new FakePlayer((WorldServer) this.worldObj, new GameProfile(new UUID(66, 66), "CraftFurnace")); + } + + return player; + } + + private ItemStack getResult() { + return FurnaceCraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); + } + + @Override + @Deprecated + protected ItemStack getResult(ItemStack stackInSlot) { + return this.getResult(); + } + + @Override + public int getItemFuelTime(ItemStack p_145952_0_) + { + if (p_145952_0_ == null) + { + return 0; + } + else + { + return TileEntityFurnace.getItemBurnTime(p_145952_0_); + } + } + + @Override + protected ItemBox getItems() { + return items; + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + + if(i == 0|| i ==1){ + getItems().setInventorySlotContents(i, itemstack); + }else if(2<=i && i <=10){ + this.craftMatrix.setInventorySlotContents(i - 2, itemstack); + } + } + + @Override + public String getInventoryName() { + return "gui.ss.craft_furnace"; + } + + @Override + public void markDirty(){ + super.markDirty(); + this.craftMatrix.markDirty(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer.getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 128.0D; + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + if (i == 0) { + return this.getItemFuelTime(itemstack) > 0; + } + + return i != 1; + } + + //ISidedInventory関係 + @Override + public int[] getAccessibleSlotsFromSide(int var1) { + return var1 == 0 ? slots_bottom : (var1 == 1 ? slots_top : slots_sides); + } + + @Override + public boolean canInsertItem(int i, ItemStack itemstack, int j) { + return this.isItemValidForSlot(i, itemstack); + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) + { + return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket; + } + + //NBT関係 + @Override + public void readFromNBT(NBTTagCompound nbt) { + + super.readFromNBT(nbt); + items.readFromNBT(nbt); + craftMatrix.readFromNBT(nbt); + large = nbt.getBoolean("large"); + + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + + super.writeToNBT(nbt); + items.writeToNBT(nbt); + craftMatrix.writeToNBT(nbt); + nbt.setBoolean("large", large); + + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFarmland.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFarmland.java index 5f95a7f..323200d 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFarmland.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFarmland.java @@ -14,8 +14,9 @@ import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.api.agriculture.IFarmland; -public class TileEntityFarmland extends TileEntity implements IFluidHandler{ +public class TileEntityFarmland extends TileEntity implements IFluidHandler , IFarmland{ //水 protected FluidTank water = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME); @@ -43,8 +44,8 @@ public void updateServerEntity() { } //肥料 - public String fertilizer; - public ItemStack fertilizerItem; + //public String fertilizer; + private ItemStack fertilizerItem; public ItemStack getFertilizer() { return fertilizerItem; @@ -74,9 +75,9 @@ public void growth(){ @Override public void readFromNBT(NBTTagCompound par1nbtTagCompound) { super.readFromNBT(par1nbtTagCompound); - if(par1nbtTagCompound.hasKey("fertilizer")){ - this.fertilizer = par1nbtTagCompound.getString("fertilizer"); - } + //if(par1nbtTagCompound.hasKey("fertilizer")){ + // this.fertilizer = par1nbtTagCompound.getString("fertilizer"); + //} if(par1nbtTagCompound.hasKey("fertilizeritem")){ this.fertilizerItem = ItemStack.loadItemStackFromNBT(par1nbtTagCompound.getCompoundTag("fertilizeritem")); } @@ -87,7 +88,7 @@ public void readFromNBT(NBTTagCompound par1nbtTagCompound) { @Override public void writeToNBT(NBTTagCompound par1nbtTagCompound) { super.writeToNBT(par1nbtTagCompound); - if(fertilizer!=null)par1nbtTagCompound.setString("fertilizer", fertilizer); + //if(fertilizer!=null)par1nbtTagCompound.setString("fertilizer", fertilizer); if(fertilizerItem!=null){ NBTTagCompound itemNBT =new NBTTagCompound(); fertilizerItem.writeToNBT(itemNBT); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java index 2432a29..e28a059 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java @@ -16,15 +16,17 @@ import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import shift.sextiarysector.api.machine.item.GearForceItem; import shift.sextiarysector.container.ItemBox; public abstract class TileEntityFluidMachineBase extends TileEntityDirection implements ISidedInventory, IFluidHandler { - protected static final int[] slots_top = new int[] { 0 }; - protected static final int[] slots_bottom = new int[] { 2, 1 }; + protected static final int[] slots_top = new int[] { 0, 4 }; + protected static final int[] slots_bottom = new int[] { 2, 1, 3, 5 }; protected static final int[] slots_sides = new int[] { 1 }; + protected static final int[] material = new int[] { 0 }; + protected static final int[] empty_bottle = new int[] { 4 }; + //0 素材 ,1 燃料 ,2 完成品 ,3 素材のコンテナ ,4 空のボトル , 5 液体の入ったボトル protected ItemBox items = new ItemBox("Base", 6); @@ -159,9 +161,16 @@ protected void chargeFuel(){ if(TileEntityFurnace.isItemFuel(this.items.getStackInSlot(1))){ this.fuel = this.fuelMax = TileEntityFurnace.getItemBurnTime(this.items.getStackInSlot(1)); - this.items.reduceStackSize(1, 1); + + if(this.items.getStackInSlot(1).stackSize == 1){ + this.items.setInventorySlotContents(1, this.items.getStackInSlot(1).getItem().getContainerItem(this.items.getStackInSlot(1))); + }else{ + this.items.reduceStackSize(1, 1); + } + this.markDirty(); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } } @@ -340,20 +349,39 @@ public void openInventory() { public void closeInventory() { } + /*入れる*/ @Override public boolean isItemValidForSlot(int i, ItemStack itemstack) { if (i == 1) { - return GearForceItem.manager.isGearForceItem(itemstack); + return TileEntityFurnace.getItemBurnTime(itemstack) > 0; } - return i != 2; + return i == 0 || i == 1 || i == 4 ; } //ISidedInventory関係 + //0 素材 ,1 燃料 ,2 完成品 ,3 素材のコンテナ ,4 空のボトル , 5 液体の入ったボトル @Override public int[] getAccessibleSlotsFromSide(int var1) { - return var1 == 0 ? slots_bottom : (var1 == 1 ? slots_top : slots_sides); + + if(var1 == 0){ + return slots_bottom; + } + + if(var1 == 1){ + return slots_top; + } + + if(var1 == this.getDirection().ordinal()){ + return this.material; + } + + if(var1 == this.getDirection().getOpposite().ordinal()){ + return this.empty_bottle; + } + + return slots_sides; } @Override @@ -364,7 +392,16 @@ public boolean canInsertItem(int i, ItemStack itemstack, int j) { @Override public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) { - return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket; + + if(p_102008_1_ == 2 || p_102008_1_ == 3 || p_102008_1_ == 5){ + return true; + } + + if(p_102008_3_ == 0 && p_102008_2_.getItem() == Items.bucket){ + return true; + } + + return false; } //IFluidHandler関係 diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityMagicFurnace.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityMagicFurnace.java index 385be18..4749e08 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityMagicFurnace.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityMagicFurnace.java @@ -1,17 +1,13 @@ package shift.sextiarysector.tileentity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.NetworkManager; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import shift.sextiarysector.SSRecipes; -import shift.sextiarysector.api.machine.item.GearForceItem; import shift.sextiarysector.container.ItemBox; -public class TileEntityMagicFurnace extends TileEntityDirection implements ISidedInventory{ +public class TileEntityMagicFurnace extends TileEntitySimpleFurnace{ protected static final int[] slots_top = new int[] { 0 }; protected static final int[] slots_bottom = new int[] { 2, 1 }; @@ -20,130 +16,35 @@ public class TileEntityMagicFurnace extends TileEntityDirection implements ISide //0 素材 ,1 燃料 ,2 完成品 protected ItemBox items = new ItemBox("Base", 3); - //作業の進捗 - public int machineWorkProgressTime; - - //作業の進捗の最大値 この数字になると完了する - public int machineMaxProgressTime = 200; - - //燃料と投入されている燃料のマックス状態の量 - public int fuel; - public int fuelMax; - - @Override - public void updateEntity() - { - super.updateEntity(); - if (this.worldObj.isRemote) { - this.updateClientEntity(); - } else { - - this.updateServerEntity(); - - } - + protected ItemStack getFuelItem(){ + return this.items.getStackInSlot(1); } - public void updateClientEntity() - { + protected int getFuelItemSlot(){ + return 1; } - public void updateServerEntity() - { - if(fuel>0){ - fuel--; - if(fuel==0){ - this.fuelMax=0; - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - }else{ - if(this.canWork()){ - this.chargeFuel(); - } - - } - - if(this.isFuel() && this.canWork()){ - - machineWorkProgressTime++; - - if(machineWorkProgressTime>=machineMaxProgressTime){ - this.workItem(); - machineWorkProgressTime=0; - } - - } - + protected void reduceFuelStackSize(){ + this.items.reduceStackSize(1, 1); } - - private void chargeFuel(){ - - if(this.isItemFuel(this.items.getStackInSlot(1))){ - this.fuel = this.fuelMax = this.getItemMagicTime(this.items.getStackInSlot(1)); - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - + protected ItemStack getMaterialItem(){ + return this.items.getStackInSlot(0); } - public boolean isFuel() - { - return this.fuel > 0; - } - - public boolean canWork() - { - if (this.items.getStackInSlot(0) == null) - { - return false; - } - else - { - ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); - if (itemstack == null) return false; - return this.checkItem(itemstack) ; - } - } - - private boolean checkItem(ItemStack itemstack){ - - if (this.items.getStackInSlot(2) == null || itemstack == null) return true; - if (!this.items.getStackInSlot(2).isItemEqual(itemstack)) return false; - int result = this.items.getStackInSlot(2).stackSize + itemstack.stackSize; - return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); + protected int getResultItemSlot(){ + return 2; } - public void workItem() - { - if (this.canWork()) - { - ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); - - //item - if (this.items.getStackInSlot(2) == null) - { - this.setInventorySlotContents(2, itemstack.copy()); - } - else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) - { - this.items.getStackInSlot(2).stackSize += itemstack.stackSize; - } - - this.items.reduceStackSize(0, 1); - - this.markDirty(); - - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - - } - } - + protected void reduceMaterialStackSize(){ + this.items.reduceStackSize(0, 1); + } - private ItemStack getResult(ItemStack stackInSlot) { + protected ItemStack getResult(ItemStack stackInSlot) { return SSRecipes.magicFurnace.getResult(stackInSlot); } - public static int getItemMagicTime(ItemStack p_145952_0_) + public int getItemFuelTime(ItemStack p_145952_0_) { if (p_145952_0_ == null) { @@ -155,109 +56,8 @@ public static int getItemMagicTime(ItemStack p_145952_0_) } } - public static boolean isItemFuel(ItemStack p_145954_0_) - { - return getItemMagicTime(p_145954_0_) > 0; - } - - //GUI - public int getWorkProgressScaled(int par1) - { - return this.machineWorkProgressTime / (machineMaxProgressTime / par1); - } - - public int getEnergyProgressScaled(int par1) - { - return (int) (this.fuel / (this.fuelMax / par1)); - } - - - //IInventory関係 - @Override - public int getSizeInventory() { - return items.getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(int i) { - return items.getStackInSlot(i); - } - - @Override - public ItemStack decrStackSize(int i, int j) { - return items.decrStackSize(i, j); - } - - @Override - public ItemStack getStackInSlotOnClosing(int i) { - return items.getStackInSlotOnClosing(i); - } - - @Override - public void setInventorySlotContents(int i, ItemStack itemstack) { - items.setInventorySlotContents(i, itemstack); - } - - @Override - public String getInventoryName() { - return "gui.ss.magic_furnace";//+SimpleMachine.values()[this.worldObj.getBlockMetadata(xCoord, yCoord, zCoord)].icon+".name"; - } - - @Override - public boolean hasCustomInventoryName() { - return false; - } - - @Override - public int getInventoryStackLimit() { - return items.getInventoryStackLimit(); - } - - @Override - public void markDirty(){ - super.markDirty(); - items.onInventoryChanged(); - } - - @Override - public boolean isUseableByPlayer(EntityPlayer entityplayer) { - return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer - .getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; - } - - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { - } - - @Override - public boolean isItemValidForSlot(int i, ItemStack itemstack) { - - if (i == 1) { - return GearForceItem.manager.isGearForceItem(itemstack); - } - - return i != 2; - } - - //ISidedInventory関係 - @Override - public int[] getAccessibleSlotsFromSide(int var1) { - return var1 == 0 ? slots_bottom : (var1 == 1 ? slots_top : slots_sides); - } - - @Override - public boolean canInsertItem(int i, ItemStack itemstack, int j) { - return this.isItemValidForSlot(i, itemstack); - } - - @Override - public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) - { - return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket; + protected ItemBox getItems(){ + return items; } //NBT関係 @@ -266,9 +66,7 @@ public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); items.readFromNBT(nbt); - this.machineWorkProgressTime = nbt.getShort("WorkTime"); - this.fuel = nbt.getInteger("fuel"); - this.fuelMax = nbt.getInteger("fuelMax"); + } @Override @@ -276,9 +74,7 @@ public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); items.writeToNBT(nbt); - nbt.setShort("WorkTime", (short)this.machineWorkProgressTime); - nbt.setInteger("fuel", this.fuel); - nbt.setInteger("fuelMax", this.fuelMax); + } @Override diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityPaddy.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityPaddy.java new file mode 100644 index 0000000..d61c64b --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityPaddy.java @@ -0,0 +1,114 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.api.agriculture.IFarmland; + +public class TileEntityPaddy extends TileEntity implements IFluidHandler , IFarmland{ + + protected FluidTank water = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME); + + private ItemStack fertilizerItem; + + public ItemStack getFertilizer() { + return fertilizerItem; + } + + public void setFertilizer(ItemStack fertilizer) { + if(fertilizer==null){ + this.fertilizerItem = null; + }else{ + this.fertilizerItem = fertilizer.copy(); + } + + } + + @Override + public boolean canGrowth() { + return true; + } + + @Override + public void growth() { + + } + + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + if(par1nbtTagCompound.hasKey("fertilizeritem")){ + this.fertilizerItem = ItemStack.loadItemStackFromNBT(par1nbtTagCompound.getCompoundTag("fertilizeritem")); + } + + this.water.readFromNBT(par1nbtTagCompound); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + + if(fertilizerItem!=null){ + NBTTagCompound itemNBT =new NBTTagCompound(); + fertilizerItem.writeToNBT(itemNBT); + par1nbtTagCompound.setTag("fertilizeritem", itemNBT); + } + + this.water.writeToNBT(par1nbtTagCompound); + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { + return 0; + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource,boolean doDrain) { + return null; + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { + return null; + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return false; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return false; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) { + return new FluidTankInfo[] { this.water.getInfo() }; + } + + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java index ce39e68..8228669 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java @@ -11,6 +11,7 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.api.agriculture.IFarmland; import shift.sextiarysector.api.season.Season; import shift.sextiarysector.api.season.SeasonAPI; import shift.sextiarysector.block.BlockSSCrop; @@ -37,7 +38,7 @@ public void updateEntity() { public void updateServerEntity() { - if(this.getBlockMetadata()==4 && this.getStatus().i.length<4){ + if(this.getBlockMetadata()==4 && !this.getStatus().isReHarvest()){ this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 3, 0); } @@ -91,43 +92,47 @@ private void growth(){ day++; + this.lastDay = SeasonAPI.getDay(getWorldObj()); + + ((TileEntityFarmland)this.worldObj.getTileEntity(this.xCoord,this.yCoord-1,this.zCoord)).growth(); + BlockSSCrop crop = (BlockSSCrop) this.getBlockType(); if(this.getBlockMetadata()<3){ - if(this.getStatus().i[this.getBlockMetadata()]<=day){ - this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, getBlockMetadata()+1, 4); - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - }else if(crop.canReHarvest()&&this.getBlockMetadata()==4&&this.getStatus().i.length==4){ - day2++; + if(this.day < this.getStatus().getDays()[this.getBlockMetadata()])return; - if(this.getStatus().i[3]<=day2){ - this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 3, 4); - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - } + this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, getBlockMetadata()+1, 4); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - this.lastDay = SeasonAPI.getDay(getWorldObj()); + }else if( crop.canReHarvest() && this.getBlockMetadata()==4 && this.getStatus().isReHarvest() ){ - ((TileEntityFarmland)this.worldObj.getTileEntity(this.xCoord,this.yCoord-1,this.zCoord)).growth(); - //System.out.println("GGGGGG"); + day2++; + + if(day2 < this.getStatus().getDays()[3])return ; + + this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 3, 4); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } } public void onHarvest(){ + this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 4, 4); this.day2=0; this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } private CropStatus getStatus(){ return ((BlockSSCrop)this.getBlockType()).getStatus(); } - private TileEntityFarmland getTileEntityFarmland(){ - return ((TileEntityFarmland)this.worldObj.getTileEntity(this.xCoord,this.yCoord-1,this.zCoord)); + private IFarmland getFarmland(){ + return ((IFarmland)this.worldObj.getBlock(this.xCoord,this.yCoord-1,this.zCoord)); } private BlockSSCrop getCrop(){ @@ -169,7 +174,7 @@ public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { if(this.hasFarmland()){ - return this.getTileEntityFarmland().fill(from, resource, doFill); + return this.getFarmland().fill(from, resource, doFill); } return 0; @@ -179,7 +184,7 @@ public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { public FluidStack drain(ForgeDirection from, FluidStack resource,boolean doDrain) { if(this.hasFarmland()){ - return this.getTileEntityFarmland().drain(from, resource, doDrain); + return this.getFarmland().drain(from, resource, doDrain); } return null; @@ -189,7 +194,7 @@ public FluidStack drain(ForgeDirection from, FluidStack resource,boolean doDrain public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { if(this.hasFarmland()){ - return this.getTileEntityFarmland().drain(from, maxDrain, doDrain); + return this.getFarmland().drain(from, maxDrain, doDrain); } return null; @@ -199,7 +204,7 @@ public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { public boolean canFill(ForgeDirection from, Fluid fluid) { if(this.hasFarmland()){ - return this.getTileEntityFarmland().canFill(from, fluid); + return this.getFarmland().canFill(from, fluid); } return false; @@ -209,7 +214,7 @@ public boolean canFill(ForgeDirection from, Fluid fluid) { public boolean canDrain(ForgeDirection from, Fluid fluid) { if(this.hasFarmland()){ - return this.getTileEntityFarmland().canDrain(from, fluid); + return this.getFarmland().canDrain(from, fluid); } return false; @@ -219,7 +224,7 @@ public boolean canDrain(ForgeDirection from, Fluid fluid) { public FluidTankInfo[] getTankInfo(ForgeDirection from) { if(this.hasFarmland()){ - return this.getTileEntityFarmland().getTankInfo(from); + return this.getFarmland().getTankInfo(from); } return null; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleFurnace.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleFurnace.java new file mode 100644 index 0000000..43842be --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleFurnace.java @@ -0,0 +1,298 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import shift.sextiarysector.container.ItemBox; + +public abstract class TileEntitySimpleFurnace extends TileEntityDirection implements ISidedInventory{ + + protected static final int[] slots_top = new int[] { 0 }; + protected static final int[] slots_bottom = new int[] { 2, 1 }; + protected static final int[] slots_sides = new int[] { 1 }; + + //0 素材 ,1 燃料 ,2 完成品 + //protected ItemBox items = new ItemBox("Base", 3); + + //作業の進捗 + public int machineWorkProgressTime; + + //作業の進捗の最大値 この数字になると完了する + public int machineMaxProgressTime = 200; + + //燃料と投入されている燃料のマックス状態の量 + public int fuel; + public int fuelMax; + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + } + + public void updateServerEntity() + { + if(fuel>0){ + fuel--; + if(fuel==0){ + this.fuelMax=0; + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + }else{ + if(this.canWork()){ + this.chargeFuel(); + } + + } + + if(this.isFuel() && this.canWork()){ + + machineWorkProgressTime++; + + if(machineWorkProgressTime>=machineMaxProgressTime){ + this.workItem(); + machineWorkProgressTime=0; + } + + } + + } + + + protected void chargeFuel(){ + + if(this.isItemFuel(this.getFuelItem() )){ + this.fuel = this.fuelMax = this.getItemFuelTime(this.getFuelItem()); + + if(this.getItems().getStackInSlot(getFuelItemSlot()).stackSize == 1){ + this.getItems().setInventorySlotContents(1, this.getItems().getStackInSlot(getFuelItemSlot()).getItem().getContainerItem(this.getItems().getStackInSlot(getFuelItemSlot()))); + }else{ + this.reduceFuelStackSize(); + } + + //this.reduceFuelStackSize(); + this.markDirty(); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + abstract protected ItemStack getFuelItem(); + + abstract protected int getFuelItemSlot(); + + abstract protected void reduceFuelStackSize(); + + public boolean isFuel() + { + return this.fuel > 0; + } + + public boolean canWork() + { + if (this.getMaterialItem() == null) + { + return false; + } + else + { + ItemStack itemstack = this.getResult(this.getMaterialItem()); + if (itemstack == null) return false; + return this.checkItem(itemstack) ; + } + } + + protected boolean checkItem(ItemStack itemstack){ + + if (this.getItems().getStackInSlot(getResultItemSlot()) == null || itemstack == null) return true; + if (!this.getItems().getStackInSlot(getResultItemSlot()).isItemEqual(itemstack)) return false; + int result = this.getItems().getStackInSlot(getResultItemSlot()).stackSize + itemstack.stackSize; + return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); + } + + public void workItem() + { + if (this.canWork()) + { + ItemStack itemstack = this.getResult(this.getMaterialItem()); + + //item + if (this.getItems().getStackInSlot(getResultItemSlot()) == null) + { + this.setInventorySlotContents(getResultItemSlot(), itemstack.copy()); + } + else if (this.getItems().getStackInSlot(getResultItemSlot()).isItemEqual(itemstack)) + { + this.getItems().getStackInSlot(getResultItemSlot()).stackSize += itemstack.stackSize; + } + + this.reduceMaterialStackSize(); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + } + + abstract protected ItemStack getMaterialItem(); + + abstract protected int getResultItemSlot(); + + abstract protected void reduceMaterialStackSize(); + + abstract protected ItemStack getResult(ItemStack stackInSlot); + + abstract public int getItemFuelTime(ItemStack p_145952_0_); + + public boolean isItemFuel(ItemStack p_145954_0_) + { + return getItemFuelTime(p_145954_0_) > 0; + } + + abstract protected ItemBox getItems(); + + //GUI + public int getWorkProgressScaled(int par1) + { + return this.machineWorkProgressTime / (machineMaxProgressTime / par1); + } + + public int getEnergyProgressScaled(int par1) + { + return (int) (this.fuel / (this.fuelMax / par1)); + } + + + //IInventory関係 + @Override + public int getSizeInventory() { + return getItems().getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return getItems().getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return getItems().decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return getItems().getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + getItems().setInventorySlotContents(i, itemstack); + } + + @Override + public String getInventoryName() { + return "gui.ss.magic_furnace";//+SimpleMachine.values()[this.worldObj.getBlockMetadata(xCoord, yCoord, zCoord)].icon+".name"; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return getItems().getInventoryStackLimit(); + } + + @Override + public void markDirty(){ + super.markDirty(); + getItems().onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer.getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + if (i == 1) { + return this.getItemFuelTime(itemstack) > 0; + } + + return i != 2; + } + + //ISidedInventory関係 + @Override + public int[] getAccessibleSlotsFromSide(int var1) { + return var1 == 0 ? slots_bottom : (var1 == 1 ? slots_top : slots_sides); + } + + @Override + public boolean canInsertItem(int i, ItemStack itemstack, int j) { + return this.isItemValidForSlot(i, itemstack); + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) + { + return p_102008_3_ != 0 || p_102008_1_ != 1 || p_102008_2_.getItem() == Items.bucket; + } + + //NBT関係 + @Override + public void readFromNBT(NBTTagCompound nbt) { + + super.readFromNBT(nbt); + getItems().readFromNBT(nbt); + this.machineWorkProgressTime = nbt.getShort("WorkTime"); + this.fuel = nbt.getInteger("fuel"); + this.fuelMax = nbt.getInteger("fuelMax"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + + super.writeToNBT(nbt); + getItems().writeToNBT(nbt); + nbt.setShort("WorkTime", (short)this.machineWorkProgressTime); + nbt.setInteger("fuel", this.fuel); + nbt.setInteger("fuelMax", this.fuelMax); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ + this.readFromNBT(pkt.func_148857_g()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityStoneFrame.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityStoneFrame.java new file mode 100644 index 0000000..6ecff33 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityStoneFrame.java @@ -0,0 +1,82 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; + +public class TileEntityStoneFrame extends TileEntity{ + + public boolean large; + + public int largeX; + public int largeY; + public int largeZ; + + public void setLarge(int x, int y, int z){ + + this.largeX = x; + this.largeY = y; + this.largeZ = z; + + this.large = true; + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + + public void breakLarge(){ + + if(!large)return; + + large = false; + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + TileEntityCraftFurnace t = (TileEntityCraftFurnace) this.worldObj.getTileEntity(largeX, largeY, largeZ); + + t.breakLarge(); + + } + + public TileEntityCraftFurnace getCraftFurnace(){ + + if(!large)return null; + + return (TileEntityCraftFurnace) this.worldObj.getTileEntity(largeX, largeY, largeZ); + + } + + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + large = par1nbtTagCompound.getBoolean("large"); + largeX = par1nbtTagCompound.getInteger("largex"); + largeY = par1nbtTagCompound.getInteger("largey"); + largeZ = par1nbtTagCompound.getInteger("largez"); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + par1nbtTagCompound.setBoolean("large", large); + par1nbtTagCompound.setInteger("largex", largeX); + par1nbtTagCompound.setInteger("largey", largeY); + par1nbtTagCompound.setInteger("largez", largeZ); + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index e759e21..01fe89a 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -74,6 +74,10 @@ tile.ss.green_pepper.name=Green Pepper Seed tile.ss.radish.name=Radish Seed +tile.ss.rice.name=Rice Seed + +tile.ss.sandpit.name=Sandpit + tile.ss.monitor.name=Monitor monitor.type=Type monitor.creeper=Simple Creeper Shop @@ -169,6 +173,11 @@ item.ss.diamond_knife.name=Diamond Knife item.ss.wood_watering_can.name=Wood Watering Can +item.ss.mineboat_chest.name=Mineboat Chest + +item.ss.laver.name=Laver + + item.ss.crop.big=Big item.ss.turnip.name=Turnip @@ -188,13 +197,30 @@ item.ss.green_pepper.name=Green Pepper item.ss.radish.name=Radish +item.ss.rice.name=Rice + + +item.ss.white_rice.name=White Rice item.ss.salt.name=Salt +item.ss.curry_powder.name=Curry Powder + +item.ss.laver_roasted.name=Laver Roasted item.ss.chicken_smoked.name=Smoked Chicken item.ss.porkchop_smoked.name=Smoked Porkchop item.ss.beef_smoked.name=Smoked Beef +item.ss.curry_rice.name=Curry Rice + +item.ss.carrot_soup.name=Carrot Soup +item.ss.corn_soup.name=Corn Soup +item.ss.egg_soup.name=Egg Soup +item.ss.mushroom_stew.name=Mushroom Stew +item.ss.onion_soup.name=Onion Soup +item.ss.ender_soup.name=Ender Soup +item.ss.tomato_soup.name=Tomato Soup + item.ss.shift_hat.name=Shift's Hat item.ss.gf_contact_lenses.name=GF Contact Lenses @@ -209,6 +235,8 @@ fluid.ss.steam=Steam container.large_furnace=Large Furnace container.sub.inventory=Buffer +container.mineboat_chest=Mineboat Chest + gui.ss.fluid_furnace=Fluid Furnace gui.ss.food_smokers=Food Smokers gui.ss.magic_furnace=Magic Furnace @@ -242,7 +270,9 @@ itemGroup.ss.fluid=SextiarySector -Fluid- itemGroup.ss.machine=SextiarySector -Machine- itemGroup.ss.player=SextiarySector -Player- itemGroup.ss.agriculture=SextiarySector -Agriculture- +itemGroup.ss.fishery=SextiarySector -Fishery- itemGroup.ss.mining=SextiarySector -Mining- +itemGroup.ss.transport=SextiarySector -Transport- itemGroup.ss.cooking=SextiarySector -Cooking- itemGroup.ss.economy=SextiarySector -Economy- itemGroup.ss.magic=SextiarySector -Magic- diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_0.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_0.png new file mode 100644 index 0000000000000000000000000000000000000000..3d3379292b4f8312bf8f26a6a3857ececf4d48a0 GIT binary patch literal 257 zcmV+c0sj7pP)!i91{ zaY2ztiCe$GKY3Ye?QsYt?yQ?{^{#h4-}|ja^naIfPxu?*ARC1n?Dr7mf#8iPKLaRt z-^4x4`lLG_zw%xa0_$G9kIzde?E~v~e7tZ=2&QtrfShN)i5FQSe)L9#tKnV8eW%zL zta?5JBG)Rc869*aL3s%m!Y2lJ&1m6M_xEoSIdj39)zNgwU=GSoBijbdxD(M!U1;2s z@vBdnWJzg`UTMf3RZ+FC0DCXA;H;R)^fgw8=~jh%qgdGv|2j6urB%&br&oeAAksOFuRv$j8+OAzx%Aq`;zSbJJ00g9p`?Zjzud(;k=x==brC;_uLtxqk7!War~FT@a8eJ&FKGb z;{6Pxwbb-?2Dy)BL*eCG;tziGTLV+?hlUfAk)YwcJTBjJ>jLqM^xFY%Tf^yl4ff;K zWBAq3x=zTx6-Z2k13tH59v*4vy@mFQE&MR9kbo~24{^3tbL+%%qhw;>64Bk#C$hf*iIC+UM^iIHX2>T1< znz41-uQ^xyY!uZOafwgrgpQge1&=ogeRl=e$aV?)mvJPngHc)v8XkSnaQ-UcR!N|@ zYz7f}ZpX3k)Raa`&($vOzm6UJBP`-k7M>YMPv~-zNQ-hW`iD3IV=_ZvE%UXF5IVDa zU#GO9M5TuolKq52)s~ZRFJBSRI|*LdmRMOc0=~NtRR-Q20W(dwmKP9RguyWj`UPd+ z6nuko1c@oa)UsOM*t{)yX^@@tn`eDd(QoR6Dn+a07*qoM6N<$f;@irGynhq literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_3.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_3.png new file mode 100644 index 0000000000000000000000000000000000000000..7acafb37da016b6844d12864cde0fe4ddc3361f4 GIT binary patch literal 621 zcmV-z0+RiSP)$!=;cn#277%MWf6Vy+s9 ziA9nT6+|EU68&jU_q=Dj3ue&y@}Bd&&-=X3d(I*H$C{0|gZ_6dB%8^r*&q&eP!pcB z_7N`5w4uAZnY{8exG&b*+svhxdEEgERx9r}KB%}f&>&ZelJhs_tnKfFk?V>qEa>R# zBW&z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gcb$pfOFIqn*{!IeON0=}7;+tQ5OAHZDAd9s z#C%XmtZCj+?h1z2cMclgsNm**z^JpQv30JP(8Uc24o!^_z8xobZF}@y?AzX%KR?`; z{N-o(W$vLb$Bho2{@Ictl{6_rEdoebRTxS$PFQ03H}AH_#*)dl*VR0WZLS|H&SglN znyI?hYR(c%2hLN!%j$(z_bhn6;np0BxXss&^Q|f*~g6t)pzOL+d*%*2Cw0hs9*aC%QGeaUuobz*Y zQ}arITm}Z`qSVBa)D(sC%#sWRcTeAd6une-p!h3K7sn8b(^n@O`Y{LcxZHO!(Ny~4 zz2cH!myAOE&V% o_VetDllQ%1+UUFW|Nj~L7~}rA9t-$#hZPhYp00i_>zopr0BB~Mm;e9( literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/fish/laver_roasted.png b/src/main/resources/assets/sextiarysector/textures/items/food/fish/laver_roasted.png new file mode 100644 index 0000000000000000000000000000000000000000..ef611d00e7dba1a73884eafafada6f578ca457f4 GIT binary patch literal 388 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d+1UA%r7X9djsyzHW`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wK=Iq2E{-7ypQEnMt+%4*^C6>RSu#J<}XJ%}o0__k4BU7|xgmD%R86XTr* z(E`?M3!YCqdcl$H$uY;=XTN7?gtnUhOn4J5*1yi`K#_y3MCz{4iuJvg6Jk|nONXZW z#X0H+zfWMzsc!7ID4Tfpj`tKTqYdFjzM{X%|de>R~a&}*?=-4E_*-d?q42i4!Q X*3Aw#*7&i<3*>)KS3j3^P6g+002ovPDHLkV1lKgXz~C6 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/grain/white_rice.png b/src/main/resources/assets/sextiarysector/textures/items/food/grain/white_rice.png new file mode 100644 index 0000000000000000000000000000000000000000..f4d45423301080cf0a25e77b62eef731ff632995 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggq9$8ji(cAv>;W@*NV!13IesP&^-fEr2CAVkFrJ~kv pU)240&Rk(SWBLAd*}vBp*!YWMOFCkFrGU<0@O1TaS?83{1OQ9fRN4Rl literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/beef_smoked.png b/src/main/resources/assets/sextiarysector/textures/items/food/meat/beef_smoked.png similarity index 100% rename from src/main/resources/assets/sextiarysector/textures/items/food/beef_smoked.png rename to src/main/resources/assets/sextiarysector/textures/items/food/meat/beef_smoked.png diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/chicken_smoked.png b/src/main/resources/assets/sextiarysector/textures/items/food/meat/chicken_smoked.png similarity index 100% rename from src/main/resources/assets/sextiarysector/textures/items/food/chicken_smoked.png rename to src/main/resources/assets/sextiarysector/textures/items/food/meat/chicken_smoked.png diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/porkchop_smoked.png b/src/main/resources/assets/sextiarysector/textures/items/food/meat/porkchop_smoked.png similarity index 100% rename from src/main/resources/assets/sextiarysector/textures/items/food/porkchop_smoked.png rename to src/main/resources/assets/sextiarysector/textures/items/food/meat/porkchop_smoked.png diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/rice/curry_rice.png b/src/main/resources/assets/sextiarysector/textures/items/food/rice/curry_rice.png new file mode 100644 index 0000000000000000000000000000000000000000..75123fdc761361ce174202f905c50c08faf545ab GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggqE*TzKHeI>YSwNxpo-U3d7N_4% z+?d4_DB#+!zldY?f)v(`H{3Re`aJ&KATrHRJ|TH_{0aLf=1Fs%4i-5YBuINqK9HO! z95%rrAS}LX`KHzVCNG<|&pv&}+PM5dkG*oT^3)(HyPfa7t%^=x=4i@j{=doYrT9rF zv*KGF(+{Y2>npRZ2-SO0$`u6^$$GHU$=+|-?o})Y4qsqj@P>n}Z$Wi#k4^ZC$-{^ z^prw}*$NFipY3&t^`}CW=RZnczxv9n{rf&z2+#f?|Bzjj*Xyd+x?A6YUT5%h^>bP0 Hl+XkK=$?`$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/rice/rice_ball.png b/src/main/resources/assets/sextiarysector/textures/items/food/rice/rice_ball.png new file mode 100644 index 0000000000000000000000000000000000000000..d9080fc760977f251fd1cfb8c9d80afd4fc68271 GIT binary patch literal 468 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d**N%E#5OHcbp#5@W`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wKVykMjTWFcN z^-u1+V=qlVT1U*7VP&*&!)M+JJ7&!IA+L8%N9BpsmdyEk`P$qTbe**JZ2xwz`25Sa zYZKDuG;^dsdbEDQluNg>Z-=o=o?*G8@3``LgJU1cUzzFO3f^|@kR|(C(-wg}uOBSm z6x6l#+M2CtN=Zt$EPih7ycQ+m+PFz4vFGD+mn|hiLFUJFLZ$}!xY+P8_dniIAlN!( zZZY>&oAZI8Q}2JTeIJ`M@1kYnc==HDT9o|tsCITwuamx)6K1LT+eNm| zzRk>_aN6if>04Jb)?MqE8IBabImz(hh;6HWs>(fQ%*`E$Ma=dQJ{*>4F{{i=$3(`r|{#)EY;pyq>=d#Wz Gp$PzoR=-#P literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/rice/tuna_sushi.png b/src/main/resources/assets/sextiarysector/textures/items/food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B8YXe|H$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/soup/ender_soup.png b/src/main/resources/assets/sextiarysector/textures/items/food/soup/ender_soup.png new file mode 100644 index 0000000000000000000000000000000000000000..0b71ccb7029c57286acc36b1282ed231f8f554d2 GIT binary patch literal 385 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggqZdQIdm4hii9D$}Vdb&7$V z|M&a>?Q}vqj9;u$G|~M=h`2>>kNw}B_t%O))ybj zt^4syUb#)YX-$Qs$o>6EFZP~08Ibvj+0}XDvvRgf#g0$Q-~UVKXRQoe_TMpVPr<%l z>#y_dw*O#k00cX@YEmLf`r9AA+-+ZQd!w838ErMKHyV%9-~DkZv^rSQAftA}gio1) ZA+R;!tBIC+8!&trJYD@<);T3K0RT|XpF{uv literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/soup/onion_soup.png b/src/main/resources/assets/sextiarysector/textures/items/food/soup/onion_soup.png new file mode 100644 index 0000000000000000000000000000000000000000..e7fc6f2bd2c63b4c4ca2f447b83b307c5f33db8f GIT binary patch literal 300 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggqE(u;$MlIKki-1CFJY5_^EKVmU zNU(}9yX7>6y~_E&u~UBc&u+o>j0U}*yK5Dhf|vxNj!bNPc&V!G$i1@?YzHMjE%N!l zv^7FuR-#nmtov`=Kg_R9C|DhL{=5V{; zcz5IZ2xgzCj#d!w;mh6jGuReLA3AX0z=s!C^+lNH?f>1qNHSaJz@DTMwrdmd3`$hZk4JYp~hWf1m#Fy*xwShn{3>!_4E~PnjOG2w<-8##B?>a<>IWi-U^oY z%l+~W^dGz?#{c`R!SrbJySolFh0fe*saFzk!|R6n1%5pfz2ma$zAv9_ARouHa*2iN z1oP%yFD0ZC86wvDsXmU}kTIv&;O1+k9OXrv-a>jNJ1$J-Q|7X}Wj7&U0(bADIcLfP zrb;d`YP_Hp-O2CIvc-zQBUR={M)i|SoBu*DO)rHpD)>Ksz}Cd~YFY9(o|*%FL6QXv z1I=YO8!+Vj;d*>%!t$B7Cxx&D?bWXPI`fbJ7M6dyakHH}&)FpYIRo@LgQu&X%Q~lo FCIBXZh=2e9 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/craft_furnace.png b/src/main/resources/assets/sextiarysector/textures/models/craft_furnace.png new file mode 100644 index 0000000000000000000000000000000000000000..4bb2c731da3a3dcc0e69b67281c314898c05ee2c GIT binary patch literal 6893 zcmch6i9b|(`2QJ%G|fnqWJ_~3HxrW-WnW6lTFA&+A;})uM}&|R7a<1Sa*bU{NNAF3 zNOCPj_9go=37O^hxb^*g|AX(#IL>^I^Z7jI`8?12dB2|%Yig{&RX|JtL6EHmC-u%C z2ntS-aDHAmj#gG}T;RQMT3-+0Z2aWZHhxjfp8s5eLB4ASM#uU3 z(PBK@2dNMChYdVxVCR#4<`HfmM=P6=)T?_Y<-w_=^5?u-B;FrMy~%S@=eE`- z>AN3qD=pdlJn}VE^6$ArTqkbd6m8F5t`n{L(ap+CbzYgP>$dJiWx8?LtmwzC2x8lv z>net(g_leth?(%cleipLF>?#s9}^jmwUhpCmK+IuDO=hx8FFFwaWg?QubF&WG2=^0 zeN|OAD#^VmY?p>!aImVgi_4Htwby*V`c0iZSNooCLx_rs5dmtL{Ep2=9oeglGX*y< zl&`)$nAm(aSvifaUfw!0LwGerJX7#*S_I{i{n1%AiWx?(>YaVlReXM1tlnKiS#J(I z^qQaFjS&@?lqXXA^@W3fcepAYJ`5vID=Qm`=zpkjx-l5-B%GeiHn@7}3F*ah*ZGCD zkikI7ax3&=fOxeH=7tuMhtDf6-g@sO4}8ta$}$z+6stEJ+l}Sn;^*O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ject: [PATCH 53/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E7=A0=82?= =?UTF-8?q?=E5=A0=B4=E3=81=AE=E7=94=9F=E6=88=90=E3=81=95=E3=82=8C=E3=82=8B?= =?UTF-8?q?=E9=A0=BB=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・より多くの砂場が生成されるように --- .../event/CommonEventHandler.java | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index ebfa6f3..55f38db 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -20,6 +20,7 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fluids.FluidStack; import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SSFluids.SSFluid; @@ -142,7 +143,7 @@ public void onSpawn(LivingSpawnEvent.CheckSpawn event) World world = event.world; EntityLivingBase living = event.entityLiving; - if(world.rand.nextInt(14) != 0)return; + if(world.rand.nextInt(12) != 0)return; if (living instanceof IMob) { @@ -156,10 +157,31 @@ public void onSpawn(LivingSpawnEvent.CheckSpawn event) if(!BiomeDictionary.isBiomeOfType(world.getBiomeGenForCoords(x, z), Type.BEACH))return; - System.out.println("AAA"); world.setBlock(x, y, z, SSBlocks.sandpit); } + } + + @SubscribeEvent + public void onSpawns( WorldEvent.PotentialSpawns event) + { + + World world = event.world; + + if(world.rand.nextInt(6) != 0)return; + + int x = (int)event.x; + int y = (int)event.y; + int z = (int)event.z; + + if(!world.getBlock(x, y, z).isAir(world, x, y, z))return; + + if(world.getBlock(x, y-1, z) != Blocks.sand)return; + + if(!BiomeDictionary.isBiomeOfType(world.getBiomeGenForCoords(x, z), Type.BEACH))return; + + world.setBlock(x, y, z, SSBlocks.sandpit); + } /** */ From 16ea1669a9be8a38c1061b097c8b16cf68531640 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 28 Dec 2014 13:16:02 +0900 Subject: [PATCH 54/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E7=B1=B3?= =?UTF-8?q?=E3=81=AE=E7=94=BB=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../textures/blocks/crop/rice_stage_0.png | Bin 257 -> 353 bytes .../textures/blocks/crop/rice_stage_1.png | Bin 454 -> 582 bytes .../textures/blocks/crop/rice_stage_2.png | Bin 534 -> 670 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_0.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_0.png index 3d3379292b4f8312bf8f26a6a3857ececf4d48a0..7d8040b1f016411d98eac0d5a3af510fee91ded0 100644 GIT binary patch delta 326 zcmV-M0lEHx0^tIXB!32COGiWi{{a60|De66lK=n!32;bRa{vGf6951U69E94oEQKA z00(qQO+^RZ3>*O;A-gW7E&u=k?ny*JR5;7+kikj&qCrmIm$aSKT>w3j;E4vHd>==Wp%lKv`zx2ZbK$eDh zuD9iV2ku<5_hz(%>sOP~OHSyWz}1}7CmVm7R=y6P;|M@)h5#%cmr;X*e8BK|tSUoD zHx!emOL-Kq9zU(AWd!3E(cdbjgKqfy#neX?k#p@6e1@s5qUP`iRrmr-xU{^`;bGgu Y2Bg(RLkV7b2LJ#707*qoM6N<$f=msM`Tzg` delta 229 zcmV6@; diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_1.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_1.png index ac04b52c751b078c4fe9890947874ac1d546bca7..749167568f24f9b25fb5fc839e8accae37d86877 100644 GIT binary patch delta 558 zcmV+}0@3}(1I7f9BYyw}VoOIv0RI600RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_ z000McNliru-V7W89u)M3Q%nE=0n@x1F9f&8Y53=6< zB|+rF@T{|qF7$$3Y`P5Gj{P64&arX(%Et3~jBv=i%@p%hQgWm}H zZ!np#$lXms!GD1BLMms&5O{TjLQi(pjRWxM-g>`5!Ho+Fu7qjaDT~TXhv|(#=^2-6 zj*UBIp4NEy<~8HuGw)bf>ez@wR%JRuVO0M4qNIk&%&l#Q0YjT+>8LT?Js|*EH)(TQtgX z;`=p~$2Cq?Aa+B^*%InNRTEZ2##6$h#kP25MLekqKYqVK7(nN8M*KiA)`(Df81*9b wvfyL|CnxWbScSn7V8dZ2pj9^rZ@L2T4g7kvG@M;FlmGw#07*qoM6N<$f|`>6i2wiq delta 429 zcmV;e0aE_P1jYl9BYy#nNkl!i91{aY2ztiCe$GKY3Ye?QsYt?yQ?{^{#h4-}|ja z^naIfPxu?*ARC1n?Dr7mf#8iPKLaRt-^4x4`lLG_zw%xa0)OjXypPXIDD4C5cYM5X zO9-ZNzJQ!(zlj%FB7XEng{$FR$9<>R7p!_d10vTdtQj42Btdxz7s4k7c+F_xQ}_38 z5;=3hn$^*C$Y2i2P9xg}%(xTLOI>K(lkuxhnPf?6j$UcV9aT}a?1QIEb{yI=kY7XK zZ{eTRP`6{xzJDq2lpI(P(fOQ9$0SCW-qWF0NP29E!Kx;Vrwri@ z;Rq6Vl0d!maJ_fM3rC3!=$v~2lo8rzP3WbBo(1*_;3j(|pAd-NdVUPI? X-MX=*|7t9r00000NkvXXu0mjf1Jlit diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_2.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/rice_stage_2.png index 1ea81acd2f89469780ed29f25e405e0d2c3c45c3..90d387cb53d0ffb0843bd07fe4e81ee88de5f2b4 100644 GIT binary patch delta 646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2becc5fd50b370a13bd22c46525389 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 28 Dec 2014 13:19:58 +0900 Subject: [PATCH 55/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E8=A1=A8=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- src/main/java/shift/sextiarysector/SextiarySector.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index a2c9107..6201f84 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.0.c-${project.minecraft.version}" +version = "2.1.1.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index b7ee897..b156aba 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -33,7 +33,7 @@ public class SextiarySector { //public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.1.0"; + public static final String VERSION = "2.1.1"; @Mod.Instance("SextiarySector") public static SextiarySector instance; From ac6f2eb63c4d7d09683c483d755c5af9d9de2989 Mon Sep 17 00:00:00 2001 From: shift02 Date: Mon, 5 Jan 2015 21:43:18 +0900 Subject: [PATCH 56/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E5=AE=9F?= =?UTF-8?q?=E7=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 7 + .../java/shift/sextiarysector/Config.java | 7 + .../shift/sextiarysector/SSAchievement.java | 178 +++++ .../java/shift/sextiarysector/SSBlocks.java | 33 +- .../shift/sextiarysector/SSCreativeTabs.java | 54 +- .../java/shift/sextiarysector/SSEvents.java | 4 + .../java/shift/sextiarysector/SSFluids.java | 14 +- .../java/shift/sextiarysector/SSItems.java | 62 +- .../java/shift/sextiarysector/SSPotions.java | 14 + .../java/shift/sextiarysector/SSShops.java | 4 +- .../java/shift/sextiarysector/SSVillages.java | 6 + .../shift/sextiarysector/SextiarySector.java | 7 +- .../achievement/AchievementBase.java | 35 + .../achievement/AchievementCraft.java | 30 + .../achievement/AchievementCrop.java | 77 +++ .../achievement/AchievementFurnace.java | 29 + .../AchievementPageAgriculture.java | 26 + .../achievement/AchievementPageBase.java | 21 + .../achievement/AchievementPageEconomy.java | 63 ++ .../achievement/AchievementPageIndustry.java | 27 + .../achievement/AchievementPickup.java | 29 + .../achievement/IAchievementIcon.java | 13 + .../sextiarysector/api/SextiarySectorAPI.java | 4 +- .../api/event/FillBottleEvent.java | 25 + .../shift/sextiarysector/asm/DepLoader.java | 640 ++++++++++++++++++ .../shift/sextiarysector/block/BlockFan.java | 2 +- .../sextiarysector/block/BlockGFTank.java | 2 +- .../sextiarysector/block/BlockGearBox.java | 2 +- .../sextiarysector/block/BlockGearShaft.java | 2 +- .../shift/sextiarysector/block/BlockHole.java | 2 + .../sextiarysector/block/BlockSSFluid.java | 45 ++ .../sextiarysector/block/BlockShaft.java | 2 +- .../block/BlockShippingBox.java | 7 +- .../block/BlockSimpleMachine.java | 62 ++ .../container/ContainerFluidMachineBase.java | 4 +- .../sextiarysector/container/SlotFluid.java | 31 + .../event/AchievementEventHandler.java | 15 + .../event/ClientEventHandler.java | 14 + .../event/CommonEventHandler.java | 98 ++- .../event/PlayerStatusEventHandler.java | 87 ++- .../event/WorldEventHandler.java | 38 ++ .../gui/GuiAchievementsNext.java | 637 +++++++++++++++++ .../sextiarysector/gui/GuiStatsNext.java | 18 +- .../shift/sextiarysector/item/ItemBottle.java | 116 ++++ .../shift/sextiarysector/item/ItemDrink.java | 13 + .../sextiarysector/item/ItemFoodDrink.java | 2 +- .../sextiarysector/item/ItemLavaBottle.java | 36 + .../shift/sextiarysector/item/ItemScoop.java | 3 + .../sextiarysector/item/ItemWaterBottle.java | 27 + ...Achievement.java => ModuleStatistics.java} | 50 +- .../player/EntityPlayerManager.java | 3 + .../sextiarysector/player/StaminaStats.java | 4 + .../plugin/PluginAppleMilk.java | 14 +- .../sextiarysector/plugin/PluginIC2.java | 2 +- .../sextiarysector/plugin/PluginTofu.java | 2 +- .../sextiarysector/potion/PotionBurn.java | 25 + .../shift/sextiarysector/potion/PotionSS.java | 34 + .../sextiarysector/recipe/RecipesCore.java | 6 + .../sextiarysector/recipe/RecipesFurnace.java | 2 + .../recipe/RecipesFurnaceCraft.java | 16 +- .../sextiarysector/recipe/RecipesMachine.java | 2 +- .../world/generator/WorldGenSpringWater.java | 63 ++ .../world/village/ComponentWell.java | 82 +++ .../village/VillageCreationHandlerWell.java | 28 + .../assets/sextiarysector/lang/en_US.lang | 176 ++++- .../textures/blocks/fluid/water_flow.png | Bin 8083 -> 7760 bytes .../textures/blocks/fluid/water_still.png | Bin 11742 -> 11246 bytes .../sextiarysector/textures/guis/potion.png | Bin 0 -> 1472 bytes .../textures/items/fluid/bucket_water.png | Bin 0 -> 237 bytes .../items/fluid/drinking_water_bottle.png | Bin 0 -> 379 bytes .../items/fluid/drinking_water_bucket.png | Bin 0 -> 398 bytes .../drinking_water_small_bottle.png | Bin .../items/{drink => fluid}/empty_bottle.png | Bin .../textures/items/fluid/lava_bottle.png | Bin 0 -> 388 bytes .../textures/items/fluid/milk_bottle.png | Bin 0 -> 312 bytes .../items/fluid/takumi_tea_bottle.png | Bin 0 -> 358 bytes .../textures/items/fluid/water_bottle.png | Bin 0 -> 391 bytes .../textures/items/gui/slot_fluid.png | Bin 0 -> 204 bytes src/main/resources/dependencies.info | 6 + 79 files changed, 2997 insertions(+), 192 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/SSAchievement.java create mode 100644 src/main/java/shift/sextiarysector/SSPotions.java create mode 100644 src/main/java/shift/sextiarysector/achievement/AchievementBase.java create mode 100644 src/main/java/shift/sextiarysector/achievement/AchievementCraft.java create mode 100644 src/main/java/shift/sextiarysector/achievement/AchievementCrop.java create mode 100644 src/main/java/shift/sextiarysector/achievement/AchievementFurnace.java create mode 100644 src/main/java/shift/sextiarysector/achievement/AchievementPageAgriculture.java create mode 100644 src/main/java/shift/sextiarysector/achievement/AchievementPageBase.java create mode 100644 src/main/java/shift/sextiarysector/achievement/AchievementPageEconomy.java create mode 100644 src/main/java/shift/sextiarysector/achievement/AchievementPageIndustry.java create mode 100644 src/main/java/shift/sextiarysector/achievement/AchievementPickup.java create mode 100644 src/main/java/shift/sextiarysector/achievement/IAchievementIcon.java create mode 100644 src/main/java/shift/sextiarysector/api/event/FillBottleEvent.java create mode 100644 src/main/java/shift/sextiarysector/asm/DepLoader.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockSSFluid.java create mode 100644 src/main/java/shift/sextiarysector/container/SlotFluid.java create mode 100644 src/main/java/shift/sextiarysector/event/AchievementEventHandler.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiAchievementsNext.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemBottle.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemDrink.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemLavaBottle.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemWaterBottle.java rename src/main/java/shift/sextiarysector/module/{ModuleAchievement.java => ModuleStatistics.java} (68%) create mode 100644 src/main/java/shift/sextiarysector/potion/PotionBurn.java create mode 100644 src/main/java/shift/sextiarysector/potion/PotionSS.java create mode 100644 src/main/java/shift/sextiarysector/world/generator/WorldGenSpringWater.java create mode 100644 src/main/java/shift/sextiarysector/world/village/ComponentWell.java create mode 100644 src/main/java/shift/sextiarysector/world/village/VillageCreationHandlerWell.java create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/potion.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/bucket_water.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/drinking_water_bottle.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/drinking_water_bucket.png rename src/main/resources/assets/sextiarysector/textures/items/{drink => fluid}/drinking_water_small_bottle.png (100%) rename src/main/resources/assets/sextiarysector/textures/items/{drink => fluid}/empty_bottle.png (100%) create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/lava_bottle.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/milk_bottle.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/takumi_tea_bottle.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/water_bottle.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_fluid.png create mode 100644 src/main/resources/dependencies.info diff --git a/build.gradle b/build.gradle index 6201f84..e9a2098 100644 --- a/build.gradle +++ b/build.gradle @@ -39,6 +39,7 @@ processResources // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' + exclude 'dependencies.info' } //from(sourceSets.main.java.srcDirs+'/shift/sextiarysector/api/') { @@ -55,6 +56,12 @@ jar { } } +jar { + manifest { + attributes 'FMLCorePlugin' : 'shift.sextiarysector.asm.DepLoader','FMLCorePluginContainsFMLMod':'true' + } +} + task devJar(type: Jar) { from sourceSets.main.output from sourceSets.main.allSource diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index 539a938..0aa13bf 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -5,6 +5,9 @@ public class Config { + //Potion + public static int burn; + //Biome public static int magicDesert; @@ -40,6 +43,10 @@ public static void ConfigRead(FMLPreInitializationEvent event) { } + public static void configForPotion(Configuration cfg) { + burn = cfg.getInt("BurnID", "potion", 25, 25, 255, ""); + } + public static void configForBiome(Configuration cfg) { magicDesert = cfg.getInt("MagicDesertID", "biome", 120, 0, 255, ""); } diff --git a/src/main/java/shift/sextiarysector/SSAchievement.java b/src/main/java/shift/sextiarysector/SSAchievement.java new file mode 100644 index 0000000..1f852d4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/SSAchievement.java @@ -0,0 +1,178 @@ +package shift.sextiarysector; + +import java.util.ArrayList; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import net.minecraft.stats.AchievementList; +import net.minecraftforge.common.AchievementPage; +import net.minecraftforge.oredict.OreDictionary; +import shift.sextiarysector.achievement.AchievementBase; +import shift.sextiarysector.achievement.AchievementCraft; +import shift.sextiarysector.achievement.AchievementCrop; +import shift.sextiarysector.achievement.AchievementFurnace; +import shift.sextiarysector.achievement.AchievementPageAgriculture; +import shift.sextiarysector.achievement.AchievementPageBase; +import shift.sextiarysector.achievement.AchievementPageEconomy; +import shift.sextiarysector.achievement.AchievementPageIndustry; +import shift.sextiarysector.achievement.AchievementPickup; + +public class SSAchievement { + + private static ArrayList core = new ArrayList(); + private static ArrayList agriculture = new ArrayList(); + private static ArrayList mining = new ArrayList(); + private static ArrayList industry = new ArrayList(); + private static ArrayList economy = new ArrayList(); + + //Core + public static Achievement moisture; + public static Achievement bottle; + public static Achievement drinkingWater; + public static Achievement craftFurnace; + + //Agriculture + public static Achievement seed; + public static Achievement scoop; + public static Achievement farmland; + public static Achievement wateringCan; + public static Achievement hole; + public static Achievement paddy; + + public static Achievement turnip; + public static Achievement ironTurnip; + + public static Achievement cucumber; + + + public static Achievement onion; + + public static Achievement tomato; + + public static Achievement corn; + public static Achievement goldenCorn; + + + public static Achievement eggplant; + + public static Achievement sweetPotato; + + public static Achievement greenPepper; + + + public static Achievement radish; + + + public static Achievement rice; + + //Mining + public static Achievement blueStoneDust; + + //Industry + public static Achievement blueStoneSlimeBall; + + public static Achievement woodGear; + public static Achievement smallWindmill; + public static Achievement millstone; + public static Achievement loom; + + public static Achievement stoneGear; + public static Achievement windmill; + public static Achievement sawmill; + + public static Achievement steelGear; + public static Achievement smallWaterwheel; + public static Achievement pulverizer; + + //Economy + public static Achievement creeperFirework; + public static Achievement creeperChest; + public static Achievement shipping; + + public static void initAchievements(){ + + moisture = new AchievementBase("moisture", 3, -1, new ItemStack(Items.water_bucket), (Achievement)null, core).initIndependentStat().registerStat(); + bottle = new AchievementCraft("bottle", 1, 1, new ItemStack(SSItems.emptyBottle), AchievementList.buildWorkBench, core).registerStat(); + drinkingWater = new AchievementFurnace("drinking_water", 3, 1, new ItemStack(SSItems.drinkingWaterBottle), bottle, core).registerStat(); + craftFurnace = new AchievementCraft("craft_furnace", -1, -1, new ItemStack(SSBlocks.LargeFurnace), AchievementList.buildWorkBench, core).registerStat(); + + AchievementPage.registerAchievementPage(new AchievementPageBase("achievement.ss.core", core)); + + seed = new AchievementBase("seed", -8, -2, new ItemStack(SSBlocks.tomato), (Achievement)null, agriculture).initIndependentStat().registerStat(); + scoop =new AchievementCraft("scoop", -6, -3, new ItemStack(SSItems.woodScoop), AchievementList.buildWorkBench, agriculture).registerStat(); + farmland = new AchievementBase("farmland", -4, -4, new ItemStack(Items.wooden_hoe), scoop, agriculture).registerStat(); + wateringCan = new AchievementCraft("watering_can", 1, -2, new ItemStack(SSItems.woodWateringCan,1,OreDictionary.WILDCARD_VALUE), AchievementList.buildWorkBench, agriculture).registerStat(); + hole = new AchievementBase("hole", -4, -2, new ItemStack(SSItems.ironScoop), scoop, agriculture).registerStat(); + paddy = new AchievementBase("paddy", -2, -2, new ItemStack(Items.water_bucket), hole, agriculture).registerStat(); + + + int spring = 1; + turnip = new AchievementCrop("turnip", -7, spring, new ItemStack(SSItems.turnip), SSBlocks.turnip, seed, agriculture).registerStat(); + ironTurnip = new AchievementPickup("iron_turnip", -5, spring - 1, new ItemStack(SSItems.ironTurnip), turnip, agriculture).registerStat(); + + cucumber = new AchievementCrop("cucumber", -7, spring + 4, new ItemStack(SSItems.cucumber), SSBlocks.cucumber, seed, agriculture).registerStat(); + + int summer = 10; + onion = new AchievementCrop("onion", -7, summer, new ItemStack(SSItems.onion), SSBlocks.onion, seed, agriculture).registerStat(); + + tomato = new AchievementCrop("tomato", -7, summer + 4, new ItemStack(SSItems.tomato), SSBlocks.tomato, seed, agriculture).registerStat(); + + corn = new AchievementCrop("corn", -7, summer + 8, new ItemStack(SSItems.corn), SSBlocks.corn, seed, agriculture).registerStat(); + goldenCorn = new AchievementPickup("golden_corn", -5, summer + 7, new ItemStack(SSItems.goldenCorn), corn, agriculture).registerStat(); + + int autumn = 23; + eggplant = new AchievementCrop("eggplant", -7, autumn, new ItemStack(SSItems.eggplant), SSBlocks.eggplant, seed, agriculture).registerStat(); + + sweetPotato = new AchievementCrop("sweet_potato", -7, autumn + 4, new ItemStack(SSItems.sweetPotato), SSBlocks.sweetPotato, seed, agriculture).registerStat(); + + greenPepper = new AchievementCrop("green_pepper", -7, autumn + 8, new ItemStack(SSItems.greenPepper), SSBlocks.greenPepper, seed, agriculture).registerStat(); + + int winter = 36; + + radish = new AchievementCrop("radish", -7, winter, new ItemStack(SSItems.radish), SSBlocks.radish, seed, agriculture).registerStat(); + + int spring2 = 41; + + rice = new AchievementCrop("rice", -7, spring2, new ItemStack(SSItems.rice), SSBlocks.rice, seed, agriculture).registerStat(); + + AchievementPage.registerAchievementPage(new AchievementPageAgriculture("achievement.ss.agriculture", agriculture)); + + //鉱業 + + blueStoneDust = new AchievementPickup("bluestone_dust", 0, 0, new ItemStack(SSItems.blueStoneDust), AchievementList.buildPickaxe, mining).registerStat(); + + AchievementPage.registerAchievementPage(new AchievementPageBase("achievement.ss.mining", mining)); + + //工業 + + blueStoneSlimeBall = new AchievementFurnace("bluestone_slime_ball", -4, -1, new ItemStack(SSItems.blueStoneSlimeBall), blueStoneDust, industry).registerStat(); + + + woodGear = new AchievementCraft("wood_gear", -2, 0, new ItemStack(SSItems.woodGear), blueStoneSlimeBall, industry).registerStat(); + smallWindmill = new AchievementCraft("small_windmill", -1, -2, new ItemStack(SSBlocks.smallWindmill), woodGear, industry).registerStat(); + millstone = new AchievementCraft("millstone", -1, 2, new ItemStack(SSBlocks.millstone), woodGear, industry).registerStat(); + loom = new AchievementCraft("loom", -1, 3, new ItemStack(SSBlocks.loom), woodGear, industry).registerStat(); + + stoneGear = new AchievementCraft("stone_gear", 1, 0, new ItemStack(SSItems.stoneGear), woodGear, industry).registerStat(); + windmill = new AchievementCraft("windmill", 2, -2, new ItemStack(SSBlocks.windmill), stoneGear, industry).registerStat(); + sawmill = new AchievementCraft("sawmill", 2, 2, new ItemStack(SSBlocks.sawmill), stoneGear, industry).registerStat(); + + steelGear = new AchievementCraft("steel_gear", 4, 0, new ItemStack(SSItems.steelGear), stoneGear, industry).registerStat(); + smallWaterwheel = new AchievementCraft("small_waterwheel", 5, -2, new ItemStack(SSBlocks.smallWaterwheel), steelGear, industry).registerStat(); + pulverizer = new AchievementCraft("pulverizer", 5, 2, new ItemStack(SSBlocks.pulverizer), steelGear, industry).registerStat(); + + AchievementPage.registerAchievementPage(new AchievementPageIndustry("achievement.ss.industry", industry)); + + creeperFirework = new AchievementBase("creeper_firework", 0, 0, new ItemStack(Items.fireworks), (Achievement)null,economy).initIndependentStat().registerStat(); + creeperChest = new AchievementBase("creeper_chest", 1, -2, new ItemStack(SSBlocks.creeperChest), creeperFirework,economy).registerStat(); + shipping = new AchievementBase("shipping", 3, -2, new ItemStack(SSBlocks.shippingBox), creeperChest,economy).registerStat(); + + AchievementPage.registerAchievementPage(new AchievementPageEconomy("achievement.ss.economy", economy)); + + } + + + + +} diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 3f8dda5..058d093 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -7,7 +7,6 @@ import shift.sextiarysector.api.season.Season; import shift.sextiarysector.block.BlcokPaddy; import shift.sextiarysector.block.BlockBlueFire; -import shift.sextiarysector.block.BlockBottle; import shift.sextiarysector.block.BlockChunkLoader; import shift.sextiarysector.block.BlockFan; import shift.sextiarysector.block.BlockFluidCrafter; @@ -27,6 +26,7 @@ import shift.sextiarysector.block.BlockSSCrop.CropStatus; import shift.sextiarysector.block.BlockSSCrop.CropType; import shift.sextiarysector.block.BlockSSFarmland; +import shift.sextiarysector.block.BlockSSFluid; import shift.sextiarysector.block.BlockSSOre; import shift.sextiarysector.block.BlockSSPane; import shift.sextiarysector.block.BlockSandpit; @@ -37,13 +37,11 @@ import shift.sextiarysector.block.BlockSmallWindmill; import shift.sextiarysector.block.BlockWindmill; import shift.sextiarysector.block.BlockWoodHopper; -import shift.sextiarysector.item.ItemBlockBottle; import shift.sextiarysector.item.ItemBlockCrop; import shift.sextiarysector.item.ItemBlockDirection; import shift.sextiarysector.item.ItemBlockFluidCrafter; import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMonitor; -import shift.sextiarysector.tileentity.TileEntityBlockBottle; import shift.sextiarysector.tileentity.TileEntityFan; import shift.sextiarysector.tileentity.TileEntityFarmland; import shift.sextiarysector.tileentity.TileEntityFluidCrafter; @@ -80,13 +78,16 @@ public class SSBlocks { - public static Block bottle; + //public static Block bottle; public static Block fluidCrafter; public static Block woodHopper; public static Block blueFire; + //液体 + public static Block drinkingWater; + //GF public static Block woodShaft; public static Block stoneShaft; @@ -140,6 +141,7 @@ public class SSBlocks { //経済 public static Block monitor; + //農業 public static Block farmland; public static Block paddy; @@ -187,9 +189,9 @@ public static void initBlicks(){ GameRegistry.registerBlock(magicFurnace, "MagicFurnace"); GameRegistry.registerTileEntity(TileEntityMagicFurnace.class, "MagicFurnace"); - bottle = new BlockBottle().setBlockName("ss.bottle").setBlockTextureName("glass"); - GameRegistry.registerBlock(bottle,ItemBlockBottle.class, "Bottle"); - GameRegistry.registerTileEntity(TileEntityBlockBottle.class, "Bottle"); + //bottle = new BlockBottle().setBlockName("ss.bottle").setBlockTextureName("glass"); + //GameRegistry.registerBlock(bottle,ItemBlockBottle.class, "Bottle"); + //GameRegistry.registerTileEntity(TileEntityBlockBottle.class, "Bottle"); fluidCrafter = new BlockFluidCrafter().setBlockName("ss.fluid_crafter").setBlockTextureName("glass"); GameRegistry.registerBlock(fluidCrafter, ItemBlockFluidCrafter.class, "FluidCrafter"); @@ -213,6 +215,9 @@ public static void initBlicks(){ blueFire = new BlockBlueFire().setBlockName("ss.blue_fire").setBlockTextureName("sextiarysector:blue_fire"); GameRegistry.registerBlock(blueFire, "BlueFire"); + drinkingWater = new BlockSSFluid(SSFluids.drinkingWater).setBlockName("ss.drinking_water").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(drinkingWater, "DrinkingWater"); + //鉱石 blueStoneOre = new BlockPowerStone().setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(blueStoneOre, "BlueStoneOre"); @@ -274,29 +279,29 @@ public static void initBlicks(){ woodStoneGearShaft = new BlockGearShaft(1).setBlockName("ss.wood_stone_gear_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); GameRegistry.registerBlock(woodStoneGearShaft,ItemBlockGearShaft.class, "WoodStoneGearShaft"); - smallWindmill = new BlockSmallWindmill().setBlockName("ss.small_windmill").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSMachine); + smallWindmill = new BlockSmallWindmill().setBlockName("ss.small_windmill").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerTileEntity(TileEntitySmallWindmill.class, "SmallWindmill"); GameRegistry.registerBlock(smallWindmill, "SmallWindmill"); - windmill = new BlockWindmill().setBlockName("ss.windmill").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSMachine); + windmill = new BlockWindmill().setBlockName("ss.windmill").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerTileEntity(TileEntityWindmill.class, "Windmill"); GameRegistry.registerBlock(windmill, "Windmill"); - smallWaterwheel = new BlockSmallWaterwheel().setBlockName("ss.small_waterwheel").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSMachine); + smallWaterwheel = new BlockSmallWaterwheel().setBlockName("ss.small_waterwheel").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerTileEntity(TileEntitySmallWaterwheel.class, "SmallWaterwheel"); GameRegistry.registerBlock(smallWaterwheel, "SmallWaterwheel"); GameRegistry.registerTileEntity(TileEntitySimpleMachine.class, "SimpleMachine"); - millstone = new BlockSimpleMachine("millstone",20,SSRecipes.millstone,1).setBlockName("ss.millstone").setCreativeTab(SextiarySectorAPI.TabSSMachine); + millstone = new BlockSimpleMachine("millstone",20,SSRecipes.millstone,1).setBlockName("ss.millstone").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(millstone, "Millstone"); - loom = new BlockSimpleMachine("loom",21,SSRecipes.loom,1).setBlockName("ss.loom").setCreativeTab(SextiarySectorAPI.TabSSMachine); + loom = new BlockSimpleMachine("loom",21,SSRecipes.loom,1).setBlockName("ss.loom").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(loom, "Loom"); - sawmill = new BlockSimpleMachine("sawmill",25,SSRecipes.sawmill,2).setBlockName("ss.sawmill").setCreativeTab(SextiarySectorAPI.TabSSMachine); + sawmill = new BlockSimpleMachine("sawmill",25,SSRecipes.sawmill,2).setBlockName("ss.sawmill").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(sawmill, "Sawmill"); - pulverizer = new BlockSimpleMachine("pulverizer",30,SSRecipes.pulverizer,3).setBlockName("ss.pulverizer").setCreativeTab(SextiarySectorAPI.TabSSMachine); + pulverizer = new BlockSimpleMachine("pulverizer",30,SSRecipes.pulverizer,3).setBlockName("ss.pulverizer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(pulverizer, "Pulverizer"); fan = new BlockFan().setBlockName("ss.fan"); diff --git a/src/main/java/shift/sextiarysector/SSCreativeTabs.java b/src/main/java/shift/sextiarysector/SSCreativeTabs.java index 3e543c7..5fca74b 100644 --- a/src/main/java/shift/sextiarysector/SSCreativeTabs.java +++ b/src/main/java/shift/sextiarysector/SSCreativeTabs.java @@ -13,13 +13,13 @@ public static void initCreativeTabs(){ SextiarySectorAPI.TabSSCore = new CreativeTabSSCore(); SextiarySectorAPI.TabSSFluid = new CreativeTabSSFluid(); - SextiarySectorAPI.TabSSMachine = new CreativeTabSSMachine(); SextiarySectorAPI.TabSSPlayer = new CreativeTabSSPlayer(); SextiarySectorAPI.TabSSAgriculture = new CreativeTabSSAgriculture(); SextiarySectorAPI.TabSSFishery = new CreativeTabSSFishery(); SextiarySectorAPI.TabSSMining = new CreativeTabSSMining(); - SextiarySectorAPI.TabSSTransport = new CreativeTabSSTransport(); + SextiarySectorAPI.TabSSIndustry = new CreativeTabSSIndustry(); SextiarySectorAPI.TabSSCooking = new CreativeTabSSCooking(); + SextiarySectorAPI.TabSSTransport = new CreativeTabSSTransport(); SextiarySectorAPI.TabSSEconomy = new CreativeTabSSEconomy(); SextiarySectorAPI.TabSSMagic = new CreativeTabSSMagic(); @@ -58,26 +58,7 @@ public Item getTabIconItem() { @SideOnly(Side.CLIENT) public ItemStack getIconItemStack() { - return new ItemStack(SSBlocks.bottle,1); - } - - } - - private static class CreativeTabSSMachine extends CreativeTabs{ - - public CreativeTabSSMachine() { - super("ss.machine"); - } - - @Override - public Item getTabIconItem() { - return null;//SSBlocks.LargeFurnace.g; - } - - @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSBlocks.woodShaft,1); + return new ItemStack(SSItems.emptyBottle,1); } } @@ -158,10 +139,10 @@ public ItemStack getIconItemStack() } - private static class CreativeTabSSTransport extends CreativeTabs{ + private static class CreativeTabSSIndustry extends CreativeTabs{ - public CreativeTabSSTransport() { - super("ss.transport"); + public CreativeTabSSIndustry() { + super("ss.industry"); } @Override @@ -172,11 +153,12 @@ public Item getTabIconItem() { @SideOnly(Side.CLIENT) public ItemStack getIconItemStack() { - return new ItemStack(SSItems.mineboatChest,1); + return new ItemStack(SSBlocks.woodShaft,1); } } + private static class CreativeTabSSCooking extends CreativeTabs{ public CreativeTabSSCooking() { @@ -196,6 +178,26 @@ public ItemStack getIconItemStack() } + private static class CreativeTabSSTransport extends CreativeTabs{ + + public CreativeTabSSTransport() { + super("ss.transport"); + } + + @Override + public Item getTabIconItem() { + return null;//SSBlocks.LargeFurnace.g; + } + + @SideOnly(Side.CLIENT) + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.mineboatChest,1); + } + + } + + private static class CreativeTabSSEconomy extends CreativeTabs{ public CreativeTabSSEconomy() { diff --git a/src/main/java/shift/sextiarysector/SSEvents.java b/src/main/java/shift/sextiarysector/SSEvents.java index 4ff817f..749e6d6 100644 --- a/src/main/java/shift/sextiarysector/SSEvents.java +++ b/src/main/java/shift/sextiarysector/SSEvents.java @@ -2,6 +2,7 @@ import net.minecraftforge.common.MinecraftForge; import shift.sextiarysector.api.event.VanillaFoodHandler; +import shift.sextiarysector.event.AchievementEventHandler; import shift.sextiarysector.event.ClientEventHandler; import shift.sextiarysector.event.CommonEventHandler; import shift.sextiarysector.event.HUDEventHandler; @@ -24,8 +25,11 @@ public static void preInit(FMLPreInitializationEvent event){ MinecraftForge.EVENT_BUS.register(new VanillaFoodHandler()); if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new ClientEventHandler()); if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new TabManager()); + MinecraftForge.EVENT_BUS.register(new WorldEventHandler()); MinecraftForge.ORE_GEN_BUS.register(new WorldEventHandler()); + MinecraftForge.EVENT_BUS.register(new AchievementEventHandler()); + //MinecraftForge.EVENT_BUS.register(new SantaEventHandler()); } diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index 73188b7..b58842d 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -18,10 +18,10 @@ public class SSFluids { public static void initFluids(){ - takumiTea = new SSFluid("takumi_tea", 0, 0x006400, 5, 2.0f); - drinkingWater = new SSFluid("drinking_water", 0, 0xF0FFFF, 4, 1.0f); + takumiTea = new SSFluid("TakumiTea", 0, 0x006400, 5, 2.0f).setUnlocalizedName("takumi_tea"); + drinkingWater = new SSFluid("DrinkingWater", 0, 0x87CEFA, 4, 1.0f).setUnlocalizedName("drinking_water"); - steam = new SSFluid("steam", 1, 0xFFFFFF, 1, 1.0f); + steam = new SSFluid("Steam", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("steam"); } @@ -31,6 +31,12 @@ public static void postFluids(){ FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(i), new ItemStack(SSBlocks.fluidCrafter,1,i), new ItemStack(SSBlocks.fluidCrafter,1,0)); } + FluidContainerRegistry.registerFluidContainer(FluidRegistry.WATER, new ItemStack(SSItems.waterBottle,1), new ItemStack(SSItems.emptyBottle,1)); + FluidContainerRegistry.registerFluidContainer(FluidRegistry.LAVA, new ItemStack(SSItems.lavaBottle,1), new ItemStack(SSItems.emptyBottle,1)); + + FluidContainerRegistry.registerFluidContainer(takumiTea, new ItemStack(SSItems.takumiTeaBottle,1), new ItemStack(SSItems.emptyBottle,1)); + FluidContainerRegistry.registerFluidContainer(drinkingWater, new ItemStack(SSItems.drinkingWaterBottle,1), new ItemStack(SSItems.emptyBottle,1)); + } public static class SSFluid extends Fluid { @@ -74,7 +80,7 @@ public IIcon getStillIcon() public IIcon getFlowingIcon() { switch(type){ - case 0:return ClientEventHandler.waterStill; + case 0:return ClientEventHandler.waterFlow; case 1:return ClientEventHandler.portal; } return ClientEventHandler.waterStill; diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 8da5a9a..51d4bd3 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -1,11 +1,12 @@ package shift.sextiarysector; -import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.item.ItemBottle; import shift.sextiarysector.item.ItemCalendar; import shift.sextiarysector.item.ItemCrop; +import shift.sextiarysector.item.ItemDrink; import shift.sextiarysector.item.ItemFoodCrop; import shift.sextiarysector.item.ItemFoodDrink; import shift.sextiarysector.item.ItemGFContactLenses; @@ -13,12 +14,14 @@ import shift.sextiarysector.item.ItemGuiUnit; import shift.sextiarysector.item.ItemHammer; import shift.sextiarysector.item.ItemKnife; +import shift.sextiarysector.item.ItemLavaBottle; import shift.sextiarysector.item.ItemMineboat; import shift.sextiarysector.item.ItemScoop; import shift.sextiarysector.item.ItemSeasonStone; import shift.sextiarysector.item.ItemShiftHat; import shift.sextiarysector.item.ItemShopRing; import shift.sextiarysector.item.ItemSoup; +import shift.sextiarysector.item.ItemWaterBottle; import shift.sextiarysector.item.ItemWateringCan; import cpw.mods.fml.common.registry.GameRegistry; @@ -76,6 +79,13 @@ public class SSItems { public static Item energyReactor; public static Item objectReactor; + //液体 + public static Item emptyBottle; + public static Item waterBottle; + public static Item lavaBottle; + + + //unit public static Item craftUnit; @@ -91,9 +101,6 @@ public class SSItems { public static Item cloth; public static Item canvas; - //飲み物 - public static Item drinkingWaterSmallBottle; - //public static Item bottle; //道具 @@ -160,6 +167,10 @@ public class SSItems { public static Item enderSoup; public static Item tomatoSoup; + //飲み物 + //public static Item drinkingWaterSmallBottle; + public static Item drinkingWaterBottle; + public static Item takumiTeaBottle; //装備 public static Item shiftHat; @@ -168,37 +179,37 @@ public class SSItems { public static void initItems(){ - unit = new Item().setUnlocalizedName("ss.unit").setTextureName("sextiarysector:machine/unit").setCreativeTab(SextiarySectorAPI.TabSSMachine); + unit = new Item().setUnlocalizedName("ss.unit").setTextureName("sextiarysector:machine/unit").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(unit, "Unit"); - woodGear = new Item().setUnlocalizedName("ss.wood_gear").setTextureName("sextiarysector:machine/wood_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); + woodGear = new Item().setUnlocalizedName("ss.wood_gear").setTextureName("sextiarysector:machine/wood_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(woodGear, "WoodGear"); - stoneGear = new Item().setUnlocalizedName("ss.stone_gear").setTextureName("sextiarysector:machine/stone_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); + stoneGear = new Item().setUnlocalizedName("ss.stone_gear").setTextureName("sextiarysector:machine/stone_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(stoneGear, "StoneGear"); - steelGear = new Item().setUnlocalizedName("ss.steel_gear").setTextureName("sextiarysector:machine/steel_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); + steelGear = new Item().setUnlocalizedName("ss.steel_gear").setTextureName("sextiarysector:machine/steel_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(steelGear, "SteelGear"); - woodUnitGear = new Item().setUnlocalizedName("ss.wood_unit_gear").setTextureName("sextiarysector:machine/wood_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); + woodUnitGear = new Item().setUnlocalizedName("ss.wood_unit_gear").setTextureName("sextiarysector:machine/wood_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(woodUnitGear, "WoodUnitGear"); - stoneUnitGear = new Item().setUnlocalizedName("ss.stone_unit_gear").setTextureName("sextiarysector:machine/stone_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); + stoneUnitGear = new Item().setUnlocalizedName("ss.stone_unit_gear").setTextureName("sextiarysector:machine/stone_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(stoneUnitGear, "StoneUnitGear"); - steelUnitGear = new Item().setUnlocalizedName("ss.steel_unit_gear").setTextureName("sextiarysector:machine/steel_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSMachine); + steelUnitGear = new Item().setUnlocalizedName("ss.steel_unit_gear").setTextureName("sextiarysector:machine/steel_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(steelUnitGear, "steelUnitGear"); - woodGFStorage = new ItemGearStorage(1, 10000, 1).setUnlocalizedName("ss.wood_gf_storage").setTextureName("sextiarysector:gearforce/wood_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSMachine); + woodGFStorage = new ItemGearStorage(1, 10000, 1).setUnlocalizedName("ss.wood_gf_storage").setTextureName("sextiarysector:gearforce/wood_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(woodGFStorage, "WoodGFStorage"); - stoneGFStorage = new ItemGearStorage(2, 10000, 2).setUnlocalizedName("ss.stone_gf_storage").setTextureName("sextiarysector:gearforce/stone_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSMachine); + stoneGFStorage = new ItemGearStorage(2, 10000, 2).setUnlocalizedName("ss.stone_gf_storage").setTextureName("sextiarysector:gearforce/stone_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(stoneGFStorage, "StoneGFStorage"); - steelGFStorage = new ItemGearStorage(3, 10000, 3).setUnlocalizedName("ss.steel_gf_storage").setTextureName("sextiarysector:gearforce/steel_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSMachine); + steelGFStorage = new ItemGearStorage(3, 10000, 3).setUnlocalizedName("ss.steel_gf_storage").setTextureName("sextiarysector:gearforce/steel_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(steelGFStorage, "SteelGFStorage"); - hammer = new ItemHammer().setUnlocalizedName("ss.hammer").setTextureName("sextiarysector:machine/hammer").setCreativeTab(SextiarySectorAPI.TabSSMachine); + hammer = new ItemHammer().setUnlocalizedName("ss.hammer").setTextureName("sextiarysector:machine/hammer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(hammer, "Hammer"); calendar = new ItemCalendar().setUnlocalizedName("ss.calendar").setTextureName("sextiarysector:calendar").setCreativeTab(SextiarySectorAPI.TabSSCore); @@ -267,6 +278,16 @@ public static void initItems(){ objectReactor = new Item().setUnlocalizedName("ss.object_reactor").setTextureName("sextiarysector:object_reactor").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(objectReactor, "ObjectReactor"); + //液体 + emptyBottle = new ItemBottle().setUnlocalizedName("ss.empty_bottle").setTextureName("sextiarysector:fluid/empty_bottle"); + GameRegistry.registerItem(emptyBottle, "EmptyBottle"); + + waterBottle = new ItemWaterBottle().setUnlocalizedName("ss.water_bottle").setTextureName("sextiarysector:fluid/water_bottle"); + GameRegistry.registerItem(waterBottle, "WaterBottle"); + + lavaBottle = new ItemLavaBottle().setUnlocalizedName("ss.lava_bottle").setTextureName("sextiarysector:fluid/lava_bottle"); + GameRegistry.registerItem(lavaBottle, "LavaBottle"); + //Unit craftUnit = new ItemGuiUnit(201).setUnlocalizedName("ss.craft_unit").setTextureName("sextiarysector:unit/craft_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(craftUnit, "CraftUnit"); @@ -292,10 +313,6 @@ public static void initItems(){ canvas = new Item().setUnlocalizedName("ss.canvas").setTextureName("sextiarysector:loom/canvas").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(canvas, "Canvas"); - //飲み物 - drinkingWaterSmallBottle = new ItemFoodDrink(0, 3.5f, 2, 6.5f, 0, 0, false).setDrink().setUnlocalizedName("ss.drinking_water_small_bottle").setTextureName("sextiarysector:drink/drinking_water_small_bottle").setContainerItem(Items.glass_bottle); - GameRegistry.registerItem(drinkingWaterSmallBottle, "DrinkingWaterSmallBottle"); - //bottle = new ItemBlockBottle().setUnlocalizedName("ss.bottle").setTextureName("sextiarysector:drink/empty_bottle"); //GameRegistry.registerItem(bottle, "Bottle"); @@ -418,6 +435,13 @@ public static void initItems(){ GameRegistry.registerItem(tomatoSoup, "TomatoSoup"); + //飲み物 + drinkingWaterBottle = new ItemDrink(0, 2.5f, 3, 6.5f, 0, 0, false).setUnlocalizedName("ss.drinking_water_bottle").setTextureName("sextiarysector:fluid/drinking_water_bottle"); + GameRegistry.registerItem(drinkingWaterBottle, "DrinkingWaterBottle"); + + takumiTeaBottle = new ItemDrink(0, 0.0f, 6, 9.5f, 0, 0, false).setUnlocalizedName("ss.takumi_tea_bottle").setTextureName("sextiarysector:fluid/takumi_tea_bottle"); + GameRegistry.registerItem(takumiTeaBottle, "TAKUMITeaBottle"); + //装備 shiftHat = new ItemShiftHat().setUnlocalizedName("ss.shift_hat").setTextureName("sextiarysector:shift_hat"); GameRegistry.registerItem(shiftHat, "ShiftHat"); diff --git a/src/main/java/shift/sextiarysector/SSPotions.java b/src/main/java/shift/sextiarysector/SSPotions.java new file mode 100644 index 0000000..e4193a9 --- /dev/null +++ b/src/main/java/shift/sextiarysector/SSPotions.java @@ -0,0 +1,14 @@ +package shift.sextiarysector; + +import net.minecraft.potion.Potion; +import shift.sextiarysector.potion.PotionBurn; + +public class SSPotions { + + public static Potion burn; + + public static void initPotions(){ + burn = new PotionBurn(Config.burn, true, 0, 0).setPotionName("ss.potion.burn"); + } + +} diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index 596ce9f..b3c6747 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -4,12 +4,10 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; import shift.mceconomy2.api.MCEconomyAPI; import shift.mceconomy2.api.shop.IProductItem; import shift.mceconomy2.api.shop.IProductList; import shift.mceconomy2.api.shop.ProductItem; -import shift.sextiarysector.block.BlockBottle; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockMonitor.MonitorType; import shift.sextiarysector.item.ItemShopRing; @@ -28,7 +26,7 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.brassIngot,2),230)); - creepers[i].addItemProduct(new ProductItem(((BlockBottle) SSBlocks.bottle).getFluidItem(new FluidStack(SSFluids.takumiTea,1000)),216)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.takumiTeaBottle,2), 216)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.seasonStone,1),3000)); diff --git a/src/main/java/shift/sextiarysector/SSVillages.java b/src/main/java/shift/sextiarysector/SSVillages.java index b32b9ad..8400624 100644 --- a/src/main/java/shift/sextiarysector/SSVillages.java +++ b/src/main/java/shift/sextiarysector/SSVillages.java @@ -1,7 +1,9 @@ package shift.sextiarysector; import net.minecraft.world.gen.structure.MapGenStructureIO; +import shift.sextiarysector.world.village.ComponentWell; import shift.sextiarysector.world.village.ComponentWindmill; +import shift.sextiarysector.world.village.VillageCreationHandlerWell; import shift.sextiarysector.world.village.VillageCreationHandlerWindmill; import cpw.mods.fml.common.registry.VillagerRegistry; @@ -13,6 +15,10 @@ public static void initVillages(){ MapGenStructureIO.registerStructure(ComponentWindmill.class, "VISSSWM"); MapGenStructureIO.func_143031_a(ComponentWindmill.class, "VISSSWM"); + VillagerRegistry.instance().registerVillageCreationHandler(new VillageCreationHandlerWell()); + MapGenStructureIO.registerStructure(ComponentWell.class, "VISSSWE"); + MapGenStructureIO.func_143031_a(ComponentWell.class, "VISSSWE"); + } } diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index b156aba..dccc5fd 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -12,11 +12,11 @@ import shift.sextiarysector.api.machine.item.GearForceItem; import shift.sextiarysector.item.GearForceItemManager; import shift.sextiarysector.module.IModule; -import shift.sextiarysector.module.ModuleAchievement; import shift.sextiarysector.module.ModuleAgriculture; import shift.sextiarysector.module.ModuleChunkLoader; import shift.sextiarysector.module.ModuleSandpit; import shift.sextiarysector.module.ModuleSeason; +import shift.sextiarysector.module.ModuleStatistics; import shift.sextiarysector.packet.SSPacketHandler; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.plugin.SSPlugins; @@ -64,7 +64,7 @@ public void preInit(FMLPreInitializationEvent event) GearForceItem.manager = new GearForceItemManager(); //Module - modules.add(ModuleAchievement.getInstance()); + modules.add(ModuleStatistics.getInstance()); modules.add(ModuleChunkLoader.getInstance()); modules.add(ModuleSeason.getInstance()); modules.add(ModuleAgriculture.getInstance()); @@ -76,6 +76,7 @@ public void preInit(FMLPreInitializationEvent event) SSCreativeTabs.initCreativeTabs(); SSFluids.initFluids(); + SSPotions.initPotions(); SSItems.initItems(); SSBlocks.initBlicks(); SSEntitys.initEntity(); @@ -100,6 +101,8 @@ public void preInit(FMLPreInitializationEvent event) SSPlugins.prePlugins(event); + SSAchievement.initAchievements(); + } @Mod.EventHandler diff --git a/src/main/java/shift/sextiarysector/achievement/AchievementBase.java b/src/main/java/shift/sextiarysector/achievement/AchievementBase.java new file mode 100644 index 0000000..eed4089 --- /dev/null +++ b/src/main/java/shift/sextiarysector/achievement/AchievementBase.java @@ -0,0 +1,35 @@ +package shift.sextiarysector.achievement; + +import java.util.ArrayList; + +import net.minecraft.client.entity.EntityClientPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import net.minecraft.util.StatCollector; +import shift.sextiarysector.SextiarySector; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class AchievementBase extends Achievement{ + + private final String achievementDescription2; + + public AchievementBase(String p_i45302_1_,int p_i45302_3_, int p_i45302_4_, ItemStack p_i45302_5_, Achievement p_i45302_6_, ArrayLista) { + super("achievement.ss"+p_i45302_1_, "ss." + p_i45302_1_, p_i45302_3_, p_i45302_4_, p_i45302_5_,p_i45302_6_); + this.achievementDescription2 = "achievement.ss." + p_i45302_1_ + ".desc2"; + a.add(this); + } + + @SideOnly(Side.CLIENT) + public String getDescription() + { + + if(((EntityClientPlayerMP) SextiarySector.proxy.getClientPlayer()).getStatFileWriter().hasAchievementUnlocked(this)){ + return StatCollector.translateToLocal(this.achievementDescription2); + }else{ + return super.getDescription(); + } + + } + +} diff --git a/src/main/java/shift/sextiarysector/achievement/AchievementCraft.java b/src/main/java/shift/sextiarysector/achievement/AchievementCraft.java new file mode 100644 index 0000000..baa2074 --- /dev/null +++ b/src/main/java/shift/sextiarysector/achievement/AchievementCraft.java @@ -0,0 +1,30 @@ +package shift.sextiarysector.achievement; + +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent; + +public class AchievementCraft extends AchievementBase{ + + public AchievementCraft(String p_i45302_1_, int p_i45302_3_,int p_i45302_4_, ItemStack p_i45302_5_, Achievement p_i45302_6_,ArrayList a) { + super(p_i45302_1_, p_i45302_3_, p_i45302_4_, p_i45302_5_, p_i45302_6_, a); + FMLCommonHandler.instance().bus().register(this); + } + + @SubscribeEvent + public void onItemCraftedEvent(ItemCraftedEvent event){ + if(checkItem(event.crafting, this.theItemStack) && event.player != null){ + event.player.addStat(this, 1); + } + } + + private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } + +} diff --git a/src/main/java/shift/sextiarysector/achievement/AchievementCrop.java b/src/main/java/shift/sextiarysector/achievement/AchievementCrop.java new file mode 100644 index 0000000..58268d8 --- /dev/null +++ b/src/main/java/shift/sextiarysector/achievement/AchievementCrop.java @@ -0,0 +1,77 @@ +package shift.sextiarysector.achievement; + +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.client.entity.EntityClientPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.season.Season; +import shift.sextiarysector.block.BlockSSCrop; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class AchievementCrop extends AchievementPickup{ + + private BlockSSCrop crop; + private String n = "\n";//System.getProperty("line.separator"); + + public AchievementCrop(String p_i45302_1_, int p_i45302_3_,int p_i45302_4_, ItemStack p_i45302_5_, Block block, Achievement p_i45302_6_,ArrayList a) { + super(p_i45302_1_, p_i45302_3_, p_i45302_4_, p_i45302_5_, p_i45302_6_, a); + this.crop = (BlockSSCrop) block; + } + + EnumChatFormatting[] InformationC = new EnumChatFormatting[]{EnumChatFormatting.LIGHT_PURPLE,EnumChatFormatting.GREEN,EnumChatFormatting.YELLOW,EnumChatFormatting.BLUE,EnumChatFormatting.GRAY}; + + @SideOnly(Side.CLIENT) + public String getDescription() + { + + if(((EntityClientPlayerMP) SextiarySector.proxy.getClientPlayer()).getStatFileWriter().hasAchievementUnlocked(this)){ + + StringBuffer str = new StringBuffer(); + + str.append(StatCollector.translateToLocal("achievement.ss.data")); + str.append(n); + str.append(StatCollector.translateToLocal("tooltip.season.seed")); + str.append(" : "); + + Season[] season = ((BlockSSCrop)this.crop).getStatus().getSeason(); + + if(season.length==1){ + + str.append(InformationC[season[0].ordinal()]); + str.append(season[0].getTranslatedName()); + + }else if(season.length>=2){ + + str.append(InformationC[season[0].ordinal()]); + str.append(season[0].getTranslatedName()); + + str.append(InformationC[4]); + str.append(" - "); + + str.append(InformationC[season[season.length-1].ordinal()]); + str.append(season[season.length-1].getTranslatedName()); + + } + + str.append(InformationC[4]); + + str.append(n); + + str.append(StatCollector.translateToLocal("tooltip.season.day")); + str.append(" : "); + str.append(this.crop.getStatus().getDays()[2]); + + return str.toString(); + }else{ + return super.getDescription(); + } + + } + +} diff --git a/src/main/java/shift/sextiarysector/achievement/AchievementFurnace.java b/src/main/java/shift/sextiarysector/achievement/AchievementFurnace.java new file mode 100644 index 0000000..d632f8f --- /dev/null +++ b/src/main/java/shift/sextiarysector/achievement/AchievementFurnace.java @@ -0,0 +1,29 @@ +package shift.sextiarysector.achievement; + +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent.ItemSmeltedEvent; + +public class AchievementFurnace extends AchievementBase{ + + public AchievementFurnace(String p_i45302_1_, int p_i45302_3_,int p_i45302_4_, ItemStack p_i45302_5_, Achievement p_i45302_6_,ArrayList a) { + super(p_i45302_1_, p_i45302_3_, p_i45302_4_, p_i45302_5_, p_i45302_6_, a); + FMLCommonHandler.instance().bus().register(this); + } + + @SubscribeEvent + public void onItemSmeltedEvent(ItemSmeltedEvent event){ + if(checkItem(event.smelting, this.theItemStack) && event.player != null){ + event.player.addStat(this, 1); + } + } + + private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } +} diff --git a/src/main/java/shift/sextiarysector/achievement/AchievementPageAgriculture.java b/src/main/java/shift/sextiarysector/achievement/AchievementPageAgriculture.java new file mode 100644 index 0000000..c4580c4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/achievement/AchievementPageAgriculture.java @@ -0,0 +1,26 @@ +package shift.sextiarysector.achievement; + +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.init.Blocks; +import net.minecraft.stats.Achievement; +import net.minecraft.util.IIcon; + +public class AchievementPageAgriculture extends AchievementPageBase implements IAchievementIcon { + + public AchievementPageAgriculture(String name,ArrayList achievements) { + super(name, achievements); + } + + @Override + public IIcon getIcon(Random random, int k3, int j2, int i3) { + return Blocks.dirt.getIcon(0, 0); + } + + @Override + public float getBrightness(int j2, int i3) { + return 0.6f; + } + +} diff --git a/src/main/java/shift/sextiarysector/achievement/AchievementPageBase.java b/src/main/java/shift/sextiarysector/achievement/AchievementPageBase.java new file mode 100644 index 0000000..9c6f246 --- /dev/null +++ b/src/main/java/shift/sextiarysector/achievement/AchievementPageBase.java @@ -0,0 +1,21 @@ +package shift.sextiarysector.achievement; + +import java.util.ArrayList; + +import net.minecraft.stats.Achievement; +import net.minecraft.util.StatCollector; +import net.minecraftforge.common.AchievementPage; + +public class AchievementPageBase extends AchievementPage{ + + public AchievementPageBase(String name, ArrayList achievements) { + super(name, achievements.toArray(new Achievement[0])); + } + + @Override + public String getName() + { + return StatCollector.translateToLocal(super.getName()); + } + +} diff --git a/src/main/java/shift/sextiarysector/achievement/AchievementPageEconomy.java b/src/main/java/shift/sextiarysector/achievement/AchievementPageEconomy.java new file mode 100644 index 0000000..3ade030 --- /dev/null +++ b/src/main/java/shift/sextiarysector/achievement/AchievementPageEconomy.java @@ -0,0 +1,63 @@ +package shift.sextiarysector.achievement; + +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.init.Blocks; +import net.minecraft.stats.Achievement; +import net.minecraft.util.IIcon; + +public class AchievementPageEconomy extends AchievementPageBase implements IAchievementIcon { + + public AchievementPageEconomy(String name,ArrayList achievements) { + super(name, achievements); + } + + @Override + public IIcon getIcon(Random random, int k3, int j2, int i3) { + + IIcon iicon = Blocks.sand.getIcon(0, 0); + + if (k3 <= 37 && j2 + i3 != 35) + { + if (k3 == 22) + { + if (random.nextInt(2) == 0) + { + iicon = Blocks.gold_ore.getIcon(0, 0); + } + else + { + iicon = Blocks.gold_ore.getIcon(0, 0); + } + } + else if (k3 == 10) + { + iicon = Blocks.gold_ore.getIcon(0, 0); + } + else if (k3 == 8) + { + iicon = Blocks.gold_ore.getIcon(0, 0); + } + else if (k3 > 4) + { + iicon = Blocks.stone.getIcon(0, 0); + } + else if (k3 > 0) + { + iicon = Blocks.dirt.getIcon(0, 0); + } + } + else + { + iicon = Blocks.bedrock.getIcon(0, 0); + } + + return iicon; + } + + @Override + public float getBrightness(int j2, int i3) { + return 0.6F - (float)(j2 + i3) / 25.0F * 0.3F; + } +} diff --git a/src/main/java/shift/sextiarysector/achievement/AchievementPageIndustry.java b/src/main/java/shift/sextiarysector/achievement/AchievementPageIndustry.java new file mode 100644 index 0000000..708880d --- /dev/null +++ b/src/main/java/shift/sextiarysector/achievement/AchievementPageIndustry.java @@ -0,0 +1,27 @@ +package shift.sextiarysector.achievement; + +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.init.Blocks; +import net.minecraft.stats.Achievement; +import net.minecraft.util.IIcon; + +public class AchievementPageIndustry extends AchievementPageBase implements IAchievementIcon { + + public AchievementPageIndustry(String name,ArrayList achievements) { + super(name, achievements); + } + + @Override + public IIcon getIcon(Random random, int k3, int j2, int i3) { + + return Blocks.iron_block.getIcon(0, 0); + + } + + @Override + public float getBrightness(int j2, int i3) { + return 0.6f; + } +} diff --git a/src/main/java/shift/sextiarysector/achievement/AchievementPickup.java b/src/main/java/shift/sextiarysector/achievement/AchievementPickup.java new file mode 100644 index 0000000..3334ad9 --- /dev/null +++ b/src/main/java/shift/sextiarysector/achievement/AchievementPickup.java @@ -0,0 +1,29 @@ +package shift.sextiarysector.achievement; + +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent.ItemPickupEvent; + +public class AchievementPickup extends AchievementBase{ + + public AchievementPickup(String p_i45302_1_, int p_i45302_3_,int p_i45302_4_, ItemStack p_i45302_5_, Achievement p_i45302_6_,ArrayList a) { + super(p_i45302_1_, p_i45302_3_, p_i45302_4_, p_i45302_5_, p_i45302_6_, a); + FMLCommonHandler.instance().bus().register(this); + } + + @SubscribeEvent + public void onItemPickupEvent(ItemPickupEvent event){ + if(checkItem(event.pickedUp.getEntityItem(), this.theItemStack) && event.player != null){ + event.player.addStat(this, 1); + } + } + + private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } +} diff --git a/src/main/java/shift/sextiarysector/achievement/IAchievementIcon.java b/src/main/java/shift/sextiarysector/achievement/IAchievementIcon.java new file mode 100644 index 0000000..2f8a828 --- /dev/null +++ b/src/main/java/shift/sextiarysector/achievement/IAchievementIcon.java @@ -0,0 +1,13 @@ +package shift.sextiarysector.achievement; + +import java.util.Random; + +import net.minecraft.util.IIcon; + +public interface IAchievementIcon { + + IIcon getIcon(Random random , int k3, int j2, int i3); + + float getBrightness(int j2, int i3); + +} diff --git a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java index 811b186..964a6f0 100644 --- a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java +++ b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java @@ -17,13 +17,13 @@ public class SextiarySectorAPI { //CreativeTabs public static CreativeTabs TabSSCore; public static CreativeTabs TabSSFluid; - public static CreativeTabs TabSSMachine; public static CreativeTabs TabSSPlayer; public static CreativeTabs TabSSAgriculture; public static CreativeTabs TabSSFishery; public static CreativeTabs TabSSMining; - public static CreativeTabs TabSSTransport; + public static CreativeTabs TabSSIndustry; public static CreativeTabs TabSSCooking; + public static CreativeTabs TabSSTransport; public static CreativeTabs TabSSEconomy; public static CreativeTabs TabSSMagic; diff --git a/src/main/java/shift/sextiarysector/api/event/FillBottleEvent.java b/src/main/java/shift/sextiarysector/api/event/FillBottleEvent.java new file mode 100644 index 0000000..fbcdfd6 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/event/FillBottleEvent.java @@ -0,0 +1,25 @@ +package shift.sextiarysector.api.event; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.event.entity.player.PlayerEvent; + +public class FillBottleEvent extends PlayerEvent +{ + + public final ItemStack current; + public final World world; + public final MovingObjectPosition target; + + public ItemStack result; + + public FillBottleEvent(EntityPlayer player, ItemStack current, World world, MovingObjectPosition target) + { + super(player); + this.current = current; + this.world = world; + this.target = target; + } +} diff --git a/src/main/java/shift/sextiarysector/asm/DepLoader.java b/src/main/java/shift/sextiarysector/asm/DepLoader.java new file mode 100644 index 0000000..0570fc9 --- /dev/null +++ b/src/main/java/shift/sextiarysector/asm/DepLoader.java @@ -0,0 +1,640 @@ +package shift.sextiarysector.asm; + +import java.awt.Desktop; +import java.awt.Dialog.ModalityType; +import java.awt.Dimension; +import java.awt.GraphicsEnvironment; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.io.Closeable; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.InterruptedIOException; +import java.lang.reflect.Field; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; +import java.net.URLConnection; +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.regex.PatternSyntaxException; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; + +import javax.swing.Box; +import javax.swing.JDialog; +import javax.swing.JEditorPane; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JProgressBar; +import javax.swing.WindowConstants; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; + +import net.minecraft.launchwrapper.LaunchClassLoader; +import sun.misc.URLClassPath; +import sun.net.util.URLUtil; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; + +import cpw.mods.fml.common.versioning.ComparableVersion; +import cpw.mods.fml.relauncher.FMLInjectionData; +import cpw.mods.fml.relauncher.FMLLaunchHandler; +import cpw.mods.fml.relauncher.IFMLCallHook; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin; + +/** + * For autodownloading stuff. + * This is really unoriginal, mostly ripped off FML, credits to cpw. + */ +public class DepLoader implements IFMLLoadingPlugin, IFMLCallHook { + private static ByteBuffer downloadBuffer = ByteBuffer.allocateDirect(1 << 23); + private static final String owner = "CB's DepLoader"; + private static DepLoadInst inst; + + public interface IDownloadDisplay { + void resetProgress(int sizeGuess); + + void setPokeThread(Thread currentThread); + + void updateProgress(int fullLength); + + boolean shouldStopIt(); + + void updateProgressString(String string, Object... data); + + Object makeDialog(); + + void showErrorDialog(String name, String url); + } + + @SuppressWarnings("serial") + public static class Downloader extends JOptionPane implements IDownloadDisplay { + private JDialog container; + private JLabel currentActivity; + private JProgressBar progress; + boolean stopIt; + Thread pokeThread; + + private Box makeProgressPanel() { + Box box = Box.createVerticalBox(); + box.add(Box.createRigidArea(new Dimension(0, 10))); + JLabel welcomeLabel = new JLabel("" + owner + " is setting up your minecraft environment"); + box.add(welcomeLabel); + welcomeLabel.setAlignmentY(LEFT_ALIGNMENT); + welcomeLabel = new JLabel("Please wait, " + owner + " has some tasks to do before you can play"); + welcomeLabel.setAlignmentY(LEFT_ALIGNMENT); + box.add(welcomeLabel); + box.add(Box.createRigidArea(new Dimension(0, 10))); + currentActivity = new JLabel("Currently doing ..."); + box.add(currentActivity); + box.add(Box.createRigidArea(new Dimension(0, 10))); + progress = new JProgressBar(0, 100); + progress.setStringPainted(true); + box.add(progress); + box.add(Box.createRigidArea(new Dimension(0, 30))); + return box; + } + + @Override + public JDialog makeDialog() { + if (container != null) + return container; + + setMessageType(JOptionPane.INFORMATION_MESSAGE); + setMessage(makeProgressPanel()); + setOptions(new Object[]{"Stop"}); + addPropertyChangeListener(new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + if (evt.getSource() == Downloader.this && evt.getPropertyName() == VALUE_PROPERTY) { + requestClose("This will stop minecraft from launching\nAre you sure you want to do this?"); + } + } + }); + container = new JDialog(null, "Hello", ModalityType.MODELESS); + container.setResizable(false); + container.setLocationRelativeTo(null); + container.add(this); + this.updateUI(); + container.pack(); + container.setMinimumSize(container.getPreferredSize()); + container.setVisible(true); + container.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); + container.addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + requestClose("Closing this window will stop minecraft from launching\nAre you sure you wish to do this?"); + } + }); + return container; + } + + protected void requestClose(String message) { + int shouldClose = JOptionPane.showConfirmDialog(container, message, "Are you sure you want to stop?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); + if (shouldClose == JOptionPane.YES_OPTION) + container.dispose(); + + stopIt = true; + if (pokeThread != null) + pokeThread.interrupt(); + } + + @Override + public void updateProgressString(String progressUpdate, Object... data) { + //FMLLog.finest(progressUpdate, data); + if (currentActivity != null) + currentActivity.setText(String.format(progressUpdate, data)); + } + + @Override + public void resetProgress(int sizeGuess) { + if (progress != null) + progress.getModel().setRangeProperties(0, 0, 0, sizeGuess, false); + } + + @Override + public void updateProgress(int fullLength) { + if (progress != null) + progress.getModel().setValue(fullLength); + } + + @Override + public void setPokeThread(Thread currentThread) { + this.pokeThread = currentThread; + } + + @Override + public boolean shouldStopIt() { + return stopIt; + } + + @Override + public void showErrorDialog(String name, String url) { + JEditorPane ep = new JEditorPane("text/html", + "" + + owner + " was unable to download required library " + name + + "
Check your internet connection and try restarting or download it manually from" + + "
" + url + " and put it in your mods folder" + + ""); + + ep.setEditable(false); + ep.setOpaque(false); + ep.addHyperlinkListener(new HyperlinkListener() { + @Override + public void hyperlinkUpdate(HyperlinkEvent event) { + try { + if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) + Desktop.getDesktop().browse(event.getURL().toURI()); + } catch (Exception e) { + } + } + }); + + JOptionPane.showMessageDialog(null, ep, "A download error has occured", JOptionPane.ERROR_MESSAGE); + } + } + + public static class DummyDownloader implements IDownloadDisplay { + @Override + public void resetProgress(int sizeGuess) { + } + + @Override + public void setPokeThread(Thread currentThread) { + } + + @Override + public void updateProgress(int fullLength) { + } + + @Override + public boolean shouldStopIt() { + return false; + } + + @Override + public void updateProgressString(String string, Object... data) { + } + + @Override + public Object makeDialog() { + return null; + } + + @Override + public void showErrorDialog(String name, String url) { + } + } + + public static class VersionedFile + { + public final Pattern pattern; + public final String filename; + public final ComparableVersion version; + public final String name; + + public VersionedFile(String filename, Pattern pattern) { + this.pattern = pattern; + this.filename = filename; + Matcher m = pattern.matcher(filename); + if(m.matches()) { + name = m.group(1); + version = new ComparableVersion(m.group(2)); + } + else { + name = null; + version = null; + } + } + + public boolean matches() { + return name != null; + } + } + + public static class Dependency + { + public String url; + public VersionedFile file; + + public String existing; + /** + * Flag set to add this dep to the classpath immediately because it is required for a coremod. + */ + public boolean coreLib; + + public Dependency(String url, VersionedFile file, boolean coreLib) { + this.url = url; + this.file = file; + this.coreLib = coreLib; + } + } + + public static class DepLoadInst { + private File modsDir; + private File v_modsDir; + private IDownloadDisplay downloadMonitor; + private JDialog popupWindow; + + private Map depMap = new HashMap(); + private HashSet depSet = new HashSet(); + + public DepLoadInst() { + String mcVer = (String) FMLInjectionData.data()[4]; + File mcDir = (File) FMLInjectionData.data()[6]; + + modsDir = new File(mcDir, "mods"); + v_modsDir = new File(mcDir, "mods/" + mcVer); + if (!v_modsDir.exists()) + v_modsDir.mkdirs(); + } + + private void addClasspath(String name) { + try { + ((LaunchClassLoader) DepLoader.class.getClassLoader()).addURL(new File(v_modsDir, name).toURI().toURL()); + } catch (MalformedURLException e) { + throw new RuntimeException(e); + } + } + + private void deleteMod(File mod) { + if (mod.delete()) + return; + + try { + ClassLoader cl = DepLoader.class.getClassLoader(); + URL url = mod.toURI().toURL(); + Field f_ucp = URLClassLoader.class.getDeclaredField("ucp"); + Field f_loaders = URLClassPath.class.getDeclaredField("loaders"); + Field f_lmap = URLClassPath.class.getDeclaredField("lmap"); + f_ucp.setAccessible(true); + f_loaders.setAccessible(true); + f_lmap.setAccessible(true); + + URLClassPath ucp = (URLClassPath) f_ucp.get(cl); + Closeable loader = ((Map) f_lmap.get(ucp)).remove(URLUtil.urlNoFragString(url)); + if (loader != null) { + loader.close(); + ((List) f_loaders.get(ucp)).remove(loader); + } + } catch (Exception e) { + e.printStackTrace(); + } + + if (!mod.delete()) { + mod.deleteOnExit(); + String msg = owner + " was unable to delete file " + mod.getPath() + " the game will now try to delete it on exit. If this dialog appears again, delete it manually."; + System.err.println(msg); + if (!GraphicsEnvironment.isHeadless()) + JOptionPane.showMessageDialog(null, msg, "An update error has occured", JOptionPane.ERROR_MESSAGE); + + System.exit(1); + } + } + + private void download(Dependency dep) { + popupWindow = (JDialog) downloadMonitor.makeDialog(); + File libFile = new File(v_modsDir, dep.file.filename); + try { + URL libDownload = new URL(dep.url + '/' + dep.file.filename); + downloadMonitor.updateProgressString("Downloading file %s", libDownload.toString()); + System.out.format("Downloading file %s\n", libDownload.toString()); + URLConnection connection = libDownload.openConnection(); + connection.setConnectTimeout(5000); + connection.setReadTimeout(5000); + connection.setRequestProperty("User-Agent", "" + owner + " Downloader"); + int sizeGuess = connection.getContentLength(); + download(connection.getInputStream(), sizeGuess, libFile); + downloadMonitor.updateProgressString("Download complete"); + System.out.println("Download complete"); + + scanDepInfo(libFile); + } catch (Exception e) { + libFile.delete(); + if (downloadMonitor.shouldStopIt()) { + System.err.println("You have stopped the downloading operation before it could complete"); + System.exit(1); + return; + } + downloadMonitor.showErrorDialog(dep.file.filename, dep.url + '/' + dep.file.filename); + throw new RuntimeException("A download error occured", e); + } + } + + private void download(InputStream is, int sizeGuess, File target) throws Exception { + if (sizeGuess > downloadBuffer.capacity()) + throw new Exception(String.format("The file %s is too large to be downloaded by " + owner + " - the download is invalid", target.getName())); + + downloadBuffer.clear(); + + int bytesRead, fullLength = 0; + + downloadMonitor.resetProgress(sizeGuess); + try { + downloadMonitor.setPokeThread(Thread.currentThread()); + byte[] smallBuffer = new byte[1024]; + while ((bytesRead = is.read(smallBuffer)) >= 0) { + downloadBuffer.put(smallBuffer, 0, bytesRead); + fullLength += bytesRead; + if (downloadMonitor.shouldStopIt()) { + break; + } + downloadMonitor.updateProgress(fullLength); + } + is.close(); + downloadMonitor.setPokeThread(null); + downloadBuffer.limit(fullLength); + downloadBuffer.position(0); + } catch (InterruptedIOException e) { + // We were interrupted by the stop button. We're stopping now.. clear interruption flag. + Thread.interrupted(); + throw new Exception("Stop"); + } catch (IOException e) { + throw e; + } + + try { + /*String cksum = generateChecksum(downloadBuffer); + if (cksum.equals(validationHash)) + {*/ + if (!target.exists()) + target.createNewFile(); + + + downloadBuffer.position(0); + FileOutputStream fos = new FileOutputStream(target); + fos.getChannel().write(downloadBuffer); + fos.close(); + /*} + else + { + throw new RuntimeException(String.format("The downloaded file %s has an invalid checksum %s (expecting %s). The download did not succeed correctly and the file has been deleted. Please try launching again.", target.getName(), cksum, validationHash)); + }*/ + } catch (Exception e) { + throw e; + } + } + + private String checkExisting(Dependency dep) { + for (File f : modsDir.listFiles()) { + VersionedFile vfile = new VersionedFile(f.getName(), dep.file.pattern); + if (!vfile.matches() || !vfile.name.equals(dep.file.name)) + continue; + + if (f.renameTo(new File(v_modsDir, f.getName()))) + continue; + + deleteMod(f); + } + + for (File f : v_modsDir.listFiles()) { + VersionedFile vfile = new VersionedFile(f.getName(), dep.file.pattern); + if (!vfile.matches() || !vfile.name.equals(dep.file.name)) + continue; + + int cmp = vfile.version.compareTo(dep.file.version); + if (cmp < 0) { + System.out.println("Deleted old version " + f.getName()); + deleteMod(f); + return null; + } + if (cmp > 0) { + System.err.println("Warning: version of " + dep.file.name + ", " + vfile.version + " is newer than request " + dep.file.version); + return f.getName(); + } + return f.getName();//found dependency + } + return null; + } + + public void load() { + scanDepInfos(); + if (depMap.isEmpty()) + return; + + loadDeps(); + activateDeps(); + } + + private void activateDeps() { + for (Dependency dep : depMap.values()) + if (dep.coreLib) + addClasspath(dep.existing); + } + + private void loadDeps() { + downloadMonitor = FMLLaunchHandler.side().isClient() ? new Downloader() : new DummyDownloader(); + try { + while (!depSet.isEmpty()) { + Iterator it = depSet.iterator(); + Dependency dep = depMap.get(it.next()); + it.remove(); + load(dep); + } + } finally { + if (popupWindow != null) { + popupWindow.setVisible(false); + popupWindow.dispose(); + } + } + } + + private void load(Dependency dep) { + dep.existing = checkExisting(dep); + if (dep.existing == null)//download dep + { + download(dep); + dep.existing = dep.file.filename; + } + } + + private List modFiles() { + List list = new LinkedList(); + list.addAll(Arrays.asList(modsDir.listFiles())); + list.addAll(Arrays.asList(v_modsDir.listFiles())); + return list; + } + + private void scanDepInfos() { + for (File file : modFiles()) { + if (!file.getName().endsWith(".jar") && !file.getName().endsWith(".zip")) + continue; + + scanDepInfo(file); + } + } + + private void scanDepInfo(File file) { + try { + ZipFile zip = new ZipFile(file); + ZipEntry e = zip.getEntry("dependancies.info"); + if (e == null) e = zip.getEntry("dependencies.info"); + if (e != null) + loadJSon(zip.getInputStream(e)); + zip.close(); + } catch (Exception e) { + System.err.println("Failed to load dependencies.info from " + file.getName() + " as JSON"); + e.printStackTrace(); + } + } + + private void loadJSon(InputStream input) throws IOException { + InputStreamReader reader = new InputStreamReader(input); + JsonElement root = new JsonParser().parse(reader); + if (root.isJsonArray()) + loadJSonArr(root); + else + loadJson(root.getAsJsonObject()); + reader.close(); + } + + private void loadJSonArr(JsonElement root) throws IOException { + for (JsonElement node : root.getAsJsonArray()) + loadJson(node.getAsJsonObject()); + } + + private void loadJson(JsonObject node) throws IOException { + boolean obfuscated = ((LaunchClassLoader) DepLoader.class.getClassLoader()) + .getClassBytes("net.minecraft.world.World") == null; + + String testClass = node.get("class").getAsString(); + if (DepLoader.class.getResource("/" + testClass.replace('.', '/') + ".class") != null) + return; + + String repo = node.get("repo").getAsString(); + String filename = node.get("file").getAsString(); + if (!obfuscated && node.has("dev")) + filename = node.get("dev").getAsString(); + + boolean coreLib = node.has("coreLib") && node.get("coreLib").getAsBoolean(); + + Pattern pattern = null; + try { + if(node.has("pattern")) + pattern = Pattern.compile(node.get("pattern").getAsString()); + } catch (PatternSyntaxException e) { + System.err.println("Invalid filename pattern: "+node.get("pattern")); + e.printStackTrace(); + } + if(pattern == null) + pattern = Pattern.compile("(\\w+).*?([\\d\\.]+)[-\\w]*\\.[^\\d]+"); + + VersionedFile file = new VersionedFile(filename, pattern); + if (!file.matches()) + throw new RuntimeException("Invalid filename format for dependency: " + filename); + + addDep(new Dependency(repo, file, coreLib)); + } + + private void addDep(Dependency newDep) { + if (mergeNew(depMap.get(newDep.file.name), newDep)) { + depMap.put(newDep.file.name, newDep); + depSet.add(newDep.file.name); + } + } + + private boolean mergeNew(Dependency oldDep, Dependency newDep) { + if (oldDep == null) + return true; + + Dependency newest = newDep.file.version.compareTo(oldDep.file.version) > 0 ? newDep : oldDep; + newest.coreLib = newDep.coreLib || oldDep.coreLib; + + return newest == newDep; + } + } + + public static void load() { + if (inst == null) { + inst = new DepLoadInst(); + inst.load(); + } + } + + @Override + public String[] getASMTransformerClass() { + return null; + } + + @Override + public String getModContainerClass() { + return null; + } + + @Override + public String getSetupClass() { + return getClass().getName(); + } + + @Override + public void injectData(Map data) { + } + + @Override + public Void call() { + load(); + + return null; + } + + @Override + public String getAccessTransformerClass() { + return null; + } +} \ No newline at end of file diff --git a/src/main/java/shift/sextiarysector/block/BlockFan.java b/src/main/java/shift/sextiarysector/block/BlockFan.java index 4424489..ded0267 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFan.java +++ b/src/main/java/shift/sextiarysector/block/BlockFan.java @@ -14,7 +14,7 @@ public BlockFan() { this.setBlockTextureName("planks_oak"); this.setHardness(1.0F); this.setStepSound(soundTypeStone); - this.setCreativeTab(SextiarySectorAPI.TabSSMachine); + this.setCreativeTab(SextiarySectorAPI.TabSSIndustry); } @Override diff --git a/src/main/java/shift/sextiarysector/block/BlockGFTank.java b/src/main/java/shift/sextiarysector/block/BlockGFTank.java index 81ba02b..e78441e 100644 --- a/src/main/java/shift/sextiarysector/block/BlockGFTank.java +++ b/src/main/java/shift/sextiarysector/block/BlockGFTank.java @@ -35,7 +35,7 @@ public BlockGFTank(Material p_i45386_1_, int gui,int type) { this.guiID = gui; this.type = type; this.setHardness(0.8F); - this.setCreativeTab(SextiarySectorAPI.TabSSMachine); + this.setCreativeTab(SextiarySectorAPI.TabSSIndustry); } @Override diff --git a/src/main/java/shift/sextiarysector/block/BlockGearBox.java b/src/main/java/shift/sextiarysector/block/BlockGearBox.java index e5a1e6e..5a00214 100644 --- a/src/main/java/shift/sextiarysector/block/BlockGearBox.java +++ b/src/main/java/shift/sextiarysector/block/BlockGearBox.java @@ -30,7 +30,7 @@ public BlockGearBox(Material p_i45386_1_,int type) { super(p_i45386_1_); this.type = type; this.setHardness(1.0F); - this.setCreativeTab(SextiarySectorAPI.TabSSMachine); + this.setCreativeTab(SextiarySectorAPI.TabSSIndustry); } @Override diff --git a/src/main/java/shift/sextiarysector/block/BlockGearShaft.java b/src/main/java/shift/sextiarysector/block/BlockGearShaft.java index 08bb044..16fa8e9 100644 --- a/src/main/java/shift/sextiarysector/block/BlockGearShaft.java +++ b/src/main/java/shift/sextiarysector/block/BlockGearShaft.java @@ -29,7 +29,7 @@ public BlockGearShaft(int type) { super(Material.wood); this.setType(type); this.setHardness(0.8F); - this.setCreativeTab(SextiarySectorAPI.TabSSMachine); + this.setCreativeTab(SextiarySectorAPI.TabSSIndustry); } diff --git a/src/main/java/shift/sextiarysector/block/BlockHole.java b/src/main/java/shift/sextiarysector/block/BlockHole.java index d45773d..56c7cbb 100644 --- a/src/main/java/shift/sextiarysector/block/BlockHole.java +++ b/src/main/java/shift/sextiarysector/block/BlockHole.java @@ -13,6 +13,7 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SSAchievement; import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SextiarySector; import cpw.mods.fml.relauncher.Side; @@ -48,6 +49,7 @@ public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727 }else if(itemstack.getItem() == Items.water_bucket && p_149727_1_.getBlockMetadata(p_149727_2_, p_149727_3_, p_149727_4_)==0){ this.addWater(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_); + p_149727_5_.addStat(SSAchievement.paddy, 1); return true; } diff --git a/src/main/java/shift/sextiarysector/block/BlockSSFluid.java b/src/main/java/shift/sextiarysector/block/BlockSSFluid.java new file mode 100644 index 0000000..48d7e49 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockSSFluid.java @@ -0,0 +1,45 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; +import net.minecraft.block.material.MaterialLiquid; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.fluids.BlockFluidClassic; +import net.minecraftforge.fluids.Fluid; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockSSFluid extends BlockFluidClassic{ + + public static final Material water = new SSMaterial(); + public BlockSSFluid(Fluid fluid) { + super(fluid, Material.water); + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + if(p_149691_2_ == 0){ + return this.getFluid().getStillIcon(); + }else{ + return this.getFluid().getFlowingIcon(); + } + } + + @SideOnly(Side.CLIENT) + public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) + { + return this.getFluid().getColor(); + } + + public static class SSMaterial extends MaterialLiquid{ + + public SSMaterial() { + super(MapColor.waterColor); + this.setNoPushMobility(); + } + + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockShaft.java b/src/main/java/shift/sextiarysector/block/BlockShaft.java index c6f3bf0..f71356c 100644 --- a/src/main/java/shift/sextiarysector/block/BlockShaft.java +++ b/src/main/java/shift/sextiarysector/block/BlockShaft.java @@ -23,7 +23,7 @@ public BlockShaft(int type) { super(Material.wood); this.setType(type); this.setHardness(0.8F); - this.setCreativeTab(SextiarySectorAPI.TabSSMachine); + this.setCreativeTab(SextiarySectorAPI.TabSSIndustry); } diff --git a/src/main/java/shift/sextiarysector/block/BlockShippingBox.java b/src/main/java/shift/sextiarysector/block/BlockShippingBox.java index b2339c5..6243cc0 100644 --- a/src/main/java/shift/sextiarysector/block/BlockShippingBox.java +++ b/src/main/java/shift/sextiarysector/block/BlockShippingBox.java @@ -10,8 +10,9 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import shift.mceconomy2.api.MCEconomyAPI; +import shift.sextiarysector.SSAchievement; import shift.sextiarysector.SSItems; -import shift.sextiarysector.module.ModuleAchievement; +import shift.sextiarysector.module.ModuleStatistics; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -53,8 +54,8 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p } MCEconomyAPI.addPlayerMP(par5EntityPlayer, i,false); - par5EntityPlayer.addStat(ModuleAchievement.objectSellStats[Item.getIdFromItem(item.getItem())], 1); - par5EntityPlayer.addStat(ModuleAchievement.shipping, 1); + par5EntityPlayer.addStat(ModuleStatistics.objectSellStats[Item.getIdFromItem(item.getItem())], 1); + par5EntityPlayer.addStat(SSAchievement.shipping, 1); item.stackSize--; world.playSoundAtEntity(par5EntityPlayer, "damage.fallsmall", 1.0F, 1.0F); return true; diff --git a/src/main/java/shift/sextiarysector/block/BlockSimpleMachine.java b/src/main/java/shift/sextiarysector/block/BlockSimpleMachine.java index b7bb78b..ba1d1fc 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSimpleMachine.java +++ b/src/main/java/shift/sextiarysector/block/BlockSimpleMachine.java @@ -1,6 +1,7 @@ package shift.sextiarysector.block; import java.util.List; +import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; @@ -8,9 +9,11 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; @@ -25,6 +28,7 @@ public class BlockSimpleMachine extends BlockContainer { + private final Random furnaceRand = new Random(); private final String IconName; @SideOnly(Side.CLIENT) private IIcon iconTop; @@ -236,6 +240,64 @@ public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, Entit } + @Override + public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) + { + + TileEntitySimpleMachine tileentityfurnace = (TileEntitySimpleMachine)par1World.getTileEntity(par2, par3, par4); + + if (tileentityfurnace != null) + { + for (int j1 = 0; j1 < tileentityfurnace.getSizeInventory(); ++j1) + { + ItemStack itemstack = tileentityfurnace.getStackInSlot(j1); + + this.dropItem(itemstack, par1World, par2, par3, par4); + + } + + par1World.func_147453_f(par2, par3, par4, par5); + } + + + super.breakBlock(par1World, par2, par3, par4, par5, par6); + } + + private void dropItem(ItemStack itemstack ,World par1World,int par2, int par3, int par4){ + + if (itemstack != null) + { + float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + + while (itemstack.stackSize > 0) + { + int k1 = this.furnaceRand.nextInt(21) + 10; + + if (k1 > itemstack.stackSize) + { + k1 = itemstack.stackSize; + } + + itemstack.stackSize -= k1; + EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float)this.furnaceRand.nextGaussian() * f3; + entityitem.motionY = (float)this.furnaceRand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.furnaceRand.nextGaussian() * f3; + par1World.spawnEntityInWorld(entityitem); + } + } + + } + public Block setBlockName(String p_149663_1_) { super.setBlockName(p_149663_1_); diff --git a/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java b/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java index cc097a2..871d608 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java +++ b/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java @@ -29,8 +29,8 @@ public ContainerFluidMachineBase(InventoryPlayer p_i1812_1_, TileEntityFluidMach this.addSlotToContainer(new Slot(p_i1812_2_, 1, 56, 53)); this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 2, 107, 53)); this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 3, 125, 53)); - this.addSlotToContainer(new Slot(p_i1812_2_, 4, 152, 17)); - this.addSlotToContainer(new Slot(p_i1812_2_, 5, 152, 53)); + this.addSlotToContainer(new SlotFluid(p_i1812_2_, 4, 152, 17)); + this.addSlotToContainer(new SlotFluid(p_i1812_2_, 5, 152, 53)); int i; for (i = 0; i < 3; ++i) diff --git a/src/main/java/shift/sextiarysector/container/SlotFluid.java b/src/main/java/shift/sextiarysector/container/SlotFluid.java new file mode 100644 index 0000000..89c7181 --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/SlotFluid.java @@ -0,0 +1,31 @@ +package shift.sextiarysector.container; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraftforge.fluids.FluidContainerRegistry; +import shift.sextiarysector.event.ClientEventHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class SlotFluid extends Slot{ + + public SlotFluid(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_,int p_i1824_4_) { + super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_); + } + + @Override + public boolean isItemValid(ItemStack stack) { + + return FluidContainerRegistry.isContainer(stack) ; + + } + + @SideOnly(Side.CLIENT) + public IIcon getBackgroundIconIndex() + { + return ClientEventHandler.slotFluid; + } + +} diff --git a/src/main/java/shift/sextiarysector/event/AchievementEventHandler.java b/src/main/java/shift/sextiarysector/event/AchievementEventHandler.java new file mode 100644 index 0000000..22bba0a --- /dev/null +++ b/src/main/java/shift/sextiarysector/event/AchievementEventHandler.java @@ -0,0 +1,15 @@ +package shift.sextiarysector.event; + +import shift.mceconomy2.api.shop.ShopBuyEvent; +import shift.sextiarysector.SSAchievement; +import shift.sextiarysector.item.ItemBlockCrop; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +public class AchievementEventHandler { + + @SubscribeEvent + public void useEvent(ShopBuyEvent event) { + if(event.buy.getItem() instanceof ItemBlockCrop)event.entityPlayer.addStat(SSAchievement.seed, 1); + } + +} diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 885d9d7..e7b58ad 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -7,6 +7,8 @@ import net.minecraft.block.BlockLeaves; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiIngameMenu; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.achievement.GuiAchievements; import net.minecraft.client.gui.achievement.GuiStats; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -31,6 +33,7 @@ import shift.sextiarysector.api.agriculture.IFertilizer; import shift.sextiarysector.api.machine.energy.IGearForceGrid; import shift.sextiarysector.api.machine.item.IGearForceGridItem; +import shift.sextiarysector.gui.GuiAchievementsNext; import shift.sextiarysector.gui.GuiStatsNext; import shift.sextiarysector.item.TextureSeason; import shift.sextiarysector.module.FertilizerManager; @@ -38,6 +41,7 @@ import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.player.EquipmentType; import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.ObfuscationReflectionHelper; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -48,6 +52,7 @@ public class ClientEventHandler { public static Minecraft mc = FMLClientHandler.instance().getClient(); @SubscribeEvent + @SideOnly(Side.CLIENT) public void onGuiOpenEvent(GuiOpenEvent event) { if(event.gui instanceof GuiStats&&!(event.gui instanceof GuiStatsNext)){ @@ -82,6 +87,13 @@ public void onGuiOpenEvent(GuiOpenEvent event) { //System.out.println("GuiOpenEvent"); } + if(event.gui instanceof GuiAchievements){ + + GuiScreen gui = ObfuscationReflectionHelper.getPrivateValue(GuiAchievements.class, (GuiAchievements)event.gui, "field_146562_a"); + event.gui = new GuiAchievementsNext(gui ,mc.thePlayer.getStatFileWriter()); + + } + } @SubscribeEvent @@ -98,6 +110,7 @@ public void onItemTooltipEvent(ItemTooltipEvent event) { } public static IIcon slotGF; + public static IIcon slotFluid; public static IIcon[] itemGF; @@ -114,6 +127,7 @@ public void PreTextureStitchEvent(TextureStitchEvent.Pre event){ slotGF = event.map.registerIcon("sextiarysector:gui/slot_gf"); + slotFluid = event.map.registerIcon("sextiarysector:gui/slot_fluid"); itemGF = new IIcon[2]; itemGF[0] = event.map.registerIcon("sextiarysector:damage/damage_0"); diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index 55f38db..edddf24 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -13,6 +13,9 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntityChest; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary.Type; @@ -22,6 +25,7 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SSAchievement; import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SSFluids.SSFluid; import shift.sextiarysector.api.SextiarySectorAPI; @@ -29,7 +33,6 @@ import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockMonitor.MonitorType; import shift.sextiarysector.item.ItemKnife; -import shift.sextiarysector.module.ModuleAchievement; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -57,7 +60,7 @@ public void useEvent(PlayerInteractEvent event) { byte b0 = nbttagcompound1.getByte("Type"); if(b0==3){ - p.addStat(ModuleAchievement.creeperFirework, 1); + p.addStat(SSAchievement.creeperFirework, 1); } } @@ -69,6 +72,93 @@ public void useEvent(PlayerInteractEvent event) { } + /* 無理でした(╹◡╹) + @SubscribeEvent + public void useBottleEvent(PlayerInteractEvent event) { + + ItemStack item = event.entityPlayer.getCurrentEquippedItem(); + EntityPlayer p = event.entityPlayer; + World w = event.world; + + if(item == null)return; + + if(item.getItem() != Items.glass_bottle)return; + + //if(w.isRemote)return; + + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(w, p, true); + + if (movingobjectposition == null) + { + return; + } + else + { + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!w.canMineBlock(p, i, j, k)) + { + return; + } + + if (!p.canPlayerEdit(i, j, k, movingobjectposition.sideHit, item)) + { + return; + } + + if (w.getBlock(i, j, k) == SSBlocks.drinkingWater) + { + --item.stackSize; + event.useItem = Result.DENY; + //event.setCanceled(true); + + if (item.stackSize <= 0) + { + p.inventory.setInventorySlotContents(p.inventory.currentItem, new ItemStack(SSItems.drinkingWaterSmallBottle)); + return; + //return new ItemStack(SSItems.drinkingWaterSmallBottle); + } + + if (!p.inventory.addItemStackToInventory(new ItemStack(SSItems.drinkingWaterSmallBottle))) + { + p.dropPlayerItemWithRandomChoice(new ItemStack(SSItems.drinkingWaterSmallBottle, 1, 0), false); + } + } + } + + return; + } + + }*/ + + protected MovingObjectPosition getMovingObjectPositionFromPlayer(World p_77621_1_, EntityPlayer p_77621_2_, boolean p_77621_3_) + { + float f = 1.0F; + float f1 = p_77621_2_.prevRotationPitch + (p_77621_2_.rotationPitch - p_77621_2_.prevRotationPitch) * f; + float f2 = p_77621_2_.prevRotationYaw + (p_77621_2_.rotationYaw - p_77621_2_.prevRotationYaw) * f; + double d0 = p_77621_2_.prevPosX + (p_77621_2_.posX - p_77621_2_.prevPosX) * (double)f; + double d1 = p_77621_2_.prevPosY + (p_77621_2_.posY - p_77621_2_.prevPosY) * (double)f + (double)(p_77621_1_.isRemote ? p_77621_2_.getEyeHeight() - p_77621_2_.getDefaultEyeHeight() : p_77621_2_.getEyeHeight()); // isRemote check to revert changes to ray trace position due to adding the eye height clientside and player yOffset differences + double d2 = p_77621_2_.prevPosZ + (p_77621_2_.posZ - p_77621_2_.prevPosZ) * (double)f; + Vec3 vec3 = Vec3.createVectorHelper(d0, d1, d2); + float f3 = MathHelper.cos(-f2 * 0.017453292F - (float)Math.PI); + float f4 = MathHelper.sin(-f2 * 0.017453292F - (float)Math.PI); + float f5 = -MathHelper.cos(-f1 * 0.017453292F); + float f6 = MathHelper.sin(-f1 * 0.017453292F); + float f7 = f4 * f5; + float f8 = f3 * f5; + double d3 = 5.0D; + if (p_77621_2_ instanceof EntityPlayerMP) + { + d3 = ((EntityPlayerMP)p_77621_2_).theItemInWorldManager.getBlockReachDistance(); + } + Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3); + return p_77621_1_.func_147447_a(vec3, vec31, p_77621_3_, !p_77621_3_, false); + } + /**クリーパーチェスト*/ @SubscribeEvent public void livingSleepingEvent(LivingUpdateEvent event) { @@ -84,7 +174,7 @@ public void livingSleepingEvent(LivingUpdateEvent event) { EntityPlayerMP player = (EntityPlayerMP) event.entityLiving; - if(!player.func_147099_x().hasAchievementUnlocked(ModuleAchievement.creeperFirework)||player.func_147099_x().hasAchievementUnlocked(ModuleAchievement.creeperChest)){ + if(!player.func_147099_x().hasAchievementUnlocked(SSAchievement.creeperFirework)||player.func_147099_x().hasAchievementUnlocked(SSAchievement.creeperChest)){ return; } @@ -103,7 +193,7 @@ public void livingSleepingEvent(LivingUpdateEvent event) { for(int k = -range; k < range; k++){ if (world.isAirBlock(x + i, y + k, z + j)) { if (generateChest(world, x + i, y + k, z + j)) { - player.addStat(ModuleAchievement.creeperChest, 1); + player.addStat(SSAchievement.creeperChest, 1); return; } } diff --git a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java index 39755d4..304db87 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java @@ -9,6 +9,7 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; +import net.minecraftforge.event.entity.player.AttackEntityEvent; import net.minecraftforge.event.entity.player.PlayerUseItemEvent; import net.minecraftforge.event.world.BlockEvent.BreakEvent; import shift.sextiarysector.api.SextiarySectorAPI; @@ -66,38 +67,25 @@ public void onLivingHurtEvent(LivingHurtEvent event) { EntityPlayer player = (EntityPlayer) event.entityLiving; - SextiarySectorAPI.addMoistureExhaustion(player, event.ammount * 0.3f); + SextiarySectorAPI.addMoistureExhaustion(player, event.ammount * 0.1f); } - // ジャンプ + //攻撃 @SubscribeEvent - public void onLivingJump(LivingJumpEvent event) { + public void onAttackEntityEvent(AttackEntityEvent event) { - if (!(event.entityLiving instanceof EntityPlayer)) { - return; - } - - if (event.entityLiving.worldObj.isRemote) { + if (event.entityLiving.worldObj.isRemote|| !(event.entityLiving instanceof EntityPlayer)) { return; } EntityPlayer player = (EntityPlayer) event.entityLiving; - float i = 1; - - if (BiomeDictionary.isBiomeOfType(player.worldObj.getBiomeGenForCoords((int) player.posX, (int) player.posY), Type.DESERT)) { - i = 2; - } - - if (player.isSprinting()) { - SextiarySectorAPI.addMoistureExhaustion(player, 0.2f * i); - } else { - SextiarySectorAPI.addMoistureExhaustion(player, 0.05f * i); - } + SextiarySectorAPI.addMoistureExhaustion(player, 0.1f); } + /** * スタミナ関係 */ @@ -112,7 +100,7 @@ public void onBlockBreakEventS(BreakEvent event) { EntityPlayer player = event.getPlayer(); - float i = 0.075f; + float i = 0.75f; if (BiomeDictionary .isBiomeOfType( @@ -132,8 +120,7 @@ public void onBlockBreakEventS(BreakEvent event) { @SubscribeEvent public void onLivingHurtEvent2(LivingHurtEvent event) { - if (event.entityLiving.worldObj.isRemote - || !(event.entityLiving instanceof EntityPlayer)) { + if (event.entityLiving.worldObj.isRemote || !(event.entityLiving instanceof EntityPlayer)) { return; } @@ -143,6 +130,48 @@ public void onLivingHurtEvent2(LivingHurtEvent event) { } + // ジャンプ + @SubscribeEvent + public void onLivingJump(LivingJumpEvent event) { + + if (!(event.entityLiving instanceof EntityPlayer)) { + return; + } + + if (event.entityLiving.worldObj.isRemote) { + return; + } + + EntityPlayer player = (EntityPlayer) event.entityLiving; + + float i = 1; + + if (BiomeDictionary.isBiomeOfType(player.worldObj.getBiomeGenForCoords((int) player.posX, (int) player.posY), Type.DESERT)) { + i = 2; + } + + if (player.isSprinting()) { + SextiarySectorAPI.addStaminaExhaustion(player, 2.2f * i); + } else { + SextiarySectorAPI.addStaminaExhaustion(player, 0.5f * i); + } + + } + + //攻撃 + @SubscribeEvent + public void onAttackEntityEvent2(AttackEntityEvent event) { + + if (event.entityLiving.worldObj.isRemote|| !(event.entityLiving instanceof EntityPlayer)) { + return; + } + + EntityPlayer player = (EntityPlayer) event.entityLiving; + + SextiarySectorAPI.addStaminaExhaustion(player, 1.4f); + + } + // ベットで回復 @SubscribeEvent public void LivingSleepingEvent(LivingUpdateEvent event) { @@ -160,17 +189,13 @@ public void LivingSleepingEvent(LivingUpdateEvent event) { if (player.isPlayerFullyAsleep()) { - if (EntityPlayerManager.getMoistureStats(player) - .getMoistureLevel() > 4 - && player.getFoodStats().getFoodLevel() > 4) { - EntityPlayerManager.getStaminaStats(player).addStats(1000, - 500); + if (EntityPlayerManager.getMoistureStats(player).getMoistureLevel() > 4&& player.getFoodStats().getFoodLevel() > 4) { + EntityPlayerManager.getStaminaStats(player).addStats(1000,500); } else { - EntityPlayerManager.getStaminaStats(player).addStats(300, - 100); + EntityPlayerManager.getStaminaStats(player).addStats(300,100); } - player.getFoodStats().addExhaustion(34f); - SextiarySectorAPI.addMoistureExhaustion(player, 34f); + player.getFoodStats().addExhaustion(21.0f); + SextiarySectorAPI.addMoistureExhaustion(player, 21.0f); // System.out.println("LivingSleepingEvent"); } diff --git a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java index 61143b0..6cc4f47 100644 --- a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java @@ -6,10 +6,13 @@ import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.WorldGenLakes; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.event.terraingen.OreGenEvent; +import net.minecraftforge.event.terraingen.PopulateChunkEvent; import shift.sextiarysector.SSBlocks; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -25,6 +28,8 @@ public class WorldEventHandler { private WorldGenMinable ironLarge; private WorldGenMinable goldLarge; + private WorldGenLakes springWater; + private int chunk_X; private int chunk_Z; private World currentWorld; @@ -67,6 +72,26 @@ public void onOreGenEvent(OreGenEvent.Pre event) { } + @SubscribeEvent + public void onPopulateChunkEvent(PopulateChunkEvent.Post event) { + + if(event.world.rand.nextInt(32)!=0)return; + + this.randomGenerato = event.rand; + this.chunk_X = event.chunkX *16; + this.chunk_Z = event.chunkZ *16; + this.currentWorld = event.world; + this.biome = event.world.getBiomeGenForCoords(chunk_X +16, chunk_Z +16); + + this.springWater = new WorldGenLakes(SSBlocks.drinkingWater); + if(BiomeDictionary.isBiomeOfType(biome, Type.FOREST)){ + this.genStandard(1, springWater, 60, 126); + + } + + } + + protected void genStandardOre1(int par1, WorldGenerator par2WorldGenerator, int par3, int par4) { for (int l = 0; l < par1; ++l) @@ -78,4 +103,17 @@ protected void genStandardOre1(int par1, WorldGenerator par2WorldGenerator, int } } + protected void genStandard(int par1, WorldGenerator par2WorldGenerator, int par3, int par4) + { + for (int l = 0; l < par1; ++l) + { + int i1 = this.chunk_X + this.randomGenerato.nextInt(16); + int j1 = this.randomGenerato.nextInt(par4 - par3) + par3; + int k1 = this.chunk_Z + this.randomGenerato.nextInt(16); + if(par2WorldGenerator.generate(this.currentWorld, this.randomGenerato, i1, j1, k1)){ + } + + } + } + } diff --git a/src/main/java/shift/sextiarysector/gui/GuiAchievementsNext.java b/src/main/java/shift/sextiarysector/gui/GuiAchievementsNext.java new file mode 100644 index 0000000..6229917 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiAchievementsNext.java @@ -0,0 +1,637 @@ +package shift.sextiarysector.gui; + +import java.util.LinkedList; +import java.util.List; +import java.util.Random; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiOptionButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.IProgressMeter; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.resources.I18n; +import net.minecraft.init.Blocks; +import net.minecraft.network.play.client.C16PacketClientStatus; +import net.minecraft.stats.Achievement; +import net.minecraft.stats.AchievementList; +import net.minecraft.stats.StatFileWriter; +import net.minecraft.util.ChatComponentTranslation; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.AchievementPage; + +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import shift.sextiarysector.achievement.IAchievementIcon; + +public class GuiAchievementsNext extends GuiScreen implements IProgressMeter{ + + private static final int field_146572_y = AchievementList.minDisplayColumn * 24 - 112; + private static final int field_146571_z = AchievementList.minDisplayRow * 24 - 112; + private static final int field_146559_A = AchievementList.maxDisplayColumn * 24 - 77; + private static final int field_146560_B = AchievementList.maxDisplayRow * 24 - 77; + private static final ResourceLocation field_146561_C = new ResourceLocation("textures/gui/achievement/achievement_background.png"); + protected GuiScreen field_146562_a; + protected int field_146555_f = 256; + protected int field_146557_g = 202; + protected int field_146563_h; + protected int field_146564_i; + protected float field_146570_r = 1.0F; + protected double field_146569_s; + protected double field_146568_t; + protected double field_146567_u; + protected double field_146566_v; + protected double field_146565_w; + protected double field_146573_x; + private int field_146554_D; + private StatFileWriter field_146556_E; + private boolean field_146558_F = true; + + private int currentPage = -1; + private GuiButton button; + private LinkedList minecraftAchievements = new LinkedList(); + + public GuiAchievementsNext(GuiScreen p_i45026_1_, StatFileWriter p_i45026_2_) + { + this.field_146562_a = p_i45026_1_; + this.field_146556_E = p_i45026_2_; + short short1 = 141; + short short2 = 141; + this.field_146569_s = this.field_146567_u = this.field_146565_w = (double)(AchievementList.openInventory.displayColumn * 24 - short1 / 2 - 12); + this.field_146568_t = this.field_146566_v = this.field_146573_x = (double)(AchievementList.openInventory.displayRow * 24 - short2 / 2); + minecraftAchievements.clear(); + for (Object achievement : AchievementList.achievementList) + { + if (!AchievementPage.isAchievementInPages((Achievement)achievement)) + { + minecraftAchievements.add((Achievement)achievement); + } + } + } + + /** + * Adds the buttons (and other controls) to the screen in question. + */ + public void initGui() + { + this.mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS)); + this.buttonList.clear(); + this.buttonList.add(new GuiOptionButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, I18n.format("gui.done", new Object[0]))); + this.buttonList.add(button = new GuiButton(2, (width - field_146555_f) / 2 + 24, height / 2 + 74, 125, 20, AchievementPage.getTitle(currentPage))); + } + + protected void actionPerformed(GuiButton p_146284_1_) + { + if (!this.field_146558_F) + { + if (p_146284_1_.id == 1) + { + this.mc.displayGuiScreen(this.field_146562_a); + } + + if (p_146284_1_.id == 2) + { + currentPage++; + if (currentPage >= AchievementPage.getAchievementPages().size()) + { + currentPage = -1; + } + button.displayString = AchievementPage.getTitle(currentPage); + } + } + } + + /** + * Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e). + */ + protected void keyTyped(char p_73869_1_, int p_73869_2_) + { + if (p_73869_2_ == this.mc.gameSettings.keyBindInventory.getKeyCode()) + { + this.mc.displayGuiScreen((GuiScreen)null); + this.mc.setIngameFocus(); + } + else + { + super.keyTyped(p_73869_1_, p_73869_2_); + } + } + + /** + * Draws the screen and all the components in it. + */ + public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) + { + if (this.field_146558_F) + { + this.drawDefaultBackground(); + this.drawCenteredString(this.fontRendererObj, I18n.format("multiplayer.downloadingStats", new Object[0]), this.width / 2, this.height / 2, 16777215); + this.drawCenteredString(this.fontRendererObj, field_146510_b_[(int)(Minecraft.getSystemTime() / 150L % (long)field_146510_b_.length)], this.width / 2, this.height / 2 + this.fontRendererObj.FONT_HEIGHT * 2, 16777215); + } + else + { + int k; + + if (Mouse.isButtonDown(0)) + { + k = (this.width - this.field_146555_f) / 2; + int l = (this.height - this.field_146557_g) / 2; + int i1 = k + 8; + int j1 = l + 17; + + if ((this.field_146554_D == 0 || this.field_146554_D == 1) && p_73863_1_ >= i1 && p_73863_1_ < i1 + 224 && p_73863_2_ >= j1 && p_73863_2_ < j1 + 155) + { + if (this.field_146554_D == 0) + { + this.field_146554_D = 1; + } + else + { + this.field_146567_u -= (double)((float)(p_73863_1_ - this.field_146563_h) * this.field_146570_r); + this.field_146566_v -= (double)((float)(p_73863_2_ - this.field_146564_i) * this.field_146570_r); + this.field_146565_w = this.field_146569_s = this.field_146567_u; + this.field_146573_x = this.field_146568_t = this.field_146566_v; + } + + this.field_146563_h = p_73863_1_; + this.field_146564_i = p_73863_2_; + } + } + else + { + this.field_146554_D = 0; + } + + k = Mouse.getDWheel(); + float f4 = this.field_146570_r; + + if (k < 0) + { + this.field_146570_r += 0.25F; + } + else if (k > 0) + { + this.field_146570_r -= 0.25F; + } + + this.field_146570_r = MathHelper.clamp_float(this.field_146570_r, 1.0F, 2.0F); + + if (this.field_146570_r != f4) + { + float f6 = f4 - this.field_146570_r; + float f5 = f4 * (float)this.field_146555_f; + float f1 = f4 * (float)this.field_146557_g; + float f2 = this.field_146570_r * (float)this.field_146555_f; + float f3 = this.field_146570_r * (float)this.field_146557_g; + this.field_146567_u -= (double)((f2 - f5) * 0.5F); + this.field_146566_v -= (double)((f3 - f1) * 0.5F); + this.field_146565_w = this.field_146569_s = this.field_146567_u; + this.field_146573_x = this.field_146568_t = this.field_146566_v; + } + + if (this.field_146565_w < (double)field_146572_y) + { + this.field_146565_w = (double)field_146572_y; + } + + if (this.field_146573_x < (double)field_146571_z) + { + this.field_146573_x = (double)field_146571_z; + } + + if (this.field_146565_w >= (double)field_146559_A) + { + this.field_146565_w = (double)(field_146559_A - 1); + } + + if (this.field_146573_x >= (double)field_146560_B) + { + this.field_146573_x = (double)(field_146560_B - 1); + } + + this.drawDefaultBackground(); + this.func_146552_b(p_73863_1_, p_73863_2_, p_73863_3_); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_DEPTH_TEST); + this.func_146553_h(); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_DEPTH_TEST); + } + } + + public void func_146509_g() + { + if (this.field_146558_F) + { + this.field_146558_F = false; + } + } + + /** + * Called from the main game loop to update the screen. + */ + public void updateScreen() + { + if (!this.field_146558_F) + { + this.field_146569_s = this.field_146567_u; + this.field_146568_t = this.field_146566_v; + double d0 = this.field_146565_w - this.field_146567_u; + double d1 = this.field_146573_x - this.field_146566_v; + + if (d0 * d0 + d1 * d1 < 4.0D) + { + this.field_146567_u += d0; + this.field_146566_v += d1; + } + else + { + this.field_146567_u += d0 * 0.85D; + this.field_146566_v += d1 * 0.85D; + } + } + } + + protected void func_146553_h() + { + int i = (this.width - this.field_146555_f) / 2; + int j = (this.height - this.field_146557_g) / 2; + this.fontRendererObj.drawString(I18n.format("gui.achievements", new Object[0]), i + 15, j + 5, 4210752); + } + + protected void func_146552_b(int p_146552_1_, int p_146552_2_, float p_146552_3_) + { + int k = MathHelper.floor_double(this.field_146569_s + (this.field_146567_u - this.field_146569_s) * (double)p_146552_3_); + int l = MathHelper.floor_double(this.field_146568_t + (this.field_146566_v - this.field_146568_t) * (double)p_146552_3_); + + if (k < field_146572_y) + { + k = field_146572_y; + } + + if (l < field_146571_z) + { + l = field_146571_z; + } + + if (k >= field_146559_A) + { + k = field_146559_A - 1; + } + + if (l >= field_146560_B) + { + l = field_146560_B - 1; + } + + int i1 = (this.width - this.field_146555_f) / 2; + int j1 = (this.height - this.field_146557_g) / 2; + int k1 = i1 + 16; + int l1 = j1 + 17; + this.zLevel = 0.0F; + GL11.glDepthFunc(GL11.GL_GEQUAL); + GL11.glPushMatrix(); + GL11.glTranslatef((float)k1, (float)l1, -200.0F); + GL11.glScalef(1.0F / this.field_146570_r, 1.0F / this.field_146570_r, 0.0F); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glEnable(GL11.GL_COLOR_MATERIAL); + int i2 = k + 288 >> 4; + int j2 = l + 288 >> 4; + int k2 = (k + 288) % 16; + int l2 = (l + 288) % 16; + boolean flag = true; + boolean flag1 = true; + boolean flag2 = true; + boolean flag3 = true; + boolean flag4 = true; + Random random = new Random(); + float f1 = 16.0F / this.field_146570_r; + float f2 = 16.0F / this.field_146570_r; + int i3; + int j3; + int k3; + + for (i3 = 0; (float)i3 * f1 - (float)l2 < 155.0F; ++i3) + { + + this.setBrightness(j2, i3); + + for (j3 = 0; (float)j3 * f2 - (float)k2 < 224.0F; ++j3) + { + random.setSeed((long)(this.mc.getSession().getPlayerID().hashCode() + i2 + j3 + (j2 + i3) * 16)); + int ir = 1 + j2 + i3; + if(ir < 0)ir*=-1; + if(ir == 0)ir=1; + k3 = random.nextInt(ir) + (j2 + i3) / 2; + IIcon iicon = this.getIcon(random, k3, j2, i3); + + this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); + this.drawTexturedModelRectFromIcon(j3 * 16 - k2, i3 * 16 - l2, iicon, 16, 16); + } + } + + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glDepthFunc(GL11.GL_LEQUAL); + this.mc.getTextureManager().bindTexture(field_146561_C); + int i4; + int j4; + int l4; + + List achievementList = (currentPage == -1 ? minecraftAchievements : AchievementPage.getAchievementPage(currentPage).getAchievements()); + for (i3 = 0; i3 < achievementList.size(); ++i3) + { + Achievement achievement1 = achievementList.get(i3); + + if (achievement1.parentAchievement != null && achievementList.contains(achievement1.parentAchievement)) + { + j3 = achievement1.displayColumn * 24 - k + 11; + k3 = achievement1.displayRow * 24 - l + 11; + l4 = achievement1.parentAchievement.displayColumn * 24 - k + 11; + int l3 = achievement1.parentAchievement.displayRow * 24 - l + 11; + boolean flag5 = this.field_146556_E.hasAchievementUnlocked(achievement1); + boolean flag6 = this.field_146556_E.canUnlockAchievement(achievement1); + i4 = this.field_146556_E.func_150874_c(achievement1); + + if (i4 <= 4) + { + j4 = -16777216; + + if (flag5) + { + j4 = -6250336; + } + else if (flag6) + { + j4 = -16711936; + } + + this.drawHorizontalLine(j3, l4, k3, j4); + this.drawVerticalLine(l4, k3, l3, j4); + + if (j3 > l4) + { + this.drawTexturedModalRect(j3 - 11 - 7, k3 - 5, 114, 234, 7, 11); + } + else if (j3 < l4) + { + this.drawTexturedModalRect(j3 + 11, k3 - 5, 107, 234, 7, 11); + } + else if (k3 > l3) + { + this.drawTexturedModalRect(j3 - 5, k3 - 11 - 7, 96, 234, 11, 7); + } + else if (k3 < l3) + { + this.drawTexturedModalRect(j3 - 5, k3 + 11, 96, 241, 11, 7); + } + } + } + } + + Achievement achievement = null; + RenderItem renderitem = new RenderItem(); + float f4 = (float)(p_146552_1_ - k1) * this.field_146570_r; + float f5 = (float)(p_146552_2_ - l1) * this.field_146570_r; + RenderHelper.enableGUIStandardItemLighting(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glEnable(GL11.GL_COLOR_MATERIAL); + int i5; + int j5; + + for (l4 = 0; l4 < achievementList.size(); ++l4) + { + Achievement achievement2 = (Achievement)achievementList.get(l4); + i5 = achievement2.displayColumn * 24 - k; + j5 = achievement2.displayRow * 24 - l; + + if (i5 >= -24 && j5 >= -24 && (float)i5 <= 224.0F * this.field_146570_r && (float)j5 <= 155.0F * this.field_146570_r) + { + i4 = this.field_146556_E.func_150874_c(achievement2); + float f6; + + if (this.field_146556_E.hasAchievementUnlocked(achievement2)) + { + f6 = 0.75F; + GL11.glColor4f(f6, f6, f6, 1.0F); + } + else if (this.field_146556_E.canUnlockAchievement(achievement2)) + { + f6 = 1.0F; + GL11.glColor4f(f6, f6, f6, 1.0F); + } + else if (i4 < 3) + { + f6 = 0.3F; + GL11.glColor4f(f6, f6, f6, 1.0F); + } + else if (i4 == 3) + { + f6 = 0.2F; + GL11.glColor4f(f6, f6, f6, 1.0F); + } + else + { + if (i4 != 4) + { + continue; + } + + f6 = 0.1F; + GL11.glColor4f(f6, f6, f6, 1.0F); + } + + this.mc.getTextureManager().bindTexture(field_146561_C); + + GL11.glEnable(GL11.GL_BLEND);// Forge: Specifically enable blend because it is needed here. And we fix Generic RenderItem's leakage of it. + if (achievement2.getSpecial()) + { + this.drawTexturedModalRect(i5 - 2, j5 - 2, 26, 202, 26, 26); + } + else + { + this.drawTexturedModalRect(i5 - 2, j5 - 2, 0, 202, 26, 26); + } + GL11.glDisable(GL11.GL_BLEND); //Forge: Cleanup states we set. + + if (!this.field_146556_E.canUnlockAchievement(achievement2)) + { + f6 = 0.1F; + GL11.glColor4f(f6, f6, f6, 1.0F); + renderitem.renderWithColor = false; + } + + GL11.glDisable(GL11.GL_LIGHTING); //Forge: Make sure Lighting is disabled. Fixes MC-33065 + GL11.glEnable(GL11.GL_CULL_FACE); + renderitem.renderItemAndEffectIntoGUI(this.mc.fontRenderer, this.mc.getTextureManager(), achievement2.theItemStack, i5 + 3, j5 + 3); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glDisable(GL11.GL_LIGHTING); + + if (!this.field_146556_E.canUnlockAchievement(achievement2)) + { + renderitem.renderWithColor = true; + } + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + + if (f4 >= (float)i5 && f4 <= (float)(i5 + 22) && f5 >= (float)j5 && f5 <= (float)(j5 + 22)) + { + achievement = achievement2; + } + } + } + + GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glEnable(GL11.GL_BLEND); + GL11.glPopMatrix(); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(field_146561_C); + this.drawTexturedModalRect(i1, j1, 0, 0, this.field_146555_f, this.field_146557_g); + this.zLevel = 0.0F; + GL11.glDepthFunc(GL11.GL_LEQUAL); + GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glEnable(GL11.GL_TEXTURE_2D); + super.drawScreen(p_146552_1_, p_146552_2_, p_146552_3_); + + if (achievement != null) + { + String s1 = achievement.func_150951_e().getUnformattedText(); + String s2 = achievement.getDescription(); + i5 = p_146552_1_ + 12; + j5 = p_146552_2_ - 4; + i4 = this.field_146556_E.func_150874_c(achievement); + + if (!this.field_146556_E.canUnlockAchievement(achievement)) + { + String s; + int k4; + + if (i4 == 3) + { + s1 = I18n.format("achievement.unknown", new Object[0]); + j4 = Math.max(this.fontRendererObj.getStringWidth(s1), 120); + s = (new ChatComponentTranslation("achievement.requires", new Object[] {achievement.parentAchievement.func_150951_e()})).getUnformattedText(); + k4 = this.fontRendererObj.splitStringWidth(s, j4); + this.drawGradientRect(i5 - 3, j5 - 3, i5 + j4 + 3, j5 + k4 + 12 + 3, -1073741824, -1073741824); + this.fontRendererObj.drawSplitString(s, i5, j5 + 12, j4, -9416624); + } + else if (i4 < 3) + { + j4 = Math.max(this.fontRendererObj.getStringWidth(s1), 120); + s = (new ChatComponentTranslation("achievement.requires", new Object[] {achievement.parentAchievement.func_150951_e()})).getUnformattedText(); + k4 = this.fontRendererObj.splitStringWidth(s, j4); + this.drawGradientRect(i5 - 3, j5 - 3, i5 + j4 + 3, j5 + k4 + 12 + 3, -1073741824, -1073741824); + this.fontRendererObj.drawSplitString(s, i5, j5 + 12, j4, -9416624); + } + else + { + s1 = null; + } + } + else + { + j4 = Math.max(this.fontRendererObj.getStringWidth(s1), 120); + int k5 = this.fontRendererObj.splitStringWidth(s2, j4); + + if (this.field_146556_E.hasAchievementUnlocked(achievement)) + { + k5 += 12; + } + + this.drawGradientRect(i5 - 3, j5 - 3, i5 + j4 + 3, j5 + k5 + 3 + 12, -1073741824, -1073741824); + this.fontRendererObj.drawSplitString(s2, i5, j5 + 12, j4, -6250336); + + if (this.field_146556_E.hasAchievementUnlocked(achievement)) + { + this.fontRendererObj.drawStringWithShadow(I18n.format("achievement.taken", new Object[0]), i5, j5 + k5 + 4, -7302913); + } + } + + if (s1 != null) + { + this.fontRendererObj.drawStringWithShadow(s1, i5, j5, this.field_146556_E.canUnlockAchievement(achievement) ? (achievement.getSpecial() ? -128 : -1) : (achievement.getSpecial() ? -8355776 : -8355712)); + } + } + + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glEnable(GL11.GL_LIGHTING); + RenderHelper.disableStandardItemLighting(); + } + + private void setBrightness(int j2, int i3){ + + if(currentPage != -1 && AchievementPage.getAchievementPage(currentPage) instanceof IAchievementIcon){ + + float f3 = ((IAchievementIcon)AchievementPage.getAchievementPage(currentPage)).getBrightness(j2, i3); + GL11.glColor4f(f3, f3, f3, 1.0F); + return; + + } + + float f3 = 0.6F - (float)(j2 + i3) / 25.0F * 0.3F; + GL11.glColor4f(f3, f3, f3, 1.0F); + + } + + private IIcon getIcon(Random random , int k3, int j2, int i3){ + + IIcon iicon = Blocks.sand.getIcon(0, 0); + + if(currentPage != -1 && AchievementPage.getAchievementPage(currentPage) instanceof IAchievementIcon)return ((IAchievementIcon)AchievementPage.getAchievementPage(currentPage)).getIcon(random, k3, j2, i3); + + if (k3 <= 37 && j2 + i3 != 35) + { + if (k3 == 22) + { + if (random.nextInt(2) == 0) + { + iicon = Blocks.diamond_ore.getIcon(0, 0); + } + else + { + iicon = Blocks.redstone_ore.getIcon(0, 0); + } + } + else if (k3 == 10) + { + iicon = Blocks.iron_ore.getIcon(0, 0); + } + else if (k3 == 8) + { + iicon = Blocks.coal_ore.getIcon(0, 0); + } + else if (k3 > 4) + { + iicon = Blocks.stone.getIcon(0, 0); + } + else if (k3 > 0) + { + iicon = Blocks.dirt.getIcon(0, 0); + } + } + else + { + iicon = Blocks.bedrock.getIcon(0, 0); + } + + return iicon; + + } + + /** + * Returns true if this GUI should pause the game when it is displayed in single-player + */ + public boolean doesGuiPauseGame() + { + return !this.field_146558_F; + } + +} diff --git a/src/main/java/shift/sextiarysector/gui/GuiStatsNext.java b/src/main/java/shift/sextiarysector/gui/GuiStatsNext.java index 73bd2f2..0592fad 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiStatsNext.java +++ b/src/main/java/shift/sextiarysector/gui/GuiStatsNext.java @@ -30,7 +30,7 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import shift.sextiarysector.module.ModuleAchievement; +import shift.sextiarysector.module.ModuleStatistics; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -514,7 +514,7 @@ else if (StatList.objectCraftStats[i] != null && GuiStatsNext.this.field_146546_ { flag = true; } - else if (ModuleAchievement.objectSellStats[i] != null && GuiStatsNext.this.field_146546_t.writeStat(ModuleAchievement.objectSellStats[i]) > 0) + else if (ModuleStatistics.objectSellStats[i] != null && GuiStatsNext.this.field_146546_t.writeStat(ModuleStatistics.objectSellStats[i]) > 0) { flag = true; } @@ -552,8 +552,8 @@ else if (StatsBlock.this.field_148217_o == 1) } else if (StatsBlock.this.field_148217_o == 3) { - statbase = ModuleAchievement.objectSellStats[j]; - statbase1 = ModuleAchievement.objectSellStats[k]; + statbase = ModuleStatistics.objectSellStats[j]; + statbase1 = ModuleStatistics.objectSellStats[k]; } if (statbase != null || statbase1 != null) @@ -641,7 +641,7 @@ protected void drawSlot(int p_148126_1_, int p_148126_2_, int p_148126_3_, int p this.func_148209_a(StatList.objectCraftStats[k1], p_148126_2_ + GuiStatsNext.this.shift + 115, p_148126_3_, p_148126_1_ % 2 == 0); this.func_148209_a(StatList.objectUseStats[k1], p_148126_2_ + GuiStatsNext.this.shift + 165, p_148126_3_, p_148126_1_ % 2 == 0); this.func_148209_a(statcrafting, p_148126_2_ + GuiStatsNext.this.shift + 215, p_148126_3_, p_148126_1_ % 2 == 0); - this.func_148209_a((StatCrafting)ModuleAchievement.objectSellStats[k1], p_148126_2_ + GuiStatsNext.this.shift + 265, p_148126_3_, p_148126_1_ % 2 == 0); + this.func_148209_a((StatCrafting)ModuleStatistics.objectSellStats[k1], p_148126_2_ + GuiStatsNext.this.shift + 265, p_148126_3_, p_148126_1_ % 2 == 0); } @@ -731,7 +731,7 @@ else if (StatList.objectCraftStats[i] != null && GuiStatsNext.this.field_146546_ { flag = true; } - else if (ModuleAchievement.objectSellStats[i] != null && GuiStatsNext.this.field_146546_t.writeStat(ModuleAchievement.objectSellStats[i]) > 0) + else if (ModuleStatistics.objectSellStats[i] != null && GuiStatsNext.this.field_146546_t.writeStat(ModuleStatistics.objectSellStats[i]) > 0) { flag = true; } @@ -770,8 +770,8 @@ else if (StatsItem.this.field_148217_o == 2) // else if (StatsItem.this.field_148217_o == 3) { - statbase = ModuleAchievement.objectSellStats[j]; - statbase1 = ModuleAchievement.objectSellStats[k]; + statbase = ModuleStatistics.objectSellStats[j]; + statbase1 = ModuleStatistics.objectSellStats[k]; } if (statbase != null || statbase1 != null) @@ -856,7 +856,7 @@ protected void drawSlot(int p_148126_1_, int p_148126_2_, int p_148126_3_, int p this.func_148209_a(StatList.objectBreakStats[k1], p_148126_2_ + GuiStatsNext.this.shift + 115, p_148126_3_, p_148126_1_ % 2 == 0); this.func_148209_a(StatList.objectCraftStats[k1], p_148126_2_ + GuiStatsNext.this.shift + 165, p_148126_3_, p_148126_1_ % 2 == 0); this.func_148209_a(statcrafting, p_148126_2_ + GuiStatsNext.this.shift + 215, p_148126_3_, p_148126_1_ % 2 == 0); - this.func_148209_a(ModuleAchievement.objectSellStats[k1], p_148126_2_ + GuiStatsNext.this.shift + 265, p_148126_3_, p_148126_1_ % 2 == 0); + this.func_148209_a(ModuleStatistics.objectSellStats[k1], p_148126_2_ + GuiStatsNext.this.shift + 265, p_148126_3_, p_148126_1_ % 2 == 0); } diff --git a/src/main/java/shift/sextiarysector/item/ItemBottle.java b/src/main/java/shift/sextiarysector/item/ItemBottle.java new file mode 100644 index 0000000..cd70b6a --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemBottle.java @@ -0,0 +1,116 @@ +package shift.sextiarysector.item; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.SSItems; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.api.event.FillBottleEvent; +import cpw.mods.fml.common.eventhandler.Event; + +public class ItemBottle extends Item{ + + public ItemBottle(){ + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + } + + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) + { + + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(p_77659_2_, p_77659_3_, true); + + if (movingobjectposition == null) return p_77659_1_; + + FillBottleEvent event = new FillBottleEvent(p_77659_3_, p_77659_1_, p_77659_2_, movingobjectposition); + if (MinecraftForge.EVENT_BUS.post(event)) + { + return p_77659_1_; + } + + if (event.getResult() == Event.Result.ALLOW) + { + if (p_77659_3_.capabilities.isCreativeMode) + { + return p_77659_1_; + } + + if (--p_77659_1_.stackSize <= 0) + { + return event.result; + } + + if (!p_77659_3_.inventory.addItemStackToInventory(event.result)) + { + p_77659_3_.dropPlayerItemWithRandomChoice(event.result, false); + } + + return p_77659_1_; + + } + + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!p_77659_2_.canMineBlock(p_77659_3_, i, j, k)) + { + return p_77659_1_; + } + + if (!p_77659_3_.canPlayerEdit(i, j, k, movingobjectposition.sideHit, p_77659_1_)) + { + return p_77659_1_; + } + + Block block = p_77659_2_.getBlock(i, j, k); + int l = p_77659_2_.getBlockMetadata(i, j, k); + + if (block == Blocks.water && l == 0) + { + //p_77659_2_.setBlockToAir(i, j, k); + return this.func_150910_a(p_77659_1_, p_77659_3_, SSItems.waterBottle); + } + + if (block == Blocks.lava && l == 0) + { + p_77659_2_.setBlockToAir(i, j, k); + return this.func_150910_a(p_77659_1_, p_77659_3_, SSItems.lavaBottle); + } + + if (block == SSBlocks.drinkingWater && l == 0) + { + //p_77659_2_.setBlockToAir(i, j, k); + return this.func_150910_a(p_77659_1_, p_77659_3_, SSItems.drinkingWaterBottle); + } + + } + + return p_77659_1_; + + } + + + private ItemStack func_150910_a(ItemStack p_150910_1_, EntityPlayer p_150910_2_, Item p_150910_3_) + { + if (p_150910_2_.capabilities.isCreativeMode) return p_150910_1_; + + if (--p_150910_1_.stackSize <= 0) return new ItemStack(p_150910_3_); + + if (!p_150910_2_.inventory.addItemStackToInventory(new ItemStack(p_150910_3_))) + { + p_150910_2_.dropPlayerItemWithRandomChoice(new ItemStack(p_150910_3_, 1, 0), false); + } + + return p_150910_1_; + + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemDrink.java b/src/main/java/shift/sextiarysector/item/ItemDrink.java new file mode 100644 index 0000000..f2fd6ed --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemDrink.java @@ -0,0 +1,13 @@ +package shift.sextiarysector.item; + +import shift.sextiarysector.SSItems; + +public class ItemDrink extends ItemFoodDrink{ + + public ItemDrink(int food, float foodM, int drink, float drinkM,int stamina, float staminaM, boolean p_i45339_3_) { + super(food, foodM, drink, drinkM, stamina, staminaM, p_i45339_3_); + this.setDrink(); + this.setContainerItem(SSItems.emptyBottle); + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemFoodDrink.java b/src/main/java/shift/sextiarysector/item/ItemFoodDrink.java index 6ae3198..d45a227 100644 --- a/src/main/java/shift/sextiarysector/item/ItemFoodDrink.java +++ b/src/main/java/shift/sextiarysector/item/ItemFoodDrink.java @@ -34,7 +34,7 @@ public ItemFoodDrink(int food, float foodM, int drink, float drinkM, int stamina this.healStaminaAmount = stamina; this.saturationModifier = staminaM; - this.setCreativeTab(SextiarySectorAPI.TabSSCore); + this.setCreativeTab(SextiarySectorAPI.TabSSCooking); } diff --git a/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java b/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java new file mode 100644 index 0000000..8f3b2a1 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java @@ -0,0 +1,36 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; +import shift.sextiarysector.SSItems; +import shift.sextiarysector.SSPotions; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class ItemLavaBottle extends ItemFoodDrink{ + + public ItemLavaBottle() { + super(0, 0, 0, 0, 1, 0, false); + this.setContainerItem(SSItems.emptyBottle); + this.setDrink(); + this.setAlwaysEdible(); + + this.setCreativeTab(SextiarySectorAPI.TabSSFluid); + } + + protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer player) + { + + player.addExhaustion(7.8f); + player.addPotionEffect(new PotionEffect(SSPotions.burn.getId(),360,2)); + + if (!player.inventory.addItemStackToInventory(new ItemStack(Blocks.obsidian))) + { + player.dropPlayerItemWithRandomChoice(new ItemStack(Blocks.obsidian, 1, 0), false); + } + + + } +} diff --git a/src/main/java/shift/sextiarysector/item/ItemScoop.java b/src/main/java/shift/sextiarysector/item/ItemScoop.java index ee090a0..f881a12 100644 --- a/src/main/java/shift/sextiarysector/item/ItemScoop.java +++ b/src/main/java/shift/sextiarysector/item/ItemScoop.java @@ -9,6 +9,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.ItemTool; import net.minecraft.world.World; +import shift.sextiarysector.SSAchievement; import shift.sextiarysector.SSBlocks; import shift.sextiarysector.api.SextiarySectorAPI; @@ -52,6 +53,7 @@ public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_ Block block1 = SSBlocks.hole; p_77648_3_.playSoundEffect((double)((float)p_77648_4_ + 0.5F), (double)((float)p_77648_5_ + 0.5F), (double)((float)p_77648_6_ + 0.5F), block1.stepSound.getStepResourcePath(), (block1.stepSound.getVolume() + 1.0F) / 2.0F, block1.stepSound.getPitch() * 0.8F); + p_77648_2_.addStat(SSAchievement.hole, 1); if (p_77648_3_.isRemote) { return true; @@ -68,6 +70,7 @@ else if(p_77648_7_ != 0 && p_77648_3_.getBlock(p_77648_4_, p_77648_5_ + 1, p_776 Block block1 = SSBlocks.farmland; p_77648_3_.playSoundEffect((double)((float)p_77648_4_ + 0.5F), (double)((float)p_77648_5_ + 0.5F), (double)((float)p_77648_6_ + 0.5F), block1.stepSound.getStepResourcePath(), (block1.stepSound.getVolume() + 1.0F) / 2.0F, block1.stepSound.getPitch() * 0.8F); + p_77648_2_.addStat(SSAchievement.farmland, 1); if (p_77648_3_.isRemote) { return true; diff --git a/src/main/java/shift/sextiarysector/item/ItemWaterBottle.java b/src/main/java/shift/sextiarysector/item/ItemWaterBottle.java new file mode 100644 index 0000000..7add2a0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemWaterBottle.java @@ -0,0 +1,27 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; +import shift.sextiarysector.SSItems; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class ItemWaterBottle extends ItemFoodDrink{ + + public ItemWaterBottle() { + super(0, 0, 3, 0, 0, 0, false); + this.setContainerItem(SSItems.emptyBottle); + this.setDrink(); + this.setCreativeTab(SextiarySectorAPI.TabSSFluid); + } + + protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer player) + { + player.addExhaustion(4.5f); + player.addPotionEffect(new PotionEffect(Potion.hunger.getId(),30,0)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/module/ModuleAchievement.java b/src/main/java/shift/sextiarysector/module/ModuleStatistics.java similarity index 68% rename from src/main/java/shift/sextiarysector/module/ModuleAchievement.java rename to src/main/java/shift/sextiarysector/module/ModuleStatistics.java index 5374ecd..b535ddd 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleAchievement.java +++ b/src/main/java/shift/sextiarysector/module/ModuleStatistics.java @@ -1,82 +1,42 @@ package shift.sextiarysector.module; -import java.util.ArrayList; import java.util.Iterator; import net.minecraft.block.Block; import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import net.minecraft.stats.Achievement; import net.minecraft.stats.StatBase; import net.minecraft.stats.StatCrafting; import net.minecraft.stats.StatList; import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.StatCollector; -import net.minecraftforge.common.AchievementPage; -import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SextiarySector; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -public class ModuleAchievement implements IModule { +public class ModuleStatistics implements IModule { - private static ModuleAchievement instance; + private static ModuleStatistics instance; public static StatBase[] objectSellStats = new StatBase[32000]; - private ModuleAchievement() { + private ModuleStatistics() { } - public static ModuleAchievement getInstance() { + public static ModuleStatistics getInstance() { if(instance==null){ - instance = new ModuleAchievement(); + instance = new ModuleStatistics(); } return instance; } @Override public void preInit(FMLPreInitializationEvent event) { - - initEconomy(); - } - private ArrayList economy = new ArrayList(); - - public static Achievement creeperFirework; - - public static Achievement creeperChest; - - public static Achievement shipping; - - private void initEconomy() { - - creeperFirework = new SSAchievement("creeper_firework", 0, 0, new ItemStack(Items.fireworks), (Achievement)null,economy).initIndependentStat().registerStat(); - creeperChest = new SSAchievement("creeper_chest", 1, -2, new ItemStack(SSBlocks.creeperChest), creeperFirework,economy).registerStat(); - shipping = new SSAchievement("shipping", 3, -2, new ItemStack(SSBlocks.shippingBox), creeperChest,economy).registerStat(); - - AchievementPage.registerAchievementPage(new AchievementPage("achievement.ss.economy", economy.toArray(new Achievement[0])){ - public String getName() - { - return StatCollector.translateToLocal(super.getName()); - } - }); - - } - - private static class SSAchievement extends Achievement{ - - public SSAchievement(String p_i45302_1_,int p_i45302_3_, int p_i45302_4_, ItemStack p_i45302_5_,Achievement p_i45302_6_,ArrayLista) { - super("achievement.ss"+p_i45302_1_, p_i45302_1_, p_i45302_3_, p_i45302_4_, p_i45302_5_,p_i45302_6_); - a.add(this); - } - - } @Override public void load(FMLInitializationEvent event) { diff --git a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java index 97d55e5..854e1f1 100644 --- a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java +++ b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java @@ -6,6 +6,7 @@ import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.player.PlayerDropsEvent; +import shift.sextiarysector.SSAchievement; import shift.sextiarysector.api.IPlayerManager; import shift.sextiarysector.packet.PacketPlayerData; import shift.sextiarysector.packet.SSPacketHandler; @@ -49,6 +50,8 @@ public void addMoistureStats(EntityPlayer entityPlayer, int par1, float par2) { if (!entityPlayer.worldObj.isRemote) { getMoistureStats(entityPlayer).addStats(par1, par2); + //Achievement + entityPlayer.addStat(SSAchievement.moisture, 1); } } diff --git a/src/main/java/shift/sextiarysector/player/StaminaStats.java b/src/main/java/shift/sextiarysector/player/StaminaStats.java index 7ca5f8b..da6444a 100644 --- a/src/main/java/shift/sextiarysector/player/StaminaStats.java +++ b/src/main/java/shift/sextiarysector/player/StaminaStats.java @@ -2,6 +2,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; import net.minecraft.world.EnumDifficulty; import shift.sextiarysector.Config; import cpw.mods.fml.relauncher.Side; @@ -84,6 +85,9 @@ else if (this.staminaLevel <= 0) { if (par1EntityPlayer.getHealth() > 10.0F || i.getDifficultyId() >= 3 || par1EntityPlayer.getHealth() > 1.0F && i.getDifficultyId() >= 2) { + if(!par1EntityPlayer.isPlayerSleeping()){ + par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); + } //par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java b/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java index dea5161..4394701 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java @@ -1,13 +1,19 @@ package shift.sextiarysector.plugin; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class PluginAppleMilk implements IPlugin { + public static Item chalcedonyKnife; + @Override public void prePlugin(FMLPreInitializationEvent event) { // TODO 自動生成されたメソッド・スタブ @@ -16,7 +22,11 @@ public void prePlugin(FMLPreInitializationEvent event) { @Override public void initPlugin(FMLInitializationEvent event) { - // TODO 自動生成されたメソッド・スタブ + + this.chalcedonyKnife = GameRegistry.findItem("DCsAppleMilk", "defeatedcrow.chalcedonyKnife"); + + OreDictionary.registerOre("craftingToolWireCutter", new ItemStack(chalcedonyKnife,1,OreDictionary.WILDCARD_VALUE)); + OreDictionary.registerOre("craftingToolKnife", new ItemStack(chalcedonyKnife,1,OreDictionary.WILDCARD_VALUE)); } @@ -28,14 +38,12 @@ public void postPlugin(FMLPostInitializationEvent event) { @Override public String getModName() { - // TODO 自動生成されたメソッド・スタブ return "AppleMilk"; } @Override @SideOnly(Side.CLIENT) public void preClientPlugin(FMLPreInitializationEvent event) { - // TODO 自動生成されたメソッド・スタブ } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginIC2.java b/src/main/java/shift/sextiarysector/plugin/PluginIC2.java index 1702d44..6284530 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginIC2.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginIC2.java @@ -39,7 +39,7 @@ public String getModName() { @Override public void prePlugin(FMLPreInitializationEvent event) { - electricMotor = new BlockElectricMotor().setBlockName("ss.electric_motor").setCreativeTab(SextiarySectorAPI.TabSSMachine); + electricMotor = new BlockElectricMotor().setBlockName("ss.electric_motor").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(electricMotor, ItemBlockDirection.class, "ElectricMotor"); GameRegistry.registerTileEntity(TileEntityElectricMotor.class, "ElectricMotor"); diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java index 88e8391..7c3cbde 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java @@ -25,7 +25,7 @@ public String getModName() { @Override public void prePlugin(FMLPreInitializationEvent event) { - tofuMotor = new BlockTofuMotor().setBlockName("ss.tofu_motor").setCreativeTab(SextiarySectorAPI.TabSSMachine); + tofuMotor = new BlockTofuMotor().setBlockName("ss.tofu_motor").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(tofuMotor, ItemBlockDirection.class, "TofuMotor"); GameRegistry.registerTileEntity(TileEntityTofuMotor.class, "TofuMotor"); diff --git a/src/main/java/shift/sextiarysector/potion/PotionBurn.java b/src/main/java/shift/sextiarysector/potion/PotionBurn.java new file mode 100644 index 0000000..d9720de --- /dev/null +++ b/src/main/java/shift/sextiarysector/potion/PotionBurn.java @@ -0,0 +1,25 @@ +package shift.sextiarysector.potion; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.DamageSource; + +public class PotionBurn extends PotionSS{ + + public PotionBurn(int p_i1573_1_, boolean p_i1573_2_, int p_i1573_3_,int icon) { + super(p_i1573_1_, p_i1573_2_, p_i1573_3_, icon); + } + + public void performEffect(EntityLivingBase p_76394_1_, int p_76394_2_) + { + if (p_76394_1_.getHealth() > 1.0F) + { + p_76394_1_.attackEntityFrom(DamageSource.onFire, 1.0F); + } + } + + public boolean isReady(int p_76397_1_, int amplifier) + { + return p_76397_1_ % (5 - amplifier) == 0; + } + +} diff --git a/src/main/java/shift/sextiarysector/potion/PotionSS.java b/src/main/java/shift/sextiarysector/potion/PotionSS.java new file mode 100644 index 0000000..247e0f4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/potion/PotionSS.java @@ -0,0 +1,34 @@ +package shift.sextiarysector.potion; + +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.ResourceLocation; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PotionSS extends Potion{ + + protected static final ResourceLocation field_147001_a = new ResourceLocation("sextiarysector:textures/guis/potion.png"); + private int iconID; + + public PotionSS(int p_i1573_1_, boolean p_i1573_2_, int p_i1573_3_, int icon) { + super(p_i1573_1_, p_i1573_2_, p_i1573_3_); + this.iconID = icon; + } + + @SideOnly(Side.CLIENT) + public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc) { + + mc.getTextureManager().bindTexture(field_147001_a); + mc.currentScreen.drawTexturedModalRect(x + 6, y + 7, (iconID%14)*18,(iconID/14)*18,18,18); + + } + + @SideOnly(Side.CLIENT) + public boolean hasStatusIcon() + { + return false; + } + + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index 03ce416..08665e9 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -20,6 +20,12 @@ public static void addRecipes(CraftingManager p_77608_1_) 'y', Items.paper, }); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.emptyBottle, 4), + new Object[] { + "x", "x", + 'x', "paneGlassColorless", + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.stringBobbin, 1), new Object[] { "xxx", "xyx", "xxx", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java index 71b255a..fe724d7 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java @@ -14,6 +14,8 @@ public static void addRecipes() GameRegistry.addSmelting(new ItemStack(SSItems.laver),new ItemStack(SSItems.laverRoasted),0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.waterBottle),new ItemStack(SSItems.drinkingWaterBottle),0.1f); + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index d966685..47c10d7 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -21,10 +21,10 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) { //飲み物 - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.drinkingWaterSmallBottle, 1), - new Object[] { - new ItemStack(Items.potionitem), - })); + //p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.drinkingWaterBottle, 1), + // new Object[] { + // new ItemStack(Items.potionitem), + // })); //スライム p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.slime_ball, 2), @@ -36,7 +36,7 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.blueStoneSlimeBall, 1), new Object[] { - SSItems.blueStoneDust, + "dustBluestone", Items.slime_ball })); @@ -58,6 +58,12 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) Character.valueOf('x'), "cobblestone", })); + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.emptyBottle, 8), + new Object[] { + "x", "x", + 'x', "paneGlassColorless", + })); + //Hammer p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.hammer, 1), new Object[] { "xxx", " y "," y ", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index a974cbe..37639d6 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -75,7 +75,7 @@ public static void addRecipes(CraftingManager p_77608_1_) p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(shaft[i], 4), new Object[] { "xzx", "xyx","xzx", - Character.valueOf('y'), SSItems.blueStoneDust, + Character.valueOf('y'), "dustBluestone", Character.valueOf('x'), material[i], Character.valueOf('z'), SSItems.blueStoneSlimeBall })); diff --git a/src/main/java/shift/sextiarysector/world/generator/WorldGenSpringWater.java b/src/main/java/shift/sextiarysector/world/generator/WorldGenSpringWater.java new file mode 100644 index 0000000..0168fdd --- /dev/null +++ b/src/main/java/shift/sextiarysector/world/generator/WorldGenSpringWater.java @@ -0,0 +1,63 @@ +package shift.sextiarysector.world.generator; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class WorldGenSpringWater extends WorldGenerator{ + + private Block water; + + public WorldGenSpringWater(Block water) + { + this.water = water; + } + + @Override + public boolean generate(World p_76484_1_, Random p_76484_2_,int x, int y, int z) { + + if(p_76484_2_.nextInt(6)!=0)return false; + + for(int i=0;i<50 && (y + i)<=255;i++){ + if(p_76484_1_.getBlock(x, y + i, z) == Blocks.dirt || p_76484_1_.getBlock(x, y + i, z) == Blocks.grass){ + y = y + i; + break; + } + } + + if(!this.canGenerate(p_76484_1_, p_76484_2_, x, y, z))return false; + + int h = 1; + + for(int i=h*-1;i<=h;i++){ + for(int j=h*-1;j<=h;j++){ + + p_76484_1_.setBlock(x+i, y, z+j, this.water); + + } + } + + System.out.println("AAA :" + x + " : "+ y + " : " + z); + + return true; + } + + private boolean canGenerate(World p_76484_1_, Random p_76484_2_,int x, int y, int z){ + + int h = 1; + + for(int i=h*-1;i<=h;i++){ + for(int j=h*-1;j<=h;j++){ + + if(p_76484_1_.getBlock(x + i, y, z + j) != Blocks.dirt && p_76484_1_.getBlock(x + i, y, z + j) != Blocks.grass)return false; + + } + } + + return true; + } + +} diff --git a/src/main/java/shift/sextiarysector/world/village/ComponentWell.java b/src/main/java/shift/sextiarysector/world/village/ComponentWell.java new file mode 100644 index 0000000..a9fc204 --- /dev/null +++ b/src/main/java/shift/sextiarysector/world/village/ComponentWell.java @@ -0,0 +1,82 @@ +package shift.sextiarysector.world.village; + +import java.util.List; +import java.util.Random; + +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.gen.structure.StructureBoundingBox; +import net.minecraft.world.gen.structure.StructureComponent; +import net.minecraft.world.gen.structure.StructureVillagePieces; +import shift.sextiarysector.SSBlocks; + +public class ComponentWell extends StructureVillagePieces.Village{ + + public ComponentWell(){ + + } + + public ComponentWell(StructureVillagePieces.Start p_i2107_1_, int p_i2107_2_, Random p_i2106_3_, StructureBoundingBox p_i2106_4_, int p_i2106_5_) + { + super(p_i2107_1_,p_i2107_2_); + this.coordBaseMode = p_i2106_5_; + this.boundingBox = p_i2106_4_; + } + + public void buildComponent(StructureComponent p_74861_1_, List p_74861_2_, Random p_74861_3_) + { + super.buildComponent(p_74861_1_, p_74861_2_, p_74861_3_); + } + + public static Object buildComponent(StructureVillagePieces.Start startPiece,List pieces, Random random, int p1, int p2, int p3, int p4, int p5) { + + StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, 4, 15, 4, p4); + return canVillageGoDeeper(structureboundingbox) && StructureComponent.findIntersecting(pieces, structureboundingbox) == null ? new ComponentWell(startPiece, p5, random, structureboundingbox, p4) : null; + + } + + public boolean addComponentParts(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) + { + if (this.field_143015_k < 0) + { + this.field_143015_k = this.getAverageGroundLevel(p_74875_1_, p_74875_3_); + + if (this.field_143015_k < 0) + { + return true; + } + + this.boundingBox.offset(0, this.field_143015_k - this.boundingBox.maxY + 3, 0); + } + + this.fillWithBlocks(p_74875_1_, p_74875_3_, 1, 0, 1, 4, 12, 4, Blocks.cobblestone, SSBlocks.drinkingWater, false); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.air, 0, 2, 12, 2, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.air, 0, 3, 12, 2, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.air, 0, 2, 12, 3, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.air, 0, 3, 12, 3, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.fence, 0, 1, 13, 1, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.fence, 0, 1, 14, 1, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.fence, 0, 4, 13, 1, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.fence, 0, 4, 14, 1, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.fence, 0, 1, 13, 4, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.fence, 0, 1, 14, 4, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.fence, 0, 4, 13, 4, p_74875_3_); + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.fence, 0, 4, 14, 4, p_74875_3_); + this.fillWithBlocks(p_74875_1_, p_74875_3_, 1, 15, 1, 4, 15, 4, Blocks.cobblestone, Blocks.cobblestone, false); + + for (int i = 0; i <= 5; ++i) + { + for (int j = 0; j <= 5; ++j) + { + if (j == 0 || j == 5 || i == 0 || i == 5) + { + this.placeBlockAtCurrentPosition(p_74875_1_, Blocks.gravel, 0, j, 11, i, p_74875_3_); + this.clearCurrentPositionBlocksUpwards(p_74875_1_, j, 12, i, p_74875_3_); + } + } + } + + return true; + } + +} diff --git a/src/main/java/shift/sextiarysector/world/village/VillageCreationHandlerWell.java b/src/main/java/shift/sextiarysector/world/village/VillageCreationHandlerWell.java new file mode 100644 index 0000000..c470453 --- /dev/null +++ b/src/main/java/shift/sextiarysector/world/village/VillageCreationHandlerWell.java @@ -0,0 +1,28 @@ +package shift.sextiarysector.world.village; + +import java.util.List; +import java.util.Random; + +import net.minecraft.util.MathHelper; +import net.minecraft.world.gen.structure.StructureVillagePieces; +import net.minecraft.world.gen.structure.StructureVillagePieces.PieceWeight; +import net.minecraft.world.gen.structure.StructureVillagePieces.Start; +import cpw.mods.fml.common.registry.VillagerRegistry.IVillageCreationHandler; + +public class VillageCreationHandlerWell implements IVillageCreationHandler { + + @Override + public PieceWeight getVillagePieceWeight(Random random, int i) { + return new StructureVillagePieces.PieceWeight(getComponentClass(), 22, MathHelper.getRandomIntegerInRange(random, i, i+1)); + } + + @Override + public Class getComponentClass() { + return VillageCreationHandlerWell.class; + } + + @Override + public Object buildComponent(PieceWeight villagePiece, Start startPiece,List pieces, Random random, int p1, int p2, int p3, int p4, int p5) { + return ComponentWell.buildComponent(startPiece, pieces, random, p1, p2, p3, p4, p5); + } +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 01fe89a..04094e0 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -119,6 +119,9 @@ item.ss.blue_stone_slime_ball.name=Blue Stone Slime Ball item.ss.energy_reactor.name=Energy Reactor item.ss.object_reactor.name=Object Reactor +item.ss.empty_bottle.name=Empty Bottle +item.ss.water_bottle.name=Water Bottle +item.ss.lava_bottle.name=Lava Bottle item.ss.craft_unit.name=Craft Unit @@ -156,8 +159,6 @@ item.ss.string_bobbin.name=String Bobbin item.ss.cloth.name=Cloth item.ss.canvas.name=Canvas -item.ss.drinking_water_small_bottle.name=Drinking Water Small Bottle - item.ss.wood_scoop.name=Wood Scoop item.ss.stone_scoop.name=Stone Scoop @@ -221,6 +222,8 @@ item.ss.onion_soup.name=Onion Soup item.ss.ender_soup.name=Ender Soup item.ss.tomato_soup.name=Tomato Soup +item.ss.drinking_water_bottle.name=Drinking Water Bottle +item.ss.takumi_tea_bottle.name=TAKUMI Tea Bottle item.ss.shift_hat.name=Shift's Hat item.ss.gf_contact_lenses.name=GF Contact Lenses @@ -228,9 +231,13 @@ item.ss.gf_contact_lenses.name=GF Contact Lenses #Fluid fluid.ss.takumi_tea=TAKUMI Tea fluid.ss.drinking_water=Drinking Water +fluid.ss.steam=Steam fluid.ss.steam=Steam +#Potion +ss.potion.burn=Burn + #GUI container.large_furnace=Large Furnace container.sub.inventory=Buffer @@ -256,6 +263,7 @@ shop.ss.robot=Blue Robot Shop #ToolTip tooltip.season.pm=PM tooltip.season.am=AM +tooltip.season.day=Day tooltip.season=Season tooltip.season.seed=Season @@ -267,13 +275,13 @@ tooltip.season.winter=Winter #Tab itemGroup.ss.core=SextiarySector -Core- itemGroup.ss.fluid=SextiarySector -Fluid- -itemGroup.ss.machine=SextiarySector -Machine- itemGroup.ss.player=SextiarySector -Player- itemGroup.ss.agriculture=SextiarySector -Agriculture- itemGroup.ss.fishery=SextiarySector -Fishery- itemGroup.ss.mining=SextiarySector -Mining- -itemGroup.ss.transport=SextiarySector -Transport- +itemGroup.ss.industry=SextiarySector -Industry- itemGroup.ss.cooking=SextiarySector -Cooking- +itemGroup.ss.transport=SextiarySector -Transport- itemGroup.ss.economy=SextiarySector -Economy- itemGroup.ss.magic=SextiarySector -Magic- @@ -287,16 +295,162 @@ player.tab.item.ss.creeper_ring=Creeper Shop #Achievement stat.sell=Sell -achievement.ss.economy=SextiarySector -Economy- +achievement.ss.core=SS2 -Core- + +achievement.ss.moisture=Moisture +achievement.ss.moisture.desc=Let the hydration +achievement.ss.moisture.desc2=Slippery skin + +achievement.ss.bottle=Bottle +achievement.ss.bottle.desc=Craft a bottle +achievement.ss.bottle.desc2=Strengthening bottle + +achievement.ss.drinking_water=Drinking Water +achievement.ss.drinking_water.desc=Smelting a water bottle +achievement.ss.drinking_water.desc2=Delicious ! + +achievement.ss.craft_furnace=Craft Furnace +achievement.ss.craft_furnace.desc=Craft a large furnace +achievement.ss.craft_furnace.desc2=Complex craft + + +achievement.ss.agriculture=SS2 -Agriculture- + +achievement.ss.data=Crop Data + +achievement.ss.seed=First Seed +achievement.ss.seed.desc=Buy a seed +achievement.ss.seed.desc2=Increase + +achievement.ss.scoop=Scoop +achievement.ss.scoop.desc=Craft a scoop +achievement.ss.scoop.desc2=Friendly touch + +achievement.ss.farmland=Farmland +achievement.ss.farmland.desc=Use a scoop to vanilla farmland +achievement.ss.farmland.desc2=Strong ! + +achievement.ss.watering_can=Watering Can +achievement.ss.watering_can.desc=Craft a watering can +achievement.ss.watering_can.desc2=The spear fun water + +achievement.ss.hole=Hole +achievement.ss.hole.desc=Use a scoop to dirt +achievement.ss.hole.desc2=The Who is a hole here ? + +achievement.ss.paddy=Paddy +achievement.ss.paddy.desc=Use a water bucket to hole +achievement.ss.paddy.desc2=Grow rice ! + +## +achievement.ss.turnip=Turnip +achievement.ss.turnip.desc=Pickup a turnip + +achievement.ss.iron_turnip=Iron Turnip +achievement.ss.iron_turnip.desc=Pickup a iron turnip + +achievement.ss.cucumber=Cucumber +achievement.ss.cucumber.desc=Pickup a cucumber + + +achievement.ss.onion=Onion +achievement.ss.onion.desc=Pickup a onion + +achievement.ss.tomato=Tomato +achievement.ss.tomato.desc=Pickup a tomato + +achievement.ss.corn=Corn +achievement.ss.corn.desc=Pickup a corn + +achievement.ss.golden_corn=Golden Corn +achievement.ss.golden_corn.desc=Pickup a golden corn + + +achievement.ss.eggplant=Eggplant +achievement.ss.eggplant.desc=Pickup a eggplant + +achievement.ss.sweet_potato=Sweet Potato +achievement.ss.sweet_potato.desc=Pickup a sweet potato + +achievement.ss.green_pepper=Green Pepper +achievement.ss.green_pepper.desc=Pickup a green pepper + + +achievement.ss.radish=Radish +achievement.ss.radish.desc=Pickup a radish + + +achievement.ss.rice=Rice +achievement.ss.rice.desc=Pickup a rice + +achievement.ss.mining=SS2 -Mining- + +achievement.ss.bluestone_dust=Color is different ! +achievement.ss.bluestone_dust.desc=Pickup a bluestone dust +achievement.ss.bluestone_dust.desc2=Beautiful ! + +achievement.ss.industry=SS2 -Industry- + +achievement.ss.bluestone_slime_ball=Mysterious slime +achievement.ss.bluestone_slime_ball.desc=Craft a bluestone slime ball +achievement.ss.bluestone_slime_ball.desc2=How nice + + +achievement.ss.wood_gear=New power +achievement.ss.wood_gear.desc=Craft a wood gear +achievement.ss.wood_gear.desc2=Its name GF ! + +achievement.ss.small_windmill=Force of the wind +achievement.ss.small_windmill.desc=Craft a small windmill +achievement.ss.small_windmill.desc2=It's a good wind + +achievement.ss.millstone=The machine +achievement.ss.millstone.desc=Craft a millstone +achievement.ss.millstone.desc2=Flour I ish + +achievement.ss.loom=Cloth ! +achievement.ss.loom.desc=Craft a loom +achievement.ss.loom.desc2=It is rid from naked! + + +achievement.ss.stone_gear=Power ups +achievement.ss.stone_gear.desc=Craft a stone gear +achievement.ss.stone_gear.desc2=Even stone ? + +achievement.ss.windmill=Updraft +achievement.ss.windmill.desc=Craft a windmill +achievement.ss.windmill.desc2=Crying wind + +achievement.ss.sawmill=Blade ? +achievement.ss.sawmill.desc=Craft a sawmill +achievement.ss.sawmill.desc2=Let dismantling together ! + + +achievement.ss.steel_gear=The power of steel +achievement.ss.steel_gear.desc=Craft a steel gear +achievement.ss.steel_gear.desc2=Coal shortage ? + +achievement.ss.small_waterwheel=The power of water +achievement.ss.small_waterwheel.desc=Craft a small waterwheel +achievement.ss.small_waterwheel.desc2=Do not close the lava ! + +achievement.ss.pulverizer=Industrial era +achievement.ss.pulverizer.desc=Craft a pulverizer +achievement.ss.pulverizer.desc2=Double it ! + +achievement.ss.economy=SS2 -Economy- -achievement.creeper_firework=Creeper Monger -achievement.creeper_firework.desc=The attempt to communicate with fireworks ! +achievement.ss.creeper_firework=Creeper Monger +achievement.ss.creeper_firework.desc=The attempt to communicate with fireworks +achievement.ss.creeper_firework.desc2=Explosion ! -achievement.creeper_chest=Creeper Chest -achievement.creeper_chest.desc=Santa Creeper ? +achievement.ss.creeper_chest=Creeper Chest +achievement.ss.creeper_chest.desc=Let's go to bed in a separate +achievement.ss.creeper_chest.desc2=Santa Creeper ? -achievement.shipping=Shipping Block -achievement.shipping.desc=Trying to shipment +achievement.ss.shipping=Shipping Block +achievement.ss.shipping.desc=Trying to shipment +achievement.ss.shipping.desc=I'm millionaire ! #NEI nei.recipe=Recipes diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_flow.png b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_flow.png index 8f6ed730e8fa6607fc8e02c6a9ca33afffdc88e1..90845f47082dcb7f161beb4850545374ff8354ef 100644 GIT binary patch literal 7760 zcmZ8`2{@E(`#uc@#aPQuMV5$?t!5ZY*0PgbvMzHF^p5vH#p5s36>%7kMyb}%ewU`)r7^$eJm~^x?jDdF{ zDk>T(dOF}!RIc?n@J4rEPfLU9_@s(ED>8s948Gcy0aR3{*-u{7RCxtlz(sJN&YfFe z+!+C;3)0UYY$B+r_-A!AR80|I*9*tJXWG(ly}wYNHKW9ktdw(b?f95>%V39m3iJ`J z#r8ggUeC2A&m*`dT}(+F6wTlMrcETRc3{F~{CKPA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sk7WYpV_QgKMPK_jR&bl(thWmZv_5R- z?Y`qv!Lq($Vyde|tIpblR89`NCZ8LEz0t zOQor`7T?}Is?7Po@xuD?efr#6E!FW({1VfM-j4(_t?mA~JF&MG>kP$CD{ibjezd#~ z$nT_)Mp!!%&o&SoeEO|VEs$Gt*!VK%W#zQhe}PcfE@?yaDnD!1ZjVq#XKC2mOXLbl z*!Z@~dKpFR;}&#)AHofPqi$hKFWf$LT&@=FzI_vJ-$-<5s zzn3rA+$U$-a}a3bD)A=~{cDK;u-9QvB3#WXCzbPF2ws>741K*Mc1*@s!qO5^xZ6&6 z4t91_a%M#ycRl631z!k{lkX@xCoLayvvuR!VgVYVD zEeq1MM6D1wUMbYs$A&3U04WAyv0@8!68|{w%BIzIC5-`?GGWFyAmR7#jHoQ9&jBI1 z3Eksm#l8iKtA)GI`phY+*PCS+-ku{ifuw~B_|MXvGddunFSz>~SdebLK1&n-@-qoB zsW%@iM(xzOUS(C0Z4csfY8h9%Ji&;7s`Y4$6MSYs##WtQ;IX3$ZRR9FvD@<5!ST^I zpYiqi&He=DO`~~Di`D1V_JKJVxNZd`x*qjikscVqxjR?6K=X>fz7}^&FFMLBG^K}q zG|AI7ve}o({)%~CIl~SWbM$=`R=yrG*QW2-;fS}}qTB$Pk)ixN=IN^+u~$iGXA77A z2eFut?xIKBh>~knf62;D1lhXkB^`?}l$qHkWRZf*wH#C>%_T^iwWW>aw3`t^ldZjE z3l}}{DzhrQXHPG4Y0TL%V{LFT>2G65kC{X#L3AgA_`d=DJ7?q&#Yv!-jw$`7g%{mc TzmtLSIfb@{fqE6(KJtG6BmP^) diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_still.png b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/water_still.png index 383fb1fd19159e93e4f9d41a7e8e2efc2b76e301..f98b4325c6874ebcb7a7673f45b65c007c59e469 100644 GIT binary patch literal 11246 zcmWk!2Q*uK6t`nlj2dmtv}*57>`vES^A+tpUF*K$h3rn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NFZ@u74)!rH5%P)7Hne*Fb>6F$v=^2UYP0wGk-)9nN=;*ldcD~E<%atEaS-vg2 zzw1)}{swiv1Gg?_#=XxmW&8dk;r`qCcdGC3T>kt~{KFORhO6ew4Xt(@XRqG6_t&$M zeXLb!f2)q1QFM>5t1+0r^kVPpxod-NEuVROxuE-5jh_7JWiIQl{|~5In#%ok4hWQ<3$?`g^JeoXr`$HE+KEu5A4H@ zJ9%dO&inuAS5@+c@Kpv^_SJk8ZjGGI(46_#x8`4Iwhq@>?Ygi3ww!J_e(&x1GeKUR zpFe*-mT>>ZjTPI?&CH|{E$r?4YK)n9%4EOdMHd6jj$?*7@ZJ$(N6dBx29 z5nUY`Z?h8kul=i(3B0v9`1kAxYpsi~zj|esui~(I)plQJRWJY@ zM(5Gn=zhjTH}Aud4w`TM;@QOI^7hRvmR zdi{s5xkt)OU!1=FeS2}q$^bFLr|k1I7_J&EkUD*JYVEArxqj)(GIs_XxLmbO*Q76t(ZYB2;DfGM78ra@grO$Uw|Ng#R}{x8_iXun4C{mn@2 QPzE6IboFyt=akR{05!|rOaK4? literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/fluid/bucket_water.png b/src/main/resources/assets/sextiarysector/textures/items/fluid/bucket_water.png new file mode 100644 index 0000000000000000000000000000000000000000..2f36accb8e5f1b1f8200e302e5724e61dc281b51 GIT binary patch literal 237 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`TRdGHLn>}1CrC^=aOKJudmeT+ zwnK&&rD}tw{pUXw)!r1G_3g1a$C8V7HDVIdN8|qI3)OS8MlZExkY+lhuvLPs!H3QB zgbhX?W|Vz*^IrFQ%@Yot~O1aD3y7_TQiGMMfR|yhpxjd1pdR zsl%jt>m#f4jds>FUAQ{Aur=Ub%it$=x#dwNRkn?ms%NdFdO9zQxU&qxU77 zGs}CxTLOaY4brK;w-wXPlUEW5Wr<2-mFRK5AZi z=JK+sJY`oZ?a%Ghf4^7!pY*MOBCEOAc(?0#Kihsgcl~_{p}H7*`8&OW)=S?NhL`u6 zgzlNYmhp$x{x|(uJu2qO({)apFvQA!ee|?0V9lYPyJ2fqJBqmam=&wd{<+{nPpr&w z%YDtqSQ0j7%zl$MiMg`+$4v$Yj)QgE(n`N-6`wAT=uq}MSJe$f-|Bt?GF4)(y(zdy$ho`MdtVZw0t}?E}r>E;n+^hR_ zD#5OnJhedYG%!ljQ*x1@O-2E;o0R;ELZxb6SZBS-$pmj?VP{xM{nuV38PXI2 z(k=0%=7|TN3!9ml8Jk;pB+y_swzB-xOFRj&(@z`#f)B;7W7}R=UA53nR5Ckx@7x{# zS&Ze^?k4{D`da*O>E0~1v)*f$?0j%`ws}Fl^oex|6!1IR zc8l}m+t(&?+^?KHQH6P)P35QmM_)D<>}y$R+uYN`(^e%`qxWN18Q0;{)Ac3p)%`k^ zU{}i?X6o}}&+%xJsf|DoxU-Ve@4C^$B0Fa0!}V-zY;7CvewUO0f_r-^Ki6Mh7yIAy zBa^b2Ss~k=s;^y+etz%v&zK=`c(!@|gGbNL%~iJJsr&Qe;DLh&9Svj+0%uJqkZQ=W zHd}uA9_xv1(vp%B(-?|QJigpxF8koKc_<@8fQ_@-OJUs!Ko2o^y85}Sb4q9e05#ip A;{X5v literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/fluid/takumi_tea_bottle.png b/src/main/resources/assets/sextiarysector/textures/items/fluid/takumi_tea_bottle.png new file mode 100644 index 0000000000000000000000000000000000000000..3ae2e53eff1d81f38d0c3c7152f8b62898c3db4c GIT binary patch literal 358 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE=Gp`YMk?@>#K%vi`E{-7s2ZHk(vahfEzvIe=2Ss+fZoIp@`@gY)fx(VlyNrZN z4o+70-*Btrtg6qAm=9lHhqE1%>ih3M-|p}E8^<{h#?Fawp3ND~V0UuQX@$)ptcQL! zTkn|3v22pPhlwWJi8CQ>(wn@?h5f`I_^~tf2t@Dy<6hA$qyJ{p-7^o$ZuW06sQB?g zk@>K7$JxB;e-*ar*`;EEqRB1`gv*#FoiEavCD#!8~=zRuHS3j3^P6e?*Hz7|99}mP({V3gB=NifG8fbciUG+4Se61;NgCD zU)kKob=_ZjyNF=YJ7qKqh~f!b=Qp_;tH|Ec;TeEx9AC_(wdUai0?@h}0HC!N&-28@ zg339|LIhzLvexm%aU5B0_oa2UA@t_Tk2Je=BpohJptWW?9wOQM*W(CP ls+ke=_G94rM<(W9;uGc4Ya>EJ6Vw0z002ovPDHLkV1l1fryT$Q literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gui/slot_fluid.png b/src/main/resources/assets/sextiarysector/textures/items/gui/slot_fluid.png new file mode 100644 index 0000000000000000000000000000000000000000..82b2ab515507e03d21bff6b1f9e6dee8bb6b3e9f GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~BNHzp<2}Lhr$C`dPZ!4!i_=Gg9l013ID%hpte&)g zZMI9WmSTT#pW(6-?=Q-7EO=i~em#KKA^rGEJFA`@Wm=Q063o(T?wN~S(K^JGb0%xn tkK75`$K$$Fo?boE74mMuH}SkQhQ Date: Mon, 5 Jan 2015 22:30:58 +0900 Subject: [PATCH 57/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20IFarmland?= =?UTF-8?q?=E3=82=92=E4=BD=BF=E3=81=86=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sextiarysector/tileentity/TileEntitySSCrop.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java index 8228669..bc58e6c 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java @@ -10,7 +10,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import shift.sextiarysector.SSBlocks; import shift.sextiarysector.api.agriculture.IFarmland; import shift.sextiarysector.api.season.Season; import shift.sextiarysector.api.season.SeasonAPI; @@ -75,7 +74,7 @@ public void updateServerEntity() { } public boolean hasFarmland(){ - return this.worldObj.getBlock(this.xCoord,this.yCoord-1,this.zCoord)==SSBlocks.farmland; + return this.worldObj.getTileEntity(this.xCoord,this.yCoord-1,this.zCoord) instanceof IFarmland; } private boolean canGrowth(){ @@ -84,7 +83,7 @@ private boolean canGrowth(){ return false; } - return ((TileEntityFarmland)this.worldObj.getTileEntity(this.xCoord,this.yCoord-1,this.zCoord)).canGrowth(); + return ((IFarmland)this.worldObj.getTileEntity(this.xCoord,this.yCoord-1,this.zCoord)).canGrowth(); } @@ -94,7 +93,7 @@ private void growth(){ this.lastDay = SeasonAPI.getDay(getWorldObj()); - ((TileEntityFarmland)this.worldObj.getTileEntity(this.xCoord,this.yCoord-1,this.zCoord)).growth(); + ((IFarmland)this.worldObj.getTileEntity(this.xCoord,this.yCoord-1,this.zCoord)).growth(); BlockSSCrop crop = (BlockSSCrop) this.getBlockType(); @@ -132,7 +131,7 @@ private CropStatus getStatus(){ } private IFarmland getFarmland(){ - return ((IFarmland)this.worldObj.getBlock(this.xCoord,this.yCoord-1,this.zCoord)); + return ((IFarmland)this.worldObj.getTileEntity(this.xCoord,this.yCoord-1,this.zCoord)); } private BlockSSCrop getCrop(){ From ad7dcd6ef03c22c029958007ea7a997a7e722e7b Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 6 Jan 2015 22:03:30 +0900 Subject: [PATCH 58/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E4=BD=9C?= =?UTF-8?q?=E7=89=A9=E9=96=A2=E4=BF=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 米のドロップアイテムを修正 --- src/main/java/shift/sextiarysector/SSBlocks.java | 4 ++-- src/main/resources/assets/sextiarysector/lang/en_US.lang | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 058d093..8e1e982 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -360,8 +360,8 @@ public static void initBlicks(){ GameRegistry.registerBlock(radish,ItemBlockCrop.class,"BlockRadish"); //米 - - rice = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{28,46,68},Season.SPRING,Season.SUMMER,Season.AUTUMN), paddy, SSItems.radish, false).setBlockName("ss.rice").setBlockTextureName("rice"); + ///28,46,68 + rice = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{28,46,68},Season.SPRING,Season.SUMMER,Season.AUTUMN), paddy, SSItems.rice, false).setBlockName("ss.rice").setBlockTextureName("rice"); GameRegistry.registerBlock(rice,ItemBlockCrop.class,"BlockRice"); diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 04094e0..407f2a2 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -14,6 +14,7 @@ tile.ss.wood_plate.name=Wood Plate tile.ss.hole.name=Hole tile.ss.farmland.name=Farm Land +tile.ss.paddy.name=Paddy tile.ss.bottle.name=Fluid Bottle tile.ss.fluid_crafter.name=Fluid Crafter From 832a4a9655064efcd44bfc736ad68a4bdbb64c81 Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 6 Jan 2015 22:55:53 +0900 Subject: [PATCH 59/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- .../shift/sextiarysector/SextiarySector.java | 2 +- .../event/PlayerStatusEventHandler.java | 27 +++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e9a2098..f2a0a60 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.1.a-${project.minecraft.version}" +version = "2.1.2.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index dccc5fd..5c9231d 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -33,7 +33,7 @@ public class SextiarySector { //public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.1.1"; + public static final String VERSION = "2.1.2"; @Mod.Instance("SextiarySector") public static SextiarySector instance; diff --git a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java index 304db87..e94f12a 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java @@ -85,6 +85,33 @@ public void onAttackEntityEvent(AttackEntityEvent event) { } + //ジャンプ + @SubscribeEvent + public void onLivingJump2(LivingJumpEvent event) { + + if (!(event.entityLiving instanceof EntityPlayer)) { + return; + } + + if (event.entityLiving.worldObj.isRemote) { + return; + } + + EntityPlayer player = (EntityPlayer) event.entityLiving; + + float i = 1; + + if (BiomeDictionary.isBiomeOfType(player.worldObj.getBiomeGenForCoords((int) player.posX, (int) player.posY), Type.DESERT)) { + i = 2; + } + + if (player.isSprinting()) { + SextiarySectorAPI.addMoistureExhaustion(player, 0.1f * i); + } else { + SextiarySectorAPI.addMoistureExhaustion(player, 0.05f * i); + } + + } /** * スタミナ関係 From 26fff841c9cba524006aef84b34836fd20078482 Mon Sep 17 00:00:00 2001 From: shift02 Date: Mon, 12 Jan 2015 21:48:41 +0900 Subject: [PATCH 60/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20Power=205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・圧延機を追加 ・タイムマシーンを追加 ・ウッドプレートをそれぞれの木材に対応 --- .../shift/sextiarysector/SSAchievement.java | 17 +++ .../java/shift/sextiarysector/SSBlocks.java | 100 +++++++++++++++++- .../shift/sextiarysector/SSGuiHandler.java | 8 ++ .../java/shift/sextiarysector/SSItems.java | 62 ++++++++--- .../shift/sextiarysector/SSOreDictionary.java | 18 +++- .../java/shift/sextiarysector/SSRecipes.java | 11 ++ .../java/shift/sextiarysector/SSShops.java | 2 + .../sextiarysector/gui/GuiRollingMachine.java | 19 ++++ .../sextiarysector/gui/GuiTimeMachine.java | 19 ++++ .../sextiarysector/item/ItemBlockFood.java | 66 ++++++++++++ .../item/ItemBlockGearShaft.java | 1 + .../shift/sextiarysector/item/ItemCrop.java | 4 +- .../sextiarysector/item/ItemFoodCrop.java | 7 +- .../module/FertilizerManager.java | 4 +- .../module/ModuleAgriculture.java | 9 +- .../nei/FertilizerFarmlandRecipeHandler.java | 39 +++++++ .../nei/FertilizerPaddyRecipeHandler.java | 38 +++++++ .../nei/FertilizerRecipeHandler.java | 28 ++--- .../nei/NEISextiarySectorConfig.java | 17 ++- .../nei/RollingMachineRecipeHandler.java | 40 +++++++ .../nei/TimeMachineRecipeHandler.java | 40 +++++++ .../recipe/RecipesFurnaceCraft.java | 16 +++ .../sextiarysector/recipe/RecipesMachine.java | 54 ++++++++-- .../recipe/RecipesRollingMachine.java | 16 +++ .../sextiarysector/recipe/RecipesSawmill.java | 9 +- .../recipe/RecipesTimeMachine.java | 31 ++++++ .../renderer/block/RendererGearShaft.java | 30 ++++-- .../renderer/block/RendererShaft.java | 10 +- .../assets/sextiarysector/lang/en_US.lang | 65 +++++++++++- .../blocks/crop/blue_potato_stage_0.png | Bin 0 -> 220 bytes .../blocks/crop/blue_potato_stage_1.png | Bin 0 -> 265 bytes .../blocks/crop/blue_potato_stage_2.png | Bin 0 -> 357 bytes .../blocks/crop/blue_potato_stage_3.png | Bin 0 -> 648 bytes .../blocks/crop/golden_corn_stage_0.png | Bin 0 -> 558 bytes .../blocks/crop/golden_corn_stage_1.png | Bin 0 -> 624 bytes .../blocks/crop/golden_corn_stage_2.png | Bin 0 -> 631 bytes .../blocks/crop/golden_corn_stage_3.png | Bin 0 -> 703 bytes .../blocks/crop/golden_corn_stage_4.png | Bin 0 -> 683 bytes .../blocks/crop/iron_turnip_stage_0.png | Bin 0 -> 786 bytes .../blocks/crop/iron_turnip_stage_1.png | Bin 0 -> 806 bytes .../blocks/crop/iron_turnip_stage_2.png | Bin 0 -> 765 bytes .../blocks/crop/iron_turnip_stage_3.png | Bin 0 -> 699 bytes .../textures/blocks/fertilizer/water_lily.png | Bin 0 -> 520 bytes .../textures/blocks/gold_block_top.png | Bin 0 -> 531 bytes .../textures/blocks/iron_block_top.png | Bin 0 -> 516 bytes .../blocks/machine/ninja_gear_box.png | Bin 0 -> 400 bytes .../blocks/machine/ninja_gear_box_in.png | Bin 0 -> 712 bytes .../blocks/machine/ninja_gear_box_out.png | Bin 0 -> 737 bytes .../textures/blocks/machine/ninja_gf_tank.png | Bin 0 -> 789 bytes .../blocks/machine/ninja_gf_tank_in.png | Bin 0 -> 823 bytes .../blocks/machine/ninja_gf_tank_out.png | Bin 0 -> 841 bytes .../blocks/machine/orichalcum_gear_box.png | Bin 0 -> 485 bytes .../blocks/machine/orichalcum_gear_box_in.png | Bin 0 -> 774 bytes .../machine/orichalcum_gear_box_out.png | Bin 0 -> 798 bytes .../blocks/machine/orichalcum_gf_tank.png | Bin 0 -> 604 bytes .../blocks/machine/orichalcum_gf_tank_in.png | Bin 0 -> 781 bytes .../blocks/machine/orichalcum_gf_tank_out.png | Bin 0 -> 802 bytes .../blocks/machine/rolling_machine.png | Bin 0 -> 491 bytes .../textures/blocks/machine/time_machine.png | Bin 0 -> 502 bytes ...er_nei.png => fertilizer_farmland_nei.png} | Bin .../textures/guis/fertilizer_paddy_nei.png | Bin 0 -> 1773 bytes .../textures/guis/fertilizer_wood_nei.png | Bin 0 -> 1825 bytes .../textures/guis/machine/rolling_machine.png | Bin 0 -> 2823 bytes .../guis/machine/rolling_machine_nei.png | Bin 0 -> 3131 bytes .../textures/guis/machine/time_machine.png | Bin 0 -> 3030 bytes .../guis/machine/time_machine_nei.png | Bin 0 -> 3486 bytes .../items/food/vegetable/blue_potato.png | Bin 0 -> 449 bytes .../items/food/vegetable/golden_corn.png | Bin 399 -> 409 bytes .../items/food/vegetable/iron_turnip.png | Bin 459 -> 444 bytes .../items/gearforce/ninja_gear_storage.png | Bin 0 -> 457 bytes .../gearforce/ninja_gear_storage_full.png | Bin 0 -> 922 bytes .../ninja_gear_storage_full.png.mcmeta | 5 + .../gearforce/orichalcum_gear_storage.png | Bin 0 -> 452 bytes .../orichalcum_gear_storage_full.png | Bin 0 -> 881 bytes .../orichalcum_gear_storage_full.png.mcmeta | 5 + .../textures/items/machine/ninja_gear.png | Bin 0 -> 582 bytes .../items/machine/ninja_unit_gear.png | Bin 0 -> 1315 bytes .../items/machine/orichalcum_gear.png | Bin 0 -> 713 bytes .../items/machine/orichalcum_unit_gear.png | Bin 0 -> 1444 bytes .../textures/items/plate/gold_plate.png | Bin 0 -> 233 bytes .../textures/items/plate/iron_plate.png | Bin 0 -> 234 bytes .../items/plate/wood_acacia_plate.png | Bin 0 -> 329 bytes .../items/plate/wood_big_oak_plate.png | Bin 0 -> 266 bytes .../textures/items/plate/wood_birch_plate.png | Bin 0 -> 328 bytes .../items/plate/wood_jungle_plate.png | Bin 0 -> 367 bytes .../textures/items/plate/wood_oak_plate.png | Bin 0 -> 329 bytes .../items/plate/wood_spruce_plate.png | Bin 0 -> 317 bytes .../textures/items/seed/blue_potato_seed.png | Bin 0 -> 522 bytes .../textures/items/seed/golden_corn_seed.png | Bin 0 -> 494 bytes .../textures/items/seed/iron_turnip_seed.png | Bin 0 -> 517 bytes .../textures/models/ninja_gear_shaft.png | Bin 0 -> 1608 bytes .../textures/models/ninja_shaft.png | Bin 0 -> 1791 bytes .../textures/models/orichalcum_shaft.png | Bin 0 -> 1848 bytes .../textures/models/steel_gear_shaft.png | Bin 0 -> 1549 bytes .../textures/models/stone_gear_shaft.png | Bin 0 -> 1528 bytes .../textures/models/wood_gear_shaft.png | Bin 0 -> 1616 bytes 96 files changed, 713 insertions(+), 77 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/gui/GuiRollingMachine.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiTimeMachine.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemBlockFood.java create mode 100644 src/main/java/shift/sextiarysector/nei/FertilizerFarmlandRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/FertilizerPaddyRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/RollingMachineRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/TimeMachineRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesRollingMachine.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/blue_potato_stage_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/blue_potato_stage_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/blue_potato_stage_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/blue_potato_stage_3.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/golden_corn_stage_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/golden_corn_stage_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/golden_corn_stage_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/golden_corn_stage_3.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/golden_corn_stage_4.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/iron_turnip_stage_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/iron_turnip_stage_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/iron_turnip_stage_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/iron_turnip_stage_3.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fertilizer/water_lily.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/gold_block_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/iron_block_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gear_box.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gear_box_in.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gear_box_out.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gf_tank.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gf_tank_in.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gf_tank_out.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gear_box.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gear_box_in.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gear_box_out.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gf_tank.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gf_tank_in.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gf_tank_out.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/rolling_machine.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/time_machine.png rename src/main/resources/assets/sextiarysector/textures/guis/{fertilizer_nei.png => fertilizer_farmland_nei.png} (100%) create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/fertilizer_paddy_nei.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/fertilizer_wood_nei.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/rolling_machine.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/rolling_machine_nei.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/time_machine.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/time_machine_nei.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/vegetable/blue_potato.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/ninja_gear_storage.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/ninja_gear_storage_full.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/ninja_gear_storage_full.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/orichalcum_gear_storage.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/orichalcum_gear_storage_full.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/orichalcum_gear_storage_full.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/items/machine/ninja_gear.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/machine/ninja_unit_gear.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/machine/orichalcum_gear.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/machine/orichalcum_unit_gear.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/gold_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/iron_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/wood_acacia_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/wood_big_oak_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/wood_birch_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/wood_jungle_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/wood_oak_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/wood_spruce_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/seed/blue_potato_seed.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/seed/golden_corn_seed.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/seed/iron_turnip_seed.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/ninja_gear_shaft.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/ninja_shaft.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/orichalcum_shaft.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/steel_gear_shaft.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/stone_gear_shaft.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/wood_gear_shaft.png diff --git a/src/main/java/shift/sextiarysector/SSAchievement.java b/src/main/java/shift/sextiarysector/SSAchievement.java index 1f852d4..6c6913e 100644 --- a/src/main/java/shift/sextiarysector/SSAchievement.java +++ b/src/main/java/shift/sextiarysector/SSAchievement.java @@ -84,6 +84,13 @@ public class SSAchievement { public static Achievement steelGear; public static Achievement smallWaterwheel; public static Achievement pulverizer; + public static Achievement fan; + + public static Achievement ninjaGear; + public static Achievement rollingMachine; + + public static Achievement orichalcumGear; + public static Achievement timeMachine; //Economy public static Achievement creeperFirework; @@ -161,13 +168,23 @@ public static void initAchievements(){ steelGear = new AchievementCraft("steel_gear", 4, 0, new ItemStack(SSItems.steelGear), stoneGear, industry).registerStat(); smallWaterwheel = new AchievementCraft("small_waterwheel", 5, -2, new ItemStack(SSBlocks.smallWaterwheel), steelGear, industry).registerStat(); pulverizer = new AchievementCraft("pulverizer", 5, 2, new ItemStack(SSBlocks.pulverizer), steelGear, industry).registerStat(); + fan = new AchievementCraft("fan", 5, 4, new ItemStack(SSBlocks.fan), steelGear, industry).registerStat(); + + ninjaGear = new AchievementCraft("ninja_gear", 7, 0, new ItemStack(SSItems.ninjaGear), steelGear, industry).registerStat(); + rollingMachine = new AchievementCraft("rolling_machine", 7, 2, new ItemStack(SSBlocks.rollingMachine), ninjaGear, industry).registerStat(); + + orichalcumGear = new AchievementCraft("orichalcum_gear", 10, 0, new ItemStack(SSItems.orichalcumGear), ninjaGear, industry).registerStat(); + timeMachine = new AchievementCraft("time_machine", 10, 2, new ItemStack(SSBlocks.timeMachine), orichalcumGear, industry).registerStat(); AchievementPage.registerAchievementPage(new AchievementPageIndustry("achievement.ss.industry", industry)); + //経済 creeperFirework = new AchievementBase("creeper_firework", 0, 0, new ItemStack(Items.fireworks), (Achievement)null,economy).initIndependentStat().registerStat(); creeperChest = new AchievementBase("creeper_chest", 1, -2, new ItemStack(SSBlocks.creeperChest), creeperFirework,economy).registerStat(); shipping = new AchievementBase("shipping", 3, -2, new ItemStack(SSBlocks.shippingBox), creeperChest,economy).registerStat(); + + AchievementPage.registerAchievementPage(new AchievementPageEconomy("achievement.ss.economy", economy)); } diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 8e1e982..04b8dc4 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -40,6 +40,7 @@ import shift.sextiarysector.item.ItemBlockCrop; import shift.sextiarysector.item.ItemBlockDirection; import shift.sextiarysector.item.ItemBlockFluidCrafter; +import shift.sextiarysector.item.ItemBlockFood; import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMonitor; import shift.sextiarysector.tileentity.TileEntityFan; @@ -92,16 +93,25 @@ public class SSBlocks { public static Block woodShaft; public static Block stoneShaft; public static Block steelShaft; + public static Block ninjaShaft; + public static Block orichalcumShaft; public static Block woodGearBox; public static Block stoneGearBox; public static Block steelGearBox; + public static Block ninjaGearBox; + public static Block orichalcumGearBox; public static Block woodGFTank; public static Block stoneGFTank; public static Block steelGFTank; + public static Block ninjaGFTank; + public static Block orichalcumGFTank; public static Block woodStoneGearShaft; + public static Block stoneSteelGearShaft; + public static Block steelNinjaGearShaft; + public static Block ninjaOrichalcumGearShaft; public static Block smallWindmill; public static Block windmill; @@ -116,11 +126,25 @@ public class SSBlocks { public static Block fan; + public static Block rollingMachine; + + public static Block timeMachine; + public static Block hole; public static Block woodGrate; - public static Block woodPlate; + + public static Block woodOakPlate; + public static Block woodBirchPlate; + public static Block woodSprucePlate; + public static Block woodJunglePlate; + public static Block woodAcaciaPlate; + public static Block woodBigOakPlate; + + + public static Block ironPlate; + public static Block goldPlate; public static Block chunkLoader; @@ -147,10 +171,12 @@ public class SSBlocks { public static Block turnip; public static Block cucumber; + public static Block ironTurnip; public static Block onion; public static Block tomato; public static Block corn; + public static Block goldenCorn; public static Block eggplant; public static Block sweetPotato; @@ -206,8 +232,32 @@ public static void initBlicks(){ woodGrate = (new BlockSSPane(ID+":wood_grate", ID+":wood_grate", Material.wood, false,0)).setHardness(0.5F).setBlockName("ss.wood_grate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodGrate, "WoodGrate"); - woodPlate = (new BlockSSPane("planks_oak", "planks_oak", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.wood_plate").setBlockTextureName(ID+":plate/wood_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); - GameRegistry.registerBlock(woodPlate, "WoodPlate"); + + woodOakPlate = (new BlockSSPane("planks_oak", "planks_oak", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.oak_wood_plate").setBlockTextureName(ID+":plate/wood_oak_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(woodOakPlate, "WoodOakPlate"); + + woodBirchPlate = (new BlockSSPane("planks_birch", "planks_birch", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.birch_wood_plate").setBlockTextureName(ID+":plate/wood_birch_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(woodBirchPlate, "WoodBirchPlate"); + + woodSprucePlate = (new BlockSSPane("planks_spruce", "planks_spruce", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.spruce_wood_plate").setBlockTextureName(ID+":plate/wood_spruce_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(woodSprucePlate, "WoodSprucePlate"); + + woodJunglePlate = (new BlockSSPane("planks_jungle", "planks_jungle", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.jungle_wood_plate").setBlockTextureName(ID+":plate/wood_jungle_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(woodJunglePlate, "WoodJunglePlate"); + + woodAcaciaPlate = (new BlockSSPane("planks_acacia", "planks_acacia", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.acacia_wood_plate").setBlockTextureName(ID+":plate/wood_acacia_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(woodAcaciaPlate, "WoodAcaciaPlate"); + + woodBigOakPlate = (new BlockSSPane("planks_big_oak", "planks_big_oak", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.big_oak_wood_plate").setBlockTextureName(ID+":plate/wood_big_oak_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(woodBigOakPlate, "WoodBigOakPlate"); + + + ironPlate = (new BlockSSPane("iron_block", ID+":iron_block_top", Material.iron, true,1)).setHardness(0.5F).setBlockName("ss.iron_plate").setBlockTextureName(ID+":plate/iron_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(ironPlate, "IronPlate"); + + goldPlate = (new BlockSSPane("gold_block", ID+":gold_block_top", Material.iron, true,1)).setHardness(0.5F).setBlockName("ss.gold_plate").setBlockTextureName(ID+":plate/gold_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(goldPlate, "GoldPlate"); + chunkLoader = new BlockChunkLoader().setHardness(1.5F).setBlockName("ss.chunk_loader").setBlockTextureName("sextiarysector:time_loader"); GameRegistry.registerBlock(chunkLoader, "ChunkLoader"); @@ -252,6 +302,12 @@ public static void initBlicks(){ steelShaft = new BlockShaft(3).setBlockName("ss.steel_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeMetal); GameRegistry.registerBlock(steelShaft,ItemBlockDirection.class, "SteelShaft"); + ninjaShaft = new BlockShaft(4).setBlockName("ss.ninja_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeMetal); + GameRegistry.registerBlock(ninjaShaft,ItemBlockDirection.class, "NinjaShaft"); + + orichalcumShaft = new BlockShaft(5).setBlockName("ss.orichalcum_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeMetal); + GameRegistry.registerBlock(orichalcumShaft,ItemBlockDirection.class, "OrichalcumShaft"); + GameRegistry.registerTileEntity(TileEntityGearBox.class, "GearBox"); woodGearBox = new BlockGearBox(Material.wood,1).setBlockName("ss.wood_gear_box").setBlockTextureName("sextiarysector:machine/wood_gear_box").setStepSound(Block.soundTypeWood); @@ -263,6 +319,12 @@ public static void initBlicks(){ steelGearBox = new BlockGearBox(Material.iron,3).setBlockName("ss.steel_gear_box").setBlockTextureName("sextiarysector:machine/steel_gear_box").setStepSound(Block.soundTypeMetal); GameRegistry.registerBlock(steelGearBox, "SteelGearBox"); + ninjaGearBox = new BlockGearBox(Material.iron,4).setBlockName("ss.ninja_gear_box").setBlockTextureName("sextiarysector:machine/ninja_gear_box").setStepSound(Block.soundTypeMetal); + GameRegistry.registerBlock(ninjaGearBox, "NinjaGearBox"); + + orichalcumGearBox = new BlockGearBox(Material.iron,5).setBlockName("ss.orichalcum_gear_box").setBlockTextureName("sextiarysector:machine/orichalcum_gear_box").setStepSound(Block.soundTypeMetal); + GameRegistry.registerBlock(orichalcumGearBox, "OrichalcumGearBox"); + GameRegistry.registerTileEntity(TileEntityGFTank.class, "GFTank"); woodGFTank = new BlockGFTank(Material.wood,50,1).setBlockName("ss.wood_gf_tank").setBlockTextureName("sextiarysector:machine/wood_gf_tank").setStepSound(Block.soundTypeWood); @@ -274,10 +336,25 @@ public static void initBlicks(){ steelGFTank = new BlockGFTank(Material.iron,52,3).setBlockName("ss.steel_gf_tank").setBlockTextureName("sextiarysector:machine/steel_gf_tank").setStepSound(Block.soundTypeMetal); GameRegistry.registerBlock(steelGFTank, "SteelGFTank"); + ninjaGFTank = new BlockGFTank(Material.iron,53,4).setBlockName("ss.ninja_gf_tank").setBlockTextureName("sextiarysector:machine/ninja_gf_tank").setStepSound(Block.soundTypeMetal); + GameRegistry.registerBlock(ninjaGFTank, "NinjaGFTank"); + + orichalcumGFTank = new BlockGFTank(Material.iron,54,5).setBlockName("ss.orichalcum_gf_tank").setBlockTextureName("sextiarysector:machine/orichalcum_gf_tank").setStepSound(Block.soundTypeMetal); + GameRegistry.registerBlock(orichalcumGFTank, "OrichalcumGFTank"); + GameRegistry.registerTileEntity(TileEntityGearShaft.class, "GearShaft"); woodStoneGearShaft = new BlockGearShaft(1).setBlockName("ss.wood_stone_gear_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); - GameRegistry.registerBlock(woodStoneGearShaft,ItemBlockGearShaft.class, "WoodStoneGearShaft"); + GameRegistry.registerBlock(woodStoneGearShaft, ItemBlockGearShaft.class, "WoodStoneGearShaft"); + + stoneSteelGearShaft = new BlockGearShaft(2).setBlockName("ss.stone_steel_gear_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); + GameRegistry.registerBlock(stoneSteelGearShaft, ItemBlockGearShaft.class, "StoneSteelGearShaft"); + + steelNinjaGearShaft = new BlockGearShaft(3).setBlockName("ss.steel_ninja_gear_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); + GameRegistry.registerBlock(steelNinjaGearShaft, ItemBlockGearShaft.class, "SteelNinjaGearShaft"); + + ninjaOrichalcumGearShaft = new BlockGearShaft(4).setBlockName("ss.ninja_orichalcum_gear_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); + GameRegistry.registerBlock(ninjaOrichalcumGearShaft, ItemBlockGearShaft.class, "NinjaOrichalcumGearShaft"); smallWindmill = new BlockSmallWindmill().setBlockName("ss.small_windmill").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerTileEntity(TileEntitySmallWindmill.class, "SmallWindmill"); @@ -308,6 +385,12 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntityFan.class, "Fan"); GameRegistry.registerBlock(fan, ItemBlockDirection.class, "Fan"); + rollingMachine = new BlockSimpleMachine("rolling_machine",35,SSRecipes.rollingMachine,4).setBlockName("ss.rolling_machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerBlock(rollingMachine, "RollingMachine"); + + timeMachine = new BlockSimpleMachine("time_machine",40,SSRecipes.timeMachine,5).setBlockName("ss.time_machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerBlock(timeMachine, "TimeMachine"); + shippingBox = new BlockShippingBox().setBlockName("ss.shipping_box").setBlockTextureName("sextiarysector:shipping_box").setCreativeTab(SextiarySectorAPI.TabSSEconomy); GameRegistry.registerBlock(shippingBox, "ShippingBox"); @@ -325,7 +408,7 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntityFarmland.class, "SSFarmland"); paddy = new BlcokPaddy().setBlockName("ss.paddy").setBlockTextureName("farmland").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); - GameRegistry.registerBlock(paddy,"Paddy"); + GameRegistry.registerBlock(paddy,ItemBlockFood.class, "Paddy"); GameRegistry.registerTileEntity(TileEntityPaddy.class, "SSPaddy"); //野菜 @@ -337,6 +420,10 @@ public static void initBlicks(){ cucumber = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{2,6,10,3},Season.SPRING), farmland, SSItems.cucumber, true).setBlockName("ss.cucumber").setBlockTextureName("cucumber"); GameRegistry.registerBlock(cucumber,ItemBlockCrop.class,"BlockCucumber"); + ironTurnip = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{4,8,12},Season.SPRING), farmland, SSItems.ironTurnip, false).setBlockName("ss.iron_turnip").setBlockTextureName("iron_turnip"); + GameRegistry.registerBlock(ironTurnip,ItemBlockCrop.class,"BlockIronTurnip"); + + onion = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,4,8},Season.SUMMER), farmland, SSItems.onion, false).setBlockName("ss.onion").setBlockTextureName("onion"); GameRegistry.registerBlock(onion,ItemBlockCrop.class,"BlockOnion"); @@ -346,6 +433,9 @@ public static void initBlicks(){ corn = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{5,10,16,4},Season.SUMMER), farmland, SSItems.corn, true).setBlockName("ss.corn").setBlockTextureName("corn"); GameRegistry.registerBlock(corn,ItemBlockCrop.class,"BlockCorn"); + goldenCorn = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{7,12,18,4},Season.SUMMER), farmland, SSItems.goldenCorn, true).setBlockName("ss.golden_corn").setBlockTextureName("golden_corn"); + GameRegistry.registerBlock(goldenCorn,ItemBlockCrop.class,"BlockGoldenCorn"); + eggplant = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{3,7,12,3},Season.AUTUMN), farmland, SSItems.eggplant, true).setBlockName("ss.eggplant").setBlockTextureName("eggplant"); GameRegistry.registerBlock(eggplant,ItemBlockCrop.class,"BlockEggplant"); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index d0ea01b..9afeb1d 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -22,8 +22,10 @@ import shift.sextiarysector.gui.GuiMagicFurnace; import shift.sextiarysector.gui.GuiMillstone; import shift.sextiarysector.gui.GuiPulverizer; +import shift.sextiarysector.gui.GuiRollingMachine; import shift.sextiarysector.gui.GuiSawmill; import shift.sextiarysector.gui.GuiTabCrafting; +import shift.sextiarysector.gui.GuiTimeMachine; import shift.sextiarysector.gui.IServerGuiElement; import shift.sextiarysector.tileentity.TileEntityCraftFurnace; import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; @@ -62,6 +64,8 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x case 21: case 25: case 30: + case 35: + case 40: return new ContainerSimpleMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); case 50: @@ -125,6 +129,10 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x case 30:return new GuiPulverizer(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 35:return new GuiRollingMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + + case 40:return new GuiTimeMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 50:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),1); case 51:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),2); case 52:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),3); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 51d4bd3..230bc6f 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -1,5 +1,7 @@ package shift.sextiarysector; +import java.util.ArrayList; + import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import shift.sextiarysector.api.SextiarySectorAPI; @@ -33,14 +35,20 @@ public class SSItems { public static Item woodGear; public static Item stoneGear; public static Item steelGear; + public static Item ninjaGear; + public static Item orichalcumGear; public static Item woodUnitGear; public static Item stoneUnitGear; public static Item steelUnitGear; + public static Item ninjaUnitGear; + public static Item orichalcumUnitGear; public static Item woodGFStorage; public static Item stoneGFStorage; public static Item steelGFStorage; + public static Item ninjaGFStorage; + public static Item orichalcumGFStorage; public static Item hammer; @@ -124,6 +132,9 @@ public class SSItems { public static Item laver; //野菜 + public static ArrayList farmlandCrops = new ArrayList(); + public static ArrayList paddyCrops = new ArrayList(); + public static Item turnip; public static Item cucumber; @@ -140,6 +151,8 @@ public class SSItems { public static Item sweetPotato; public static Item greenPepper; + public static Item bluePotato; + public static Item radish; public static Item rice; @@ -191,6 +204,13 @@ public static void initItems(){ steelGear = new Item().setUnlocalizedName("ss.steel_gear").setTextureName("sextiarysector:machine/steel_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(steelGear, "SteelGear"); + ninjaGear = new Item().setUnlocalizedName("ss.ninja_gear").setTextureName("sextiarysector:machine/ninja_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerItem(ninjaGear, "NinjaGear"); + + orichalcumGear = new Item().setUnlocalizedName("ss.orichalcum_gear").setTextureName("sextiarysector:machine/orichalcum_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerItem(orichalcumGear, "OrichalcumGear"); + + woodUnitGear = new Item().setUnlocalizedName("ss.wood_unit_gear").setTextureName("sextiarysector:machine/wood_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(woodUnitGear, "WoodUnitGear"); @@ -200,6 +220,13 @@ public static void initItems(){ steelUnitGear = new Item().setUnlocalizedName("ss.steel_unit_gear").setTextureName("sextiarysector:machine/steel_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(steelUnitGear, "steelUnitGear"); + ninjaUnitGear = new Item().setUnlocalizedName("ss.ninja_unit_gear").setTextureName("sextiarysector:machine/ninja_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerItem(ninjaUnitGear, "NinjaUnitGear"); + + orichalcumUnitGear = new Item().setUnlocalizedName("ss.orichalcum_unit_gear").setTextureName("sextiarysector:machine/orichalcum_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerItem(orichalcumUnitGear, "OrichalcumUnitGear"); + + woodGFStorage = new ItemGearStorage(1, 10000, 1).setUnlocalizedName("ss.wood_gf_storage").setTextureName("sextiarysector:gearforce/wood_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(woodGFStorage, "WoodGFStorage"); @@ -209,6 +236,13 @@ public static void initItems(){ steelGFStorage = new ItemGearStorage(3, 10000, 3).setUnlocalizedName("ss.steel_gf_storage").setTextureName("sextiarysector:gearforce/steel_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(steelGFStorage, "SteelGFStorage"); + ninjaGFStorage = new ItemGearStorage(4, 10000, 4).setUnlocalizedName("ss.ninja_gf_storage").setTextureName("sextiarysector:gearforce/ninja_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerItem(ninjaGFStorage, "NinjaGFStorage"); + + orichalcumGFStorage = new ItemGearStorage(5, 10000, 5).setUnlocalizedName("ss.orichalcum_gf_storage").setTextureName("sextiarysector:gearforce/orichalcum_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerItem(orichalcumGFStorage, "OrichalcumGFStorage"); + + hammer = new ItemHammer().setUnlocalizedName("ss.hammer").setTextureName("sextiarysector:machine/hammer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(hammer, "Hammer"); @@ -351,43 +385,47 @@ public static void initItems(){ GameRegistry.registerItem(laver, "Laver"); //野菜 - turnip = new ItemFoodCrop(3, 1, 1, 4, 0, 0, false).setUnlocalizedName("ss.turnip").setTextureName("sextiarysector:food/vegetable/turnip"); + turnip = new ItemFoodCrop(farmlandCrops, 3, 1, 1, 4, 0, 0, false).setUnlocalizedName("ss.turnip").setTextureName("sextiarysector:food/vegetable/turnip"); GameRegistry.registerItem(turnip, "Turnip"); - cucumber = new ItemFoodCrop(1, 1, 3, 4, 0, 2, false).setUnlocalizedName("ss.cucumber").setTextureName("sextiarysector:food/vegetable/cucumber"); + cucumber = new ItemFoodCrop(farmlandCrops, 1, 1, 3, 4, 0, 2, false).setUnlocalizedName("ss.cucumber").setTextureName("sextiarysector:food/vegetable/cucumber"); GameRegistry.registerItem(cucumber, "Cucumber"); - ironTurnip = new ItemFoodCrop(0, 1, 0, 0, 0, 0, false).setUnlocalizedName("ss.iron_turnip").setTextureName("sextiarysector:food/vegetable/iron_turnip"); + ironTurnip = new ItemFoodCrop(farmlandCrops, 0, 1, 0, 0, 0, 0, false).setUnlocalizedName("ss.iron_turnip").setTextureName("sextiarysector:food/vegetable/iron_turnip"); GameRegistry.registerItem(ironTurnip, "IronTurnip"); - onion = new ItemFoodCrop(2, 1, 1, 0, 0, 0, false).setUnlocalizedName("ss.onion").setTextureName("sextiarysector:food/vegetable/onion"); + onion = new ItemFoodCrop(farmlandCrops, 2, 1, 1, 0, 0, 0, false).setUnlocalizedName("ss.onion").setTextureName("sextiarysector:food/vegetable/onion"); GameRegistry.registerItem(onion, "Onion"); - tomato = new ItemFoodCrop(1, 1, 4, 5, 0, 0, false).setUnlocalizedName("ss.tomato").setTextureName("sextiarysector:food/vegetable/tomato"); + tomato = new ItemFoodCrop(farmlandCrops, 1, 1, 4, 5, 0, 0, false).setUnlocalizedName("ss.tomato").setTextureName("sextiarysector:food/vegetable/tomato"); GameRegistry.registerItem(tomato, "Tomato"); - corn = new ItemFoodCrop(0, 1, 1, 6, 4, 2, false).setUnlocalizedName("ss.corn").setTextureName("sextiarysector:food/vegetable/corn"); + corn = new ItemFoodCrop(farmlandCrops, 0, 1, 1, 6, 4, 2, false).setUnlocalizedName("ss.corn").setTextureName("sextiarysector:food/vegetable/corn"); GameRegistry.registerItem(corn, "corn"); - goldenCorn = new ItemFoodCrop(0, 2, 0, 0, 0, 0, false).setUnlocalizedName("ss.golden_corn").setTextureName("sextiarysector:food/vegetable/golden_corn"); + goldenCorn = new ItemFoodCrop(farmlandCrops, 0, 2, 0, 0, 0, 0, false).setUnlocalizedName("ss.golden_corn").setTextureName("sextiarysector:food/vegetable/golden_corn"); GameRegistry.registerItem(goldenCorn, "GoldCorn"); - eggplant = new ItemFoodCrop(1, 1, 4, 2, 0, 0, false).setUnlocalizedName("ss.eggplant").setTextureName("sextiarysector:food/vegetable/eggplant"); + eggplant = new ItemFoodCrop(farmlandCrops, 1, 1, 4, 2, 0, 0, false).setUnlocalizedName("ss.eggplant").setTextureName("sextiarysector:food/vegetable/eggplant"); GameRegistry.registerItem(eggplant, "Eggplant"); - sweetPotato = new ItemFoodCrop(4, 1, 0, 0, 6, 0, false).setUnlocalizedName("ss.sweet_potato").setTextureName("sextiarysector:food/vegetable/sweet_potato"); + sweetPotato = new ItemFoodCrop(farmlandCrops, 4, 1, 0, 0, 6, 0, false).setUnlocalizedName("ss.sweet_potato").setTextureName("sextiarysector:food/vegetable/sweet_potato"); GameRegistry.registerItem(sweetPotato, "SweetPotato"); - greenPepper = new ItemFoodCrop(2, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.green_pepper").setTextureName("sextiarysector:food/vegetable/green_pepper"); + greenPepper = new ItemFoodCrop(farmlandCrops, 2, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.green_pepper").setTextureName("sextiarysector:food/vegetable/green_pepper"); GameRegistry.registerItem(greenPepper, "GreenPepper"); - radish = new ItemFoodCrop(3, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.radish").setTextureName("sextiarysector:food/vegetable/radish"); + bluePotato = new ItemFoodCrop(paddyCrops, 1, 0, 5, 8, 2, 0, false).setUnlocalizedName("ss.blue_potato").setTextureName("sextiarysector:food/vegetable/blue_potato"); + GameRegistry.registerItem(bluePotato, "BluePotato"); + + + radish = new ItemFoodCrop(farmlandCrops, 3, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.radish").setTextureName("sextiarysector:food/vegetable/radish"); GameRegistry.registerItem(radish, "Radish"); - rice = new ItemCrop().setUnlocalizedName("ss.rice").setTextureName("sextiarysector:food/grain/rice").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); + rice = new ItemCrop(paddyCrops).setUnlocalizedName("ss.rice").setTextureName("sextiarysector:food/grain/rice").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); GameRegistry.registerItem(rice, "Rice"); //料理 diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index df0e8ac..b357d98 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -31,11 +31,25 @@ public static void init(){ OreDictionary.registerOre("fluidWater", new ItemStack(Items.potionitem, 1 ,0)); //素材 プレート - OreDictionary.registerOre("plateWood", SSBlocks.woodPlate); + OreDictionary.registerOre("plateWood", SSBlocks.woodOakPlate); + OreDictionary.registerOre("plateWood", SSBlocks.woodBirchPlate); + OreDictionary.registerOre("plateWood", SSBlocks.woodSprucePlate); + OreDictionary.registerOre("plateWood", SSBlocks.woodJunglePlate); + OreDictionary.registerOre("plateWood", SSBlocks.woodAcaciaPlate); + OreDictionary.registerOre("plateWood", SSBlocks.woodBigOakPlate); + + OreDictionary.registerOre("plankWood", SSBlocks.woodOakPlate); + OreDictionary.registerOre("plankWood", SSBlocks.woodBirchPlate); + OreDictionary.registerOre("plankWood", SSBlocks.woodSprucePlate); + OreDictionary.registerOre("plankWood", SSBlocks.woodJunglePlate); + OreDictionary.registerOre("plankWood", SSBlocks.woodAcaciaPlate); + OreDictionary.registerOre("plankWood", SSBlocks.woodBigOakPlate); OreDictionary.registerOre("gearWood", SSItems.woodGear); OreDictionary.registerOre("gearStone", SSItems.stoneGear); OreDictionary.registerOre("gearSteel", SSItems.steelGear); + OreDictionary.registerOre("gearNinja", SSItems.ninjaGear); + OreDictionary.registerOre("gearOrichalcum", SSItems.orichalcumGear); OreDictionary.registerOre("dustCoal", SSItems.coalDust); OreDictionary.registerOre("dustIron", SSItems.ironDust); @@ -52,6 +66,8 @@ public static void init(){ OreDictionary.registerOre("ingotNinja", SSItems.ninjaIngot); OreDictionary.registerOre("ingotMithril", SSItems.mithrilIngot); + OreDictionary.registerOre("gemOrichalcum", SSItems.orichalcumGem); + OreDictionary.registerOre("oreMithril", SSBlocks.mithrilOre); OreDictionary.registerOre("oreIron", SSItems.ironTurnip); diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index e164b6c..94c2b1e 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -17,7 +17,9 @@ import shift.sextiarysector.recipe.RecipesMillstone; import shift.sextiarysector.recipe.RecipesNormalBlock; import shift.sextiarysector.recipe.RecipesPulverizer; +import shift.sextiarysector.recipe.RecipesRollingMachine; import shift.sextiarysector.recipe.RecipesSawmill; +import shift.sextiarysector.recipe.RecipesTimeMachine; import shift.sextiarysector.recipe.RecipesTool; public class SSRecipes { @@ -32,6 +34,8 @@ public class SSRecipes { public static RecipeSimpleMachine loom; public static RecipeSimpleMachine sawmill; public static RecipeSimpleMachine pulverizer; + public static RecipeSimpleMachine rollingMachine; + public static RecipeSimpleMachine timeMachine; public static void initRecipeLists(){ @@ -45,6 +49,8 @@ public static void initRecipeLists(){ loom = new RecipeSimpleMachine(); sawmill = new RecipeSimpleMachine(); pulverizer = new RecipeSimpleMachine(); + rollingMachine = new RecipeSimpleMachine(); + timeMachine = new RecipeSimpleMachine(); } public static void initRecipes(){ @@ -77,6 +83,11 @@ public static void initRecipes(){ RecipesPulverizer.addRecipes(pulverizer); + RecipesRollingMachine.addRecipes(rollingMachine); + + RecipesTimeMachine.addRecipes(timeMachine); + + } } diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index b3c6747..fbb284f 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -68,6 +68,8 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.curryPowder,4),200)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.orichalcumGem,1),9999)); + creepers[i].addItemProduct(new ProductItem(BlockMonitor.getMonitor(MonitorType.creeper),100000)); } diff --git a/src/main/java/shift/sextiarysector/gui/GuiRollingMachine.java b/src/main/java/shift/sextiarysector/gui/GuiRollingMachine.java new file mode 100644 index 0000000..827cf28 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiRollingMachine.java @@ -0,0 +1,19 @@ +package shift.sextiarysector.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import shift.sextiarysector.tileentity.TileEntitySimpleMachine; + +public class GuiRollingMachine extends GuiSimpleMachine{ + + private static final ResourceLocation machineGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/rolling_machine.png"); + + public GuiRollingMachine(InventoryPlayer par1InventoryPlayer, TileEntitySimpleMachine par2TileEntity) { + super(par1InventoryPlayer, par2TileEntity); + } + + @Override + protected ResourceLocation getBindTexture() { + return machineGuiTextures; + } +} diff --git a/src/main/java/shift/sextiarysector/gui/GuiTimeMachine.java b/src/main/java/shift/sextiarysector/gui/GuiTimeMachine.java new file mode 100644 index 0000000..3e5a695 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiTimeMachine.java @@ -0,0 +1,19 @@ +package shift.sextiarysector.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import shift.sextiarysector.tileentity.TileEntitySimpleMachine; + +public class GuiTimeMachine extends GuiSimpleMachine{ + + private static final ResourceLocation machineGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/time_machine.png"); + + public GuiTimeMachine(InventoryPlayer par1InventoryPlayer, TileEntitySimpleMachine par2TileEntity) { + super(par1InventoryPlayer, par2TileEntity); + } + + @Override + protected ResourceLocation getBindTexture() { + return machineGuiTextures; + } +} diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockFood.java b/src/main/java/shift/sextiarysector/item/ItemBlockFood.java new file mode 100644 index 0000000..c44ff92 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemBlockFood.java @@ -0,0 +1,66 @@ +package shift.sextiarysector.item; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + +/** blockを食べれるようにするClass ver2(Potion効果付き) + * + * GameRegistry.registerBlock(sampleBlock, ItemBlockFood.class, "SampleBlock"); + * + * のように使う + * */ +public class ItemBlockFood extends ItemBlock{ + + private final int healAmount = 4; //回復量 + private final float saturationModifier = 2.5f; // 回復する隠し空腹度 + + private final Potion potion = Potion.heal;//Potionの種類 + private final int level = 0;//Potionの強さ + private final int time = 600;//Potionの時間 + + public ItemBlockFood(Block p_i45328_1_) { + super(p_i45328_1_); + } + + public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) + { + --p_77654_1_.stackSize; + p_77654_3_.getFoodStats().addStats(healAmount, saturationModifier); + p_77654_2_.playSoundAtEntity(p_77654_3_, "random.burp", 0.5F, p_77654_2_.rand.nextFloat() * 0.1F + 0.9F); + + //Potion効果をplayerに付加 + p_77654_3_.addPotionEffect(new PotionEffect(potion.id, time, level)); + + return p_77654_1_; + } + + //時間 + public int getMaxItemUseDuration(ItemStack p_77626_1_) + { + return 32; + } + + //食べ物 + public EnumAction getItemUseAction(ItemStack p_77661_1_) + { + return EnumAction.eat; + } + + // + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) + { + if (p_77659_3_.canEat(false)) + { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java b/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java index df3dc14..5126eca 100644 --- a/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java +++ b/src/main/java/shift/sextiarysector/item/ItemBlockGearShaft.java @@ -14,6 +14,7 @@ public class ItemBlockGearShaft extends ItemBlock{ public ItemBlockGearShaft(Block par1) { super(par1); + this.hasSubtypes = true; } public int getMetadata(int p_77647_1_) diff --git a/src/main/java/shift/sextiarysector/item/ItemCrop.java b/src/main/java/shift/sextiarysector/item/ItemCrop.java index 071dda2..aa51fbb 100644 --- a/src/main/java/shift/sextiarysector/item/ItemCrop.java +++ b/src/main/java/shift/sextiarysector/item/ItemCrop.java @@ -13,10 +13,10 @@ public class ItemCrop extends Item{ - public ItemCrop() { + public ItemCrop(List list) { this.hasSubtypes = true; - ItemFoodCrop.crops.add(this); + list.add(this); this.setCreativeTab(SextiarySectorAPI.TabSSAgriculture); diff --git a/src/main/java/shift/sextiarysector/item/ItemFoodCrop.java b/src/main/java/shift/sextiarysector/item/ItemFoodCrop.java index 26d6997..3cfef07 100644 --- a/src/main/java/shift/sextiarysector/item/ItemFoodCrop.java +++ b/src/main/java/shift/sextiarysector/item/ItemFoodCrop.java @@ -1,6 +1,5 @@ package shift.sextiarysector.item; -import java.util.ArrayList; import java.util.List; import net.minecraft.creativetab.CreativeTabs; @@ -14,14 +13,14 @@ public class ItemFoodCrop extends ItemFoodDrink{ - public static ArrayList crops = new ArrayList(); + //public static ArrayList crops = new ArrayList(); - public ItemFoodCrop(int food, float foodM, int drink, float drinkM,int stamina, float staminaM, boolean p_i45339_3_) { + public ItemFoodCrop(List list, int food, float foodM, int drink, float drinkM,int stamina, float staminaM, boolean p_i45339_3_) { super(food, foodM, drink, drinkM, stamina, staminaM, p_i45339_3_); this.hasSubtypes = true; - crops.add(this); + list.add(this); this.setCreativeTab(SextiarySectorAPI.TabSSAgriculture); diff --git a/src/main/java/shift/sextiarysector/module/FertilizerManager.java b/src/main/java/shift/sextiarysector/module/FertilizerManager.java index 38e6980..d8987c7 100644 --- a/src/main/java/shift/sextiarysector/module/FertilizerManager.java +++ b/src/main/java/shift/sextiarysector/module/FertilizerManager.java @@ -30,8 +30,8 @@ public void registerFertilizer(FarmlandType type , IFertilizer fertilizer) { switch(type){ - case Normal:normal.add(fertilizer); - case Paddy : paddy.add(fertilizer); + case Normal:normal.add(fertilizer);break; + case Paddy : paddy.add(fertilizer);break; } } diff --git a/src/main/java/shift/sextiarysector/module/ModuleAgriculture.java b/src/main/java/shift/sextiarysector/module/ModuleAgriculture.java index 2ad292c..7be7bd1 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleAgriculture.java +++ b/src/main/java/shift/sextiarysector/module/ModuleAgriculture.java @@ -7,7 +7,6 @@ import shift.sextiarysector.api.agriculture.AgricultureAPI; import shift.sextiarysector.api.agriculture.FarmlandType; import shift.sextiarysector.api.agriculture.SimpleFertilizer; -import shift.sextiarysector.item.ItemFoodCrop; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -38,13 +37,19 @@ public void load(FMLInitializationEvent event) { String t = "sextiarysector:fertilizer/"; - for(Item item :ItemFoodCrop.crops){ + for(Item item :SSItems.farmlandCrops){ AgricultureAPI.fertilizerManager.registerFertilizer(FarmlandType.Normal, new SimpleFertilizer("bone",t+"bone",new ItemStack(Items.dye, 1, 15), new ItemStack(item), new ItemStack(item,1,1))); } + for(Item item :SSItems.paddyCrops){ + AgricultureAPI.fertilizerManager.registerFertilizer(FarmlandType.Paddy, new SimpleFertilizer("bone",t+"bone",new ItemStack(Items.dye, 1, 15), new ItemStack(item), new ItemStack(item,1,1))); + } + AgricultureAPI.fertilizerManager.registerFertilizer(FarmlandType.Normal, new SimpleFertilizer("stone",t+"stone",new ItemStack(SSItems.stoneDust), new ItemStack(SSItems.corn), new ItemStack(SSItems.goldenCorn))); AgricultureAPI.fertilizerManager.registerFertilizer(FarmlandType.Normal, new SimpleFertilizer("stone",t+"stone",new ItemStack(SSItems.stoneDust), new ItemStack(SSItems.turnip), new ItemStack(SSItems.ironTurnip))); + AgricultureAPI.fertilizerManager.registerFertilizer(FarmlandType.Normal, new SimpleFertilizer("water_lily",t+"water_lily",new ItemStack(SSItems.dustWaterLily), new ItemStack(SSItems.sweetPotato), new ItemStack(SSItems.bluePotato))); + //AgricultureAPI.fertilizerManager.registerFertilizer(new SimpleFertilizer("bone",t+"bone",new ItemStack(Items.dye, 4, 15), new ItemStack(SSItems.cucumber), new ItemStack(SSItems.tomato))); } diff --git a/src/main/java/shift/sextiarysector/nei/FertilizerFarmlandRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/FertilizerFarmlandRecipeHandler.java new file mode 100644 index 0000000..e17df2d --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/FertilizerFarmlandRecipeHandler.java @@ -0,0 +1,39 @@ +package shift.sextiarysector.nei; + +import java.util.ArrayList; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import shift.sextiarysector.api.agriculture.IFertilizer; +import shift.sextiarysector.module.FertilizerManager; + +public class FertilizerFarmlandRecipeHandler extends FertilizerRecipeHandler{ + + public Class getHandlerClass(){ + return FertilizerFarmlandRecipeHandler.class; + } + public String getHandlerName(){ + return "SS_Fertilizer_Farmland"; + } + public ArrayList getRecipe(){ + return FertilizerManager.normal; + } + public String getGuiRecipeName(){ + return "ss.fertilizer_farmland"; + } + + public Class getGuiClass(){ + return null; + } + + @Override + public String getRecipeName() { + return I18n.format("nei."+getGuiRecipeName()); + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/fertilizer_farmland_nei.png"; + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/FertilizerPaddyRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/FertilizerPaddyRecipeHandler.java new file mode 100644 index 0000000..b8b2cb5 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/FertilizerPaddyRecipeHandler.java @@ -0,0 +1,38 @@ +package shift.sextiarysector.nei; + +import java.util.ArrayList; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import shift.sextiarysector.api.agriculture.IFertilizer; +import shift.sextiarysector.module.FertilizerManager; + +public class FertilizerPaddyRecipeHandler extends FertilizerRecipeHandler{ + + public Class getHandlerClass(){ + return FertilizerPaddyRecipeHandler.class; + } + public String getHandlerName(){ + return "SS_Fertilizer_Paddy"; + } + public ArrayList getRecipe(){ + return FertilizerManager.paddy; + } + public String getGuiRecipeName(){ + return "ss.fertilizer_paddy"; + } + + public Class getGuiClass(){ + return null; + } + + @Override + public String getRecipeName() { + return I18n.format("nei."+getGuiRecipeName()); + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/fertilizer_paddy_nei.png"; + } +} diff --git a/src/main/java/shift/sextiarysector/nei/FertilizerRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/FertilizerRecipeHandler.java index 0116a5c..7ff6bca 100644 --- a/src/main/java/shift/sextiarysector/nei/FertilizerRecipeHandler.java +++ b/src/main/java/shift/sextiarysector/nei/FertilizerRecipeHandler.java @@ -7,12 +7,11 @@ import net.minecraft.client.resources.I18n; import net.minecraft.item.ItemStack; import shift.sextiarysector.api.agriculture.IFertilizer; -import shift.sextiarysector.module.FertilizerManager; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; import codechicken.nei.recipe.TemplateRecipeHandler; -public class FertilizerRecipeHandler extends TemplateSSRecipeHandler{ +public abstract class FertilizerRecipeHandler extends TemplateSSRecipeHandler{ public class FertilizerPair extends CachedRecipe { @@ -153,31 +152,18 @@ public void drawExtras(int recipe) drawProgressBar(74, 23, 176, 14, 24, 16, 48, 0); } - private Class getHandlerClass(){ - return FertilizerRecipeHandler.class; - } - private String getHandlerName(){ - return "SS_Fertilizer"; - } - private ArrayList getRecipe(){ - return FertilizerManager.normal; - } - String getGuiRecipeName(){ - return "ss.fertilizer"; - } + public abstract Class getHandlerClass(); + public abstract String getHandlerName(); + public abstract ArrayList getRecipe(); + public abstract String getGuiRecipeName(); - public Class getGuiClass(){ - return null; - } + public abstract Class getGuiClass(); @Override public String getRecipeName() { return I18n.format("nei."+getGuiRecipeName()); } - @Override - public String getGuiTexture() { - return "sextiarysector:textures/guis/fertilizer_nei.png"; - } + public abstract String getGuiTexture(); } diff --git a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java index bc5d0c3..a323c5d 100644 --- a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java +++ b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java @@ -7,7 +7,9 @@ import shift.sextiarysector.gui.GuiMagicFurnace; import shift.sextiarysector.gui.GuiMillstone; import shift.sextiarysector.gui.GuiPulverizer; +import shift.sextiarysector.gui.GuiRollingMachine; import shift.sextiarysector.gui.GuiSawmill; +import shift.sextiarysector.gui.GuiTimeMachine; import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; @@ -29,6 +31,12 @@ public void loadConfig() { API.registerRecipeHandler(new PulverizerRecipeHandler()); API.registerUsageHandler(new PulverizerRecipeHandler()); + API.registerRecipeHandler(new RollingMachineRecipeHandler()); + API.registerUsageHandler(new RollingMachineRecipeHandler()); + + API.registerRecipeHandler(new TimeMachineRecipeHandler()); + API.registerUsageHandler(new TimeMachineRecipeHandler()); + /* API.registerRecipeHandler(new LoomRecipeHandler()); API.registerUsageHandler(new LoomRecipeHandler()); @@ -53,8 +61,11 @@ public void loadConfig() { API.registerUsageHandler(new MagicFuelRecipeHandler()); - API.registerRecipeHandler(new FertilizerRecipeHandler()); - API.registerUsageHandler(new FertilizerRecipeHandler()); + API.registerRecipeHandler(new FertilizerFarmlandRecipeHandler()); + API.registerUsageHandler(new FertilizerFarmlandRecipeHandler()); + + API.registerRecipeHandler(new FertilizerPaddyRecipeHandler()); + API.registerUsageHandler(new FertilizerPaddyRecipeHandler()); /* API.registerRecipeHandler(new BrewingRecipeHandler()); @@ -78,6 +89,8 @@ public void loadConfig() { API.registerGuiOverlay(GuiLoom.class, "SS_Loom"); API.registerGuiOverlay(GuiSawmill.class, "SS_Sawmill"); API.registerGuiOverlay(GuiPulverizer.class, "SS_Pulverizer"); + API.registerGuiOverlay(GuiRollingMachine.class, "SS_RollingMachine"); + API.registerGuiOverlay(GuiTimeMachine.class, "SS_TimeMachine"); //API.registerGuiOverlay(GuiBrewingStand.class, "SextiarySectorBrewing"); } diff --git a/src/main/java/shift/sextiarysector/nei/RollingMachineRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/RollingMachineRecipeHandler.java new file mode 100644 index 0000000..129ac96 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/RollingMachineRecipeHandler.java @@ -0,0 +1,40 @@ +package shift.sextiarysector.nei; + +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiRollingMachine; +import shift.sextiarysector.gui.GuiSimpleMachine; +import shift.sextiarysector.recipe.RecipeSimpleMachine; + +public class RollingMachineRecipeHandler extends SimpleMachineRecipeHandler{ + + @Override + public Class getGuiClass() + { + return GuiRollingMachine.class; + } + + @Override + Class getHandlerClass() { + return RollingMachineRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_RollingMachine"; + } + + @Override + RecipeSimpleMachine getRecipe() { + return SSRecipes.rollingMachine; + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/machine/rolling_machine_nei.png"; + } + + @Override + String getGuiRecipeName() { + return "ss.rolling_machine"; + } +} diff --git a/src/main/java/shift/sextiarysector/nei/TimeMachineRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/TimeMachineRecipeHandler.java new file mode 100644 index 0000000..55e7e2a --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/TimeMachineRecipeHandler.java @@ -0,0 +1,40 @@ +package shift.sextiarysector.nei; + +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiSimpleMachine; +import shift.sextiarysector.gui.GuiTimeMachine; +import shift.sextiarysector.recipe.RecipeSimpleMachine; + +public class TimeMachineRecipeHandler extends SimpleMachineRecipeHandler{ + + @Override + public Class getGuiClass() + { + return GuiTimeMachine.class; + } + + @Override + Class getHandlerClass() { + return TimeMachineRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_TimeMachine"; + } + + @Override + RecipeSimpleMachine getRecipe() { + return SSRecipes.timeMachine; + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/machine/time_machine_nei.png"; + } + + @Override + String getGuiRecipeName() { + return "ss.time_machine"; + } +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index 47c10d7..b21dad6 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -34,6 +34,13 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) Items.water_bucket, })); + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.drinkingWaterBottle, 2), + new Object[] { + SSItems.emptyBottle, + SSItems.emptyBottle, + SSItems.waterBottle, + })); + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.blueStoneSlimeBall, 1), new Object[] { "dustBluestone", @@ -170,10 +177,19 @@ public static void addVanillaRecipes() for( Map.Entry e : ((HashMap)FurnaceRecipes.smelting().getSmeltingList()).entrySet()){ + if(e.getValue().getItem().hasContainerItem(e.getValue().copy()) && e.getKey().getItem().hasContainerItem(e.getKey().copy()) ){ + if(checkItem(e.getValue().getItem().getContainerItem(e.getValue().copy()), e.getKey().getItem().getContainerItem(e.getKey().copy())))continue; + } + FurnaceCraftingManager.getInstance().addShapelessRecipe(e.getValue(), new Object[]{e.getKey()}); } } + private static boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } + } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index 37639d6..3339c4c 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -36,14 +36,14 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('x'), "ingotYellowstone" })); - Object[] material = new Object[]{"plankWood", "stone", "ingotSteel"}; - Item[] gear = new Item[]{SSItems.woodGear, SSItems.stoneGear, SSItems.steelGear}; - String[] gearOre = new String[]{"gearWood", "gearStone", "gearSteel"}; - Item[] unit = new Item[]{SSItems.woodUnitGear, SSItems.stoneUnitGear, SSItems.steelUnitGear}; - Item[] storage = new Item[]{SSItems.woodGFStorage, SSItems.stoneGFStorage, SSItems.steelGFStorage}; - Block[] shaft = new Block[]{SSBlocks.woodShaft, SSBlocks.stoneShaft, SSBlocks.steelShaft}; - Block[] tank = new Block[]{SSBlocks.woodGFTank, SSBlocks.stoneGFTank, SSBlocks.steelGFTank}; - Block[] box = new Block[]{SSBlocks.woodGearBox, SSBlocks.stoneGearBox, SSBlocks.steelGearBox}; + Object[] material = new Object[]{"plankWood", "stone", "ingotSteel", "ingotNinja", "gemOrichalcum"}; + Item[] gear = new Item[]{SSItems.woodGear, SSItems.stoneGear, SSItems.steelGear, SSItems.ninjaGear, SSItems.orichalcumGear}; + String[] gearOre = new String[]{"gearWood", "gearStone", "gearSteel", "gearNinja", "gearOrichalcum"}; + Item[] unit = new Item[]{SSItems.woodUnitGear, SSItems.stoneUnitGear, SSItems.steelUnitGear, SSItems.ninjaUnitGear, SSItems.orichalcumUnitGear}; + Item[] storage = new Item[]{SSItems.woodGFStorage, SSItems.stoneGFStorage, SSItems.steelGFStorage, SSItems.ninjaGFStorage, SSItems.orichalcumGFStorage}; + Block[] shaft = new Block[]{SSBlocks.woodShaft, SSBlocks.stoneShaft, SSBlocks.steelShaft, SSBlocks.ninjaShaft, SSBlocks.orichalcumShaft}; + Block[] tank = new Block[]{SSBlocks.woodGFTank, SSBlocks.stoneGFTank, SSBlocks.steelGFTank, SSBlocks.ninjaGFTank, SSBlocks.orichalcumGFTank}; + Block[] box = new Block[]{SSBlocks.woodGearBox, SSBlocks.stoneGearBox, SSBlocks.steelGearBox, SSBlocks.ninjaGearBox, SSBlocks.orichalcumGearBox}; //GF Block p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.smallWindmill, 1), @@ -71,7 +71,7 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('y'), SSBlocks.steelShaft })); - for(int i=0;i<3;i++){ + for(int i=0;i<5;i++){ p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(shaft[i], 4), new Object[] { "xzx", "xyx","xzx", @@ -97,7 +97,25 @@ public static void addRecipes(CraftingManager p_77608_1_) } + Block[] gearShaft = new Block[]{SSBlocks.woodStoneGearShaft, SSBlocks.stoneSteelGearShaft, SSBlocks.steelNinjaGearShaft, SSBlocks.ninjaOrichalcumGearShaft}; + for(int i=0;i<4;i++){ + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gearShaft[i], 1, 1), + new Object[] { "y", "z", "x", + Character.valueOf('y'), shaft[i], + Character.valueOf('x'), shaft[i+1], + Character.valueOf('z'), SSItems.energyReactor + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gearShaft[i], 1, 0), + new Object[] { "y", "z", "x", + Character.valueOf('y'), shaft[i+1], + Character.valueOf('x'), shaft[i], + Character.valueOf('z'), SSItems.energyReactor + })); + + } p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.millstone, 1), new Object[] { "yyy", "aza","yxy", @@ -140,9 +158,25 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('b'), SSBlocks.steelShaft })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.rollingMachine, 1), + new Object[] { "yay", "aza","yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.ninjaGFStorage, + Character.valueOf('z'), SSItems.ninjaUnitGear, + Character.valueOf('a'), "ingotIron" + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.timeMachine, 1), + new Object[] { "yay", "aza","yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.orichalcumGFStorage, + Character.valueOf('z'), SSItems.orichalcumUnitGear, + Character.valueOf('a'), SSBlocks.chunkLoader + })); + //GF Item - for(int i=0;i<3;i++){ + for(int i=0;i<5;i++){ p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gear[i], 2), new Object[] { " x ", "xyx"," x ", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesRollingMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesRollingMachine.java new file mode 100644 index 0000000..0e26d4d --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesRollingMachine.java @@ -0,0 +1,16 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSBlocks; + +public class RecipesRollingMachine { + + public static void addRecipes(RecipeSimpleMachine recipe) + { + + recipe.add("ingotIron",new ItemStack(SSBlocks.ironPlate, 1)); + recipe.add("ingotGold",new ItemStack(SSBlocks.goldPlate, 1)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java b/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java index 47bf88c..c85c56d 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesSawmill.java @@ -11,7 +11,14 @@ public static void addRecipes(RecipeSimpleMachine recipe) { // - recipe.add("plankWood", new ItemStack(SSBlocks.woodPlate, 4)); + //recipe.add("plankWood", new ItemStack(SSBlocks.woodPlate, 4)); + + recipe.add(new ItemStack(Blocks.planks,1,0), new ItemStack(SSBlocks.woodOakPlate, 4)); + recipe.add(new ItemStack(Blocks.planks,1,1), new ItemStack(SSBlocks.woodSprucePlate, 4)); + recipe.add(new ItemStack(Blocks.planks,1,2), new ItemStack(SSBlocks.woodBirchPlate, 4)); + recipe.add(new ItemStack(Blocks.planks,1,3), new ItemStack(SSBlocks.woodJunglePlate, 4)); + recipe.add(new ItemStack(Blocks.planks,1,4), new ItemStack(SSBlocks.woodAcaciaPlate, 4)); + recipe.add(new ItemStack(Blocks.planks,1,5), new ItemStack(SSBlocks.woodBigOakPlate, 4)); for(int i=0;i<4;i++){ recipe.add(new ItemStack(Blocks.log,1,i),new ItemStack(Blocks.planks, 6,i)); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java new file mode 100644 index 0000000..ecd1c5e --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java @@ -0,0 +1,31 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.SSItems; + +public class RecipesTimeMachine { + + public static void addRecipes(RecipeSimpleMachine recipe) + { + + recipe.add(new ItemStack(SSItems.turnip),new ItemStack(SSBlocks.turnip, 1)); + recipe.add(new ItemStack(SSItems.cucumber),new ItemStack(SSBlocks.cucumber, 1)); + recipe.add(new ItemStack(SSItems.ironTurnip),new ItemStack(SSBlocks.ironTurnip, 1)); + + recipe.add(new ItemStack(SSItems.onion),new ItemStack(SSBlocks.onion, 1)); + recipe.add(new ItemStack(SSItems.tomato),new ItemStack(SSBlocks.tomato, 1)); + recipe.add(new ItemStack(SSItems.corn),new ItemStack(SSBlocks.corn, 1)); + recipe.add(new ItemStack(SSItems.goldenCorn),new ItemStack(SSBlocks.goldenCorn, 1)); + + recipe.add(new ItemStack(SSItems.eggplant),new ItemStack(SSBlocks.eggplant, 1)); + recipe.add(new ItemStack(SSItems.sweetPotato),new ItemStack(SSBlocks.sweetPotato, 1)); + recipe.add(new ItemStack(SSItems.greenPepper),new ItemStack(SSBlocks.greenPepper, 1)); + + recipe.add(new ItemStack(SSItems.radish),new ItemStack(SSBlocks.radish, 1)); + + recipe.add(new ItemStack(SSItems.rice),new ItemStack(SSBlocks.rice, 1)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererGearShaft.java b/src/main/java/shift/sextiarysector/renderer/block/RendererGearShaft.java index 91fed4b..6fd1084 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererGearShaft.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererGearShaft.java @@ -6,9 +6,11 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; +import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.renderer.model.ModelGearShaftDown; import shift.sextiarysector.renderer.model.ModelGearShaftUp; @@ -43,14 +45,18 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB } - /* - if(block == SSBlocks.woodShaft){ + + if(block == SSBlocks.woodStoneGearShaft){ this.bind(woodShaftTextures); - }else if(block == SSBlocks.stoneShaft){ + }else if(block == SSBlocks.stoneSteelGearShaft){ this.bind(stoneShaftTextures); - }*/ + }else if(block == SSBlocks.steelNinjaGearShaft){ + this.bind(steelShaftTextures); + }else if(block == SSBlocks.ninjaOrichalcumGearShaft){ + this.bind(ninjaShaftTextures); + } - this.bind(woodShaftTextures); + //this.bind(woodShaftTextures); m.render(null, 0,0,0, 0,0, 1.0f); @@ -85,9 +91,10 @@ public int getRenderId() { return SextiarySector.instance.proxy.GearShaftRenderType; } - private static final ResourceLocation woodShaftTextures = new ResourceLocation("sextiarysector:textures/models/gear_shaft.png"); - - private static final ResourceLocation stoneShaftTextures = new ResourceLocation("sextiarysector:textures/models/stone_shaft.png"); + private static final ResourceLocation woodShaftTextures = new ResourceLocation("sextiarysector:textures/models/wood_gear_shaft.png"); + private static final ResourceLocation stoneShaftTextures = new ResourceLocation("sextiarysector:textures/models/stone_gear_shaft.png"); + private static final ResourceLocation steelShaftTextures = new ResourceLocation("sextiarysector:textures/models/steel_gear_shaft.png"); + private static final ResourceLocation ninjaShaftTextures = new ResourceLocation("sextiarysector:textures/models/ninja_gear_shaft.png"); static public ModelGearShaftUp modelShaftUp = new ModelGearShaftUp(); static public ModelGearShaftDown modelShaftDown = new ModelGearShaftDown(); @@ -104,7 +111,12 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double float scale = 0.0625f; GL11.glScalef(scale,scale,scale); - this.bindTexture(woodShaftTextures); + switch(tile.getMaxPowerStored(ForgeDirection.UP)){ + case 1:this.bindTexture(woodShaftTextures);break; + case 2:this.bindTexture(stoneShaftTextures);break; + case 3:this.bindTexture(steelShaftTextures);break; + case 4:this.bindTexture(ninjaShaftTextures);break; + } switch(tile.direction){ diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java b/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java index 24709c1..4eaa790 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java @@ -38,8 +38,12 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB this.bind(woodShaftTextures); }else if(block == SSBlocks.stoneShaft){ this.bind(stoneShaftTextures); - } if(block == SSBlocks.steelShaft){ + } else if(block == SSBlocks.steelShaft){ this.bind(this.steelShaftTextures); + }else if(block == SSBlocks.ninjaShaft){ + this.bind(ninjaShaftTextures); + }else if(block == SSBlocks.orichalcumShaft){ + this.bind(orichalcumShaftTextures); } modelShaft.render(null, 0,0,0, 0,0, 1.0f); @@ -71,6 +75,8 @@ public int getRenderId() { private static final ResourceLocation woodShaftTextures = new ResourceLocation("sextiarysector:textures/models/wood_shaft.png"); private static final ResourceLocation stoneShaftTextures = new ResourceLocation("sextiarysector:textures/models/stone_shaft.png"); private static final ResourceLocation steelShaftTextures = new ResourceLocation("sextiarysector:textures/models/steel_shaft.png"); + private static final ResourceLocation ninjaShaftTextures = new ResourceLocation("sextiarysector:textures/models/ninja_shaft.png"); + private static final ResourceLocation orichalcumShaftTextures = new ResourceLocation("sextiarysector:textures/models/orichalcum_shaft.png"); static public ModelShaft modelShaft = new ModelShaft(); @@ -90,6 +96,8 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double case 1:this.bindTexture(woodShaftTextures);break; case 2:this.bindTexture(stoneShaftTextures);break; case 3:this.bindTexture(steelShaftTextures);break; + case 4:this.bindTexture(ninjaShaftTextures);break; + case 5:this.bindTexture(orichalcumShaftTextures);break; } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 407f2a2..8254608 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -10,7 +10,15 @@ tile.ss.magic_furnace.name=Magic Furnace tile.ss.wood_grate.name=Wood Grate -tile.ss.wood_plate.name=Wood Plate +tile.ss.oak_wood_plate.name=Oak Wood Plate +tile.ss.birch_wood_plate.name=Birch Wood Plate +tile.ss.spruce_wood_plate.name=Spruce Wood Plate +tile.ss.jungle_wood_plate.name=Jungle Wood Plate +tile.ss.acacia_wood_plate.name=Acacia Wood Plate +tile.ss.big_oak_wood_plate.name=Big Oak Wood Plate + +tile.ss.iron_plate.name=Iron Plate +tile.ss.gold_plate.name=Gold Plate tile.ss.hole.name=Hole tile.ss.farmland.name=Farm Land @@ -31,21 +39,32 @@ tile.ss.small_waterwheel.name=Small Waterwheel tile.ss.wood_shaft.name=Wood Shaft tile.ss.stone_shaft.name=Stone Shaft tile.ss.steel_shaft.name=Steel Shaft +tile.ss.ninja_shaft.name=Ninja Shaft +tile.ss.orichalcum_shaft.name=Orichalcum Shaft tile.ss.wood_gear_box.name=Wood Gear Box tile.ss.stone_gear_box.name=Stone Gear Box tile.ss.steel_gear_box.name=Steel Gear Box +tile.ss.ninja_gear_box.name=Ninja Gear Box +tile.ss.orichalcum_gear_box.name=Orichalcum Gear Box tile.ss.wood_gf_tank.name=Wood GF Tank tile.ss.stone_gf_tank.name=Stone GF Tank tile.ss.steel_gf_tank.name=Steel GF Tank +tile.ss.ninja_gf_tank.name=Ninja GF Tank +tile.ss.orichalcum_gf_tank.name=Orichalcum GF Tank tile.ss.wood_stone_gear_shaft.name=Wood Stone Gear Shaft +tile.ss.stone_steel_gear_shaft.name=Stone Steel Gear Shaft +tile.ss.steel_ninja_gear_shaft.name=Steel Ninja Gear Shaft +tile.ss.ninja_orichalcum_gear_shaft.name=Ninja Orichalcum Gear Shaft tile.ss.millstone.name=Millstone tile.ss.loom.name=Loom tile.ss.sawmill.name=Sawmill tile.ss.pulverizer.name=Pulverizer +tile.ss.rolling_machine.name=Rolling Machine +tile.ss.time_machine.name=Time Machine tile.ss.fan.name=Fan @@ -64,10 +83,12 @@ tile.ss.shipping_box.name=Shipping Box tile.ss.turnip.name=Turnip Seed tile.ss.cucumber.name=Cucumber Seed +tile.ss.iron_turnip.name=Iron Turnip Seed tile.ss.onion.name=Onion Seed tile.ss.tomato.name=Tomato Seed tile.ss.corn.name=Corn Seed +tile.ss.golden_corn.name=Golden Corn Seed tile.ss.eggplant.name=Eggplant Seed tile.ss.sweet_potato.name=Sweet Potato Seed @@ -137,10 +158,20 @@ item.ss.unit.name=Unit item.ss.wood_gear.name=Wood Gear item.ss.stone_gear.name=Stone Gear item.ss.steel_gear.name=Steel Gear +item.ss.ninja_gear.name=Ninja Gear +item.ss.orichalcum_gear.name=Orichalcum Gear item.ss.wood_unit_gear.name=Wood Unit Gear item.ss.stone_unit_gear.name=Stone Unit Gear item.ss.steel_unit_gear.name=Steel Unit Gear +item.ss.ninja_unit_gear.name=Ninja Unit Gear +item.ss.orichalcum_unit_gear.name=Orichalcum Unit Gear + +item.ss.wood_gf_storage.name=Wood GF Storage +item.ss.stone_gf_storage.name=Stone GF Storage +item.ss.steel_gf_storage.name=Steel GF Storage +item.ss.ninja_gf_storage.name=Ninja GF Storage +item.ss.orichalcum_gf_storage.name=Orichalcum GF Storage item.ss.hammer.name=Hammer item.ss.calendar.name=Calendar @@ -152,9 +183,6 @@ item.ss.season_stone_summer.name=Season Stone -Summer- item.ss.season_stone_autumn.name=Season Stone -Autumn- item.ss.season_stone_winter.name=Season Stone -Winter- -item.ss.wood_gf_storage.name=Wood GF Storage -item.ss.stone_gf_storage.name=Stone GF Storage -item.ss.steel_gf_storage.name=Steel GF Storage item.ss.string_bobbin.name=String Bobbin item.ss.cloth.name=Cloth @@ -197,6 +225,8 @@ item.ss.eggplant.name=Eggplant item.ss.sweet_potato.name=Sweet Potato item.ss.green_pepper.name=Green Pepper +item.ss.blue_potato.name=Blue Potato + item.ss.radish.name=Radish item.ss.rice.name=Rice @@ -253,6 +283,8 @@ gui.ss.millstone=Millstone gui.ss.loom=Loom gui.ss.sawmill=Sawmill gui.ss.pulverizer=Pulverizer +gui.ss.rolling_machine=Rolling Machine +gui.ss.time_machine=Time Machine gui.ss.gf_tank_1=Wood GF Tank gui.ss.gf_tank_2=Stone GF Tank @@ -439,6 +471,26 @@ achievement.ss.pulverizer=Industrial era achievement.ss.pulverizer.desc=Craft a pulverizer achievement.ss.pulverizer.desc2=Double it ! +achievement.ss.fan=Oh ~ ~ ~ +achievement.ss.fan.desc=Craft a fan +achievement.ss.fan.desc2=Blue flame ? + +achievement.ss.ninja_gear=The power of mystery ? +achievement.ss.ninja_gear.desc=Craft a ninja gear +achievement.ss.ninja_gear.desc2=Japan ! + +achievement.ss.rolling_machine=Cutting board +achievement.ss.rolling_machine.desc=Craft a rolling machine +achievement.ss.rolling_machine.desc2=Pretty it's cutting board ! + +achievement.ss.orichalcum_gear=The power of mystery ! +achievement.ss.orichalcum_gear.desc=Craft a orichalcum gear +achievement.ss.orichalcum_gear.desc2=End content + +achievement.ss.time_machine=Time Machine +achievement.ss.time_machine.desc=Craft a time machine +achievement.ss.time_machine.desc2=World line is different ! + achievement.ss.economy=SS2 -Economy- achievement.ss.creeper_firework=Creeper Monger @@ -468,5 +520,8 @@ nei.ss.millstone=Millstone Recipe nei.ss.loom=Loom Recipe nei.ss.sawmill=Sawmill Recipe nei.ss.pulverizer=Pulverizer Recipe +nei.ss.rolling_machine=Rolling Machine Recipe +nei.ss.time_machine=Time Machine Recipe -nei.ss.fertilizer=Mutation Recipe +nei.ss.fertilizer_farmland=Farmland Mutation Recipe +nei.ss.fertilizer_paddy=Paddy Mutation Recipe diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/blue_potato_stage_0.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/blue_potato_stage_0.png new file mode 100644 index 0000000000000000000000000000000000000000..c25f298e963148d95a05399bce86ea3fdf2870fb GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=Dh+L6~vJ#O${~LG}_)Usv|~j696$S`pituK|T*GeaUuobz*YQ}arITm}Z`qSVBa z)D(sC%#sWRcTeAd6une-ptysli(`nz>Eu8E|JyUGHgq;R8Dt$;!MK<$!SF!Ev7Y}t zKwvi8Jo)UR8&3jxe*FAp+WfeY`G5b9Uq(sB46|(*&aajFzjxuqPasP?UHx3vIVCg! E0Df~xB>(^b literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/blue_potato_stage_1.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/blue_potato_stage_1.png new file mode 100644 index 0000000000000000000000000000000000000000..fea77024932d1d0e95d2d06e237e76dd270a58cd GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=Dh+L6~vJ#O${~LG}_)Usv|~j694QOs{5}KL!fPW`;zRIOpf)rskCZxeN@>MX8A; zsVNHOnI#zt?w-B@DSD~wK=E8p7sn8b)5(AS|F>sWZRl)tGRQixg7NT4hU3ia|CZ0S z?KTd7I5|BrAt9ln_>IKja7|6N$CsD?pMUm5!j_wRe(qneK;iIi^L&XuHWq_Nlha+! zowGW7_P=XxuB6@F9S1+WKQG_*+0wG-#J0rA>RDeRVnIRD+&iT2ysd*(pE(3#eQEFmI zYKlU6W=V#EyQgnJie4%^Q2eB)i(`nz>9>CzHR~Owx;&RPRmpSJ?+%RQzvx0;3^@-k{Pait;zZQK|)3z$J!gl_KLm$+`J2>Q$ tuWZw~qc6V2M|kl|k?8y3cHcD~=gVHn4tRI+_bQNYJzf1=);T3K0RU-Hh++T$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/blue_potato_stage_3.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/blue_potato_stage_3.png new file mode 100644 index 0000000000000000000000000000000000000000..759ba67d8195c87086917e5f371932a1bbc807e0 GIT binary patch literal 648 zcmV;30(bq1P)WFU8GbZ8()Nlj2>E@cM*00HbtL_t(I%iWVPXcJ)+ z$A4dvCTU`Fm(WXsPF|OT-F(v<-uu1x|399PQgV^-aKZQw0KPxTT(Kw<=``!v ztoT>)T(KylhQV>Yj$>KW@_8`?IF?0wXNQ}vE061SstXI^d^5mlr-O7|6w@4)5YRM& zsT4mB4u~2C*Or##?NUhsTwhs{XM+KbW#RGrNzTkr&gH}iAdyaU<~U5KD&HyXnPxfJdSsA634Reg+c)Ie@}P&eQNo< z7&8$dm`dS~#qdQU^qNf+)5O}`B%ox=9o7^d9KiT+!=A(TwIhBih}TZv8z=+ zhwdR?+#0*i>fS11`t>w+!zOb%L+O4A@!-wyIWkxGskLql8~%obpM;5}WB5)!oe+!1 z*lKN!;(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d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/golden_corn_stage_2.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/golden_corn_stage_2.png new file mode 100644 index 0000000000000000000000000000000000000000..6e51ec72fba558f476f30aab005b7f1954883fdb GIT binary patch literal 631 zcmV--0*L*IP)WFU8GbZ8()Nlj2>E@cM*00G-cL_t(I%cW9HYZFlv zJ@>ttFbqw)upa@lDI%02WF?}AU38ZpV0Q)rE*t|73T|Au5m8VmgQAi`p#A|jZrm5a zf1ouYQmCsCY9^iM+?ly9Y6hdGT70W_?|bK*d+)g(A$BErWH?*srH>p~C&lIOXkX)0-&9x^lT-hV{aS}-$i zw%an5z!)O{5XUifIvwpej_>EjD zmx{ivwbS?D{KZwealKi@Q4~2M5|6>%ZkK*@>gS+-ZW&1i+}beXJ~O3M`8cbovDH9- z)W@Bb2LOQAuU<+NML7{cYn?N5UM`nQVHi%RFFjns`pP<}cCUu2Uq$b84>R*KSle9_ zBErGy0nNRcOC8720N}bV#w3lc2KK-1qyMdcv`7oL7a&zZy;MiVs}w4WZx>S{(m$NR z-i1A?coppI?to*)U~@3JiL+N{p-w9dHU|KJR;wkR=jE>J*1|CS^6NVQdJ23zN03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00JXPL_t(I%cYXfYZE~j zhM(D;O{SZeBBVdWTzZotRD>d)dgv`DFIquRs5IzWS@5XfO{^%EN=>8<<`D0Kc=0F{ z!T&&NJV>FQLTDS!?(AmAL)%~_sR!paeDi)h^S-Yz#_&JKI)0orje6by_`YwXZ6j^_ z$P3Yr!1sNlwI-cTb2t5l7s0i*);gO?rFiwLEV{1~;%>J;!J)WPsR)2)yO(*nx_Y8g zsiU>#mg^ZjdL-5WF_1Mu5CE`HDw#%IQ9D@`0F>zw^!-AqR5DUZwAKKL<2WV^L;KwM zX>reA?1=}OI5ac_U|iS5aU3fQLt81ux36E!KU45L&m>7=;y5;O91}$mkDfdiK@bo{ z5qB0B&A>El(T43*Xz%d)6e4-z=egQ>G;&|UETn`AN> zqA2QGmPIC$8Q4`(Trbl6+2rBm5&$3GzcuZ4I}t))+jbH~kyJ|U$6qe@C?=jxFgH1e zC_E}K?vB&=-XJ@YWp;Dc2qD;+*%A3q`B+M62SI>RicY6PtyUAo^&;E5+cd-GevwA+ zk7C9RQ>iI(D%Zms`#cs4A?$->*t)PKaw^Bh<_1wGqP5&Q+Qi{2!&s*+TFWf}=I7^) lQYvvAr?9fJ^5gG0z;9Qx{|#dJcG~~|002ovPDHLkV1gsiFmwO_ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/golden_corn_stage_4.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/golden_corn_stage_4.png new file mode 100644 index 0000000000000000000000000000000000000000..b573219346c4e53b5b71d07938cf453c1ac29913 GIT binary patch literal 683 zcmV;c0#yBpP)WFU8GbZ8()Nlj2>E@cM*00Iw5L_t(I%cW9HYZE~j ze%{PvvusL=P}_jH6cMDCUeuz9J@l3zV2?sT&={Cd@Z!OXhz5lcDoNQ$Lj40?ym*yR z@E>T6h!pB6gqn>z+1c#tA!eZ^$;G+N`_A+5d<-!&{^um-Ei0AEuv{)P04Swc3IQp^ znKv{|fl`WtAV4aW!f-f@=ayw*|4)rZ%?ROWG+n_2T(8$@GHbXlHKa>H5a5ARWE2rA zNz4OltpNag`%MU)K!T@M)3&moQqbTAq3^@!#7-R74#cR@9!x)1{r4r91P)acX_`XlB z>k26)9LK?r&R4uUIEYE65=bG?@Asj##+$lJ!3ZEC9RvaH+`bk2o&-BJgX=dp>EZo* z@!j)0$;>gh*=*8z%W(@*2z+WE;@XW3Jl+{w@jP!tL?WF|qgt)fw7@Cf$fG;x;_2E; z0Kmr&@7eRbh=?GBh>S7Pw(W8KwOUNF`f3&1YuljQ^Bl5H7M-6REL>c`*3lLd5l%Nx zY3Xn&lu`<WFU8GbZ8()Nlj2>E@cM*00MSNL_t(I%cYV{NYil`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ad>qMd@ac0<~)C#9Ua? k*|>t%*4BCM@puHlcRMyH`QE?(<^TWy07*qoM6N<$g5JAsl>h($ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/iron_turnip_stage_2.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/iron_turnip_stage_2.png new file mode 100644 index 0000000000000000000000000000000000000000..9e4fce5e9c0f9cc3725409e4c4e4442d8474dd84 GIT binary patch literal 765 zcmVWFU8GbZ8()Nlj2>E@cM*00Lo2L_t(I%camyNEBfl z#_{jW&d%(%Yh&e|$?d`BQ5Gg^u$M^HT&-;5`NeIFJEah(pc3v?N2>gCO z?uyHgyHmKioafSd6CCZVVPbItP149H8MGCR;aem5SA9M&MEchXt04+N?V~c%LmB!y z$0_bIm};A5dbXU(SOUq&F?KV_Z0a!8_ZBH|f09XODeu@0fPCrA1wLFHB3!0X(Y}ko zau9&ZSc1yhZ1zdmC&YUz$^T!sE zTM&Gj=%r-yZeI63`@;dxB_RZ{SWJ9BH7SLj76@I}u`G*)dP^Eg4$_cl6qaS-wAgF9 z9F0bWWm!~&4x*|m$z&3M_lb8@4OENq@o^l-S=VJ%Rk19KzV3eUtzlSlT^E2l^BAhC z0uTy?=V_SSL*;PkeaQgDyN!_PHB*L50xe5JLu)$@2fE&==kDVI0-x179j00000NkvXXu0mjfmC{o6 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/iron_turnip_stage_3.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/iron_turnip_stage_3.png new file mode 100644 index 0000000000000000000000000000000000000000..0f152441748470132ab1449c2c17fa76a46c7c06 GIT binary patch literal 699 zcmV;s0!00ZP)WFU8GbZ8()Nlj2>E@cM*00JLLL_t(I%cYV(Xj4%X z#(y`xc~AN*4~Hl=Z7IcS2aB{FG!=w8*g=B`u0^`&kU<>;iN(o3gA^CL#5(9E6>O<> zu<#rObr)g?*n*a%v0U3|lf2|Ol)NUiBIq|=?(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2o{^?^|>>n^6?S&@i+6)SI$* zJVCh!8e<3n6&nberWtlACA|04b&byFbC$~` zDJ9Gd@9&LksyGzraftvXlL=~OFGy%#Ou)?gpJ}_@J~7bD`1HOf__5m!yGtn|!hiTk V$~=Z9hiCu*002ovPDHLkV1lyt;=2F< literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/iron_block_top.png b/src/main/resources/assets/sextiarysector/textures/blocks/iron_block_top.png new file mode 100644 index 0000000000000000000000000000000000000000..ae17cc9698926d1fd05bb1fcd9f31e8c9a71d00b GIT binary patch literal 516 zcmV+f0{i`mP)9N?S-5kYGWtu>e#M1&B6Ow)v-D2Rw)tpyR`B_aZsWr_WM4*lMZrv~7zyozG`*2mvuh06>fp(=?@p5CZ-sHpakvpG@9mj6nz?84be#5lOq&T5wfW zSg+TJF{ZC)Sq2fo{eDLX0ePMSKzd)QstODM&N=+AxbOQf0}+AN8hzixdyfzThGF=a z6A_FtV6C-WE|*!1T5AvyZnvAvVJwOQOhhT0h@{d)1dGK2<2XVo1rY%=!+ZaE2i|+y z?RKeIW`5@^(=?%NTY5!!KA)-3)9D1R>l&NQCVfprl0jY9csw2`%MxW-e%-}twfY^w zT07hD3+qn@B_iOi>t-=(tf}9pj1fvHIOo7k(_p*ZBE|?2fl?|hHcbO-E%H47 zI-*2DM1G7QA|IX1&FOeNVjRb>0{>tX=Ny*HCB0^UWBdgUeglk~%xM1r0000cT#29JYmYg#J@ED!|a8%TF%~V+vf9du8 z895%0@X!y8Le|2qDy1MIf~rzX7lyi$MH(~1=$CX|hwS%z8o&K_(@?`#&1{}hLQba> z`601Z(liYz$D860GBccWm>Hs~?3%l=*MM|1f6af!2M8hb7?XCZ;ydS%7~_n>G`g9M z#-YO0cRrtcj9b6MIX8PWH3MwKqb1K0j2PEe7%`^%B?YNBvqV!;Mxk=`H^wOiN421k uHT`;QW`=n0S667;w#WGP@v`bW1AGDk|HoY1#6%nb00008 zXcK_d)m3`E9&>YZ*tSizT4il*4W%S|Uth8Rb30FBSeAuUg41DyXnbO2<{?oO@nZHd zq-S0sJW;P{Hk)ij&!N@G+bL?TsaO+KDitun_kFtEZWj3C8+>l%)qLNFQFb@W7PVR} zgHh_3)6*f8q1|p%uh+o^3=_`g)9G~R^?G9v7YYRoAp}}$oQi|6VR~XZ`wc+#a&~~J zsVN-Cp)G+gAeCS^9A+@uW)@IwHP{{Pvb?;^Gv_T~7-nQrio?T0f*|06aUBdO8zyla zQ*>Pysbl6Z-ls8n56iOH+1X(*7@(9wDaFCT0YMPpI1aaFmS{{a<}eyz7$U18@9VmE zmyf@8d3pRa8<+$<@SSz&o#hS?3mF+_b|K0o;GldXXzCET((-gxr uO{9*;3^)8m{zW{`%V2zewDn)>4DcIVaVP2i$2Tkh00007eU6g+d`s_yd&Iiy|~l(@;tg#p;Cfg|-I~teXMk;F(uP zgaL6J6O)V=1Ob|5Ss3~;irZd72*JY4U0SUcwOWmQKF?rrk><}g+^Ei^v0)gJ^*j%$ zLO$&-2#9Bz3;HKk)k<{ zL!)f~pyv(B<#Iw}r~(cT`>YQKG@DJT)hbwkro+*GTCEn{ZWpH%q@86l8L~nMlu{JU zB8@$RN~MBnnn^_IER2o=FfuYirBb1>pL7sPLBHQmXe{VS!n}Qv!P**AQ&T)HzQyyr zL`+h$v$KQiy1cW_qXBtMCkO(vmSqvDfXioYGd^?+!!TG~U8UFSA*Do0$@ca(uIo}P z7P&rphw-7wlt#_-Ji?Ml7d2+z`1Rb073{1r*J~8aU7%Rx=yHq6OK#HB>!TzZ6`E-Y%l-UIRpF#r|vJ_ Ta)!IQ00000NkvXXu0mjf)W$^c literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gf_tank.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gf_tank.png new file mode 100644 index 0000000000000000000000000000000000000000..86797f11494d8add195758c3998528a6b247809a GIT binary patch literal 789 zcmV+w1M2*VP)+&N%?Q_c-SWA>h3SKx<9gwm9c-&S8vUo@bh-!CH$1`0>l1 zD9eI_(!_C0l1gF`BVs`mdAjZZfRr(1SuhMENs{pEyPuI=*KzW;rdZ`fBBI%xAcbJR zSJd^2qRg45g+L(BQ)CS&f7DJ zDn*Zm+q*l4Tg5a@$f~ON{OK7fW2|wEqd_3KI6vq4slz6Yd0sfEf#4nEIC1snTb9}K z+q(s!lp@PhiYg;35?;T#WV3D9cOAnpkmU)+Ozb{Aq0P+UFp#7v*4pDQS(c&AK%ijM z8s{xS#He0j7so}r#rr^2=Y-%;swc}OUEdQzKse`!e2TLH5hTyM16h)Dy50~A$>ZaW zyv*1=KJ&Eesj7-J$;k79wrvpri<>CRjAmUC@J#bWuN0TBUQpLHX4F(w#XQekefJHE zorxkr6h(-6o^j5Rmnr+MBZ?yQXfS5t&>slF(`*_<3~#^xnyivIJmWYp48t+w+4hXp zsv)MQeQ`=6V`k%6Z`L&Hnm_;ei&z}{f4=YdqHS@;Gffkssw#wxaLzJY!>AP=%heCB z@mL=3ABp3L=5&SX2LAr|fV0Q6%d#MqQtbE791cCJx00000NkvXXu0mjf#=3EE literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gf_tank_in.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gf_tank_in.png new file mode 100644 index 0000000000000000000000000000000000000000..1673cb1d91ce6ccd365a41269d0622be4e41591b GIT binary patch literal 823 zcmV-71IYY|P)nu~ zK~y-)g_BE*9Ay-SpQ`$*x-NaIBtz>=B8_8+1C!k>Cc%XpaTrHM5&wWNg8_eqyFkEQ z;?58d0s{dr(M6bS1{ED!`Uf~OM4R%GrZ3fX|Gp|0rBQH^7Y>}wIh^x8yxQjGW~Gz@ zpe#$2QdCt%S(X4KNkXsJLn(z)iZo5h^PEnngOm~hu(7;@>pCpL1jEoVZ39C$&~+WO zlKDIWK%E(=<6e-bc)4GujthI87T(*Xa0dz8c(SJRW0N7Pf8kk6ym?F2XPX z4X@=poh5j;0oH7amqESeeWeCsn82>pz z2m_fa4o~*U^PD%_YXq}^{6`C102U;b9INe zukMoP1w~OH!Z2hyov>KUX|`N8?AQ3=*Dv_=kL$Hz1<(QCxy+URn@p!OPK!s#Lj8+T zuPoZFCa!0bCK4ks@PE9_f0gGsSypi2x$}&E`3-=ost}fCQK*c0STPSnsuEsWeTO)T zFbqK)CjhkCO@JrE0G&>!#`x3k_n#i;$N!Hrz+Z;|Rmp=16*2$-002ovPDHLkV1k^p BbSVG; literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gf_tank_out.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/ninja_gf_tank_out.png new file mode 100644 index 0000000000000000000000000000000000000000..272a9cec97e84dd58bb3ef83313a967998d9191e GIT binary patch literal 841 zcmV-P1GfB$P)v=LDxKVgPM{11XZKsSPd zo8TfKfq;k#%4A`X(MU_Xn;X#IY_Qc3|( zmL*Cls;Z(aO90X|rPu4BltL**mSyC5PP^SkN{I<@DZGm3xvZiT!_ZlC3=G{s*LBcJ zmdh9bQ#bKEmpD#XTU+Da@omh-VnOSvCT_z)(>2;bi_eEQnNFuzmWAUu{BtjyzlLcT zfQH}nDa#VmG))}WAmQq^P{NTXz<>{|od7^ufZg-t#qsi#_8}ulOupNu< z#-DKSx7z^h@9#64&Dh=D#c>=uoel>F2Nbg4&e8jPG5QE8W!;Ny+oV}c5~o~m{LJx{ zH%QZz54PTf>hJIoye;oA7!26H{~kB9i!7E4s;WX)N}-h&p6Ah@+XO+tbULktrw`!x z`$r`PK|ueZ4S?gg^m@G-W1$2|5_8lQj7B3iH#fltObe`+SPocki;d zx5vBgS42?+fRvK)c+7A(K;pZF6{d$ZEAhN{N(` zlamvM!y&Hg(%-qtYtQYI=LJPkU`A2Id_H5fTGD8GTykFG{vV(6@~w9OI9eBkYw(Nv z441cFVLo4QQanHw>R*g{WzlLj@O+0Xl^7F)8=a@?9!fw!p63WraQ568#=rjwKvh+k zmSs^W!7{2?MiEsBS9V?}iDL}IBuP>Lnym)FBQZd`-L5hI@bI($pY!Q|=M3-{EzMi8 T>QSY}00000NkvXXu0mjf_-cR_ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gear_box.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gear_box.png new file mode 100644 index 0000000000000000000000000000000000000000..1f3e89ce55dd123f3c6bf6380ce77bde545b0588 GIT binary patch literal 485 zcmV0L zE2;8>rS`z3_lnLkuyET#t=!W7kV(ftLp>CObmJED2n`|Qn7~OnZp}{48y>F*U}y-oFso7Cahf$ zzzVP0_JHyB_6A#+fb8Jh{?UUJ$o!8o@(J~}!_X4@!|5|U*Z*EaF z%QBQwXsyYz41h2Usnu#IrBF%{MG;Ao;JPkSN(8{pA9v}8VVV@PbWm$0X#yG(Stt(9 zdqDNh1w^OQ;nn0w85Z6ic!!LkJ;wx4DbfdeArq z6izi!0d$Li1C^J@`TXh2{$ z^(h(J1ayjqv4#AO00IJn0^?Dsf@~gM+ z|D)UO<`|D29VG?4)k$7NFPNU5=2q!BK@jY7muzouv$nRzkT?MXe)ETk`xtk=?2#?r zAx;#H2Y<1$vcl}_EK*7Uwzjs|*w~;{D$$#}!T+|4DKoM(MFc@WK}*Vxz#FoWSMDKh zp6Ai-a=x$>aKS5`q<85y03!u(D;Ar5j6Gq~O*N!Bx6wiY|J6x;jwDI=`dtp{osL3i zjj$|>Vc%gdJTOpn`91&zVIKGZIJ}?tz2LYm#;@A>2W+7~pUO=)*#H0l07*qoM6N<$ Ef&|J^-T(jq literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gear_box_out.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gear_box_out.png new file mode 100644 index 0000000000000000000000000000000000000000..c477e20837641d44f04917727984d7a638abfd32 GIT binary patch literal 798 zcmV+(1L6FMP)8&wpBpBZ1zjO~V*X>m<$6eTScja0$b3w}TprK@gRDH1dhl(J~IRX0$i zA|%*UZBPMDeHWa8zt!i z1{+x_Pwq!R{r*RY!C=7I>3}3xNNoTRcb4e&dN_`Q=XpoXZ~h2?l$s=!Xsr=K2%dFb zVvLzQoCbapd!S*xnnDS_i{|*}?^lOo74oLi6j7_y&?kI6w}cQj+`debrmSALLbuyx zW@d(RxlHo-G4)5EQNFbbKu{HQ@*F#gB3=(-+^?3fzPN;C49m;Q^!t70=H~D`k01zG zSy@458S%}Fh&xL>{cFFF>$)!Qv}*LyoU7hbIv-pmj$EG`1 zL-HQS97ARdwo;1imnqeXM|tjoe z&T~W*MU;%B>Is5lF7n1h#Md8kVf7mT){mz&%kZr7KBH^*060+szvj>xV;l*WVQwHV zxScGO_#`-2>_G!5;KyMKj+Fy$#QCVH2?qr07*qoM6N<$f*NXJ5&!@I literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gf_tank.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gf_tank.png new file mode 100644 index 0000000000000000000000000000000000000000..31e71b8366924425ae9e00d262c82031f86e64dc GIT binary patch literal 604 zcmV-i0;BzjP)?R^OoPYfwCLwx9{r%l4?P<;GBJk)HDqx1&p+m9MEL9=c;0}$q(8G zu)ac*p~R6=3Qk0@?F_splCgD-sT%+uop{>D;haUXa&}U)yjW3pEyiaSi^Vp^J%Td@ z$$D@VDg32*wy(jFH9)X$oixP#oyC^)MvR0@gC!j-=K=+MscZISj)# z#@uvNZHEb#j5{D`QOw@W)!5o&n>p6Em^$CZIEqkmLSp3cvyP@VM+=m9Ggz&|;qDNl zrhsNk4in2y)4_2&em$h{V^WdP)k^AznJ)^V|0P1Hj^< z8{XOd3D9|P3o#y#i6f7z3kk>XC8n~7?`|?24)J}TFbvNh|N1e)b%=bIm#@ZDRfP~j z@IK9W*|(hJilR`=1C46~ObVF?gwXuuBi=wJsY~N*acN^CWaDob@6mFWPSYv2>`w6p;Ho#ie*Vh@1 zMl3Ea5{4nIR*Q{|4U8&@wpIzY*3Q}zK@eb-WFi&%(hIK7e@dR`JY4u3?5Qh-Z}d}E zR#teH{|E<{v1N|67S|Yq8^**@1U|IeZHB{PUHI2)`0e2Aw|2V?#pyu(h;FxAW3U zD2g~#!0%v{B+IfIqYk3le{h-oVxQ&ZW$s1KNz)Vntu_6ApI)!Wl(+-}94|mhiQ8;8 zvBpq-xx<^a`vgJA-rgRQ$po!6T5FDuj_CDzL{WrV`yTz(4gg9iM4F~lN>XVTEenoU zx0wI=3!eP3Sr1GB3ACasy!v<(G|c2D*fKxIScWmvNsR0JIF3uB(V+e775=TVEa_gn zP`5heF-$GiT7>WW6nRPitsx8qh178S2mVv31YmrclO)0Uzw7)rABR$(iL!**00000 LNkvXXu0mjf=v!fr literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gf_tank_out.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/orichalcum_gf_tank_out.png new file mode 100644 index 0000000000000000000000000000000000000000..1597e0879e3216c88aebaf61351a445955e41256 GIT binary patch literal 802 zcmV+-1Ks?IP)mP&NC{0sjTH)|r``&M zwgh{zR1`%;L@)jWB{_HrC<{3iEJ$ovS25eoGP{|1XWn<-9>%U0Z$6iY=i&MBeZF5F ztJCQitu+8;S)#SZ7(-c>0HkS3tJOkljnKYz(!Fu?OXeBXaJ{D*ruwngCCJbN*s zEK3~6aX3mQJnI>b(}FB3SO6Y6hfu<9D4_;7l0{w~yutHoL??WVoFJvdsn_d_M1YtH z`FAoQzH^C8O75?$(eL+Zx7)a`OZMOavo|j@zI+qg6n$?%gf7r^5iPFvon}H#TbLFwZ`^C!XTh?Bxp993Kb-?k!t5oRs`wWLenhiNcW?2??p63W#6Z(SAp&*W9 z!Z55V8Xv*J=K##j%@M~joudkYDI}B0q>@pI0D!Nf&&YOmSXx@*x8P5bBmqDvMX%SR z+wJnW{wWS%xdJIAcD-K5XifgzEnco(MF^km?QO>6F-j?vQta>V)9rQ%f`DT6SJd~n z04RzACrJ{@LQ*OlB{L4rZ?SOqTUPF00buu}BzEEN;4Ck`_yrWqrpK5(eJ5k?hn$E) zY|q28Y-+U{7aON59!fw$k>|8NK2=dO<1$DL#uyyW^T^Vi-YbnS95Sh3?RVa5i3DKu g)<;o<^`Y literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/rolling_machine.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/rolling_machine.png new file mode 100644 index 0000000000000000000000000000000000000000..51df099d4da3f4216ad51d814f639881748827ea GIT binary patch literal 491 zcmVpKYtIb*6a1;y$4_%N4)n;)5JKA0Nn3)nx?^fkM|yHEzUX0vgGx8Apmx}9ZD%a zMQcr-=W*QkJz16ka6BFnx7!V44A18i0OuS@lEe*po};x!N(n%gWhkYv)-sMGLI^=s zRak2QkWyld;cz%CNcQ`Eybr}5j|U>)D5cO^14M%B^$I}Swu?6AFA`eoh!`+Kg?R$u zyj1{^rYU)z#|87WZTsuloMf6NL{Rgy^1Nr~T$~G6DJ4zQyfp@e#u%!qTAcdNs`IQ? zD}-~7)9Lhafl`XT@2RS4aSi}=U1N-SYg9^66a`(^#YrHJt+mv3O;Hp848y=M3`>pY z^O=9icDw!77|??Ezol*4NGH-XjmV$0{V8=_zcnUF!Y~YMHk*&%LNGM%-‹(CfK h)_A#G{_A%J_yV&=?m%Ict!w}Q002ovPDHLkV1jrH)d>Iq literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/time_machine.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/time_machine.png new file mode 100644 index 0000000000000000000000000000000000000000..ca38eacc7b7b8d353974139a163cc827d58b09d0 GIT binary patch literal 502 zcmVdR|blCvCC5qTWF%ZKmA`p2> zr2F2f=I6|KW{$kt@Asqk9)MvO@ZK|yBf~HN@OV7PvJCG%-g}&LbX`Z1Bs`x_1i_u<^-TUI@oKd~bX~{ga`{M*Qq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0zM?q69`LyF1GAbXI>jXGWI@hct=%VW?ax|hq) zB(?Dba6*7`nqjEXe33FXsS>BWdfgB)@1jL`q)kyJ#Y-GL0dKhMG?&sU8x$yrt1LIG z6$(XsFWh?I^+|h^N|Khf?L58JX@_BOuq6OXMJNmRf`ZA#+sp2ae-~J(Uj?(z=fu5{ zQznc?Dy2A1>O5xQJdNK9ee!EfrF%@Sy;LX9Q^iR`m2nV+b_gcycEqW5bAq%$d#uR*M=Je$I%{R4Kze#TP1Y?Oh%8LVrh&6wf zXE9Vg;v=_7?N>fGTwD(Zeqj?UdfpT!m3SOAp)pQgo#-ZG-OUkkuX_fB&MRsI!_#Z4 zaTxVygT~2wOQ$}`7wQ~OjwNV2ZLILnW#1b}acqt2DJ$^=E1~l-!R4}{aE%|@-YBI^ zFr>tK0^8NtbsXX&lq}mu0=P0KwmnDy*l~$!TKKFYeZM`RBJe^bp8f8GSw1wLoV8ix+mw(C7GvA?1@!65Q#g>Zddk~))l}> zBm$Jl=SufwL|9CVgG5u?Q{Ea1nJNn}|81yf`qi>#Rf?rqN*~ThTpF~_oq)F2O}=4X z&N?uhIfvVHXin<;gFhpF@3ml;yAKzm)9LaiJZ6sQ7Y?X&ebI7}F*Hy& z?^W}xy+}S)Cn2g|U@xVSxg9@Mp?*2^q0D`h1cTNtLFa2^1p(Az`6_!{=*%De|U+6-@&+4+`en{@INM e|I>vmdAoe4&7rUDdn2#TED^Sm#k?89PW=n)DAM)- literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/rolling_machine.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/rolling_machine.png new file mode 100644 index 0000000000000000000000000000000000000000..632006e201753191d0c8b8f373b31c6ca655dda1 GIT binary patch literal 2823 zcmcImc{tQtA3tNiwu}ntj>)K-wrfg4mQiR@H|p|Imd4d9m1QuK5t$iE5kr(MJCziv zY=ulJM)r`g#7~5=jA`t{Ebq9_`##Tomw(@Lp7WgZe9k$a@8^4-^ZlL^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_wye{0p=r<+Ci<1g{g{IabwvBpx;}IJ6Exw+&1M_QV8XGbfgBXB zH;qse)~cEJ2*iLGcDaE@^lMg+2Dll61crZJDuFEkaG)le26BIi3bbF zk4|8BIzO*QULudlqv0XN2<~{KoR#eEg2npOTs2wK3sTz=BQz+`BGh%dR&e`}Z90G9 z{1<3jnW1@2nXwaXX|@909Xp literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/time_machine.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/time_machine.png new file mode 100644 index 0000000000000000000000000000000000000000..9541125bc86e51b68a3a92b8478b675feeda214f GIT binary patch literal 3030 zcmd5;X;2eL7Vd;Af*_6@!k7UEPzS^Sf?Q&v+#;Z&MvfQ-6$Fth$`MF{I>TsW!p$gG zM&uG9GBO|r2@EnQDpw*A2n3Csf*j!p0RXD*ZcfJmfXKEG08^BSfavmzGNBmg;pzmW>y!GtEK`PTh;;Lf0YI%~eLX9gjx2Ac$KpvwDqvR zLpu9-8fo~=EsS;Nn>QMbxk`$PyT_9V3&L3b@Tz~TcT+55B&r}qFKU11L;+S*{%~i4 zND$>6T3KA|*xK5f!$y2+;&_}bC(1uqGkyIj1x08XY&&3ORr2oL$<)+TP0r5j!S`^Ve9h@28J4!T4Pxda!$~H0|8MPTrw{|v@fQ6e_>Y@oq6d{sudm{-jry%VoOXrvLimFg}r0P4&36z zvA11a+BZ>>bnZS2i~A)dM((`@_OT1kR;vO#&zF=HW$mk{h-PW$HPdl(l}OeWy+Kx0 ziB&kqgI;J9Y@vf~%GrEd@1V7r+1WN;lr2RxiF-yB1P2G#4@hU!sQk#hrLKBz_tdk+ zA|;nRoeIju(EW?8DC(WWHZl_&H(m(3mn?=7Frr&woWxJN&|G{3}?bk_1H+A~}qrX2}u51=4< z{Ian9ufL+n$$R(iEv3`_GgwTffxBNoK$f8czjs5@G~&)@dapG1`Nc{&~zhb61l zF5EchQ!jdXNXZ|)(gf;s1KOXc3ShdygN)ql>}(A32^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UGqPaL@yv)s1~eX-k;^sey!}$d7h5 z52}}!&UlwGb#-+5m-w>w$JItcx?cpEUdt*I?mOQ;%1AMlGPa(jUn`lN{9q%@Kl zZ{LR1n~!U}|4!oPCk-WY;}?qx3XFi?&e&rjyh#^2pA6+xYM1&U_AQ?TQNqSc&ZmSj|uHB2U z`jI<0=)c%t9hgKdk!vPnV*KOL0k;{;A9L&Wj79xK%5@dH1boL?fRhF>G2$kZJyT^F zaN@Euqz{nPHHZY5{DsagT@?AM^>jjG-XLWyzYTkt(IlE|=Wz0$(dn;$8DcVh7VFyD zoS`5)h|L?*WF+|$U;&MBHTTtbX{x2FK}rGY=glC*cZt(V(=stJc?1CjV^QGva(%)F zCWKT>aHFirgKlauG7O;PPOhyc)x-!3b}nVvF}vgQ_*+P!6iMPn7|T}PxSxU0B9D4~ z`9T|s*CbZ_8R3%7gaBs^`hD6xCf>x9AhSg}@eTBfmuNcxxtzqRYesB-u5o02j3oN$ zwylvmQ2bkN<b7LHLSQs{8=EmOIG86{QwOLmx48(I zjC9kbd6|Bsb#OzSKy9taL0I4_jh=j7&w zJxjF$&2kkd4rgX&I!DA3zMPq&uNl{{;|RNOQ1F{cqL~8fah|AVHIivc=rfI1rI z>sE4Lj314sUBqYwL@STHV}~Jj?>1B8vG#kJV!MXR)#t*_;p-Gf+WvK*hQ?Va02BZc z3~~-n$1*j5zWf9L>Hxq1kO#7-Q1)FTf%Pl;e}jp;;?2|0SlU~gJ95O|4RwO*_8q!< zrLp-J)E!<*RK7jb^T-jmjIr_YnH96C9>{wsxbm2%%6ke=fhV7q`**hgV1xuljMiP) z{$ia{7 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/time_machine_nei.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/time_machine_nei.png new file mode 100644 index 0000000000000000000000000000000000000000..9ffb73c064d60b460ddba4f70a912649d47e10d2 GIT binary patch literal 3486 zcmd5;XH*l|wmu{j1t}vU3ep6IE;=e8EkV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+X|K-0^P&+Ge>>pv4HGYOk7_{K}muRb<{RizJbl`qJY YQ7k#*<#tlX;wK-ZiIs89Iu{&*y?m0QwpP799_~+7uMcXz+w)W=w-Vm{yd{fycq*-iPk7-i0003dNklgp9c`^G`&~Y*ro6Z#DIcVSQ$tc5~4wl-y*q?^UgDxfo+!g zX1|$bj3m~HjlTl*x>>v!hB8Q6=>!1^0wlF1m3372B&pcIIe#aBYW0yYY|n37tF_>q zQ>|8`-@ll{CqM;&s8a&oXNh^bzVEBqY%VF!w5775vuzz7Y$?gjfWGgm(P-qtFV|@} zHG@QXGMO+KTxNQXIwef+mv4;YnBnk>Ff6BrmB7ajV{V_*WAnaOoWbP6pJu<;s+I2}HN zFJq~6Agwx@-9Rr$1SG>rB@6(P?Sk?>N~;dMPcKehV*sdxtp)%fjlI&%S_BswtP=_w Z#xD#q2=Uql>$Cs>002ovPDHLkV1lWEk7xh@ diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/vegetable/iron_turnip.png b/src/main/resources/assets/sextiarysector/textures/items/food/vegetable/iron_turnip.png index 73b5ffbc4bc69feb17fcc46d92cd3da2671bb08f..2ba260c006232df7a9c4050de73e3383ac07f1d3 100644 GIT binary patch delta 332 zcmV-S0ki(g1H1!}Q3~Gy3;`_|YK}VGky|W(AW1|)R5;6xk}$>KCzq4Mic|0E6Za0p{BdQvm5IG2z0iMq%&N-ZO7-MG1ZvrBsBBIt>%CaO$60$6# zChn8YBoL|lyWRA`#e ex49*OZ}A7{qpZ!k(tY^=0000-bYdaCgKv?>=dcObEa~()EbbZ72zwB$C4~@jnAJ$e>h$(<7xS09^Z)bzGb5@> z6~-6^Sg+S|$a|+=bbNOKCov+T0IDh?qQi$PzI$7YFL$I`WeSvhQo8( zkYyQ-5ky3tbHC)K?p3n277M ta4)TwSPHcfTTi(zRKL)jx;BAB@dF9as3X;jOm+YO002ovPDHLkV1h%!qfP(- diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/ninja_gear_storage.png b/src/main/resources/assets/sextiarysector/textures/items/gearforce/ninja_gear_storage.png new file mode 100644 index 0000000000000000000000000000000000000000..21e9776672348a69638fd91e75fb0508d4277a31 GIT binary patch literal 457 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~BNwZw;AZW&ia;UR%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6_|fq_xi)5S5w;`GtUhTcwvB1h}LKNZk*Guffaaxv`3g7)Bt z7X*5@J_~yL^F?$@AKzEWUkv>m*@BCfba0(iysY@R(WY|7%pdt3Ph9QhKe%x7-P3x$ z=kxyWT{I<0B%`NeA5+_mQv$(1ug10fn)v)?LaOOG{!Hy@&o)g^SK3t-dfh01Awg42 zJ^krT|79!h9z3$;KgT29ivq!_79VP39ySFBRmA=&T%gW+we|e8M~4MxncWe2S9yF{ zr|cZYhUn%sQ-58Zt!Q{hzvR}0t=|}K^rS_kh&LFen^bU?8HhE_eaiDrT10;Sir}Pa zrZV#~AG2|Hu(?0K&nI>xZH{Nx90mb3DI2G+T-Oe_Gu$b}Rf`_k wd~sSG>~!J91+II|9WR_?rWFU8GbZ8()Nlj2>E@cM*00RC=L_t(&-tF3NNE2}w z!13>m5hJ1rmJ&kfizX#SEO1Pc(ibwK=uLz5%3kybLIf|6CQ;CvL8K$d!t!M=go8+w zupwa)*sPBJIz+2g&X|cfNtt7Mz3|_roBJby*6;V~?&0ot&mBKL-1FSQh8$L8&5Eog z+m9XkL?`d#6i2J9;6Vd8V{W8R?Zr=z_7hcFa{_=;vy~oCFZI=pjDCQvJCbKBt-N{_ zHc-)|d%NOpn1k^%K*KG0j-&X8zo2a{oY|Z{daOM27W3j0d*c!wVjeo(ETL5DtLd7s<|p zi;pyJRP~|KwiM6U1Di4mREqBl!UN%f@IZJVJP`jMB=BIs?x4G79UdH43`}r8eGlsQ w&%frM_HE0~19@1ZJ=BI86VKR#|LFgNKj@Xb(Ap9z5dZ)H07*qoM6N<$g3s29A^-pY literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/ninja_gear_storage_full.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/items/gearforce/ninja_gear_storage_full.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/items/gearforce/ninja_gear_storage_full.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/orichalcum_gear_storage.png b/src/main/resources/assets/sextiarysector/textures/items/gearforce/orichalcum_gear_storage.png new file mode 100644 index 0000000000000000000000000000000000000000..fa5951ad5b922ce7e9b7af2dfc25f96aad4ace04 GIT binary patch literal 452 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~BNwZgz&<(&ED>R8621Jg^3h$YGt(wi3Bo93FN9ivr5r0Tp4Ip@qq97U(5G% ze(&&ddBG+Xs}$@Y>b^ITV4X%TeZH(x)cQ|hs> zMZ5cq*U~$5CEom0bbeK8{wn77)hXRmn2Q|*8P9rfD7F6QOn+y&=f{UP%Xw1VDtHcV zT>IqFjW6%(9y%Y`IGyprTO%EvqteHJe|YfJT0>(-l=f$lLr=f*R+P?|)B2lj&)#R; z83zt#y=nOA`r>W--n%pSU;Y&IyT33$)mY6s`t9jo1}=ep&6Bmt7YfA0Zkhe;s^jGa oSI^`mX*n5~|5_dy@ZYXCzMpl4sdnhQWKdvwy85}Sb4q9e0D6$E#Q*>R literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/orichalcum_gear_storage_full.png b/src/main/resources/assets/sextiarysector/textures/items/gearforce/orichalcum_gear_storage_full.png new file mode 100644 index 0000000000000000000000000000000000000000..f133c9990b23200068c58d9437b06abf8ce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/orichalcum_gear_storage_full.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/items/gearforce/orichalcum_gear_storage_full.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/items/gearforce/orichalcum_gear_storage_full.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/src/main/resources/assets/sextiarysector/textures/items/machine/ninja_gear.png b/src/main/resources/assets/sextiarysector/textures/items/machine/ninja_gear.png new file mode 100644 index 0000000000000000000000000000000000000000..0a7a74004b0c54e738d36b4235677a92f404b5db GIT binary patch literal 582 zcmV-M0=fN(P)4D_F;e zu-ESPuaLf&WpZL$)SI`6I-mHbA$Y4@VQq0lxZPfVgWJoWB#fVfH=MI@3n^PU1KfY| zO+p&j6~q5pd&4O+mG{K-%p8>mb!jF_0OXU`0C?j*3%3wm8(?~7j+=MxsrN@eznsfU z1Qo^w_Oeq4z)X}B95@5Cd%Hpdc>FLcCMUK95DLspltOTzrFl(U$-6>b!E-yjeK#(H zjt2va!lU{a>(5VR=u`gj-B$xaRdIoh>SJmys8ItrbdUIY@|hR=t8BF^EX`{o8rIt4 zh&br&aM0TUAZh5#ZdT7W*lQhP<~j;`{T?743as(!BW4bfH1xmjdcTGL)!;AS4<-57 U|J$Q>KL7v#07*qoM6N<$f+k`BG5`Po literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/machine/ninja_unit_gear.png b/src/main/resources/assets/sextiarysector/textures/items/machine/ninja_unit_gear.png new file mode 100644 index 0000000000000000000000000000000000000000..7631b884d781c87c1f9e7cd5c5c19c9a969c85fb GIT binary patch literal 1315 zcmV+;1>E|HP)WFU8GbZ8()Nlj2>E@cM*00f6gL_t(o!|j*PYaLY- z$3JIg@-i=`X-fhk^oOLFf-Zw%b(5Vd5!!0St=L3~|9}M-#p13D5lk(GE-l(km&HYk z8>xgsX{EMMYEoMp653`SZ}R5eImgA!o4g+>FME4nesJI1bH3+$e%%KzNbFS95YlKo{pl3(a|0JcH6-FWqPP(JJ)=(@3;~ApuMo%X8Ee0n7}w z95Y4p95bW*0SrWhAQXZiM8YA4T?77FWO?a60~y#zQ=UG3hD4*puN=T!3o#{XyNH!f z1u+CcuxeGT_{LC>0D_2Q=?;%q{$*unG#Ef!uTzg>LR0W9L^Dvuy6js4pfuZcZzI7V z5F}K@JW&u3hS8IO07RsSr{$myG%w!Uic1S?3%_*j8=w84N0T8IfC!ip1VRu5zYYYD zWf@tkMXY|)Q?o9E=Wow5 z{@Htgapmj+)4PrW@Ye2Q09<==q4Hj^GW}$m3|I$!C4gSqE0#73pQrAh9yJ}_iy$JC z+Ydnn!n){gC)~`$99PaR05HAlXl4A`lM5Y_P7xHd9Pb^@yTJgGr14=RS!cpG5o=+Z zG5+Zcg0Xt;YFEOwY47!XYVPBboejhyeAXmce@3#N>>gMJ-g}&Pm}*A}DXZtMR(0N) zaJ|M~9)68G3qMu+%oGubqKGIOVwA5xzvA-BX%5bP)Td}__6Uz#cX`~p+nu1M1OmguHKL(yOhYrn)T#B;h z++2DSe-mJcwKGF8)vEVY2T@gW^+o8Q<9ul3W{e7qjE?itNPRGXTQ_eOXT!zc zaXzOW$3#)o9#lA&p}7|H7B{^2q-lzCuBf8+Wc7|#GiA^I{lxV;d-uJ&jWc1Z#i2J| zFWxs&;<#RAud3p`FFI==5_Re?A5^&CuHd7`iiw1c8`t=uogkDIW Z{0DMqmm79eghT)U002ovPDHLkV1l%wR?Ywb literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/machine/orichalcum_gear.png b/src/main/resources/assets/sextiarysector/textures/items/machine/orichalcum_gear.png new file mode 100644 index 0000000000000000000000000000000000000000..cea82365a893adb252a61e086173300309c4f92a GIT binary patch literal 713 zcmV;)0yh1LP)x zK~y-)m6T0Llu;OkpZm=?!$4D+NHr~#3IaDV#6&F&3`&ePA~=SYF@*$;lMoaw3K7Z{ zElh&MC@?f=<)VcQE?m^25R_nSAsIw6g^teu&o|%CZ80<7IN_#ub1yIVyyu*IE?0C+ zy`WNa{XqbHJ|F+q;^HE^m3=p0GMQw}J0N!+^nuuIkiD|8`Jc(9^8VQJqyRX1C4|c@ z_&oXC8frW0M@GV!EAs+Cnd=WS{qQ^hC%QtM>b+yJZ>y4wS`xD69gs?EfX3ci0Nm?p zu2leFnBdtDdYO5B(?kJW7YEsQSZCvhik8U&u)dK7Kmj;(q#1v7RD7QuCsl-4UZNXd zQy{Jj)O?m~)&w;}{Ba*+ZCfIqR;voy7g{8q761~uL=m9rl3yPtFpC;WYXG#IrF3Ya zLBd&JUMQ93@y-wjFAoAx)ZpvXI6cv~V#1pg=EpYx2u0w&`x>RU8of0jtyNP?6-(>6 z3zxWgf5hs`VxBsOsEJWjBCIq#S3|`9WZ2v2Aogye#B#bDSA!rI&0)?2EwH&#wh(Un zCj8M+0gy}=N+7*}{Y*EWzUxRekExj!@R9eY=sBJ zJb{daF(P47Wr-upP0~KSG&?MfGEu$TNypUF(t!2f+qBoMTG#s}0?>pp veVa=9bDvgeuS3+kon>}sHHH7JonOFTT8#gA_T$(K00000NkvXXu0mjfMPo80 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/machine/orichalcum_unit_gear.png b/src/main/resources/assets/sextiarysector/textures/items/machine/orichalcum_unit_gear.png new file mode 100644 index 0000000000000000000000000000000000000000..2c3d9ade97c38a484cb12b950d30744f77ca34cc GIT binary patch literal 1444 zcmV;V1zY-wP)WFU8GbZ8()Nlj2>E@cM*00jt1L_t(o!|j((h#Ykm z$3O2^H9ggno{6FeQ76hMEVu_*!>ThO7mcDP5m{kHJwkOA^1NVe^&DkUFtdLK5uw-X<9&&ULsjv<9C#n5@;oPm5ETiSL7FCH zS({dC;&hTEhdP~UW)I%UYsZi8vX|~$$n%14&z@&({Sw`7kC~Ysg3#~x@nwlPK~*Ws zaw>#CJ{aIbKx)-P0PQSeqBVIaO;b9ZX}5qAW`k5shJrY7DZSPIaN**QT-=|I2avVfw6l!F6heV$398sO z`xXJzX1CpkNHB1MB#Kxdb&e!SFOLNvA~ByfJX0V|gt^(<>)gcq4xazPl^NDkN$=I2Lcz*7Wn?gNU?0Mm1~LHxuB|N zRTVQu%n+gn^Ro#*eEKHc5-#ONs3380IS56*!N!I{(dY8-q&rf0-ml z@?Yl`;7Tx@fDgvnXYZh;#~oP&zf~hk|NI<)!;e2Q5((QI01>HcWf;DQ{_ZD_(eqJB z>ET}=zRCP;RV=3NY`hn&EnPeB7B8o2O}w*W|S1ov+HBnAHI*J zPhX`P)npNf6PTQAkxuMk8k!lV)^vcOm>Gv3zCW@eU_)m7=miENMZ56O?;01xv>rs@ z1kxm>)oP6gkT{1++!k+3Gvv3)!qNM7oa=1&Sx+Jc5fE3Wb{v3KtHoq%5|<{B2%>R{ zjS`6Upxt(>woP9ERAiG89v7xTiUYs#0l) zse_U8p;4L95t!=S#J;IL6ybL(EAec2`YU{>XlEH|nhpmQ-j`^lF}(3c2!TA$@!rQS z8cx>WDF!*W-*E?7yUpyu!+SUr76tRay(d0z=44sBsa{njgb`6K> zbM=z!V{ch)X05;T!>5JOCF@uo1LrJ5UInMm%h$8SICQ1)Fne6>nJ6?d_{IfBhPOh& Vk_n1a-veF1;OXk;vd$@?2>_n6PG$fA literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/plate/iron_plate.png b/src/main/resources/assets/sextiarysector/textures/items/plate/iron_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..0a8cbea05020038ad9507e1fb516fa85cecefe66 GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~BM&nNQ_bw-`aq#_PZ!4!i_=#p9ppTqz~j3A($v^P zf}3V8Fn)0|yE^E~jSCl?U)r~}eD4r?@OnmA#ryMx0?8tdN=6I?J-*Ll)_ZFTPY7aS zcrwS)Wp93Y8E0Jb{R2J=TGbE!$}BJ7aI9-$yT@f>AZ*i^z4jBE)C|ro2D^`ZJoIle ZcktPy-W~fM@dBN|;OXk;vd$@?2>^|mQxO0F literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/plate/wood_acacia_plate.png b/src/main/resources/assets/sextiarysector/textures/items/plate/wood_acacia_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..667c66c72e8a3ac232fbe7bebf07c7f2501166b1 GIT binary patch literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~BM-BI@^ps=UG}nyZu+@4A%sXP^BP>krYPcbOP;n?wR`Ib=4kI?>e1 z&7>8@?&0`R%5@4u(3!*k8JF@t?d%aYiS=(@l@~bm=Z&1ZPWQ|h^V5PBv2Zi5WnRN= zQq0`UdWrWq*?X9_b;ZNlDcjwF5A7mBU zRJYw@7P!n3@NcVF+{%pQWt)wTnHYYlTex0mi?8>2_7o=Vz}#Ct0khZac>C40Y1$Uk zKhqD2RUSR@wsk3kHLJg5neGVzQTCk=1d~=WpWL(J%j0|eca}ImX%nyoI-h~T)78&q Iol`;+00Nt4tN;K2 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/plate/wood_birch_plate.png b/src/main/resources/assets/sextiarysector/textures/items/plate/wood_birch_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..6e266c043705e02615018c4c394cbe9f5ac264c5 GIT binary patch literal 328 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~BM+OF(1Fn42B6SYPZ!4!i_=Gg47m;)@a&nwr&!Fi zjAhT)#Moa=|CUrQ-?#LFxk%H&W<^OWRljLv9cyo_o7;CWN%7^9-G>icn|Sj{oo)R; z-u}ZbKVKG|W=MF?ClkRKHWg@Y83V(y>{r@~j10b?m)+9a;Y-Vzpbu`z{D S#1w%ZWbkzLb6Mw<&;$Sk`*~sj literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/plate/wood_jungle_plate.png b/src/main/resources/assets/sextiarysector/textures/items/plate/wood_jungle_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..bc3e373de7837cba20101a360682da92bcef03fe GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~BM+O7B;#G(KA_MaPZ!4!i_=FZ+4~(fkT_buR%=eD zhuk6&%|p?A7bkx)vt>+Ae9WfP!^6?3C=?VVxiZK)q%4D#+iY8BugCOkg#a?QNOH8y{rm4Ej)Zg90Ih@O5Th-t&^_Y4tX=KKEty2tq8)3=A&pQl`9 zOx3i!A(+kE{7$mO|F*_0H`mV-n@g zTWra_*3ShzWqJqC@!ps?;{lIH?4`A`KA|kZYs_*Z1!wA5->>_}`R7-P;f?p(-fvlP z_w=Lm>-|~nk5!o?_$NO-7APjy;4aJXVdv(m3~7dS+fNm(F3A!(=BDJ7A?f`GICW_8s>xsX2`!m^IaG`@h&fa= zRQBy0DT}NRZ>nnEb{26xP7S)|{(USD8!Uw2>7NBQT>lT?!0 UuAY740rVk*r>mdKI;Vst05u|g%>V!Z literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/plate/wood_spruce_plate.png b/src/main/resources/assets/sextiarysector/textures/items/plate/wood_spruce_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..bd72fd8da72dd4722fcfed6bef2e50d7167ae4e1 GIT binary patch literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~BM+Ola>sLo-U3d7N@TU8uA@7;IUb}O*2?s zMed;S50?6;oCX^Y9$-#*dF_aZ@e;qqDpPL=#L4X3_xY~qkJ5>De81_v_X= zR`b$=?dQE`VF*35?e3byBgIjlYGP&c7Npznj+vhrwlrLqvqzvuK!=kpT@nKd>{Y- literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/seed/blue_potato_seed.png b/src/main/resources/assets/sextiarysector/textures/items/seed/blue_potato_seed.png new file mode 100644 index 0000000000000000000000000000000000000000..414bc0037d3c7f7701a3579287fe12ec648a8694 GIT binary patch literal 522 zcmV+l0`>igP)WFU8GbZ8()Nlj2>E@cM*00C}EL_t(o!((6=>41?4 zHUDX8C(~dKf&UB)3=9jJxbYhB_{A^0@^3$)2H=FHe^Bfm@DN}jS0f>x6AOk;2qe^f zrO2X!XqF)!0UjQkz~LvuiO@ zKd$^wdK4&GFfhD*z`*eJ9mMiKKOpq~e{jobn+6`9gZTK{2Z*nKeS?ToU^!_Hfcg06 z7lasvmSc4QdMySo%P0F0RpJqw|A$_CfK;CinGj&4cTZ^0g}^8P0O0PAYIXWFU8GbZ8()Nlj2>E@cM*00B}-L_t(o!|j)`O2beT zhQBKn3iU0z-#w7UN2qHTXD2O!lM-}vaZ+#+B&!#6>1z}n9CUK16dZ&|#VT>>jY&-6 zZIi|XJyRez`8fYMKYs#$y@bITf04|kDl6avob9(VU-0nwmU;i_IV#|h`yOHcx&n=P zAN;9v)2fdG>w7P`K%3o0%@xpYFr9sT`zyNx!qors?tq?s-2e62f%wdQ-)y!*h+>y8 zt2&)8m{NW*3h2&vk0+^}Yp_y>fJ1j}9CV)M``ijhDFJA=ucu%Dr<^R1QexXS!{Nyk zz74DZaChDW#*52>?{EV6{Z5mf>)~E}TO z0;ADsB3#^*lm$w)BFm=XTLX`)+lI043(0~od?HqhRUn>X+Rs9SvmkukH_H9`e-X{v kS#1;$W&a6PPJ#dW1f*1YIGSoL4*&oF07*qoM6N<$f`j7G0{{R3 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/seed/iron_turnip_seed.png b/src/main/resources/assets/sextiarysector/textures/items/seed/iron_turnip_seed.png new file mode 100644 index 0000000000000000000000000000000000000000..99155d310567000b862c53eab6fa51ed8d329717 GIT binary patch literal 517 zcmV+g0{Z=lP)WFU8GbZ8()Nlj2>E@cM*00C)9L_t(o!|j*9PJ>Vs z#(&q~aASvd=_~M1rin~Vm`v`_q0vFZ*u=@%q~SGq4w&uW;$U)ZK}fC>O+cx)^p7Qa z)&rcJ-}ikNfWKbC;u>?vnP;a=zyLhmU2J^7^UKG^{_9&6;6qqcX8$??r|peDZEjoL zA#ip3zSE%VOQ+)m$~4$&Uw8k>dO+CbzpV#K?d$pPjtA;`agb87TCLXorrftCFdPoavJ9ov8nIFetu>3qf;3GJ zdk)NIGXN%&3FGmYUav=<=PZ{?!Z5V*%$Tz;)fmUKB<6zJK`d zfh0-39lqC-u>KY+^K6UPHvirG9@uuX&JYmC{u4Sm0{`_1RSbz?xSnM500000NkvXX Hu0mjfheha; literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/ninja_gear_shaft.png b/src/main/resources/assets/sextiarysector/textures/models/ninja_gear_shaft.png new file mode 100644 index 0000000000000000000000000000000000000000..13ea94980215d2a91c467bea74ea1e6a78408a4a GIT binary patch literal 1608 zcmV-O2DkZ%P)VGd000McNliru-vJB=1OuylS5yE11=UGJ zK~!ko?U+Gm9M>7ge{W{?y_H6*-5FOQ+RZxaU{m{GFm|zpP9d}bQiZED%IwPJ}^+OA%-JG(QlhuIxlwl$Kx za?wG57?}5c@6F8nzxRFL`;VZ9zrEfumIIb8upIc&UmZajKK$AMP`?ZQ3-Iv|)BEoL z6B83=knz*g)7$f~K3>x!c7;dnwudgTfnM{UECX?8tlmtPL_+8f}o6Ta3K?uQ#6DN!@1}P=B zZKvi0$Alrmj)T6w-UXo5jpHCnO+_LO17jSbPJPf7KXT*@0^4 z9l{txE|&w~{Q2_$oH=ubdcDq#8#gwzl~OD%Em0^G7#ka7W@aY!z1B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=cxK}gVTN$5&+TYxT*LJ$Rt{|ikL z_8{yHyhz(=ki0GRFQrU@Qtr1yt3yw{J6~3w=r|5oP%4#F-QI)SgW8Ly&hFJa80UX) z3Z9Yt%(x>yh~E&GfAl*(xgkY+U5Zz>tZ3Ak6DLkcO#UOcZ!{VyW$tu36bc2kS5tj~ zZQCk;IG^1+7(7GyMRZgG^4q^L{u{D|mxD^7!o7R<_T=^el}d$`kaRq%cX*}%eBNGQ zK6xp%*k0V;bzSQ9I^Qb4#FDi{5CkK82l2lSz@xpuun!o;?T3kPNP%6~9oakV%f9T( hzU<4s?92bJ{2Lzi!r~Sbr2+r|002ovPDHLkV1fo}Tt5H+ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/orichalcum_shaft.png b/src/main/resources/assets/sextiarysector/textures/models/orichalcum_shaft.png new file mode 100644 index 0000000000000000000000000000000000000000..78febe34a9ae1a54a9ec4ce390b4ebc8a72b32ca GIT binary patch literal 1848 zcmV-82gmq{P)VGd000McNliru-vJ5%7!Pg-B5?o!2E|E4 zK~!ko?U+w&TUiyxfA`+^$H}V`+iB3$QA&~}v3&`#T^LI@B72~otNLh5FOR82J? zSg`=a4mPlw4HBx@RE(-FVPH2BEm@IDiK0xTG&5~znv}TmH10UgtL^vaUKY=O&7Y17 z*i=a5NS1u>xzF6?bB};y9+!Xb=PegM))aQH0|-bjmBGgi?y>>FM48F! zCK5g4K8_tbMxjvP_U+pMT)A?Exw$!x965q9hHN$qz}2f)0XTQ=9F?tvU?DG-)D4ml(%l(NcZaXI#{*tUmME9Yc%FykzZ4o6k^=i{7rQEhTCK+X{5%!gP4^m&MoYsSa54atN~QFCA#5@~ zKcDt}Utb?_98)frnVOnnb90letu1P`T6Y}aUcB;r0JVPhJqj!!>_%pb#Uh2-X1dqk z-`|p;SCS7fJUoo=`?#)4h2)xh_wM1kE}2Y*LZQIe*ci=b6W4XQbLS4O>vji#-Y83q z-kXq;&_o1)*{TNJsEy+|lu9Lj{q^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main/resources/assets/sextiarysector/textures/models/stone_gear_shaft.png new file mode 100644 index 0000000000000000000000000000000000000000..001584e0d758f16e23e9125fa5ef4daac703d4b2 GIT binary patch literal 1528 zcmVVGd000McNliru-vJB=0uS_%y!ikC1%*jO zK~!ko?U+x96IUF^KQo!Um)+U8$+YXA#7G21FM=rOvZqo?wWan_DD+~zXrb6s1>2L@ zTVbJR@zVAp^yo=S* z;g2y*vtxWi1OOa3aDb(yr6~Ou78cmCV+WZ`X8n;`gV*q|tQHt1ea8L!_xUQlAJ6ls z*Xy{h%kZkz?G*2tfDt{3^_)xd*1WBHEk;^E75&2 znIxG^Mr}d}T-Rl_W~EXowAL7g!QsP)wbmLT1c^i|#06e7`_pPy&Xo;@rtFO$#b866#E-@bh)rQ!(?QX+)F zG!vkGvLFj#s%)C&Q&ZIjJrBQbMbmzOVJ2Ei9k;P0vb^{*r)*=#mQ zW6Q$#eV#sjN-me<*s){G&dyRUm$7X-UIVUQzixzL7gmCn!1sLy1_tmvk8-(8xm*T7N=dC&izh%Sg;EOJ zwj;JWrOnz((CS(7rIh4yIh3dM@%Zs$p0z825Q3{?Ur=dhgb)JTwkefLR4SE71oQbkLWp<*!ulT`f6RBviY^Y(@2 zV62of);w)`0;H7GQ;JMbQi=DS z(@cpeT-S{?PjANy^bxE76Rg+k*tY%JGU)q$^p6k_d4SN)zlyLl-oAZ%Q_OPVGd000McNliru-vJBH$R zK~!ko?U+x98`mAjKQkJ=(e9JH($unJDKc{KzsrKL!4`WeC6u(pg;FTAhcp!8ls1Jz z3rVhRE`dNVJ=D0QX$~p$(n}AagazN$u(ny;dKa%MG^LiM~c-Qqx z+DN8**e?uv@BQA>yx*Vq`@QdI^zi48&Z>Mm!{e4sX>Xp_fA*J*($hn1BT z4jeeZ($W$uD=W0y?Y{Eu!1(HqKUMdhJSLS&LCa=eI)m%FeEQK@wJ)9F&0l@7g>nk~ zE}$!5tOl5xnj)Lca`vyk2f*sI0r>Ta@1pDaK>4-|aPP@uN_+FTt{eZ>TlV0UN`c?@ zF^n!~I%CF-8#j12a|GY_aa|YB^O)M;-9hr94Y1NVsr~z=({pJEDJ9u#R%;;)eUnL0gfFzhLjR1CHwd9r`2j9rKDIa4oU<% zx~8%AFg=O^q?F`xxj315p2yRtPeb98yYQd+|C!%Nn&fi1(2Isa5Cq)6f1g63!0FSc zSz216Uaupi92fx_KsK9=!#I&Bsf761r>fQg9-eBY;DuT!tr0WeJy+wPyxjY!cb0-}%{3Mwjvqro&y z3WWmJ0g;J53k{ zn${&uSL1{las4*P&^wCCFS1zVfdFto?IE)_9PfG?=PN*G&pvwN z;T8FLCAWzn2=F|Q?@j)kTC+y^K$&DR$>n>OX*QdfrrB5iQbHxhZ@$z30SG>M!yZSx zS1Og5)b#HDTONV+^>rpDCKw>sqGSqi?b@|5=73M$P(Zu)yp%I9gdieEQC5%0&D7Ks zKrBxr5}PVS&p2vWM;q)AL}VuNRzGs%I1ba((^!@jlbu22sV^7!f5UMcW>-I_R4T<^ zgsRml2M->k)oM{J7O7M!96o$FzNMB*C1&-{<9-2=u1+qNOe(BvkQ$%J$DaII;YeaX{~H-KrHxG5-P z3f#VZdnj^KC=^)e5cm6$ryXwqAp|qQTd~ImksHTxsMTtG%X*7>F^}hYeaX|y;R0jC z#&3eI>msFmVHpg9ApRl*#2g@^^UotHjaRN**%5l~Vi&vE#V&TS!|-1j4HLOG{4})y O0000 Date: Sun, 18 Jan 2015 00:13:27 +0900 Subject: [PATCH 61/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E6=9E=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・枡を追加 ・NEIに画面で液体のツールチップを表示 ・キノコを追加 --- .../java/shift/sextiarysector/SSBlocks.java | 22 +- .../shift/sextiarysector/SSGuiHandler.java | 9 + .../java/shift/sextiarysector/SSItems.java | 5 + .../shift/sextiarysector/SSOreDictionary.java | 2 + .../shift/sextiarysector/SSPlayerTabs.java | 5 + .../{BlcokPaddy.java => BlockPaddy.java} | 4 +- .../sextiarysector/block/BlockSquare.java | 41 ++ .../shift/sextiarysector/block/BlockWood.java | 164 ++++++ .../container/ContainerRucksack.java | 132 +++++ .../container/InventoryRucksack.java | 188 +++++++ .../container/SlotRucksack.java | 23 + .../shift/sextiarysector/gui/GuiRucksack.java | 73 +++ .../gui/tab/InventoryTabEquipment.java | 8 +- .../sextiarysector/item/ItemRucksack.java | 56 +++ .../sextiarysector/item/ItemShiftHat.java | 1 + .../sextiarysector/item/ItemWateringCan.java | 20 +- .../nei/SimpleFluidRecipeHandler.java | 17 + .../nei/TemplateSSRecipeHandler.java | 13 + .../sextiarysector/player/EquipmentType.java | 8 +- .../sextiarysector/player/StaminaStats.java | 2 +- .../sextiarysector/proxy/ClientProxy.java | 13 + .../sextiarysector/proxy/CommonProxy.java | 2 + .../sextiarysector/recipe/RecipesCore.java | 6 + .../renderer/block/RendererSquare.java | 183 +++++++ .../renderer/block/RendererWood.java | 93 ++++ .../renderer/model/ModelSquare.java | 78 +++ .../tileentity/TileEntitySquare.java | 144 ++++++ .../tileentity/TileEntityWood.java | 5 + .../assets/sextiarysector/lang/en_US.lang | 7 + .../assets/sextiarysector/lang/ja_JP.lang | 472 ++++++++++++++++++ .../sextiarysector/textures/blocks/wood.png | Bin 0 -> 807 bytes .../textures/blocks/wood_top.png | Bin 0 -> 634 bytes .../textures/blocks/wood_top2.png | Bin 0 -> 678 bytes .../sextiarysector/textures/guis/rucksack.png | Bin 0 -> 1238 bytes .../textures/items/rucksack.png | Bin 0 -> 545 bytes .../sextiarysector/textures/models/square.png | Bin 0 -> 1301 bytes .../textures/models/square_under.png | Bin 0 -> 1318 bytes 37 files changed, 1778 insertions(+), 18 deletions(-) rename src/main/java/shift/sextiarysector/block/{BlcokPaddy.java => BlockPaddy.java} (98%) create mode 100644 src/main/java/shift/sextiarysector/block/BlockSquare.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockWood.java create mode 100644 src/main/java/shift/sextiarysector/container/ContainerRucksack.java create mode 100644 src/main/java/shift/sextiarysector/container/InventoryRucksack.java create mode 100644 src/main/java/shift/sextiarysector/container/SlotRucksack.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiRucksack.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemRucksack.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererWood.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelSquare.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityWood.java create mode 100644 src/main/resources/assets/sextiarysector/lang/ja_JP.lang create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/wood.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/wood_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/wood_top2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/rucksack.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/rucksack.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/square.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/square_under.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 04b8dc4..32241e5 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -5,7 +5,6 @@ import net.minecraft.init.Blocks; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.season.Season; -import shift.sextiarysector.block.BlcokPaddy; import shift.sextiarysector.block.BlockBlueFire; import shift.sextiarysector.block.BlockChunkLoader; import shift.sextiarysector.block.BlockFan; @@ -20,6 +19,7 @@ import shift.sextiarysector.block.BlockLargeOre; import shift.sextiarysector.block.BlockMagicFurnace; import shift.sextiarysector.block.BlockMonitor; +import shift.sextiarysector.block.BlockPaddy; import shift.sextiarysector.block.BlockPowerStone; import shift.sextiarysector.block.BlockSSChest; import shift.sextiarysector.block.BlockSSCrop; @@ -35,12 +35,13 @@ import shift.sextiarysector.block.BlockSimpleMachine; import shift.sextiarysector.block.BlockSmallWaterwheel; import shift.sextiarysector.block.BlockSmallWindmill; +import shift.sextiarysector.block.BlockSquare; import shift.sextiarysector.block.BlockWindmill; +import shift.sextiarysector.block.BlockWood; import shift.sextiarysector.block.BlockWoodHopper; import shift.sextiarysector.item.ItemBlockCrop; import shift.sextiarysector.item.ItemBlockDirection; import shift.sextiarysector.item.ItemBlockFluidCrafter; -import shift.sextiarysector.item.ItemBlockFood; import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMonitor; import shift.sextiarysector.tileentity.TileEntityFan; @@ -61,7 +62,9 @@ import shift.sextiarysector.tileentity.TileEntitySimpleMachine; import shift.sextiarysector.tileentity.TileEntitySmallWaterwheel; import shift.sextiarysector.tileentity.TileEntitySmallWindmill; +import shift.sextiarysector.tileentity.TileEntitySquare; import shift.sextiarysector.tileentity.TileEntityWindmill; +import shift.sextiarysector.tileentity.TileEntityWood; import cpw.mods.fml.common.registry.GameRegistry; public class SSBlocks { @@ -84,6 +87,8 @@ public class SSBlocks { public static Block woodHopper; + public static Block square; + public static Block blueFire; //液体 @@ -168,6 +173,7 @@ public class SSBlocks { //農業 public static Block farmland; public static Block paddy; + public static Block wood; public static Block turnip; public static Block cucumber; @@ -229,6 +235,10 @@ public static void initBlicks(){ woodHopper = new BlockWoodHopper().setBlockName("ss.wood_hopper").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodHopper, "WoodHopper"); + square = new BlockSquare().setBlockName("ss.square"); + GameRegistry.registerBlock(square, ItemBlockDirection.class, "Square"); + GameRegistry.registerTileEntity(TileEntitySquare.class, "Square"); + woodGrate = (new BlockSSPane(ID+":wood_grate", ID+":wood_grate", Material.wood, false,0)).setHardness(0.5F).setBlockName("ss.wood_grate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodGrate, "WoodGrate"); @@ -407,10 +417,14 @@ public static void initBlicks(){ GameRegistry.registerBlock(farmland,"Farmland"); GameRegistry.registerTileEntity(TileEntityFarmland.class, "SSFarmland"); - paddy = new BlcokPaddy().setBlockName("ss.paddy").setBlockTextureName("farmland").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); - GameRegistry.registerBlock(paddy,ItemBlockFood.class, "Paddy"); + paddy = new BlockPaddy().setBlockName("ss.paddy").setBlockTextureName("farmland").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); + GameRegistry.registerBlock(paddy, "Paddy"); GameRegistry.registerTileEntity(TileEntityPaddy.class, "SSPaddy"); + wood = new BlockWood().setBlockName("ss.wood").setBlockTextureName("sextiarysector:wood").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); + GameRegistry.registerBlock(wood, "Wood"); + GameRegistry.registerTileEntity(TileEntityWood.class, "SSWood"); + //野菜 GameRegistry.registerTileEntity(TileEntitySSCrop.class, "SSCrop"); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 9afeb1d..2e3e624 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -10,6 +10,7 @@ import shift.sextiarysector.container.ContainerLargeFurnace; import shift.sextiarysector.container.ContainerMagicFurnace; import shift.sextiarysector.container.ContainerPlayerNext; +import shift.sextiarysector.container.ContainerRucksack; import shift.sextiarysector.container.ContainerSimpleMachine; import shift.sextiarysector.container.ContainerTabWorkbench; import shift.sextiarysector.gui.GuiCraftFurnace; @@ -23,10 +24,12 @@ import shift.sextiarysector.gui.GuiMillstone; import shift.sextiarysector.gui.GuiPulverizer; import shift.sextiarysector.gui.GuiRollingMachine; +import shift.sextiarysector.gui.GuiRucksack; import shift.sextiarysector.gui.GuiSawmill; import shift.sextiarysector.gui.GuiTabCrafting; import shift.sextiarysector.gui.GuiTimeMachine; import shift.sextiarysector.gui.IServerGuiElement; +import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.tileentity.TileEntityCraftFurnace; import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; import shift.sextiarysector.tileentity.TileEntityGFTank; @@ -79,6 +82,9 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x case 200 : return new ContainerPlayerNext(player.inventory, player); case 201 : return new ContainerTabWorkbench(player.inventory, world, x, y, z); + case 205 : return new ContainerRucksack(player.inventory); + case 206 : return new ContainerRucksack(player.inventory, EntityPlayerManager.getEquipmentStats(player).inventory); + } /* @@ -142,6 +148,9 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x case 200:return new GuiInventoryNext(player); case 201:return new GuiTabCrafting(player.inventory, world, x, y, z); + case 205:return new GuiRucksack(player.inventory); + case 206:return new GuiRucksack(player.inventory, EntityPlayerManager.getEquipmentStats(player).inventory); + } /* diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 230bc6f..6b4f870 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -18,6 +18,7 @@ import shift.sextiarysector.item.ItemKnife; import shift.sextiarysector.item.ItemLavaBottle; import shift.sextiarysector.item.ItemMineboat; +import shift.sextiarysector.item.ItemRucksack; import shift.sextiarysector.item.ItemScoop; import shift.sextiarysector.item.ItemSeasonStone; import shift.sextiarysector.item.ItemShiftHat; @@ -188,6 +189,7 @@ public class SSItems { //装備 public static Item shiftHat; + public static Item rucksack; public static Item gfContactLenses; public static void initItems(){ @@ -484,6 +486,9 @@ public static void initItems(){ shiftHat = new ItemShiftHat().setUnlocalizedName("ss.shift_hat").setTextureName("sextiarysector:shift_hat"); GameRegistry.registerItem(shiftHat, "ShiftHat"); + rucksack = new ItemRucksack().setUnlocalizedName("ss.rucksack").setTextureName("sextiarysector:rucksack"); + GameRegistry.registerItem(rucksack, "Rucksack"); + gfContactLenses = new ItemGFContactLenses().setUnlocalizedName("ss.gf_contact_lenses").setTextureName("sextiarysector:face/gf_contact_lenses"); GameRegistry.registerItem(gfContactLenses, "GFContactLenses"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index b357d98..4966af5 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -38,12 +38,14 @@ public static void init(){ OreDictionary.registerOre("plateWood", SSBlocks.woodAcaciaPlate); OreDictionary.registerOre("plateWood", SSBlocks.woodBigOakPlate); + /* OreDictionary.registerOre("plankWood", SSBlocks.woodOakPlate); OreDictionary.registerOre("plankWood", SSBlocks.woodBirchPlate); OreDictionary.registerOre("plankWood", SSBlocks.woodSprucePlate); OreDictionary.registerOre("plankWood", SSBlocks.woodJunglePlate); OreDictionary.registerOre("plankWood", SSBlocks.woodAcaciaPlate); OreDictionary.registerOre("plankWood", SSBlocks.woodBigOakPlate); + */ OreDictionary.registerOre("gearWood", SSItems.woodGear); OreDictionary.registerOre("gearStone", SSItems.stoneGear); diff --git a/src/main/java/shift/sextiarysector/SSPlayerTabs.java b/src/main/java/shift/sextiarysector/SSPlayerTabs.java index 6edbd31..88549b7 100644 --- a/src/main/java/shift/sextiarysector/SSPlayerTabs.java +++ b/src/main/java/shift/sextiarysector/SSPlayerTabs.java @@ -14,6 +14,8 @@ public class SSPlayerTabs { public static AbstractTab craft; + public static AbstractTab rucksack; + public static AbstractTab creeperShop; public static void initRecipes(){ @@ -24,6 +26,9 @@ public static void initRecipes(){ craft = new InventoryTabEquipment(EquipmentType.Unit, new ItemStack(SSItems.craftUnit)); TabManager.registerTab(craft); + rucksack = new InventoryTabEquipment(EquipmentType.Bag, new ItemStack(SSItems.rucksack)); + TabManager.registerTab(rucksack); + creeperShop = new InventoryTabEquipment(EquipmentType.Ring, new ItemStack(SSItems.creeperRing)); TabManager.registerTab(creeperShop); ((ItemShopRing) SSItems.creeperRing).setTab(creeperShop); diff --git a/src/main/java/shift/sextiarysector/block/BlcokPaddy.java b/src/main/java/shift/sextiarysector/block/BlockPaddy.java similarity index 98% rename from src/main/java/shift/sextiarysector/block/BlcokPaddy.java rename to src/main/java/shift/sextiarysector/block/BlockPaddy.java index fb1d807..6e2db46 100644 --- a/src/main/java/shift/sextiarysector/block/BlcokPaddy.java +++ b/src/main/java/shift/sextiarysector/block/BlockPaddy.java @@ -18,9 +18,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlcokPaddy extends BlockContainer{ +public class BlockPaddy extends BlockContainer{ - public BlcokPaddy() { + public BlockPaddy() { super(Material.grass); this.setLightOpacity(255); this.setStepSound(soundTypeGrass); diff --git a/src/main/java/shift/sextiarysector/block/BlockSquare.java b/src/main/java/shift/sextiarysector/block/BlockSquare.java new file mode 100644 index 0000000..8df7ab4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockSquare.java @@ -0,0 +1,41 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.tileentity.TileEntitySquare; + +public class BlockSquare extends BlockDirection{ + + + public BlockSquare() { + super(Material.wood); + this.setHardness(0.8F); + this.setBlockBounds(0.0625f, 0.0f, 0.0625f, 0.9375f, 0.875f, 0.9375f); + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntitySquare(); + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.squareType; + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockWood.java b/src/main/java/shift/sextiarysector/block/BlockWood.java new file mode 100644 index 0000000..b1c07b3 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockWood.java @@ -0,0 +1,164 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.module.FertilizerManager; +import shift.sextiarysector.tileentity.TileEntityFarmland; +import shift.sextiarysector.tileentity.TileEntityWood; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockWood extends BlockContainer{ + + private IIcon blockTopIcon; + private IIcon blockTop2Icon; + + public BlockWood() { + super(Material.wood); + this.setLightOpacity(255); + this.setStepSound(soundTypeGrass); + this.setBlockBounds(2.0f/16.0f, 0.0f, 2.0f/16.0f, 14.0f/16.0f, 15.0f/16.0f, 14.0f/16.0f); + this.setHardness(1.2f); + this.setStepSound(soundTypeWood); + this.useNeighborBrightness = true; + } + + @Override + public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6,float par7, float par8, float par9) { + + if(FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem())!=null && par1World.isAirBlock(x, y+1, z)){ + + return this.setFertilizer(par1World, x, y, z, par5EntityPlayer); + + } + + if(par5EntityPlayer.getCurrentEquippedItem()!=null){ + + FluidStack f = FluidContainerRegistry.getFluidForFilledItem(par5EntityPlayer.getCurrentEquippedItem()); + + if(f!=null){ + + TileEntityWood t = (TileEntityWood) par1World.getTileEntity(x, y, z); + + if(t.fill(ForgeDirection.getOrientation(par6), f, true)>0){ + + ItemStack item = par5EntityPlayer.getCurrentEquippedItem().getItem().getContainerItem(par5EntityPlayer.getCurrentEquippedItem()); + + if (!par5EntityPlayer.capabilities.isCreativeMode && !par1World.isRemote) + { + --par5EntityPlayer.getCurrentEquippedItem().stackSize; + + if(item!=null){ + + if(par5EntityPlayer.getCurrentEquippedItem().stackSize==0){ + + par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, item); + + + }else if (!par5EntityPlayer.inventory.addItemStackToInventory(item)) + { + par5EntityPlayer.dropPlayerItemWithRandomChoice(item,false); + } + + + } + + } + + return true; + + } + + }else{ + return false; + } + + } + + return false; + } + + private boolean setFertilizer(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer){ + + TileEntityWood t = (TileEntityWood) par1World.getTileEntity(x, y, z); + + if(t.getFertilizer()!=null){ + return false; + } + + t.setFertilizer(FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem()).getFertilizer()); + + if (!par5EntityPlayer.capabilities.isCreativeMode && !par1World.isRemote) + { + --par5EntityPlayer.getCurrentEquippedItem().stackSize; + } + + par1World.markBlockForUpdate(x, y, z); + + return true; + + } + + public boolean addWater(World par1World, int x, int y, int z){ + + TileEntityFarmland t = (TileEntityFarmland) par1World.getTileEntity(x, y, z); + + return t.fill(ForgeDirection.UP, new FluidStack(FluidRegistry.WATER, 1000), true) > 0; + + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityWood(); + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(this.getTextureName()); + this.blockTopIcon = p_149651_1_.registerIcon(this.getTextureName()+"_top"); + this.blockTop2Icon = p_149651_1_.registerIcon(this.getTextureName()+"_top2"); + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + if(p_149691_1_!=0 && p_149691_1_!=1){ + return this.blockIcon; + } + + if(p_149691_2_==0){ + return this.blockTopIcon; + }else{ + return this.blockTop2Icon; + } + + } + + public boolean isOpaqueCube() + { + return false; + } + + public boolean renderAsNormalBlock() + { + return false; + } + + public int getRenderType() + { + return SextiarySector.proxy.woodType; + } + +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerRucksack.java b/src/main/java/shift/sextiarysector/container/ContainerRucksack.java new file mode 100644 index 0000000..1edcca0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerRucksack.java @@ -0,0 +1,132 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSItems; + +public class ContainerRucksack extends Container +{ + private InventoryRucksack inventory; + + public ContainerRucksack(InventoryPlayer inventoryPlayer) + { + inventory = new InventoryRucksack(inventoryPlayer); + inventory.openInventory(); + + int i =0; + + for (int j = 0; j < 3; ++j) + { + for (int k = 0; k < 9; ++k) + { + this.addSlotToContainer(new Slot(inventory, k + j * 9, 8 + k * 18, 17 + j * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new SlotRucksack(inventoryPlayer, i, 8 + i * 18, 142)); + } + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new SlotRucksack(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + } + + public ContainerRucksack(InventoryPlayer inventoryPlayer, InventoryPlayerNext inventoryPlayerN) + { + inventory = new InventoryRucksack(inventoryPlayerN); + inventory.openInventory(); + + int i =0; + + for (int j = 0; j < 3; ++j) + { + for (int k = 0; k < 9; ++k) + { + this.addSlotToContainer(new Slot(inventory, k + j * 9, 8 + k * 18, 17 + j * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new SlotRucksack(inventoryPlayer, i, 8 + i * 18, 142)); + } + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new SlotRucksack(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + } + + /* + Containerが開いてられるか + */ + @Override + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return true; + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot)this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ < this.inventory.getSizeInventory()) + { + if (!this.mergeItemStack(itemstack1, this.inventory.getSizeInventory(), this.inventorySlots.size(), true)) + { + return null; + } + } + //シフトクリック時に、このアイテムだったら動かさない。 + else if(slot.getStack() != null && slot.getStack().getItem() == SSItems.rucksack) + { + return null; + } + else if (!this.mergeItemStack(itemstack1, 0, this.inventory.getSizeInventory(), false)) + { + return null; + } + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack)null); + } + else + { + slot.onSlotChanged(); + } + } + + return itemstack; + } + + /* + Containerを閉じるときに呼ばれる + */ + @Override + public void onContainerClosed(EntityPlayer p_75134_1_) + { + super.onContainerClosed(p_75134_1_); + this.inventory.closeInventory(); + } +} diff --git a/src/main/java/shift/sextiarysector/container/InventoryRucksack.java b/src/main/java/shift/sextiarysector/container/InventoryRucksack.java new file mode 100644 index 0000000..26b5aad --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/InventoryRucksack.java @@ -0,0 +1,188 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import shift.sextiarysector.player.EquipmentType; + +public class InventoryRucksack implements IInventory +{ + private IInventory inventoryPlayer; + private ItemStack currentItem; + private ItemStack[] items; + + public InventoryRucksack(InventoryPlayer inventory) + { + inventoryPlayer = inventory; + currentItem = ((InventoryPlayer)inventoryPlayer).getCurrentItem(); + + //InventorySize + items = new ItemStack[54]; + } + + public InventoryRucksack(InventoryPlayerNext inventory) + { + inventoryPlayer = inventory; + currentItem = inventoryPlayer.getStackInSlot(EquipmentType.Bag.getSlot()[0]); + + //InventorySize + items = new ItemStack[54]; + } + + @Override + public int getSizeInventory() + { + return items.length; + } + + @Override + public ItemStack getStackInSlot(int slot) + { + return items[slot]; + } + + @Override + public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) + { + if (this.items[p_70298_1_] != null) + { + ItemStack itemstack; + + if (this.items[p_70298_1_].stackSize <= p_70298_2_) + { + itemstack = this.items[p_70298_1_]; + this.items[p_70298_1_] = null; + this.markDirty(); + return itemstack; + } + else + { + itemstack = this.items[p_70298_1_].splitStack(p_70298_2_); + + if (this.items[p_70298_1_].stackSize == 0) + { + this.items[p_70298_1_] = null; + } + + this.markDirty(); + return itemstack; + } + } + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(int p_70304_1_) + { + if (this.items[p_70304_1_] != null) + { + ItemStack itemstack = this.items[p_70304_1_]; + this.items[p_70304_1_] = null; + return itemstack; + } + return null; + } + + @Override + public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) + { + this.items[p_70299_1_] = p_70299_2_; + + if (p_70299_2_ != null && p_70299_2_.stackSize > this.getInventoryStackLimit()) + { + p_70299_2_.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + @Override + public String getInventoryName() + { + return "InventoryItem"; + } + + @Override + public boolean hasCustomInventoryName() + { + return false; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + @Override + public void markDirty() {} + + @Override + public boolean isUseableByPlayer(EntityPlayer p_70300_1_) + { + return true; + } + + /* + Containerが開かれたタイミングでItemStackの持っているNBTからアイテムを読み込んでいる + */ + @Override + public void openInventory() + { + if(!currentItem.hasTagCompound()) + { + currentItem.setTagCompound(new NBTTagCompound()); + currentItem.getTagCompound().setTag("Items", new NBTTagList()); + } + NBTTagList tags = (NBTTagList)currentItem.getTagCompound().getTag("Items"); + + for(int i = 0; i < tags.tagCount(); i++) + { + NBTTagCompound tagCompound = tags.getCompoundTagAt(i); + int slot = tagCompound.getByte("Slot"); + if(slot >= 0 && slot < items.length) + { + items[slot] = ItemStack.loadItemStackFromNBT(tagCompound); + } + } + } + + /* + Containerを閉じるときに保存 + */ + @Override + public void closeInventory() + { + NBTTagList tagList = new NBTTagList(); + for(int i = 0; i < items.length; i++) + { + if(items[i] != null) + { + NBTTagCompound compound = new NBTTagCompound(); + compound.setByte("Slot", (byte)i); + items[i].writeToNBT(compound); + tagList.appendTag(compound); + } + } + ItemStack result = new ItemStack(currentItem.getItem(), 1); + result.setTagCompound(new NBTTagCompound()); + result.getTagCompound().setTag("Items", tagList); + + //ItemStackをセットする。NBTは右クリック等のタイミングでしか保存されないため再セットで保存している。 + if(inventoryPlayer instanceof InventoryPlayer){ + ((InventoryPlayer)inventoryPlayer).mainInventory[((InventoryPlayer)inventoryPlayer).currentItem] = result; + }else if(inventoryPlayer instanceof InventoryPlayerNext){ + + } + + } + + @Override + public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) + { + return true; + } +} diff --git a/src/main/java/shift/sextiarysector/container/SlotRucksack.java b/src/main/java/shift/sextiarysector/container/SlotRucksack.java new file mode 100644 index 0000000..1aeea8f --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/SlotRucksack.java @@ -0,0 +1,23 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import shift.sextiarysector.SSItems; + +public class SlotRucksack extends Slot +{ + public SlotRucksack(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_) + { + super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_); + } + + /* + このアイテムは動かせない、つかめないようにする。 + */ + @Override + public boolean canTakeStack(EntityPlayer p_82869_1_) + { + return !(getHasStack() && getStack().getItem() == SSItems.rucksack); + } +} diff --git a/src/main/java/shift/sextiarysector/gui/GuiRucksack.java b/src/main/java/shift/sextiarysector/gui/GuiRucksack.java new file mode 100644 index 0000000..d6d16e3 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiRucksack.java @@ -0,0 +1,73 @@ +package shift.sextiarysector.gui; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SSPlayerTabs; +import shift.sextiarysector.container.ContainerRucksack; +import shift.sextiarysector.container.InventoryPlayerNext; +import shift.sextiarysector.gui.tab.TabManager; + +public class GuiRucksack extends GuiContainer +{ + private static final ResourceLocation texture = new ResourceLocation("sextiarysector:textures/guis/rucksack.png"); + private boolean tab = false; + + public GuiRucksack(InventoryPlayer inventoryPlayer) + { + super(new ContainerRucksack(inventoryPlayer)); + //this.ySize = 222; + } + + public GuiRucksack(InventoryPlayer inventoryPlayer, InventoryPlayerNext inventoryPlayerN) + { + super(new ContainerRucksack(inventoryPlayer, inventoryPlayerN)); + tab = true; + //this.ySize = 222; + } + + public void initGui() + { + + this.buttonList.clear(); + + super.initGui(); + + if(!tab)return; + + int cornerX = this.guiLeft; + + int cornerY = this.guiTop; + + TabManager.updateTabValues(cornerX, cornerY,this.buttonList, SSPlayerTabs.rucksack,false); + + } + + /* + ChestとかInventoryとか文字を描画する + */ + @Override + protected void drawGuiContainerForegroundLayer(int x, int p_146979_2_) + { + //描画する文字, X, Y, 色 + this.fontRendererObj.drawString(I18n.format("gui.ss.rucksack"), this.xSize / 2 - this.fontRendererObj.getStringWidth(I18n.format("gui.rucksack")) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + /* + 背景の描画 + */ + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(texture); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java b/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java index 7724d6c..7cfe02b 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java +++ b/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java @@ -11,18 +11,14 @@ public class InventoryTabEquipment extends AbstractTab { private static Minecraft mc = FMLClientHandler.instance().getClient(); - EquipmentType type; - ItemStack item; + private EquipmentType type; + private ItemStack item; public InventoryTabEquipment(EquipmentType type,ItemStack item){ this.type = type; this.item = item; } - private boolean hasItem(){ - return false; - } - private ItemStack getSlotItem(){ for(int i:type.getSlot()){ diff --git a/src/main/java/shift/sextiarysector/item/ItemRucksack.java b/src/main/java/shift/sextiarysector/item/ItemRucksack.java new file mode 100644 index 0000000..11e9c9c --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemRucksack.java @@ -0,0 +1,56 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.IEquipment; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.packet.PacketGuiId; +import shift.sextiarysector.packet.SSPacketHandler; +import shift.sextiarysector.player.EquipmentType; + +public class ItemRucksack extends Item implements IEquipment, ISSEquipment{ + + public ItemRucksack() + { + super(); + this.setMaxStackSize(1); + this.setCreativeTab(SextiarySectorAPI.TabSSPlayer); + } + + @Override + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) + { + player.openGui(SextiarySector.instance, 205, world, (int)player.posX, (int)player.posY, (int)player.posZ); + return itemStack; + } + + @Override + public boolean canTakeStack(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + return equipment.ordinal() == EquipmentType.Bag.ordinal(); + } + + @Override + public boolean isItemValid(EquipmentType equipment, ItemStack stack) { + return equipment.ordinal() == EquipmentType.Bag.ordinal(); + } + + @Override + public boolean shouldAddToList(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + return true; + } + + @Override + public void onTabClicked(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + SSPacketHandler.INSTANCE.sendToServer(new PacketGuiId(206)); + + } + + @Override + public String getTabName(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + return this.getUnlocalizedName() ; + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemShiftHat.java b/src/main/java/shift/sextiarysector/item/ItemShiftHat.java index 1e74174..7567682 100644 --- a/src/main/java/shift/sextiarysector/item/ItemShiftHat.java +++ b/src/main/java/shift/sextiarysector/item/ItemShiftHat.java @@ -22,6 +22,7 @@ public String getArmorTexture(ItemStack stack, Entity entity, int slot, String t return "sextiarysector:textures/models/shift_hat.png"; } + @SideOnly(Side.CLIENT) public static ModelShiftHat model = new ModelShiftHat(); @SideOnly(Side.CLIENT) diff --git a/src/main/java/shift/sextiarysector/item/ItemWateringCan.java b/src/main/java/shift/sextiarysector/item/ItemWateringCan.java index 93aaa41..27fb843 100644 --- a/src/main/java/shift/sextiarysector/item/ItemWateringCan.java +++ b/src/main/java/shift/sextiarysector/item/ItemWateringCan.java @@ -16,6 +16,7 @@ import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.block.BlockSSCrop; import shift.sextiarysector.block.BlockSSFarmland; +import shift.sextiarysector.block.BlockWood; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -59,7 +60,7 @@ public boolean addWater(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, int z = par6; - if(par3World.getBlock(x, y, z) != SSBlocks.farmland && !(par3World.getBlock(x, y, z) instanceof BlockSSCrop)){ + if(par3World.getBlock(x, y, z) != SSBlocks.farmland && par3World.getBlock(x, y, z) != SSBlocks.wood && !(par3World.getBlock(x, y, z) instanceof BlockSSCrop)){ return false; } @@ -84,6 +85,23 @@ public boolean addWater(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, } + }else if(b instanceof BlockWood){ + + boolean f = ((BlockWood) b).addWater(par3World, x, y, z); + + if(f){ + + if(par3World.isRemote){ + this.spawnParticle(par3World, x, y+1, z); + }else{ + par3World.playSoundAtEntity(par2EntityPlayer, "liquid.water", 1.0F, 1.0F); + par1ItemStack.damageItem(1, par2EntityPlayer); + } + + return true; + + } + } diff --git a/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java index f40a052..12e26d5 100644 --- a/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java +++ b/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java @@ -268,6 +268,23 @@ public static void setColor3ubFromInt(int color) { } + public List drawTooltip(int recipe, int offsetx, int offsety, List currenttip){ + + if(((SimpleFluidPair)this.arecipes.get(recipe)).fluidStack == null)return currenttip; + + if(42 getHandlerClass(); abstract String getHandlerName(); abstract RecipeSimpleFluid getRecipe(); diff --git a/src/main/java/shift/sextiarysector/nei/TemplateSSRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/TemplateSSRecipeHandler.java index a08aa6a..a9614f7 100644 --- a/src/main/java/shift/sextiarysector/nei/TemplateSSRecipeHandler.java +++ b/src/main/java/shift/sextiarysector/nei/TemplateSSRecipeHandler.java @@ -1,9 +1,11 @@ package shift.sextiarysector.nei; +import java.awt.Point; import java.util.List; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; +import codechicken.lib.gui.GuiDraw; import codechicken.nei.guihook.GuiContainerManager; import codechicken.nei.guihook.IContainerInputHandler; import codechicken.nei.guihook.IContainerTooltipHandler; @@ -43,6 +45,12 @@ public List handleTooltip(GuiRecipe gui, List currenttip, int re List s =super.handleTooltip(gui, currenttip, recipe); + formatRecipe(s); + + Point mousepos = GuiDraw.getMousePosition(); + Point offset = gui.getRecipePosition(recipe); + this.drawTooltip(recipe, mousepos.x - offset.x, mousepos.y - offset.y, s); + return formatRecipe(s); } @@ -64,4 +72,9 @@ private static List formatRecipe(List currenttip){ } + //ツールチップ用のメソッド + public List drawTooltip(int recipe, int offsetx, int offsety, List currenttip){ + return currenttip; + } + } diff --git a/src/main/java/shift/sextiarysector/player/EquipmentType.java b/src/main/java/shift/sextiarysector/player/EquipmentType.java index 9c6b588..246cfe8 100644 --- a/src/main/java/shift/sextiarysector/player/EquipmentType.java +++ b/src/main/java/shift/sextiarysector/player/EquipmentType.java @@ -8,8 +8,8 @@ public enum EquipmentType { Necklace("necklace",new int[]{0}), Ring("ring",new int[]{1,2,3}), Face("face",new int[]{4}), - Hand("hand",new int[]{5}), - Bag("bag",new int[]{6}), + Bag("bag", new int[]{5}), + Hand("hand",new int[]{6}), Belt("belt",new int[]{7}), Unit("unit",new int[]{8,9,10,11,12,13,14,15}), Other("other",new int[]{16,17,18,19}) @@ -51,8 +51,8 @@ public static EquipmentType getEquipmentTypeFromSlot(int slot){ return Ring; case 4 : return Face; - case 5 : return Hand; - case 6 : return Bag; + case 5 : return Bag; + case 6 : return Hand; case 7 : return Belt; case 8 : diff --git a/src/main/java/shift/sextiarysector/player/StaminaStats.java b/src/main/java/shift/sextiarysector/player/StaminaStats.java index da6444a..46d84d5 100644 --- a/src/main/java/shift/sextiarysector/player/StaminaStats.java +++ b/src/main/java/shift/sextiarysector/player/StaminaStats.java @@ -70,7 +70,7 @@ else if (i.getDifficultyId() > 0 || Config.peacefulStamina) { ++this.staminaTimer; - if (this.staminaTimer >= 80) + if (this.staminaTimer >= 160) { par1EntityPlayer.heal(1.0F); this.addExhaustion(3.0F); diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 1d6e028..5ce398e 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -27,7 +27,9 @@ import shift.sextiarysector.renderer.block.RendererShaft; import shift.sextiarysector.renderer.block.RendererSmallWaterwheel; import shift.sextiarysector.renderer.block.RendererSmallWindmill; +import shift.sextiarysector.renderer.block.RendererSquare; import shift.sextiarysector.renderer.block.RendererWindmill; +import shift.sextiarysector.renderer.block.RendererWood; import shift.sextiarysector.renderer.block.RendererWoodHopper; import shift.sextiarysector.renderer.entity.RenderMineboat; import shift.sextiarysector.renderer.item.RenderGF; @@ -40,6 +42,7 @@ import shift.sextiarysector.tileentity.TileEntityShaft; import shift.sextiarysector.tileentity.TileEntitySmallWaterwheel; import shift.sextiarysector.tileentity.TileEntitySmallWindmill; +import shift.sextiarysector.tileentity.TileEntitySquare; import shift.sextiarysector.tileentity.TileEntityWindmill; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; @@ -63,6 +66,8 @@ public void setCustomRenderers() { this.bottleType = RenderingRegistry.getNextAvailableRenderId(); + this.squareType = RenderingRegistry.getNextAvailableRenderId(); + this.fluidCrafterType = RenderingRegistry.getNextAvailableRenderId(); this.woodHopperType = RenderingRegistry.getNextAvailableRenderId(); @@ -85,10 +90,14 @@ public void setCustomRenderers() { this.paddyType = RenderingRegistry.getNextAvailableRenderId(); + this.woodType = RenderingRegistry.getNextAvailableRenderId(); + RenderingRegistry.registerBlockHandler(new RendererHole()); RenderingRegistry.registerBlockHandler(new RendererBlockBottle()); + RenderingRegistry.registerBlockHandler(new RendererSquare()); + RenderingRegistry.registerBlockHandler(new RendererFluidCrafter()); RenderingRegistry.registerBlockHandler(new RendererWoodHopper()); @@ -109,6 +118,8 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererFarmland()); RenderingRegistry.registerBlockHandler(new RendererPaddy()); + RenderingRegistry.registerBlockHandler(new RendererWood()); + this.setCustomClientRenderers(); @@ -123,6 +134,8 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlockBottle.class, new RendererBlockBottle()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySquare.class, new RendererSquare()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFluidCrafter.class, new RendererFluidCrafter()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGearShaft.class, new RendererGearShaft()); diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 2dad813..a0088e8 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -9,6 +9,7 @@ public class CommonProxy { public int holeType; public int bottleType; + public int squareType; public int fluidCrafterType; @@ -30,6 +31,7 @@ public class CommonProxy { public int farmlandType; public int paddyType; + public int woodType; public EntityPlayer getClientPlayer(){ diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index 08665e9..b1e7366 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -40,6 +40,12 @@ public static void addRecipes(CraftingManager p_77608_1_) 'y', "plateWood", })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.square, 1), + new Object[] { + "x x","x x", "xxx", + 'x', "plateWood", + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.mineboatChest, 1), new Object[] { "x", "y", diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java b/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java new file mode 100644 index 0000000..503d106 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java @@ -0,0 +1,183 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.renderer.model.ModelSquare; +import shift.sextiarysector.tileentity.TileEntitySquare; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererSquare extends TileEntitySpecialRenderer implements + ISimpleBlockRenderingHandler { + + private static final ResourceLocation squareTextures = new ResourceLocation("sextiarysector:textures/models/square.png"); + private static final ResourceLocation squareUunderTextures = new ResourceLocation("sextiarysector:textures/models/square_under.png"); + static public ModelSquare modelSquare = new ModelSquare(); + + private final RenderBlocks blockrender = new RenderBlocks(); + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + + if (modelID != this.getRenderId()) { + return; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f / 1.0f; + GL11.glScalef(scale, scale, scale); + + GL11.glRotatef(180, 1, 0, 0); + + GL11.glRotatef(90, 0, -1, 0); + this.bind(squareTextures); + + modelSquare.render(null, 0, 0, 0, 0, 0, 1.0f); + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + return false; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.squareType; + } + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + + TileEntitySquare tile = (TileEntitySquare) tileentity; + + GL11.glPushMatrix(); + + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_LIGHT0); + + GL11.glColor3f(1,1,1); + + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + + if(tile.hasFluid()){ + + IIcon icon = tile.getFluidIcon(); + float fluidHeight = tile.getFluidHeight(); + Block block = tile.getBlockType(); + + //float i = 0.3125f; + + this.bindTexture(MC_BLOCK_SHEET); + + this.setColor3ubFromInt(tile.getFluidColor()); + + blockrender.blockAccess =tileentity.getWorldObj(); + + blockrender.renderAllFaces = true; + blockrender.setOverrideBlockTexture(icon); + blockrender.setRenderBounds(-5.99f/16.0f, -5.99f/16.0f, -5.99f/16.0f, 6.0f/16.0f ,fluidHeight-6.0f/16.0f, 6.0f/16.0f); + + Tessellator tessellator = Tessellator.instance; + + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + blockrender.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + blockrender.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + blockrender.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + blockrender.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + blockrender.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + blockrender.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + + blockrender.renderAllFaces = false; + blockrender.clearOverrideBlockTexture(); + + } + + GL11.glDisable(GL11.GL_BLEND); + GL11.glDisable(GL11.GL_LIGHTING); + + + float scale = 0.0625f; + // float scale = 0.125f; + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180, 1, 0, 0); + switch (tile.direction) { + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case NORTH: + GL11.glRotatef(180, 0, 1, 0); + default: + break; + } + + if (tile.direction.ordinal() == ForgeDirection.UP.ordinal()) { + this.bindTexture(squareTextures); + } else if (tile.direction.ordinal() == ForgeDirection.DOWN.ordinal()) { + this.bindTexture(squareUunderTextures); + } else { + this.bindTexture(squareTextures); + modelSquare.renderConnection(null, 0, 0, 0, 0, 0, 1.0f); + } + + modelSquare.render(null, 0, 0, 0, 0, 0, 1.0f); + + GL11.glPopMatrix(); + + } + + private static void bind(ResourceLocation res) { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } + + public static void setColor3ubFromInt(int color) { + + GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererWood.java b/src/main/java/shift/sextiarysector/renderer/block/RendererWood.java new file mode 100644 index 0000000..b9f07af --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererWood.java @@ -0,0 +1,93 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.module.FertilizerManager; +import shift.sextiarysector.tileentity.TileEntityWood; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererWood implements ISimpleBlockRenderingHandler{ + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId,RenderBlocks renderer) { + + GL11.glPushMatrix(); + + Tessellator tessellator = Tessellator.instance; + renderer.setRenderBounds(2.0D/16.0D, 0.0D, 2.0D/16.0D, 14.0D/16.0D, 15.0D/16.0D, 14.0D/16.0D); + + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata)); + tessellator.draw(); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + + GL11.glPopMatrix(); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block block, int modelId, RenderBlocks renderer) { + + if(this.getRenderId()!=modelId)return false; + + renderer.setRenderBounds(2.0D/16.0D, 0.0D, 2.0D/16.0D, 14.0D/16.0D, 15.0D/16.0D, 14.0D/16.0D); + renderer.renderStandardBlock(block, x, y, z); + + TileEntityWood t = (TileEntityWood) world.getTileEntity(x, y, z); + + if(t!=null&&t.getFertilizer()!=null){ + + if(FertilizerManager.getFertilizer(t.getFertilizer())!=null){ + renderer.setOverrideBlockTexture(FertilizerManager.getFertilizerIcon(t.getFertilizer()).getFertilizerIcon()); + }else{ + t.setFertilizer(null); + } + + renderer.setRenderBounds(2.0D/16.0D, 1 - 0.01f, 2.0D/16.0D, 14.0D/16.0D, 15.0D/16.0D + 0.009f, 14.0D/16.0D); + renderer.renderStandardBlock(block, x, y, z); + } + + renderer.clearOverrideBlockTexture(); + + return true; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.woodType; + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelSquare.java b/src/main/java/shift/sextiarysector/renderer/model/ModelSquare.java new file mode 100644 index 0000000..19e3e32 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelSquare.java @@ -0,0 +1,78 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelSquare extends ModelBase { + + ModelRenderer side1; + ModelRenderer side2; + ModelRenderer side3; + ModelRenderer side4; + ModelRenderer under; + ModelRenderer connection; + + public ModelSquare() { + + textureWidth = 64; + textureHeight = 64; + + side1 = new ModelRenderer(this, 0, 0); + side1.addBox(-7F, -6F, 5F, 12, 14, 2); + side1.setRotationPoint(0F, 0F, 0F); + side1.setTextureSize(64, 64); + side1.mirror = true; + setRotation(side1, 0F, 0F, 0F); + side2 = new ModelRenderer(this, 0, 16); + side2.addBox(5F, -6F, -5F, 2, 14, 12); + side2.setRotationPoint(0F, 0F, 0F); + side2.setTextureSize(64, 64); + side2.mirror = true; + setRotation(side2, 0F, 0F, 0F); + side3 = new ModelRenderer(this, 28, 0); + side3.addBox(-5F, -6F, -7F, 12, 14, 2); + side3.setRotationPoint(0F, 0F, 0F); + side3.setTextureSize(64, 64); + side3.mirror = true; + setRotation(side3, 0F, 0F, 0F); + side4 = new ModelRenderer(this, 28, 16); + side4.addBox(-7F, -6F, -7F, 2, 14, 12); + side4.setRotationPoint(0F, 0F, 0F); + side4.setTextureSize(64, 64); + side4.mirror = true; + setRotation(side4, 0F, 0F, 0F); + under = new ModelRenderer(this, 0, 52); + under.addBox(-5F, 6F, -5F, 10, 2, 10); + under.setRotationPoint(0F, 0F, 0F); + under.setTextureSize(64, 64); + under.mirror = true; + setRotation(under, 0F, 0F, 0F); + connection = new ModelRenderer(this, 31, 49); + connection.addBox(-4F, -4F, -8F, 8, 8, 4); + connection.setRotationPoint(0F, 0F, 0F); + connection.setTextureSize(64, 64); + connection.mirror = true; + setRotation(connection, 0F, 0F, 0F); + } + + 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); + side1.render(f5); + side2.render(f5); + side3.render(f5); + side4.render(f5); + under.render(f5); + } + + public void renderConnection(Entity entity, float f, float f1, float f2, float f3,float f4, float f5) { + connection.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java new file mode 100644 index 0000000..f089056 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java @@ -0,0 +1,144 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.IIcon; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + +public class TileEntitySquare extends TileEntityDirection implements IFluidHandler{ + + protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 16); + + private int lastFluid; + + @Override + public void updateEntity() { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() { + } + + private void updateServerEntity() { + + if((lastFluid)!=(tank.getFluidAmount()/100)){ + this.lastFluid = (tank.getFluidAmount()/100); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + if(this.direction.ordinal() != ForgeDirection.UP.ordinal() && this.tank.getFluidAmount() > 0)this.chargeFluid(); + + } + + private void chargeFluid(){ + + if(this.worldObj.getTileEntity(xCoord + this.direction.offsetX, yCoord + this.direction.offsetY, zCoord + this.direction.offsetZ) instanceof IFluidHandler){ + IFluidHandler f = (IFluidHandler) this.worldObj.getTileEntity(xCoord + this.direction.offsetX, yCoord + this.direction.offsetY, zCoord + this.direction.offsetZ); + + if(f.canFill(this.getDirection().getOpposite(), this.tank.getFluid().getFluid())){ + FluidStack fs = this.tank.getFluid().copy(); + if(fs.amount> 500)fs.amount=500; + int i = f.fill(this.getDirection().getOpposite(), fs, true); + this.tank.drain(i, true); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + } + + /* IFluidHandler */ + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + if(from.ordinal() == this.getDirection().ordinal())return 0; + return tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(tank.getFluid())) + { + return null; + } + return tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return tank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + if(from.ordinal() == this.getDirection().ordinal())return false; + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { tank.getInfo() }; + } + + public boolean hasFluid(){ + return this.tank.getFluidAmount() > 0 ; + } + + public IIcon getFluidIcon(){ + return this.tank.getFluid().getFluid().getIcon(this.tank.getFluid()); + } + + public int getFluidColor(){ + return this.tank.getFluid().getFluid().getColor(this.tank.getFluid()); + } + + public float getFluidHeight(){ + return ((float)this.tank.getFluidAmount()/(float)this.tank.getCapacity())*(11.0f/16.0f); + } + + public int getFluidID(){ + return tank.getFluid().fluidID; + } + + public FluidStack getFluidStack(){ + return this.tank.getFluid(); + } + + /* NBT */ + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + tank.readFromNBT(par1nbtTagCompound); + if(par1nbtTagCompound.hasKey("Empty") && tank.getFluidAmount() > 0)this.tank.setFluid(null); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + tank.writeToNBT(par1nbtTagCompound); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityWood.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityWood.java new file mode 100644 index 0000000..5dcfdcd --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityWood.java @@ -0,0 +1,5 @@ +package shift.sextiarysector.tileentity; + +public class TileEntityWood extends TileEntityFarmland{ + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 8254608..4e23658 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -23,9 +23,11 @@ tile.ss.gold_plate.name=Gold Plate tile.ss.hole.name=Hole tile.ss.farmland.name=Farm Land tile.ss.paddy.name=Paddy +tile.ss.wood.name=Wood tile.ss.bottle.name=Fluid Bottle tile.ss.fluid_crafter.name=Fluid Crafter +tile.ss.square.name=Wood Square tile.ss.wood_hopper.name=Wood Hopper @@ -257,6 +259,7 @@ item.ss.drinking_water_bottle.name=Drinking Water Bottle item.ss.takumi_tea_bottle.name=TAKUMI Tea Bottle item.ss.shift_hat.name=Shift's Hat +item.ss.rucksack.name=Rucksack item.ss.gf_contact_lenses.name=GF Contact Lenses #Fluid @@ -279,6 +282,8 @@ gui.ss.fluid_furnace=Fluid Furnace gui.ss.food_smokers=Food Smokers gui.ss.magic_furnace=Magic Furnace +gui.ss.rucksack=Rucksack + gui.ss.millstone=Millstone gui.ss.loom=Loom gui.ss.sawmill=Sawmill @@ -323,6 +328,8 @@ player.tab.vanilla=Vanilla player.tab.equipment=Equipment player.tab.item.ss.craft_unit=Craft +player.tab.item.ss.rucksack=Rucksack + player.tab.item.ss.creeper_ring=Creeper Shop #Achievement diff --git a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang new file mode 100644 index 0000000..1eeea6f --- /dev/null +++ b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang @@ -0,0 +1,472 @@ +#Japanese ja_JP + +#Block +tile.ss.large_furnace.name=大型かまど +tile.ss.fluid_furnace.name=流体かまど + +tile.ss.food_smokers.name=燻製器 + +tile.ss.magic_furnace.name=魔法かまど + +tile.ss.wood_grate.name=木の格子 + +tile.ss.wood_plate.name=木の板 + +tile.ss.hole.name=穴 +tile.ss.farmland.name=農地 +tile.ss.paddy.name=水田 + +tile.ss.bottle.name=液体ボトル +tile.ss.fluid_crafter.name=流体クラフター + +tile.ss.wood_hopper.name=木のホッパー + +tile.ss.chunk_loader.name=タイムローダー + + +tile.ss.small_windmill.name=小さい風車 +tile.ss.windmill.name=風車 +tile.ss.small_waterwheel.name=小さい水車 + +tile.ss.wood_shaft.name=木のシャフト +tile.ss.stone_shaft.name=石のシャフト +tile.ss.steel_shaft.name=鋼のシャフト + +tile.ss.wood_gear_box.name=木のギアボックス +tile.ss.stone_gear_box.name=石のギアボックス +tile.ss.steel_gear_box.name=鋼のギアボックス + +tile.ss.wood_gf_tank.name=木のGFタンク +tile.ss.stone_gf_tank.name=石のGFタンク +tile.ss.steel_gf_tank.name=鋼のGFタンク + +tile.ss.wood_stone_gear_shaft.name=木と石のギアシャフト + +tile.ss.millstone.name=石臼 +tile.ss.loom.name=織機 +tile.ss.sawmill.name=製材機 +tile.ss.pulverizer.name=粉砕機 + +tile.ss.fan.name=ファン + +tile.ss.blue_stone.name=ブルーストーン鉱石 +tile.ss.yellow_stone.name=イエローストーン鉱石 + +tile.ss.mithril_ore.name=ミスリル鉱石 +tile.ss.orichalcum_ore.name=オリハルコン鉱石 + +tile.ss.coal_large_ore.name=大きな石炭鉱石 +tile.ss.iron_large_ore.name=大きな鉄鉱石 +tile.ss.gold_large_ore.name=大きな金鉱石 + +tile.ss.creeper_chest.name=クリーパーチェスト +tile.ss.shipping_box.name=出荷箱 + +tile.ss.turnip.name=カブの種 +tile.ss.cucumber.name=キュウリの種 + +tile.ss.onion.name=タマネギの種 +tile.ss.tomato.name=トマトの種 +tile.ss.corn.name=トウモロコシの種 + +tile.ss.eggplant.name=ナスの種 +tile.ss.sweet_potato.name=サツマイモの種 +tile.ss.green_pepper.name=ピーマンの種 + +tile.ss.radish.name=大根の種 + +tile.ss.rice.name=米の種 + +tile.ss.sandpit.name=砂場 + +tile.ss.monitor.name=モニター +monitor.type=店種 +monitor.creeper=クリーパーショップ +monitor.robot=ロボットショップ + +tile.ss.electric_motor.name=電気モーター +tile.ss.tofu_motor.name=豆腐モーター + +#Item +item.ss.dust_waterlily.name=蓮の粉 + +item.ss.stone_dust.name=石の粉 + +item.ss.dust_blue_stone.name=ブルーストーン +item.ss.dust_yellow_stone.name=イエローストーン + +item.ss.coal_dust.name=石炭の粉 +item.ss.iron_dust.name=鉄の粉 +item.ss.gold_dust.name=金の粉 +item.ss.diamond_dust.name=ダイヤの粉 + +item.ss.mithril_dust.name=ミスリルの粉 + + +item.ss.steel_ingot.name=鋼鉄インゴット +item.ss.brass_ingot.name=真鍮インゴット + +item.ss.bluestone_ingot.name=ブルーストーンインゴット +item.ss.yellowstone_ingot.name=イエローストーンインゴット + +item.ss.mithril_ingot.name=ミスリルインゴット +item.ss.orichalcum_gem.name=オリハルコン + +item.ss.ninja_ingot.name=ニンジャインゴット + +item.ss.blue_stone_slime_ball.name=ブルーストーンのボール + + +item.ss.energy_reactor.name=エネルギーリアクター +item.ss.object_reactor.name=オブジェクトリアクター + +item.ss.empty_bottle.name=空のボトル +item.ss.water_bottle.name=水入りボトル +item.ss.lava_bottle.name=溶岩入りボトル + +item.ss.craft_unit.name=クラフトユニット + +item.ss.iron_ring.name=鉄のリング +item.ss.creeper_ring.name=クリーパーショップリング + + +item.ss.magic_dust.name=魔法の粉 + +item.ss.unit.name=ユニット + +item.ss.wood_gear.name=木の歯車 +item.ss.stone_gear.name=石の歯車 +item.ss.steel_gear.name=鋼の歯車 + +item.ss.wood_unit_gear.name=木のギアユニット +item.ss.stone_unit_gear.name=石のギアユニット +item.ss.steel_unit_gear.name=鋼のギアユニット + +item.ss.hammer.name=ハンマー +item.ss.calendar.name=カレンダー + +item.ss.calendar.name=カレンダー +item.ss.season_stone.name=シーズンストーン +item.ss.season_stone_spring.name=シーズンストーン -春- +item.ss.season_stone_summer.name=シーズンストーン -夏- +item.ss.season_stone_autumn.name=シーズンストーン -秋- +item.ss.season_stone_winter.name=シーズンストーン -冬- + +item.ss.wood_gf_storage.name=木のGFストレージ +item.ss.stone_gf_storage.name=石のGFストレージ +item.ss.steel_gf_storage.name=鋼のGFストレージ + +item.ss.string_bobbin.name=糸のボビン +item.ss.cloth.name=布 +item.ss.canvas.name=粗布 + + +item.ss.wood_scoop.name=木のスコップ +item.ss.stone_scoop.name=石のスコップ +item.ss.iron_scoop.name=鉄のスコップ +item.ss.gold_scoop.name=金のスコップ +item.ss.diamond_scoop.name=ダイヤのスコップ + +item.ss.wood_knife.name=木のナイフ +item.ss.stone_knife.name=石のナイフ +item.ss.iron_knife.name=鉄のナイフ +item.ss.gold_knife.name=金のナイフ +item.ss.diamond_knife.name=ダイヤのナイフ + +item.ss.wood_watering_can.name=木のジョウロ + +item.ss.mineboat_chest.name=チェスト付きボート + +item.ss.laver.name=海苔 + + +item.ss.crop.big=大きい + +item.ss.turnip.name=カブ +item.ss.cucumber.name=キュウリ + +item.ss.iron_turnip.name=鉄カブ + +item.ss.onion.name=タマネギ +item.ss.tomato.name=トマト +item.ss.corn.name=トウモロコシ + +item.ss.golden_corn.name=金トウモロコシ + +item.ss.eggplant.name=ナス +item.ss.sweet_potato.name=サツマイモ +item.ss.green_pepper.name=ピーマン + +item.ss.radish.name=大根 + +item.ss.rice.name=米 + + +item.ss.white_rice.name=白米 + +item.ss.salt.name=塩 +item.ss.curry_powder.name=カレーパウダー + +item.ss.laver_roasted.name=焼き海苔 + +item.ss.chicken_smoked.name=スモークチキン +item.ss.porkchop_smoked.name=スモークポーク +item.ss.beef_smoked.name=スモークビーフ + +item.ss.curry_rice.name=カレーライス + +item.ss.carrot_soup.name=にんじんスープ +item.ss.corn_soup.name=コーンスープ +item.ss.egg_soup.name=たまごスープ +item.ss.mushroom_stew.name=きのこソテー +item.ss.onion_soup.name=玉ねぎスープ +item.ss.ender_soup.name=エンダースープ +item.ss.tomato_soup.name=トマトスープ + +item.ss.drinking_water_bottle.name=飲料水入りボトル +item.ss.takumi_tea_bottle.name=匠茶入りボトル + +item.ss.shift_hat.name=Shiftの帽子 +item.ss.gf_contact_lenses.name=GFコンタクトレンズ + +#Fluid +fluid.ss.takumi_tea=匠茶 +fluid.ss.drinking_water=飲料水 +fluid.ss.steam=蒸気 + +fluid.ss.steam=蒸気 + +#Potion +ss.potion.burn=Burn + +#GUI +container.large_furnace=大型かまど +container.sub.inventory=バッファー + +container.mineboat_chest=チェスト付きボート + +gui.ss.fluid_furnace=流体かまど +gui.ss.food_smokers=燻製器 +gui.ss.magic_furnace=魔法かまど + +gui.ss.millstone=石臼 +gui.ss.loom=織機 +gui.ss.sawmill=製材機 +gui.ss.pulverizer=粉砕機 + +gui.ss.gf_tank_1=木のGFタンク +gui.ss.gf_tank_2=石のGFタンク +gui.ss.gf_tank_3=鋼のGFタンク + +shop.ss.creeper=クリーパーショップ +shop.ss.robot=ロボットショップ + +#ToolTip +tooltip.season.pm=PM +tooltip.season.am=AM +tooltip.season.day=日 + +tooltip.season=季節 +tooltip.season.seed=栽培期間 +tooltip.season.spring=春 +tooltip.season.summer=夏 +tooltip.season.autumn=秋 +tooltip.season.winter=冬 + +#Tab +itemGroup.ss.core=SextiarySector -Core- +itemGroup.ss.fluid=SextiarySector -Fluid- +itemGroup.ss.player=SextiarySector -Player- +itemGroup.ss.agriculture=SextiarySector -Agriculture- +itemGroup.ss.fishery=SextiarySector -Fishery- +itemGroup.ss.mining=SextiarySector -Mining- +itemGroup.ss.industry=SextiarySector -Industry- +itemGroup.ss.cooking=SextiarySector -Cooking- +itemGroup.ss.transport=SextiarySector -Transport- +itemGroup.ss.economy=SextiarySector -Economy- +itemGroup.ss.magic=SextiarySector -Magic- + +#Player Tab +player.tab.vanilla=バニラ +player.tab.equipment=装備 +player.tab.item.ss.craft_unit=クラフト + +player.tab.item.ss.creeper_ring=クリーパーショップ + +#Achievement +stat.sell=Sell + +achievement.ss.core=SS2 -Core- + +achievement.ss.moisture=Moisture +achievement.ss.moisture.desc=Let the hydration +achievement.ss.moisture.desc2=Slippery skin + +achievement.ss.bottle=Bottle +achievement.ss.bottle.desc=Craft a bottle +achievement.ss.bottle.desc2=Strengthening bottle + +achievement.ss.drinking_water=Drinking Water +achievement.ss.drinking_water.desc=Smelting a water bottle +achievement.ss.drinking_water.desc2=Delicious ! + +achievement.ss.craft_furnace=Craft Furnace +achievement.ss.craft_furnace.desc=Craft a large furnace +achievement.ss.craft_furnace.desc2=Complex craft + + +achievement.ss.agriculture=SS2 -Agriculture- + +achievement.ss.data=Crop Data + +achievement.ss.seed=First Seed +achievement.ss.seed.desc=Buy a seed +achievement.ss.seed.desc2=Increase + +achievement.ss.scoop=Scoop +achievement.ss.scoop.desc=Craft a scoop +achievement.ss.scoop.desc2=Friendly touch + +achievement.ss.farmland=Farmland +achievement.ss.farmland.desc=Use a scoop to vanilla farmland +achievement.ss.farmland.desc2=Strong ! + +achievement.ss.watering_can=Watering Can +achievement.ss.watering_can.desc=Craft a watering can +achievement.ss.watering_can.desc2=The spear fun water + +achievement.ss.hole=Hole +achievement.ss.hole.desc=Use a scoop to dirt +achievement.ss.hole.desc2=The Who is a hole here ? + +achievement.ss.paddy=Paddy +achievement.ss.paddy.desc=Use a water bucket to hole +achievement.ss.paddy.desc2=Grow rice ! + +## +achievement.ss.turnip=Turnip +achievement.ss.turnip.desc=Pickup a turnip + +achievement.ss.iron_turnip=Iron Turnip +achievement.ss.iron_turnip.desc=Pickup a iron turnip + +achievement.ss.cucumber=Cucumber +achievement.ss.cucumber.desc=Pickup a cucumber + + +achievement.ss.onion=Onion +achievement.ss.onion.desc=Pickup a onion + +achievement.ss.tomato=Tomato +achievement.ss.tomato.desc=Pickup a tomato + +achievement.ss.corn=Corn +achievement.ss.corn.desc=Pickup a corn + +achievement.ss.golden_corn=Golden Corn +achievement.ss.golden_corn.desc=Pickup a golden corn + + +achievement.ss.eggplant=Eggplant +achievement.ss.eggplant.desc=Pickup a eggplant + +achievement.ss.sweet_potato=Sweet Potato +achievement.ss.sweet_potato.desc=Pickup a sweet potato + +achievement.ss.green_pepper=Green Pepper +achievement.ss.green_pepper.desc=Pickup a green pepper + + +achievement.ss.radish=Radish +achievement.ss.radish.desc=Pickup a radish + + +achievement.ss.rice=Rice +achievement.ss.rice.desc=Pickup a rice + +achievement.ss.mining=SS2 -Mining- + +achievement.ss.bluestone_dust=Color is different ! +achievement.ss.bluestone_dust.desc=Pickup a bluestone dust +achievement.ss.bluestone_dust.desc2=Beautiful ! + +achievement.ss.industry=SS2 -Industry- + +achievement.ss.bluestone_slime_ball=Mysterious slime +achievement.ss.bluestone_slime_ball.desc=Craft a bluestone slime ball +achievement.ss.bluestone_slime_ball.desc2=How nice + + +achievement.ss.wood_gear=New power +achievement.ss.wood_gear.desc=Craft a wood gear +achievement.ss.wood_gear.desc2=Its name GF ! + +achievement.ss.small_windmill=Force of the wind +achievement.ss.small_windmill.desc=Craft a small windmill +achievement.ss.small_windmill.desc2=It's a good wind + +achievement.ss.millstone=The machine +achievement.ss.millstone.desc=Craft a millstone +achievement.ss.millstone.desc2=Flour I ish + +achievement.ss.loom=Cloth ! +achievement.ss.loom.desc=Craft a loom +achievement.ss.loom.desc2=It is rid from naked! + + +achievement.ss.stone_gear=Power ups +achievement.ss.stone_gear.desc=Craft a stone gear +achievement.ss.stone_gear.desc2=Even stone ? + +achievement.ss.windmill=Updraft +achievement.ss.windmill.desc=Craft a windmill +achievement.ss.windmill.desc2=Crying wind + +achievement.ss.sawmill=Blade ? +achievement.ss.sawmill.desc=Craft a sawmill +achievement.ss.sawmill.desc2=Let dismantling together ! + + +achievement.ss.steel_gear=The power of steel +achievement.ss.steel_gear.desc=Craft a steel gear +achievement.ss.steel_gear.desc2=Coal shortage ? + +achievement.ss.small_waterwheel=The power of water +achievement.ss.small_waterwheel.desc=Craft a small waterwheel +achievement.ss.small_waterwheel.desc2=Do not close the lava ! + +achievement.ss.pulverizer=Industrial era +achievement.ss.pulverizer.desc=Craft a pulverizer +achievement.ss.pulverizer.desc2=Double it ! + +achievement.ss.economy=SS2 -Economy- + +achievement.ss.creeper_firework=Creeper Monger +achievement.ss.creeper_firework.desc=The attempt to communicate with fireworks +achievement.ss.creeper_firework.desc2=Explosion ! + +achievement.ss.creeper_chest=Creeper Chest +achievement.ss.creeper_chest.desc=Let's go to bed in a separate +achievement.ss.creeper_chest.desc2=Santa Creeper ? + +achievement.ss.shipping=Shipping Block +achievement.ss.shipping.desc=Trying to shipment +achievement.ss.shipping.desc=I'm millionaire ! + +#NEI +nei.recipe=Recipes +nei.ss.furnace.shaped=Furnace Shaped +nei.ss.furnace.shapeless=Furnace Shapeless + +nei.ss.fluid_furnace=Fluid Furnace Recipe +nei.ss.food_smokers=Food Smokers Recipe + +nei.ss.magic_furnace=Magic Furnace Recipe +nei.ss.magic_fuel=Magic Fuel + +nei.ss.millstone=Millstone Recipe +nei.ss.loom=Loom Recipe +nei.ss.sawmill=Sawmill Recipe +nei.ss.pulverizer=Pulverizer Recipe + +nei.ss.fertilizer=Mutation Recipe diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/wood.png b/src/main/resources/assets/sextiarysector/textures/blocks/wood.png new file mode 100644 index 0000000000000000000000000000000000000000..860a119f1d7d9121dfd85ec4bb4d0b437eacd3b6 GIT binary patch literal 807 zcmV+?1K9kDP)Yc;Jv5Ys&a8XL2FGA1XydyvJCG%)9Dl;1SkD5N-55VW27;LZnMr` zZ-#_nh_x22HBw4`IqI{!QN?>tqgLj}=NF`Dnr{(B5i$q@x~(ds$sF%JN-2&{uX(t) zPN7gBj$@p20E}mv2Yc)P(?>ez@ZKYYpin3*&?v>zqdwky4vz=KaZGbLWH_1;h9Osz z1b|vGL;?gsKomtJNy3Y>5ubgs&5Ku8+`F@a5P~F0kWvzcA>MoLZ7%16s+VUY8nyB} z(Q5hq^Z6XDHAg2yb~e{2l}g-fdqZWt5idURhJdw}IF3)vC0A{lphsOh=C?YD5$DMOLd3J_U3TrLFc4y^tgrHoEC>5gx zcLSp&qp?(`*{Gnk=It=yVwliuRJeb4m51+b@a5yDixafgJbHhfUthi@2!i|@51+qb zr(K~?DDcs43+EhJmeKzw<*V-w`CzAs-0rR-gy8l04CfqansPasa(k_Ul#<_1hB;Pa l3{pxiM^k!Rw^&`O@-IP}XXqN{YRUir002ovPDHLkV1lC>ZruO? literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/wood_top.png b/src/main/resources/assets/sextiarysector/textures/blocks/wood_top.png new file mode 100644 index 0000000000000000000000000000000000000000..da731239d40125b729ade58d68819cba8d53be1b GIT binary patch literal 634 zcmV-=0)_pFP)pbaRwaEZ?mER}5e}-5h{>w;KL$1pgABot+7QJb$tp z9Xxt?8|NHa>xf=G*J?G2qTtn=b*!}lV0!sa00zgWJYKs?etd+8FdPm^l7#ALty!F& z!CFfoH-qET=yN)cjnwiB~3&3bJ!We^dj_t#PiJ$>gcs;y091gM8((CWDGdN^t za7eGePg$0XMx(eaXjHW(fHX}bayGv}bE!Vjk})RUKUlee3BurUaPWgPYfzRYN-305 zu`&^f6yAGIPELLkIOiye0c_g0B;i{9 zGL40l>sf>5QhkCVh`sli&8_}KRYg(oE#JjjOIen11jZPQF<5JH&c)1Ph%cY5k$LqIWdAHGH<<1qHb9nC~dZ@YD zSi6;>!e&5!l2#;J)h z5vc;A#v(aIumpni+`1i{o)Zdo#nXp($iq3u>SmXg?=ct*SljwloV9!p zAp{>b0$RR@QVJmi(m9874getpE#G5xvx}6Hn{(6uO$HE)w=M(F>ufvcpxuKTlQ2l( z^IHjf_6kfaG(=>mOpT`H9b!;t4M1B@{M=uYIm)%T*G))0mKccX!TB+b)yhJ|?sa7f^Y06-DPYA)M z16aJ0QRw#9y)#yY{gCya9jvuPQ3QZ72BQtuT9RR*;>Q9!d%Q$xSm5dfkLGxdM!CxD zRD%g+n68|oW-N_z6(waM_!%4LCgH{FfcF8+Hy}x~w`Tes6*iAL*77}cZM+J=^2%)i zuw*Uo);cU)Z<3}d&N+k-EOYw%MnleeW4wC%tx)>k((&L0GbB}7Ge)d^WT&$ zkxIA|wObaHXHkF+uR)!h>-(}JN>7APBtV>q79A%&3@r_=FZdbW^D-eRKcH@6BWK=$ zBm!p2^;ahzQhFkXE)FtROz}Iq@ByVK!czC7Sr`t?UL2PAA5^fQfYlp9Z>VuF9B6(X w&mi#g?_D!d1{b-yfAWoXtty_A@T0!Byt_s2c7@Kkkq0u<)78&qol`;+06lYle*gdg literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/rucksack.png b/src/main/resources/assets/sextiarysector/textures/items/rucksack.png new file mode 100644 index 0000000000000000000000000000000000000000..e7d6f2ffbc7316ed69424879d9e2d273c23d2080 GIT binary patch literal 545 zcmV++0^a?JP)~NQ|^X3_&a)LHdCNmfA|8N|l>Mx(p^7>sp0_bs@g@9JaC1>hX7bg(^Zoj&7`JY?;wooZreT|i( z6*+1D^^yVMcIhdWAKxWs2Bq~~yASkgYY#*wK7~rr!s&Ws(#iT^e_S8wDaNw~8_ypkJ8=D= zX{G*!@_vJk^vR?()}Gy`x_v>IP+|&~M<)QhnVY8RNXq*SHXcoqNe6qHj--8h1`H?1 z2ylLQ48Z36G}2RqZ!H*3aPa=*r+D)4jsjS=egp8ee%#XVGd000McNliru-vJQ`It9Yqv9clN{PA0VYm5h2|0J5Wq8P^BOyw$euwaRC(#K|-QM2t?9G7)N~k z4jMZV1yo2>)cDQYxfDCQZ+74A%$<23#PZ(C@A;m+vuEzynLT$O!P?)yJ!NdrUVrOD zazAf7-k2#|bEA*%>@ffw9qzYZGBbz>%;S^v-IJdI0Qc|R1`$Q$QsW&R?sxn{xV`rt zdov+#Q(>nNG1d>3?UqTn)Oe}5(F{00eZ(%Cp^NrsTRND2#z^B0Wtt>jQ4}sU zUK@wvaHAP;@#6_I0Yo*6AcCn3lp=ur>z)Z6=el6=N&j1jbdkNy;;9}yT8!xkIFCC}s9PrV8oi_x)FhB%VWc4K3 znOdNLZ@xZV?B|q#OO1E`o!VcK2=~U@pUG-K&6Z0U!{`cN1_!r2cA!FBYP@C_Xm^8{ zagNjgr^46@YZs}JYR)2>}(p>H(6&Wp(E7HN^ECm z)42HF;931F5Zj?i?d)tD7k(BqYHrZs8O*VcIdX)yV>W?T=UY?lx0@s~@ zT#;2G{=+AO|NG&qdrML`y}(=?WxwGq%LGhTgO;^S)gfoFc#ir02wW;%+rwG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uj cZ?((&AF&u0h+kS__5c6?07*qoM6N<$g0}#6p8x;= literal 0 HcmV?d00001 From d695977fd3ea33d2431af492a91b36b409a7820c Mon Sep 17 00:00:00 2001 From: shift02 Date: Wed, 21 Jan 2015 22:02:33 +0900 Subject: [PATCH 62/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=83=95?= =?UTF-8?q?=E3=83=AA=E3=83=BC=E3=82=B6=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・フリーザーを追加 ・Tconのタブと被らないように修正 closed #2 ・液体金属を追加 --- .../java/shift/sextiarysector/Config.java | 2 + .../java/shift/sextiarysector/SSBlocks.java | 11 +- .../java/shift/sextiarysector/SSFluids.java | 8 + .../shift/sextiarysector/SSGuiHandler.java | 5 + .../shift/sextiarysector/SSOreDictionary.java | 6 + .../java/shift/sextiarysector/SSRecipes.java | 9 + .../sextiarysector/block/BlockFreezer.java | 31 +++ .../block/BlockMagiFurnace.java | 22 ++ ...icFurnace.java => BlockSimpleFurnace.java} | 47 ++-- .../container/ContainerFreezer.java | 182 +++++++++++++ .../event/ClientEventHandler.java | 5 + .../shift/sextiarysector/gui/GuiFreezer.java | 51 ++++ .../sextiarysector/gui/tab/GuiBackButton.java | 42 +++ .../sextiarysector/gui/tab/GuiNextButton.java | 42 +++ .../nei/AbstractFuel2RecipeHandler.java | 129 +++++++++ .../nei/AbstractSimple2RecipeHandler.java | 250 ++++++++++++++++++ .../nei/AbstractSimpleRecipeHandler.java | 4 +- .../nei/FreezerRecipeHandler.java | 52 ++++ .../nei/IceFuelRecipeHandler.java | 50 ++++ .../nei/MagicFurnaceRecipeHandler.java | 3 +- .../nei/NEISextiarySectorConfig.java | 6 + .../sextiarysector/plugin/PluginTcon.java | 134 ++++++++++ .../sextiarysector/plugin/SSPlugins.java | 19 +- .../recipe/RecipeSimpleFluid.java | 6 + .../recipe/RecipesFluidFurnace.java | 6 + .../sextiarysector/recipe/RecipesFreezer.java | 19 ++ .../sextiarysector/recipe/RecipesIceFuel.java | 15 ++ .../renderer/block/RendererSquare.java | 2 + .../TileEntityFluidMachineBase.java | 19 +- .../tileentity/TileEntityFreezer.java | 90 +++++++ .../assets/sextiarysector/lang/en_US.lang | 8 +- .../textures/blocks/fluid/lava_flow.png | Bin 0 -> 6742 bytes .../blocks/fluid/lava_flow.png.mcmeta | 5 + .../textures/blocks/fluid/lava_still.png | Bin 0 -> 6322 bytes .../blocks/fluid/lava_still.png.mcmeta | 45 ++++ .../textures/blocks/ice/freezer_front_off.png | Bin 0 -> 657 bytes .../textures/blocks/ice/freezer_front_on.png | Bin 0 -> 707 bytes .../textures/blocks/ice/freezer_side.png | Bin 0 -> 564 bytes .../textures/blocks/ice/freezer_top.png | Bin 0 -> 550 bytes .../sextiarysector/textures/guis/freezer.png | Bin 0 -> 1771 bytes 40 files changed, 1279 insertions(+), 46 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockFreezer.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockMagiFurnace.java rename src/main/java/shift/sextiarysector/block/{BlockMagicFurnace.java => BlockSimpleFurnace.java} (87%) create mode 100644 src/main/java/shift/sextiarysector/container/ContainerFreezer.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiFreezer.java create mode 100644 src/main/java/shift/sextiarysector/nei/AbstractFuel2RecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/AbstractSimple2RecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/FreezerRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/IceFuelRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/plugin/PluginTcon.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesFreezer.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesIceFuel.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityFreezer.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_flow.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_flow.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_still.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_still.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ice/freezer_front_off.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ice/freezer_front_on.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ice/freezer_side.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ice/freezer_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/freezer.png diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index 0aa13bf..367295c 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -21,6 +21,7 @@ public class Config { public static boolean modTHKaguya; public static boolean modIC2; public static boolean modTofu; + public static boolean modTcon; public static void ConfigRead(FMLPreInitializationEvent event) { @@ -63,6 +64,7 @@ public static void configForPlugin(Configuration cfg) { modTHKaguya = cfg.getBoolean("THKaguya", "general", true, ""); modIC2 = cfg.getBoolean("IC2", "general", true, ""); modTofu = cfg.getBoolean("Tofu", "general", true, ""); + modTcon = cfg.getBoolean("Tcon", "general", true, ""); } diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 32241e5..c9c4419 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -11,13 +11,14 @@ import shift.sextiarysector.block.BlockFluidCrafter; import shift.sextiarysector.block.BlockFluidFurnace; import shift.sextiarysector.block.BlockFoodSmokers; +import shift.sextiarysector.block.BlockFreezer; import shift.sextiarysector.block.BlockGFTank; import shift.sextiarysector.block.BlockGearBox; import shift.sextiarysector.block.BlockGearShaft; import shift.sextiarysector.block.BlockHole; import shift.sextiarysector.block.BlockLargeFurnace; import shift.sextiarysector.block.BlockLargeOre; -import shift.sextiarysector.block.BlockMagicFurnace; +import shift.sextiarysector.block.BlockMagiFurnace; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockPaddy; import shift.sextiarysector.block.BlockPowerStone; @@ -49,6 +50,7 @@ import shift.sextiarysector.tileentity.TileEntityFluidCrafter; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityFoodSmokers; +import shift.sextiarysector.tileentity.TileEntityFreezer; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityGearBox; import shift.sextiarysector.tileentity.TileEntityGearShaft; @@ -79,6 +81,7 @@ public class SSBlocks { public static Block fluidFurnace; public static Block foodSmokers; public static Block magicFurnace; + public static Block freezer; @@ -217,10 +220,14 @@ public static void initBlicks(){ GameRegistry.registerBlock(foodSmokers, "FoodSmokers"); GameRegistry.registerTileEntity(TileEntityFoodSmokers.class, "FoodSmokers"); - magicFurnace = new BlockMagicFurnace().setBlockName("ss.magic_furnace").setCreativeTab(SextiarySectorAPI.TabSSMagic); + magicFurnace = new BlockMagiFurnace().setBlockName("ss.magic_furnace").setBlockTextureName("sextiarysector:magic/furnace").setCreativeTab(SextiarySectorAPI.TabSSMagic); GameRegistry.registerBlock(magicFurnace, "MagicFurnace"); GameRegistry.registerTileEntity(TileEntityMagicFurnace.class, "MagicFurnace"); + freezer = new BlockFreezer().setBlockName("ss.freezer").setBlockTextureName("sextiarysector:ice/freezer").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(freezer, "Freezer"); + GameRegistry.registerTileEntity(TileEntityFreezer.class, "Freezer"); + //bottle = new BlockBottle().setBlockName("ss.bottle").setBlockTextureName("glass"); //GameRegistry.registerBlock(bottle,ItemBlockBottle.class, "Bottle"); //GameRegistry.registerTileEntity(TileEntityBlockBottle.class, "Bottle"); diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index b58842d..70ec575 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -16,6 +16,9 @@ public class SSFluids { public static Fluid steam; + public static Fluid iron; + public static Fluid gold; + public static void initFluids(){ takumiTea = new SSFluid("TakumiTea", 0, 0x006400, 5, 2.0f).setUnlocalizedName("takumi_tea"); @@ -23,6 +26,9 @@ public static void initFluids(){ steam = new SSFluid("Steam", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("steam"); + iron = new SSFluid("Iron", 2, 0xFF1493, 1, 1.0f).setUnlocalizedName("iron"); + gold = new SSFluid("Gold", 2, 0xFFD700, 1, 1.0f).setUnlocalizedName("gold"); + } public static void postFluids(){ @@ -72,6 +78,7 @@ public IIcon getStillIcon() switch(type){ case 0:return ClientEventHandler.waterStill; case 1:return ClientEventHandler.portal; + case 2:return ClientEventHandler.lavaStill; } return ClientEventHandler.waterStill; } @@ -82,6 +89,7 @@ public IIcon getFlowingIcon() switch(type){ case 0:return ClientEventHandler.waterFlow; case 1:return ClientEventHandler.portal; + case 2:return ClientEventHandler.lavaFlow; } return ClientEventHandler.waterStill; } diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 2e3e624..9ec2c12 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -6,6 +6,7 @@ import net.minecraft.world.World; import shift.sextiarysector.container.ContainerCraftFurnace; import shift.sextiarysector.container.ContainerFluidMachineBase; +import shift.sextiarysector.container.ContainerFreezer; import shift.sextiarysector.container.ContainerGFTank; import shift.sextiarysector.container.ContainerLargeFurnace; import shift.sextiarysector.container.ContainerMagicFurnace; @@ -16,6 +17,7 @@ import shift.sextiarysector.gui.GuiCraftFurnace; import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiFoodSmokers; +import shift.sextiarysector.gui.GuiFreezer; import shift.sextiarysector.gui.GuiGFTank; import shift.sextiarysector.gui.GuiInventoryNext; import shift.sextiarysector.gui.GuiLargeFurnace; @@ -32,6 +34,7 @@ import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.tileentity.TileEntityCraftFurnace; import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; +import shift.sextiarysector.tileentity.TileEntityFreezer; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityLargeFurnace; import shift.sextiarysector.tileentity.TileEntityMagicFurnace; @@ -62,6 +65,7 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x return new ContainerFluidMachineBase(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); case 5 : return new ContainerCraftFurnace(player.inventory, (TileEntityCraftFurnace) world.getTileEntity(x, y, z)); + case 6 : return new ContainerFreezer(player.inventory, (TileEntityFreezer) world.getTileEntity(x, y, z)); case 20: case 21: @@ -127,6 +131,7 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x case 2 : return new GuiFoodSmokers(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); case 5 : return new GuiCraftFurnace(player.inventory, (TileEntityCraftFurnace) world.getTileEntity(x, y, z)); + case 6 : return new GuiFreezer(player.inventory, (TileEntityFreezer) world.getTileEntity(x, y, z)); case 20:return new GuiMillstone(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); case 21:return new GuiLoom(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index 4966af5..abcf1b8 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -77,6 +77,11 @@ public static void init(){ OreDictionary.registerOre("ringIron", SSItems.ironRing); + + //液体金属 + OreDictionary.registerOre("fluidIron", new ItemStack(SSBlocks.fluidCrafter, 1, SSFluids.iron.getID())); + OreDictionary.registerOre("fluidGold", new ItemStack(SSBlocks.fluidCrafter, 1, SSFluids.gold.getID())); + Item[] Knife = new Item[]{SSItems.woodKnife, SSItems.stoneKnife, SSItems.ironKnife, SSItems.goldKnife, SSItems.diamondKnife}; for(int i =0;i= 3 && p_82846_2_ < 30) + { + if (!this.mergeItemStack(itemstack1, 30, 39, false)) + { + return null; + } + } + else if (p_82846_2_ >= 30 && p_82846_2_ < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 3, 39, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack)null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index e7b58ad..34f3ea7 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -119,6 +119,9 @@ public void onItemTooltipEvent(ItemTooltipEvent event) { public static IIcon portal; + public static IIcon lavaFlow; + public static IIcon lavaStill; + @SubscribeEvent public void PreTextureStitchEvent(TextureStitchEvent.Pre event){ @@ -142,6 +145,8 @@ public void PreTextureStitchEvent(TextureStitchEvent.Pre event){ waterFlow = event.map.registerIcon("sextiarysector:fluid/water_flow"); waterStill = event.map.registerIcon("sextiarysector:fluid/water_still"); portal = event.map.registerIcon("sextiarysector:fluid/portal"); + lavaFlow = event.map.registerIcon("sextiarysector:fluid/lava_flow"); + lavaStill = event.map.registerIcon("sextiarysector:fluid/lava_still"); } } diff --git a/src/main/java/shift/sextiarysector/gui/GuiFreezer.java b/src/main/java/shift/sextiarysector/gui/GuiFreezer.java new file mode 100644 index 0000000..75b4e46 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiFreezer.java @@ -0,0 +1,51 @@ +package shift.sextiarysector.gui; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.container.ContainerFreezer; +import shift.sextiarysector.tileentity.TileEntityFreezer; + +public class GuiFreezer extends GuiContainer +{ + private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("sextiarysector:textures/guis/freezer.png"); + private TileEntityFreezer tileFurnace; + private static final String __OBFID = "CL_00000758"; + + public GuiFreezer(InventoryPlayer p_i1091_1_, TileEntityFreezer p_i1091_2_) + { + super(new ContainerFreezer(p_i1091_1_, p_i1091_2_)); + this.tileFurnace = p_i1091_2_; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + String s = this.tileFurnace.hasCustomInventoryName() ? this.tileFurnace.getInventoryName() : I18n.format(this.tileFurnace.getInventoryName(), new Object[0]); + this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(furnaceGuiTextures); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + + if (this.tileFurnace.isFuel()) + { + int i1 = this.tileFurnace.getEnergyProgressScaled(13); + this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1); + i1 = this.tileFurnace.getWorkProgressScaled(24); + this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); + } + } +} diff --git a/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java b/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java index 805d9ed..7b3545e 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java +++ b/src/main/java/shift/sextiarysector/gui/tab/GuiBackButton.java @@ -3,8 +3,11 @@ import java.util.List; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; +import org.lwjgl.opengl.GL11; + public class GuiBackButton extends GuiButton{ private int cornerX; @@ -32,4 +35,43 @@ public boolean mousePressed (Minecraft mc, int mouseX, int mouseY) return inWindow; } + + @Override + public void drawButton (Minecraft mc, int mouseX, int mouseY) + { + if (this.visible) + { + FontRenderer fontrenderer = mc.fontRenderer; + mc.renderEngine.bindTexture(buttonTextures); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.field_146123_n = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; + int k = this.getHoverState(this.field_146123_n); + //GL11.glEnable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_DEPTH_TEST); + //OpenGlHelper.glBlendFunc(770, 771, 1, 0); + //GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + this.zLevel = 0.0F; + this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + k * 20, this.width / 2, this.height); + this.drawTexturedModalRect(this.xPosition + this.width / 2, this.yPosition, 200 - this.width / 2, 46 + k * 20, this.width / 2, this.height); + this.mouseDragged(mc, mouseX, mouseY); + int l = 14737632; + + if (packedFGColour != 0) + { + l = packedFGColour; + } + else if (!this.enabled) + { + l = 10526880; + } + else if (this.field_146123_n) + { + l = 16777120; + } + + this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l); + this.zLevel = 0.0F; + GL11.glDisable(GL11.GL_DEPTH_TEST); + } + } } diff --git a/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java b/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java index bad3da0..bb32772 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java +++ b/src/main/java/shift/sextiarysector/gui/tab/GuiNextButton.java @@ -3,8 +3,11 @@ import java.util.List; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; +import org.lwjgl.opengl.GL11; + public class GuiNextButton extends GuiButton{ private int cornerX; @@ -32,4 +35,43 @@ public boolean mousePressed (Minecraft mc, int mouseX, int mouseY) return inWindow; } + + @Override + public void drawButton (Minecraft mc, int mouseX, int mouseY) + { + if (this.visible) + { + FontRenderer fontrenderer = mc.fontRenderer; + mc.renderEngine.bindTexture(buttonTextures); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.field_146123_n = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; + int k = this.getHoverState(this.field_146123_n); + //GL11.glEnable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_DEPTH_TEST); + //OpenGlHelper.glBlendFunc(770, 771, 1, 0); + //GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + this.zLevel = 0.0F; + this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + k * 20, this.width / 2, this.height); + this.drawTexturedModalRect(this.xPosition + this.width / 2, this.yPosition, 200 - this.width / 2, 46 + k * 20, this.width / 2, this.height); + this.mouseDragged(mc, mouseX, mouseY); + int l = 14737632; + + if (packedFGColour != 0) + { + l = packedFGColour; + } + else if (!this.enabled) + { + l = 10526880; + } + else if (this.field_146123_n) + { + l = 16777120; + } + + this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l); + this.zLevel = 0.0F; + GL11.glDisable(GL11.GL_DEPTH_TEST); + } + } } diff --git a/src/main/java/shift/sextiarysector/nei/AbstractFuel2RecipeHandler.java b/src/main/java/shift/sextiarysector/nei/AbstractFuel2RecipeHandler.java new file mode 100644 index 0000000..7e6fafb --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/AbstractFuel2RecipeHandler.java @@ -0,0 +1,129 @@ +package shift.sextiarysector.nei; + +import static codechicken.nei.NEIClientUtils.*; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; + +import net.minecraft.client.resources.I18n; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.GuiRecipe; + +public abstract class AbstractFuel2RecipeHandler extends AbstractSimple2RecipeHandler{ + + public class CachedFuelRecipe extends CachedRecipe + { + public FuelPair fuel; + + public CachedFuelRecipe(FuelPair fuel) { + this.fuel = fuel; + } + + @Override + public PositionedStack getIngredient() { + return mfurnace.get(cycleticks / 48 % mfurnace.size()).ingred; + } + + @Override + public PositionedStack getResult() { + return mfurnace.get(cycleticks / 48 % mfurnace.size()).result; + } + + @Override + public PositionedStack getOtherStack() { + return fuel.stack; + } + } + + private ArrayList mfurnace = new ArrayList(); + + public AbstractFuel2RecipeHandler() { + super(); + loadAllSmelting(); + } + + public String getRecipeName() { + return I18n.format("nei."+getGuiRecipeName()); + } + + private void loadAllSmelting() { + + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = recipe.getValue(); + if(OreDictionary.getOres(recipe.getKey()).size()>=1){ + mfurnace.add(new SimpleMachinePair(OreDictionary.getOres(recipe.getKey()), item)); + } + + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = recipe.getValue(); + mfurnace.add(new SimpleMachinePair(recipe.getKey(), item)); + } + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) { + if (outputId.equals(getFuelHandlerName()) && getClass() == getFuelHandlerClass()) + for (FuelPair fuel : afuels) + arecipes.add(new CachedFuelRecipe(fuel)); + } + + public void loadUsageRecipes(ItemStack ingredient) { + for (FuelPair fuel : afuels) + if (fuel.stack.contains(ingredient)) + arecipes.add(new CachedFuelRecipe(fuel)); + } + + public String getOverlayIdentifier() { + return getFuelHandlerName(); + } + + @Override + public List handleItemTooltip(GuiRecipe gui, ItemStack stack, List currenttip, int recipe) { + CachedFuelRecipe crecipe = (CachedFuelRecipe) arecipes.get(recipe); + FuelPair fuel = crecipe.fuel; + float burnTime = fuel.burnTime / 200F; + + if (gui.isMouseOver(fuel.stack, recipe) && burnTime < 1) { + burnTime = 1F / burnTime; + String s_time = Float.toString(burnTime); + if (burnTime == Math.round(burnTime)) + s_time = Integer.toString((int) burnTime); + + currenttip.add(translate("recipe.fuel.required", s_time)); + } else if ((gui.isMouseOver(crecipe.getResult(), recipe) || gui.isMouseOver(crecipe.getIngredient(), recipe)) && burnTime > 1) { + String s_time = Float.toString(burnTime); + if (burnTime == Math.round(burnTime)) + s_time = Integer.toString((int) burnTime); + + currenttip.add(translate("recipe.fuel." + (gui.isMouseOver(crecipe.getResult(), recipe) ? "produced" : "processed"), s_time)); + } + + return currenttip; + } + + abstract Class getFuelHandlerClass(); + + @Override + Class getHandlerClass() { + return null; + } + + @Override + String getHandlerName() { + return ""; + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/AbstractSimple2RecipeHandler.java b/src/main/java/shift/sextiarysector/nei/AbstractSimple2RecipeHandler.java new file mode 100644 index 0000000..3d5d6a5 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/AbstractSimple2RecipeHandler.java @@ -0,0 +1,250 @@ +package shift.sextiarysector.nei; + +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map.Entry; +import java.util.Set; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import shift.sextiarysector.recipe.RecipeSimpleMachine; +import codechicken.nei.ItemList; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.TemplateRecipeHandler; + +public abstract class AbstractSimple2RecipeHandler extends TemplateSSRecipeHandler{ + + public class SimpleMachinePair extends CachedRecipe + { + public SimpleMachinePair(ItemStack ingred, ItemStack result) + { + ingred.stackSize = 1; + this.ingred = new PositionedStack(ingred, 51, 42); + this.result = new PositionedStack(result, 111, 24); + } + + public SimpleMachinePair(List ingred, ItemStack result) + { + for(int i = 0;i afuels; + + public PositionedStack getResult() { + return null; + } + + @Override + public String getOverlayIdentifier() { + return getHandlerName(); + } + + @Override + public void loadTransferRects() { + transferRects.add(new RecipeTransferRect(new Rectangle(50, 23, 18, 18), getFuelHandlerName())); + transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(74, 23, 24, 18), getHandlerName())); + } + + @Override + public TemplateRecipeHandler newInstance() { + if (afuels == null) + findFuels(); + return super.newInstance(); + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) + { + if(outputId.equals(getHandlerName()) && getClass() == getHandlerClass())//don't want subclasses getting a hold of this + { + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = recipe.getValue(); + if(OreDictionary.getOres(recipe.getKey()).size()>=1){ + arecipes.add(new SimpleMachinePair(OreDictionary.getOres(recipe.getKey()), item)); + } + + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = recipe.getValue(); + arecipes.add(new SimpleMachinePair(recipe.getKey(), item)); + } + } + else + { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(ItemStack result) + { + + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = recipe.getValue(); + if(NEIServerUtils.areStacksSameType(item, result)) + { + if(OreDictionary.getOres(recipe.getKey()).size()>=1){ + arecipes.add(new SimpleMachinePair(OreDictionary.getOres(recipe.getKey()), item)); + } + + } + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = recipe.getValue(); + if(NEIServerUtils.areStacksSameType(item, result)) + { + arecipes.add(new SimpleMachinePair(recipe.getKey(), item)); + } + } + } + + @Override + public void loadUsageRecipes(String inputId, Object... ingredients) { + if (inputId.equals(getFuelHandlerName()) && getClass() == getHandlerClass())//don't want subclasses getting a hold of this + loadCraftingRecipes(getHandlerName()); + else + super.loadUsageRecipes(inputId, ingredients); + } + + @Override + public void loadUsageRecipes(ItemStack ingredient) + { + + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + for(Entry recipe : recipes.entrySet()) + { + ItemStack item = recipe.getValue(); + ArrayList items = OreDictionary.getOres(recipe.getKey()); + for(int i = 0; i< items.size() ; i++){ + if(this.checkItem(items.get(i),ingredient)){ + arecipes.add(new SimpleMachinePair(items, item)); + break; + } + } + } + + if(metarecipes == null)return; + for(Entry recipe : metarecipes.entrySet()) + { + ItemStack item = recipe.getValue(); + //if(ingredient.itemID == recipe.getKey().get(0) && ingredient.getItemDamage() == recipe.getKey().get(1)) + if(this.checkItem(ingredient, recipe.getKey())) + { + arecipes.add(new SimpleMachinePair(ingredient, item)); + } + } + } + + private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } + + @Override + public void drawExtras(int recipe) + { + drawProgressBar(51, 25, 176, 0, 14, 14, 48, 7); + drawProgressBar(74, 23, 176, 14, 24, 16, 48, 0); + } + + private static Set excludedFuels() { + Set efuels = new HashSet(); + efuels.add(Item.getItemFromBlock(Blocks.brown_mushroom)); + efuels.add(Item.getItemFromBlock(Blocks.red_mushroom)); + efuels.add(Item.getItemFromBlock(Blocks.standing_sign)); + efuels.add(Item.getItemFromBlock(Blocks.wall_sign)); + efuels.add(Item.getItemFromBlock(Blocks.wooden_door)); + efuels.add(Item.getItemFromBlock(Blocks.trapped_chest)); + return efuels; + } + + private void findFuels() { + afuels = new ArrayList(); + Set efuels = excludedFuels(); + for (ItemStack item : ItemList.items) + if (!efuels.contains(item.getItem())) { + int burnTime = getFuelTime(item); + if (burnTime > 0) + afuels.add(new FuelPair(item.copy(), burnTime)); + } + } + + abstract Class getHandlerClass(); + abstract String getHandlerName(); + abstract RecipeSimpleMachine getRecipe(); + abstract String getGuiRecipeName(); + public abstract Class getGuiClass(); + abstract String getFuelHandlerName(); + abstract int getFuelTime(ItemStack item); + + @Override + public String getRecipeName() { + return I18n.format("nei."+getGuiRecipeName()); + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/AbstractSimpleRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/AbstractSimpleRecipeHandler.java index bc5438d..d7be6bc 100644 --- a/src/main/java/shift/sextiarysector/nei/AbstractSimpleRecipeHandler.java +++ b/src/main/java/shift/sextiarysector/nei/AbstractSimpleRecipeHandler.java @@ -8,12 +8,12 @@ import java.util.Map.Entry; import java.util.Set; +import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -import shift.sextiarysector.gui.GuiMagicFurnace; import shift.sextiarysector.recipe.RecipeSimpleMachine; import codechicken.nei.ItemList; import codechicken.nei.NEIServerUtils; @@ -238,7 +238,7 @@ private void findFuels() { abstract String getHandlerName(); abstract RecipeSimpleMachine getRecipe(); abstract String getGuiRecipeName(); - public abstract Class getGuiClass(); + public abstract Class getGuiClass(); abstract String getFuelHandlerName(); abstract int getFuelTime(ItemStack item); diff --git a/src/main/java/shift/sextiarysector/nei/FreezerRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/FreezerRecipeHandler.java new file mode 100644 index 0000000..f49a0d1 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/FreezerRecipeHandler.java @@ -0,0 +1,52 @@ +package shift.sextiarysector.nei; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiFreezer; +import shift.sextiarysector.recipe.RecipeSimpleMachine; + +public class FreezerRecipeHandler extends AbstractSimple2RecipeHandler{ + + @Override + Class getHandlerClass() { + return FreezerRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_Freezer"; + } + + + @Override + RecipeSimpleMachine getRecipe() { + return SSRecipes.freezer; + } + + @Override + String getGuiRecipeName() { + return "ss.freezer"; + } + + @Override + public Class getGuiClass() { + return GuiFreezer.class; + } + + @Override + String getFuelHandlerName() { + return "SS_IceFuel"; + } + + @Override + int getFuelTime(ItemStack item) { + return SSRecipes.iceFuel.getResult(item); + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/freezer.png"; + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/IceFuelRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/IceFuelRecipeHandler.java new file mode 100644 index 0000000..442982a --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/IceFuelRecipeHandler.java @@ -0,0 +1,50 @@ +package shift.sextiarysector.nei; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiFreezer; +import shift.sextiarysector.recipe.RecipeSimpleMachine; + +public class IceFuelRecipeHandler extends AbstractFuel2RecipeHandler{ + + @Override + Class getFuelHandlerClass() { + return IceFuelRecipeHandler.class; + } + + @Override + RecipeSimpleMachine getRecipe() { + return SSRecipes.freezer; + } + + @Override + String getGuiRecipeName() { + return "ss.ice_fuel"; + } + + @Override + public Class getGuiClass() { + return GuiFreezer.class; + } + + @Override + String getFuelHandlerName() { + return "SS_IceFuel"; + } + + @Override + String getHandlerName() { + return "SS_Freezer"; + } + + @Override + int getFuelTime(ItemStack item) { + return SSRecipes.iceFuel.getResult(item); + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/freezer.png"; + } +} diff --git a/src/main/java/shift/sextiarysector/nei/MagicFurnaceRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/MagicFurnaceRecipeHandler.java index 3df4333..d9f6fac 100644 --- a/src/main/java/shift/sextiarysector/nei/MagicFurnaceRecipeHandler.java +++ b/src/main/java/shift/sextiarysector/nei/MagicFurnaceRecipeHandler.java @@ -1,5 +1,6 @@ package shift.sextiarysector.nei; +import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.item.ItemStack; import shift.sextiarysector.SSRecipes; import shift.sextiarysector.gui.GuiMagicFurnace; @@ -29,7 +30,7 @@ String getGuiRecipeName() { } @Override - public Class getGuiClass() { + public Class getGuiClass() { return GuiMagicFurnace.class; } diff --git a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java index a323c5d..9a04ef3 100644 --- a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java +++ b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java @@ -2,6 +2,7 @@ import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiFoodSmokers; +import shift.sextiarysector.gui.GuiFreezer; import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMagicFurnace; @@ -60,6 +61,10 @@ public void loadConfig() { API.registerRecipeHandler(new MagicFuelRecipeHandler()); API.registerUsageHandler(new MagicFuelRecipeHandler()); + API.registerRecipeHandler(new FreezerRecipeHandler()); + API.registerUsageHandler(new FreezerRecipeHandler()); + API.registerRecipeHandler(new IceFuelRecipeHandler()); + API.registerUsageHandler(new IceFuelRecipeHandler()); API.registerRecipeHandler(new FertilizerFarmlandRecipeHandler()); API.registerUsageHandler(new FertilizerFarmlandRecipeHandler()); @@ -84,6 +89,7 @@ public void loadConfig() { API.registerGuiOverlay(GuiFluidFurnace.class, "SS_FluidFurnace"); API.registerGuiOverlay(GuiFoodSmokers.class, "SS_FoodSmokers"); API.registerGuiOverlay(GuiMagicFurnace.class, "SS_MagicFurnace"); + API.registerGuiOverlay(GuiFreezer.class, "SS_Freezer"); API.registerGuiOverlay(GuiMillstone.class, "SS_Millstone"); API.registerGuiOverlay(GuiLoom.class, "SS_Loom"); diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTcon.java b/src/main/java/shift/sextiarysector/plugin/PluginTcon.java new file mode 100644 index 0000000..89e2be9 --- /dev/null +++ b/src/main/java/shift/sextiarysector/plugin/PluginTcon.java @@ -0,0 +1,134 @@ +package shift.sextiarysector.plugin; + +import java.lang.reflect.Field; +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.event.GuiScreenEvent; +import net.minecraftforge.common.MinecraftForge; +import shift.sextiarysector.gui.tab.TabManager; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PluginTcon implements IPlugin{ + + @SideOnly(Side.CLIENT) + private static TconTab openTab; + + @Override + public String getModName() { + return "TConstruct"; + } + + @Override + public void prePlugin(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void preClientPlugin(FMLPreInitializationEvent event) { + + MinecraftForge.EVENT_BUS.register(this); + + } + + @Override + public void initPlugin(FMLInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void guiPostInit (GuiScreenEvent.InitGuiEvent.Post event) + { + + if (openTab!=null) + { + + int xSize = 176; + int ySize = 166; + int guiLeft = (event.gui.width - xSize) / 2; + int guiTop = (event.gui.height - ySize) / 2; + + TabManager.updateTabValues(guiLeft, guiTop,event.buttonList, openTab, false); + + openTab = null; + + } + + } + + @Override + public void postPlugin(FMLPostInitializationEvent event) { + + ArrayList tabs = tconstruct.client.tabs.TabRegistry.getTabList(); + + for(int i=1;i c = tconstruct.client.tabs.AbstractTab.class; + Field f = c.getDeclaredField("renderStack"); + f.setAccessible(true); + this.item = (ItemStack) f.get(this.tab); + + + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } catch (SecurityException e) { + e.printStackTrace(); + } + + } + + @Override + public void onTabClicked() { + + openTab = this; + tab.onTabClicked(); + + } + + @Override + public ItemStack getItemStack() { + return this.item; + } + + @Override + public String getTabName() { + return "Tcon"; + } + + @Override + public boolean shouldAddToList() { + return tab.shouldAddToList(); + } + + } + +} diff --git a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java index b09c387..0c0d82a 100644 --- a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java +++ b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java @@ -20,6 +20,7 @@ public class SSPlugins { public static boolean modTHKaguya; public static boolean modIC2; public static boolean modTofu; + public static boolean modTcon; public static void initModHelper() { @@ -28,6 +29,7 @@ public static void initModHelper() { modTHKaguya = Loader.isModLoaded("THKaguyaMod") && Config.modTHKaguya; modIC2 = Loader.isModLoaded("IC2") && Config.modIC2; modTofu = Loader.isModLoaded("TofuCraft") && Config.modTofu; + modTcon = Loader.isModLoaded("TConstruct") && Config.modTcon; if (modDCsAppleMilk) { @@ -98,7 +100,22 @@ public static void initModHelper() { } catch (Exception e) { - SextiarySector.Log.log(Level.WARN, "IC2 integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.log(Level.WARN, "TofuCraft integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.catching(e); + + } + } + + if (modTcon) { + + try { + + SextiarySector.Log.info("TConstruct Plugin is loaded"); + plugins.add(new PluginTcon()); + + } catch (Exception e) { + + SextiarySector.Log.log(Level.WARN, "TConstruct integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); SextiarySector.Log.catching(e); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java index 8074523..03968b2 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java @@ -36,6 +36,7 @@ public ItemStack getResult(ItemStack item) ArrayList items = OreDictionary.getOres(key); for(int i = 0; i< items.size() ; i++){ if(checkItem(item,items.get(i))){ + if((ItemStack) oreSimpleMachineList.get(key)[0] == null)return null; return ((ItemStack) oreSimpleMachineList.get(key)[0]).copy(); } } @@ -55,6 +56,8 @@ public ItemStack getResult(ItemStack item) } while (!this.checkItem(item, (ItemStack)entry.getKey())); + if(((ItemStack) ((Object[])entry.getValue())[0]) == null)return null; + return ((ItemStack) ((Object[])entry.getValue())[0]).copy(); //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); @@ -70,6 +73,7 @@ public FluidStack getFluidResult(ItemStack item) ArrayList items = OreDictionary.getOres(key); for(int i = 0; i< items.size() ; i++){ if(checkItem(item,items.get(i))){ + if((FluidStack) oreSimpleMachineList.get(key)[1] == null)return null; return ((FluidStack) oreSimpleMachineList.get(key)[1]).copy(); } } @@ -89,6 +93,8 @@ public FluidStack getFluidResult(ItemStack item) } while (!this.checkItem(item, (ItemStack)entry.getKey())); + if((FluidStack) ((Object[])entry.getValue())[1] == null)return null; + return ((FluidStack) ((Object[])entry.getValue())[1]).copy(); //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java index 0a6fe76..ce292b6 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java @@ -13,6 +13,12 @@ public static void addRecipes(RecipeSimpleFluid recipe) //recipe.add(new ItemStack(Blocks.netherrack,1),null, new FluidStack(SSFluids.drinkingWater, 50)); recipe.add(new ItemStack(Items.water_bucket,1),new ItemStack(Items.stick, 1), new FluidStack(SSFluids.drinkingWater, 1000)); + recipe.add(new ItemStack(Items.iron_door,1), null, new FluidStack(SSFluids.iron, 5000)); + recipe.add(new ItemStack(Items.iron_ingot,1), null, new FluidStack(SSFluids.iron, 1000)); + + + recipe.add(new ItemStack(Items.gold_ingot,1), null, new FluidStack(SSFluids.gold, 1000)); + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFreezer.java b/src/main/java/shift/sextiarysector/recipe/RecipesFreezer.java new file mode 100644 index 0000000..7b5d851 --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFreezer.java @@ -0,0 +1,19 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +public class RecipesFreezer { + + public static void addRecipes(RecipeSimpleMachine recipe) + { + + recipe.add("fluidWater",new ItemStack(Blocks.ice)); + + recipe.add("fluidIron",new ItemStack(Items.iron_ingot)); + recipe.add("fluidGold",new ItemStack(Items.gold_ingot)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesIceFuel.java b/src/main/java/shift/sextiarysector/recipe/RecipesIceFuel.java new file mode 100644 index 0000000..fca81aa --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesIceFuel.java @@ -0,0 +1,15 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +public class RecipesIceFuel { + + public static void addRecipes(RecipeSimpleFuel recipe) + { + recipe.add(new ItemStack(Items.snowball,1), 200); + recipe.add(new ItemStack(Blocks.ice,1), 1600); + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java b/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java index 503d106..f4f0675 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java @@ -139,6 +139,8 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_LIGHTING); + GL11.glColor3f(1,1,1); + float scale = 0.0625f; // float scale = 0.125f; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java index e28a059..90775b7 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidMachineBase.java @@ -231,15 +231,20 @@ public void workItem() FluidStack fluidstack = this.getFluidResult(this.items.getStackInSlot(0)); //item - if (this.items.getStackInSlot(2) == null) - { - this.setInventorySlotContents(2, itemstack.copy()); - } - else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) - { - this.items.getStackInSlot(2).stackSize += itemstack.stackSize; + if(itemstack!=null){ + + if (this.items.getStackInSlot(2) == null) + { + this.setInventorySlotContents(2, itemstack.copy()); + } + else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) + { + this.items.getStackInSlot(2).stackSize += itemstack.stackSize; + } + } + //CItem if(this.items.getStackInSlot(0).getItem().hasContainerItem(this.items.getStackInSlot(0))){ diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFreezer.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFreezer.java new file mode 100644 index 0000000..0875385 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFreezer.java @@ -0,0 +1,90 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.container.ItemBox; + +public class TileEntityFreezer extends TileEntitySimpleFurnace{ + + protected static final int[] slots_top = new int[] { 0 }; + protected static final int[] slots_bottom = new int[] { 2, 1 }; + protected static final int[] slots_sides = new int[] { 1 }; + + //0 素材 ,1 燃料 ,2 完成品 + protected ItemBox items = new ItemBox("Base", 3); + + protected ItemStack getFuelItem(){ + return this.items.getStackInSlot(1); + } + + protected int getFuelItemSlot(){ + return 1; + } + + protected void reduceFuelStackSize(){ + this.items.reduceStackSize(1, 1); + } + + protected ItemStack getMaterialItem(){ + return this.items.getStackInSlot(0); + } + + protected int getResultItemSlot(){ + return 2; + } + + protected void reduceMaterialStackSize(){ + this.items.reduceStackSize(0, 1); + } + + protected ItemStack getResult(ItemStack stackInSlot) { + return SSRecipes.freezer.getResult(stackInSlot); + } + + public int getItemFuelTime(ItemStack p_145952_0_) + { + if (p_145952_0_ == null) + { + return 0; + } + else + { + return SSRecipes.iceFuel.getResult(p_145952_0_); + } + } + + protected ItemBox getItems(){ + return items; + } + + @Override + public String getInventoryName() { + return "gui.ss.freezer";//+SimpleMachine.values()[this.worldObj.getBlockMetadata(xCoord, yCoord, zCoord)].icon+".name"; + } + + //NBT関係 + @Override + public void readFromNBT(NBTTagCompound nbt) { + + super.readFromNBT(nbt); + items.readFromNBT(nbt); + + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + + super.writeToNBT(nbt); + items.writeToNBT(nbt); + + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ + this.readFromNBT(pkt.func_148857_g()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 4e23658..8a2f16e 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -7,6 +7,7 @@ tile.ss.fluid_furnace.name=Fluid Furnace tile.ss.food_smokers.name=Food Smokers tile.ss.magic_furnace.name=Magic Furnace +tile.ss.freezer.name=Freezer tile.ss.wood_grate.name=Wood Grate @@ -267,7 +268,8 @@ fluid.ss.takumi_tea=TAKUMI Tea fluid.ss.drinking_water=Drinking Water fluid.ss.steam=Steam -fluid.ss.steam=Steam +fluid.ss.iron=Iron Fluid +fluid.ss.gold=Gold Fluid #Potion ss.potion.burn=Burn @@ -281,6 +283,7 @@ container.mineboat_chest=Mineboat Chest gui.ss.fluid_furnace=Fluid Furnace gui.ss.food_smokers=Food Smokers gui.ss.magic_furnace=Magic Furnace +gui.ss.freezer=Freezer gui.ss.rucksack=Rucksack @@ -523,6 +526,9 @@ nei.ss.food_smokers=Food Smokers Recipe nei.ss.magic_furnace=Magic Furnace Recipe nei.ss.magic_fuel=Magic Fuel +nei.ss.freezer=Freezer Recipe +nei.ss.ice=fuel=Ice Fuel + nei.ss.millstone=Millstone Recipe nei.ss.loom=Loom Recipe nei.ss.sawmill=Sawmill Recipe diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_flow.png b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_flow.png new file mode 100644 index 0000000000000000000000000000000000000000..7f932ca6bf772ae24240aaa764e0cfff34dda160 GIT binary patch literal 6742 zcmZ8`2T)VZyEoFi^r8WRQl(==M5=<)5tI%=5D<_cEtt^qf^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B9 D_U$$$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_flow.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_flow.png.mcmeta new file mode 100644 index 0000000..8e55e43 --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_flow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 3 + } +} diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_still.png b/src/main/resources/assets/sextiarysector/textures/blocks/fluid/lava_still.png new file mode 100644 index 0000000000000000000000000000000000000000..ae41d3eb0bb1aa50d0dde8b5728864b48d8d162e GIT binary patch literal 6322 zcmWledpy(MAIIlD8Iu;vWw|A?a$BWL%q2#Y>ozk_^xN<8d3+w{^Er>tALqP2=k07#;(Egbo+ zGyouA3KZl&oec<#ia^CN3!hv!*_8?Ba>r6rIf4;491xdZb-}Z`aIUO8nWX28>OCI;h_pnl*J6 zUC`J_#Uf$3aZH8lNy^YvZ?_T*;Tt|mkp|@r>vX^B?pB~-Kes8RdJ~uY+=?8%p;WA5 z>fB;@dBe~~+$fI>-`?E3O#gUc(wW}M?#y8YG#QUFR-!1J+a9IrL!BfKx>kLvw`OJ^ z4{2am=x7tz)EcFD)Xs^y(ebyFw7q*Shc&#ow!Yp*3WTOcyUD^7g;9z$w~|5Zmq-s6 z7YgSg<_G>Oa@6LrW@f6l?l9RfXL4h=ljK$se5xYSBaZo>O|jp1LwgT;9FrdDL2sS< z95zUXS2UcdvUd->4qAfIxUuJWVjgrnaS2b%sC@(Ft*$o1ZQV*}tnrPwpVa&R{?fbO z^LBFMclxoFBmNIsr+7#!hXp*0dF>g!Ef}v2;~3_!42Q|@cu)7%+q?0^hedrF-q1Z> z^}is-DWG7VcRNF}|5C}3cz@(*{{w2-|36($nDpj zY2J_6pJR9b7I%rFnwgv@jcdqfoEV??kuxLy{nIB(hZn>3ScYxET_iTb4h#l|gFvnD z;X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NS z7Z;Xg6$%9*1ea27HXBv@^73*!6%n1EpKs3{hT-SuXFi|jjIlzYKtvA@5BNVcO|xxV r2$4HGI}5{5eeb`Lh=?)vy9U57Nx3^GovpCi00000NkvXXu0mjfo6j5t literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ice/freezer_front_on.png b/src/main/resources/assets/sextiarysector/textures/blocks/ice/freezer_front_on.png new file mode 100644 index 0000000000000000000000000000000000000000..ce0f3923e058e79c8d917b087fa31a7a0df6d0ae GIT binary patch literal 707 zcmV;!0zCbRP)Px#32;bRa{vGi!2kdb!2!6DYwZ9400(qQO+^RY1Q-n;DDrMe)&KwkRY^oaR4C7N zQcX)6Q4~GSd*jS7$v9HdC^3kUAZ}ch=)w|csw)kaX3<6egg>N&{)2A1>ZWU<0XJe4 zyKtqcv1pkL`r0JVF=ljf=XEhuN}+dg;oNgS&b{2Rm6a7D0uaYB5h&6bi2E9vvNBU0t*t4-|zSP?RNX{@I5}G{;r5OsQ)bDB~U}NS>M{)@;q;Ue;{3N~NM+oAUX5J`bSTY;w*y03n1B0zepsrfDV~K(E(J zg2{qH2q`58klediEIx9{oX5&A4A0NciAd8lo@6A%&d$#L{rzY(s?}-<91I4W^Ucl8 zbUJNWRun~CDK#7plit;8^-&cOt*@`+j|D++b91BXI%kYomPJG-Cnxy7X`1FZP83CB p<#IU)g5okmxg_`GuG~eWC=(_ohW>(qGVz<9xAo|}oloyKSnadd ze%9LSdCnG0CKDM928Ld*C#_aX8jXh3YBfVHmy^X}A+ZjeLZKj|(MUR-jszT(N+pU$ zqm)Xe$l-8MC={Z4z0PpE-OOh)8D4Q_x7#Tg41NrhN+tRIermVd6bJ+;oletkw_|j> zUCL&&4#P@wgC%_}bF77!J#AaQfA*JFr+)oMk@oB#~vFQD+76E!~pu2X?q=)ej900000@?kEP)#nY@ zno+&Kzr$j&NSMuL7>!043^8rbc2D0R$fwOUxMR+vmCsCZE>ml26XkV>WC za=8!+h0tg;Bs?CES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it ・鉄の道具をとかせるように ・プレート&液体を使用するレシピの追加 ・バージョン表記を2,1,3に変更 --- build.gradle | 2 +- .../java/shift/sextiarysector/SSBlocks.java | 2 +- .../shift/sextiarysector/SSOreDictionary.java | 3 + .../shift/sextiarysector/SextiarySector.java | 2 +- .../sextiarysector/recipe/RecipesCore.java | 6 + .../recipe/RecipesFluidFurnace.java | 12 ++ .../recipe/RecipesFurnaceCraft.java | 8 + .../sextiarysector/recipe/RecipesMachine.java | 2 +- .../sextiarysector/recipe/RecipesTool.java | 152 ++++++++++++++++++ 9 files changed, 185 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index f2a0a60..e715488 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.2.a-${project.minecraft.version}" +version = "2.1.3.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index c9c4419..cac062e 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -242,7 +242,7 @@ public static void initBlicks(){ woodHopper = new BlockWoodHopper().setBlockName("ss.wood_hopper").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodHopper, "WoodHopper"); - square = new BlockSquare().setBlockName("ss.square"); + square = new BlockSquare().setBlockName("ss.square").setBlockTextureName("planks_oak"); GameRegistry.registerBlock(square, ItemBlockDirection.class, "Square"); GameRegistry.registerTileEntity(TileEntitySquare.class, "Square"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index abcf1b8..f01fbaf 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -38,6 +38,9 @@ public static void init(){ OreDictionary.registerOre("plateWood", SSBlocks.woodAcaciaPlate); OreDictionary.registerOre("plateWood", SSBlocks.woodBigOakPlate); + OreDictionary.registerOre("plateIron", SSBlocks.ironPlate); + OreDictionary.registerOre("plateGold", SSBlocks.goldPlate); + /* OreDictionary.registerOre("plankWood", SSBlocks.woodOakPlate); OreDictionary.registerOre("plankWood", SSBlocks.woodBirchPlate); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 5c9231d..890cf74 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -33,7 +33,7 @@ public class SextiarySector { //public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.1.2"; + public static final String VERSION = "2.1.3"; @Mod.Instance("SextiarySector") public static SextiarySector instance; diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index b1e7366..bb69a71 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -46,6 +46,12 @@ public static void addRecipes(CraftingManager p_77608_1_) 'x', "plateWood", })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.rucksack, 1), + new Object[] { + "xxx","x x", "xxx", + 'x', SSItems.cloth, + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.mineboatChest, 1), new Object[] { "x", "y", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java index ce292b6..d6d09d7 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java @@ -15,9 +15,21 @@ public static void addRecipes(RecipeSimpleFluid recipe) recipe.add(new ItemStack(Items.iron_door,1), null, new FluidStack(SSFluids.iron, 5000)); recipe.add(new ItemStack(Items.iron_ingot,1), null, new FluidStack(SSFluids.iron, 1000)); + recipe.add(new ItemStack(Items.iron_axe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 2500)); + recipe.add(new ItemStack(Items.iron_hoe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 1500)); + recipe.add(new ItemStack(Items.iron_pickaxe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 2500)); + recipe.add(new ItemStack(Items.iron_shovel,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 500)); + recipe.add(new ItemStack(Items.iron_sword,1), new ItemStack(Items.stick, 1), new FluidStack(SSFluids.iron, 1500)); recipe.add(new ItemStack(Items.gold_ingot,1), null, new FluidStack(SSFluids.gold, 1000)); + recipe.add(new ItemStack(Items.golden_axe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 2500)); + recipe.add(new ItemStack(Items.golden_hoe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 1500)); + recipe.add(new ItemStack(Items.golden_pickaxe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 2500)); + recipe.add(new ItemStack(Items.golden_shovel,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 500)); + recipe.add(new ItemStack(Items.golden_sword,1), new ItemStack(Items.stick, 1), new FluidStack(SSFluids.gold, 1500)); + + } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index b21dad6..25075d8 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -108,6 +108,14 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) Character.valueOf('y'), SSItems.magicDust, })); + //フリーザー + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSBlocks.freezer, 1), + new Object[] { + SSItems.objectReactor, + Blocks.ice, + Blocks.furnace, + })); + //乾燥機 p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.foodSmokers, 1), new Object[] { "xxx", "xyx","xxx", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index 3339c4c..9cf6486 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -195,7 +195,7 @@ public static void addRecipes(CraftingManager p_77608_1_) } - for(int i=0;i<3;i++){ + for(int i=0;i<5;i++){ p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(storage[i], 1), new Object[] { " y ", "xzx","xzx", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java index d03e382..729754d 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java @@ -1,5 +1,7 @@ package shift.sextiarysector.recipe; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; @@ -42,6 +44,156 @@ public static void addRecipes(CraftingManager p_77608_1_) })); } + Item[] ironTool = new Item[]{Items.iron_axe, Items.iron_hoe, Items.iron_pickaxe, Items.iron_shovel, Items.iron_sword}; + + String[] materialIron = new String[]{"plateIron","fluidIron"}; + + for(int i = 0;i Date: Tue, 27 Jan 2015 21:47:56 +0900 Subject: [PATCH 64/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=80=80=E3=83=9E?= =?UTF-8?q?=E3=83=AB=E3=83=81=E3=81=A7=E8=B5=B7=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・マルチで起動出来るように ・スタミナの数値を1000から100に --- build.gradle | 2 +- .../block/BlockFluidFurnace.java | 41 +- .../block/BlockFluidMachineBase.java | 5 +- .../block/BlockFoodSmokers.java | 49 ++- .../block/BlockLargeFurnace.java | 13 +- .../block/BlockSimpleFurnace.java | 3 +- .../event/PlayerStatusEventHandler.java | 6 +- .../sextiarysector/item/ItemShiftHat.java | 10 +- .../player/EntityPlayerManager.java | 2 +- .../sextiarysector/player/StaminaStats.java | 4 +- .../sextiarysector/plugin/PluginTcon.java | 7 + .../sextiarysector/proxy/ClientProxy.java | 7 +- .../sextiarysector/proxy/CommonProxy.java | 4 + .../assets/sextiarysector/lang/ja_JP.lang | 350 +++++++++++------- 14 files changed, 295 insertions(+), 208 deletions(-) diff --git a/build.gradle b/build.gradle index e715488..07df02b 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.3.a-${project.minecraft.version}" +version = "2.1.3.b-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java b/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java index aef112d..d990baa 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java @@ -35,7 +35,7 @@ public class BlockFluidFurnace extends BlockFluidMachineBase{ @SideOnly(Side.CLIENT) private IIcon furnaceIconTop; @SideOnly(Side.CLIENT) - private IIcon[] furnaceIconFront = new IIcon[2]; + private IIcon[] furnaceIconFront; @SideOnly(Side.CLIENT) private IIcon furnaceIconTopOn; @@ -157,6 +157,7 @@ public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) public void registerBlockIcons(IIconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon("furnace_side"); + this.furnaceIconFront = new IIcon[2]; this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top"); @@ -260,44 +261,6 @@ private void dropItem(ItemStack itemstack ,World par1World,int par2, int par3, i } - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) - { - TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); - - - if (tileentityfurnace.isFuel()) - { - int l = p_149734_1_.getBlockMetadata(p_149734_2_, p_149734_3_, p_149734_4_); - float f = (float)p_149734_2_ + 0.5F; - float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; - float f2 = (float)p_149734_4_ + 0.5F; - float f3 = 0.52F; - float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; - - if (l == 4) - { - p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - } - else if (l == 5) - { - p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - } - else if (l == 2) - { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); - } - else if (l == 3) - { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - } - } - } - @Override public boolean hasComparatorInputOverride() { diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java b/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java index 3d10131..4f32b90 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java +++ b/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java @@ -34,7 +34,7 @@ public abstract class BlockFluidMachineBase extends BlockContainer{ @SideOnly(Side.CLIENT) private IIcon furnaceIconTop; @SideOnly(Side.CLIENT) - private IIcon[] furnaceIconFront = new IIcon[2]; + private IIcon[] furnaceIconFront; @SideOnly(Side.CLIENT) private IIcon furnaceIconTopOn; @@ -155,6 +155,7 @@ public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) public void registerBlockIcons(IIconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon("furnace_side"); + this.furnaceIconFront = new IIcon[2]; this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top"); @@ -260,7 +261,7 @@ public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3 if (tileentityfurnace.isFuel()) { - int l = p_149734_1_.getBlockMetadata(p_149734_2_, p_149734_3_, p_149734_4_); + int l = tileentityfurnace.getDirection().ordinal(); float f = (float)p_149734_2_ + 0.5F; float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; float f2 = (float)p_149734_4_ + 0.5F; diff --git a/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java b/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java index 7c38d7f..c2b45b5 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java +++ b/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java @@ -1,5 +1,7 @@ package shift.sextiarysector.block; +import java.util.Random; + import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -19,7 +21,7 @@ public class BlockFoodSmokers extends BlockFluidMachineBase{ @SideOnly(Side.CLIENT) private IIcon furnaceIconTop; @SideOnly(Side.CLIENT) - private IIcon[] furnaceIconFront = new IIcon[2]; + private IIcon[] furnaceIconFront; @SideOnly(Side.CLIENT) private IIcon furnaceIconTopOn; @@ -88,12 +90,57 @@ public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) public void registerBlockIcons(IIconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon("sextiarysector:food_smokers_side"); + this.furnaceIconFront = new IIcon[2]; this.furnaceIconFront[0] = par1IconRegister.registerIcon("sextiarysector:food_smokers_front_on"); this.furnaceIconFront[1] = par1IconRegister.registerIcon("sextiarysector:food_smokers_front_off"); this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:food_smokers_top"); this.furnaceIconTopOn = par1IconRegister.registerIcon("sextiarysector:food_smokers_top_on"); } + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); + + + if (tileentityfurnace.isFuel()) + { + int l = tileentityfurnace.getDirection().ordinal(); + + for(int i=0;i<5;i++){ + + float f = (float)p_149734_2_ + 0.5F; + float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; + float f2 = (float)p_149734_4_ + 0.5F; + float f3 = 0.52F; + float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; + + if (l == 4) + { + p_149734_1_.spawnParticle("explode", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + } + else if (l == 5) + { + p_149734_1_.spawnParticle("explode", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + } + else if (l == 2) + { + p_149734_1_.spawnParticle("explode", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + } + else if (l == 3) + { + p_149734_1_.spawnParticle("explode", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + } + + } + + } + } + @Override public TileEntity createNewTileEntity(World par1World, int p_149915_2_) { diff --git a/src/main/java/shift/sextiarysector/block/BlockLargeFurnace.java b/src/main/java/shift/sextiarysector/block/BlockLargeFurnace.java index 3b15548..3aabc9b 100644 --- a/src/main/java/shift/sextiarysector/block/BlockLargeFurnace.java +++ b/src/main/java/shift/sextiarysector/block/BlockLargeFurnace.java @@ -33,7 +33,7 @@ public class BlockLargeFurnace extends BlockContainer{ @SideOnly(Side.CLIENT) private IIcon furnaceIconTop; @SideOnly(Side.CLIENT) - private IIcon[] furnaceIconFront = new IIcon[2]; + private IIcon[] furnaceIconFront; private int GUIID; @@ -128,10 +128,6 @@ private void setDefaultDirection(World par1World, int par2, int par3, int par4) @Override @SideOnly(Side.CLIENT) - - /** - * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata - */ public IIcon getIcon(int par1, int par2) { @@ -139,6 +135,7 @@ public IIcon getIcon(int par1, int par2) } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) { @@ -154,14 +151,10 @@ public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) @Override @SideOnly(Side.CLIENT) - - /** - * When this method is called, your block should register all the icons it needs with the given IconRegister. This - * is the only chance you get to register icons. - */ public void registerBlockIcons(IIconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon("furnace_side"); + this.furnaceIconFront = new IIcon[2]; this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:furnace_top"); diff --git a/src/main/java/shift/sextiarysector/block/BlockSimpleFurnace.java b/src/main/java/shift/sextiarysector/block/BlockSimpleFurnace.java index 4123812..986e080 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSimpleFurnace.java +++ b/src/main/java/shift/sextiarysector/block/BlockSimpleFurnace.java @@ -33,7 +33,7 @@ public abstract class BlockSimpleFurnace extends BlockContainer{ @SideOnly(Side.CLIENT) private IIcon furnaceIconTop; @SideOnly(Side.CLIENT) - private IIcon[] furnaceIconFront = new IIcon[2]; + private IIcon[] furnaceIconFront; private int GUIID; @@ -157,6 +157,7 @@ public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) public void registerBlockIcons(IIconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon(this.getTextureName()+"_side"); + this.furnaceIconFront = new IIcon[2]; this.furnaceIconFront[0] = par1IconRegister.registerIcon(this.getTextureName()+"_front_on"); this.furnaceIconFront[1] = par1IconRegister.registerIcon(this.getTextureName()+"_front_off"); this.furnaceIconTop = par1IconRegister.registerIcon(this.getTextureName()+"_top"); diff --git a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java index e94f12a..36c2a6e 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java @@ -153,7 +153,7 @@ public void onLivingHurtEvent2(LivingHurtEvent event) { EntityPlayer player = (EntityPlayer) event.entityLiving; - SextiarySectorAPI.addStaminaExhaustion(player, event.ammount * 5.0f); + SextiarySectorAPI.addStaminaExhaustion(player, event.ammount * 2.0f); } @@ -217,9 +217,9 @@ public void LivingSleepingEvent(LivingUpdateEvent event) { if (player.isPlayerFullyAsleep()) { if (EntityPlayerManager.getMoistureStats(player).getMoistureLevel() > 4&& player.getFoodStats().getFoodLevel() > 4) { - EntityPlayerManager.getStaminaStats(player).addStats(1000,500); + EntityPlayerManager.getStaminaStats(player).addStats(100, 20.0f); } else { - EntityPlayerManager.getStaminaStats(player).addStats(300,100); + EntityPlayerManager.getStaminaStats(player).addStats(40, 0.0f); } player.getFoodStats().addExhaustion(21.0f); SextiarySectorAPI.addMoistureExhaustion(player, 21.0f); diff --git a/src/main/java/shift/sextiarysector/item/ItemShiftHat.java b/src/main/java/shift/sextiarysector/item/ItemShiftHat.java index 7567682..f1fc067 100644 --- a/src/main/java/shift/sextiarysector/item/ItemShiftHat.java +++ b/src/main/java/shift/sextiarysector/item/ItemShiftHat.java @@ -1,12 +1,11 @@ package shift.sextiarysector.item; -import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; +import shift.sextiarysector.SextiarySector; import shift.sextiarysector.api.SextiarySectorAPI; -import shift.sextiarysector.renderer.model.ModelShiftHat; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -22,13 +21,12 @@ public String getArmorTexture(ItemStack stack, Entity entity, int slot, String t return "sextiarysector:textures/models/shift_hat.png"; } - @SideOnly(Side.CLIENT) - public static ModelShiftHat model = new ModelShiftHat(); + @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + public net.minecraft.client.model.ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { - return model; + return (net.minecraft.client.model.ModelBiped) SextiarySector.proxy.getShiftHat(); } } diff --git a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java index 854e1f1..f1b25c1 100644 --- a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java +++ b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java @@ -24,7 +24,7 @@ public class EntityPlayerManager implements IPlayerManager{//implements {//IPla private final static int MAX_MOISTURE_LEVEL = 20; private final static int MAX_PREVMOISTURE_LEVEL = 20; - private final static int MAX_STAMINA_LEVEL = 1000; + private final static int MAX_STAMINA_LEVEL = 100; private final static int MAX_PREV_STAMINA_LEVEL = 20; /* diff --git a/src/main/java/shift/sextiarysector/player/StaminaStats.java b/src/main/java/shift/sextiarysector/player/StaminaStats.java index 46d84d5..3ab1624 100644 --- a/src/main/java/shift/sextiarysector/player/StaminaStats.java +++ b/src/main/java/shift/sextiarysector/player/StaminaStats.java @@ -11,8 +11,8 @@ public class StaminaStats { /** The player's stamina level. */ - private int staminaLevel = 1000; - private final static int MAX_STAMINA_LEVEL = 1000; + private int staminaLevel = 100; + private final static int MAX_STAMINA_LEVEL = 100; private final static int MAX_PREV_STAMINA_LEVEL = 20; /** The player's food saturation. */ diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTcon.java b/src/main/java/shift/sextiarysector/plugin/PluginTcon.java index 89e2be9..ca4ae84 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTcon.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTcon.java @@ -67,6 +67,13 @@ public void guiPostInit (GuiScreenEvent.InitGuiEvent.Post event) @Override public void postPlugin(FMLPostInitializationEvent event) { + if(event.getSide().isClient())clientPost(); + + } + + @SideOnly(Side.CLIENT) + public void clientPost(){ + ArrayList tabs = tconstruct.client.tabs.TabRegistry.getTabList(); for(int i=1;i Date: Wed, 28 Jan 2015 20:47:10 +0900 Subject: [PATCH 65/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=9E?= =?UTF-8?q?=E3=83=AB=E3=83=81=E3=81=A7=E3=81=AE=E3=83=99=E3=83=83=E3=83=88?= =?UTF-8?q?=E3=83=90=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・小さい布を追加 --- build.gradle | 2 +- .../java/shift/sextiarysector/Config.java | 13 ++++ .../java/shift/sextiarysector/SSItems.java | 4 ++ .../shift/sextiarysector/SSOreDictionary.java | 13 ++++ .../java/shift/sextiarysector/SSRecipes.java | 29 +++++++++ .../shift/sextiarysector/SextiarySector.java | 1 + .../container/InventoryRucksack.java | 2 +- .../event/CommonEventHandler.java | 45 ++++++++++++- .../event/PlayerStatusEventHandler.java | 41 ++++++++++-- .../player/CustomPlayerData.java | 4 +- .../sextiarysector/player/StaminaStats.java | 2 +- .../sextiarysector/plugin/PluginCleaver.java | 59 ++++++++++++++++++ .../sextiarysector/plugin/PluginTofu.java | 8 ++- .../sextiarysector/plugin/SSPlugins.java | 17 +++++ .../sextiarysector/recipe/RecipesCore.java | 6 ++ .../sextiarysector/recipe/RecipesVanilla.java | 27 ++++++++ .../assets/sextiarysector/lang/en_US.lang | 1 + .../textures/items/loom/small_cloth.png | Bin 0 -> 381 bytes 18 files changed, 262 insertions(+), 12 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/plugin/PluginCleaver.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/small_cloth.png diff --git a/build.gradle b/build.gradle index 07df02b..b407ced 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.3.b-${project.minecraft.version}" +version = "2.1.3.d-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index 367295c..569b2bf 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -22,6 +22,8 @@ public class Config { public static boolean modIC2; public static boolean modTofu; public static boolean modTcon; + public static boolean modCleaver; + public static void ConfigRead(FMLPreInitializationEvent event) { @@ -65,7 +67,18 @@ public static void configForPlugin(Configuration cfg) { modIC2 = cfg.getBoolean("IC2", "general", true, ""); modTofu = cfg.getBoolean("Tofu", "general", true, ""); modTcon = cfg.getBoolean("Tcon", "general", true, ""); + modCleaver = cfg.getBoolean("Cleaver", "general", true, ""); } + + + + + + + + + + } diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 6b4f870..e69ca0e 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -107,6 +107,7 @@ public class SSItems { //布 public static Item stringBobbin; + public static Item smallCloth; public static Item cloth; public static Item canvas; @@ -343,6 +344,9 @@ public static void initItems(){ stringBobbin = new Item().setUnlocalizedName("ss.string_bobbin").setTextureName("sextiarysector:loom/string_bobbin").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(stringBobbin, "StringBobbin"); + smallCloth = new Item().setUnlocalizedName("ss.small_cloth").setTextureName("sextiarysector:loom/small_cloth").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(smallCloth, "SmallCloth"); + cloth = new Item().setUnlocalizedName("ss.cloth").setTextureName("sextiarysector:loom/cloth").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(cloth, "Cloth"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index f01fbaf..b5f399c 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -27,6 +27,13 @@ public static void init(){ OreDictionary.registerOre("containerWoodBowl", Items.bowl); OreDictionary.registerOre("containerBucket", Items.bucket); + OreDictionary.registerOre("craftingString", new ItemStack(Items.string,1,0)); + + for(int i=0;i<16;i++){ + OreDictionary.registerOre("craftingSmallCloth", new ItemStack(Blocks.wool,1,i)); + } + + OreDictionary.registerOre("fluidWater", Items.water_bucket); OreDictionary.registerOre("fluidWater", new ItemStack(Items.potionitem, 1 ,0)); @@ -80,6 +87,12 @@ public static void init(){ OreDictionary.registerOre("ringIron", SSItems.ironRing); + OreDictionary.registerOre("craftingSmallCloth", SSItems.cloth); + OreDictionary.registerOre("craftingCloth", SSItems.cloth); + OreDictionary.registerOre("craftingFilterCloth", SSItems.cloth); + + OreDictionary.registerOre("craftingSmallCloth", SSItems.smallCloth); + OreDictionary.registerOre("craftingFilterCloth", SSItems.smallCloth); //液体金属 OreDictionary.registerOre("fluidIron", new ItemStack(SSBlocks.fluidCrafter, 1, SSFluids.iron.getID())); diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index 9366242..8047c13 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -1,6 +1,10 @@ package shift.sextiarysector; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.ShapedRecipes; import shift.sextiarysector.recipe.FurnaceCraftingManager; import shift.sextiarysector.recipe.RecipeSimpleFluid; import shift.sextiarysector.recipe.RecipeSimpleFuel; @@ -23,6 +27,7 @@ import shift.sextiarysector.recipe.RecipesSawmill; import shift.sextiarysector.recipe.RecipesTimeMachine; import shift.sextiarysector.recipe.RecipesTool; +import shift.sextiarysector.recipe.RecipesVanilla; public class SSRecipes { @@ -65,6 +70,7 @@ public static void initRecipes(){ RecipesFurnace.addRecipes(); + RecipesVanilla.addRecipes(m); RecipesNormalBlock.addRecipes(m); RecipesMachine.addRecipes(m); RecipesCore.addRecipes(m); @@ -99,4 +105,27 @@ public static void initRecipes(){ } + public static void deleteVanillaRecipe(){ + + CraftingManager m = CraftingManager.getInstance(); + ItemStack wool = new ItemStack(Blocks.wool); + + for(int i=0;i< m.getRecipeList().size();i++){ + + IRecipe re = (IRecipe)m.getRecipeList().get(i); + if(re != null &&re.getRecipeOutput()!=null && re.getRecipeOutput().isItemEqual(wool) && re instanceof ShapedRecipes){ + m.getRecipeList().remove(i); + return ; + } + + } + + + } + + + + + + } diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 890cf74..b4a1984 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -70,6 +70,7 @@ public void preInit(FMLPreInitializationEvent event) modules.add(ModuleAgriculture.getInstance()); modules.add(ModuleSandpit.getInstance()); + SSRecipes.deleteVanillaRecipe(); SSRecipes.initRecipeLists(); SextiarySectorAPI.playerManager = EntityPlayerManager.instance; diff --git a/src/main/java/shift/sextiarysector/container/InventoryRucksack.java b/src/main/java/shift/sextiarysector/container/InventoryRucksack.java index 26b5aad..a684492 100644 --- a/src/main/java/shift/sextiarysector/container/InventoryRucksack.java +++ b/src/main/java/shift/sextiarysector/container/InventoryRucksack.java @@ -175,7 +175,7 @@ public void closeInventory() if(inventoryPlayer instanceof InventoryPlayer){ ((InventoryPlayer)inventoryPlayer).mainInventory[((InventoryPlayer)inventoryPlayer).currentItem] = result; }else if(inventoryPlayer instanceof InventoryPlayerNext){ - + inventoryPlayer.setInventorySlotContents(EquipmentType.Bag.getSlot()[0], result); } } diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index edddf24..83d0cb3 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -20,9 +20,9 @@ import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.PlayerWakeUpEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fluids.FluidStack; import shift.sextiarysector.SSAchievement; @@ -161,6 +161,47 @@ protected MovingObjectPosition getMovingObjectPositionFromPlayer(World p_77621_1 /**クリーパーチェスト*/ @SubscribeEvent + public void LivingSleepingEvent(PlayerWakeUpEvent event) { + + if (event.entityPlayer.worldObj.isRemote) { + return; + } + + if (!(event.entityPlayer instanceof EntityPlayerMP)) { + return; + } + + EntityPlayerMP player = (EntityPlayerMP) event.entityLiving; + + if(!player.func_147099_x().hasAchievementUnlocked(SSAchievement.creeperFirework)||player.func_147099_x().hasAchievementUnlocked(SSAchievement.creeperChest)){ + return; + } + + int x = (int) player.posX; + int y = (int) player.posY; + int z = (int) player.posZ; + World world = player.worldObj; + + int range = 1; + for (int i = -range; i < range; i++){ + for (int j = -range; j < range; j++) { + for(int k = -range; k < range; k++){ + if (world.isAirBlock(x + i, y + k, z + j)) { + if (generateChest(world, x + i, y + k, z + j)) { + player.addStat(SSAchievement.creeperChest, 1); + return; + } + } + } + } + } + + } + + + /**クリーパーチェスト*/ + /* + @SubscribeEvent public void livingSleepingEvent(LivingUpdateEvent event) { if (event.entityLiving.worldObj.isRemote) { return; @@ -204,7 +245,7 @@ public void livingSleepingEvent(LivingUpdateEvent event) { } - } + }*/ protected boolean generateChest(World world, int x, int y, int z) { diff --git a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java index 36c2a6e..9f9a08f 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java @@ -7,10 +7,10 @@ import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; -import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.AttackEntityEvent; import net.minecraftforge.event.entity.player.PlayerUseItemEvent; +import net.minecraftforge.event.entity.player.PlayerWakeUpEvent; import net.minecraftforge.event.world.BlockEvent.BreakEvent; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.event.PlayerEatenEvent; @@ -147,13 +147,14 @@ public void onBlockBreakEventS(BreakEvent event) { @SubscribeEvent public void onLivingHurtEvent2(LivingHurtEvent event) { + if (event.entityLiving.worldObj.isRemote || !(event.entityLiving instanceof EntityPlayer)) { return; } EntityPlayer player = (EntityPlayer) event.entityLiving; - SextiarySectorAPI.addStaminaExhaustion(player, event.ammount * 2.0f); + SextiarySectorAPI.addStaminaExhaustion(player, event.ammount * 1.2f); } @@ -199,8 +200,40 @@ public void onAttackEntityEvent2(AttackEntityEvent event) { } - // ベットで回復 + + //ベットで回復 @SubscribeEvent + public void LivingSleepingEvent(PlayerWakeUpEvent event) { + + if (event.entityPlayer.worldObj.isRemote) { + return; + } + + if (!(event.entityPlayer instanceof EntityPlayer)) { + return; + } + + if (!event.entityLiving.worldObj.isRemote) { + + EntityPlayer player = (EntityPlayer) event.entityPlayer; + + + if (EntityPlayerManager.getMoistureStats(player).getMoistureLevel() > 4&& player.getFoodStats().getFoodLevel() > 4) { + EntityPlayerManager.getStaminaStats(player).addStats(100, 20.0f); + } else { + EntityPlayerManager.getStaminaStats(player).addStats(40, 0.0f); + } + player.getFoodStats().addExhaustion(21.0f); + SextiarySectorAPI.addMoistureExhaustion(player, 21.0f); + + + } + + } + + + // ベットで回復 + /*@SubscribeEvent public void LivingSleepingEvent(LivingUpdateEvent event) { if (event.entityLiving.worldObj.isRemote) { return; @@ -229,6 +262,6 @@ public void LivingSleepingEvent(LivingUpdateEvent event) { } - } + }*/ } diff --git a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java index 41c87ba..ea9b0eb 100644 --- a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java +++ b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java @@ -6,8 +6,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.IExtendedEntityProperties; -import shift.sextiarysector.packet.SSPacketHandler; import shift.sextiarysector.packet.PacketPlayerData; +import shift.sextiarysector.packet.SSPacketHandler; public class CustomPlayerData implements IExtendedEntityProperties{ @@ -53,7 +53,7 @@ public void loadNBTData(NBTTagCompound compound) { this.moisture.readNBT(compound); - this.moisture.readNBT(compound); + this.stamina.readNBT(compound); this.equipment.readNBT(compound); diff --git a/src/main/java/shift/sextiarysector/player/StaminaStats.java b/src/main/java/shift/sextiarysector/player/StaminaStats.java index 3ab1624..06f1b32 100644 --- a/src/main/java/shift/sextiarysector/player/StaminaStats.java +++ b/src/main/java/shift/sextiarysector/player/StaminaStats.java @@ -19,7 +19,7 @@ public class StaminaStats { private float staminaSaturationLevel = 5.0F; //Packet用 - private int lastStaminaLevel = 1000 ; + private int lastStaminaLevel = 100 ; private float lastSaturationLevel = 0; /** The player's food exhaustion. */ diff --git a/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java b/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java new file mode 100644 index 0000000..24395bb --- /dev/null +++ b/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java @@ -0,0 +1,59 @@ +package shift.sextiarysector.plugin; + +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; +import shift.sextiarysector.SSFluids; +import shift.sextiarysector.SSRecipes; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PluginCleaver implements IPlugin { + + public static Item itemCleaverNormal; + public static Item itemCleaverBlaze; + public static Item itemCleaverSoul; + + @Override + public void prePlugin(FMLPreInitializationEvent event) { + + } + + @Override + public void initPlugin(FMLInitializationEvent event) { + + this.itemCleaverNormal = GameRegistry.findItem("schr0.cleaver", "itemCleaverNormal"); + + this.itemCleaverSoul = GameRegistry.findItem("schr0.cleaver", "itemCleaverSoul"); + + OreDictionary.registerOre("craftingToolWireCutter", new ItemStack(itemCleaverNormal,1,0)); + OreDictionary.registerOre("craftingToolKnife", new ItemStack(itemCleaverNormal,1,0)); + + SSRecipes.fluidFurnace.add(new ItemStack(this.itemCleaverNormal,1), new ItemStack(Items.stick,1), new FluidStack(SSFluids.iron, 3500)); + SSRecipes.magicFuel.add(new ItemStack(this.itemCleaverSoul,1), 3200); + + } + + @Override + public void postPlugin(FMLPostInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public String getModName() { + return "schr0.cleaver"; + } + + @Override + @SideOnly(Side.CLIENT) + public void preClientPlugin(FMLPreInitializationEvent event) { + + } +} diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java index 7c3cbde..7668101 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java @@ -1,6 +1,8 @@ package shift.sextiarysector.plugin; import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraftforge.oredict.OreDictionary; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.block.BlockTofuMotor; import shift.sextiarysector.item.ItemBlockDirection; @@ -23,6 +25,8 @@ public String getModName() { public static int tofuMotorType; public static Block tofuMotor; + public static Item filterCloth; + @Override public void prePlugin(FMLPreInitializationEvent event) { tofuMotor = new BlockTofuMotor().setBlockName("ss.tofu_motor").setCreativeTab(SextiarySectorAPI.TabSSIndustry); @@ -43,7 +47,9 @@ public void preClientPlugin(FMLPreInitializationEvent event) { @Override public void initPlugin(FMLInitializationEvent event) { - // TODO 自動生成されたメソッド・スタブ + + filterCloth = GameRegistry.findItem("TofuCraft", "filterCloth"); + OreDictionary.registerOre("craftingFilterCloth", filterCloth); } diff --git a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java index 0c0d82a..35706e0 100644 --- a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java +++ b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java @@ -21,6 +21,7 @@ public class SSPlugins { public static boolean modIC2; public static boolean modTofu; public static boolean modTcon; + public static boolean modCleaver; public static void initModHelper() { @@ -30,6 +31,7 @@ public static void initModHelper() { modIC2 = Loader.isModLoaded("IC2") && Config.modIC2; modTofu = Loader.isModLoaded("TofuCraft") && Config.modTofu; modTcon = Loader.isModLoaded("TConstruct") && Config.modTcon; + modCleaver = Loader.isModLoaded("schr0.cleaver") && Config.modCleaver; if (modDCsAppleMilk) { @@ -121,6 +123,21 @@ public static void initModHelper() { } } + if (modCleaver) { + + try { + + SextiarySector.Log.info("Cleaver Plugin is loaded"); + plugins.add(new PluginCleaver()); + + } catch (Exception e) { + + SextiarySector.Log.log(Level.WARN, "Cleaver integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.catching(e); + + } + } + } public static void prePlugins(FMLPreInitializationEvent event) { diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index bb69a71..c97a790 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -26,6 +26,12 @@ public static void addRecipes(CraftingManager p_77608_1_) 'x', "paneGlassColorless", })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.smallCloth, 1), + new Object[] { + "xx", "xx", + 'x', "craftingString", + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.stringBobbin, 1), new Object[] { "xxx", "xyx", "xxx", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java b/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java new file mode 100644 index 0000000..f86809b --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java @@ -0,0 +1,27 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraftforge.oredict.ShapedOreRecipe; + +public class RecipesVanilla { + + public static void addRecipes(CraftingManager p_77608_1_) + { + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(Items.painting, 1), + new Object[] { "xxx", "xyx","xxx", + Character.valueOf('x'), "stickWood", + Character.valueOf('y'), "craftingSmallCloth" + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(Items.bed, 1), + new Object[] { "yyy", "xxx", + Character.valueOf('x'), "plankWood", + Character.valueOf('y'), "craftingSmallCloth" + })); + + } + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 8a2f16e..238de3e 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -189,6 +189,7 @@ item.ss.season_stone_winter.name=Season Stone -Winter- item.ss.string_bobbin.name=String Bobbin item.ss.cloth.name=Cloth +item.ss.small_cloth.name=Small Cloth item.ss.canvas.name=Canvas diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/small_cloth.png b/src/main/resources/assets/sextiarysector/textures/items/loom/small_cloth.png new file mode 100644 index 0000000000000000000000000000000000000000..db5fdb215bd346a87e60de4e41f29a478597bc46 GIT binary patch literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~qYSH}%rrN@E(QihE>9Q75R21qC++QOb`Wvf?~~%v zl*yu-G~23j>g``lP5RF#bA%mU&}g#p#M(D(sZW-1d#99dzMZo=Uu$~q`R8Z3j<>gM(&0X2aAcFtg{b6N%ci>QZSuW*;%(XF%P(8*=4}`1?x?wS z(11tixZ$4fJMO=qv5eDmQp3!Nsgiu{%zD$gKiRm8xJol{*c}M)IvCacwyax$L!eD@ zN|1$I|A%{rqqdIN+h?;JSw5=qT-?wKd-0bz!?Rl!gHSYzxz+ Date: Tue, 10 Feb 2015 11:03:38 +0900 Subject: [PATCH 66/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E8=92=B8?= =?UTF-8?q?=E6=B0=97=E3=83=A2=E3=83=BC=E3=82=BF=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・蒸気モーターを追加 ・ブロックブレイカーを追加 ・フィギュアを追加 ・GFタンクのバグを修正 ・鉱石を追加 --- .../shift/sextiarysector/SSAchievement.java | 12 +- .../java/shift/sextiarysector/SSBlocks.java | 49 ++- .../shift/sextiarysector/SSGuiHandler.java | 10 + .../java/shift/sextiarysector/SSItems.java | 36 ++ .../shift/sextiarysector/SSOreDictionary.java | 11 + .../java/shift/sextiarysector/SSShops.java | 5 + .../shift/sextiarysector/SextiarySector.java | 2 + .../shift/sextiarysector/block/BlockFan.java | 1 + .../sextiarysector/block/BlockFigure.java | 266 ++++++++++++ .../sextiarysector/block/BlockMotor.java | 32 -- .../shift/sextiarysector/block/BlockPump.java | 153 +++++++ .../shift/sextiarysector/block/BlockSaw.java | 40 ++ .../sextiarysector/block/BlockSteamMotor.java | 44 ++ .../container/ContainerFluidMachineBase.java | 8 +- .../container/ContainerSteamMotor.java | 137 +++++++ .../event/PlayerStatusEventHandler.java | 34 ++ .../event/WorldEventHandler.java | 12 + .../shift/sextiarysector/gui/GuiGFTank.java | 4 + .../sextiarysector/gui/GuiSteamMotor.java | 140 +++++++ .../sextiarysector/item/ItemBlockFigure.java | 63 +++ .../sextiarysector/item/ItemFigureBox.java | 79 ++++ .../sextiarysector/module/ModuleFigure.java | 144 +++++++ .../sextiarysector/module/ModuleSandpit.java | 17 +- .../sextiarysector/player/StaminaStats.java | 7 +- .../plugin/PluginAppleMilk.java | 10 +- .../sextiarysector/proxy/ClientProxy.java | 14 + .../sextiarysector/proxy/CommonProxy.java | 2 + .../sextiarysector/recipe/RecipesCore.java | 7 + .../recipe/RecipesFluidFurnace.java | 4 + .../sextiarysector/recipe/RecipesFurnace.java | 11 + .../recipe/RecipesFurnaceCraft.java | 18 + .../sextiarysector/recipe/RecipesLoom.java | 1 + .../sextiarysector/recipe/RecipesMachine.java | 24 +- .../recipe/RecipesMagicFurnace.java | 2 + .../recipe/RecipesPulverizer.java | 10 + .../renderer/block/RendererFigure.java | 119 ++++++ .../renderer/block/RendererSaw.java | 115 ++++++ .../renderer/block/RendererSteamMotor.java | 119 ++++++ .../renderer/model/ModelSaw.java | 60 +++ .../tileentity/TileEntityFan.java | 2 +- .../tileentity/TileEntityFigure.java | 88 ++++ .../tileentity/TileEntityPump.java | 216 ++++++++++ .../tileentity/TileEntitySaw.java | 191 +++++++++ .../tileentity/TileEntitySmallWaterwheel.java | 29 +- .../tileentity/TileEntitySmallWindmill.java | 31 +- .../tileentity/TileEntitySquare.java | 29 +- .../tileentity/TileEntitySteamMotor.java | 381 ++++++++++++++++++ .../tileentity/TileEntityWindmill.java | 31 +- .../assets/sextiarysector/lang/en_US.lang | 46 ++- .../sextiarysector/textures/blocks/figure.png | Bin 0 -> 592 bytes .../textures/blocks/figure_side.png | Bin 0 -> 563 bytes .../textures/blocks/machine/pump.png | Bin 0 -> 549 bytes .../textures/blocks/machine/pump_front.png | Bin 0 -> 636 bytes .../textures/blocks/machine/pump_top.png | Bin 0 -> 527 bytes .../textures/blocks/ore/copper_ore.png | Bin 0 -> 539 bytes .../textures/blocks/ore/gold_ore.png | Bin 0 -> 263 bytes .../textures/blocks/ore/silver_ore.png | Bin 0 -> 537 bytes .../textures/blocks/ore/zinc_ore.png | Bin 0 -> 540 bytes .../textures/guis/machine/ninja_gf_tank.png | Bin 0 -> 2727 bytes .../guis/machine/orichalcum_gf_tank.png | Bin 0 -> 2907 bytes .../textures/guis/machine/steam_motor.png | Bin 0 -> 1600 bytes .../textures/items/dust/copper_dust.png | Bin 0 -> 338 bytes .../textures/items/dust/zinc_dust.png | Bin 0 -> 317 bytes .../sextiarysector/textures/items/figure.png | Bin 0 -> 350 bytes .../textures/items/figure_box.png | Bin 0 -> 368 bytes .../textures/items/ingot/copper_ingot.png | Bin 0 -> 325 bytes .../textures/items/ingot/silver_ingot.png | Bin 0 -> 305 bytes .../textures/items/ingot/zinc_ingot.png | Bin 0 -> 340 bytes .../textures/items/loom/drying_flesh.png | Bin 0 -> 550 bytes .../textures/items/loom/flesh_bobbin.png | Bin 0 -> 445 bytes .../sextiarysector/textures/models/saw.png | Bin 0 -> 2770 bytes .../textures/models/steam_motor.png | Bin 0 -> 1743 bytes 72 files changed, 2796 insertions(+), 70 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockFigure.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockPump.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockSaw.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockSteamMotor.java create mode 100644 src/main/java/shift/sextiarysector/container/ContainerSteamMotor.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiSteamMotor.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemBlockFigure.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemFigureBox.java create mode 100644 src/main/java/shift/sextiarysector/module/ModuleFigure.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererFigure.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererSaw.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererSteamMotor.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelSaw.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityFigure.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/figure.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/figure_side.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/pump.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/pump_front.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/pump_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/copper_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/gold_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/zinc_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/ninja_gf_tank.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/orichalcum_gf_tank.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/steam_motor.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/dust/copper_dust.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/dust/zinc_dust.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/figure.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/figure_box.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ingot/copper_ingot.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ingot/silver_ingot.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ingot/zinc_ingot.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/drying_flesh.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/flesh_bobbin.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/saw.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/steam_motor.png diff --git a/src/main/java/shift/sextiarysector/SSAchievement.java b/src/main/java/shift/sextiarysector/SSAchievement.java index 6c6913e..5b8a215 100644 --- a/src/main/java/shift/sextiarysector/SSAchievement.java +++ b/src/main/java/shift/sextiarysector/SSAchievement.java @@ -79,12 +79,14 @@ public class SSAchievement { public static Achievement stoneGear; public static Achievement windmill; + public static Achievement smallWaterwheel; public static Achievement sawmill; public static Achievement steelGear; - public static Achievement smallWaterwheel; + public static Achievement steamMotor; public static Achievement pulverizer; public static Achievement fan; + public static Achievement saw; public static Achievement ninjaGear; public static Achievement rollingMachine; @@ -163,18 +165,20 @@ public static void initAchievements(){ stoneGear = new AchievementCraft("stone_gear", 1, 0, new ItemStack(SSItems.stoneGear), woodGear, industry).registerStat(); windmill = new AchievementCraft("windmill", 2, -2, new ItemStack(SSBlocks.windmill), stoneGear, industry).registerStat(); + smallWaterwheel = new AchievementCraft("small_waterwheel", 2, -3, new ItemStack(SSBlocks.smallWaterwheel), stoneGear, industry).registerStat(); sawmill = new AchievementCraft("sawmill", 2, 2, new ItemStack(SSBlocks.sawmill), stoneGear, industry).registerStat(); steelGear = new AchievementCraft("steel_gear", 4, 0, new ItemStack(SSItems.steelGear), stoneGear, industry).registerStat(); - smallWaterwheel = new AchievementCraft("small_waterwheel", 5, -2, new ItemStack(SSBlocks.smallWaterwheel), steelGear, industry).registerStat(); + steamMotor = new AchievementCraft("steam_motor", 5, -2, new ItemStack(SSBlocks.steamMotor), steelGear, industry).registerStat(); pulverizer = new AchievementCraft("pulverizer", 5, 2, new ItemStack(SSBlocks.pulverizer), steelGear, industry).registerStat(); fan = new AchievementCraft("fan", 5, 4, new ItemStack(SSBlocks.fan), steelGear, industry).registerStat(); + saw = new AchievementCraft("saw", 5, 5, new ItemStack(SSBlocks.saw), steelGear, industry).registerStat(); ninjaGear = new AchievementCraft("ninja_gear", 7, 0, new ItemStack(SSItems.ninjaGear), steelGear, industry).registerStat(); - rollingMachine = new AchievementCraft("rolling_machine", 7, 2, new ItemStack(SSBlocks.rollingMachine), ninjaGear, industry).registerStat(); + rollingMachine = new AchievementCraft("rolling_machine", 8, 2, new ItemStack(SSBlocks.rollingMachine), ninjaGear, industry).registerStat(); orichalcumGear = new AchievementCraft("orichalcum_gear", 10, 0, new ItemStack(SSItems.orichalcumGear), ninjaGear, industry).registerStat(); - timeMachine = new AchievementCraft("time_machine", 10, 2, new ItemStack(SSBlocks.timeMachine), orichalcumGear, industry).registerStat(); + timeMachine = new AchievementCraft("time_machine", 11, 2, new ItemStack(SSBlocks.timeMachine), orichalcumGear, industry).registerStat(); AchievementPage.registerAchievementPage(new AchievementPageIndustry("achievement.ss.industry", industry)); diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index cac062e..f926bae 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -8,6 +8,7 @@ import shift.sextiarysector.block.BlockBlueFire; import shift.sextiarysector.block.BlockChunkLoader; import shift.sextiarysector.block.BlockFan; +import shift.sextiarysector.block.BlockFigure; import shift.sextiarysector.block.BlockFluidCrafter; import shift.sextiarysector.block.BlockFluidFurnace; import shift.sextiarysector.block.BlockFoodSmokers; @@ -22,6 +23,7 @@ import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockPaddy; import shift.sextiarysector.block.BlockPowerStone; +import shift.sextiarysector.block.BlockPump; import shift.sextiarysector.block.BlockSSChest; import shift.sextiarysector.block.BlockSSCrop; import shift.sextiarysector.block.BlockSSCrop.CropStatus; @@ -31,22 +33,26 @@ import shift.sextiarysector.block.BlockSSOre; import shift.sextiarysector.block.BlockSSPane; import shift.sextiarysector.block.BlockSandpit; +import shift.sextiarysector.block.BlockSaw; import shift.sextiarysector.block.BlockShaft; import shift.sextiarysector.block.BlockShippingBox; import shift.sextiarysector.block.BlockSimpleMachine; import shift.sextiarysector.block.BlockSmallWaterwheel; import shift.sextiarysector.block.BlockSmallWindmill; import shift.sextiarysector.block.BlockSquare; +import shift.sextiarysector.block.BlockSteamMotor; import shift.sextiarysector.block.BlockWindmill; import shift.sextiarysector.block.BlockWood; import shift.sextiarysector.block.BlockWoodHopper; import shift.sextiarysector.item.ItemBlockCrop; import shift.sextiarysector.item.ItemBlockDirection; +import shift.sextiarysector.item.ItemBlockFigure; import shift.sextiarysector.item.ItemBlockFluidCrafter; import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMonitor; import shift.sextiarysector.tileentity.TileEntityFan; import shift.sextiarysector.tileentity.TileEntityFarmland; +import shift.sextiarysector.tileentity.TileEntityFigure; import shift.sextiarysector.tileentity.TileEntityFluidCrafter; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityFoodSmokers; @@ -58,13 +64,16 @@ import shift.sextiarysector.tileentity.TileEntityMagicFurnace; import shift.sextiarysector.tileentity.TileEntityMonitor; import shift.sextiarysector.tileentity.TileEntityPaddy; +import shift.sextiarysector.tileentity.TileEntityPump; import shift.sextiarysector.tileentity.TileEntitySSChest; import shift.sextiarysector.tileentity.TileEntitySSCrop; +import shift.sextiarysector.tileentity.TileEntitySaw; import shift.sextiarysector.tileentity.TileEntityShaft; import shift.sextiarysector.tileentity.TileEntitySimpleMachine; import shift.sextiarysector.tileentity.TileEntitySmallWaterwheel; import shift.sextiarysector.tileentity.TileEntitySmallWindmill; import shift.sextiarysector.tileentity.TileEntitySquare; +import shift.sextiarysector.tileentity.TileEntitySteamMotor; import shift.sextiarysector.tileentity.TileEntityWindmill; import shift.sextiarysector.tileentity.TileEntityWood; import cpw.mods.fml.common.registry.GameRegistry; @@ -83,8 +92,6 @@ public class SSBlocks { public static Block magicFurnace; public static Block freezer; - - //public static Block bottle; public static Block fluidCrafter; @@ -94,6 +101,8 @@ public class SSBlocks { public static Block blueFire; + public static Block figure; + //液体 public static Block drinkingWater; @@ -124,15 +133,20 @@ public class SSBlocks { public static Block smallWindmill; public static Block windmill; public static Block smallWaterwheel; + public static Block steamMotor; public static Block millstone; public static Block loom; public static Block sawmill; + public static Block pump; + + public static Block pulverizer; public static Block fan; + public static Block saw; public static Block rollingMachine; @@ -160,6 +174,10 @@ public class SSBlocks { public static Block blueStoneOre; public static Block yellowStoneOre; + public static Block copperOre; + public static Block zincOre; + public static Block silverOre; + public static Block mithrilOre; public static Block orichalcumOre; @@ -282,6 +300,11 @@ public static void initBlicks(){ blueFire = new BlockBlueFire().setBlockName("ss.blue_fire").setBlockTextureName("sextiarysector:blue_fire"); GameRegistry.registerBlock(blueFire, "BlueFire"); + + figure = new BlockFigure().setBlockName("ss.figure").setBlockTextureName("sextiarysector:figure").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(figure, ItemBlockFigure.class, "Figure"); + GameRegistry.registerTileEntity(TileEntityFigure.class, "SSFigure"); + drinkingWater = new BlockSSFluid(SSFluids.drinkingWater).setBlockName("ss.drinking_water").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(drinkingWater, "DrinkingWater"); @@ -292,6 +315,15 @@ public static void initBlicks(){ yellowStoneOre = new BlockPowerStone().setBlockName("ss.yellow_stone").setBlockTextureName("sextiarysector:yellowstone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(yellowStoneOre, "YellowStoneOre"); + copperOre = new BlockSSOre(null, 1).setBlockName("ss.copper_ore").setBlockTextureName("sextiarysector:ore/copper_ore"); + GameRegistry.registerBlock(copperOre, "CopperOre"); + + zincOre = new BlockSSOre(null, 1).setBlockName("ss.zinc_ore").setBlockTextureName("sextiarysector:ore/zinc_ore"); + GameRegistry.registerBlock(zincOre, "ZincOre"); + + silverOre = new BlockSSOre(null,2).setBlockName("ss.silver_ore").setBlockTextureName("sextiarysector:ore/silver_ore"); + GameRegistry.registerBlock(silverOre, "SilverOre"); + mithrilOre = new BlockSSOre(null,2).setBlockName("ss.mithril_ore").setBlockTextureName("sextiarysector:ore/mithril_ore"); GameRegistry.registerBlock(mithrilOre, "MithrilOre"); @@ -385,6 +417,11 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntitySmallWaterwheel.class, "SmallWaterwheel"); GameRegistry.registerBlock(smallWaterwheel, "SmallWaterwheel"); + steamMotor = new BlockSteamMotor().setBlockName("ss.steam_motor").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerTileEntity(TileEntitySteamMotor.class, "SteamMotor"); + GameRegistry.registerBlock(steamMotor, ItemBlockDirection.class, "SteamMotor"); + + GameRegistry.registerTileEntity(TileEntitySimpleMachine.class, "SimpleMachine"); millstone = new BlockSimpleMachine("millstone",20,SSRecipes.millstone,1).setBlockName("ss.millstone").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(millstone, "Millstone"); @@ -395,6 +432,10 @@ public static void initBlicks(){ sawmill = new BlockSimpleMachine("sawmill",25,SSRecipes.sawmill,2).setBlockName("ss.sawmill").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(sawmill, "Sawmill"); + pump = new BlockPump().setBlockTextureName("sextiarysector:machine/pump").setBlockName("ss.pump"); + GameRegistry.registerTileEntity(TileEntityPump.class, "SSPump"); + GameRegistry.registerBlock(pump, "pump"); + pulverizer = new BlockSimpleMachine("pulverizer",30,SSRecipes.pulverizer,3).setBlockName("ss.pulverizer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(pulverizer, "Pulverizer"); @@ -402,6 +443,10 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntityFan.class, "Fan"); GameRegistry.registerBlock(fan, ItemBlockDirection.class, "Fan"); + saw = new BlockSaw().setBlockName("ss.saw"); + GameRegistry.registerTileEntity(TileEntitySaw.class, "Saw"); + GameRegistry.registerBlock(saw, ItemBlockDirection.class, "Saw"); + rollingMachine = new BlockSimpleMachine("rolling_machine",35,SSRecipes.rollingMachine,4).setBlockName("ss.rolling_machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(rollingMachine, "RollingMachine"); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 9ec2c12..c0d3add 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -13,6 +13,7 @@ import shift.sextiarysector.container.ContainerPlayerNext; import shift.sextiarysector.container.ContainerRucksack; import shift.sextiarysector.container.ContainerSimpleMachine; +import shift.sextiarysector.container.ContainerSteamMotor; import shift.sextiarysector.container.ContainerTabWorkbench; import shift.sextiarysector.gui.GuiCraftFurnace; import shift.sextiarysector.gui.GuiFluidFurnace; @@ -28,6 +29,7 @@ import shift.sextiarysector.gui.GuiRollingMachine; import shift.sextiarysector.gui.GuiRucksack; import shift.sextiarysector.gui.GuiSawmill; +import shift.sextiarysector.gui.GuiSteamMotor; import shift.sextiarysector.gui.GuiTabCrafting; import shift.sextiarysector.gui.GuiTimeMachine; import shift.sextiarysector.gui.IServerGuiElement; @@ -39,6 +41,7 @@ import shift.sextiarysector.tileentity.TileEntityLargeFurnace; import shift.sextiarysector.tileentity.TileEntityMagicFurnace; import shift.sextiarysector.tileentity.TileEntitySimpleMachine; +import shift.sextiarysector.tileentity.TileEntitySteamMotor; import cpw.mods.fml.common.network.IGuiHandler; public class SSGuiHandler implements IGuiHandler { @@ -78,8 +81,11 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x case 50: case 51: case 52: + case 53: + case 54: return new ContainerGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z)); + case 60:return new ContainerSteamMotor(player.inventory, (TileEntitySteamMotor) world.getTileEntity(x, y, z)); case 90 : return new ContainerMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); @@ -147,6 +153,10 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x case 50:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),1); case 51:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),2); case 52:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),3); + case 53:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),4); + case 54:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),5); + + case 60:return new GuiSteamMotor(player.inventory, (TileEntitySteamMotor) world.getTileEntity(x, y, z)); case 90:return new GuiMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index e69ca0e..936af69 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -9,6 +9,7 @@ import shift.sextiarysector.item.ItemCalendar; import shift.sextiarysector.item.ItemCrop; import shift.sextiarysector.item.ItemDrink; +import shift.sextiarysector.item.ItemFigureBox; import shift.sextiarysector.item.ItemFoodCrop; import shift.sextiarysector.item.ItemFoodDrink; import shift.sextiarysector.item.ItemGFContactLenses; @@ -69,6 +70,9 @@ public class SSItems { public static Item goldDust; public static Item diamondDust; + public static Item copperDust; + public static Item zincDust; + public static Item mithrilDust; public static Item steelIngot; @@ -77,6 +81,10 @@ public class SSItems { public static Item blueStoneIngot; public static Item yellowStoneIngot; + public static Item copperIngot; + public static Item zincIngot; + public static Item silverIngot; + public static Item mithrilIngot; public static Item orichalcumGem; @@ -110,9 +118,13 @@ public class SSItems { public static Item smallCloth; public static Item cloth; public static Item canvas; + public static Item dryingFlesh; + public static Item fleshBobbin; //public static Item bottle; + public static Item figureBox; + //道具 public static Item woodScoop; public static Item stoneScoop; @@ -280,6 +292,12 @@ public static void initItems(){ diamondDust = new Item().setUnlocalizedName("ss.diamond_dust").setTextureName("sextiarysector:dust/diamond_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(diamondDust, "DiamondDust"); + copperDust = new Item().setUnlocalizedName("ss.copper_dust").setTextureName("sextiarysector:dust/copper_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(copperDust, "CopperDust"); + + zincDust = new Item().setUnlocalizedName("ss.zinc_dust").setTextureName("sextiarysector:dust/zinc_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(zincDust, "ZincDust"); + mithrilDust = new Item().setUnlocalizedName("ss.mithril_dust").setTextureName("sextiarysector:dust/mithril_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(mithrilDust, "MithrilDust"); @@ -296,6 +314,16 @@ public static void initItems(){ yellowStoneIngot = new Item().setUnlocalizedName("ss.yellowstone_ingot").setTextureName("sextiarysector:ingot/yellowstone_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(yellowStoneIngot, "YellowStoneIngot"); + copperIngot = new Item().setUnlocalizedName("ss.copper_ingot").setTextureName("sextiarysector:ingot/copper_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(copperIngot, "CopperIngot"); + + zincIngot = new Item().setUnlocalizedName("ss.zinc_ingot").setTextureName("sextiarysector:ingot/zinc_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(zincIngot, "ZincIngot"); + + silverIngot = new Item().setUnlocalizedName("ss.silver_ingot").setTextureName("sextiarysector:ingot/silver_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(silverIngot, "SilverIngot"); + + mithrilIngot = new Item().setUnlocalizedName("ss.mithril_ingot").setTextureName("sextiarysector:ingot/mithril_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(mithrilIngot, "MithrilIngot"); @@ -353,9 +381,17 @@ public static void initItems(){ canvas = new Item().setUnlocalizedName("ss.canvas").setTextureName("sextiarysector:loom/canvas").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(canvas, "Canvas"); + dryingFlesh = new Item().setUnlocalizedName("ss.drying_flesh").setTextureName("sextiarysector:loom/drying_flesh").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(dryingFlesh, "DryingFlesh"); + + fleshBobbin = new Item().setUnlocalizedName("ss.flesh_bobbin").setTextureName("sextiarysector:loom/flesh_bobbin").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(fleshBobbin, "FleshBobbin"); + //bottle = new ItemBlockBottle().setUnlocalizedName("ss.bottle").setTextureName("sextiarysector:drink/empty_bottle"); //GameRegistry.registerItem(bottle, "Bottle"); + figureBox = new ItemFigureBox().setUnlocalizedName("ss.figure_box").setTextureName("sextiarysector:figure_box").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(figureBox, "FigureBox"); //道具 woodScoop = new ItemScoop(ToolMaterial.WOOD).setUnlocalizedName("ss.wood_scoop").setTextureName("wood_scoop"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index b5f399c..f4d7073 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -37,6 +37,8 @@ public static void init(){ OreDictionary.registerOre("fluidWater", Items.water_bucket); OreDictionary.registerOre("fluidWater", new ItemStack(Items.potionitem, 1 ,0)); + OreDictionary.registerOre("craftingMagic", Items.nether_star); + //素材 プレート OreDictionary.registerOre("plateWood", SSBlocks.woodOakPlate); OreDictionary.registerOre("plateWood", SSBlocks.woodBirchPlate); @@ -67,6 +69,8 @@ public static void init(){ OreDictionary.registerOre("dustIron", SSItems.ironDust); OreDictionary.registerOre("dustGold", SSItems.goldDust); OreDictionary.registerOre("dustDiamond", SSItems.diamondDust); + OreDictionary.registerOre("dustCopper", SSItems.copperDust); + OreDictionary.registerOre("dustZinc", SSItems.zincDust); OreDictionary.registerOre("dustMithril", SSItems.mithrilDust); OreDictionary.registerOre("dustBluestone", SSItems.blueStoneDust); OreDictionary.registerOre("dustYellowstone", SSItems.yellowStoneDust); @@ -76,10 +80,17 @@ public static void init(){ OreDictionary.registerOre("ingotBluestone", SSItems.blueStoneIngot); OreDictionary.registerOre("ingotYellowstone", SSItems.yellowStoneIngot); OreDictionary.registerOre("ingotNinja", SSItems.ninjaIngot); + OreDictionary.registerOre("ingotCopper", SSItems.copperIngot); + OreDictionary.registerOre("ingotZinc", SSItems.zincIngot); + OreDictionary.registerOre("ingotSilver", SSItems.silverIngot); OreDictionary.registerOre("ingotMithril", SSItems.mithrilIngot); OreDictionary.registerOre("gemOrichalcum", SSItems.orichalcumGem); + OreDictionary.registerOre("oreCopper", SSBlocks.copperOre); + OreDictionary.registerOre("oreZinc", SSBlocks.zincOre); + OreDictionary.registerOre("oreSilver", SSBlocks.silverOre); + OreDictionary.registerOre("oreMithril", SSBlocks.mithrilOre); OreDictionary.registerOre("oreIron", SSItems.ironTurnip); diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index fbb284f..4d71c4a 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -10,6 +10,7 @@ import shift.mceconomy2.api.shop.ProductItem; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockMonitor.MonitorType; +import shift.sextiarysector.item.ItemFigureBox; import shift.sextiarysector.item.ItemShopRing; public class SSShops { @@ -30,6 +31,8 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.seasonStone,1),3000)); + creepers[i].addItemProduct(new ProductItem(((ItemFigureBox) SSItems.figureBox).getEditionFigureBox("figure_beginner"), 300)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,0),500)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,1),500)); @@ -41,6 +44,8 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.cucumber,1),360)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.rice,1),280)); + + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.mithrilIngot,1),1400)); } if(i==1){ diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index b4a1984..99ca1cf 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -14,6 +14,7 @@ import shift.sextiarysector.module.IModule; import shift.sextiarysector.module.ModuleAgriculture; import shift.sextiarysector.module.ModuleChunkLoader; +import shift.sextiarysector.module.ModuleFigure; import shift.sextiarysector.module.ModuleSandpit; import shift.sextiarysector.module.ModuleSeason; import shift.sextiarysector.module.ModuleStatistics; @@ -69,6 +70,7 @@ public void preInit(FMLPreInitializationEvent event) modules.add(ModuleSeason.getInstance()); modules.add(ModuleAgriculture.getInstance()); modules.add(ModuleSandpit.getInstance()); + modules.add(ModuleFigure.getInstance()); SSRecipes.deleteVanillaRecipe(); SSRecipes.initRecipeLists(); diff --git a/src/main/java/shift/sextiarysector/block/BlockFan.java b/src/main/java/shift/sextiarysector/block/BlockFan.java index ded0267..aa215cb 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFan.java +++ b/src/main/java/shift/sextiarysector/block/BlockFan.java @@ -38,4 +38,5 @@ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityFan(); } + } diff --git a/src/main/java/shift/sextiarysector/block/BlockFigure.java b/src/main/java/shift/sextiarysector/block/BlockFigure.java new file mode 100644 index 0000000..c697baa --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockFigure.java @@ -0,0 +1,266 @@ +package shift.sextiarysector.block; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SSItems; +import shift.sextiarysector.tileentity.TileEntityDirection; +import shift.sextiarysector.tileentity.TileEntityFigure; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockFigure extends BlockContainer { + + // private TileEntityFigure tile; + + @SideOnly(Side.CLIENT) + private IIcon side; + + public BlockFigure() { + super(Material.wood); + float f = 1.0f / 16.0f; + this.setBlockBounds(f * 2, 0, f * 2, f * 14, f * 4, f * 14); + this.setHardness(0.3f); + // this.setBlockUnbreakable(); + } + + public boolean isOpaqueCube() { + return false; + } + + public boolean renderAsNormalBlock() { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int par1, int par2) { + + if (par1 == 0 || par1 == 1) { + return this.blockIcon; + } else { + return this.side; + } + + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) { + super.registerBlockIcons(par1IconRegister); + this.side = par1IconRegister.registerIcon(this.getTextureName() + + "_side"); + } + + @SideOnly(Side.CLIENT) + public String getItemIconName() { + return this.getTextureName(); + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) { + ItemStack itemstack = new ItemStack(p_149666_1_, 1, 0); + + setFigureItem(itemstack, new ItemStack(Blocks.dirt, 1, 0), "creative"); + + p_149666_3_.add(itemstack); + + ItemStack itemstack2 = new ItemStack(p_149666_1_, 1, 0); + + setFigureItem(itemstack2, new ItemStack(SSItems.hammer, 1, 0), "creative"); + + p_149666_3_.add(itemstack2); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityFigure(); + } + + @Override + public void onBlockAdded(World par1World, int par2, int par3, int par4) { + super.onBlockAdded(par1World, par2, par3, par4); + + } + + private void setDefaultDirection(World par1World, int par2, int par3, int par4) { + + if (!par1World.isRemote) { + + Block block = par1World.getBlock(par2, par3, par4 - 1); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); + + TileEntityDirection tileEntity = (TileEntityDirection) par1World.getTileEntity(par2, par3, par4); + + byte b0 = 3; + + if (block.func_149730_j() && !block1.func_149730_j()) { + b0 = 3; + } + + if (block1.func_149730_j() && !block.func_149730_j()) { + b0 = 2; + } + + if (block2.func_149730_j() && !block3.func_149730_j()) { + b0 = 5; + } + + if (block3.func_149730_j() && !block2.func_149730_j()) { + b0 = 4; + } + + par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); + tileEntity.direction = ForgeDirection.getOrientation(b0); + + } + + } + + @Override + public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) { + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + TileEntityDirection tileEntity = (TileEntityDirection) par1World.getTileEntity(par2, par3, par4); + + if (l == 0) { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); + tileEntity.direction = ForgeDirection.getOrientation(2); + } + + if (l == 1) { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); + tileEntity.direction = ForgeDirection.getOrientation(5); + } + + if (l == 2) { + ///par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); + tileEntity.direction = ForgeDirection.getOrientation(3); + } + + if (l == 3) { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); + tileEntity.direction = ForgeDirection.getOrientation(4); + } + + } + + public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, + int p_149749_4_, Block p_149749_5_, int p_149749_6_) { + // ItemInWorldManager a = new ItemInWorldManager(); + // if( ItemInWorldManager.isCreative()); + // tile = (TileEntityFigure) p_149749_1_.getTileEntity(p_149749_2_, + // p_149749_3_, p_149749_4_); + // this.dropBlockAsItem(p_149749_1_, p_149749_2_, p_149749_3_, + // p_149749_4_, 0, 0); + super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, + p_149749_5_, p_149749_6_); + } + + public void onBlockHarvested(World p_149681_1_, int p_149681_2_,int p_149681_3_, int p_149681_4_, int p_149681_5_,EntityPlayer p_149681_6_) { + if (!p_149681_6_.capabilities.isCreativeMode) { + this.dropBlockAsItem(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 0); + } + + super.onBlockHarvested(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, p_149681_6_); + } + + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { + + ArrayList ret = new ArrayList(); + + TileEntity t = world.getTileEntity(x, y, z); + + if (t != null && t instanceof TileEntityFigure) { + + Item item = getItemDropped(metadata, world.rand, fortune); + ItemStack itemstack = new ItemStack(item, 1); + setFigureItem(itemstack, ((TileEntityFigure) t).getFigure(), ((TileEntityFigure) t).getEdition()); + + ret.add(itemstack); + + } + + return ret; + } + + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { + + ItemStack stack = new ItemStack(this, 1); + + TileEntityFigure tile = (TileEntityFigure) world.getTileEntity(x, y, z); + + if (tile.getFigure() != null) { + setFigureItem(stack, tile.getFigure(), tile.getEdition()); + } + + return stack; + } + + public static ItemStack setFigureItem(ItemStack item, ItemStack setItem, String edition) { + + NBTTagCompound nbt = item.stackTagCompound; + + if (nbt == null) { + nbt = new NBTTagCompound(); + item.setTagCompound(nbt); + } + + NBTTagCompound nbttagcompound1 = new NBTTagCompound(); + setItem.writeToNBT(nbttagcompound1); + nbt.setTag("figure", nbttagcompound1); + nbt.setString("edition", edition); + + return item; + } + + public static ItemStack getFigureItem(ItemStack item) { + + NBTTagCompound nbt = item.stackTagCompound; + + if (nbt == null) { + return null; + } + + if (nbt.hasKey("figure")) { + return ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("figure")); + } + + return null; + } + + public static String getEdition(ItemStack item) { + + NBTTagCompound nbt = item.stackTagCompound; + + if (nbt == null) { + return null; + } + + if (nbt.hasKey("edition")) { + return nbt.getString("edition"); + } + + return null; + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockMotor.java b/src/main/java/shift/sextiarysector/block/BlockMotor.java index cb19e9f..d55d012 100644 --- a/src/main/java/shift/sextiarysector/block/BlockMotor.java +++ b/src/main/java/shift/sextiarysector/block/BlockMotor.java @@ -1,12 +1,6 @@ package shift.sextiarysector.block; import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.item.IHammer; -import shift.sextiarysector.tileentity.TileEntityDirection; public abstract class BlockMotor extends BlockDirection{ @@ -25,31 +19,5 @@ public boolean isOpaqueCube() { return false; } - @Override - public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6,float par7, float par8, float par9) { - - ItemStack item = par5EntityPlayer.getCurrentEquippedItem(); - - if(item == null || !(item.getItem() instanceof IHammer))return false; - - if(!((IHammer)item.getItem()).canUse(item))return false; - - TileEntityDirection t = (TileEntityDirection) par1World.getTileEntity(x, y, z); - - ForgeDirection d = t.getDirection(); - - if(d.ordinal()>5){ - t.direction = d.getOrientation(0); - }else{ - t.direction = d.getOrientation(d.ordinal()+1); - } - - ((IHammer)item.getItem()).use(item); - - par1World.playSoundEffect(x, y, z, this.stepSound.getStepResourcePath(), 1.0F, par1World.rand.nextFloat() * 0.1F + 0.6F); - par1World.markBlockForUpdate(x, y, z); - - return true; - } } diff --git a/src/main/java/shift/sextiarysector/block/BlockPump.java b/src/main/java/shift/sextiarysector/block/BlockPump.java new file mode 100644 index 0000000..cb81c93 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockPump.java @@ -0,0 +1,153 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.tileentity.TileEntityDirection; +import shift.sextiarysector.tileentity.TileEntityPump; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockPump extends BlockContainer { + + @SideOnly(Side.CLIENT) + private IIcon iconTop; + @SideOnly(Side.CLIENT) + private IIcon iconUnder; + @SideOnly(Side.CLIENT) + private IIcon iconFront; + + public BlockPump() { + super(Material.wood); + this.setHardness(1.0F); + this.setStepSound(soundTypeStone); + this.setCreativeTab(SextiarySectorAPI.TabSSIndustry); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) { + + int d = ((TileEntityDirection) p_149673_1_.getTileEntity(x, y, z)).direction.ordinal(); + + if (side == 1) { + return this.iconTop; + } else if (side == 0) { + return this.iconUnder; + } else if (side == d) { + return this.iconFront; + } else { + return this.blockIcon; + } + + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(int par1, int par2) { + + if (par1 == 1) { + return this.iconTop; + } else if (par1 == 0) { + return this.iconUnder; + } else if (par1 == 3) { + return this.iconFront; + } else { + return this.blockIcon; + } + + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) { + this.blockIcon = par1IconRegister.registerIcon(this.getTextureName()); + + this.iconTop = par1IconRegister.registerIcon(this.getTextureName()+ "_top"); + this.iconUnder = par1IconRegister.registerIcon(this.getTextureName()); + + this.iconFront = par1IconRegister.registerIcon(this.getTextureName()+ "_front"); + + } + + @Override + public void onBlockAdded(World par1World, int par2, int par3, int par4) { + super.onBlockAdded(par1World, par2, par3, par4); + } + + private void setDefaultDirection(World par1World, int par2, int par3, int par4) { + if (!par1World.isRemote) { + Block block = par1World.getBlock(par2, par3, par4 - 1); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); + + TileEntityDirection tileEntity = (TileEntityDirection) par1World + .getTileEntity(par2, par3, par4); + + byte b0 = 3; + + if (block.func_149730_j() && !block1.func_149730_j()) { + b0 = 3; + } + + if (block1.func_149730_j() && !block.func_149730_j()) { + b0 = 2; + } + + if (block2.func_149730_j() && !block3.func_149730_j()) { + b0 = 5; + } + + if (block3.func_149730_j() && !block2.func_149730_j()) { + b0 = 4; + } + + // par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); + tileEntity.direction = ForgeDirection.getOrientation(b0); + } + } + + @Override + public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) { + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + TileEntityDirection tileEntity = (TileEntityDirection) par1World.getTileEntity(par2, par3, par4); + + if (l == 0) { + // par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[2]; + } + + if (l == 1) { + // par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[5]; + } + + if (l == 2) { + // par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[3]; + } + + if (l == 3) { + // par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[4]; + } + + } + + @Override + public TileEntity createNewTileEntity(World par1World, int p_149915_2_) { + return new TileEntityPump(); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockSaw.java b/src/main/java/shift/sextiarysector/block/BlockSaw.java new file mode 100644 index 0000000..de55e43 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockSaw.java @@ -0,0 +1,40 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.tileentity.TileEntitySaw; + +public class BlockSaw extends BlockDirection{ + + public BlockSaw() { + super(Material.iron); + this.setBlockTextureName("planks_oak"); + this.setHardness(1.0F); + this.setStepSound(soundTypeStone); + this.setCreativeTab(SextiarySectorAPI.TabSSIndustry); + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.sawType; + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntitySaw(); + } +} diff --git a/src/main/java/shift/sextiarysector/block/BlockSteamMotor.java b/src/main/java/shift/sextiarysector/block/BlockSteamMotor.java new file mode 100644 index 0000000..1a5b757 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockSteamMotor.java @@ -0,0 +1,44 @@ +package shift.sextiarysector.block; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntitySteamMotor; + +public class BlockSteamMotor extends BlockMotor{ + + @Override + public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + { + if(super.onBlockActivated(par1World, x, y, z, par5EntityPlayer, par6, par7, par8, par9)){ + return true; + } + + if (par1World.isRemote) + { + return true; + } + else + { + TileEntitySteamMotor tileentityfurnace = (TileEntitySteamMotor)par1World.getTileEntity(x, y, z); + if (tileentityfurnace != null) + { + par5EntityPlayer.openGui(SextiarySector.instance, 60, par1World, x, y, z); + } + + return true; + } + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntitySteamMotor(); + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.steamMotorType; + } +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java b/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java index 871d608..f8787f5 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java +++ b/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java @@ -173,19 +173,19 @@ else if (TileEntityFurnace.isItemFuel(itemstack1)) return null; } } - else if (p_82846_2_ >= 3 && p_82846_2_ < 30) + else if (p_82846_2_ >= 6 && p_82846_2_ < 33) { - if (!this.mergeItemStack(itemstack1, 30, 39, false)) + if (!this.mergeItemStack(itemstack1, 33, 42, false)) { return null; } } - else if (p_82846_2_ >= 30 && p_82846_2_ < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) + else if (p_82846_2_ >= 33 && p_82846_2_ < 42 && !this.mergeItemStack(itemstack1, 6, 33, false)) { return null; } } - else if (!this.mergeItemStack(itemstack1, 3, 39, false)) + else if (!this.mergeItemStack(itemstack1, 6, 42, false)) { return null; } diff --git a/src/main/java/shift/sextiarysector/container/ContainerSteamMotor.java b/src/main/java/shift/sextiarysector/container/ContainerSteamMotor.java new file mode 100644 index 0000000..333473d --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerSteamMotor.java @@ -0,0 +1,137 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidContainerRegistry; +import shift.sextiarysector.tileentity.TileEntitySteamMotor; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ContainerSteamMotor extends Container +{ + private TileEntitySteamMotor tileFurnace; + //private int lastFluid; + + public ContainerSteamMotor(InventoryPlayer p_i1812_1_, TileEntitySteamMotor p_i1812_2_) + { + this.tileFurnace = p_i1812_2_; + //this.addSlotToContainer(new Slot(p_i1812_2_, 0, 56, 17)); + //this.addSlotToContainer(new Slot(p_i1812_2_, 1, 56, 53)); + //this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 2, 107, 53)); + //this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 3, 125, 53)); + this.addSlotToContainer(new SlotFluid(p_i1812_2_, 0, 44, 17)); + this.addSlotToContainer(new SlotFluid(p_i1812_2_, 1, 44, 53)); + int i; + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(p_i1812_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(p_i1812_1_, i, 8 + i * 18, 142)); + } + } + + public void addCraftingToCrafters(ICrafting p_75132_1_) + { + super.addCraftingToCrafters(p_75132_1_); + + } + + /** + * Looks for changes made in the container, sends them to every listener. + */ + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int p_75137_1_, int p_75137_2_) + { + + } + + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return this.tileFurnace.isUseableByPlayer(p_75145_1_); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot)this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ == 1) + { + if (!this.mergeItemStack(itemstack1, 2, 38, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (p_82846_2_ != 1 && p_82846_2_ != 0) + { + if (FluidContainerRegistry.isFilledContainer(itemstack)) + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return null; + } + } + else if (p_82846_2_ >= 2 && p_82846_2_ < 29) + { + if (!this.mergeItemStack(itemstack1, 29, 38, false)) + { + return null; + } + } + else if (p_82846_2_ >= 29 && p_82846_2_ < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 2, 38, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack)null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java index 9f9a08f..2fe1252 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java @@ -7,6 +7,7 @@ import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.AttackEntityEvent; import net.minecraftforge.event.entity.player.PlayerUseItemEvent; @@ -229,6 +230,39 @@ public void LivingSleepingEvent(PlayerWakeUpEvent event) { } + } + + /** スタミナのボーナス */ + @SubscribeEvent + public void livingDashEvent(LivingUpdateEvent event) { + + //if (event.entityLiving.worldObj.isRemote) { + // return; + //} + + if (!(event.entityLiving instanceof EntityPlayer)) { + return; + } + + EntityPlayer player = (EntityPlayer) event.entityLiving; + + if(EntityPlayerManager.getStaminaStats(player).getStaminaLevel()<20){ + + player.motionX *= 0.5; + //player.motionY *= 0.5; + player.motionZ *= 0.5; + + }else if(player.isSprinting() && !player.isAirBorne){ + + player.motionX *= 1.4; + //player.motionY *= 1.4; + player.motionZ *= 1.4; + + } + + + + } diff --git a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java index 6cc4f47..3a5a5cf 100644 --- a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java @@ -21,6 +21,10 @@ public class WorldEventHandler { private WorldGenMinable bluestoneGen; private WorldGenMinable yellowstoneGen; + private WorldGenMinable copperOreGen; + private WorldGenMinable zincOreGen; + private WorldGenMinable silverOreGen; + private WorldGenMinable mithrilOreGen; private WorldGenMinable orichalcumOreGen; @@ -49,6 +53,10 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.bluestoneGen = new WorldGenMinable(SSBlocks.blueStoneOre, 7); this.yellowstoneGen = new WorldGenMinable(SSBlocks.yellowStoneOre, 7); + copperOreGen = new WorldGenMinable(SSBlocks.copperOre, 14); + zincOreGen = new WorldGenMinable(SSBlocks.zincOre, 8); + silverOreGen = new WorldGenMinable(SSBlocks.silverOre, 8); + mithrilOreGen = new WorldGenMinable(SSBlocks.mithrilOre, 8); orichalcumOreGen = new WorldGenMinable(SSBlocks.orichalcumOre, 7); @@ -60,6 +68,10 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.genStandardOre1(8, this.bluestoneGen, 0, 16); this.genStandardOre1(8, this.yellowstoneGen, 0, 16); + this.genStandardOre1(20, this.copperOreGen, 0, 64); + this.genStandardOre1(12, this.zincOreGen, 0, 64); + this.genStandardOre1(2, this.silverOreGen, 0, 32); + if(BiomeDictionary.isBiomeOfType(biome, MAGICAL)){ this.genStandardOre1(4, mithrilOreGen, 0, 32); this.genStandardOre1(1, orichalcumOreGen, 0, 18); diff --git a/src/main/java/shift/sextiarysector/gui/GuiGFTank.java b/src/main/java/shift/sextiarysector/gui/GuiGFTank.java index bd84844..154565d 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiGFTank.java +++ b/src/main/java/shift/sextiarysector/gui/GuiGFTank.java @@ -18,6 +18,8 @@ public class GuiGFTank extends GUIGearMachine{ private static final ResourceLocation woodGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/wood_gf_tank.png"); private static final ResourceLocation stoneGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/stone_gf_tank.png"); private static final ResourceLocation steelGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/steel_gf_tank.png"); + private static final ResourceLocation ninjaGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/ninja_gf_tank.png"); + private static final ResourceLocation orichalcumGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/orichalcum_gf_tank.png"); private int type; protected final TileEntityGFTank tankInventory; float s =0; @@ -160,6 +162,8 @@ protected ResourceLocation getBindTexture() { case 1:return this.woodGuiTextures; case 2:return this.stoneGuiTextures; case 3:return this.steelGuiTextures; + case 4:return this.ninjaGuiTextures; + case 5:return this.orichalcumGuiTextures; } return this.woodGuiTextures; } diff --git a/src/main/java/shift/sextiarysector/gui/GuiSteamMotor.java b/src/main/java/shift/sextiarysector/gui/GuiSteamMotor.java new file mode 100644 index 0000000..8aba2ff --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiSteamMotor.java @@ -0,0 +1,140 @@ +package shift.sextiarysector.gui; + +import java.text.NumberFormat; +import java.util.ArrayList; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.container.ContainerSteamMotor; +import shift.sextiarysector.tileentity.TileEntitySteamMotor; + +public class GuiSteamMotor extends GuiContainer +{ + private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/steam_motor.png"); + private TileEntitySteamMotor tileFurnace; + + public GuiSteamMotor(InventoryPlayer p_i1091_1_, TileEntitySteamMotor p_i1091_2_) + { + super(new ContainerSteamMotor(p_i1091_1_, p_i1091_2_)); + this.tileFurnace = p_i1091_2_; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + String s = this.tileFurnace.hasCustomInventoryName() ? this.tileFurnace.getInventoryName() : I18n.format(this.tileFurnace.getInventoryName(), new Object[0]); + this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(furnaceGuiTextures); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + + + //Fluid + if (this.tileFurnace.isFluid()) + { + //FluidStack f = this.tileFurnace.getTank().getFluid(); + this.drawFluidTank(k + 74,l + 17,this.tileFurnace.getTank(),34,52); + + } + this.mc.getTextureManager().bindTexture(furnaceGuiTextures); + this.drawTexturedModalRect(k + 73, l + 16, 176, 0, 36, 54); + + } + + @Override + public void drawScreen(int par1, int par2, float par3) + { + super.drawScreen(par1, par2, par3); + + ArrayList arraylist = new ArrayList(); + + String f = "None"; + + if (this.tileFurnace.isFluid()) + { + f = this.tileFurnace.getTank().getFluid().getFluid().getLocalizedName(this.tileFurnace.getTank().getFluid()); + } + + NumberFormat nfNum = NumberFormat.getNumberInstance(); + + arraylist.add(0,"" + EnumChatFormatting.RESET+ "Fluid Tank" + EnumChatFormatting.RESET ); + arraylist.add(1,"" + EnumChatFormatting.GRAY + "Fluid : "+f); + arraylist.add(2, ""+ EnumChatFormatting.GRAY + "Amount : " + nfNum.format(this.tileFurnace.getTank().getFluidAmount()) + " / " + nfNum.format(this.tileFurnace.getTank().getCapacity()) + " mB"); + + GL11.glPushMatrix(); + if (this.func_146978_c(73, 16, 36, 54, par1, par2)) + { + drawHoveringText(arraylist, par1, par2,fontRendererObj); + } + GL11.glPopMatrix(); + + + + } + + public void drawFluidTank(int x, int y, FluidTank fluidTank, int width, int height) { + + GL11.glColor3f(1,1,1); + + FluidStack fluidStack = fluidTank.getFluid(); + + ResourceLocation r; + if(fluidStack.getFluid().getSpriteNumber()==0){ + r = TextureMap.locationBlocksTexture; + }else{ + r = TextureMap.locationItemsTexture; + } + + this.mc.getTextureManager().bindTexture(r); + this.setColor3ubFromInt(fluidStack.getFluid().getColor(fluidStack)); + + int widthR = width;//*(fluidTank.getFluidAmount()/fluidTank.getCapacity()); + int heightR = (int) (height*((float)fluidTank.getFluidAmount()/(float)fluidTank.getCapacity())); + + int yR = y+(height-heightR); + + int widthL = 0; + int heightL = 0; + IIcon icon = (fluidStack.getFluid().getIcon(fluidStack)); + + for (int i = 0; i < widthR; i += 16) { + + for (int j = 0; j < heightR; j += 16) { + + widthL = Math.min(widthR - i, 16); + heightL = Math.min(heightR - j, 16); + this.drawTexturedModelRectFromIcon(x + i, yR + j, icon, widthL, heightL); + + } + } + + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); + + } + + public static void setColor3ubFromInt(int color) { + + GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockFigure.java b/src/main/java/shift/sextiarysector/item/ItemBlockFigure.java new file mode 100644 index 0000000..5476e99 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemBlockFigure.java @@ -0,0 +1,63 @@ +package shift.sextiarysector.item; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import shift.sextiarysector.block.BlockFigure; +import shift.sextiarysector.tileentity.TileEntityFigure; + +public class ItemBlockFigure extends ItemBlock{ + + private static ItemStack fItem = new ItemStack(Blocks.dirt); + + public ItemBlockFigure(Block p_i45328_1_) { + super(p_i45328_1_); + this.hasSubtypes = true; + } + + @Override + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) + { + boolean result = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ,metadata); + + if(result && world.getTileEntity(x, y, z) instanceof TileEntityFigure){ + TileEntityFigure tile = (TileEntityFigure)world.getTileEntity(x, y, z); + + tile.setFigure(BlockFigure.getFigureItem(stack)); + tile.setEdition(BlockFigure.getEdition(stack)); + } + + return result; + } + + @Override + public void addInformation(ItemStack itemstack,EntityPlayer par1EntityPlayer, List list , boolean flag) + { + + + NBTTagCompound nbt = itemstack.stackTagCompound; + + if(nbt == null) + { + return; + } + + if(nbt.hasKey("figure")){ + + fItem.readFromNBT(nbt.getCompoundTag("figure")); + list.add(StatCollector.translateToLocal("tooltip.name") + " : " + fItem.getDisplayName()); + list.add(StatCollector.translateToLocal("tooltip.edition") + " : " + StatCollector.translateToLocal("edition."+BlockFigure.getEdition(itemstack))); + + } + + + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemFigureBox.java b/src/main/java/shift/sextiarysector/item/ItemFigureBox.java new file mode 100644 index 0000000..2cda4f2 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemFigureBox.java @@ -0,0 +1,79 @@ +package shift.sextiarysector.item; + +import java.util.List; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.block.BlockFigure; +import shift.sextiarysector.module.ModuleFigure; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemFigureBox extends Item{ + + public ItemFigureBox() { + this.hasSubtypes = true; + } + + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) + { + + NBTTagCompound nbt = p_77659_1_.getTagCompound(); + + ItemStack item = ModuleFigure.getFigure(p_77659_2_, nbt.getString("edition")); + + if(item!=null){ + + if(p_77659_2_.isRemote)return p_77659_1_; + ItemStack f = new ItemStack(SSBlocks.figure); + BlockFigure.setFigureItem(f, item, nbt.getString("edition")); + p_77659_3_.entityDropItem(f , 0.5f); + p_77659_1_.stackSize--; + + } + + return p_77659_1_; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) + { + + for(String edition : ModuleFigure.getInstance().figures.keySet()){ + + p_150895_3_.add(getEditionFigureBox(edition)); + + } + + } + + public ItemStack getEditionFigureBox(String edition){ + + ItemStack item = new ItemStack(this, 1, 0); + NBTTagCompound nbt = new NBTTagCompound(); + item.setTagCompound(nbt); + nbt.setString("edition", edition); + return item; + + } + + @Override + public void addInformation(ItemStack itemstack,EntityPlayer par1EntityPlayer, List list , boolean flag) + { + + + NBTTagCompound nbt = itemstack.getTagCompound(); + + list.add(StatCollector.translateToLocal("tooltip.edition") + " : " + StatCollector.translateToLocal("edition."+nbt.getString("edition"))); + + + } + +} diff --git a/src/main/java/shift/sextiarysector/module/ModuleFigure.java b/src/main/java/shift/sextiarysector/module/ModuleFigure.java new file mode 100644 index 0000000..8f6ea4a --- /dev/null +++ b/src/main/java/shift/sextiarysector/module/ModuleFigure.java @@ -0,0 +1,144 @@ +package shift.sextiarysector.module; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Random; + +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandom; +import net.minecraft.world.World; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class ModuleFigure implements IModule { + + private static ModuleFigure instance; + + private ModuleFigure() { + } + + public static ModuleFigure getInstance() { + if(instance==null){ + instance = new ModuleFigure(); + } + return instance; + } + + @Override + public void preInit(FMLPreInitializationEvent event) { + + } + + @Override + public void load(FMLInitializationEvent event) { + + addFigure("figure_beginner", new ItemStack(Blocks.dirt), 50); + addFigure("figure_beginner", new ItemStack(Blocks.clay), 40); + addFigure("figure_beginner", new ItemStack(Blocks.fence), 22); + addFigure("figure_beginner", new ItemStack(Blocks.log), 30); + addFigure("figure_beginner", new ItemStack(Blocks.iron_ore), 16); + + addFigure("figure_beginner", new ItemStack(Items.stick), 50); + addFigure("figure_beginner", new ItemStack(Items.flint), 40); + addFigure("figure_beginner", new ItemStack(Items.fish), 26); + addFigure("figure_beginner", new ItemStack(Items.book), 34); + addFigure("figure_beginner", new ItemStack(Items.bone), 18); + addFigure("figure_beginner", new ItemStack(Items.cake), 2); + + } + + @Override + public void postInit(FMLPostInitializationEvent event) { + + } + + public static void addFigure(String edition, ItemStack seed, int weight) + { + addFigure(edition, new FigureEntry(seed, weight)); + } + + public static void addFigure(String edition, FigureEntry shellEntry){ + if(!figures.containsKey(edition)){ + figures.put(edition, new ArrayList()); + } + figures.get(edition).add(shellEntry); + } + + public static class FigureEntry extends WeightedRandom.Item + { + public final ItemStack figure; + private float damage; + private boolean enchant; + + public FigureEntry(ItemStack seed, int weight) + { + super(weight); + this.figure = seed; + } + + public ItemStack addCustom(Random p_150708_1_) + { + ItemStack itemstack = this.figure.copy(); + + if (this.damage > 0.0F) + { + int i = (int)(this.damage * (float)this.figure.getMaxDamage()); + int j = itemstack.getMaxDamage() - p_150708_1_.nextInt(p_150708_1_.nextInt(i) + 1); + + if (j > i) + { + j = i; + } + + if (j < 1) + { + j = 1; + } + + itemstack.setItemDamage(j); + } + + if (this.enchant) + { + EnchantmentHelper.addRandomEnchantment(p_150708_1_, itemstack, 30); + } + + return itemstack; + } + + public FigureEntry setDamage(float p_150709_1_) + { + this.damage = p_150709_1_; + return this; + } + + public FigureEntry setEnchant() + { + this.enchant = true; + return this; + } + + } + public static final HashMap> figures = new HashMap>(); + + public static ItemStack getFigure(World world, String edition) + { + + if(!figures.containsKey(edition))return null; + + FigureEntry entry = (FigureEntry)WeightedRandom.getRandomItem(world.rand, figures.get(edition)); + if (entry == null || entry.figure == null) + { + return null; + } + + return entry.addCustom(world.rand); + + } + +} diff --git a/src/main/java/shift/sextiarysector/module/ModuleSandpit.java b/src/main/java/shift/sextiarysector/module/ModuleSandpit.java index 88a2dcd..560d355 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleSandpit.java +++ b/src/main/java/shift/sextiarysector/module/ModuleSandpit.java @@ -36,17 +36,20 @@ public void load(FMLInitializationEvent event) { @Override public void postInit(FMLPostInitializationEvent event) { - BlockSandpit.addShell(new ItemStack(Items.stick), 20); + BlockSandpit.addShell(new ItemStack(Items.stick), 25); - BlockSandpit.addShell(new ItemStack(Items.glass_bottle), 2); + BlockSandpit.addShell(new ItemStack(Items.glass_bottle), 7); - BlockSandpit.addShell(new ShellEntry(new ItemStack(Items.book), 3).setEnchant()); + BlockSandpit.addShell(new ShellEntry(new ItemStack(Items.book), 5).setEnchant()); - BlockSandpit.addShell(new ItemStack(SSItems.laver), 12); + BlockSandpit.addShell(new ItemStack(SSItems.laver), 16); - BlockSandpit.addShell(new ItemStack(Items.redstone), 3); - BlockSandpit.addShell(new ItemStack(SSItems.blueStoneDust), 3); - BlockSandpit.addShell(new ItemStack(SSItems.yellowStoneDust), 3); + BlockSandpit.addShell(new ItemStack(Items.redstone), 5); + BlockSandpit.addShell(new ItemStack(SSItems.blueStoneDust), 5); + BlockSandpit.addShell(new ItemStack(SSItems.yellowStoneDust), 5); + + BlockSandpit.addShell(new ItemStack(SSItems.mithrilDust), 3); + BlockSandpit.addShell(new ItemStack(SSItems.orichalcumGem), 1); } diff --git a/src/main/java/shift/sextiarysector/player/StaminaStats.java b/src/main/java/shift/sextiarysector/player/StaminaStats.java index 06f1b32..0eb8d9a 100644 --- a/src/main/java/shift/sextiarysector/player/StaminaStats.java +++ b/src/main/java/shift/sextiarysector/player/StaminaStats.java @@ -2,7 +2,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; import net.minecraft.world.EnumDifficulty; import shift.sextiarysector.Config; import cpw.mods.fml.relauncher.Side; @@ -85,9 +84,9 @@ else if (this.staminaLevel <= 0) { if (par1EntityPlayer.getHealth() > 10.0F || i.getDifficultyId() >= 3 || par1EntityPlayer.getHealth() > 1.0F && i.getDifficultyId() >= 2) { - if(!par1EntityPlayer.isPlayerSleeping()){ - par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); - } + //if(!par1EntityPlayer.isPlayerSleeping()){ + // par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); + //} //par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java b/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java index 4394701..acf2de8 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java @@ -3,6 +3,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import shift.sextiarysector.SSRecipes; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -13,6 +14,7 @@ public class PluginAppleMilk implements IPlugin { public static Item chalcedonyKnife; + public static Item princessClam; @Override public void prePlugin(FMLPreInitializationEvent event) { @@ -24,15 +26,21 @@ public void prePlugin(FMLPreInitializationEvent event) { public void initPlugin(FMLInitializationEvent event) { this.chalcedonyKnife = GameRegistry.findItem("DCsAppleMilk", "defeatedcrow.chalcedonyKnife"); + princessClam = GameRegistry.findItem("DCsAppleMilk", "defeatedcrow.princessClam"); OreDictionary.registerOre("craftingToolWireCutter", new ItemStack(chalcedonyKnife,1,OreDictionary.WILDCARD_VALUE)); OreDictionary.registerOre("craftingToolKnife", new ItemStack(chalcedonyKnife,1,OreDictionary.WILDCARD_VALUE)); + OreDictionary.registerOre("craftingMagic", new ItemStack(princessClam,1, 0)); + + SSRecipes.magicFuel.add(new ItemStack(princessClam,1, 0), 3200); + } @Override public void postPlugin(FMLPostInitializationEvent event) { - // TODO 自動生成されたメソッド・スタブ + + } diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 6747a05..4514b62 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -19,15 +19,18 @@ import shift.sextiarysector.renderer.block.RendererChest; import shift.sextiarysector.renderer.block.RendererFan; import shift.sextiarysector.renderer.block.RendererFarmland; +import shift.sextiarysector.renderer.block.RendererFigure; import shift.sextiarysector.renderer.block.RendererFluidCrafter; import shift.sextiarysector.renderer.block.RendererGearShaft; import shift.sextiarysector.renderer.block.RendererHole; import shift.sextiarysector.renderer.block.RendererMonitor; import shift.sextiarysector.renderer.block.RendererPaddy; +import shift.sextiarysector.renderer.block.RendererSaw; import shift.sextiarysector.renderer.block.RendererShaft; import shift.sextiarysector.renderer.block.RendererSmallWaterwheel; import shift.sextiarysector.renderer.block.RendererSmallWindmill; import shift.sextiarysector.renderer.block.RendererSquare; +import shift.sextiarysector.renderer.block.RendererSteamMotor; import shift.sextiarysector.renderer.block.RendererWindmill; import shift.sextiarysector.renderer.block.RendererWood; import shift.sextiarysector.renderer.block.RendererWoodHopper; @@ -35,14 +38,17 @@ import shift.sextiarysector.renderer.item.RenderGF; import shift.sextiarysector.tileentity.TileEntityBlockBottle; import shift.sextiarysector.tileentity.TileEntityFan; +import shift.sextiarysector.tileentity.TileEntityFigure; import shift.sextiarysector.tileentity.TileEntityFluidCrafter; import shift.sextiarysector.tileentity.TileEntityGearShaft; import shift.sextiarysector.tileentity.TileEntityMonitor; import shift.sextiarysector.tileentity.TileEntitySSChest; +import shift.sextiarysector.tileentity.TileEntitySaw; import shift.sextiarysector.tileentity.TileEntityShaft; import shift.sextiarysector.tileentity.TileEntitySmallWaterwheel; import shift.sextiarysector.tileentity.TileEntitySmallWindmill; import shift.sextiarysector.tileentity.TileEntitySquare; +import shift.sextiarysector.tileentity.TileEntitySteamMotor; import shift.sextiarysector.tileentity.TileEntityWindmill; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; @@ -80,8 +86,10 @@ public void setCustomRenderers() { this.smallWindMillType = RenderingRegistry.getNextAvailableRenderId(); this.windMillType = RenderingRegistry.getNextAvailableRenderId(); this.smallWaterwheel = RenderingRegistry.getNextAvailableRenderId(); + this.steamMotorType = RenderingRegistry.getNextAvailableRenderId(); this.fanType = RenderingRegistry.getNextAvailableRenderId(); + this.sawType = RenderingRegistry.getNextAvailableRenderId(); this.chestType = RenderingRegistry.getNextAvailableRenderId(); @@ -110,8 +118,10 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererSmallWindmill()); RenderingRegistry.registerBlockHandler(new RendererWindmill()); RenderingRegistry.registerBlockHandler(new RendererSmallWaterwheel()); + RenderingRegistry.registerBlockHandler(new RendererSteamMotor()); RenderingRegistry.registerBlockHandler(new RendererFan()); + RenderingRegistry.registerBlockHandler(new RendererSaw()); RenderingRegistry.registerBlockHandler(new RendererChest()); @@ -137,6 +147,8 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySquare.class, new RendererSquare()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFigure.class, new RendererFigure()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFluidCrafter.class, new RendererFluidCrafter()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGearShaft.class, new RendererGearShaft()); @@ -144,8 +156,10 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallWindmill.class, new RendererSmallWindmill()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWindmill.class, new RendererWindmill()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallWaterwheel.class, new RendererSmallWaterwheel()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySteamMotor.class, new RendererSteamMotor()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFan.class, new RendererFan()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySaw.class, new RendererSaw()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySSChest.class, new RendererChest()); diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 05a21a6..53618f7 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -22,8 +22,10 @@ public class CommonProxy { public int smallWindMillType; public int windMillType; public int smallWaterwheel; + public int steamMotorType; public int fanType; + public int sawType; public int monitorType; diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index c97a790..21c1fd8 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -39,6 +39,13 @@ public static void addRecipes(CraftingManager p_77608_1_) 'y', "stickWood", })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.fleshBobbin, 1), + new Object[] { + "xxx", "xyx", "xxx", + 'x', SSItems.dryingFlesh, + 'y', "stickWood", + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.woodHopper, 1), new Object[] { "y y", "yxy", " y ", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java index d6d09d7..408838c 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java @@ -2,8 +2,10 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import shift.sextiarysector.SSFluids; +import shift.sextiarysector.SSItems; public class RecipesFluidFurnace { @@ -13,6 +15,8 @@ public static void addRecipes(RecipeSimpleFluid recipe) //recipe.add(new ItemStack(Blocks.netherrack,1),null, new FluidStack(SSFluids.drinkingWater, 50)); recipe.add(new ItemStack(Items.water_bucket,1),new ItemStack(Items.stick, 1), new FluidStack(SSFluids.drinkingWater, 1000)); + recipe.add(new ItemStack(Items.rotten_flesh,1),new ItemStack(SSItems.dryingFlesh, 1), new FluidStack(FluidRegistry.WATER, 500)); + recipe.add(new ItemStack(Items.iron_door,1), null, new FluidStack(SSFluids.iron, 5000)); recipe.add(new ItemStack(Items.iron_ingot,1), null, new FluidStack(SSFluids.iron, 1000)); recipe.add(new ItemStack(Items.iron_axe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 2500)); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java index fe724d7..ce7dc6f 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java @@ -2,6 +2,7 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SSItems; import cpw.mods.fml.common.registry.GameRegistry; @@ -11,6 +12,16 @@ public static void addRecipes() { GameRegistry.addSmelting(new ItemStack(SSItems.ironDust),new ItemStack(Items.iron_ingot),0.1f); GameRegistry.addSmelting(new ItemStack(SSItems.goldDust),new ItemStack(Items.gold_ingot),0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.copperDust),new ItemStack(SSItems.copperIngot),0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.zincDust),new ItemStack(SSItems.zincIngot),0.1f); + + GameRegistry.addSmelting(new ItemStack(SSBlocks.copperOre),new ItemStack(SSItems.copperIngot), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.zincOre),new ItemStack(SSItems.zincIngot), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.silverOre),new ItemStack(SSItems.silverIngot), 0.1f); + + GameRegistry.addSmelting(new ItemStack(SSBlocks.orichalcumOre),new ItemStack(SSItems.orichalcumGem), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.blueStoneOre),new ItemStack(SSItems.blueStoneDust), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.yellowStoneOre),new ItemStack(SSItems.yellowStoneDust), 0.1f); GameRegistry.addSmelting(new ItemStack(SSItems.laver),new ItemStack(SSItems.laverRoasted),0.1f); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index 25075d8..988d9d6 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -53,6 +53,14 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) "dustIron" })); + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.brassIngot, 1), + new Object[] { + "dustCopper", + "dustCopper", + "dustZinc" + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.ninjaIngot, 1), new Object[] { "dustMithril", @@ -71,6 +79,16 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) 'x', "paneGlassColorless", })); + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.orichalcumGem, 1), + new Object[] { + "xyb", "aza", "byx", + 'x', "ingotBrass", + 'y', "ingotSilver", + 'z', "craftingMagic", + 'a', "ingotMithril", + 'b', "ingotGold" + })); + //Hammer p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.hammer, 1), new Object[] { "xxx", " y "," y ", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java b/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java index 52d24de..7b7b0d2 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java @@ -11,6 +11,7 @@ public static void addRecipes(RecipeSimpleMachine recipe) //風車 recipe.add(new ItemStack(SSItems.stringBobbin,1),new ItemStack(SSItems.cloth, 1)); + recipe.add(new ItemStack(SSItems.fleshBobbin,1),new ItemStack(Items.leather, 1)); recipe.add(new ItemStack(Items.reeds,1),new ItemStack(Items.paper, 2)); //recipe.add(new ItemStack(Items,1),new ItemStack(SSItems.cloth, 1)); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index 9cf6486..959fe2b 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -48,7 +48,7 @@ public static void addRecipes(CraftingManager p_77608_1_) //GF Block p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.smallWindmill, 1), new Object[] { "xzx", "zyz","xzx", - Character.valueOf('y'), SSItems.blueStoneSlimeBall, + Character.valueOf('y'), SSBlocks.woodShaft, Character.valueOf('x'), "plankWood", Character.valueOf('z'), Blocks.wool })); @@ -61,14 +61,23 @@ public static void addRecipes(CraftingManager p_77608_1_) p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.windmill, 1), new Object[] { " x ", "xyx"," x ", - Character.valueOf('y'), SSItems.blueStoneSlimeBall, + Character.valueOf('y'), SSBlocks.stoneShaft, Character.valueOf('x'), SSItems.canvas })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.smallWaterwheel, 1), new Object[] { "xxx", "xyx","xxx", Character.valueOf('x'), "plateWood", - Character.valueOf('y'), SSBlocks.steelShaft + Character.valueOf('y'), SSBlocks.stoneShaft + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.steamMotor, 1), + new Object[] { "xzx", "xyx","pbp", + Character.valueOf('x'), "paneGlassColorless", + Character.valueOf('y'), SSItems.energyReactor, + Character.valueOf('z'), SSBlocks.steelShaft, + Character.valueOf('b'), new ItemStack(SSItems.dustWaterLily,1,0), + Character.valueOf('p'), "ingotSteel" })); for(int i=0;i<5;i++){ @@ -158,6 +167,15 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('b'), SSBlocks.steelShaft })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.saw, 1), + new Object[] { "yay", "zxz","zbz", + Character.valueOf('y'), "ingotBrass", + Character.valueOf('x'), "plateIron", + Character.valueOf('z'), "stone", + Character.valueOf('a'), "dustDiamond", + Character.valueOf('b'), SSBlocks.steelShaft + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.rollingMachine, 1), new Object[] { "yay", "aza","yxy", Character.valueOf('y'), "plankWood", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java index 9f5b654..d032879 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFurnace.java @@ -13,6 +13,8 @@ public static void addRecipes(RecipeSimpleMachine recipe) recipe.add(new ItemStack(Items.slime_ball,1),new ItemStack(Items.ender_pearl, 1)); recipe.add(new ItemStack(Items.gunpowder,1),new ItemStack(Items.blaze_powder, 1)); + recipe.add("ingotSilver",new ItemStack(SSItems.mithrilIngot)); + recipe.add("dustBluestone",new ItemStack(SSItems.blueStoneIngot)); recipe.add("dustYellowstone",new ItemStack(SSItems.yellowStoneIngot)); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java b/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java index 2e7982d..b677126 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java @@ -11,10 +11,20 @@ public static void addRecipes(RecipeSimpleMachine recipe) recipe.add("oreCoal",new ItemStack(SSItems.coalDust, 2)); recipe.add("oreIron",new ItemStack(SSItems.ironDust, 2)); recipe.add("oreGold",new ItemStack(SSItems.goldDust, 2)); + recipe.add("oreCopper",new ItemStack(SSItems.copperDust, 2)); + recipe.add("oreZinc",new ItemStack(SSItems.zincDust, 2)); recipe.add("gemDiamond",new ItemStack(SSItems.diamondDust, 1)); recipe.add("oreMithril",new ItemStack(SSItems.mithrilDust, 2)); + recipe.add("ingotCoal",new ItemStack(SSItems.coalDust, 1)); + recipe.add("ingotIron",new ItemStack(SSItems.ironDust, 1)); + recipe.add("ingotGold",new ItemStack(SSItems.goldDust, 1)); + recipe.add("ingotCopper",new ItemStack(SSItems.copperDust, 1)); + recipe.add("ingotZinc",new ItemStack(SSItems.zincDust, 1)); + + recipe.add("ingotMithril",new ItemStack(SSItems.mithrilDust, 1)); + } } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererFigure.java b/src/main/java/shift/sextiarysector/renderer/block/RendererFigure.java new file mode 100644 index 0000000..cbd3571 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererFigure.java @@ -0,0 +1,119 @@ +package shift.sextiarysector.renderer.block; + +import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*; +import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.MinecraftForgeClient; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.tileentity.TileEntityFigure; + +public class RendererFigure extends TileEntitySpecialRenderer { + + private static RenderItem renderer; + private static EntityItem entityItem; + static { + renderer = new RenderItem(); + renderer.setRenderManager(RenderManager.instance); + entityItem = new EntityItem(null); + entityItem.hoverStart = 0; + } + + @Override + public void renderTileEntityAt(TileEntity p_147500_1_, double x,double y, double z, float p_147500_8_) { + + GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.3F, (float)z + 0.5F); + //float scale = 0.0625f; + //GL11.glScalef(scale,scale,scale); + + TileEntityFigure t = (TileEntityFigure)p_147500_1_; + + + + if(t.getFigure() != null){ + + GL11.glColor4f(1, 1, 1, 1); + switch(t.direction){ + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + //case NORTH: + //GL11.glRotatef(180, 0, -1, 0); + //break; + default: + break; + } + //EntityItem entityitem = new EntityItem(t.getWorldObj(), t.xCoord, t.yCoord, t.zCoord, t.getFigure()); + this.renderFigure(t.getFigure()); + //renderer.doRender(entityitem, x, y, z, 0, 0); + //RenderManager.instance.renderEntitySimple(entityitem, 1.0f); + //System.out.println("AAAACC"); + } + + + GL11.glPopMatrix(); + + } + + public void renderFigure(ItemStack itemstack) + { + + entityItem.setEntityItemStack(itemstack); + + if(isLarge(itemstack)){ + + double d = 2; + if(isLarge(itemstack))GL11.glScaled(d, d, d); + + renderer.doRender(entityItem, 0, 0.06, 0, 0, 0); + + }else{ + + renderer.doRender(entityItem, 0, 0.03, 0, 0, 0); + + } + + } + + private boolean isLarge(ItemStack itemstack){ + + IItemRenderer customItemRenderer = MinecraftForgeClient.getItemRenderer(itemstack, ENTITY); + + if (itemstack.getItemSpriteNumber() == 0 && itemstack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType())) + { + + int renderType = Block.getBlockFromItem(itemstack.getItem()).getRenderType(); + return !(renderType == 1 || renderType == 19 || renderType == 12 || renderType == 2); + + } + + else if(customItemRenderer != null && customItemRenderer.shouldUseRenderHelper(ENTITY, itemstack, BLOCK_3D)) + { + + return true; + + } + + + return false; + + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererSaw.java b/src/main/java/shift/sextiarysector/renderer/block/RendererSaw.java new file mode 100644 index 0000000..960a6fe --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererSaw.java @@ -0,0 +1,115 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.renderer.model.ModelSaw; +import shift.sextiarysector.tileentity.TileEntitySaw; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererSaw extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId,RenderBlocks renderer) { + + if(modelId!=this.getRenderId()){ + return ; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + + GL11.glRotatef(180, 0, 1, 0); + + this.bind(this.fanShaftTextures); + + modelSaw.render(null, 0,0,0, 0,0, 1.0f); + modelSaw.renderBlade(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block block, int modelId, RenderBlocks renderer) { + return true; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.sawType; + } + + private static final ResourceLocation fanShaftTextures = new ResourceLocation("sextiarysector:textures/models/saw.png"); + + static public ModelSaw modelSaw = new ModelSaw(); + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x,double y, double z, float p_147500_8_) { + + TileEntitySaw tile = (TileEntitySaw)tileentity; + + //System.out.println("renderTileEntityAt"); + + GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + float scale = 0.0624f; + GL11.glScalef(scale,scale,scale); + + this.bindTexture(fanShaftTextures); + + switch(tile.direction){ + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + default: + break; + } + + modelSaw.render(null, 0,0,0, 0,0, 1.0f); + + //傾きのスピード + GL11.glRotatef(tile.getRotateStep(), 0, 1, 0); + + modelSaw.renderBlade(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + } + + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererSteamMotor.java b/src/main/java/shift/sextiarysector/renderer/block/RendererSteamMotor.java new file mode 100644 index 0000000..4a9708e --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererSteamMotor.java @@ -0,0 +1,119 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.renderer.model.ModelMotor; +import shift.sextiarysector.tileentity.TileEntitySteamMotor; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererSteamMotor extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + + if(modelID!=this.getRenderId()){ + return ; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + + GL11.glRotatef(90, 1, 0, 0); + GL11.glRotatef(180, 0, 1, 0); + + this.bind(steamMotorTextures); + + modelSteamMotor.render(null, 0,0,0, 0,0, 1.0f); + modelSteamMotor.renderShaft(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, + RenderBlocks renderer) { + return false; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.steamMotorType; + } + + private static final ResourceLocation steamMotorTextures = new ResourceLocation("sextiarysector:textures/models/steam_motor.png"); + + static public ModelMotor modelSteamMotor = new ModelMotor(); + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + + TileEntitySteamMotor tile = (TileEntitySteamMotor)tileentity; + + //System.out.println("renderTileEntityAt"); + + GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + float scale = 0.0625f; + GL11.glScalef(scale,scale,scale); + + this.bindTexture(steamMotorTextures); + + switch(tile.direction){ + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + default: + break; + } + + modelSteamMotor.render(null, 0,0,0, 0,0, 1.0f); + + //傾きのスピード + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + + + modelSteamMotor.renderShaft(null, 0,0,0, 0,0, 1.0f); + + GL11.glPopMatrix(); + + } + + + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelSaw.java b/src/main/java/shift/sextiarysector/renderer/model/ModelSaw.java new file mode 100644 index 0000000..d6f306d --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelSaw.java @@ -0,0 +1,60 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelSaw extends ModelBase { + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + + public ModelSaw() { + textureWidth = 64; + textureHeight = 64; + + Shape1 = new ModelRenderer(this, 0, 0); + Shape1.addBox(-8F, -8F, -4F, 16, 16, 12); + Shape1.setRotationPoint(0F, 0F, 0F); + Shape1.setTextureSize(64, 64); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 0, 28); + Shape2.addBox(-5.5F, -1F, -5.5F, 11, 2, 11); + Shape2.setRotationPoint(0F, 0F, 0F); + Shape2.setTextureSize(64, 64); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape3 = new ModelRenderer(this, 0, 28); + Shape3.addBox(-5.5F, -1.1F, -5.5F, 11, 2, 11); + Shape3.setRotationPoint(0F, 0F, 0F); + Shape3.setTextureSize(64, 64); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0.5235988F, 0F); + Shape4 = new ModelRenderer(this, 0, 28); + Shape4.addBox(-5.5F, -0.9F, -5.5F, 11, 2, 11); + Shape4.setRotationPoint(0F, 0F, 0F); + Shape4.setTextureSize(64, 64); + Shape4.mirror = true; + setRotation(Shape4, 0F, 1.047198F, 0F); + } + + 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); + Shape1.render(f5); + } + + public void renderBlade(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + Shape2.render(f5); + Shape3.render(f5); + Shape4.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java index 1703700..3a93796 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java @@ -90,7 +90,7 @@ private void changeSpeed(){ } - private boolean canWork(){ + public boolean canWork(){ return speed >= 14; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFigure.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFigure.java new file mode 100644 index 0000000..320c82d --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFigure.java @@ -0,0 +1,88 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; + +public class TileEntityFigure extends TileEntityDirection{ + + private ItemStack figure; + private String edition = ""; + //public float rotateStep = 0; + + @Override + public void updateEntity() { + + super.updateEntity(); + + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + this.updateServerEntity(); + } + + } + + public void updateClientEntity() { + + //this.rotateStep -= 1.2f; + + } + + private void updateServerEntity() { + + } + + public ItemStack getFigure() { + return figure; + } + + public void setFigure(ItemStack figure) { + this.figure = figure; + } + + public String getEdition() { + return edition; + } + + public void setEdition(String edition) { + this.edition = edition; + } + + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + if(par1nbtTagCompound.hasKey("figure")){ + NBTTagCompound fNBT = par1nbtTagCompound.getCompoundTag("figure"); + figure = ItemStack.loadItemStackFromNBT(fNBT); + edition = par1nbtTagCompound.getString("edition"); + } + + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + if(figure!=null){ + NBTTagCompound fNBT = new NBTTagCompound(); + figure.writeToNBT(fNBT); + par1nbtTagCompound.setTag("figure", fNBT); + par1nbtTagCompound.setString("edition", edition); + } + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java new file mode 100644 index 0000000..6f155a7 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java @@ -0,0 +1,216 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.api.machine.energy.EnergyStorage; +import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; + +public class TileEntityPump extends TileEntityDirection implements IFluidHandler, IEnergyHandler ,IGearForceGrid{ + + protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME); + + public EnergyStorage storage = new EnergyStorage("Base", 2, 3000); + + private int cooltime = 0; + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + this.updateServerEntity(); + } + + } + + public void updateClientEntity() + { + } + + public void updateServerEntity() + { + + cooltime++; + if(cooltime>10){ + cooltime=0; + + if(storage.drawEnergy(2, 20, false) >= 18){ + this.updateServerOutWorkEntity(); + this.updateServerInWorkEntity(); + } + + } + + } + + + public void updateServerInWorkEntity() + { + + int x = this.xCoord+this.direction.offsetX; + int y = this.yCoord+this.direction.offsetY; + int z = this.zCoord+this.direction.offsetZ; + + Fluid f = FluidRegistry.lookupFluidForBlock(this.getWorldObj().getBlock(x, y, z)); + + if(f!=null&&this.tank.getFluid()==null){ + + this.worldObj.removeTileEntity(x, y, z); + this.worldObj.setBlock(x, y, z, Blocks.air, 0, 3); + this.tank.setFluid(new FluidStack(f, FluidContainerRegistry.BUCKET_VOLUME)); + + }else if(this.worldObj.getTileEntity(x, y, z) instanceof IFluidHandler){ + + IFluidHandler t = (IFluidHandler) this.worldObj.getTileEntity(x, y, z); + + if(this.tank.getFluid()==null ){ + + if(t.getTankInfo(direction.getOpposite())!=null && t.getTankInfo(direction.getOpposite())[0].fluid!=null && t.canDrain(this.direction.getOpposite(), t.getTankInfo(direction.getOpposite())[0].fluid.getFluid())){ + FluidStack fs = t.drain(direction.getOpposite(), FluidContainerRegistry.BUCKET_VOLUME, true); + this.tank.fill(fs, true); + } + + }else if(t.canDrain(this.direction.getOpposite(), this.tank.getFluid().getFluid())){ + FluidStack fs = t.drain(direction.getOpposite(), FluidContainerRegistry.BUCKET_VOLUME - this.tank.getFluidAmount(), true); + this.tank.fill(fs, true); + } + + } + + } + + public void updateServerOutWorkEntity() + { + int x = this.xCoord+ForgeDirection.UP.offsetX; + int y = this.yCoord+ForgeDirection.UP.offsetY; + int z = this.zCoord+ForgeDirection.UP.offsetZ; + + FluidStack f = this.tank.getFluid(); + + if(f!=null){ + + if(this.worldObj.isAirBlock(x, y, z) && f.getFluid().canBePlacedInWorld()){ + + this.worldObj.setBlock(x, y, z, this.tank.getFluid().getFluid().getBlock()); + this.tank.setFluid(null); + + }else if(this.worldObj.getTileEntity(x, y, z) instanceof IFluidHandler&&((IFluidHandler) this.worldObj.getTileEntity(x, y, z)).canFill(ForgeDirection.DOWN, f.getFluid())){ + + int i=((IFluidHandler) this.worldObj.getTileEntity(x, y, z)).fill(ForgeDirection.DOWN, f, true); + this.tank.drain(i, true); + + } + + + } + + } + + @Override + public void readFromNBT(NBTTagCompound tag) + { + super.readFromNBT(tag); + tank.readFromNBT(tag); + storage.readFromNBT(tag); + } + + @Override + public void writeToNBT(NBTTagCompound tag) + { + super.writeToNBT(tag); + tank.writeToNBT(tag); + storage.writeToNBT(tag); + } + + @Override + public int addEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + + if(this.getDirection().ordinal()==from.ordinal())return 0; + + int i = storage.addEnergy(power, speed, simulate); + return i; + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + return 0; + } + + @Override + public boolean canInterface(ForgeDirection from) { + return true; + } + + @Override + public int getPowerStored(ForgeDirection from) { + return storage.getPowerStored(); + } + + @Override + public long getSpeedStored(ForgeDirection from) { + return storage.getSpeedStored(); + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + return storage.getMaxPowerStored(); + } + + @Override + public long getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeedStored(); + } + + @Override + public boolean canIn(ForgeDirection from) { + return this.getDirection().ordinal() != from.ordinal(); + } + + @Override + public boolean canOut(ForgeDirection from) { + return false; + } + + //IFluidHandler + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { + return 0; + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { + return null; + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { + return null; + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return from.ordinal()==ForgeDirection.UP.ordinal(); + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return from.ordinal()==ForgeDirection.UP.ordinal(); + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) { + return new FluidTankInfo[] { tank.getInfo() }; + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java new file mode 100644 index 0000000..b6fb974 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java @@ -0,0 +1,191 @@ +package shift.sextiarysector.tileentity; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.machine.energy.EnergyStorage; +import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; + +public class TileEntitySaw extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ + + public float rotateStep = 360; + private int speed = 0; + private int time = 0; + + public EnergyStorage storage = new EnergyStorage("Base", 3, 3000); + + @Override + public void updateEntity() { + + super.updateEntity(); + + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + this.updateServerEntity(); + } + + if(this.canWork()){ + this.workSaw(); + this.addDamage(); + } + + } + + public void updateClientEntity() { + + this.rotateStep += speed; + + } + + private void updateServerEntity() { + + if(time>=10){ + this.changeSpeed(); + time=0; + }else{ + time++; + } + + } + + private void changeSpeed(){ + + int use = this.storage.drawEnergy(3, 200, false); + + int i = this.speed; + + if(use>=180){ + speed = Math.min(16, speed + 1); + }else{ + speed = Math.max(0, speed - 1); + } + + if(i!=speed){ + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + public boolean canWork(){ + + return speed >= 14; + + } + + private void workSaw(){ + + Block b = this.worldObj.getBlock(xCoord + this.getDirection().offsetX, yCoord + this.getDirection().offsetY, zCoord + this.getDirection().offsetZ); + + if(b != null && b.isNormalCube()){ + this.worldObj.func_147480_a(this.xCoord + this.getDirection().offsetX, this.yCoord + this.getDirection().offsetY, this.zCoord + this.getDirection().offsetZ, true); + this.worldObj.removeTileEntity(xCoord + this.getDirection().offsetX, yCoord + this.getDirection().offsetY, zCoord + this.getDirection().offsetZ); + } + + } + + private void addDamage(){ + + AxisAlignedBB aabb = getDirectionAABB(); + + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity)null, aabb, null); + + for(Entity e :list){ + e.attackEntityFrom(DamageSource.cactus, 1.0f); + } + + } + + private AxisAlignedBB getDirectionAABB(){ + + int minX = 0, minY = 0, minZ = 0; + int maxX = 1, maxY = 1, maxZ = 1; + + switch(direction){ + case DOWN: minY = -1; break; + case UP: maxY = 2; break; + case NORTH: minZ = -1; break; + case SOUTH: maxZ = 2; break; + case WEST: minX = -1; break; + case EAST: maxX = 2; break; + default:break; + } + + return AxisAlignedBB.getBoundingBox(this.xCoord + minX, this.yCoord + minY, this.zCoord + minZ, this.xCoord + maxX, this.yCoord + maxY, this.zCoord + maxZ); + + } + + public float getRotateStep() { + return rotateStep; + } + + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + this.speed = par1nbtTagCompound.getInteger("speed"); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + par1nbtTagCompound.setInteger("speed", this.speed); + } + + @Override + public int addEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + + if(!canInterface(from))return 0; + + int i = storage.addEnergy(power, speed, simulate); + + return i; + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + + return 0; + + } + + @Override + public boolean canInterface(ForgeDirection from) { + return this.getDirection().getOpposite().ordinal() == from.ordinal(); + } + + @Override + public int getPowerStored(ForgeDirection from) { + return storage.getPowerStored(); + } + + @Override + public long getSpeedStored(ForgeDirection from) { + return storage.getSpeedStored(); + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + return storage.getMaxPowerStored(); + } + + @Override + public long getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeedStored(); + } + + @Override + public boolean canIn(ForgeDirection from) { + return this.getDirection().getOpposite().ordinal() == from.ordinal(); + } + + @Override + public boolean canOut(ForgeDirection from) { + return false; + } +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java index 6c14cea..e77d5d0 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java @@ -45,7 +45,7 @@ public void updateServerEntity() TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); if(t!=null && t instanceof IEnergyHandler && this.isWork()){ - ((IEnergyHandler)t).addEnergy(this.direction, 3, 20, false); + ((IEnergyHandler)t).addEnergy(this.direction, 2, 40, false); } } @@ -59,11 +59,30 @@ boolean isWork(){ ForgeDirection d1 = this.getDirection().getRotation(ForgeDirection.UP); ForgeDirection d2 = this.getDirection().getRotation(ForgeDirection.UP).getOpposite(); - Block b1 = this.getWorldObj().getBlock(xCoord + d1.offsetX, yCoord - 1, zCoord + d1.offsetZ); - Block b2 = this.getWorldObj().getBlock(xCoord, yCoord - 1, zCoord); - Block b3 = this.getWorldObj().getBlock(xCoord + d2.offsetX, yCoord - 1, zCoord + d1.offsetZ); + for(int i=0;i<2;i++){ - if(!(b1 instanceof BlockLiquid) || !(b2 instanceof BlockLiquid) || !(b3 instanceof BlockLiquid)){ + int ra = 1; + for(int j=ra*-1;j<=ra;j++){ + int x = xCoord + d1.offsetX * j; + int y = yCoord + i; + int z = zCoord + d1.offsetZ * j; + + if(i==0&& j == 0)continue; + + if(!this.worldObj.isAirBlock(x, y, z))return false; + + } + + + + } + + + Block b31 = this.getWorldObj().getBlock(xCoord + d1.offsetX, yCoord - 1, zCoord + d1.offsetZ); + Block b32 = this.getWorldObj().getBlock(xCoord, yCoord - 1, zCoord); + Block b33 = this.getWorldObj().getBlock(xCoord + d2.offsetX, yCoord - 1, zCoord + d1.offsetZ); + + if(!(b31 instanceof BlockLiquid) || !(b32 instanceof BlockLiquid) || !(b33 instanceof BlockLiquid)){ return false; } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java index 25855ad..7e7761f 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java @@ -26,6 +26,11 @@ public void updateEntity() public void updateClientEntity() { + + if(!this.isWork()){ + return; + } + if(this.rotateStep>360){ this.rotateStep-=360; } @@ -37,13 +42,37 @@ public void updateClientEntity() public void updateServerEntity() { TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IEnergyHandler){ + if(t!=null && t instanceof IEnergyHandler && this.isWork()){ ((IEnergyHandler)t).addEnergy(this.direction, 1, 20, false); } } + boolean isWork(){ + + ForgeDirection d1 = this.getDirection().getRotation(ForgeDirection.UP); + + int ra1 = 2; + for(int i=ra1*-1;i<=ra1;i++){ + + int ra2 = 2; + for(int j=ra2*-1;j<=ra2;j++){ + int x = xCoord + d1.offsetX * j; + int y = yCoord + i; + int z = zCoord + d1.offsetZ * j; + + if(i==0&& j == 0)continue; + + if(!this.worldObj.isAirBlock(x, y, z))return false; + + } + + } + + return true; + } + public float getRotateStep() { return -rotateStep; } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java index f089056..4959a35 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java @@ -9,6 +9,8 @@ import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.SSFluids; +import shift.sextiarysector.block.BlockBlueFire; public class TileEntitySquare extends TileEntityDirection implements IFluidHandler{ @@ -34,15 +36,18 @@ public void updateClientEntity() { private void updateServerEntity() { - if((lastFluid)!=(tank.getFluidAmount()/100)){ - this.lastFluid = (tank.getFluidAmount()/100); + if((lastFluid)!=(tank.getFluidAmount()/10)){ + this.lastFluid = (tank.getFluidAmount()/10); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } if(this.direction.ordinal() != ForgeDirection.UP.ordinal() && this.tank.getFluidAmount() > 0)this.chargeFluid(); + if(canChargeSteam())this.chargeSteam(); } + + private void chargeFluid(){ if(this.worldObj.getTileEntity(xCoord + this.direction.offsetX, yCoord + this.direction.offsetY, zCoord + this.direction.offsetZ) instanceof IFluidHandler){ @@ -60,6 +65,26 @@ private void chargeFluid(){ } + private boolean canChargeSteam(){ + return this.tank.getFluidAmount() >= 10 && this.tank.getFluid().getFluid().getName().equals("water") && this.worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof BlockBlueFire; + } + + private void chargeSteam(){ + + if(this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord) instanceof IFluidHandler){ + IFluidHandler f = (IFluidHandler) this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); + + if(f.canFill(ForgeDirection.DOWN, SSFluids.steam)){ + FluidStack fs = new FluidStack(SSFluids.steam, 10); + int i = f.fill(ForgeDirection.DOWN, fs, true); + this.tank.drain(i, true); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + } + /* IFluidHandler */ @Override public int fill(ForgeDirection from, FluidStack resource, boolean doFill) diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java new file mode 100644 index 0000000..0ef27f7 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java @@ -0,0 +1,381 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.container.ItemBox; + +public class TileEntitySteamMotor extends TileEntityDirection implements IEnergyHandler, IGearForceGrid, ISidedInventory, IFluidHandler{ + + protected static final int[] slots_top = new int[] { 0 }; + protected static final int[] slots_bottom = new int[] { 1 }; + protected static final int[] slots_sides = new int[] { 0 }; + + protected ItemBox items = new ItemBox("Base", 2); + + //液体 + private FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 15); + + private int lastSteam = 0; + private boolean lastWork = false; + public float rotateStep = 0; + + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + if(lastWork && this.canWork()){ + rotateStep -=10; + } + } + + public void updateServerEntity() + { + + if(lastSteam != this.tank.getFluidAmount()){ + lastSteam = this.tank.getFluidAmount(); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + if(this.canWork()){ + this.work(); + } + + if(this.canCharge()){ + this.chargeSteam(); + } + + } + + public boolean canWork(){ + return this.worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) && this.tank.getFluidAmount() > 0; + } + + public void work(){ + + int use = this.tank.drain(20, false) == null ? 0 : this.tank.drain(20, true).amount; + + if(use == 0){ + if(lastWork){ + lastWork = false; + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + return; + } + + if(!lastWork){ + lastWork =true; + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); + if(t!=null && t instanceof IEnergyHandler && this.canWork()){ + + ((IEnergyHandler)t).addEnergy(this.direction, 3, use, false); + } + + } + + public void chargeSteam(){ + + FluidStack f = FluidContainerRegistry.getFluidForFilledItem(items.getStackInSlot(0)); + this.fill(ForgeDirection.UP, f, true); + ItemStack item = items.getStackInSlot(0).getItem().getContainerItem(items.getStackInSlot(0)); + + if(item!=null){ + + if (this.items.getStackInSlot(1) == null) + { + this.setInventorySlotContents(1, item.copy()); + } + else if (this.items.getStackInSlot(1).isItemEqual(item)) + { + this.items.getStackInSlot(1).stackSize += item.stackSize; + } + + } + + this.items.reduceStackSize(0, 1); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + + } + + public boolean canCharge(){ + + FluidStack f = FluidContainerRegistry.getFluidForFilledItem(items.getStackInSlot(0)); + + if(f == null)return false; + + int i = this.fill(ForgeDirection.UP, f, false); + + if(i != f.amount)return false; + + + if(items.getStackInSlot(0) == null)return false; + if(this.items.getStackInSlot(1) == null)return true; + ItemStack item = items.getStackInSlot(0).getItem().getContainerItem(items.getStackInSlot(0).copy()); + if(item == null)return true; + int result = this.items.getStackInSlot(1).stackSize + item.stackSize; + return (result <= getInventoryStackLimit() && result <= item.getMaxStackSize()); + + } + + public float getRotateStep() { + return rotateStep; + } + + //GUI + public FluidTank getTank() { + return tank; + } + + public boolean isFluid(){ + return this.getTank().getFluidAmount() > 0; + } + + + //IInventory関係 + @Override + public int getSizeInventory() { + return items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return items.getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return items.decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return items.getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + items.setInventorySlotContents(i, itemstack); + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return items.getInventoryStackLimit(); + } + + @Override + public void markDirty(){ + super.markDirty(); + items.onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer.getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + /*入れる*/ + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + return i == 0 ; + + } + + //ISidedInventory関係 + //0 素材 ,1 燃料 ,2 完成品 ,3 素材のコンテナ ,4 空のボトル , 5 液体の入ったボトル + @Override + public int[] getAccessibleSlotsFromSide(int var1) { + + if(var1 == 0){ + return slots_bottom; + } + + if(var1 == 1){ + return slots_top; + } + + return slots_sides; + + } + + @Override + public boolean canInsertItem(int i, ItemStack itemstack, int j) { + return this.isItemValidForSlot(i, itemstack); + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) + { + + if(p_102008_1_ == 1){ + return true; + } + + + return false; + } + + @Override + public String getInventoryName() { + return "gui.ss.steam_motor"; + } + + //GF + @Override + public int addEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + return 0; + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + return 0; + } + + @Override + public boolean canInterface(ForgeDirection from) { + return this.direction.getOpposite().ordinal() == from.ordinal(); + } + + @Override + public int getPowerStored(ForgeDirection from) { + return 0; + } + + @Override + public long getSpeedStored(ForgeDirection from) { + return 0; + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + return 0; + } + + @Override + public long getMaxSpeedStored(ForgeDirection from) { + return 0; + } + + @Override + public boolean canIn(ForgeDirection from) { + return false; + } + + @Override + public boolean canOut(ForgeDirection from) { + return this.direction.getOpposite().ordinal() == from.ordinal(); + } + + + //IFluidHandler関係 + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + if(resource == null || resource.getFluid() == null)return 0; + if(!canFill(from, resource.getFluid()))return 0; + + return tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(getTank().getFluid())) + { + return null; + } + return getTank().drain(resource.amount, doDrain); + + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return getTank().drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + if(!fluid.getName().equals("steam"))return false; + + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { getTank().getInfo() }; + } + + //NBT + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + this.items.readFromNBT(par1nbtTagCompound); + this.tank.readFromNBT(par1nbtTagCompound); + if(par1nbtTagCompound.hasKey("Empty") && this.tank.getFluidAmount() > 0)this.tank.setFluid(null); + this.lastWork = par1nbtTagCompound.getBoolean("lastwork"); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + this.items.writeToNBT(par1nbtTagCompound); + this.tank.writeToNBT(par1nbtTagCompound); + par1nbtTagCompound.setBoolean("lastwork", this.lastWork); + } + + + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java index 46ca3a7..39c3e45 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java @@ -26,6 +26,11 @@ public void updateEntity() public void updateClientEntity() { + + if(!this.isWork()){ + return; + } + if(this.rotateStep>360){ this.rotateStep-=360; } @@ -37,13 +42,37 @@ public void updateClientEntity() public void updateServerEntity() { TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IEnergyHandler){ + if(t!=null && t instanceof IEnergyHandler && this.isWork()){ ((IEnergyHandler)t).addEnergy(this.direction, 2, 20, false); } } + boolean isWork(){ + + ForgeDirection d1 = this.getDirection().getRotation(ForgeDirection.UP); + + int ra1 = 3; + for(int i=ra1*-1;i<=ra1;i++){ + + int ra2 = 3; + for(int j=ra2*-1;j<=ra2;j++){ + int x = xCoord + d1.offsetX * j; + int y = yCoord + i; + int z = zCoord + d1.offsetZ * j; + + if(i==0&& j == 0)continue; + + if(!this.worldObj.isAirBlock(x, y, z))return false; + + } + + } + + return true; + } + public float getRotateStep() { return -rotateStep; } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 238de3e..a481774 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -34,10 +34,13 @@ tile.ss.wood_hopper.name=Wood Hopper tile.ss.chunk_loader.name=Time Loader +tile.ss.figure.name=Figure + tile.ss.small_windmill.name=Small Windmill tile.ss.windmill.name=Windmill tile.ss.small_waterwheel.name=Small Waterwheel +tile.ss.steam_motor.name=Steam Motor tile.ss.wood_shaft.name=Wood Shaft tile.ss.stone_shaft.name=Stone Shaft @@ -69,11 +72,18 @@ tile.ss.pulverizer.name=Pulverizer tile.ss.rolling_machine.name=Rolling Machine tile.ss.time_machine.name=Time Machine + tile.ss.fan.name=Fan +tile.ss.saw.name=Saw +tile.ss.pump.name=Pump tile.ss.blue_stone.name=Blue Stone Ore tile.ss.yellow_stone.name=Yellow Stone Ore +tile.ss.copper_ore.name=Copper Ore +tile.ss.zinc_ore.name=Zinc Ore +tile.ss.silver_ore.name=Silver Ore + tile.ss.mithril_ore.name=Mithril Ore tile.ss.orichalcum_ore.name=Orichalcum Ore @@ -124,6 +134,9 @@ item.ss.iron_dust.name=Iron Dust item.ss.gold_dust.name=Gold Dust item.ss.diamond_dust.name=Diamond Dust +item.ss.copper_dust.name=Copper Dust +item.ss.zinc_dust.name=Zinc Dust + item.ss.mithril_dust.name=Mithril Dust @@ -133,6 +146,10 @@ item.ss.brass_ingot.name=Brass Ingot item.ss.bluestone_ingot.name=Blue Stone Ingot item.ss.yellowstone_ingot.name=Yellow Stone Ingot +item.ss.copper_ingot.name=Copper Ingot +item.ss.zinc_ingot.name=Zinc Ingot +item.ss.silver_ingot.name=Silver Ingot + item.ss.mithril_ingot.name=Mithril Ingot item.ss.orichalcum_gem.name=Orichalcum @@ -191,6 +208,10 @@ item.ss.string_bobbin.name=String Bobbin item.ss.cloth.name=Cloth item.ss.small_cloth.name=Small Cloth item.ss.canvas.name=Canvas +item.ss.drying_flesh.name=Drying Flesh +item.ss.flesh_bobbin.name=Flesh Bobbin + +item.ss.figure_box.name=Figure Box item.ss.wood_scoop.name=Wood Scoop @@ -288,6 +309,8 @@ gui.ss.freezer=Freezer gui.ss.rucksack=Rucksack +gui.ss.steam_motor=Steam Motor + gui.ss.millstone=Millstone gui.ss.loom=Loom gui.ss.sawmill=Sawmill @@ -298,6 +321,8 @@ gui.ss.time_machine=Time Machine gui.ss.gf_tank_1=Wood GF Tank gui.ss.gf_tank_2=Stone GF Tank gui.ss.gf_tank_3=Steel GF Tank +gui.ss.gf_tank_4=Ninja GF Tank +gui.ss.gf_tank_5=Orichalcum GF Tank shop.ss.creeper=Simple Creeper Shop shop.ss.robot=Blue Robot Shop @@ -314,6 +339,13 @@ tooltip.season.summer=Summer tooltip.season.autumn=Autumn tooltip.season.winter=Winter +tooltip.name=Name +tooltip.edition=Edition + +#Edition +edition.creative=CreativeTab +edition.figure_beginner=Figure Beginner + #Tab itemGroup.ss.core=SextiarySector -Core- itemGroup.ss.fluid=SextiarySector -Fluid- @@ -465,6 +497,10 @@ achievement.ss.windmill=Updraft achievement.ss.windmill.desc=Craft a windmill achievement.ss.windmill.desc2=Crying wind +achievement.ss.small_waterwheel=The power of water +achievement.ss.small_waterwheel.desc=Craft a small waterwheel +achievement.ss.small_waterwheel.desc2=Do not close the lava ! + achievement.ss.sawmill=Blade ? achievement.ss.sawmill.desc=Craft a sawmill achievement.ss.sawmill.desc2=Let dismantling together ! @@ -474,9 +510,9 @@ achievement.ss.steel_gear=The power of steel achievement.ss.steel_gear.desc=Craft a steel gear achievement.ss.steel_gear.desc2=Coal shortage ? -achievement.ss.small_waterwheel=The power of water -achievement.ss.small_waterwheel.desc=Craft a small waterwheel -achievement.ss.small_waterwheel.desc2=Do not close the lava ! +achievement.ss.steam_motor=The power of steam +achievement.ss.steam_motor.desc=Craft a small steam motor +achievement.ss.steam_motor.desc2=Industrial revolution achievement.ss.pulverizer=Industrial era achievement.ss.pulverizer.desc=Craft a pulverizer @@ -486,6 +522,10 @@ achievement.ss.fan=Oh ~ ~ ~ achievement.ss.fan.desc=Craft a fan achievement.ss.fan.desc2=Blue flame ? +achievement.ss.saw=Block Breaker +achievement.ss.saw.desc=Craft a saw +achievement.ss.saw.desc2=Just destroy + achievement.ss.ninja_gear=The power of mystery ? achievement.ss.ninja_gear.desc=Craft a ninja gear achievement.ss.ninja_gear.desc2=Japan ! diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/figure.png b/src/main/resources/assets/sextiarysector/textures/blocks/figure.png new file mode 100644 index 0000000000000000000000000000000000000000..8cc9dcaa0c322116e22a6a332097d3f6e67ccfe6 GIT binary patch literal 592 zcmV-W0Lcq!H!C=NMk}Jh6=g}NR$SDa=lL5*) zE2mO%ErPeN?*JHz(>KapqwL2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/sextiarysector/textures/blocks/machine/pump_front.png new file mode 100644 index 0000000000000000000000000000000000000000..94ce04165be996151704190291abf3fedc234a76 GIT binary patch literal 636 zcmV-?0)zdDP)b=7;^Kb*#Rkc%_8jn)1*U`%5GGGI6{rm|4UVZ$@ zxwOs6a328C!9I5OYAnqT6Ykep$mLrz(sW%XVjX^vefkZ6mCR_1H?fi#3l*w~odpPS(JgC~r~%(h39iDNBGO?=&{kpJ!wpH>=qFbG{4_Z#Im_~7GMORwHJlmVjFKBQ4^+V9?sx@&iOZo WUJHt$nk#((00007Kd>AyK#IOkl>|D7|{YPF0~3IMG&N-2yn zXsrPl3o@PhV|D?0Hl;OYJT2OYmE>>uyb$$z^AXL4}RU4cpnYm z%ez-Njzy9rlw8+kX`#;2LLGoosYJ8cd^E(2&9!*|PC9Kwnx=H4 z@L3JA{C>Yb#+WfLsw_WA5`^oz>>jsq9P0t|$FzIg2KbF}b8R_al5bZ(3wyACel*6| zjY2N3Bi7kwdScc_%|}Z4&-*aOAS}zuxn|}}?u2dIbfYjoqD-FWG4;Ra{0mF;(6Y3W R2Z{gy002ovPDHLkV1l*$(i0jNnt zK~y-)g_A#P8!;Hhe@9I^yf=s>pg|mTin3%WUGow8A-Wk#=xXfYyd)I7HKa>-f02-k znSI$3IHbmB&F~+>OtE!4#2!Rj+B9ds1-u;BXONO&O zLDt})2UvTWkTHl6Wn zF^#T%piN;^+|$hO_~H(*)~>l8SzY|LTfwt!MT&EF_>1NBG@Zx0Cu^p9@7Ie|*EOg6 zH++Bl5rE+g7CWEF^BiLgF$eE`iaqQ1`%P?C^dZuZ4NNAldhugrWHRwJ2~h@bcG`62 zZ8}f4SB!U0p8thd*Qj|?3=*5+Y>)B7dGbI+pg6{?nEf}#D5onW?ukg-#LdjDwP~4- daoybr{15Zy=SQiUbkzU=002ovPDHLkV1l0p@_hgR literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/gold_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/gold_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..b1a7a55b1c6937517066f0f6d6052d29b133e569 GIT binary patch literal 263 zcmV+i0r>ujP)mOc_0Fy$14?w2Vel*8K zXC8%`Ly)C$nl@rb1nDFAUKl9yj=qW<8Jj9g&%Np=tDVhug-jP1QPky-cn9hV=_{(P zZF*T`qi-+r;e`B(c;!EuGIy3k(w(C#szGG-*T!rWcgmUPnOG5kxeqK0mtF5+vUUIf N002ovPDHLkV1iNNaC!g$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..ca7f5768f2bfef895209598d78a6c21a25cda6b7 GIT binary patch literal 537 zcmV+!0_OdRP)Oc_2f8MJHVS{Y9MeKu}uaKAU5v&zEQ$!Ga0Ku2=6;cS6scchPOdzCL z!381UxrHPr{<)l~c7~mA=9_P(6UXtlbB?wtrO;XfkYyP`5MZt4)4%R(!mD|n2Y}WZ ztuq9_m%M1;v?(!50k-}ey_thHEc*>1N?r_-i`P8`SIT5GJeP1T|( zFvbu?5lNDers-SzZvX%y!vDAiFuv_5QZUXnqrJ0&vQk|b`%x6p z>-DIrin1&jkH-xiW6aMYiAcjaP17f!FbtcddbsuS{VL;YLi;L}Qjbl1)jSA-w_&}W ba}E3tk3j}DChOXZ00000NkvXXu0mjfmtpPI literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/zinc_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/zinc_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..dffa9f3522a752baa9afd2cad94a323fdb92cd4a GIT binary patch literal 540 zcmV+%0^|LOP)EQ%t~_TH0cs~(f#SZf)1@A2NFlnOLo zzFF|lK%T8oN>No6FJ7OAJAnOuk1>XkAUo&6qPwpFIGxTZH*1VBxci#B?V-oSTHAUc z7sqtU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machine/orichalcum_gf_tank.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/orichalcum_gf_tank.png new file mode 100644 index 0000000000000000000000000000000000000000..69aa03bc36d0485faf97d76570a6dc1fac504958 GIT binary patch literal 2907 zcmd5;eK?d^A3lT3U>kN5LTHgfrk%+OWu`VU#8`HlR7_T(A|>&lEjUj5?0>5=B}U?^|97> zSZBC=0;Atjr=>2bIa6@MG;H{{quX4!7_d4*Y#;gUG@8Mr*H4(cCT-cab0tE@W@lEY z%wt!8`vy~{!a69emVkwBvhgYV7MnML{kSXf1Hvf5=i`w@8jm%nP<$LU z^me^OK2|G2AdBAAm{e6&d6NpEnws_#sigT5X%=a&K}=s_C0plCxv__d*WNaxWqW*Z z2@w&V_?n|}K}RISqwVeO1%1$u$A{jL8N{46#v<_u+vSlyp+hT^>5E^PIF7tM zJRIWqHP}MZ@YiGd?b}tUw^RYORKN6uszS7J!=<7W2tU)T>(k+ zwUr%ndHbnuhn$i`-HW?b)Wt6(dCTvsbOr2Ogn?N=ZcYxIVD|a~GsfP*;iHKr!NlCW z@8UX}9ZpX8uhcriN!%ANG7Aa{tgsC+JO|-;L$))+diSTtv`@2dR+Pemucmz>Z!mp4ux}L4=(x1VNDbY#4g|KW#Tw1tj@XvjY8E8D$yd)l)JH3DPfiz z=3Y_8^CD1)jhUVePTTJBShgjDRJK^Sh@)oF--kA8kyY~WX~k>^*yF!z1>rzSo+5{DK%u1%YaxW)su#f$zuRm=qfEkB#8HK&Qy+ORXYyy@2Ee*v&9M*R-k@m(-W=>6b zLcxyA!5OX&>EgZ{+Z`tbg01?D)bR#|>?z9{3k`OzeDYGr=P7Fp(i8<(Z@#G0ii$e@ zV)U{bk$>~^XiVH)!jqx!1_cwvXn_&K7a!VhI1z2;xFVaSSZ#gy2?J&P*1Zmww$Ev0 zkq|WoH#9R$9d`CcCP~GG{dd$eXYJA}>`0{yVjC+^9uyRm;f^`!T~y-XGrEKgO#DMW zSj`rXtxp^!n+b^$K+|%Ozb={jpExMK;eWhm+ypj@+N%$T@w`($cb-&Y;mo zWg|9V*Cgl;esV~l>m^yI8Xmi;q>KH7ob=2XM1m;Q)Q+Pf0#4$}Qle0(RsLD(T=8;S z+n&&0F^y}`4H*P)uGoHA$IyY6pbK#UE@Z#+>LDd_?;za}i)Zm9wN^eHwDpRd(U9)_ zBa+9|msZfH&{L_!FtczN zF_A5vnnGQMQ(Dgg32~s8|4y)j8`gGKg4d>44F3o!m?H={rQ*$}Ky?f^K0azCxPuVQ zppOVTMWX7Yq@+7JgIw;B#rlklHLB!*bujv(3LS#ZEDYFXs6zl5fW^C4lb3o!&z{Y9 z1g*FX!c4#N93sU9#Ikh-f#m=cCoHN`C*p>JPEy546Yjh7Yjz}j7*E+y%dSha3)Vco z7F^e+C`7zMPb+Oh=?^-TmMn(Q#)6X7zD@QaI|7;` zdOhRjUWvCq9*=*Ws|x|NiY3L*0K_Y=7@#8oEOi(!BQsBN6Mk&2XAqfUj|4DO&BKr! zNUF`~tOla)5m}@O4&$&)oS`CaiVj^1W?Nsq%G$hn^Q#XtDT6IN;S1B9!Te9xyR|@i z&1{=K*o1O)JhA4{(h&(0qhjcMz4y*Mvb>O+{74wpw!R7kr^I7VdWos6IKZj43E7Mmklj2GYSs0Mu6hl~hZI0l)$Pz11#2<8OFK zcRlZm(caED6rA5$ZjXKb`}AeMQWHe2r5=AN#B?GD!{_sP7Rd=i}d$jX2zwU;l{siq!@Kd`L&jQ*)Bi^9ny6Dusw$x zrwTj%m$ZK{eKrCEaEK}d+jLIjCsSVTh3B^)Tj~vYh+xn3|83Q;Fe{rZ(tfj(WYpPc zx4l>&Eb6wdJ=b!=w1Ho{v+F+ZX+X790|{{@&98gKvr literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/steam_motor.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/steam_motor.png new file mode 100644 index 0000000000000000000000000000000000000000..ce683dffd88a0aa12304dbbb302e27ef6b2f0ad3 GIT binary patch literal 1600 zcmcJPc~Fx_6u|fU2oMk`mxMtsGY*s(1g#@968O|mK}(86iXet~4hj>A5+#Bm(pF)h z2tyUMAQVuJ8YqHtB={)^l!0nck(z?UMCFVS4uO!PiN{R;aQaWDyR-9l-oAbB?Y`e` zMksZwxv7IG0Khyrh!O?>q?&R5-6mU%w$~Fy=22U>0sex zoOSzNjEsyv%u>X=GkXlK{6bT`8XK#!>z6kKXf=y(U)53b+@?7@R5MM=@|Ar2s`$o21lbL^_EsYR zDcN%d01R*iyzl*vKJpQuXbdNd*j@6M+p=qAkvO=HTkJ)I~X}3c*8Ke z2#{k=$mOmB$I5q0I;J0uPECo*L{|ZWeGk{}?`R>DO7RvJ7EEftbsg?XhJk((ifK%1*B%jpxi*p{lf+djO68cQp zvzxr`ZgF&W?$Bs7g;G=~6o#u}?xgf;mH~0ICWfflCm$N0W427EDrY_Ln=P?GEPm_a z=oo#}=rzY#AP`ttDc%eU($g1|bH4^Jxv06R{`U3bYufl~GLPBt^Q6-gl+X7J zr)Z&7qfwVj!?0VPAqSI{Nx23TCHP3Dh(hz`1#r+pdN`-)SNQI z=m3SVJc84^D4^Lj9odmmFtzclVC94@x^(8&7Wk$DU8P zff#yTO$g-A7<(FI8?spy7)`WKxIM9weUB zq@p#$r=yaTZF6P<`j;#*x}0gc^`IP^Gg-7HRuYMdSx1$3vhbp_|H;iYcX*T2msY=9 zzkg}Y*Ai_+m3KQT+kCsr;hB86I0>#w7~`|5viBbse=z#Q@%1VMT+$TgoFA$$^ zd(0wu|0vtZczv@skL(>K!C6S{W-!r8gD%t;AeUF06)Z1su__CjCT`8L&{yetk&4aQV)Ag8T zwo5aF?Cce9332mCj%ed^*nIu`f=qS>ZtGKTm`y%4Y%LbOVaeI>wZ^+x|ILf9%g;Gp f^yU0F`7?u6MRImgg!odRR~bBA{an^LB{Ts5Y}AB$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/dust/zinc_dust.png b/src/main/resources/assets/sextiarysector/textures/items/dust/zinc_dust.png new file mode 100644 index 0000000000000000000000000000000000000000..9fce6320217069c346522a1492b7363fdfa839f0 GIT binary patch literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~qbw6QrzW%bN}$jwPZ!4!i_>=}7;+tQ5O9rea$O}7 z#wgwSM51YXL^l5f?u>_=IyS8z*^)Gy$|tZmGOY}XxViSIQQ%}>0qw$s#N`$F-|K(8 z5A@1hI_00#y{A$7eY=7mZ9BO6>atslE1YK^*?MsD(#FlwJiqP=UH?|}LfYcXS;igW zD?=Y$dH5!+j4}1RxAMm(!RKG6sCddW%+tNDt@C})p9Mz_Fa2qB;NKLc2dv8PT)Rx0 zj&vjiKdAUI#fzQc`rAFf>YNpXGGiT1^6ohp<`}CI%wC@^_x^NZEnlGb3ZSnTJYD@< J);T3K0RZ$nd@cY0 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/figure.png b/src/main/resources/assets/sextiarysector/textures/items/figure.png new file mode 100644 index 0000000000000000000000000000000000000000..268c2eef296474d7670c8d8f167a934e70d9dd02 GIT binary patch literal 350 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~qdcFr(0${ZkwBr>o-U3d7N_SWa{= z77-^YeZd>24xJ0GU|gS|e=W{o!`5vdm>R!a6JvB0OYZowVhe|&fAWcNUhCb)pa1V( zGheIW=dS3wfl;v(HFade0@dp zgP#lkXI|T%xn-ALuj&!CZHt4`lO8jL%KfPhu@qi^koU#Zcl-F9-y28jKVtg#vg>2e sqMV>xn!Dv(@?RXQyy#Z`jr#{vwtP^ju*N}qptl)3UHx3vIVCg!0E3~6>;M1& literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/figure_box.png b/src/main/resources/assets/sextiarysector/textures/items/figure_box.png new file mode 100644 index 0000000000000000000000000000000000000000..bbc803db75f8632654480e0bb58c12fdc38389d2 GIT binary patch literal 368 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkEw6Q7cZN3+5+pwM4W7sn8b({rcTb{%q%Xq!KAN0?Zf z2)9|BlEGE6GO=Pd{Rg6Nj^5(txEXA zT6+n@D7_6ez3L1{3Vr69_!bK8(0f+-ui(PFtF27d6N2L2TJSj6cxW!z$aWB!||LF_Rk|Fv7x;YrtyuLTAKgQu&X J%Q~loCIDX_k`w>{ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/ingot/copper_ingot.png b/src/main/resources/assets/sextiarysector/textures/items/ingot/copper_ingot.png new file mode 100644 index 0000000000000000000000000000000000000000..b5b97713f420c34a99728860efea5f2d1cb34197 GIT binary patch literal 325 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~qbwsM$FjABZ-7FVJY5_^EKXmYq{w&3LBRF?7Ez9% z;AqDH4UtWoR+%>xFds4u$jEDS6BJQDz`RN#$g!D0Xj8|sExR4MTh^C7fB$>t+}Iz| zt#Vpl0@7k%EvT{O&S7wSZGC#lgC%@fyM52zUz)D#vaiu+sFVdQ&MBb@02f$!)c^nh literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/ingot/silver_ingot.png b/src/main/resources/assets/sextiarysector/textures/items/ingot/silver_ingot.png new file mode 100644 index 0000000000000000000000000000000000000000..b44eda55537281df908b6307fcfb520f143e90fd GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~qbwtnk$2DUxj>ol9Ja_%*vKHXfSh%NpYW)}6XtNLIN=j-A9UXhW&pB0He|HJXQy&(=!pkNBUZU?4dOAO)M%tMNcpZ$Y&Ms4>l_Oe|((3?Zl=!wi${&M>3q)PqZ1Z zJ=ym6d-29Zk1v~5CHOoqe_QxL{(UqLXS0iablcC_e95LPk--bsYIMb1v|HlfV#YFG zjg5`1&G!2J#Qs(f^We56nZG%*4s{$0weB+jfghGL9$fwL{eFGh+-xzWC)e~6Qc@BU z5(+r|e$1aW>C6Ej*zowCK3l9{nuznZwNVX=I1jT1IPOqvF;Qd|;hg@U<^PcksTc-^ YQqF{4Meo=vK+iIGy85}Sb4q9e0B(qWoB#j- literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/drying_flesh.png b/src/main/resources/assets/sextiarysector/textures/items/loom/drying_flesh.png new file mode 100644 index 0000000000000000000000000000000000000000..e8d0882b2e5414e0b1f0dbc991a8be430992e51f GIT binary patch literal 550 zcmV+>0@?kEP)7(=?y5DFrwai>uKY$RJ3L2%&*aO)=#x8fIY zAtK^R$U>s1brWj?Nt@Qt)TA}d%v=|xk*9gx>D}J>9nRsNf&Vc#@>()UCDV5LAn1ED$}kVz_e zun=2g<2`(kx)%k$_NT_5r?SYGTP%Ub?l<|4nHhkX^?i2%zK%;9} zJfqpzcGNqT_CVBM0<}^gk17e4dXAO8=WzrEPyqMKp4=Y+*LSxOcnAh}2LT=9E{4tNGpT-i&*O3u!6$0M046Uub&a4i9pX^UKQst2m%4we$ oUkxAD?SWA2WRfcO)BLmf1@!L0jPY#&1poj507*qoM6N<$g7QH3E&u=k literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/flesh_bobbin.png b/src/main/resources/assets/sextiarysector/textures/items/loom/flesh_bobbin.png new file mode 100644 index 0000000000000000000000000000000000000000..8646c860e61593d3a0292942f5739b677bdfa429 GIT binary patch literal 445 zcmV;u0Yd(XP)1QJ)KNSpuw0ZK_k zK~y-)#gn~Df^iVXKhNV&vmi`@BB;nT$tWbkrLC4CiioxbhoG^4sjb1kAcBS>&ukLLN>;)aN8+4E=2t`v^997)q zszhRD1Ke_n`wI@4aOs>rS@bH6b)Vwk>Vx=?&ULeW50=Mm5}tE#|60STG&}=3M-LV^ z+17B=2rH9z4zEpy`!t+3h{Q}TGu5_m!wB^Y8>!?ennL1DNEd4z;U)#4fQt*mNi9 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/saw.png b/src/main/resources/assets/sextiarysector/textures/models/saw.png new file mode 100644 index 0000000000000000000000000000000000000000..0c8162c75824b693a079ccdc3c1d5df53a0a4d98 GIT binary patch literal 2770 zcmZ{m`9IX(7srQcW^6-}J%f-eV~Lr`I@tyxYf%kFCHuZMS(C;ZVq#)MC6qOyu{O3E z`&u6+lU-u0+4Ft(2Yi3H=ibM;_i^vzanAE~&Lvn{V7b_Z*+C!>mx-}~H85lT4Ja6} zC2oE{fC=n;8EXKl1eJqER>R)V0S}w6u|og|1f%{NES)}Y?*L9npozI5WRjJQgYS$R z!3;RZ?qp(c$u{)A#WMw$6tF3{`buX9TLYS;o2lCQ1g3=R zo5TT5lP`pKkbFS~1lm7QKaUSs(N2AUIHB3LI8?+%q!}Vf?aRSuO?WMeP8AKAsAjh< zZLuM8a(XgoEv(Gl20c~9gQ7RI{Qd~)4A>_`b{`SnY#u&}VJ%B<3UCQ+$LTog7$ zr}uPsbC#Bt$|ihXSa{nwJ#hco9aWPD5BBqBw?&*$c8rCA!aJ%$F|FcN3gc`ZK|z^m zX(vI>m4Y4~9-CWRR>ihZaO_0WLlHZ>?}-P)!_UyGC%$=dpDQ<+GWy^-@h7FlyNLO=16HgtHwW_HL|?z~RQp?id(I_Q8+diawcUpt z(HrH>-VERT61iFbY>YUj<~l&jbbrtf9rd0*1p8pv^9I+5r19He_aY}tS$&5QtN)ga zY(2nL$5~^0qcB6_wZEjqJ$CLCnoK$|o4_#0E?$h>heZ(e)1^qww(nOo+%!aC-tUype?JewfVF(gW8;|UMgLdDo?ji=sQu^p9z)~8{pw#Bz_n#^El`;~ zi;I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PR?%czD+r~40!n?C<*ErlYfXxOmNTpq& z3Ar79-v{fdru)%{UbTBH8U*xDPoxKVU3mN_z=?Vdwb-^~5$5Mq-qvxgXq$=YkLn9| zJSEB#j6c73MP;}mob@=A1sY8~h)0!ffXu>ENK9YxM;D!-(Y~I>96R1C0We<5r&D;E z{k#3X#{;abq>(Ou;@+h&*g%E-V`cd-+v{ZJoW&o8HYkZpiO1YeDk`$(%sAhz7?DAF zPtWF>tI*?ch{d{j3qlKHUpqoppn1xRJo6Epj_7PUiW1AS<$E&u<=Ki; z^NI5;dcKB7>)A$*W!>uUqgn9HXiA*5cwI#Vv)wF)wQfbUwmR(a^Z2`cQYkeOe@=M4 zu!TK=bjIb+RHLQDD)lja5_Tixhy+pDiFXodz}SZ~w;@MMz8s1l`t|;gS=F05G8NFe VdPF)|2mC%kCWaOUWqP+_{s#{4MP2{^ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/steam_motor.png b/src/main/resources/assets/sextiarysector/textures/models/steam_motor.png new file mode 100644 index 0000000000000000000000000000000000000000..e26e5439561fab499c17c8b57d6d7e7b0cdb1389 GIT binary patch literal 1743 zcmV;=1~B=FP)VGd000McNliru-vS8%A^?sAG^YRn23$!* zK~#9!?OHu(97h!X-t68+rysBiLCUxYwjp3_5^~4{0&Y?!BDhGILRf_%*eQaGKx}Z8 zl*UogstU1F1YE@s3yfU|$>7Mb5X2}yRuMZ!I-l0s+kG#^?u=&dcJEFn>F#va6UVN0 zX5P;G=DqK|on1nXT)A>Z&_%g;@gjBNK5nDNW5Aj+Pf2=M69 z@4GU->i{q_s?{o7*G(oT=BSNPN`aZpm~y$iYva2PKoA57!w?%A8z3SS3I)^Vd7d#c zrOxb7VB2dHejdYyAHt8($bEU?{s`8gu2c4-Odg! z0311T#IUvNx>#IXgud?kK8nSnVQxESl~N{-^Ts#RTPvCrv&iwulP7x@0-Kwgh@vP( zR6!7+SS(^=V*`VOgNDV!Fof&6U}kfkHNKJFULi+U8{{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-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=82=AD?= =?UTF-8?q?=E3=83=8E=E3=82=B3=E6=A0=BD=E5=9F=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- .../java/shift/sextiarysector/SSBlocks.java | 15 ++++--- .../java/shift/sextiarysector/SSShops.java | 10 +++-- .../shift/sextiarysector/SextiarySector.java | 2 +- .../shift/sextiarysector/block/BlockHole.java | 10 +++++ .../sextiarysector/block/BlockPaddy.java | 11 ++++++ .../sextiarysector/block/BlockSSCrop.java | 7 +++- .../sextiarysector/block/BlockSteamMotor.java | 37 ++++++++++++++++++ .../module/ModuleStatistics.java | 2 + .../sextiarysector/recipe/RecipesMachine.java | 8 ++++ .../recipe/RecipesTimeMachine.java | 3 ++ .../tileentity/TileEntitySaw.java | 4 +- .../assets/sextiarysector/lang/en_US.lang | 2 + .../blocks/crop/mushroom_red_stage_0.png | Bin 0 -> 194 bytes .../blocks/crop/mushroom_red_stage_1.png | Bin 0 -> 241 bytes .../blocks/crop/mushroom_red_stage_2.png | Bin 0 -> 280 bytes .../blocks/crop/mushroom_red_stage_3.png | Bin 0 -> 321 bytes .../textures/items/seed/mushroom_red_seed.png | Bin 0 -> 483 bytes 18 files changed, 100 insertions(+), 13 deletions(-) create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/mushroom_red_stage_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/mushroom_red_stage_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/mushroom_red_stage_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/mushroom_red_stage_3.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/seed/mushroom_red_seed.png diff --git a/build.gradle b/build.gradle index b407ced..7970f8c 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.3.d-${project.minecraft.version}" +version = "2.1.4.c-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index f926bae..a106677 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -3,6 +3,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; +import net.minecraft.item.Item; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.season.Season; import shift.sextiarysector.block.BlockBlueFire; @@ -213,6 +214,8 @@ public class SSBlocks { public static Block rice; + public static Block redMushroom; + //水産 public static Block sandpit; @@ -254,7 +257,7 @@ public static void initBlicks(){ GameRegistry.registerBlock(fluidCrafter, ItemBlockFluidCrafter.class, "FluidCrafter"); GameRegistry.registerTileEntity(TileEntityFluidCrafter.class, "FluidCrafter"); - hole = new BlockHole().setBlockName("ss.hole").setCreativeTab(SextiarySectorAPI.TabSSCore); + hole = new BlockHole().setBlockName("ss.hole").setBlockTextureName("dirt").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(hole, "Hole"); woodHopper = new BlockWoodHopper().setBlockName("ss.wood_hopper").setCreativeTab(SextiarySectorAPI.TabSSCore); @@ -439,11 +442,11 @@ public static void initBlicks(){ pulverizer = new BlockSimpleMachine("pulverizer",30,SSRecipes.pulverizer,3).setBlockName("ss.pulverizer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(pulverizer, "Pulverizer"); - fan = new BlockFan().setBlockName("ss.fan"); + fan = new BlockFan().setBlockName("ss.fan").setBlockTextureName("stone"); GameRegistry.registerTileEntity(TileEntityFan.class, "Fan"); GameRegistry.registerBlock(fan, ItemBlockDirection.class, "Fan"); - saw = new BlockSaw().setBlockName("ss.saw"); + saw = new BlockSaw().setBlockName("ss.saw").setBlockTextureName("stone"); GameRegistry.registerTileEntity(TileEntitySaw.class, "Saw"); GameRegistry.registerBlock(saw, ItemBlockDirection.class, "Saw"); @@ -464,12 +467,11 @@ public static void initBlicks(){ GameRegistry.registerBlock(monitor,ItemBlockMonitor.class, "Monitor"); GameRegistry.registerTileEntity(TileEntityMonitor.class, "SSMonitor"); - farmland = new BlockSSFarmland().setBlockName("ss.farmland").setBlockTextureName("farmland").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); GameRegistry.registerBlock(farmland,"Farmland"); GameRegistry.registerTileEntity(TileEntityFarmland.class, "SSFarmland"); - paddy = new BlockPaddy().setBlockName("ss.paddy").setBlockTextureName("farmland").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); + paddy = new BlockPaddy().setBlockName("ss.paddy").setBlockTextureName("dirt").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); GameRegistry.registerBlock(paddy, "Paddy"); GameRegistry.registerTileEntity(TileEntityPaddy.class, "SSPaddy"); @@ -520,6 +522,9 @@ public static void initBlicks(){ rice = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{28,46,68},Season.SPRING,Season.SUMMER,Season.AUTUMN), paddy, SSItems.rice, false).setBlockName("ss.rice").setBlockTextureName("rice"); GameRegistry.registerBlock(rice,ItemBlockCrop.class,"BlockRice"); + redMushroom = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{6,8,14},Season.SPRING,Season.SUMMER), wood, Item.getItemFromBlock(Blocks.red_mushroom), false).setBlockName("ss.mushroom_red").setBlockTextureName("mushroom_red"); + GameRegistry.registerBlock(redMushroom, ItemBlockCrop.class, "BlockRedMushroom"); + //水産 sandpit = new BlockSandpit().setBlockName("ss.sandpit").setBlockTextureName("sand"); diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index 4d71c4a..b195623 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -33,11 +33,13 @@ public static void initShops(){ creepers[i].addItemProduct(new ProductItem(((ItemFigureBox) SSItems.figureBox).getEditionFigureBox("figure_beginner"), 300)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,0),500)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,1),500)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,0), 260)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.woodStoneGearShaft,1,1), 260)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.gfContactLenses,1),300)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.craftUnit,1),50000)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.gfContactLenses,1), 300)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.craftUnit,1), 50000)); + + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.wood,1), 180)); if(i==0){ creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.turnip,1),180)); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 99ca1cf..53bbede 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -34,7 +34,7 @@ public class SextiarySector { //public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.1.3"; + public static final String VERSION = "2.1.4"; @Mod.Instance("SextiarySector") public static SextiarySector instance; diff --git a/src/main/java/shift/sextiarysector/block/BlockHole.java b/src/main/java/shift/sextiarysector/block/BlockHole.java index 56c7cbb..039f6a8 100644 --- a/src/main/java/shift/sextiarysector/block/BlockHole.java +++ b/src/main/java/shift/sextiarysector/block/BlockHole.java @@ -1,5 +1,6 @@ package shift.sextiarysector.block; +import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; @@ -95,6 +96,15 @@ public void drawWater(World w, int x, int y, int z){ } + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) + { + ArrayList ret = new ArrayList(); + + ret.add(new ItemStack(Blocks.dirt, 1)); + + return ret; + } + //当たり判定 public void addCollisionBoxesToList(World p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_) { diff --git a/src/main/java/shift/sextiarysector/block/BlockPaddy.java b/src/main/java/shift/sextiarysector/block/BlockPaddy.java index 6e2db46..e5eddbf 100644 --- a/src/main/java/shift/sextiarysector/block/BlockPaddy.java +++ b/src/main/java/shift/sextiarysector/block/BlockPaddy.java @@ -1,5 +1,6 @@ package shift.sextiarysector.block; +import java.util.ArrayList; import java.util.List; import net.minecraft.block.BlockContainer; @@ -7,6 +8,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; @@ -111,6 +113,15 @@ private boolean isSame(World p_149743_1_, int p_149743_2_, int p_149743_3_, int return false; } + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) + { + ArrayList ret = new ArrayList(); + + ret.add(new ItemStack(Blocks.dirt, 1)); + + return ret; + } + //ブロックの線 public void setBlockBoundsForItemRender() { diff --git a/src/main/java/shift/sextiarysector/block/BlockSSCrop.java b/src/main/java/shift/sextiarysector/block/BlockSSCrop.java index 59fd2b3..4353fac 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSSCrop.java +++ b/src/main/java/shift/sextiarysector/block/BlockSSCrop.java @@ -174,7 +174,12 @@ public void registerBlockIcons(IIconRegister p_149651_1_) public int getRenderType() { - return 6; + if(type.equals(CropType.Normal)){ + return 6; + }else{ + return 1; + } + } protected Item func_149866_i() diff --git a/src/main/java/shift/sextiarysector/block/BlockSteamMotor.java b/src/main/java/shift/sextiarysector/block/BlockSteamMotor.java index 1a5b757..fb52251 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSteamMotor.java +++ b/src/main/java/shift/sextiarysector/block/BlockSteamMotor.java @@ -1,10 +1,14 @@ package shift.sextiarysector.block; +import java.util.Random; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.tileentity.TileEntitySteamMotor; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockSteamMotor extends BlockMotor{ @@ -36,6 +40,39 @@ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntitySteamMotor(); } + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) + { + TileEntitySteamMotor tileentityfurnace = (TileEntitySteamMotor)p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); + + + if (tileentityfurnace.canWork()) + { + int l = tileentityfurnace.getDirection().ordinal(); + + for(int i=0;i<2;i++){ + + float f = (float)p_149734_2_ + 0.5F; + float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; + float f2 = (float)p_149734_4_ + 0.5F; + float f3 = 0.52F; + float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; + + + p_149734_1_.spawnParticle("explode", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + + p_149734_1_.spawnParticle("explode", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + + p_149734_1_.spawnParticle("explode", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + + p_149734_1_.spawnParticle("explode", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + + + } + + } + } + @Override public int getRenderType() { diff --git a/src/main/java/shift/sextiarysector/module/ModuleStatistics.java b/src/main/java/shift/sextiarysector/module/ModuleStatistics.java index b535ddd..476da11 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleStatistics.java +++ b/src/main/java/shift/sextiarysector/module/ModuleStatistics.java @@ -78,6 +78,8 @@ private static void initStats() SextiarySector.Log.catching(e); }catch (ArrayIndexOutOfBoundsException e){ SextiarySector.Log.catching(e); + }catch (NoClassDefFoundError e){ + SextiarySector.Log.catching(e); } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index 959fe2b..e16cbc4 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -150,6 +150,14 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('a'), "ingotIron" })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.pump, 1), + new Object[] { "yyy", "axy","yzy", + Character.valueOf('x'), SSItems.stoneUnitGear, + Character.valueOf('y'), "plateWood", + Character.valueOf('z'), SSItems.stoneGear, + Character.valueOf('a'), SSBlocks.woodGrate, + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.pulverizer, 1), new Object[] { "yay", "aza","yxy", Character.valueOf('y'), "plankWood", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java index ecd1c5e..b62df37 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java @@ -1,5 +1,6 @@ package shift.sextiarysector.recipe; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SSItems; @@ -26,6 +27,8 @@ public static void addRecipes(RecipeSimpleMachine recipe) recipe.add(new ItemStack(SSItems.rice),new ItemStack(SSBlocks.rice, 1)); + recipe.add(new ItemStack(Blocks.red_mushroom),new ItemStack(SSBlocks.redMushroom, 1)); + } } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java index b6fb974..710fb87 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java @@ -4,6 +4,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; @@ -83,7 +84,7 @@ private void workSaw(){ Block b = this.worldObj.getBlock(xCoord + this.getDirection().offsetX, yCoord + this.getDirection().offsetY, zCoord + this.getDirection().offsetZ); - if(b != null && b.isNormalCube()){ + if(b != null && b.isNormalCube() && b.getBlockHardness(worldObj, xCoord + this.getDirection().offsetX, yCoord + this.getDirection().offsetY, zCoord + this.getDirection().offsetZ) != -1.0f){ this.worldObj.func_147480_a(this.xCoord + this.getDirection().offsetX, this.yCoord + this.getDirection().offsetY, this.zCoord + this.getDirection().offsetZ, true); this.worldObj.removeTileEntity(xCoord + this.getDirection().offsetX, yCoord + this.getDirection().offsetY, zCoord + this.getDirection().offsetZ); } @@ -97,6 +98,7 @@ private void addDamage(){ List list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity)null, aabb, null); for(Entity e :list){ + if(e instanceof EntityItem)continue; e.attackEntityFrom(DamageSource.cactus, 1.0f); } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index a481774..8bc006f 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -111,6 +111,8 @@ tile.ss.radish.name=Radish Seed tile.ss.rice.name=Rice Seed +tile.ss.mushroom_red.name=Red Mushroom Seed + tile.ss.sandpit.name=Sandpit tile.ss.monitor.name=Monitor diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/mushroom_red_stage_0.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/mushroom_red_stage_0.png new file mode 100644 index 0000000000000000000000000000000000000000..4f69f11d8ab88dad6ad967840999200682d63766 GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=Dh+L6~vJ#O${~LG}_)Usv|~Ok6B-+ODQIWr0GnnIRD+&iT2ysd*(pE(3#eQEFmI zYKlU6W=V#EyQgnJie4%^P+ZN^#WBR77|LvJo8#)`E46+WaU|h_0;c!Eg`}6-> d`_5H-wq|%D#4da1tuDwm22WQ%mvv4FO#n7cJ3#;d literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/mushroom_red_stage_1.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/mushroom_red_stage_1.png new file mode 100644 index 0000000000000000000000000000000000000000..02f4f9668ad692bbb7307616ef889f3b002cfa40 GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=Dh+L6~vJ#O${~LG}_)Usv|~Ok6DT5|96NdI5!GGeaUuobz*YQ}arITm}Z`qSVBa z)D(sC%#sWRcTeAd6une-pm?aKi(`nz>Eu8E|JyUGHgq;R8Dt$;!RUOTVR6x`|NW;{ z{#QTUa8qd0e@O`mi5+I^8a8ia6pImx%8B8*URRr(@Zrnh_wE1x|9^bMl+W+~;nLFo bkAs;RvZvU3y}DxT1hU!F)z4*}Q$iB}*n(A4 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/mushroom_red_stage_2.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/mushroom_red_stage_2.png new file mode 100644 index 0000000000000000000000000000000000000000..b7afa7df9010aa44a097df78184fbe25d0075020 GIT binary patch literal 280 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=Dh+L6~vJ#O${~LG}_)Usv|~Ok6Aq61x=^mjQ)jGeaUuobz*YQ}arITm}Z`qSVBa z)D(sC%#sWRcTeAd6une-pm>d^i(`nz>Eu8E|JyUGHgq;R8Dt$;!5CuLz&ia%a$@2X z6TRQxbd@jaRp{vaiU0OCnhglr-0vvy^zU$$Nb^4NPyHmf`_n6ua)sRn1-UT?3*KHg zpA(mGWSVsUsg=eC1_poJug&=N$S_Rb0BDE2`ntk`U-Ii#|CXOG#c-p9H##>Gu1CA@HPJD0Rrw>J3dN% z_;FN!&!>F*MQjgRmevQnk^3N!pct;KIA55%&5uLnO6}4Ui<&Z~DatWzxZ{v>XYulX zj&F?K*jMYlf6 ztJND`9i00Aq!)8rTN{u2PFIO_e}5f2z_3+<&B)mJ~r z=h4=Sm72lk`T5`8Et>2XvJE5Z)V8H4oBikC`;B3xowSkS0gw0dE-c_~3}j#sS&*r> TMR?mYP*{7q`njxgN@xNAt5?Te literal 0 HcmV?d00001 From a74da1d0ef95308ad2555aaefa79d0017b6f2214 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 21 Feb 2015 12:00:44 +0900 Subject: [PATCH 68/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E9=89=84?= =?UTF-8?q?=E3=83=91=E3=82=A4=E3=83=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・いろいろ追加 --- build.gradle | 2 +- .../java/shift/sextiarysector/Config.java | 14 +- .../java/shift/sextiarysector/SSBlocks.java | 181 +++--- .../java/shift/sextiarysector/SSEvents.java | 41 +- .../java/shift/sextiarysector/SSFluids.java | 88 ++- .../shift/sextiarysector/SSGuiHandler.java | 115 ++-- .../java/shift/sextiarysector/SSItems.java | 70 ++- .../shift/sextiarysector/SSOreDictionary.java | 39 +- .../java/shift/sextiarysector/SSPotions.java | 5 +- .../java/shift/sextiarysector/SSShops.java | 111 ++-- .../shift/sextiarysector/SextiarySector.java | 151 +++-- .../block/BlockBoardingBuoy.java | 282 +++++++++ .../sextiarysector/block/BlockBuoyBase.java | 84 +++ .../block/BlockDetectorBuoy.java | 169 +++++ .../sextiarysector/block/BlockHotSprings.java | 42 ++ .../shift/sextiarysector/block/BlockPipe.java | 40 ++ .../block/BlockPoweredBuoy.java | 188 ++++++ .../container/ContainerMPRepair.java | 589 ++++++++++++++++++ .../event/ClientEventHandler.java | 4 +- .../sextiarysector/event/HUDEventHandler.java | 81 ++- .../event/PlayerStatusEventHandler.java | 154 ++++- .../event/PlayerUnitEventHandler.java | 89 +++ .../event/WorldEventHandler.java | 39 +- .../gui/GuiAchievementsNext.java | 52 +- .../shift/sextiarysector/gui/GuiMPRepair.java | 223 +++++++ .../item/ItemBlockBuoyBase.java | 152 +++++ .../sextiarysector/item/ItemFullBottle.java | 14 + .../shift/sextiarysector/item/ItemHammer.java | 20 +- .../sextiarysector/item/ItemHoverBoots.java | 37 ++ .../sextiarysector/item/ItemSimpleBucket.java | 15 + .../shift/sextiarysector/item/ItemUnit.java | 25 + .../sextiarysector/module/ModuleChest.java | 48 ++ .../sextiarysector/module/ModuleFigure.java | 172 ++--- .../module/ModuleHotSprings.java | 77 +++ .../nei/SimpleFluidRecipeHandler.java | 379 +++++------ .../plugin/PluginAppleMilk.java | 16 +- .../sextiarysector/plugin/PluginCleaver.java | 21 +- .../potion/PotionHotSprings.java | 46 ++ .../shift/sextiarysector/potion/PotionSS.java | 31 +- .../sextiarysector/proxy/ClientProxy.java | 63 +- .../sextiarysector/proxy/CommonProxy.java | 18 +- .../recipe/RecipeSimpleFluid.java | 169 +++-- .../sextiarysector/recipe/RecipesCore.java | 139 +++-- .../recipe/RecipesFluidFurnace.java | 37 +- .../recipe/RecipesFurnaceCraft.java | 361 ++++++----- .../recipe/RecipesPulverizer.java | 33 +- .../recipe/RecipesTimeMachine.java | 33 +- .../renderer/block/RendererFluidCrafter.java | 127 ++-- .../renderer/block/RendererPipe.java | 106 ++++ .../renderer/block/RendererSquare.java | 74 ++- .../renderer/model/ModelPipe.java | 160 +++++ .../tileentity/TileEntityPipe.java | 196 ++++++ .../assets/sextiarysector/lang/en_US.lang | 123 ++-- .../textures/blocks/buoy/boarding_buoy_0.png | Bin 0 -> 268 bytes .../blocks/buoy/boarding_buoy_0_active.png | Bin 0 -> 334 bytes .../textures/blocks/buoy/boarding_buoy_1.png | Bin 0 -> 295 bytes .../blocks/buoy/boarding_buoy_1_active.png | Bin 0 -> 349 bytes .../textures/blocks/buoy/boarding_buoy_2.png | Bin 0 -> 270 bytes .../blocks/buoy/boarding_buoy_2_active.png | Bin 0 -> 339 bytes .../textures/blocks/buoy/boarding_buoy_3.png | Bin 0 -> 249 bytes .../blocks/buoy/boarding_buoy_3_active.png | Bin 0 -> 353 bytes .../textures/blocks/buoy/boarding_buoy_4.png | Bin 0 -> 270 bytes .../blocks/buoy/boarding_buoy_4_active.png | Bin 0 -> 349 bytes .../textures/blocks/buoy/boarding_buoy_5.png | Bin 0 -> 287 bytes .../blocks/buoy/boarding_buoy_5_active.png | Bin 0 -> 293 bytes .../textures/blocks/buoy/boarding_buoy_6.png | Bin 0 -> 276 bytes .../blocks/buoy/boarding_buoy_6_active.png | Bin 0 -> 342 bytes .../textures/blocks/buoy/boarding_buoy_7.png | Bin 0 -> 293 bytes .../blocks/buoy/boarding_buoy_7_active.png | Bin 0 -> 348 bytes .../textures/blocks/buoy/detector_buoy.png | Bin 0 -> 328 bytes .../blocks/buoy/detector_buoy_powered.png | Bin 0 -> 339 bytes .../textures/blocks/buoy/powered_buoy.png | Bin 0 -> 324 bytes .../textures/blocks/buoy/powered_buoy_0.png | Bin 0 -> 322 bytes .../textures/blocks/buoy/powered_buoy_1.png | Bin 0 -> 334 bytes .../textures/blocks/buoy/powered_buoy_2.png | Bin 0 -> 322 bytes .../textures/blocks/buoy/powered_buoy_3.png | Bin 0 -> 320 bytes .../textures/blocks/buoy/powered_buoy_4.png | Bin 0 -> 318 bytes .../textures/blocks/buoy/powered_buoy_5.png | Bin 0 -> 281 bytes .../textures/blocks/buoy/powered_buoy_6.png | Bin 0 -> 328 bytes .../textures/blocks/buoy/powered_buoy_7.png | Bin 0 -> 330 bytes .../textures/guis/fluid_refinery.png | Bin 0 -> 1800 bytes .../sextiarysector/textures/guis/potion.png | Bin 1472 -> 1683 bytes .../textures/items/buoy/boarding_buoy.png | Bin 0 -> 319 bytes .../textures/items/buoy/detector_buoy.png | Bin 0 -> 340 bytes .../textures/items/buoy/powered_buoy.png | Bin 0 -> 331 bytes .../items/fluid/gold_fluid_bucket.png | Bin 0 -> 398 bytes .../items/fluid/iron_fluid_bucket.png | Bin 0 -> 404 bytes .../textures/items/fluid/sap_bottle.png | Bin 0 -> 375 bytes .../textures/items/fluid/steam_bucket.png | Bin 0 -> 340 bytes .../textures/items/food/dessert/chocolate.png | Bin 0 -> 414 bytes .../textures/items/unit/attack_rust_unit.png | Bin 0 -> 1293 bytes .../textures/items/unit/attack_unit.png | Bin 0 -> 1307 bytes .../textures/items/unit/defense_rust_unit.png | Bin 0 -> 1223 bytes .../textures/items/unit/defense_unit.png | Bin 0 -> 1243 bytes .../textures/models/iron_pipe.png | Bin 0 -> 1135 bytes 95 files changed, 4339 insertions(+), 1206 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockBuoyBase.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockDetectorBuoy.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockHotSprings.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockPipe.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java create mode 100644 src/main/java/shift/sextiarysector/container/ContainerMPRepair.java create mode 100644 src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiMPRepair.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemBlockBuoyBase.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemFullBottle.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemHoverBoots.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemSimpleBucket.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemUnit.java create mode 100644 src/main/java/shift/sextiarysector/module/ModuleChest.java create mode 100644 src/main/java/shift/sextiarysector/module/ModuleHotSprings.java create mode 100644 src/main/java/shift/sextiarysector/potion/PotionHotSprings.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelPipe.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityPipe.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_0_active.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_1_active.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_2_active.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_3.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_3_active.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_4.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_4_active.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_5.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_5_active.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_6.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_6_active.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_7.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_7_active.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/detector_buoy.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/detector_buoy_powered.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_3.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_4.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_5.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_6.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_7.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/fluid_refinery.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/buoy/boarding_buoy.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/buoy/detector_buoy.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/buoy/powered_buoy.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/gold_fluid_bucket.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/iron_fluid_bucket.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/sap_bottle.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/steam_bucket.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/dessert/chocolate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/attack_rust_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/attack_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/defense_rust_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/defense_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/iron_pipe.png diff --git a/build.gradle b/build.gradle index 7970f8c..136dca5 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.4.c-${project.minecraft.version}" +version = "2.1.6.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index 569b2bf..0046887 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -7,6 +7,7 @@ public class Config { //Potion public static int burn; + public static int hotSprings; //Biome public static int magicDesert; @@ -24,7 +25,6 @@ public class Config { public static boolean modTcon; public static boolean modCleaver; - public static void ConfigRead(FMLPreInitializationEvent event) { Configuration cfg = new Configuration(event.getSuggestedConfigurationFile()); @@ -33,6 +33,7 @@ public static void ConfigRead(FMLPreInitializationEvent event) { cfg.load(); configForBiome(cfg); + configForPotion(cfg); configForPlayer(cfg); @@ -48,6 +49,7 @@ public static void ConfigRead(FMLPreInitializationEvent event) { public static void configForPotion(Configuration cfg) { burn = cfg.getInt("BurnID", "potion", 25, 25, 255, ""); + hotSprings = cfg.getInt("HotSpringsID", "potion", 26, 25, 255, ""); } public static void configForBiome(Configuration cfg) { @@ -71,14 +73,4 @@ public static void configForPlugin(Configuration cfg) { } - - - - - - - - - - } diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index a106677..9f3b948 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -7,7 +7,9 @@ import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.season.Season; import shift.sextiarysector.block.BlockBlueFire; +import shift.sextiarysector.block.BlockBoardingBuoy; import shift.sextiarysector.block.BlockChunkLoader; +import shift.sextiarysector.block.BlockDetectorBuoy; import shift.sextiarysector.block.BlockFan; import shift.sextiarysector.block.BlockFigure; import shift.sextiarysector.block.BlockFluidCrafter; @@ -18,12 +20,15 @@ import shift.sextiarysector.block.BlockGearBox; import shift.sextiarysector.block.BlockGearShaft; import shift.sextiarysector.block.BlockHole; +import shift.sextiarysector.block.BlockHotSprings; import shift.sextiarysector.block.BlockLargeFurnace; import shift.sextiarysector.block.BlockLargeOre; import shift.sextiarysector.block.BlockMagiFurnace; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockPaddy; +import shift.sextiarysector.block.BlockPipe; import shift.sextiarysector.block.BlockPowerStone; +import shift.sextiarysector.block.BlockPoweredBuoy; import shift.sextiarysector.block.BlockPump; import shift.sextiarysector.block.BlockSSChest; import shift.sextiarysector.block.BlockSSCrop; @@ -45,6 +50,7 @@ import shift.sextiarysector.block.BlockWindmill; import shift.sextiarysector.block.BlockWood; import shift.sextiarysector.block.BlockWoodHopper; +import shift.sextiarysector.item.ItemBlockBuoyBase; import shift.sextiarysector.item.ItemBlockCrop; import shift.sextiarysector.item.ItemBlockDirection; import shift.sextiarysector.item.ItemBlockFigure; @@ -65,6 +71,7 @@ import shift.sextiarysector.tileentity.TileEntityMagicFurnace; import shift.sextiarysector.tileentity.TileEntityMonitor; import shift.sextiarysector.tileentity.TileEntityPaddy; +import shift.sextiarysector.tileentity.TileEntityPipe; import shift.sextiarysector.tileentity.TileEntityPump; import shift.sextiarysector.tileentity.TileEntitySSChest; import shift.sextiarysector.tileentity.TileEntitySSCrop; @@ -100,12 +107,15 @@ public class SSBlocks { public static Block square; + public static Block ironPipe; + public static Block blueFire; public static Block figure; //液体 public static Block drinkingWater; + public static Block hotSprings; //GF public static Block woodShaft; @@ -143,7 +153,6 @@ public class SSBlocks { public static Block pump; - public static Block pulverizer; public static Block fan; @@ -157,7 +166,6 @@ public class SSBlocks { public static Block woodGrate; - public static Block woodOakPlate; public static Block woodBirchPlate; public static Block woodSprucePlate; @@ -165,7 +173,6 @@ public class SSBlocks { public static Block woodAcaciaPlate; public static Block woodBigOakPlate; - public static Block ironPlate; public static Block goldPlate; @@ -216,11 +223,15 @@ public class SSBlocks { public static Block redMushroom; - //水産 public static Block sandpit; - public static void initBlicks(){ + //輸送 + public static Block boardingBuoy; + public static Block poweredBuoy; + public static Block detectorBuoy; + + public static void initBlicks() { LargeFurnace = new BlockLargeFurnace().setBlockName("ss.large_furnace").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(LargeFurnace, "LargeFurnace"); @@ -267,50 +278,54 @@ public static void initBlicks(){ GameRegistry.registerBlock(square, ItemBlockDirection.class, "Square"); GameRegistry.registerTileEntity(TileEntitySquare.class, "Square"); - woodGrate = (new BlockSSPane(ID+":wood_grate", ID+":wood_grate", Material.wood, false,0)).setHardness(0.5F).setBlockName("ss.wood_grate").setCreativeTab(SextiarySectorAPI.TabSSCore); - GameRegistry.registerBlock(woodGrate, "WoodGrate"); + ironPipe = new BlockPipe().setBlockName("ss.iron_pipe").setBlockTextureName("planks_oak"); + GameRegistry.registerBlock(ironPipe, "IronPipe"); + GameRegistry.registerTileEntity(TileEntityPipe.class, "SSPipe"); + woodGrate = (new BlockSSPane(ID + ":wood_grate", ID + ":wood_grate", Material.wood, false, 0)).setHardness(0.5F).setBlockName("ss.wood_grate").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(woodGrate, "WoodGrate"); - woodOakPlate = (new BlockSSPane("planks_oak", "planks_oak", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.oak_wood_plate").setBlockTextureName(ID+":plate/wood_oak_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + woodOakPlate = (new BlockSSPane("planks_oak", "planks_oak", Material.wood, false, 1)).setHardness(0.5F).setBlockName("ss.oak_wood_plate").setBlockTextureName(ID + ":plate/wood_oak_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodOakPlate, "WoodOakPlate"); - woodBirchPlate = (new BlockSSPane("planks_birch", "planks_birch", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.birch_wood_plate").setBlockTextureName(ID+":plate/wood_birch_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + woodBirchPlate = (new BlockSSPane("planks_birch", "planks_birch", Material.wood, false, 1)).setHardness(0.5F).setBlockName("ss.birch_wood_plate").setBlockTextureName(ID + ":plate/wood_birch_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodBirchPlate, "WoodBirchPlate"); - woodSprucePlate = (new BlockSSPane("planks_spruce", "planks_spruce", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.spruce_wood_plate").setBlockTextureName(ID+":plate/wood_spruce_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + woodSprucePlate = (new BlockSSPane("planks_spruce", "planks_spruce", Material.wood, false, 1)).setHardness(0.5F).setBlockName("ss.spruce_wood_plate").setBlockTextureName(ID + ":plate/wood_spruce_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodSprucePlate, "WoodSprucePlate"); - woodJunglePlate = (new BlockSSPane("planks_jungle", "planks_jungle", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.jungle_wood_plate").setBlockTextureName(ID+":plate/wood_jungle_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + woodJunglePlate = (new BlockSSPane("planks_jungle", "planks_jungle", Material.wood, false, 1)).setHardness(0.5F).setBlockName("ss.jungle_wood_plate").setBlockTextureName(ID + ":plate/wood_jungle_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodJunglePlate, "WoodJunglePlate"); - woodAcaciaPlate = (new BlockSSPane("planks_acacia", "planks_acacia", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.acacia_wood_plate").setBlockTextureName(ID+":plate/wood_acacia_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + woodAcaciaPlate = (new BlockSSPane("planks_acacia", "planks_acacia", Material.wood, false, 1)).setHardness(0.5F).setBlockName("ss.acacia_wood_plate").setBlockTextureName(ID + ":plate/wood_acacia_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodAcaciaPlate, "WoodAcaciaPlate"); - woodBigOakPlate = (new BlockSSPane("planks_big_oak", "planks_big_oak", Material.wood, false,1)).setHardness(0.5F).setBlockName("ss.big_oak_wood_plate").setBlockTextureName(ID+":plate/wood_big_oak_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + woodBigOakPlate = (new BlockSSPane("planks_big_oak", "planks_big_oak", Material.wood, false, 1)).setHardness(0.5F).setBlockName("ss.big_oak_wood_plate").setBlockTextureName(ID + ":plate/wood_big_oak_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodBigOakPlate, "WoodBigOakPlate"); - - ironPlate = (new BlockSSPane("iron_block", ID+":iron_block_top", Material.iron, true,1)).setHardness(0.5F).setBlockName("ss.iron_plate").setBlockTextureName(ID+":plate/iron_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + ironPlate = (new BlockSSPane("iron_block", ID + ":iron_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.iron_plate").setBlockTextureName(ID + ":plate/iron_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(ironPlate, "IronPlate"); - goldPlate = (new BlockSSPane("gold_block", ID+":gold_block_top", Material.iron, true,1)).setHardness(0.5F).setBlockName("ss.gold_plate").setBlockTextureName(ID+":plate/gold_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + goldPlate = (new BlockSSPane("gold_block", ID + ":gold_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.gold_plate").setBlockTextureName(ID + ":plate/gold_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(goldPlate, "GoldPlate"); - chunkLoader = new BlockChunkLoader().setHardness(1.5F).setBlockName("ss.chunk_loader").setBlockTextureName("sextiarysector:time_loader"); GameRegistry.registerBlock(chunkLoader, "ChunkLoader"); blueFire = new BlockBlueFire().setBlockName("ss.blue_fire").setBlockTextureName("sextiarysector:blue_fire"); GameRegistry.registerBlock(blueFire, "BlueFire"); - figure = new BlockFigure().setBlockName("ss.figure").setBlockTextureName("sextiarysector:figure").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(figure, ItemBlockFigure.class, "Figure"); GameRegistry.registerTileEntity(TileEntityFigure.class, "SSFigure"); + //液体 drinkingWater = new BlockSSFluid(SSFluids.drinkingWater).setBlockName("ss.drinking_water").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(drinkingWater, "DrinkingWater"); + hotSprings = new BlockHotSprings(SSFluids.hotSprings).setBlockName("ss.hot_springs").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(hotSprings, "HotSprings"); + //鉱石 blueStoneOre = new BlockPowerStone().setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(blueStoneOre, "BlueStoneOre"); @@ -324,77 +339,74 @@ public static void initBlicks(){ zincOre = new BlockSSOre(null, 1).setBlockName("ss.zinc_ore").setBlockTextureName("sextiarysector:ore/zinc_ore"); GameRegistry.registerBlock(zincOre, "ZincOre"); - silverOre = new BlockSSOre(null,2).setBlockName("ss.silver_ore").setBlockTextureName("sextiarysector:ore/silver_ore"); + silverOre = new BlockSSOre(null, 2).setBlockName("ss.silver_ore").setBlockTextureName("sextiarysector:ore/silver_ore"); GameRegistry.registerBlock(silverOre, "SilverOre"); - mithrilOre = new BlockSSOre(null,2).setBlockName("ss.mithril_ore").setBlockTextureName("sextiarysector:ore/mithril_ore"); + mithrilOre = new BlockSSOre(null, 2).setBlockName("ss.mithril_ore").setBlockTextureName("sextiarysector:ore/mithril_ore"); GameRegistry.registerBlock(mithrilOre, "MithrilOre"); - orichalcumOre = new BlockSSOre(SSItems.orichalcumGem,3).setBlockName("ss.orichalcum_ore").setBlockTextureName("sextiarysector:ore/orichalcum_ore"); + orichalcumOre = new BlockSSOre(SSItems.orichalcumGem, 3).setBlockName("ss.orichalcum_ore").setBlockTextureName("sextiarysector:ore/orichalcum_ore"); GameRegistry.registerBlock(orichalcumOre, "OrichalcumOre"); - coalLargeOre = new BlockLargeOre(SSItems.coalDust,Blocks.coal_ore,1).setBlockName("ss.coal_large_ore").setBlockTextureName("sextiarysector:ore/coal_large_ore"); + coalLargeOre = new BlockLargeOre(SSItems.coalDust, Blocks.coal_ore, 1).setBlockName("ss.coal_large_ore").setBlockTextureName("sextiarysector:ore/coal_large_ore"); GameRegistry.registerBlock(coalLargeOre, "CoalLargeOre"); - ironLargeOre = new BlockLargeOre(SSItems.ironDust,Blocks.iron_ore,2).setBlockName("ss.iron_large_ore").setBlockTextureName("sextiarysector:ore/iron_large_ore"); + ironLargeOre = new BlockLargeOre(SSItems.ironDust, Blocks.iron_ore, 2).setBlockName("ss.iron_large_ore").setBlockTextureName("sextiarysector:ore/iron_large_ore"); GameRegistry.registerBlock(ironLargeOre, "IronLargeOre"); - goldLargeOre = new BlockLargeOre(SSItems.goldDust,Blocks.gold_ore,2).setBlockName("ss.gold_large_ore").setBlockTextureName("sextiarysector:ore/gold_large_ore"); + goldLargeOre = new BlockLargeOre(SSItems.goldDust, Blocks.gold_ore, 2).setBlockName("ss.gold_large_ore").setBlockTextureName("sextiarysector:ore/gold_large_ore"); GameRegistry.registerBlock(goldLargeOre, "GoldLargeOre"); //GF GameRegistry.registerTileEntity(TileEntityShaft.class, "Shaft"); woodShaft = new BlockShaft(1).setBlockName("ss.wood_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); - GameRegistry.registerBlock(woodShaft,ItemBlockDirection.class, "WoodShaft"); + GameRegistry.registerBlock(woodShaft, ItemBlockDirection.class, "WoodShaft"); stoneShaft = new BlockShaft(2).setBlockName("ss.stone_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeStone); - GameRegistry.registerBlock(stoneShaft,ItemBlockDirection.class, "StoneShaft"); + GameRegistry.registerBlock(stoneShaft, ItemBlockDirection.class, "StoneShaft"); steelShaft = new BlockShaft(3).setBlockName("ss.steel_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeMetal); - GameRegistry.registerBlock(steelShaft,ItemBlockDirection.class, "SteelShaft"); + GameRegistry.registerBlock(steelShaft, ItemBlockDirection.class, "SteelShaft"); ninjaShaft = new BlockShaft(4).setBlockName("ss.ninja_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeMetal); - GameRegistry.registerBlock(ninjaShaft,ItemBlockDirection.class, "NinjaShaft"); + GameRegistry.registerBlock(ninjaShaft, ItemBlockDirection.class, "NinjaShaft"); orichalcumShaft = new BlockShaft(5).setBlockName("ss.orichalcum_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeMetal); - GameRegistry.registerBlock(orichalcumShaft,ItemBlockDirection.class, "OrichalcumShaft"); - + GameRegistry.registerBlock(orichalcumShaft, ItemBlockDirection.class, "OrichalcumShaft"); GameRegistry.registerTileEntity(TileEntityGearBox.class, "GearBox"); - woodGearBox = new BlockGearBox(Material.wood,1).setBlockName("ss.wood_gear_box").setBlockTextureName("sextiarysector:machine/wood_gear_box").setStepSound(Block.soundTypeWood); + woodGearBox = new BlockGearBox(Material.wood, 1).setBlockName("ss.wood_gear_box").setBlockTextureName("sextiarysector:machine/wood_gear_box").setStepSound(Block.soundTypeWood); GameRegistry.registerBlock(woodGearBox, "WoodGearBox"); - stoneGearBox = new BlockGearBox(Material.rock,2).setBlockName("ss.stone_gear_box").setBlockTextureName("sextiarysector:machine/stone_gear_box").setStepSound(Block.soundTypeStone); + stoneGearBox = new BlockGearBox(Material.rock, 2).setBlockName("ss.stone_gear_box").setBlockTextureName("sextiarysector:machine/stone_gear_box").setStepSound(Block.soundTypeStone); GameRegistry.registerBlock(stoneGearBox, "StoneGearBox"); - steelGearBox = new BlockGearBox(Material.iron,3).setBlockName("ss.steel_gear_box").setBlockTextureName("sextiarysector:machine/steel_gear_box").setStepSound(Block.soundTypeMetal); + steelGearBox = new BlockGearBox(Material.iron, 3).setBlockName("ss.steel_gear_box").setBlockTextureName("sextiarysector:machine/steel_gear_box").setStepSound(Block.soundTypeMetal); GameRegistry.registerBlock(steelGearBox, "SteelGearBox"); - ninjaGearBox = new BlockGearBox(Material.iron,4).setBlockName("ss.ninja_gear_box").setBlockTextureName("sextiarysector:machine/ninja_gear_box").setStepSound(Block.soundTypeMetal); + ninjaGearBox = new BlockGearBox(Material.iron, 4).setBlockName("ss.ninja_gear_box").setBlockTextureName("sextiarysector:machine/ninja_gear_box").setStepSound(Block.soundTypeMetal); GameRegistry.registerBlock(ninjaGearBox, "NinjaGearBox"); - orichalcumGearBox = new BlockGearBox(Material.iron,5).setBlockName("ss.orichalcum_gear_box").setBlockTextureName("sextiarysector:machine/orichalcum_gear_box").setStepSound(Block.soundTypeMetal); + orichalcumGearBox = new BlockGearBox(Material.iron, 5).setBlockName("ss.orichalcum_gear_box").setBlockTextureName("sextiarysector:machine/orichalcum_gear_box").setStepSound(Block.soundTypeMetal); GameRegistry.registerBlock(orichalcumGearBox, "OrichalcumGearBox"); - GameRegistry.registerTileEntity(TileEntityGFTank.class, "GFTank"); - woodGFTank = new BlockGFTank(Material.wood,50,1).setBlockName("ss.wood_gf_tank").setBlockTextureName("sextiarysector:machine/wood_gf_tank").setStepSound(Block.soundTypeWood); + woodGFTank = new BlockGFTank(Material.wood, 50, 1).setBlockName("ss.wood_gf_tank").setBlockTextureName("sextiarysector:machine/wood_gf_tank").setStepSound(Block.soundTypeWood); GameRegistry.registerBlock(woodGFTank, "WoodGFTank"); - stoneGFTank = new BlockGFTank(Material.rock,51,2).setBlockName("ss.stone_gf_tank").setBlockTextureName("sextiarysector:machine/stone_gf_tank").setStepSound(Block.soundTypeWood); + stoneGFTank = new BlockGFTank(Material.rock, 51, 2).setBlockName("ss.stone_gf_tank").setBlockTextureName("sextiarysector:machine/stone_gf_tank").setStepSound(Block.soundTypeWood); GameRegistry.registerBlock(stoneGFTank, "StoneGFTank"); - steelGFTank = new BlockGFTank(Material.iron,52,3).setBlockName("ss.steel_gf_tank").setBlockTextureName("sextiarysector:machine/steel_gf_tank").setStepSound(Block.soundTypeMetal); + steelGFTank = new BlockGFTank(Material.iron, 52, 3).setBlockName("ss.steel_gf_tank").setBlockTextureName("sextiarysector:machine/steel_gf_tank").setStepSound(Block.soundTypeMetal); GameRegistry.registerBlock(steelGFTank, "SteelGFTank"); - ninjaGFTank = new BlockGFTank(Material.iron,53,4).setBlockName("ss.ninja_gf_tank").setBlockTextureName("sextiarysector:machine/ninja_gf_tank").setStepSound(Block.soundTypeMetal); + ninjaGFTank = new BlockGFTank(Material.iron, 53, 4).setBlockName("ss.ninja_gf_tank").setBlockTextureName("sextiarysector:machine/ninja_gf_tank").setStepSound(Block.soundTypeMetal); GameRegistry.registerBlock(ninjaGFTank, "NinjaGFTank"); - orichalcumGFTank = new BlockGFTank(Material.iron,54,5).setBlockName("ss.orichalcum_gf_tank").setBlockTextureName("sextiarysector:machine/orichalcum_gf_tank").setStepSound(Block.soundTypeMetal); + orichalcumGFTank = new BlockGFTank(Material.iron, 54, 5).setBlockName("ss.orichalcum_gf_tank").setBlockTextureName("sextiarysector:machine/orichalcum_gf_tank").setStepSound(Block.soundTypeMetal); GameRegistry.registerBlock(orichalcumGFTank, "OrichalcumGFTank"); - GameRegistry.registerTileEntity(TileEntityGearShaft.class, "GearShaft"); woodStoneGearShaft = new BlockGearShaft(1).setBlockName("ss.wood_stone_gear_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); GameRegistry.registerBlock(woodStoneGearShaft, ItemBlockGearShaft.class, "WoodStoneGearShaft"); @@ -424,25 +436,24 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntitySteamMotor.class, "SteamMotor"); GameRegistry.registerBlock(steamMotor, ItemBlockDirection.class, "SteamMotor"); - GameRegistry.registerTileEntity(TileEntitySimpleMachine.class, "SimpleMachine"); - millstone = new BlockSimpleMachine("millstone",20,SSRecipes.millstone,1).setBlockName("ss.millstone").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + millstone = new BlockSimpleMachine("millstone", 20, SSRecipes.millstone, 1).setBlockName("ss.millstone").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(millstone, "Millstone"); - loom = new BlockSimpleMachine("loom",21,SSRecipes.loom,1).setBlockName("ss.loom").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + loom = new BlockSimpleMachine("loom", 21, SSRecipes.loom, 1).setBlockName("ss.loom").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(loom, "Loom"); - sawmill = new BlockSimpleMachine("sawmill",25,SSRecipes.sawmill,2).setBlockName("ss.sawmill").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + sawmill = new BlockSimpleMachine("sawmill", 25, SSRecipes.sawmill, 2).setBlockName("ss.sawmill").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(sawmill, "Sawmill"); pump = new BlockPump().setBlockTextureName("sextiarysector:machine/pump").setBlockName("ss.pump"); GameRegistry.registerTileEntity(TileEntityPump.class, "SSPump"); - GameRegistry.registerBlock(pump, "pump"); + GameRegistry.registerBlock(pump, "pump"); - pulverizer = new BlockSimpleMachine("pulverizer",30,SSRecipes.pulverizer,3).setBlockName("ss.pulverizer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + pulverizer = new BlockSimpleMachine("pulverizer", 30, SSRecipes.pulverizer, 3).setBlockName("ss.pulverizer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(pulverizer, "Pulverizer"); - fan = new BlockFan().setBlockName("ss.fan").setBlockTextureName("stone"); + fan = new BlockFan().setBlockName("ss.fan").setBlockTextureName("stone"); GameRegistry.registerTileEntity(TileEntityFan.class, "Fan"); GameRegistry.registerBlock(fan, ItemBlockDirection.class, "Fan"); @@ -450,10 +461,10 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntitySaw.class, "Saw"); GameRegistry.registerBlock(saw, ItemBlockDirection.class, "Saw"); - rollingMachine = new BlockSimpleMachine("rolling_machine",35,SSRecipes.rollingMachine,4).setBlockName("ss.rolling_machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + rollingMachine = new BlockSimpleMachine("rolling_machine", 35, SSRecipes.rollingMachine, 4).setBlockName("ss.rolling_machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(rollingMachine, "RollingMachine"); - timeMachine = new BlockSimpleMachine("time_machine",40,SSRecipes.timeMachine,5).setBlockName("ss.time_machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + timeMachine = new BlockSimpleMachine("time_machine", 40, SSRecipes.timeMachine, 5).setBlockName("ss.time_machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(timeMachine, "TimeMachine"); shippingBox = new BlockShippingBox().setBlockName("ss.shipping_box").setBlockTextureName("sextiarysector:shipping_box").setCreativeTab(SextiarySectorAPI.TabSSEconomy); @@ -464,11 +475,11 @@ public static void initBlicks(){ GameRegistry.registerTileEntity(TileEntitySSChest.class, "SSChest"); monitor = new BlockMonitor().setBlockName("ss.monitor").setBlockTextureName("stone"); - GameRegistry.registerBlock(monitor,ItemBlockMonitor.class, "Monitor"); + GameRegistry.registerBlock(monitor, ItemBlockMonitor.class, "Monitor"); GameRegistry.registerTileEntity(TileEntityMonitor.class, "SSMonitor"); farmland = new BlockSSFarmland().setBlockName("ss.farmland").setBlockTextureName("farmland").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); - GameRegistry.registerBlock(farmland,"Farmland"); + GameRegistry.registerBlock(farmland, "Farmland"); GameRegistry.registerTileEntity(TileEntityFarmland.class, "SSFarmland"); paddy = new BlockPaddy().setBlockName("ss.paddy").setBlockTextureName("dirt").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); @@ -482,56 +493,62 @@ public static void initBlicks(){ //野菜 GameRegistry.registerTileEntity(TileEntitySSCrop.class, "SSCrop"); - turnip = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,3,4},Season.SPRING), farmland, SSItems.turnip, false).setBlockName("ss.turnip").setBlockTextureName("turnip"); - GameRegistry.registerBlock(turnip,ItemBlockCrop.class,"BlockTurnip"); - - cucumber = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{2,6,10,3},Season.SPRING), farmland, SSItems.cucumber, true).setBlockName("ss.cucumber").setBlockTextureName("cucumber"); - GameRegistry.registerBlock(cucumber,ItemBlockCrop.class,"BlockCucumber"); - - ironTurnip = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{4,8,12},Season.SPRING), farmland, SSItems.ironTurnip, false).setBlockName("ss.iron_turnip").setBlockTextureName("iron_turnip"); - GameRegistry.registerBlock(ironTurnip,ItemBlockCrop.class,"BlockIronTurnip"); + turnip = new BlockSSCrop(CropType.Normal, new CropStatus(new int[] { 2, 3, 4 }, Season.SPRING), farmland, SSItems.turnip, false).setBlockName("ss.turnip").setBlockTextureName("turnip"); + GameRegistry.registerBlock(turnip, ItemBlockCrop.class, "BlockTurnip"); + cucumber = new BlockSSCrop(CropType.Close, new CropStatus(new int[] { 2, 6, 10, 3 }, Season.SPRING), farmland, SSItems.cucumber, true).setBlockName("ss.cucumber").setBlockTextureName("cucumber"); + GameRegistry.registerBlock(cucumber, ItemBlockCrop.class, "BlockCucumber"); - onion = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,4,8},Season.SUMMER), farmland, SSItems.onion, false).setBlockName("ss.onion").setBlockTextureName("onion"); - GameRegistry.registerBlock(onion,ItemBlockCrop.class,"BlockOnion"); + ironTurnip = new BlockSSCrop(CropType.Normal, new CropStatus(new int[] { 4, 8, 12 }, Season.SPRING), farmland, SSItems.ironTurnip, false).setBlockName("ss.iron_turnip").setBlockTextureName("iron_turnip"); + GameRegistry.registerBlock(ironTurnip, ItemBlockCrop.class, "BlockIronTurnip"); - tomato = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{4,10,14,2},Season.SUMMER), farmland, SSItems.tomato, true).setBlockName("ss.tomato").setBlockTextureName("tomato"); - GameRegistry.registerBlock(tomato,ItemBlockCrop.class,"BlockTomato"); + onion = new BlockSSCrop(CropType.Normal, new CropStatus(new int[] { 2, 4, 8 }, Season.SUMMER), farmland, SSItems.onion, false).setBlockName("ss.onion").setBlockTextureName("onion"); + GameRegistry.registerBlock(onion, ItemBlockCrop.class, "BlockOnion"); - corn = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{5,10,16,4},Season.SUMMER), farmland, SSItems.corn, true).setBlockName("ss.corn").setBlockTextureName("corn"); - GameRegistry.registerBlock(corn,ItemBlockCrop.class,"BlockCorn"); + tomato = new BlockSSCrop(CropType.Close, new CropStatus(new int[] { 4, 10, 14, 2 }, Season.SUMMER), farmland, SSItems.tomato, true).setBlockName("ss.tomato").setBlockTextureName("tomato"); + GameRegistry.registerBlock(tomato, ItemBlockCrop.class, "BlockTomato"); - goldenCorn = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{7,12,18,4},Season.SUMMER), farmland, SSItems.goldenCorn, true).setBlockName("ss.golden_corn").setBlockTextureName("golden_corn"); - GameRegistry.registerBlock(goldenCorn,ItemBlockCrop.class,"BlockGoldenCorn"); + corn = new BlockSSCrop(CropType.Close, new CropStatus(new int[] { 5, 10, 16, 4 }, Season.SUMMER), farmland, SSItems.corn, true).setBlockName("ss.corn").setBlockTextureName("corn"); + GameRegistry.registerBlock(corn, ItemBlockCrop.class, "BlockCorn"); + goldenCorn = new BlockSSCrop(CropType.Close, new CropStatus(new int[] { 7, 12, 18, 4 }, Season.SUMMER), farmland, SSItems.goldenCorn, true).setBlockName("ss.golden_corn").setBlockTextureName("golden_corn"); + GameRegistry.registerBlock(goldenCorn, ItemBlockCrop.class, "BlockGoldenCorn"); - eggplant = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{3,7,12,3},Season.AUTUMN), farmland, SSItems.eggplant, true).setBlockName("ss.eggplant").setBlockTextureName("eggplant"); - GameRegistry.registerBlock(eggplant,ItemBlockCrop.class,"BlockEggplant"); + eggplant = new BlockSSCrop(CropType.Close, new CropStatus(new int[] { 3, 7, 12, 3 }, Season.AUTUMN), farmland, SSItems.eggplant, true).setBlockName("ss.eggplant").setBlockTextureName("eggplant"); + GameRegistry.registerBlock(eggplant, ItemBlockCrop.class, "BlockEggplant"); - sweetPotato = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,4,6,2},Season.AUTUMN), farmland, SSItems.sweetPotato, true).setBlockName("ss.sweet_potato").setBlockTextureName("sweet_potato"); - GameRegistry.registerBlock(sweetPotato,ItemBlockCrop.class,"BlockSweetPotato"); + sweetPotato = new BlockSSCrop(CropType.Normal, new CropStatus(new int[] { 2, 4, 6, 2 }, Season.AUTUMN), farmland, SSItems.sweetPotato, true).setBlockName("ss.sweet_potato").setBlockTextureName("sweet_potato"); + GameRegistry.registerBlock(sweetPotato, ItemBlockCrop.class, "BlockSweetPotato"); - greenPepper = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{4,8,14,3},Season.AUTUMN), farmland, SSItems.greenPepper, true).setBlockName("ss.green_pepper").setBlockTextureName("green_pepper"); - GameRegistry.registerBlock(greenPepper,ItemBlockCrop.class,"BlockGreenPepper"); + greenPepper = new BlockSSCrop(CropType.Close, new CropStatus(new int[] { 4, 8, 14, 3 }, Season.AUTUMN), farmland, SSItems.greenPepper, true).setBlockName("ss.green_pepper").setBlockTextureName("green_pepper"); + GameRegistry.registerBlock(greenPepper, ItemBlockCrop.class, "BlockGreenPepper"); - radish = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{2,3,4},Season.WINTER), farmland, SSItems.radish, false).setBlockName("ss.radish").setBlockTextureName("radish"); - GameRegistry.registerBlock(radish,ItemBlockCrop.class,"BlockRadish"); + radish = new BlockSSCrop(CropType.Normal, new CropStatus(new int[] { 2, 3, 4 }, Season.WINTER), farmland, SSItems.radish, false).setBlockName("ss.radish").setBlockTextureName("radish"); + GameRegistry.registerBlock(radish, ItemBlockCrop.class, "BlockRadish"); //米 ///28,46,68 - rice = new BlockSSCrop(CropType.Normal, new CropStatus(new int[]{28,46,68},Season.SPRING,Season.SUMMER,Season.AUTUMN), paddy, SSItems.rice, false).setBlockName("ss.rice").setBlockTextureName("rice"); - GameRegistry.registerBlock(rice,ItemBlockCrop.class,"BlockRice"); + rice = new BlockSSCrop(CropType.Normal, new CropStatus(new int[] { 28, 46, 68 }, Season.SPRING, Season.SUMMER, Season.AUTUMN), paddy, SSItems.rice, false).setBlockName("ss.rice").setBlockTextureName("rice"); + GameRegistry.registerBlock(rice, ItemBlockCrop.class, "BlockRice"); - redMushroom = new BlockSSCrop(CropType.Close, new CropStatus(new int[]{6,8,14},Season.SPRING,Season.SUMMER), wood, Item.getItemFromBlock(Blocks.red_mushroom), false).setBlockName("ss.mushroom_red").setBlockTextureName("mushroom_red"); + redMushroom = new BlockSSCrop(CropType.Close, new CropStatus(new int[] { 6, 8, 14 }, Season.SPRING, Season.SUMMER), wood, Item.getItemFromBlock(Blocks.red_mushroom), false).setBlockName("ss.mushroom_red").setBlockTextureName("mushroom_red"); GameRegistry.registerBlock(redMushroom, ItemBlockCrop.class, "BlockRedMushroom"); - //水産 sandpit = new BlockSandpit().setBlockName("ss.sandpit").setBlockTextureName("sand"); GameRegistry.registerBlock(sandpit, "Sandpit"); - //initVanillaBlock(); + //輸送 + boardingBuoy = new BlockBoardingBuoy().setBlockName("ss.boarding_buoy").setBlockTextureName("sextiarysector:buoy/boarding_buoy"); + GameRegistry.registerBlock(boardingBuoy, ItemBlockBuoyBase.class, "BoardingBuoy"); + + poweredBuoy = new BlockPoweredBuoy().setBlockName("ss.powered_buoy").setBlockTextureName("sextiarysector:buoy/powered_buoy"); + GameRegistry.registerBlock(poweredBuoy, ItemBlockBuoyBase.class, "PoweredBuoy"); + detectorBuoy = new BlockDetectorBuoy().setBlockName("ss.detector_buoy").setBlockTextureName("sextiarysector:buoy/detector_buoy"); + GameRegistry.registerBlock(detectorBuoy, ItemBlockBuoyBase.class, "DetectorBuoy"); + + //initVanillaBlock(); } diff --git a/src/main/java/shift/sextiarysector/SSEvents.java b/src/main/java/shift/sextiarysector/SSEvents.java index 749e6d6..a50fcc1 100644 --- a/src/main/java/shift/sextiarysector/SSEvents.java +++ b/src/main/java/shift/sextiarysector/SSEvents.java @@ -7,6 +7,7 @@ import shift.sextiarysector.event.CommonEventHandler; import shift.sextiarysector.event.HUDEventHandler; import shift.sextiarysector.event.PlayerStatusEventHandler; +import shift.sextiarysector.event.PlayerUnitEventHandler; import shift.sextiarysector.event.WorldEventHandler; import shift.sextiarysector.gui.tab.TabManager; import shift.sextiarysector.player.EntityPlayerManager; @@ -15,22 +16,36 @@ public class SSEvents { - public static void preInit(FMLPreInitializationEvent event){ + public static void preInit(FMLPreInitializationEvent event) { - MinecraftForge.EVENT_BUS.register(new CommonEventHandler()); - MinecraftForge.EVENT_BUS.register(EntityPlayerManager.instance); - FMLCommonHandler.instance().bus().register(EntityPlayerManager.instance); - if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new HUDEventHandler()); - MinecraftForge.EVENT_BUS.register(new PlayerStatusEventHandler()); - MinecraftForge.EVENT_BUS.register(new VanillaFoodHandler()); - if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new ClientEventHandler()); - if(event.getSide().isClient())MinecraftForge.EVENT_BUS.register(new TabManager()); - MinecraftForge.EVENT_BUS.register(new WorldEventHandler()); - MinecraftForge.ORE_GEN_BUS.register(new WorldEventHandler()); + MinecraftForge.EVENT_BUS.register(new CommonEventHandler()); - MinecraftForge.EVENT_BUS.register(new AchievementEventHandler()); + MinecraftForge.EVENT_BUS.register(EntityPlayerManager.instance); + FMLCommonHandler.instance().bus().register(EntityPlayerManager.instance); - //MinecraftForge.EVENT_BUS.register(new SantaEventHandler()); + if (event.getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(new HUDEventHandler()); + } + + MinecraftForge.EVENT_BUS.register(new PlayerStatusEventHandler()); + FMLCommonHandler.instance().bus().register(new PlayerStatusEventHandler()); + MinecraftForge.EVENT_BUS.register(new PlayerUnitEventHandler()); + MinecraftForge.EVENT_BUS.register(new VanillaFoodHandler()); + + if (event.getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(new ClientEventHandler()); + } + + if (event.getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(new TabManager()); + } + + MinecraftForge.EVENT_BUS.register(new WorldEventHandler()); + MinecraftForge.ORE_GEN_BUS.register(new WorldEventHandler()); + + MinecraftForge.EVENT_BUS.register(new AchievementEventHandler()); + + //MinecraftForge.EVENT_BUS.register(new SantaEventHandler()); } diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index 70ec575..a4f90a4 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -1,5 +1,6 @@ package shift.sextiarysector; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.fluids.Fluid; @@ -13,42 +14,53 @@ public class SSFluids { public static Fluid takumiTea; public static Fluid drinkingWater; + public static Fluid hotSprings; public static Fluid steam; + public static Fluid sap; + public static Fluid iron; public static Fluid gold; - public static void initFluids(){ + public static void initFluids() { - takumiTea = new SSFluid("TakumiTea", 0, 0x006400, 5, 2.0f).setUnlocalizedName("takumi_tea"); - drinkingWater = new SSFluid("DrinkingWater", 0, 0x87CEFA, 4, 1.0f).setUnlocalizedName("drinking_water"); + takumiTea = new SSFluid("TakumiTea", 0, 0x006400, 5, 2.0f).setUnlocalizedName("takumi_tea"); + drinkingWater = new SSFluid("DrinkingWater", 0, 0x87CEFA, 4, 1.0f).setUnlocalizedName("drinking_water"); + hotSprings = new SSFluid("HotSprings", 0, 0xFFFFFF, 4, 1.0f).setUnlocalizedName("hot_springs"); steam = new SSFluid("Steam", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("steam"); + sap = new SSFluid("Sap", 2, 0xFF7F50, 1, 1.0f).setUnlocalizedName("sap"); + iron = new SSFluid("Iron", 2, 0xFF1493, 1, 1.0f).setUnlocalizedName("iron"); gold = new SSFluid("Gold", 2, 0xFFD700, 1, 1.0f).setUnlocalizedName("gold"); } - public static void postFluids(){ + public static void postFluids() { - for(int i=1;i<=FluidRegistry.getRegisteredFluids().size();i++){ - FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(i), new ItemStack(SSBlocks.fluidCrafter,1,i), new ItemStack(SSBlocks.fluidCrafter,1,0)); + for (int i = 1; i <= FluidRegistry.getRegisteredFluids().size(); i++) { + FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(i), new ItemStack(SSBlocks.fluidCrafter, 1, i), new ItemStack(SSBlocks.fluidCrafter, 1, 0)); } - FluidContainerRegistry.registerFluidContainer(FluidRegistry.WATER, new ItemStack(SSItems.waterBottle,1), new ItemStack(SSItems.emptyBottle,1)); - FluidContainerRegistry.registerFluidContainer(FluidRegistry.LAVA, new ItemStack(SSItems.lavaBottle,1), new ItemStack(SSItems.emptyBottle,1)); + FluidContainerRegistry.registerFluidContainer(FluidRegistry.WATER, new ItemStack(SSItems.waterBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); + FluidContainerRegistry.registerFluidContainer(FluidRegistry.LAVA, new ItemStack(SSItems.lavaBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); - FluidContainerRegistry.registerFluidContainer(takumiTea, new ItemStack(SSItems.takumiTeaBottle,1), new ItemStack(SSItems.emptyBottle,1)); - FluidContainerRegistry.registerFluidContainer(drinkingWater, new ItemStack(SSItems.drinkingWaterBottle,1), new ItemStack(SSItems.emptyBottle,1)); + FluidContainerRegistry.registerFluidContainer(takumiTea, new ItemStack(SSItems.takumiTeaBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); + FluidContainerRegistry.registerFluidContainer(drinkingWater, new ItemStack(SSItems.drinkingWaterBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); + FluidContainerRegistry.registerFluidContainer(sap, new ItemStack(SSItems.sapBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); + + FluidContainerRegistry.registerFluidContainer(steam, new ItemStack(SSItems.steamBucket, 1), new ItemStack(Items.bucket, 1)); + FluidContainerRegistry.registerFluidContainer(iron, new ItemStack(SSItems.ironFluidBucket, 1), new ItemStack(Items.bucket, 1)); + FluidContainerRegistry.registerFluidContainer(gold, new ItemStack(SSItems.goldFluidBucket, 1), new ItemStack(Items.bucket, 1)); } public static class SSFluid extends Fluid { - private int type; - private int color; + private final int type; + private final int color; public int moisture; public float moistureSaturation; @@ -62,37 +74,47 @@ public SSFluid(String fluidName, int type, int color, int moisture, float moistu FluidRegistry.registerFluid(this); } + @Override public String getUnlocalizedName() - { - return "fluid.ss." + this.unlocalizedName; - } + { + return "fluid.ss." + this.unlocalizedName; + } + @Override public int getColor() - { - return color; - } + { + return color; + } + @Override @SideOnly(Side.CLIENT) public IIcon getStillIcon() - { - switch(type){ - case 0:return ClientEventHandler.waterStill; - case 1:return ClientEventHandler.portal; - case 2:return ClientEventHandler.lavaStill; + { + switch (type) { + case 0: + return ClientEventHandler.waterStill; + case 1: + return ClientEventHandler.portal; + case 2: + return ClientEventHandler.lavaStill; } - return ClientEventHandler.waterStill; - } + return ClientEventHandler.waterStill; + } + @Override @SideOnly(Side.CLIENT) - public IIcon getFlowingIcon() - { - switch(type){ - case 0:return ClientEventHandler.waterFlow; - case 1:return ClientEventHandler.portal; - case 2:return ClientEventHandler.lavaFlow; + public IIcon getFlowingIcon() + { + switch (type) { + case 0: + return ClientEventHandler.waterFlow; + case 1: + return ClientEventHandler.portal; + case 2: + return ClientEventHandler.lavaFlow; } - return ClientEventHandler.waterStill; - } + return ClientEventHandler.waterStill; + } } diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index c0d3add..10d88d7 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -9,6 +9,7 @@ import shift.sextiarysector.container.ContainerFreezer; import shift.sextiarysector.container.ContainerGFTank; import shift.sextiarysector.container.ContainerLargeFurnace; +import shift.sextiarysector.container.ContainerMPRepair; import shift.sextiarysector.container.ContainerMagicFurnace; import shift.sextiarysector.container.ContainerPlayerNext; import shift.sextiarysector.container.ContainerRucksack; @@ -23,6 +24,7 @@ import shift.sextiarysector.gui.GuiInventoryNext; import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; +import shift.sextiarysector.gui.GuiMPRepair; import shift.sextiarysector.gui.GuiMagicFurnace; import shift.sextiarysector.gui.GuiMillstone; import shift.sextiarysector.gui.GuiPulverizer; @@ -48,9 +50,8 @@ public class SSGuiHandler implements IGuiHandler { public static ArrayList list = new ArrayList(); - @Override - public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x, int y, int z) { + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { //System.out.println(ID); /* @@ -60,15 +61,21 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x return null; }*/ - switch(ID){ + switch (ID) { - case 0 : return new ContainerLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); - case 1 : - case 2 : + case 0: + return new ContainerLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); + case 1: + case 2: return new ContainerFluidMachineBase(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); - case 5 : return new ContainerCraftFurnace(player.inventory, (TileEntityCraftFurnace) world.getTileEntity(x, y, z)); - case 6 : return new ContainerFreezer(player.inventory, (TileEntityFreezer) world.getTileEntity(x, y, z)); + case 5: + return new ContainerCraftFurnace(player.inventory, (TileEntityCraftFurnace) world.getTileEntity(x, y, z)); + case 6: + return new ContainerFreezer(player.inventory, (TileEntityFreezer) world.getTileEntity(x, y, z)); + + case 10: + return new ContainerMPRepair(player.inventory, world, x, y, z, player); case 20: case 21: @@ -85,15 +92,21 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x case 54: return new ContainerGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z)); - case 60:return new ContainerSteamMotor(player.inventory, (TileEntitySteamMotor) world.getTileEntity(x, y, z)); + case 60: + return new ContainerSteamMotor(player.inventory, (TileEntitySteamMotor) world.getTileEntity(x, y, z)); - case 90 : return new ContainerMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); + case 90: + return new ContainerMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); - case 200 : return new ContainerPlayerNext(player.inventory, player); - case 201 : return new ContainerTabWorkbench(player.inventory, world, x, y, z); + case 200: + return new ContainerPlayerNext(player.inventory, player); + case 201: + return new ContainerTabWorkbench(player.inventory, world, x, y, z); - case 205 : return new ContainerRucksack(player.inventory); - case 206 : return new ContainerRucksack(player.inventory, EntityPlayerManager.getEquipmentStats(player).inventory); + case 205: + return new ContainerRucksack(player.inventory); + case 206: + return new ContainerRucksack(player.inventory, EntityPlayerManager.getEquipmentStats(player).inventory); } @@ -124,47 +137,71 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world,int x return null; - } @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world,int x, int y, int z) { + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { - switch(ID){ + switch (ID) { - case 0 : return new GuiLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); - case 1 : return new GuiFluidFurnace(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); - case 2 : return new GuiFoodSmokers(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); + case 0: + return new GuiLargeFurnace(player.inventory, (TileEntityLargeFurnace) world.getTileEntity(x, y, z)); + case 1: + return new GuiFluidFurnace(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); + case 2: + return new GuiFoodSmokers(player.inventory, (TileEntityFluidMachineBase) world.getTileEntity(x, y, z)); - case 5 : return new GuiCraftFurnace(player.inventory, (TileEntityCraftFurnace) world.getTileEntity(x, y, z)); - case 6 : return new GuiFreezer(player.inventory, (TileEntityFreezer) world.getTileEntity(x, y, z)); + case 5: + return new GuiCraftFurnace(player.inventory, (TileEntityCraftFurnace) world.getTileEntity(x, y, z)); + case 6: + return new GuiFreezer(player.inventory, (TileEntityFreezer) world.getTileEntity(x, y, z)); - case 20:return new GuiMillstone(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); - case 21:return new GuiLoom(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 10: + return new GuiMPRepair(player.inventory, world, x, y, z); - case 25:return new GuiSawmill(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 20: + return new GuiMillstone(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 21: + return new GuiLoom(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); - case 30:return new GuiPulverizer(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 25: + return new GuiSawmill(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); - case 35:return new GuiRollingMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 30: + return new GuiPulverizer(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); - case 40:return new GuiTimeMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 35: + return new GuiRollingMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); - case 50:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),1); - case 51:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),2); - case 52:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),3); - case 53:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),4); - case 54:return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z),5); + case 40: + return new GuiTimeMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + + case 50: + return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z), 1); + case 51: + return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z), 2); + case 52: + return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z), 3); + case 53: + return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z), 4); + case 54: + return new GuiGFTank(player.inventory, (TileEntityGFTank) world.getTileEntity(x, y, z), 5); - case 60:return new GuiSteamMotor(player.inventory, (TileEntitySteamMotor) world.getTileEntity(x, y, z)); + case 60: + return new GuiSteamMotor(player.inventory, (TileEntitySteamMotor) world.getTileEntity(x, y, z)); - case 90:return new GuiMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); + case 90: + return new GuiMagicFurnace(player.inventory, (TileEntityMagicFurnace) world.getTileEntity(x, y, z)); - case 200:return new GuiInventoryNext(player); - case 201:return new GuiTabCrafting(player.inventory, world, x, y, z); + case 200: + return new GuiInventoryNext(player); + case 201: + return new GuiTabCrafting(player.inventory, world, x, y, z); - case 205:return new GuiRucksack(player.inventory); - case 206:return new GuiRucksack(player.inventory, EntityPlayerManager.getEquipmentStats(player).inventory); + case 205: + return new GuiRucksack(player.inventory); + case 206: + return new GuiRucksack(player.inventory, EntityPlayerManager.getEquipmentStats(player).inventory); } diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 936af69..b778784 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -12,6 +12,7 @@ import shift.sextiarysector.item.ItemFigureBox; import shift.sextiarysector.item.ItemFoodCrop; import shift.sextiarysector.item.ItemFoodDrink; +import shift.sextiarysector.item.ItemFullBottle; import shift.sextiarysector.item.ItemGFContactLenses; import shift.sextiarysector.item.ItemGearStorage; import shift.sextiarysector.item.ItemGuiUnit; @@ -24,7 +25,9 @@ import shift.sextiarysector.item.ItemSeasonStone; import shift.sextiarysector.item.ItemShiftHat; import shift.sextiarysector.item.ItemShopRing; +import shift.sextiarysector.item.ItemSimpleBucket; import shift.sextiarysector.item.ItemSoup; +import shift.sextiarysector.item.ItemUnit; import shift.sextiarysector.item.ItemWaterBottle; import shift.sextiarysector.item.ItemWateringCan; import cpw.mods.fml.common.registry.GameRegistry; @@ -92,7 +95,6 @@ public class SSItems { public static Item blueStoneSlimeBall; - public static Item energyReactor; public static Item objectReactor; @@ -100,12 +102,20 @@ public class SSItems { public static Item emptyBottle; public static Item waterBottle; public static Item lavaBottle; + public static Item sapBottle; - + public static Item steamBucket; + public static Item ironFluidBucket; + public static Item goldFluidBucket; //unit public static Item craftUnit; + public static Item attackUnit; + public static Item defenseUnit; + public static Item attackRustUnit; + public static Item defenseRustUnit; + //ring public static Item ironRing; public static Item creeperRing; @@ -160,7 +170,6 @@ public class SSItems { public static Item goldenCorn; - public static Item eggplant; public static Item sweetPotato; public static Item greenPepper; @@ -171,7 +180,6 @@ public class SSItems { public static Item rice; - //料理 public static Item whiteRice; @@ -184,6 +192,7 @@ public class SSItems { public static Item porkchopSmoked; public static Item beefSmoked; + public static Item riceBall; public static Item curryRice; public static Item carrotSoup; @@ -194,6 +203,8 @@ public class SSItems { public static Item enderSoup; public static Item tomatoSoup; + public static Item chocolate; + //飲み物 //public static Item drinkingWaterSmallBottle; public static Item drinkingWaterBottle; @@ -205,7 +216,7 @@ public class SSItems { public static Item rucksack; public static Item gfContactLenses; - public static void initItems(){ + public static void initItems() { unit = new Item().setUnlocalizedName("ss.unit").setTextureName("sextiarysector:machine/unit").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(unit, "Unit"); @@ -225,7 +236,6 @@ public static void initItems(){ orichalcumGear = new Item().setUnlocalizedName("ss.orichalcum_gear").setTextureName("sextiarysector:machine/orichalcum_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(orichalcumGear, "OrichalcumGear"); - woodUnitGear = new Item().setUnlocalizedName("ss.wood_unit_gear").setTextureName("sextiarysector:machine/wood_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(woodUnitGear, "WoodUnitGear"); @@ -241,7 +251,6 @@ public static void initItems(){ orichalcumUnitGear = new Item().setUnlocalizedName("ss.orichalcum_unit_gear").setTextureName("sextiarysector:machine/orichalcum_unit_gear").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(orichalcumUnitGear, "OrichalcumUnitGear"); - woodGFStorage = new ItemGearStorage(1, 10000, 1).setUnlocalizedName("ss.wood_gf_storage").setTextureName("sextiarysector:gearforce/wood_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(woodGFStorage, "WoodGFStorage"); @@ -257,7 +266,6 @@ public static void initItems(){ orichalcumGFStorage = new ItemGearStorage(5, 10000, 5).setUnlocalizedName("ss.orichalcum_gf_storage").setTextureName("sextiarysector:gearforce/orichalcum_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(orichalcumGFStorage, "OrichalcumGFStorage"); - hammer = new ItemHammer().setUnlocalizedName("ss.hammer").setTextureName("sextiarysector:machine/hammer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(hammer, "Hammer"); @@ -301,7 +309,6 @@ public static void initItems(){ mithrilDust = new Item().setUnlocalizedName("ss.mithril_dust").setTextureName("sextiarysector:dust/mithril_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(mithrilDust, "MithrilDust"); - steelIngot = new Item().setUnlocalizedName("ss.steel_ingot").setTextureName("sextiarysector:ingot/steel_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(steelIngot, "SteelIngot"); @@ -323,7 +330,6 @@ public static void initItems(){ silverIngot = new Item().setUnlocalizedName("ss.silver_ingot").setTextureName("sextiarysector:ingot/silver_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(silverIngot, "SilverIngot"); - mithrilIngot = new Item().setUnlocalizedName("ss.mithril_ingot").setTextureName("sextiarysector:ingot/mithril_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(mithrilIngot, "MithrilIngot"); @@ -336,7 +342,6 @@ public static void initItems(){ blueStoneSlimeBall = new Item().setUnlocalizedName("ss.blue_stone_slime_ball").setTextureName("sextiarysector:slimeball/bluestone_slimeball").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(blueStoneSlimeBall, "BlueStoneSlimeBall"); - energyReactor = new Item().setUnlocalizedName("ss.energy_reactor").setTextureName("sextiarysector:energy_reactor").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(energyReactor, "EnergyReactor"); @@ -344,6 +349,7 @@ public static void initItems(){ GameRegistry.registerItem(objectReactor, "ObjectReactor"); //液体 + //ボトル emptyBottle = new ItemBottle().setUnlocalizedName("ss.empty_bottle").setTextureName("sextiarysector:fluid/empty_bottle"); GameRegistry.registerItem(emptyBottle, "EmptyBottle"); @@ -353,10 +359,35 @@ public static void initItems(){ lavaBottle = new ItemLavaBottle().setUnlocalizedName("ss.lava_bottle").setTextureName("sextiarysector:fluid/lava_bottle"); GameRegistry.registerItem(lavaBottle, "LavaBottle"); + sapBottle = new ItemFullBottle().setUnlocalizedName("ss.sap_bottle").setTextureName("sextiarysector:fluid/sap_bottle"); + GameRegistry.registerItem(sapBottle, "SapBottle"); + + //バケツ + steamBucket = new ItemSimpleBucket().setUnlocalizedName("ss.steam_bucket").setTextureName("sextiarysector:fluid/steam_bucket"); + GameRegistry.registerItem(steamBucket, "SteamBucket"); + + ironFluidBucket = new ItemSimpleBucket().setUnlocalizedName("ss.iron_fluid_bucket").setTextureName("sextiarysector:fluid/iron_fluid_bucket"); + GameRegistry.registerItem(ironFluidBucket, "IronFluidBucket"); + + goldFluidBucket = new ItemSimpleBucket().setUnlocalizedName("ss.gold_fluid_bucket").setTextureName("sextiarysector:fluid/gold_fluid_bucket"); + GameRegistry.registerItem(goldFluidBucket, "GoldFluidBucket"); + //Unit craftUnit = new ItemGuiUnit(201).setUnlocalizedName("ss.craft_unit").setTextureName("sextiarysector:unit/craft_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(craftUnit, "CraftUnit"); + attackUnit = new ItemUnit().setUnlocalizedName("ss.attack_unit").setTextureName("sextiarysector:unit/attack_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(attackUnit, "AttackUnit"); + + defenseUnit = new ItemUnit().setUnlocalizedName("ss.defense_unit").setTextureName("sextiarysector:unit/defense_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(defenseUnit, "DefenseUnit"); + + attackRustUnit = new ItemUnit().setUnlocalizedName("ss.attack_rust_unit").setTextureName("sextiarysector:unit/attack_rust_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(attackRustUnit, "AttackRustUnit"); + + defenseRustUnit = new ItemUnit().setUnlocalizedName("ss.defense_rust_unit").setTextureName("sextiarysector:unit/defense_rust_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(defenseRustUnit, "DefenseRustUnit"); + //Ring ironRing = new Item().setUnlocalizedName("ss.iron_ring").setTextureName("sextiarysector:ring/iron_ring").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(ironRing, "IronRing"); @@ -436,7 +467,6 @@ public static void initItems(){ ironTurnip = new ItemFoodCrop(farmlandCrops, 0, 1, 0, 0, 0, 0, false).setUnlocalizedName("ss.iron_turnip").setTextureName("sextiarysector:food/vegetable/iron_turnip"); GameRegistry.registerItem(ironTurnip, "IronTurnip"); - onion = new ItemFoodCrop(farmlandCrops, 2, 1, 1, 0, 0, 0, false).setUnlocalizedName("ss.onion").setTextureName("sextiarysector:food/vegetable/onion"); GameRegistry.registerItem(onion, "Onion"); @@ -449,7 +479,6 @@ public static void initItems(){ goldenCorn = new ItemFoodCrop(farmlandCrops, 0, 2, 0, 0, 0, 0, false).setUnlocalizedName("ss.golden_corn").setTextureName("sextiarysector:food/vegetable/golden_corn"); GameRegistry.registerItem(goldenCorn, "GoldCorn"); - eggplant = new ItemFoodCrop(farmlandCrops, 1, 1, 4, 2, 0, 0, false).setUnlocalizedName("ss.eggplant").setTextureName("sextiarysector:food/vegetable/eggplant"); GameRegistry.registerItem(eggplant, "Eggplant"); @@ -459,11 +488,9 @@ public static void initItems(){ greenPepper = new ItemFoodCrop(farmlandCrops, 2, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.green_pepper").setTextureName("sextiarysector:food/vegetable/green_pepper"); GameRegistry.registerItem(greenPepper, "GreenPepper"); - bluePotato = new ItemFoodCrop(paddyCrops, 1, 0, 5, 8, 2, 0, false).setUnlocalizedName("ss.blue_potato").setTextureName("sextiarysector:food/vegetable/blue_potato"); GameRegistry.registerItem(bluePotato, "BluePotato"); - radish = new ItemFoodCrop(farmlandCrops, 3, 1, 2, 1, 0, 0, false).setUnlocalizedName("ss.radish").setTextureName("sextiarysector:food/vegetable/radish"); GameRegistry.registerItem(radish, "Radish"); @@ -492,9 +519,11 @@ public static void initItems(){ beefSmoked = new ItemFoodDrink(3, 7.6f, 0, 0, 4, 2.0f, false).setUnlocalizedName("ss.beef_smoked").setTextureName("sextiarysector:food/meat/beef_smoked").setCreativeTab(SextiarySectorAPI.TabSSCooking); GameRegistry.registerItem(beefSmoked, "BeefSmoked"); - curryRice = new ItemFoodDrink(9, 12.6f, 0, 0, 10, 2.0f, false).setUnlocalizedName("ss.curry_rice").setTextureName("sextiarysector:food/rice/curry_rice").setCreativeTab(SextiarySectorAPI.TabSSCooking); - GameRegistry.registerItem(curryRice, "CurryRice"); + riceBall = new ItemFoodDrink(4, 0.6f, 0, 0, 4, 6.0f, false).setUnlocalizedName("ss.rice_ball").setTextureName("sextiarysector:food/rice/rice_ball").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(riceBall, "RiceBall"); + curryRice = new ItemFoodDrink(9, 12.6f, 0, 0, 15, 2.0f, false).setUnlocalizedName("ss.curry_rice").setTextureName("sextiarysector:food/rice/curry_rice").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(curryRice, "CurryRice"); carrotSoup = new ItemSoup(2, 0.6f, 4, 1, 0, 0.0f, false).setUnlocalizedName("ss.carrot_soup").setTextureName("sextiarysector:food/soup/carrot_soup"); GameRegistry.registerItem(carrotSoup, "CarrotSoup"); @@ -514,6 +543,8 @@ public static void initItems(){ tomatoSoup = new ItemSoup(1, 0.6f, 3, 4.0f, 0, 0.0f, false).setUnlocalizedName("ss.tomato_soup").setTextureName("sextiarysector:food/soup/tomato_soup"); GameRegistry.registerItem(tomatoSoup, "TomatoSoup"); + chocolate = new ItemFoodDrink(2, 1.2f, 0, 0, 6, 4.0f, false).setUnlocalizedName("ss.chocolate").setTextureName("sextiarysector:food/dessert/chocolate").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(chocolate, "Chocolate"); //飲み物 drinkingWaterBottle = new ItemDrink(0, 2.5f, 3, 6.5f, 0, 0, false).setUnlocalizedName("ss.drinking_water_bottle").setTextureName("sextiarysector:fluid/drinking_water_bottle"); @@ -534,9 +565,4 @@ public static void initItems(){ } - - - - - } diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index f4d7073..3dd26ae 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -9,7 +9,7 @@ public class SSOreDictionary { - public static void init(){ + public static void init() { OreDictionary.registerOre("condimentSugar", Items.sugar); @@ -24,18 +24,19 @@ public static void init(){ OreDictionary.registerOre("cookingVegetable", Items.potato); OreDictionary.registerOre("cookingVegetable", Items.carrot); + OreDictionary.registerOre("condimentCocoa", new ItemStack(Items.dye, 1, 3)); + OreDictionary.registerOre("containerWoodBowl", Items.bowl); OreDictionary.registerOre("containerBucket", Items.bucket); - OreDictionary.registerOre("craftingString", new ItemStack(Items.string,1,0)); + OreDictionary.registerOre("craftingString", new ItemStack(Items.string, 1, 0)); - for(int i=0;i<16;i++){ - OreDictionary.registerOre("craftingSmallCloth", new ItemStack(Blocks.wool,1,i)); + for (int i = 0; i < 16; i++) { + OreDictionary.registerOre("craftingSmallCloth", new ItemStack(Blocks.wool, 1, i)); } - OreDictionary.registerOre("fluidWater", Items.water_bucket); - OreDictionary.registerOre("fluidWater", new ItemStack(Items.potionitem, 1 ,0)); + OreDictionary.registerOre("fluidWater", new ItemStack(Items.potionitem, 1, 0)); OreDictionary.registerOre("craftingMagic", Items.nether_star); @@ -105,52 +106,56 @@ public static void init(){ OreDictionary.registerOre("craftingSmallCloth", SSItems.smallCloth); OreDictionary.registerOre("craftingFilterCloth", SSItems.smallCloth); - //液体金属 + //液体 OreDictionary.registerOre("fluidIron", new ItemStack(SSBlocks.fluidCrafter, 1, SSFluids.iron.getID())); OreDictionary.registerOre("fluidGold", new ItemStack(SSBlocks.fluidCrafter, 1, SSFluids.gold.getID())); - Item[] Knife = new Item[]{SSItems.woodKnife, SSItems.stoneKnife, SSItems.ironKnife, SSItems.goldKnife, SSItems.diamondKnife}; - for(int i =0;i productItemList = new ArrayList(); String name; public int id; - public SSProductList(String name){ + public SSProductList(String name) { this.name = name; this.id = MCEconomyAPI.registerProductList(this); } @@ -112,7 +115,7 @@ public String getProductListName() { return this.name; } - public SSProductList copySSProductList(){ + public SSProductList copySSProductList() { SSProductList c = new SSProductList(this.name); c.productItemList = this.getProductList(); @@ -137,45 +140,41 @@ public ArrayList getProductList() { } - public static void initPurchase(){ + public static void initPurchase() { MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.turnip), 280); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.cucumber), 350); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.ironTurnip), 300); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.turnip,1,1), 2800); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.cucumber,1,1), 3500); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.ironTurnip,1,1), 3000); - + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.turnip, 1, 1), 2800); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.cucumber, 1, 1), 3500); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.ironTurnip, 1, 1), 3000); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.onion), 320); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.tomato), 150); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.corn), 720); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.goldenCorn), 800); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.onion,1,1), 3200); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.tomato,1,1), 1500); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.corn,1,1), 7200); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.goldenCorn,1,1), 8000); - + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.onion, 1, 1), 3200); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.tomato, 1, 1), 1500); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.corn, 1, 1), 7200); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.goldenCorn, 1, 1), 8000); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.eggplant), 210); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.sweetPotato), 120); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.greenPepper), 200); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.eggplant,1,1), 2100); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.sweetPotato,1,1), 1200); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.greenPepper,1,1), 2000); - + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.eggplant, 1, 1), 2100); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.sweetPotato, 1, 1), 1200); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.greenPepper, 1, 1), 2000); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.radish), 220); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.radish,1,1), 2200); - + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.radish, 1, 1), 2200); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.rice), 400); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.rice,1,1), 4000); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.rice, 1, 1), 4000); } diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 53bbede..fe50802 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -1,7 +1,5 @@ package shift.sextiarysector; - - import java.util.ArrayList; import org.apache.logging.log4j.LogManager; @@ -13,8 +11,10 @@ import shift.sextiarysector.item.GearForceItemManager; import shift.sextiarysector.module.IModule; import shift.sextiarysector.module.ModuleAgriculture; +import shift.sextiarysector.module.ModuleChest; import shift.sextiarysector.module.ModuleChunkLoader; import shift.sextiarysector.module.ModuleFigure; +import shift.sextiarysector.module.ModuleHotSprings; import shift.sextiarysector.module.ModuleSandpit; import shift.sextiarysector.module.ModuleSeason; import shift.sextiarysector.module.ModuleStatistics; @@ -34,125 +34,124 @@ public class SextiarySector { //public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.1.4"; + public static final String VERSION = "2.1.6"; - @Mod.Instance("SextiarySector") - public static SextiarySector instance; + @Mod.Instance("SextiarySector") + public static SextiarySector instance; - public static final String DEPENDENCY = "";//"required-after:mceconomy2"; + public static final String DEPENDENCY = "";//"required-after:mceconomy2"; - @SidedProxy(clientSide = "shift.sextiarysector.proxy.ClientProxy", serverSide = "shift.sextiarysector.proxy.CommonProxy") + @SidedProxy(clientSide = "shift.sextiarysector.proxy.ClientProxy", serverSide = "shift.sextiarysector.proxy.CommonProxy") public static CommonProxy proxy; - public static final Logger Log = LogManager.getLogger(SextiarySectorAPI.MODID); + public static final Logger Log = LogManager.getLogger(SextiarySectorAPI.MODID); - public static final ArrayList modules = new ArrayList(); + public static final ArrayList modules = new ArrayList(); - @Mod.EventHandler + @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { - Log.info("PreInit"); + Log.info("PreInit"); - Config.ConfigRead(event); + Config.ConfigRead(event); - SSPacketHandler.init(event); + SSPacketHandler.init(event); - SextiarySector.proxy.setCustomRenderers(); + SextiarySector.proxy.setCustomRenderers(); - SSEvents.preInit(event); + SSEvents.preInit(event); GearForceItem.manager = new GearForceItemManager(); - //Module - modules.add(ModuleStatistics.getInstance()); - modules.add(ModuleChunkLoader.getInstance()); - modules.add(ModuleSeason.getInstance()); - modules.add(ModuleAgriculture.getInstance()); - modules.add(ModuleSandpit.getInstance()); - modules.add(ModuleFigure.getInstance()); + //Module + modules.add(ModuleStatistics.getInstance()); + modules.add(ModuleChest.getInstance()); + modules.add(ModuleChunkLoader.getInstance()); + modules.add(ModuleSeason.getInstance()); + modules.add(ModuleAgriculture.getInstance()); + modules.add(ModuleSandpit.getInstance()); + modules.add(ModuleHotSprings.getInstance()); + modules.add(ModuleFigure.getInstance()); - SSRecipes.deleteVanillaRecipe(); - SSRecipes.initRecipeLists(); + SSRecipes.deleteVanillaRecipe(); + SSRecipes.initRecipeLists(); - SextiarySectorAPI.playerManager = EntityPlayerManager.instance; + SextiarySectorAPI.playerManager = EntityPlayerManager.instance; - SSCreativeTabs.initCreativeTabs(); - SSFluids.initFluids(); - SSPotions.initPotions(); - SSItems.initItems(); - SSBlocks.initBlicks(); - SSEntitys.initEntity(); + SSCreativeTabs.initCreativeTabs(); + SSFluids.initFluids(); + SSPotions.initPotions(); + SSItems.initItems(); + SSBlocks.initBlicks(); + SSEntitys.initEntity(); - NetworkRegistry.INSTANCE.registerGuiHandler(this, new SSGuiHandler()); + NetworkRegistry.INSTANCE.registerGuiHandler(this, new SSGuiHandler()); - SSOreDictionary.init(); + SSOreDictionary.init(); - for(IModule m : modules){ - m.preInit(event); - } + for (IModule m : modules) { + m.preInit(event); + } - /* - GameRegistry.registerTileEntity(TileEmptyCauldron.class, "SSCauldron"); - Iterable> cc = new ArrayList(); - ((ArrayList) cc).add(ITileEntityProvider.class); - ExtendedClassSupport.loadAndGenerateNewExtendedClass(BlockCauldron.class, Block.class, BlockSSCauldron.class, ITileEntityProvider.class, cc); - */ - SSPlugins.initModHelper(); + /* + GameRegistry.registerTileEntity(TileEmptyCauldron.class, "SSCauldron"); + Iterable> cc = new ArrayList(); + ((ArrayList) cc).add(ITileEntityProvider.class); + ExtendedClassSupport.loadAndGenerateNewExtendedClass(BlockCauldron.class, Block.class, BlockSSCauldron.class, ITileEntityProvider.class, cc); + */ + SSPlugins.initModHelper(); - proxy.setPluginCustomRenderers(event); + proxy.setPluginCustomRenderers(event); - SSPlugins.prePlugins(event); + SSPlugins.prePlugins(event); - SSAchievement.initAchievements(); + SSAchievement.initAchievements(); } - @Mod.EventHandler - public void init(FMLInitializationEvent event) - { + @Mod.EventHandler + public void init(FMLInitializationEvent event) + { - SSWorld.init(event); + SSWorld.init(event); - if(event.getSide().isClient()){ + if (event.getSide().isClient()) { HUDMP.left_height += 10; } - SSRecipes.initRecipes(); - - - for(IModule m : modules){ - m.load(event); - } + SSRecipes.initRecipes(); - SSVillages.initVillages(); - - if(event.getSide().isClient())SSPlayerTabs.initRecipes(); + for (IModule m : modules) { + m.load(event); + } - //SSPlugins.initModHelper(); + SSVillages.initVillages(); - SSPlugins.initPlugins(event); + if (event.getSide().isClient()) SSPlayerTabs.initRecipes(); - } + //SSPlugins.initModHelper(); - @Mod.EventHandler - public void postInit(FMLPostInitializationEvent event) - { + SSPlugins.initPlugins(event); - SextiarySector.proxy.registerInventoryTabs(); - RecipesFurnaceCraft.addVanillaRecipes(); - SSFluids.postFluids(); - SSShops.initShops(); - SSShops.initPurchase(); + } - for(IModule m : modules){ - m.postInit(event); - } + @Mod.EventHandler + public void postInit(FMLPostInitializationEvent event) + { - SSPlugins.postPlugins(event); + SextiarySector.proxy.registerInventoryTabs(); + RecipesFurnaceCraft.addVanillaRecipes(); + SSFluids.postFluids(); + SSShops.initShops(); + SSShops.initPurchase(); - } + for (IModule m : modules) { + m.postInit(event); + } + SSPlugins.postPlugins(event); + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java b/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java new file mode 100644 index 0000000..4249c46 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java @@ -0,0 +1,282 @@ +package shift.sextiarysector.block; + +import java.math.BigDecimal; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityBoat; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import shift.sextiarysector.SSItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockBoardingBuoy extends BlockPoweredBuoy { + + //private final boolean powered; + + private IIcon[] blockIcons_a; + + public BlockBoardingBuoy() { + super(); + //this.powered = par2; + + } + + @Override + public int getLightValue(IBlockAccess world, int x, int y, int z) + { + if (world.getBlockMetadata(x, y, z) >= 8) { + return (int) (15.0F * 1.0f); + } + return 0; + } + + @Override + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + { + + if (par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() == SSItems.hammer) { + int i = par1World.getBlockMetadata(par2, par3, par4); + + if (this.ispowered(par1World, par2, par3, par4)) { + + if (i < 15) { + i += 1; + } else { + i = 8; + } + + } else { + + if (i < 7) { + i += 1; + } else { + i = 0; + } + + } + + par1World.setBlockMetadataWithNotify(par2, par3, par4, i, 1); + par1World.markBlockForUpdate(par2, par3, par4); + return true; + } + return false; + + } + + @Override + public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) + { + if (par1World.getBlockMetadata(par2, par3, par4) < 8) { + if (par5Entity instanceof EntityBoat) { + + double mX = par5Entity.motionX; + double mZ = par5Entity.motionZ; + + BigDecimal bdX = new BigDecimal(mX); + BigDecimal bdZ = new BigDecimal(mZ); + + //mX = Math.ceil(mX); + //mZ = Math.ceil(mZ); + + BigDecimal bdX2 = bdX.setScale(1, BigDecimal.ROUND_HALF_UP); + BigDecimal bdZ2 = bdZ.setScale(1, BigDecimal.ROUND_HALF_UP); + + mX = bdX2.doubleValue(); + mZ = bdZ2.doubleValue(); + + if (mX > 0) { + mX = mX - 0.1; + } + if (mX < 0) { + mX = mX + 0.1; + } + + if (mZ > 0) { + mZ = mZ - 0.1; + } + if (mZ < 0) { + mZ = mZ + 0.1; + } + + par5Entity.motionX = mX; + par5Entity.motionZ = mZ; + //par5Entity.motionY = 0; + + par5Entity.prevPosX = par2; + //par5Entity.prevPosY = par3; + par5Entity.prevPosZ = par4; + + return; + } + + } + + if (par5Entity instanceof EntityBoat) { + + int x = 0; + int z = 0; + + int y = 0; + + int i = par1World.getBlockMetadata(par2, par3, par4) - 8; + + switch (i) { + + /* + case 0 : z = -1; break; + case 1 : x = 1; break; + case 2 : z = 1; break; + case 3 : x = -1; break; + + case 4 : x = -1; z = -1 ; break; + case 5 : x = 1;z = -1 ; break; + case 6 : x = 1;z = 1 ; break; + case 7 : x = -1; z = 1 ; break; + */ + + case 0: + z = -1; + break; + case 2: + x = 1; + break; + case 4: + z = 1; + break; + case 6: + x = -1; + break; + + case 1: + x = 1; + z = -1; + break; + case 3: + x = 1; + z = 1; + break; + case 5: + x = -1; + z = 1; + break; + case 7: + x = -1; + z = -1; + break; + + //case 9 : y = 1;break; + + } + + par5Entity.motionX += x; + par5Entity.motionZ += z; + par5Entity.motionY += y; + //par5Entity.motionY += 1; + //par5Entity.motionZ += 1; + //moveFlying(1, 1, 1); + //par5Entity.setPositionAndRotation2(2,2,2,1,1,1); + } + + } + + @Override + public void onBlockAdded(World par1World, int par2, int par3, int par4) + { + if (!par1World.isRemote) + { + if (this.ispowered(par1World, par2, par3, par4) && !par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) + { + par1World.scheduleBlockUpdate(par2, par3, par4, this, 4); + } + else if (!this.ispowered(par1World, par2, par3, par4) && par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) + { + int i = par1World.getBlockMetadata(par2, par3, par4); + if (i <= 7) { + par1World.setBlock(par2, par3, par4, this, i + 8, 2); + } + + } + } + } + + @Override + public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, Block par5) + { + if (!par1World.isRemote) + { + if (this.ispowered(par1World, par2, par3, par4) && !par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) + { + par1World.scheduleBlockUpdate(par2, par3, par4, this, 4); + } + else if (!this.ispowered(par1World, par2, par3, par4) && par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) + { + int i = par1World.getBlockMetadata(par2, par3, par4); + if (i <= 7) { + par1World.setBlock(par2, par3, par4, this, i + 8, 2); + } + } + } + } + + @Override + public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) + { + if (!par1World.isRemote && this.ispowered(par1World, par2, par3, par4) && !par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) + { + int i = par1World.getBlockMetadata(par2, par3, par4); + if (i > 7) { + par1World.setBlock(par2, par3, par4, this, i - 8, 2); + } + } + } + + public boolean ispowered(World par1World, int par2, int par3, int par4) + { + return par1World.getBlockMetadata(par2, par3, par4) > 7; + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + { + return Item.getItemFromBlock(this); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(int par1, int par2) + { + if (par2 > 7) { + return blockIcons_a[par2 - 8]; + } + return blockIcons[par2]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) + { + blockIcons = new IIcon[8]; + blockIcons_a = new IIcon[8]; + + for (int i = 0; i < 8; i++) { + blockIcons[i] = par1IconRegister.registerIcon(this.getTextureName() + "_" + i); + + } + + for (int i = 0; i < 8; i++) { + blockIcons_a[i] = par1IconRegister.registerIcon(this.getTextureName() + "_" + i + "_active"); + + } + + this.blockIcon = par1IconRegister.registerIcon(this.getTextureName()); + + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockBuoyBase.java b/src/main/java/shift/sextiarysector/block/BlockBuoyBase.java new file mode 100644 index 0000000..3417c5e --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockBuoyBase.java @@ -0,0 +1,84 @@ +package shift.sextiarysector.block; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityBoat; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; +import shift.sextiarysector.api.SextiarySectorAPI; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockBuoyBase extends Block { + + public String itemIcon; + + public BlockBuoyBase() { + super(Material.plants); + //this.slipperiness = 2.6F; + this.setHardness(0.2f); + float f = 0.5F; + float f1 = 0.015625F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f); + this.setCreativeTab(SextiarySectorAPI.TabSSTransport); + //this.setCreativeTab(SextiarySector.tabsSextiarySector); + } + + @Override + public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) + { + return super.canPlaceBlockAt(par1World, par2, par3, par4) && canBlockStay(par1World, par2, par3, par4); + } + + @Override + public boolean isOpaqueCube() + { + return false; + } + + @Override + public boolean renderAsNormalBlock() + { + return false; + } + + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + return null; + } + + @Override + public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) + { + if (par7Entity == null || !(par7Entity instanceof EntityBoat)) + { + super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity); + } + } + + @Override + public boolean canBlockStay(World par1World, int par2, int par3, int par4) + { + return par3 >= 0 && par3 < 256 ? par1World.getBlock(par2, par3 - 1, par4).getMaterial() == Material.water && par1World.getBlockMetadata(par2, par3 - 1, par4) == 0 : false; + } + + @Override + public Block setBlockTextureName(String p_149658_1_) + { + this.textureName = p_149658_1_; + this.itemIcon = p_149658_1_; + return this; + } + + @Override + @SideOnly(Side.CLIENT) + public String getItemIconName() + { + return itemIcon; + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockDetectorBuoy.java b/src/main/java/shift/sextiarysector/block/BlockDetectorBuoy.java new file mode 100644 index 0000000..dfdc8dc --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockDetectorBuoy.java @@ -0,0 +1,169 @@ +package shift.sextiarysector.block; + +import java.util.List; +import java.util.Random; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityBoat; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockDetectorBuoy extends BlockBuoyBase { + + @SideOnly(Side.CLIENT) + private IIcon[] iconArray; + + private int ProvidePower; + + public BlockDetectorBuoy() { + super(); + this.setTickRandomly(true); + // TODO 自動生成されたコンストラクター・スタブ + } + + @Override + public int tickRate(World par1World) + { + return 20; + } + + @Override + public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) + { + if (!par1World.isRemote) + { + int l = par1World.getBlockMetadata(par2, par3, par4); + + if ((l & 8) == 0) + { + this.setStateIfMineboatInteractsWithRail(par1World, par2, par3, par4, l); + } + } + } + + /* + @Override + public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) + { + if(par5Entity instanceof EntityBoat){ + + par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 1); + System.out.println("kokodayo2"); + + } + + + } + */ + + @Override + public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) + { + if (!par1World.isRemote) + { + int l = par1World.getBlockMetadata(par2, par3, par4); + + if (l != 0) + { + this.setStateIfMineboatInteractsWithRail(par1World, par2, par3, par4, l); + + } + } + } + + private void setStateIfMineboatInteractsWithRail(World par1World, int par2, int par3, int par4, int par5) + { + boolean flag = (par5 & 8) != 0; + boolean flag1 = false; + float f = -0.125F; + List list = par1World.getEntitiesWithinAABB(EntityBoat.class, AxisAlignedBB.getBoundingBox(par2 + f, par3, par4 + f, par2 + 1 - f, par3 + 1 - f, par4 + 1 - f)); + + if (!list.isEmpty()) + { + flag1 = true; + } + + if (flag1 && !flag) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, par5 | 8, 3); + par1World.notifyBlocksOfNeighborChange(par2, par3, par4, this); + par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, this); + par1World.markBlockRangeForRenderUpdate(par2, par3, par4, par2, par3, par4); + } + + if (!flag1 && flag) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, par5 & 7, 3); + par1World.notifyBlocksOfNeighborChange(par2, par3, par4, this); + par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, this); + par1World.markBlockRangeForRenderUpdate(par2, par3, par4, par2, par3, par4); + } + + if (flag1) + { + par1World.scheduleBlockUpdate(par2, par3, par4, this, this.tickRate(par1World)); + } + + //par1World.setBlock(par2, par3, par4, this); + + } + + @Override + public void onBlockAdded(World par1World, int par2, int par3, int par4) + { + super.onBlockAdded(par1World, par2, par3, par4); + this.setStateIfMineboatInteractsWithRail(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4)); + } + + @Override + public boolean canProvidePower() + { + return true; + } + + @Override + public int isProvidingWeakPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + return (par1IBlockAccess.getBlockMetadata(par2, par3, par4) & 8) != 0 ? 15 : 0; + } + + @Override + public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + return (par1IBlockAccess.getBlockMetadata(par2, par3, par4) & 8) == 0 ? 0 : (par5 == 1 ? 15 : 0); + } + + /* + public int isProvidingWeakPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + return par1IBlockAccess.getBlockMetadata(par2, par3, par4) >=1 ? 15 : 0 ; + } + + public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + return par1IBlockAccess.getBlockMetadata(par2, par3, par4) >=1 ? 15 : 0 ; + } + */ + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.iconArray = new IIcon[2]; + this.iconArray[0] = par1IconRegister.registerIcon(this.textureName); + this.iconArray[1] = par1IconRegister.registerIcon(this.textureName + "_powered"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int par1, int par2) + { + return (par2 & 8) != 0 ? this.iconArray[1] : this.iconArray[0]; + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockHotSprings.java b/src/main/java/shift/sextiarysector/block/BlockHotSprings.java new file mode 100644 index 0000000..fd54cc4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockHotSprings.java @@ -0,0 +1,42 @@ +package shift.sextiarysector.block; + +import java.util.Random; + +import net.minecraft.world.World; +import net.minecraftforge.fluids.Fluid; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockHotSprings extends BlockSSFluid{ + + public BlockHotSprings(Fluid fluid) { + super(fluid); + } + + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) + { + + if (p_149734_1_.isAirBlock(p_149734_2_, p_149734_3_ + 1, p_149734_4_) && p_149734_5_.nextInt(3)==0) + { + + float f = (float)p_149734_2_ + 0.5F; + float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; + float f2 = (float)p_149734_4_ + 0.5F; + float f3 = 0.52F; + float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; + + + p_149734_1_.spawnParticle("explode", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.05D, 0.0D); + + p_149734_1_.spawnParticle("explode", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.05D, 0.0D); + + p_149734_1_.spawnParticle("explode", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.05D, 0.0D); + + p_149734_1_.spawnParticle("explode", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.05D, 0.0D); + + + } + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockPipe.java b/src/main/java/shift/sextiarysector/block/BlockPipe.java new file mode 100644 index 0000000..eefb496 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockPipe.java @@ -0,0 +1,40 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.tileentity.TileEntityPipe; + +public class BlockPipe extends BlockContainer { + + public BlockPipe() { + super(Material.iron); + this.setHardness(0.8F); + //this.setBlockBounds(0.0625f, 0.0f, 0.0625f, 0.9375f, 0.875f, 0.9375f); + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityPipe(); + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.pipeType; + } +} diff --git a/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java b/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java new file mode 100644 index 0000000..eaefac2 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java @@ -0,0 +1,188 @@ +package shift.sextiarysector.block; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityBoat; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import shift.sextiarysector.SSItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockPoweredBuoy extends BlockBuoyBase { + + protected IIcon blockIcons[]; + + public BlockPoweredBuoy() { + super(); + } + + @Override + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + { + + if (par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() == SSItems.hammer) { + int i = par1World.getBlockMetadata(par2, par3, par4); + if (i < 7) { + i += 1; + } else { + i = 0; + } + par1World.setBlockMetadataWithNotify(par2, par3, par4, i, 1); + par1World.markBlockForUpdate(par2, par3, par4); + return true; + } + return false; + + } + + /* + @Override + public void onBlockClicked(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer) + { + int i = par1World.getBlockMetadata(par2,par3,par4); + if(!(i>=9)){ + i += 1; + }else{ + i = 0; + } + + par1World.setBlockMetadataWithNotify(par2, par3, par4, i, 1); + }*/ + + @Override + public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) + { + if (par5Entity instanceof EntityBoat) { + + int x = 0; + int z = 0; + + int y = 0; + + int i = par1World.getBlockMetadata(par2, par3, par4); + + switch (i) { + + /* + case 1 : z = -1; break; + case 2 : x = 1; break; + case 3 : z = 1; break; + case 4 : x = -1; break; + + case 5 : x = -1; z = -1 ; break; + case 6 : x = 1;z = -1 ; break; + case 7 : x = 1;z = 1 ; break; + case 8 : x = -1; z = 1 ; break; + */ + + case 0: + z = -1; + break; + case 2: + x = 1; + break; + case 4: + z = 1; + break; + case 6: + x = -1; + break; + + case 1: + x = 1; + z = -1; + break; + case 3: + x = 1; + z = 1; + break; + case 5: + x = -1; + z = 1; + break; + case 7: + x = -1; + z = -1; + break; + + //case 9 : y = 1;break; + + } + + par5Entity.motionX += x; + par5Entity.motionZ += z; + par5Entity.motionY += y; + //par5Entity.motionY += 1; + //par5Entity.motionZ += 1; + //moveFlying(1, 1, 1); + //par5Entity.setPositionAndRotation2(2,2,2,1,1,1); + } + + } + + @Override + public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) + { + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + //TileEntityLargeFurnace tileEntity = (TileEntityLargeFurnace)par1World.getBlockTileEntity(par2, par3, par4); + + if (l == 0) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); + //tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[2]; + } + + if (l == 1) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 6, 2); + //tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[5]; + } + + if (l == 2) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 0, 2); + //tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[3]; + } + + if (l == 3) + { + par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); + //tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[4]; + } + + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(int par1, int par2) + { + /* + for(int i = 1;i<9;i++){ + if(par2==i){ + return blockIcons[i-1]; + } + }*/ + return blockIcons[par2]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) + { + blockIcons = new IIcon[8]; + + for (int i = 0; i < 8; i++) { + blockIcons[i] = par1IconRegister.registerIcon(this.getTextureName() + "_" + i); + + } + + this.blockIcon = par1IconRegister.registerIcon(this.getTextureName()); + + } + +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerMPRepair.java b/src/main/java/shift/sextiarysector/container/ContainerMPRepair.java new file mode 100644 index 0000000..f63f51c --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerMPRepair.java @@ -0,0 +1,589 @@ +package shift.sextiarysector.container; + +import java.util.Iterator; +import java.util.Map; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryBasic; +import net.minecraft.inventory.InventoryCraftResult; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeHooks; + +import org.apache.commons.lang3.StringUtils; + +import shift.mceconomy2.api.MCEconomyAPI; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ContainerMPRepair extends Container { + + /** Here comes out item you merged and/or renamed. */ + private final IInventory outputSlot = new InventoryCraftResult(); + /** The 2slots where you put your items in that you want to merge and/or rename. */ + private final IInventory inputSlots = new InventoryBasic("Repair", true, 2) + { + /** + * For tile entities, ensures the chunk containing the tile entity is saved to disk later - the game won't think + * it hasn't changed and skip it. + */ + @Override + public void markDirty() + { + super.markDirty(); + ContainerMPRepair.this.onCraftMatrixChanged(this); + } + }; + private World theWorld; + private int field_82861_i; + private int field_82858_j; + private int field_82859_k; + /** The maximum cost of repairing/renaming in the anvil. */ + public int maximumCost; + /** determined by damage of input item and stackSize of repair materials */ + public int stackSizeToBeUsedInRepair; + private String repairedItemName; + /** The player that has this container open. */ + private final EntityPlayer thePlayer; + + public ContainerMPRepair(InventoryPlayer p_i1800_1_, final World p_i1800_2_, final int p_i1800_3_, final int p_i1800_4_, final int p_i1800_5_, EntityPlayer p_i1800_6_) + { + super(); + this.theWorld = p_i1800_2_; + this.field_82861_i = p_i1800_3_; + this.field_82858_j = p_i1800_4_; + this.field_82859_k = p_i1800_5_; + this.thePlayer = p_i1800_6_; + this.addSlotToContainer(new Slot(this.inputSlots, 0, 27, 47)); + this.addSlotToContainer(new Slot(this.inputSlots, 1, 76, 47)); + this.addSlotToContainer(new Slot(this.outputSlot, 2, 134, 47) + { + private static final String __OBFID = "CL_00001734"; + + /** + * Check if the stack is a valid item for this slot. Always true beside for the armor slots. + */ + @Override + public boolean isItemValid(ItemStack p_75214_1_) + { + return false; + } + + /** + * Return whether this slot's stack can be taken from this slot. + */ + @Override + public boolean canTakeStack(EntityPlayer p_82869_1_) + { + return (p_82869_1_.capabilities.isCreativeMode || MCEconomyAPI.getPlayerMP(p_82869_1_) >= ContainerMPRepair.this.maximumCost) && ContainerMPRepair.this.maximumCost > 0 && this.getHasStack(); + } + + @Override + public void onPickupFromSlot(EntityPlayer p_82870_1_, ItemStack p_82870_2_) + { + if (!p_82870_1_.capabilities.isCreativeMode) + { + //p_82870_1_.addExperienceLevel(-ContainerMPRepair.this.maximumCost); + MCEconomyAPI.reducePlayerMP(p_82870_1_, ContainerMPRepair.this.maximumCost, false); + } + + float breakChance = ForgeHooks.onAnvilRepair(p_82870_1_, p_82870_2_, ContainerMPRepair.this.inputSlots.getStackInSlot(0), ContainerMPRepair.this.inputSlots.getStackInSlot(1)); + + ContainerMPRepair.this.inputSlots.setInventorySlotContents(0, (ItemStack) null); + + if (ContainerMPRepair.this.stackSizeToBeUsedInRepair > 0) + { + ItemStack itemstack1 = ContainerMPRepair.this.inputSlots.getStackInSlot(1); + + if (itemstack1 != null && itemstack1.stackSize > ContainerMPRepair.this.stackSizeToBeUsedInRepair) + { + itemstack1.stackSize -= ContainerMPRepair.this.stackSizeToBeUsedInRepair; + ContainerMPRepair.this.inputSlots.setInventorySlotContents(1, itemstack1); + } + else + { + ContainerMPRepair.this.inputSlots.setInventorySlotContents(1, (ItemStack) null); + } + } + else + { + ContainerMPRepair.this.inputSlots.setInventorySlotContents(1, (ItemStack) null); + } + + ContainerMPRepair.this.maximumCost = 0; + + if (!p_82870_1_.capabilities.isCreativeMode && !p_i1800_2_.isRemote && p_i1800_2_.getBlock(p_i1800_3_, p_i1800_4_, p_i1800_5_) == Blocks.anvil && p_82870_1_.getRNG().nextFloat() < breakChance) + { + int i1 = p_i1800_2_.getBlockMetadata(p_i1800_3_, p_i1800_4_, p_i1800_5_); + int k = i1 & 3; + int l = i1 >> 2; + ++l; + + if (l > 2) + { + p_i1800_2_.setBlockToAir(p_i1800_3_, p_i1800_4_, p_i1800_5_); + p_i1800_2_.playAuxSFX(1020, p_i1800_3_, p_i1800_4_, p_i1800_5_, 0); + } + else + { + p_i1800_2_.setBlockMetadataWithNotify(p_i1800_3_, p_i1800_4_, p_i1800_5_, k | l << 2, 2); + p_i1800_2_.playAuxSFX(1021, p_i1800_3_, p_i1800_4_, p_i1800_5_, 0); + } + } + else if (!p_i1800_2_.isRemote) + { + p_i1800_2_.playAuxSFX(1021, p_i1800_3_, p_i1800_4_, p_i1800_5_, 0); + } + } + }); + int i; + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(p_i1800_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(p_i1800_1_, i, 8 + i * 18, 142)); + } + } + + /** + * Callback for when the crafting matrix is changed. + */ + @Override + public void onCraftMatrixChanged(IInventory p_75130_1_) + { + super.onCraftMatrixChanged(p_75130_1_); + + if (p_75130_1_ == this.inputSlots) + { + this.updateRepairOutput(); + } + } + + /** + * called when the Anvil Input Slot changes, calculates the new result and puts it in the output slot + */ + public void updateRepairOutput() + { + ItemStack itemstack = this.inputSlots.getStackInSlot(0); + this.maximumCost = 0; + int i = 0; + byte b0 = 0; + int j = 0; + + if (itemstack == null) + { + this.outputSlot.setInventorySlotContents(0, (ItemStack) null); + this.maximumCost = 0; + } + else + { + ItemStack itemstack1 = itemstack.copy(); + ItemStack itemstack2 = this.inputSlots.getStackInSlot(1); + Map map = EnchantmentHelper.getEnchantments(itemstack1); + boolean flag = false; + int k2 = b0 + itemstack.getRepairCost() + (itemstack2 == null ? 0 : itemstack2.getRepairCost()); + this.stackSizeToBeUsedInRepair = 0; + int k; + int l; + int i1; + int k1; + int l1; + Iterator iterator1; + Enchantment enchantment; + + if (itemstack2 != null) + { + //if (!ForgeHooks.onAnvilChange(this, itemstack, itemstack2, outputSlot, repairedItemName, k2)) return; + flag = itemstack2.getItem() == Items.enchanted_book && Items.enchanted_book.func_92110_g(itemstack2).tagCount() > 0; + + if (itemstack1.isItemStackDamageable() && itemstack1.getItem().getIsRepairable(itemstack, itemstack2)) + { + k = Math.min(itemstack1.getItemDamageForDisplay(), itemstack1.getMaxDamage() / 4); + + if (k <= 0) + { + this.outputSlot.setInventorySlotContents(0, (ItemStack) null); + this.maximumCost = 0; + return; + } + + for (l = 0; k > 0 && l < itemstack2.stackSize; ++l) + { + i1 = itemstack1.getItemDamageForDisplay() - k; + itemstack1.setItemDamage(i1); + i += Math.max(1, k / 100) + map.size(); + k = Math.min(itemstack1.getItemDamageForDisplay(), itemstack1.getMaxDamage() / 4); + } + + this.stackSizeToBeUsedInRepair = l; + } + else + { + if (!flag && (itemstack1.getItem() != itemstack2.getItem() || !itemstack1.isItemStackDamageable())) + { + this.outputSlot.setInventorySlotContents(0, (ItemStack) null); + this.maximumCost = 0; + return; + } + + if (itemstack1.isItemStackDamageable() && !flag) + { + k = itemstack.getMaxDamage() - itemstack.getItemDamageForDisplay(); + l = itemstack2.getMaxDamage() - itemstack2.getItemDamageForDisplay(); + i1 = l + itemstack1.getMaxDamage() * 12 / 100; + int j1 = k + i1; + k1 = itemstack1.getMaxDamage() - j1; + + if (k1 < 0) + { + k1 = 0; + } + + if (k1 < itemstack1.getItemDamage()) + { + itemstack1.setItemDamage(k1); + i += Math.max(1, i1 / 100); + } + } + + Map map1 = EnchantmentHelper.getEnchantments(itemstack2); + iterator1 = map1.keySet().iterator(); + + while (iterator1.hasNext()) + { + i1 = ((Integer) iterator1.next()).intValue(); + enchantment = Enchantment.enchantmentsList[i1]; + k1 = map.containsKey(Integer.valueOf(i1)) ? ((Integer) map.get(Integer.valueOf(i1))).intValue() : 0; + l1 = ((Integer) map1.get(Integer.valueOf(i1))).intValue(); + int i3; + + if (k1 == l1) + { + ++l1; + i3 = l1; + } + else + { + i3 = Math.max(l1, k1); + } + + l1 = i3; + int i2 = l1 - k1; + boolean flag1 = enchantment.canApply(itemstack); + + if (this.thePlayer.capabilities.isCreativeMode || itemstack.getItem() == Items.enchanted_book) + { + flag1 = true; + } + + Iterator iterator = map.keySet().iterator(); + + while (iterator.hasNext()) + { + int j2 = ((Integer) iterator.next()).intValue(); + + if (j2 != i1 && !enchantment.canApplyTogether(Enchantment.enchantmentsList[j2])) + { + flag1 = false; + i += i2; + } + } + + if (flag1) + { + if (l1 > enchantment.getMaxLevel()) + { + l1 = enchantment.getMaxLevel(); + } + + map.put(Integer.valueOf(i1), Integer.valueOf(l1)); + int l2 = 0; + + switch (enchantment.getWeight()) + { + case 1: + l2 = 8; + break; + case 2: + l2 = 4; + case 3: + case 4: + case 6: + case 7: + case 8: + case 9: + default: + break; + case 5: + l2 = 2; + break; + case 10: + l2 = 1; + } + + if (flag) + { + l2 = Math.max(1, l2 / 2); + } + + i += l2 * i2; + } + } + } + } + + if (StringUtils.isBlank(this.repairedItemName)) + { + if (itemstack.hasDisplayName()) + { + j = itemstack.isItemStackDamageable() ? 7 : itemstack.stackSize * 5; + i += j; + itemstack1.func_135074_t(); + } + } + else if (!this.repairedItemName.equals(itemstack.getDisplayName())) + { + j = itemstack.isItemStackDamageable() ? 7 : itemstack.stackSize * 5; + i += j; + + if (itemstack.hasDisplayName()) + { + k2 += j / 2; + } + + itemstack1.setStackDisplayName(this.repairedItemName); + } + + k = 0; + + for (iterator1 = map.keySet().iterator(); iterator1.hasNext(); k2 += k + k1 * l1) + { + i1 = ((Integer) iterator1.next()).intValue(); + enchantment = Enchantment.enchantmentsList[i1]; + k1 = ((Integer) map.get(Integer.valueOf(i1))).intValue(); + l1 = 0; + ++k; + + switch (enchantment.getWeight()) + { + case 1: + l1 = 8; + break; + case 2: + l1 = 4; + case 3: + case 4: + case 6: + case 7: + case 8: + case 9: + default: + break; + case 5: + l1 = 2; + break; + case 10: + l1 = 1; + } + + if (flag) + { + l1 = Math.max(1, l1 / 2); + } + } + + if (flag) + { + k2 = Math.max(1, k2 / 2); + } + + if (flag && !itemstack1.getItem().isBookEnchantable(itemstack1, itemstack2)) itemstack1 = null; + + this.maximumCost = k2 + i; + this.maximumCost *= 100; + + if (i <= 0) + { + itemstack1 = null; + } + + if (j == i && j > 0 && this.maximumCost >= 10000) + { + this.maximumCost = 9999; + } + + if (this.maximumCost >= 10000 && !this.thePlayer.capabilities.isCreativeMode) + { + itemstack1 = null; + } + + if (itemstack1 != null) + { + l = itemstack1.getRepairCost(); + + if (itemstack2 != null && l < itemstack2.getRepairCost()) + { + l = itemstack2.getRepairCost(); + } + + if (itemstack1.hasDisplayName()) + { + l -= 9; + } + + if (l < 0) + { + l = 0; + } + + l += 2; + itemstack1.setRepairCost(l); + EnchantmentHelper.setEnchantments(map, itemstack1); + } + + this.outputSlot.setInventorySlotContents(0, itemstack1); + this.detectAndSendChanges(); + } + } + + @Override + public void addCraftingToCrafters(ICrafting p_75132_1_) + { + super.addCraftingToCrafters(p_75132_1_); + p_75132_1_.sendProgressBarUpdate(this, 0, this.maximumCost); + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int p_75137_1_, int p_75137_2_) + { + if (p_75137_1_ == 0) + { + this.maximumCost = p_75137_2_; + } + } + + /** + * Called when the container is closed. + */ + @Override + public void onContainerClosed(EntityPlayer p_75134_1_) + { + super.onContainerClosed(p_75134_1_); + + if (!this.theWorld.isRemote) + { + for (int i = 0; i < this.inputSlots.getSizeInventory(); ++i) + { + ItemStack itemstack = this.inputSlots.getStackInSlotOnClosing(i); + + if (itemstack != null) + { + p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); + } + } + } + } + + @Override + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return this.theWorld.getBlock(this.field_82861_i, this.field_82858_j, this.field_82859_k) != Blocks.anvil ? false : p_75145_1_.getDistanceSq(this.field_82861_i + 0.5D, this.field_82858_j + 0.5D, this.field_82859_k + 0.5D) <= 64.0D; + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ == 2) + { + if (!this.mergeItemStack(itemstack1, 3, 39, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (p_82846_2_ != 0 && p_82846_2_ != 1) + { + if (p_82846_2_ >= 3 && p_82846_2_ < 39 && !this.mergeItemStack(itemstack1, 0, 2, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 3, 39, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack) null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } + + /** + * used by the Anvil GUI to update the Item Name being typed by the player + */ + public void updateItemName(String p_82850_1_) + { + this.repairedItemName = p_82850_1_; + + if (this.getSlot(2).getHasStack()) + { + ItemStack itemstack = this.getSlot(2).getStack(); + + if (StringUtils.isBlank(p_82850_1_)) + { + itemstack.func_135074_t(); + } + else + { + itemstack.setStackDisplayName(this.repairedItemName); + } + } + + this.updateRepairOutput(); + } + +} diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 34f3ea7..8f44c7a 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -8,6 +8,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiIngameMenu; import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.IProgressMeter; import net.minecraft.client.gui.achievement.GuiAchievements; import net.minecraft.client.gui.achievement.GuiStats; import net.minecraft.client.renderer.Tessellator; @@ -87,8 +88,9 @@ public void onGuiOpenEvent(GuiOpenEvent event) { //System.out.println("GuiOpenEvent"); } - if(event.gui instanceof GuiAchievements){ + if(event.gui instanceof GuiAchievements && !(event.gui instanceof GuiAchievementsNext)){ + ((IProgressMeter)event.gui).func_146509_g(); GuiScreen gui = ObfuscationReflectionHelper.getPrivateValue(GuiAchievements.class, (GuiAchievements)event.gui, "field_146562_a"); event.gui = new GuiAchievementsNext(gui ,mc.thePlayer.getStatFileWriter()); diff --git a/src/main/java/shift/sextiarysector/event/HUDEventHandler.java b/src/main/java/shift/sextiarysector/event/HUDEventHandler.java index 815e6ea..2928aa2 100644 --- a/src/main/java/shift/sextiarysector/event/HUDEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/HUDEventHandler.java @@ -9,8 +9,6 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.GuiIngameForge; import net.minecraftforge.client.event.RenderGameOverlayEvent; -import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; -import net.minecraftforge.common.ForgeHooks; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.player.MoistureStats; import cpw.mods.fml.client.FMLClientHandler; @@ -25,27 +23,29 @@ public class HUDEventHandler { protected final Random rand = new Random(); - - private boolean ARMOR = false; + public static boolean visibleStamina = false; + public static boolean visibleMoisture = false; + //private boolean ARMOR = false; public static Minecraft mc = FMLClientHandler.instance().getClient(); //描写のEvent @SubscribeEvent - public void onRenderGameOverlayEvent(RenderGameOverlayEvent event) { + public void onRenderGameOverlayEventPre(RenderGameOverlayEvent.Pre event) { int width = event.resolution.getScaledWidth(); int height = event.resolution.getScaledHeight(); - if(event.type == ElementType.FOOD && mc.playerController.shouldDrawHUD()){ + /*if(event.type == ElementType.FOOD && mc.playerController.shouldDrawHUD()){ renderMoisture( width, height); renderStamina( width, height); //renderSeason( width, height); - } + }*/ + /* if(event.type == ElementType.ARMOR&&ForgeHooks.getTotalArmorValue(mc.thePlayer)>0){ //System.out.println("AIR"); @@ -58,26 +58,76 @@ public void onRenderGameOverlayEvent(RenderGameOverlayEvent event) { GuiIngameForge.left_height-=(left_height-29); ARMOR =true; } - } + }*/ + + if (event.type == RenderGameOverlayEvent.ElementType.ALL) + { + visibleStamina = GuiIngameForge.renderFood | GuiIngameForge.renderHealthMount | GuiIngameForge.renderHealth; + visibleMoisture = GuiIngameForge.renderFood | GuiIngameForge.renderHealthMount | GuiIngameForge.renderHealth; + } + else if (event.type == RenderGameOverlayEvent.ElementType.ARMOR) + { + if (visibleStamina) + { + renderStamina(width, height); + visibleStamina = false; + } + } + else if ((event.type == RenderGameOverlayEvent.ElementType.HOTBAR) && (mc.playerController.shouldDrawHUD())) + { + if (visibleMoisture) + { + renderMoisture(width, height); + visibleMoisture = false; + } + if (visibleStamina) + { + renderStamina(width, height); + visibleStamina = false; + } + } } - //アイテムテキストずらし @SubscribeEvent public void onRenderGameOverlayEventPost(RenderGameOverlayEvent.Post event) { + int width = event.resolution.getScaledWidth(); + int height = event.resolution.getScaledHeight(); + + if ((event.type == RenderGameOverlayEvent.ElementType.FOOD) || (event.type == RenderGameOverlayEvent.ElementType.HEALTHMOUNT)) + { + if (visibleMoisture) { + renderMoisture(width, height); + visibleMoisture = false; + } + if (visibleStamina) { + renderStamina(width, height); + visibleStamina = false; + } + } + + } + + //アイテムテキストずらし + //@SubscribeEvent + //public void onRenderGameOverlayEventPost(RenderGameOverlayEvent.Post event) { + /*if(event.type == ElementType.EXPERIENCE||event.type == ElementType.JUMPBAR){ }*/ - } + //} protected void renderMoisture(int width, int height) { + if(!visibleMoisture) return; + visibleMoisture = false; + //mc.thePlayer.addStat(StatList.distanceByBoatStat, 2); //System.out.println("StatList"); @@ -88,7 +138,10 @@ protected void renderMoisture(int width, int height) int updateCounter = mc.ingameGUI.getUpdateCounter()+2; int left = width / 2 + 91; - int top = height - right_height -10; + //int top = height - right_height -10; + int top = height - GuiIngameForge.right_height; + + GuiIngameForge.right_height += 10; //right_height += 10; boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic @@ -150,6 +203,9 @@ else if (idx == levelLast) protected void renderStamina(int width, int height) { + if(!visibleStamina) return; + visibleStamina = false; + mc.mcProfiler.startSection("stamina"); bind(icons); @@ -157,7 +213,8 @@ protected void renderStamina(int width, int height) int updateCounter = mc.ingameGUI.getUpdateCounter()+1; int left = width / 2 - 82; - int top = height - left_height -10; + int top = height - GuiIngameForge.left_height;//left_height -10; + GuiIngameForge.left_height += 10; //right_height += 10; boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic diff --git a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java index 2fe1252..42a9333 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java @@ -1,23 +1,37 @@ package shift.sextiarysector.event; +import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.MathHelper; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; -import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.AttackEntityEvent; import net.minecraftforge.event.entity.player.PlayerUseItemEvent; import net.minecraftforge.event.entity.player.PlayerWakeUpEvent; import net.minecraftforge.event.world.BlockEvent.BreakEvent; +import shift.sextiarysector.SSPotions; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.event.PlayerEatenEvent; +import shift.sextiarysector.module.ModuleHotSprings; import shift.sextiarysector.player.EntityPlayerManager; +import shift.sextiarysector.player.MoistureStats; +import shift.sextiarysector.player.StaminaStats; import cpw.mods.fml.common.eventhandler.SubscribeEvent; - +import cpw.mods.fml.common.gameevent.TickEvent; + +/*** + * + * プレイヤー関係のEvent + * + * @author Shift02 + * @SpecialThanks Furia + */ public class PlayerStatusEventHandler { /** 食べ物を食べた時の動作 */ @@ -62,7 +76,7 @@ public void onBlockBreakEvent(BreakEvent event) { @SubscribeEvent public void onLivingHurtEvent(LivingHurtEvent event) { - if (event.entityLiving.worldObj.isRemote|| !(event.entityLiving instanceof EntityPlayer)) { + if (event.entityLiving.worldObj.isRemote || !(event.entityLiving instanceof EntityPlayer)) { return; } @@ -76,7 +90,7 @@ public void onLivingHurtEvent(LivingHurtEvent event) { @SubscribeEvent public void onAttackEntityEvent(AttackEntityEvent event) { - if (event.entityLiving.worldObj.isRemote|| !(event.entityLiving instanceof EntityPlayer)) { + if (event.entityLiving.worldObj.isRemote || !(event.entityLiving instanceof EntityPlayer)) { return; } @@ -148,7 +162,6 @@ public void onBlockBreakEventS(BreakEvent event) { @SubscribeEvent public void onLivingHurtEvent2(LivingHurtEvent event) { - if (event.entityLiving.worldObj.isRemote || !(event.entityLiving instanceof EntityPlayer)) { return; } @@ -191,7 +204,7 @@ public void onLivingJump(LivingJumpEvent event) { @SubscribeEvent public void onAttackEntityEvent2(AttackEntityEvent event) { - if (event.entityLiving.worldObj.isRemote|| !(event.entityLiving instanceof EntityPlayer)) { + if (event.entityLiving.worldObj.isRemote || !(event.entityLiving instanceof EntityPlayer)) { return; } @@ -201,7 +214,6 @@ public void onAttackEntityEvent2(AttackEntityEvent event) { } - //ベットで回復 @SubscribeEvent public void LivingSleepingEvent(PlayerWakeUpEvent event) { @@ -216,10 +228,9 @@ public void LivingSleepingEvent(PlayerWakeUpEvent event) { if (!event.entityLiving.worldObj.isRemote) { - EntityPlayer player = (EntityPlayer) event.entityPlayer; - + EntityPlayer player = event.entityPlayer; - if (EntityPlayerManager.getMoistureStats(player).getMoistureLevel() > 4&& player.getFoodStats().getFoodLevel() > 4) { + if (EntityPlayerManager.getMoistureStats(player).getMoistureLevel() > 4 && player.getFoodStats().getFoodLevel() > 4) { EntityPlayerManager.getStaminaStats(player).addStats(100, 20.0f); } else { EntityPlayerManager.getStaminaStats(player).addStats(40, 0.0f); @@ -227,12 +238,132 @@ public void LivingSleepingEvent(PlayerWakeUpEvent event) { player.getFoodStats().addExhaustion(21.0f); SextiarySectorAPI.addMoistureExhaustion(player, 21.0f); + } + + } + + //Special Thanks ,Furia + @SubscribeEvent + public void playerUpdateEvent(TickEvent.PlayerTickEvent event) { + this.playerNoMoveEvent(event.player); + this.playerSittingEvent(event.player); + this.playerSpaEvent(event.player); + } + + private void playerNoMoveEvent(EntityPlayer player) { + + if (player.worldObj.getTotalWorldTime() % 120 != 0) return; + + if (!player.isSneaking()) return; + + StaminaStats stats = EntityPlayerManager.getStaminaStats(player); + if (stats == null) return; + + if (!stats.needStamina()) return; + + MoistureStats moistStats = EntityPlayerManager.getMoistureStats(player); + if (moistStats == null) return; + + if (moistStats.getMoistureLevel() < 10) + return; + + if (player.lastTickPosX == player.posX + && player.lastTickPosY == player.posY + && player.lastTickPosZ == player.posZ + && player.motionX == 0 + && player.motionY == 0 + && player.motionZ == 0) { + + stats.addStats(1, 0.1f); + moistStats.addExhaustion(0.8f); + player.addExhaustion(0.8f); + generateRandomParticles(player, "happyVillager"); + } + } + + private void playerSittingEvent(EntityPlayer player) { + + if (player.worldObj.getTotalWorldTime() % 70 != 0) + return; + + if (!player.isRiding()) return; + + StaminaStats stats = EntityPlayerManager.getStaminaStats(player); + if (stats == null) return; + + if (!stats.needStamina()) return; + + MoistureStats moistStats = EntityPlayerManager.getMoistureStats(player); + if (moistStats == null) return; + if (moistStats.getMoistureLevel() < 10) + return; + + if (player.lastTickPosX == player.posX + && player.lastTickPosY == player.posY + && player.lastTickPosZ == player.posZ + && player.motionX == 0 + && player.motionY == 0 + && player.motionZ == 0) { + + stats.addStats(1, 0.0f); + moistStats.addExhaustion(1.4f); + player.addExhaustion(0.05f); + this.generateRandomParticles(player, "happyVillager"); } } + private void playerSpaEvent(EntityPlayer player) { + + if (player.worldObj.getTotalWorldTime() % 200 != 0) + return; + + StaminaStats stats = EntityPlayerManager.getStaminaStats(player); + if (stats == null) + return; + + if (!stats.needStamina()) + return; + + //spaEffect + if (!player.isInWater()) + return; + + int i = MathHelper.floor_double(player.posX); + int j = MathHelper.floor_double(player.boundingBox.minY); + int k = MathHelper.floor_double(player.posZ); + + for (int offset = 0; offset <= 1; offset++) { + Block spaBlock = player.worldObj.getBlock(i, j + offset, k); + int meta = player.worldObj.getBlockMetadata(i, j + offset, k); + if (spaBlock == null) continue; + + if (ModuleHotSprings.isHotSprings(spaBlock, meta)) { + player.addPotionEffect(new PotionEffect(SSPotions.hotSprings.getId(), 400, 2)); + generateRandomParticles(player, "happyVillager"); + break; + } + } + } + + private void generateRandomParticles(EntityPlayer player, String particleName) + { + for (int i = 0; i < 5; ++i) + { + double d0 = player.getRNG().nextGaussian() * 0.02D; + double d1 = player.getRNG().nextGaussian() * 0.02D; + double d2 = player.getRNG().nextGaussian() * 0.02D; + player.worldObj.spawnParticle(particleName, + player.posX + player.getRNG().nextFloat() * player.width * 2.0F - player.width, + player.posY + 0.2D + player.getRNG().nextFloat() * player.height, + player.posZ + player.getRNG().nextFloat() * player.width * 2.0F - player.width, + d0, d1, d2); + } + } + /** スタミナのボーナス */ + /* @SubscribeEvent public void livingDashEvent(LivingUpdateEvent event) { @@ -263,8 +394,7 @@ public void livingDashEvent(LivingUpdateEvent event) { - } - + }*/ // ベットで回復 /*@SubscribeEvent diff --git a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java new file mode 100644 index 0000000..4466998 --- /dev/null +++ b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java @@ -0,0 +1,89 @@ +package shift.sextiarysector.event; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; +import net.minecraftforge.event.entity.living.LivingHurtEvent; +import shift.sextiarysector.SSItems; +import shift.sextiarysector.player.EntityPlayerManager; +import shift.sextiarysector.player.EquipmentStats; +import shift.sextiarysector.player.EquipmentType; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +public class PlayerUnitEventHandler { + + @SubscribeEvent + public void livingDashEvent(LivingUpdateEvent event) { + + //if (event.entityLiving.worldObj.isRemote) { + // return; + //} + + if (!(event.entityLiving instanceof EntityPlayer)) { + return; + } + + EntityPlayer player = (EntityPlayer) event.entityLiving; + + if (EntityPlayerManager.getStaminaStats(player).getStaminaLevel() < 5) { + + player.motionX *= 0.8; + //player.motionY *= 0.5; + player.motionZ *= 0.8; + + } else if (EntityPlayerManager.getStaminaStats(player).getStaminaLevel() >= 30 && player.isSprinting() && player.motionY == 0 && Math.abs(player.motionX) <= getMaxMove() && Math.abs(player.motionY) <= getMaxMove()) { + + player.motionX *= 1.6; + //player.motionY *= 1.4; + player.motionZ *= 1.6; + + } + + } + + public float getMaxMove() { + + return 2.4f; + + } + + @SubscribeEvent + public void playerAttackEvent(LivingHurtEvent event) { + + if (!(event.source.getEntity() instanceof EntityPlayer)) return; + + EquipmentStats e = EntityPlayerManager.getEquipmentStats((EntityPlayer) event.source.getEntity()); + + for (int i = 0; i < EquipmentType.Unit.getSlot().length; i++) { + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlot()[i]); + + if (item != null && item.getItem() != null && item.getItem() == SSItems.attackUnit) { + event.ammount++; + } + + } + + } + + @SubscribeEvent + public void playeDefenseEvent(LivingHurtEvent event) { + + if (!(event.entity instanceof EntityPlayer)) return; + + EquipmentStats e = EntityPlayerManager.getEquipmentStats((EntityPlayer) event.entity); + + for (int i = 0; i < EquipmentType.Unit.getSlot().length; i++) { + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlot()[i]); + + if (item != null && item.getItem() != null && item.getItem() == SSItems.defenseUnit) { + event.ammount--; + } + + } + + if (event.ammount < 0) { + event.ammount = 0; + } + + } +} diff --git a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java index 3a5a5cf..180f214 100644 --- a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java @@ -33,6 +33,7 @@ public class WorldEventHandler { private WorldGenMinable goldLarge; private WorldGenLakes springWater; + private WorldGenLakes hotSprings; private int chunk_X; private int chunk_Z; @@ -87,20 +88,39 @@ public void onOreGenEvent(OreGenEvent.Pre event) { @SubscribeEvent public void onPopulateChunkEvent(PopulateChunkEvent.Post event) { - if(event.world.rand.nextInt(32)!=0)return; + if(event.world.rand.nextInt(48)==0){ - this.randomGenerato = event.rand; - this.chunk_X = event.chunkX *16; - this.chunk_Z = event.chunkZ *16; - this.currentWorld = event.world; - this.biome = event.world.getBiomeGenForCoords(chunk_X +16, chunk_Z +16); + this.randomGenerato = event.rand; + this.chunk_X = event.chunkX *16; + this.chunk_Z = event.chunkZ *16; + this.currentWorld = event.world; + this.biome = event.world.getBiomeGenForCoords(chunk_X +16, chunk_Z +16); + + this.springWater = new WorldGenLakes(SSBlocks.drinkingWater); + if(BiomeDictionary.isBiomeOfType(biome, Type.FOREST)){ + this.genStandard(1, springWater, 60, 126); + + } + + } + + if(event.world.rand.nextInt(16)==0){ + + this.randomGenerato = event.rand; + this.chunk_X = event.chunkX *16; + this.chunk_Z = event.chunkZ *16; + this.currentWorld = event.world; + this.biome = event.world.getBiomeGenForCoords(chunk_X +16, chunk_Z +16); + + this.hotSprings = new WorldGenLakes(SSBlocks.hotSprings); + + this.genStandard(1, hotSprings, 20, 58); - this.springWater = new WorldGenLakes(SSBlocks.drinkingWater); - if(BiomeDictionary.isBiomeOfType(biome, Type.FOREST)){ - this.genStandard(1, springWater, 60, 126); } + + } @@ -122,6 +142,7 @@ protected void genStandard(int par1, WorldGenerator par2WorldGenerator, int par3 int i1 = this.chunk_X + this.randomGenerato.nextInt(16); int j1 = this.randomGenerato.nextInt(par4 - par3) + par3; int k1 = this.chunk_Z + this.randomGenerato.nextInt(16); + //if(par2WorldGenerator == this.hotSprings)System.out.println("AAA"+"x " +i1 +" z"+k1); if(par2WorldGenerator.generate(this.currentWorld, this.randomGenerato, i1, j1, k1)){ } diff --git a/src/main/java/shift/sextiarysector/gui/GuiAchievementsNext.java b/src/main/java/shift/sextiarysector/gui/GuiAchievementsNext.java index 6229917..8931637 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiAchievementsNext.java +++ b/src/main/java/shift/sextiarysector/gui/GuiAchievementsNext.java @@ -6,9 +6,10 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiLabel; import net.minecraft.client.gui.GuiOptionButton; import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.IProgressMeter; +import net.minecraft.client.gui.achievement.GuiAchievements; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.texture.TextureMap; @@ -30,7 +31,7 @@ import shift.sextiarysector.achievement.IAchievementIcon; -public class GuiAchievementsNext extends GuiScreen implements IProgressMeter{ +public class GuiAchievementsNext extends GuiAchievements{ private static final int field_146572_y = AchievementList.minDisplayColumn * 24 - 112; private static final int field_146571_z = AchievementList.minDisplayRow * 24 - 112; @@ -51,7 +52,7 @@ public class GuiAchievementsNext extends GuiScreen implements IProgressMeter{ protected double field_146573_x; private int field_146554_D; private StatFileWriter field_146556_E; - private boolean field_146558_F = true; + protected boolean progress = true; private int currentPage = -1; private GuiButton button; @@ -59,6 +60,7 @@ public class GuiAchievementsNext extends GuiScreen implements IProgressMeter{ public GuiAchievementsNext(GuiScreen p_i45026_1_, StatFileWriter p_i45026_2_) { + super(p_i45026_1_, p_i45026_2_); this.field_146562_a = p_i45026_1_; this.field_146556_E = p_i45026_2_; short short1 = 141; @@ -78,6 +80,7 @@ public GuiAchievementsNext(GuiScreen p_i45026_1_, StatFileWriter p_i45026_2_) /** * Adds the buttons (and other controls) to the screen in question. */ + @Override public void initGui() { this.mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS)); @@ -86,9 +89,10 @@ public void initGui() this.buttonList.add(button = new GuiButton(2, (width - field_146555_f) / 2 + 24, height / 2 + 74, 125, 20, AchievementPage.getTitle(currentPage))); } + @Override protected void actionPerformed(GuiButton p_146284_1_) { - if (!this.field_146558_F) + if (!this.progress) { if (p_146284_1_.id == 1) { @@ -110,6 +114,7 @@ protected void actionPerformed(GuiButton p_146284_1_) /** * Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e). */ + @Override protected void keyTyped(char p_73869_1_, int p_73869_2_) { if (p_73869_2_ == this.mc.gameSettings.keyBindInventory.getKeyCode()) @@ -119,16 +124,22 @@ protected void keyTyped(char p_73869_1_, int p_73869_2_) } else { - super.keyTyped(p_73869_1_, p_73869_2_); + if (p_73869_2_ == 1) + { + this.mc.displayGuiScreen((GuiScreen)null); + this.mc.setIngameFocus(); + } + } } /** * Draws the screen and all the components in it. */ + @Override public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) { - if (this.field_146558_F) + if (this.progress) { this.drawDefaultBackground(); this.drawCenteredString(this.fontRendererObj, I18n.format("multiplayer.downloadingStats", new Object[0]), this.width / 2, this.height / 2, 16777215); @@ -225,20 +236,22 @@ else if (k > 0) } } + @Override public void func_146509_g() { - if (this.field_146558_F) + if (this.progress) { - this.field_146558_F = false; + this.progress = false; } } /** * Called from the main game loop to update the screen. */ + @Override public void updateScreen() { - if (!this.field_146558_F) + if (!this.progress) { this.field_146569_s = this.field_146567_u; this.field_146568_t = this.field_146566_v; @@ -258,6 +271,7 @@ public void updateScreen() } } + @Override protected void func_146553_h() { int i = (this.width - this.field_146555_f) / 2; @@ -265,6 +279,7 @@ protected void func_146553_h() this.fontRendererObj.drawString(I18n.format("gui.achievements", new Object[0]), i + 15, j + 5, 4210752); } + @Override protected void func_146552_b(int p_146552_1_, int p_146552_2_, float p_146552_3_) { int k = MathHelper.floor_double(this.field_146569_s + (this.field_146567_u - this.field_146569_s) * (double)p_146552_3_); @@ -499,7 +514,7 @@ else if (i4 == 3) GL11.glDepthFunc(GL11.GL_LEQUAL); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_TEXTURE_2D); - super.drawScreen(p_146552_1_, p_146552_2_, p_146552_3_); + this.drawButton(p_146552_1_, p_146552_2_, p_146552_3_); if (achievement != null) { @@ -566,6 +581,21 @@ else if (i4 < 3) RenderHelper.disableStandardItemLighting(); } + public void drawButton(int p_73863_1_, int p_73863_2_, float p_73863_3_) + { + int k; + + for (k = 0; k < this.buttonList.size(); ++k) + { + ((GuiButton)this.buttonList.get(k)).drawButton(this.mc, p_73863_1_, p_73863_2_); + } + + for (k = 0; k < this.labelList.size(); ++k) + { + ((GuiLabel)this.labelList.get(k)).func_146159_a(this.mc, p_73863_1_, p_73863_2_); + } + } + private void setBrightness(int j2, int i3){ if(currentPage != -1 && AchievementPage.getAchievementPage(currentPage) instanceof IAchievementIcon){ @@ -631,7 +661,7 @@ else if (k3 > 0) */ public boolean doesGuiPauseGame() { - return !this.field_146558_F; + return !this.progress; } } diff --git a/src/main/java/shift/sextiarysector/gui/GuiMPRepair.java b/src/main/java/shift/sextiarysector/gui/GuiMPRepair.java new file mode 100644 index 0000000..1778657 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiMPRepair.java @@ -0,0 +1,223 @@ +package shift.sextiarysector.gui; + +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.network.play.client.C17PacketCustomPayload; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; + +import org.apache.commons.io.Charsets; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.container.ContainerMPRepair; + +public class GuiMPRepair extends GuiContainer implements ICrafting { + private static final ResourceLocation field_147093_u = new ResourceLocation("textures/gui/container/anvil.png"); + private final ContainerMPRepair field_147092_v; + private GuiTextField field_147091_w; + private final InventoryPlayer field_147094_x; + + public GuiMPRepair(InventoryPlayer p_i1073_1_, World p_i1073_2_, int p_i1073_3_, int p_i1073_4_, int p_i1073_5_) + { + super(new ContainerMPRepair(p_i1073_1_, p_i1073_2_, p_i1073_3_, p_i1073_4_, p_i1073_5_, Minecraft.getMinecraft().thePlayer)); + this.field_147094_x = p_i1073_1_; + this.field_147092_v = (ContainerMPRepair) this.inventorySlots; + } + + /** + * Adds the buttons (and other controls) to the screen in question. + */ + @Override + public void initGui() + { + super.initGui(); + Keyboard.enableRepeatEvents(true); + int i = (this.width - this.xSize) / 2; + int j = (this.height - this.ySize) / 2; + this.field_147091_w = new GuiTextField(this.fontRendererObj, i + 62, j + 24, 103, 12); + this.field_147091_w.setTextColor(-1); + this.field_147091_w.setDisabledTextColour(-1); + this.field_147091_w.setEnableBackgroundDrawing(false); + this.field_147091_w.setMaxStringLength(40); + this.inventorySlots.removeCraftingFromCrafters(this); + this.inventorySlots.addCraftingToCrafters(this); + } + + /** + * Called when the screen is unloaded. Used to disable keyboard repeat events + */ + @Override + public void onGuiClosed() + { + super.onGuiClosed(); + Keyboard.enableRepeatEvents(false); + this.inventorySlots.removeCraftingFromCrafters(this); + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + @Override + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_BLEND); + this.fontRendererObj.drawString(I18n.format("container.ss.repair", new Object[0]), 60, 6, 4210752); + + if (this.field_147092_v.maximumCost > 0) + { + int k = 8453920; + boolean flag = true; + String s = I18n.format("container.ss.repair.cost", new Object[] { Integer.valueOf(this.field_147092_v.maximumCost) }); + + if (this.field_147092_v.maximumCost >= 10000 && !this.mc.thePlayer.capabilities.isCreativeMode) + { + s = I18n.format("container.repair.expensive", new Object[0]); + k = 16736352; + } + else if (!this.field_147092_v.getSlot(2).getHasStack()) + { + flag = false; + } + else if (!this.field_147092_v.getSlot(2).canTakeStack(this.field_147094_x.player)) + { + k = 16736352; + } + + if (flag) + { + int l = -16777216 | (k & 16579836) >> 2 | k & -16777216; + int i1 = this.xSize - 8 - this.fontRendererObj.getStringWidth(s); + byte b0 = 67; + + if (this.fontRendererObj.getUnicodeFlag()) + { + drawRect(i1 - 3, b0 - 2, this.xSize - 7, b0 + 10, -16777216); + drawRect(i1 - 2, b0 - 1, this.xSize - 8, b0 + 9, -12895429); + } + else + { + this.fontRendererObj.drawString(s, i1, b0 + 1, l); + this.fontRendererObj.drawString(s, i1 + 1, b0, l); + this.fontRendererObj.drawString(s, i1 + 1, b0 + 1, l); + } + + this.fontRendererObj.drawString(s, i1, b0, k); + } + } + + GL11.glEnable(GL11.GL_LIGHTING); + } + + /** + * Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e). + */ + @Override + protected void keyTyped(char p_73869_1_, int p_73869_2_) + { + if (this.field_147091_w.textboxKeyTyped(p_73869_1_, p_73869_2_)) + { + this.func_147090_g(); + } + else + { + super.keyTyped(p_73869_1_, p_73869_2_); + } + } + + private void func_147090_g() + { + String s = this.field_147091_w.getText(); + Slot slot = this.field_147092_v.getSlot(0); + + if (slot != null && slot.getHasStack() && !slot.getStack().hasDisplayName() && s.equals(slot.getStack().getDisplayName())) + { + s = ""; + } + + this.field_147092_v.updateItemName(s); + this.mc.thePlayer.sendQueue.addToSendQueue(new C17PacketCustomPayload("MC|ItemName", s.getBytes(Charsets.UTF_8))); + } + + /** + * Called when the mouse is clicked. + */ + @Override + protected void mouseClicked(int p_73864_1_, int p_73864_2_, int p_73864_3_) + { + super.mouseClicked(p_73864_1_, p_73864_2_, p_73864_3_); + this.field_147091_w.mouseClicked(p_73864_1_, p_73864_2_, p_73864_3_); + } + + /** + * Draws the screen and all the components in it. + */ + @Override + public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) + { + super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_BLEND); + this.field_147091_w.drawTextBox(); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(field_147093_u); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + this.drawTexturedModalRect(k + 59, l + 20, 0, this.ySize + (this.field_147092_v.getSlot(0).getHasStack() ? 0 : 16), 110, 16); + + if ((this.field_147092_v.getSlot(0).getHasStack() || this.field_147092_v.getSlot(1).getHasStack()) && !this.field_147092_v.getSlot(2).getHasStack()) + { + this.drawTexturedModalRect(k + 99, l + 45, this.xSize, 0, 28, 21); + } + } + + @Override + public void sendContainerAndContentsToPlayer(Container p_71110_1_, List p_71110_2_) + { + this.sendSlotContents(p_71110_1_, 0, p_71110_1_.getSlot(0).getStack()); + } + + /** + * Sends the contents of an inventory slot to the client-side Container. This doesn't have to match the actual + * contents of that slot. Args: Container, slot number, slot contents + */ + @Override + public void sendSlotContents(Container p_71111_1_, int p_71111_2_, ItemStack p_71111_3_) + { + if (p_71111_2_ == 0) + { + this.field_147091_w.setText(p_71111_3_ == null ? "" : p_71111_3_.getDisplayName()); + this.field_147091_w.setEnabled(p_71111_3_ != null); + + if (p_71111_3_ != null) + { + this.func_147090_g(); + } + } + } + + /** + * Sends two ints to the client-side Container. Used for furnace burning time, smelting progress, brewing progress, + * and enchanting level. Normally the first int identifies which variable to update, and the second contains the new + * value. Both are truncated to shorts in non-local SMP. + */ + @Override + public void sendProgressBarUpdate(Container p_71112_1_, int p_71112_2_, int p_71112_3_) { + } +} diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockBuoyBase.java b/src/main/java/shift/sextiarysector/item/ItemBlockBuoyBase.java new file mode 100644 index 0000000..ebb7b49 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemBlockBuoyBase.java @@ -0,0 +1,152 @@ +package shift.sextiarysector.item; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.MovingObjectPosition.MovingObjectType; +import net.minecraft.world.World; + +public class ItemBlockBuoyBase extends ItemBlock { + + public ItemBlockBuoyBase(Block par1) { + super(par1); + + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); + + if (movingobjectposition == null) + { + return par1ItemStack; + } + else + { + if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) + { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!par2World.canMineBlock(par3EntityPlayer, i, j, k)) + { + return par1ItemStack; + } + + if (!par3EntityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, par1ItemStack)) + { + return par1ItemStack; + } + + if (par2World.getBlock(i, j, k).getMaterial() == Material.water && par2World.getBlockMetadata(i, j, k) == 0 && par2World.isAirBlock(i, j + 1, k)) + { + + int l = MathHelper.floor_double(par3EntityPlayer.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + int d = 0; + if (l == 0) { + d = 4; + } else if (l == 1) { + d = 6; + } else if (l == 2) { + d = 0; + } else if (l == 3) { + d = 2; + } + + par2World.setBlock(i, j + 1, k, this.field_150939_a); + par2World.setBlockMetadataWithNotify(i, j + 1, k, d, 2); + + if (!par3EntityPlayer.capabilities.isCreativeMode) + { + --par1ItemStack.stackSize; + } + } + } + + return par1ItemStack; + } + } + + /* + @Override + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) + { + int i1 = par3World.getBlock(par4, par5, par6); + + if (i1 == Block.snow.blockID && (par3World.getBlockMetadata(par4, par5, par6) & 7) < 1) + { + par7 = 1; + } + else if (i1 != Block.vine.blockID && i1 != Block.tallGrass.blockID && i1 != Block.deadBush.blockID + && (Block.blocksList[i1] == null || !Block.blocksList[i1].isBlockReplaceable(par3World, par4, par5, par6))) + { + if (par7 == 0) + { + --par5; + } + + if (par7 == 1) + { + ++par5; + } + + if (par7 == 2) + { + --par6; + } + + if (par7 == 3) + { + ++par6; + } + + if (par7 == 4) + { + --par4; + } + + if (par7 == 5) + { + ++par4; + } + } + + if (par1ItemStack.stackSize == 0) + { + return false; + } + else if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) + { + return false; + } + else if (par5 == 255 && Block.blocksList[this.blockID].blockMaterial.isSolid()) + { + return false; + } + else if (par3World.canPlaceEntityOnSide(this.blockID, par4, par5, par6, false, par7, par2EntityPlayer, par1ItemStack)) + { + Block block = Block.blocksList[this.blockID]; + int j1 = this.getMetadata(par1ItemStack.getItemDamage()); + int k1 = Block.blocksList[this.blockID].onBlockPlaced(par3World, par4, par5, par6, par7, par8, par9, par10, j1); + + if (placeBlockAt(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10, k1)) + { + par3World.playSoundEffect(par4 + 0.5F, par5 + 0.5F, par6 + 0.5F, block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); + --par1ItemStack.stackSize; + } + + return true; + } + else + { + return false; + } + }*/ + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemFullBottle.java b/src/main/java/shift/sextiarysector/item/ItemFullBottle.java new file mode 100644 index 0000000..1c27140 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemFullBottle.java @@ -0,0 +1,14 @@ +package shift.sextiarysector.item; + +import net.minecraft.item.Item; +import shift.sextiarysector.SSItems; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class ItemFullBottle extends Item { + + public ItemFullBottle() { + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + this.setContainerItem(SSItems.emptyBottle); + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemHammer.java b/src/main/java/shift/sextiarysector/item/ItemHammer.java index 8f01b59..95d9d7e 100644 --- a/src/main/java/shift/sextiarysector/item/ItemHammer.java +++ b/src/main/java/shift/sextiarysector/item/ItemHammer.java @@ -4,7 +4,25 @@ import net.minecraft.item.ItemStack; import shift.sextiarysector.api.machine.item.IHammer; -public class ItemHammer extends Item implements IHammer{ +public class ItemHammer extends Item implements IHammer { + + /* + @Override + public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) + { + Block block = p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_); + + if (block == Blocks.anvil) { + + if (p_77648_3_.isRemote) return true; + + p_77648_2_.openGui(SextiarySector.instance, 10, p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_); + return true; + + } + + return false; + }*/ @Override public boolean canUse(ItemStack item) { diff --git a/src/main/java/shift/sextiarysector/item/ItemHoverBoots.java b/src/main/java/shift/sextiarysector/item/ItemHoverBoots.java new file mode 100644 index 0000000..d755aa4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemHoverBoots.java @@ -0,0 +1,37 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.api.SextiarySectorAPI; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemHoverBoots extends ItemArmor { + + @SideOnly(Side.CLIENT) + private static net.minecraft.client.model.ModelBiped boots; + + public ItemHoverBoots() { + super(ArmorMaterial.DIAMOND, 0, 3); + this.setCreativeTab(SextiarySectorAPI.TabSSPlayer); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) + { + return "sextiarysector:textures/models/shift_hat.png"; + } + + @Override + @SideOnly(Side.CLIENT) + public net.minecraft.client.model.ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) + { + if (boots == null) { + boots = new net.minecraft.client.model.ModelBiped(); + } + + return boots; + } +} diff --git a/src/main/java/shift/sextiarysector/item/ItemSimpleBucket.java b/src/main/java/shift/sextiarysector/item/ItemSimpleBucket.java new file mode 100644 index 0000000..940b4a4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemSimpleBucket.java @@ -0,0 +1,15 @@ +package shift.sextiarysector.item; + +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class ItemSimpleBucket extends Item { + + public ItemSimpleBucket() { + this.maxStackSize = 1; + this.setCreativeTab(SextiarySectorAPI.TabSSFluid); + this.setContainerItem(Items.bucket); + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemUnit.java b/src/main/java/shift/sextiarysector/item/ItemUnit.java new file mode 100644 index 0000000..3fbfaec --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemUnit.java @@ -0,0 +1,25 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.api.IEquipment; +import shift.sextiarysector.player.EquipmentType; + +public class ItemUnit extends Item implements IEquipment { + + public ItemUnit() { + this.maxStackSize = 1; + } + + @Override + public boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return equipment.equals(EquipmentType.Unit); + } + + @Override + public boolean isItemValid(EquipmentType equipment, ItemStack stack) { + return equipment.equals(EquipmentType.Unit); + } + +} diff --git a/src/main/java/shift/sextiarysector/module/ModuleChest.java b/src/main/java/shift/sextiarysector/module/ModuleChest.java new file mode 100644 index 0000000..fbce23c --- /dev/null +++ b/src/main/java/shift/sextiarysector/module/ModuleChest.java @@ -0,0 +1,48 @@ +package shift.sextiarysector.module; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraftforge.common.ChestGenHooks; +import shift.sextiarysector.SSItems; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class ModuleChest implements IModule { + + private static ModuleChest instance; + + private ModuleChest() { + } + + public static ModuleChest getInstance() { + if (instance == null) { + instance = new ModuleChest(); + } + return instance; + } + + @Override + public void preInit(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void load(FMLInitializationEvent event) { + + ChestGenHooks pyramidDesertyChest = ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST); + pyramidDesertyChest.addItem(new WeightedRandomChestContent(new ItemStack(SSItems.attackRustUnit), 1, 1, 1)); + + ChestGenHooks pyramidJungleChest = ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST); + pyramidJungleChest.addItem(new WeightedRandomChestContent(new ItemStack(SSItems.defenseRustUnit), 1, 1, 1)); + + } + + @Override + public void postInit(FMLPostInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + +} diff --git a/src/main/java/shift/sextiarysector/module/ModuleFigure.java b/src/main/java/shift/sextiarysector/module/ModuleFigure.java index 8f6ea4a..da019df 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleFigure.java +++ b/src/main/java/shift/sextiarysector/module/ModuleFigure.java @@ -11,6 +11,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandom; import net.minecraft.world.World; +import shift.sextiarysector.SSBlocks; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -23,7 +24,7 @@ private ModuleFigure() { } public static ModuleFigure getInstance() { - if(instance==null){ + if (instance == null) { instance = new ModuleFigure(); } return instance; @@ -37,6 +38,7 @@ public void preInit(FMLPreInitializationEvent event) { @Override public void load(FMLInitializationEvent event) { + //フィギュア初心者 addFigure("figure_beginner", new ItemStack(Blocks.dirt), 50); addFigure("figure_beginner", new ItemStack(Blocks.clay), 40); addFigure("figure_beginner", new ItemStack(Blocks.fence), 22); @@ -50,6 +52,25 @@ public void load(FMLInitializationEvent event) { addFigure("figure_beginner", new ItemStack(Items.bone), 18); addFigure("figure_beginner", new ItemStack(Items.cake), 2); + //鉱石シリーズ + addFigure("ore_festival", new ItemStack(Blocks.stone), 50); + addFigure("ore_festival", new ItemStack(Blocks.cobblestone), 40); + addFigure("ore_festival", new ItemStack(Blocks.coal_ore), 30); + addFigure("ore_festival", new ItemStack(Blocks.iron_ore), 20); + addFigure("ore_festival", new ItemStack(Blocks.gold_ore), 16); + addFigure("ore_festival", new ItemStack(Blocks.lapis_ore), 10); + addFigure("ore_festival", new ItemStack(Blocks.redstone_ore), 8); + addFigure("ore_festival", new ItemStack(Blocks.diamond_ore), 2); + + //MOD + addFigure("ore_festival", new ItemStack(SSBlocks.zincOre), 10); + addFigure("ore_festival", new ItemStack(SSBlocks.copperOre), 20); + addFigure("ore_festival", new ItemStack(SSBlocks.silverOre), 14); + addFigure("ore_festival", new ItemStack(SSBlocks.blueStoneOre), 8); + addFigure("ore_festival", new ItemStack(SSBlocks.yellowStoneOre), 8); + addFigure("ore_festival", new ItemStack(SSBlocks.mithrilOre), 5); + addFigure("ore_festival", new ItemStack(SSBlocks.orichalcumOre), 1); + } @Override @@ -58,87 +79,88 @@ public void postInit(FMLPostInitializationEvent event) { } public static void addFigure(String edition, ItemStack seed, int weight) - { + { addFigure(edition, new FigureEntry(seed, weight)); - } + } - public static void addFigure(String edition, FigureEntry shellEntry){ - if(!figures.containsKey(edition)){ + public static void addFigure(String edition, FigureEntry shellEntry) { + if (!figures.containsKey(edition)) { figures.put(edition, new ArrayList()); } figures.get(edition).add(shellEntry); } public static class FigureEntry extends WeightedRandom.Item - { - public final ItemStack figure; - private float damage; - private boolean enchant; - - public FigureEntry(ItemStack seed, int weight) - { - super(weight); - this.figure = seed; - } - - public ItemStack addCustom(Random p_150708_1_) - { - ItemStack itemstack = this.figure.copy(); - - if (this.damage > 0.0F) - { - int i = (int)(this.damage * (float)this.figure.getMaxDamage()); - int j = itemstack.getMaxDamage() - p_150708_1_.nextInt(p_150708_1_.nextInt(i) + 1); - - if (j > i) - { - j = i; - } - - if (j < 1) - { - j = 1; - } - - itemstack.setItemDamage(j); - } - - if (this.enchant) - { - EnchantmentHelper.addRandomEnchantment(p_150708_1_, itemstack, 30); - } - - return itemstack; - } - - public FigureEntry setDamage(float p_150709_1_) - { - this.damage = p_150709_1_; - return this; - } - - public FigureEntry setEnchant() - { - this.enchant = true; - return this; - } - - } - public static final HashMap> figures = new HashMap>(); - - public static ItemStack getFigure(World world, String edition) - { - - if(!figures.containsKey(edition))return null; - - FigureEntry entry = (FigureEntry)WeightedRandom.getRandomItem(world.rand, figures.get(edition)); - if (entry == null || entry.figure == null) - { - return null; - } - - return entry.addCustom(world.rand); - - } + { + public final ItemStack figure; + private float damage; + private boolean enchant; + + public FigureEntry(ItemStack seed, int weight) + { + super(weight); + this.figure = seed; + } + + public ItemStack addCustom(Random p_150708_1_) + { + ItemStack itemstack = this.figure.copy(); + + if (this.damage > 0.0F) + { + int i = (int) (this.damage * this.figure.getMaxDamage()); + int j = itemstack.getMaxDamage() - p_150708_1_.nextInt(p_150708_1_.nextInt(i) + 1); + + if (j > i) + { + j = i; + } + + if (j < 1) + { + j = 1; + } + + itemstack.setItemDamage(j); + } + + if (this.enchant) + { + EnchantmentHelper.addRandomEnchantment(p_150708_1_, itemstack, 30); + } + + return itemstack; + } + + public FigureEntry setDamage(float p_150709_1_) + { + this.damage = p_150709_1_; + return this; + } + + public FigureEntry setEnchant() + { + this.enchant = true; + return this; + } + + } + + public static final HashMap> figures = new HashMap>(); + + public static ItemStack getFigure(World world, String edition) + { + + if (!figures.containsKey(edition)) return null; + + FigureEntry entry = (FigureEntry) WeightedRandom.getRandomItem(world.rand, figures.get(edition)); + if (entry == null || entry.figure == null) + { + return null; + } + + return entry.addCustom(world.rand); + + } } diff --git a/src/main/java/shift/sextiarysector/module/ModuleHotSprings.java b/src/main/java/shift/sextiarysector/module/ModuleHotSprings.java new file mode 100644 index 0000000..040cb2b --- /dev/null +++ b/src/main/java/shift/sextiarysector/module/ModuleHotSprings.java @@ -0,0 +1,77 @@ +package shift.sextiarysector.module; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import shift.sextiarysector.SSBlocks; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class ModuleHotSprings implements IModule { + + private static ModuleHotSprings instance; + + private ModuleHotSprings() { + } + + public static ModuleHotSprings getInstance() { + if (instance == null) { + instance = new ModuleHotSprings(); + } + return instance; + } + + public static List hotSpringsBlocks = new ArrayList(); + + @Override + public void preInit(FMLPreInitializationEvent event) { + + } + + @Override + public void load(FMLInitializationEvent event) { + + registerBlock(SSBlocks.hotSprings); + + } + + @Override + public void postInit(FMLPostInitializationEvent event) { + + } + + public static void registerBlock(Block block) { + + if (block == null) return; + registerBlock(new ItemStack(block, 1, OreDictionary.WILDCARD_VALUE)); + + } + + public static void registerBlock(ItemStack stack) { + + if (stack == null) return; + hotSpringsBlocks.add(stack); + + } + + public static boolean isHotSprings(Block block, int meta) { + + if (block == null) return false; + + for (ItemStack stack : hotSpringsBlocks) { + if (checkItem(block, meta, stack)) return true; + } + return false; + + } + + private static boolean checkItem(Block block, int meta, ItemStack p_151397_2_) + { + return p_151397_2_.getItem() == Item.getItemFromBlock(block) && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == meta); + } +} diff --git a/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java index 12e26d5..aa6244c 100644 --- a/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java +++ b/src/main/java/shift/sextiarysector/nei/SimpleFluidRecipeHandler.java @@ -24,214 +24,230 @@ import codechicken.nei.PositionedStack; import codechicken.nei.recipe.TemplateRecipeHandler; -public abstract class SimpleFluidRecipeHandler extends TemplateSSRecipeHandler { +public abstract class SimpleFluidRecipeHandler extends TemplateSSRecipeHandler { public class SimpleFluidPair extends CachedRecipe - { - public SimpleFluidPair(ItemStack ingred, ItemStack result, FluidStack fluidStack) - { - ingred.stackSize = 1; - this.ingred = new PositionedStack(ingred, 51, 6); - if(result!=null)this.result = new PositionedStack(result, 111 - 9, 24 + 18); - if(ingred.getItem().getContainerItem(ingred.copy())!=null){ - this.result2 = new PositionedStack(ingred.getItem().getContainerItem(ingred.copy()), 111 - 9 + 18, 24 + 18); - } - - this.fluidStack = fluidStack; - } - - public SimpleFluidPair(List ingred, ItemStack result, FluidStack fluidStack) - { - for(int i = 0;i ingred, ItemStack result, FluidStack fluidStack) + { + for (int i = 0; i < ingred.size(); i++) { + ingred.get(i).stackSize = 1; + } + //ingred.stackSize = 1; + this.ingred = new PositionedStack(ingred, 51, 6); + if (result != null) this.result = new PositionedStack(result, 111 - 9, 24 + 18); + for (ItemStack item : ingred) { + if (item.getItem().getContainerItem(item.copy()) != null) { + this.result2 = new PositionedStack(item.getItem().getContainerItem(item.copy()), 111 - 9 + 18, 24 + 18); + break; + } + } + this.fluidStack = fluidStack; + } + + @Override public PositionedStack getIngredient() - { - int cycle = cycleticks / 48; - /* - if(ingred.item.getItemDamage() == -1) - { - PositionedStack stack = ingred.copy(); - int maxDamage = 0; - do - { - maxDamage++; - stack.item.setItemDamage(maxDamage); - } - while(NEIClientUtils.isValidItem(stack.item)); - - stack.item.setItemDamage(cycle % maxDamage); - return stack; - }*/ - - this.randomRenderPermutation(ingred, cycleticks / 20); - - return ingred; - } - - @Override + { + int cycle = cycleticks / 48; + /* + if(ingred.item.getItemDamage() == -1) + { + PositionedStack stack = ingred.copy(); + int maxDamage = 0; + do + { + maxDamage++; + stack.item.setItemDamage(maxDamage); + } + while(NEIClientUtils.isValidItem(stack.item)); + + stack.item.setItemDamage(cycle % maxDamage); + return stack; + }*/ + + this.randomRenderPermutation(ingred, cycleticks / 20); + + return ingred; + } + + @Override public PositionedStack getResult() - { - return result; - } + { + return result; + } - public PositionedStack getOtherStack() { - return result2; - } + @Override + public PositionedStack getOtherStack() { + return result2; + } - /* - @Override + /* + @Override public PositionedStack getOtherStack() - { - return afuels.get((cycleticks/48) % afuels.size()).stack; - }*/ - - PositionedStack ingred; - PositionedStack result; - PositionedStack result2; - FluidStack fluidStack; - } + { + return afuels.get((cycleticks/48) % afuels.size()).stack; + }*/ + + PositionedStack ingred; + PositionedStack result; + PositionedStack result2; + FluidStack fluidStack; + } public PositionedStack getResult() { - return null; - } + return null; + } @Override - public String getOverlayIdentifier() { - return getHandlerName(); - } + public String getOverlayIdentifier() { + return getHandlerName(); + } @Override public void loadTransferRects() { - transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(74, 23, 24, 18), getHandlerName())); + transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(74, 23, 24, 18), getHandlerName())); } @Override - public void loadCraftingRecipes(String outputId, Object... results) - { - if(outputId.equals(getHandlerName()) && getClass() == getHandlerClass())//don't want subclasses getting a hold of this - { - HashMap recipes = (HashMap) getRecipe().getOreList(); - HashMap metarecipes = (HashMap) getRecipe().getMetaList(); - - - for(Entry recipe : recipes.entrySet()) - { - ItemStack item = (ItemStack) recipe.getValue()[0]; - if(OreDictionary.getOres(recipe.getKey()).size()>=1){ - arecipes.add(new SimpleFluidPair(OreDictionary.getOres(recipe.getKey()), item, (FluidStack)recipe.getValue()[1])); - } - - } - - if(metarecipes == null)return; - for(Entry recipe : metarecipes.entrySet()) - { - ItemStack item = (ItemStack) recipe.getValue()[0]; - arecipes.add(new SimpleFluidPair(recipe.getKey(), item, (FluidStack)recipe.getValue()[1])); - } - } - else - { - super.loadCraftingRecipes(outputId, results); - } - } + public void loadCraftingRecipes(String outputId, Object... results) + { + if (outputId.equals(getHandlerName()) && getClass() == getHandlerClass())//don't want subclasses getting a hold of this + { + HashMap recipes = (HashMap) getRecipe().getOreList(); + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + for (Entry recipe : recipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + if (OreDictionary.getOres(recipe.getKey()).size() >= 1) { + arecipes.add(new SimpleFluidPair(OreDictionary.getOres(recipe.getKey()), item, (FluidStack) recipe.getValue()[1])); + } + + } + + if (metarecipes == null) return; + for (Entry recipe : metarecipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + arecipes.add(new SimpleFluidPair(recipe.getKey(), item, (FluidStack) recipe.getValue()[1])); + } + } + else + { + super.loadCraftingRecipes(outputId, results); + } + } @Override - public void loadCraftingRecipes(ItemStack result) - { + public void loadCraftingRecipes(ItemStack result) + { HashMap recipes = (HashMap) getRecipe().getOreList(); - HashMap metarecipes = (HashMap) getRecipe().getMetaList(); - - for(Entry recipe : recipes.entrySet()) - { - ItemStack item = (ItemStack) recipe.getValue()[0]; - if(NEIServerUtils.areStacksSameType(item, result)) - { - if(OreDictionary.getOres(recipe.getKey()).size()>=1){ - arecipes.add(new SimpleFluidPair(OreDictionary.getOres(recipe.getKey()), item, (FluidStack)recipe.getValue()[1])); - } - - } - } - - if(metarecipes == null)return; - for(Entry recipe : metarecipes.entrySet()) - { - ItemStack item = (ItemStack) recipe.getValue()[0]; - if(NEIServerUtils.areStacksSameType(item, result)) - { - arecipes.add(new SimpleFluidPair(recipe.getKey(), item, (FluidStack)recipe.getValue()[1])); - } - } - } + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + for (Entry recipe : recipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + if (NEIServerUtils.areStacksSameType(item, result)) + { + if (OreDictionary.getOres(recipe.getKey()).size() >= 1) { + arecipes.add(new SimpleFluidPair(OreDictionary.getOres(recipe.getKey()), item, (FluidStack) recipe.getValue()[1])); + } + + } + } + + if (metarecipes == null) return; + for (Entry recipe : metarecipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + if (NEIServerUtils.areStacksSameType(item, result)) + { + arecipes.add(new SimpleFluidPair(recipe.getKey(), item, (FluidStack) recipe.getValue()[1])); + } + } + } @Override - public void loadUsageRecipes(ItemStack ingredient) - { + public void loadUsageRecipes(ItemStack ingredient) + { HashMap recipes = (HashMap) getRecipe().getOreList(); - HashMap metarecipes = (HashMap) getRecipe().getMetaList(); - - for(Entry recipe : recipes.entrySet()) - { - ItemStack item = (ItemStack) recipe.getValue()[0]; - ArrayList items = OreDictionary.getOres(recipe.getKey()); - for(int i = 0; i< items.size() ; i++){ - if(this.checkItem(items.get(i),ingredient)){ - arecipes.add(new SimpleFluidPair(items, item, (FluidStack)recipe.getValue()[1])); - break; - } - } - } - - if(metarecipes == null)return; - for(Entry recipe : metarecipes.entrySet()) - { - ItemStack item = (ItemStack) recipe.getValue()[0]; - //if(ingredient.itemID == recipe.getKey().get(0) && ingredient.getItemDamage() == recipe.getKey().get(1)) - if(this.checkItem(ingredient, recipe.getKey())) - { - arecipes.add(new SimpleFluidPair(ingredient, item, (FluidStack)recipe.getValue()[1])); - } - } - } + HashMap metarecipes = (HashMap) getRecipe().getMetaList(); + + /* + for (Entry recipe : recipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + ArrayList items = OreDictionary.getOres(recipe.getKey()); + for (int i = 0; i < items.size(); i++) { + if (this.checkItem(items.get(i), ingredient)) { + arecipes.add(new SimpleFluidPair(items, item, (FluidStack) recipe.getValue()[1])); + break; + } + } + }*/ + + for (String key : recipes.keySet()) { + ArrayList items = OreDictionary.getOres(key); + for (int i = 0; i < items.size(); i++) { + if (this.checkItem(ingredient, items.get(i))) { + arecipes.add(new SimpleFluidPair(items, (ItemStack) recipes.get(key)[0], (FluidStack) recipes.get(key)[1])); + break; + } + } + } + + if (metarecipes == null) return; + for (Entry recipe : metarecipes.entrySet()) + { + ItemStack item = (ItemStack) recipe.getValue()[0]; + //if(ingredient.itemID == recipe.getKey().get(0) && ingredient.getItemDamage() == recipe.getKey().get(1)) + if (this.checkItem(ingredient, recipe.getKey())) + { + arecipes.add(new SimpleFluidPair(ingredient, item, (FluidStack) recipe.getValue()[1])); + } + } + } private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) - { - return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); - } + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == OreDictionary.WILDCARD_VALUE || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } @Override - public void drawExtras(int recipe) - { - drawProgressBar(52, 25, 176, 0, 14, 14, 48, 7); - drawProgressBar(74, 23, 176, 14, 24, 16, 48, 0); + public void drawExtras(int recipe) + { + drawProgressBar(52, 25, 176, 0, 14, 14, 48, 7); + drawProgressBar(74, 23, 176, 14, 24, 16, 48, 0); - if(((SimpleFluidPair)this.arecipes.get(recipe)).fluidStack != null){ - this.drawFluidTank(102,4,((SimpleFluidPair)this.arecipes.get(recipe)).fluidStack,34,36); - } + if (((SimpleFluidPair) this.arecipes.get(recipe)).fluidStack != null) { + this.drawFluidTank(102, 4, ((SimpleFluidPair) this.arecipes.get(recipe)).fluidStack, 34, 36); + } - changeTexture(getGuiTexture()); - drawTexturedModalRect(103,6, 176, 31, 32, 36); + changeTexture(getGuiTexture()); + drawTexturedModalRect(103, 6, 176, 31, 32, 36); - } + } public void drawFluidTank(int x, int y, FluidStack fluidStack, int width, int height) { - ResourceLocation r; - if(fluidStack.getFluid().getSpriteNumber()==0){ + if (fluidStack.getFluid().getSpriteNumber() == 0) { r = TextureMap.locationBlocksTexture; - }else{ + } else { r = TextureMap.locationItemsTexture; } @@ -239,9 +255,9 @@ public void drawFluidTank(int x, int y, FluidStack fluidStack, int width, int he this.setColor3ubFromInt(fluidStack.getFluid().getColor(fluidStack)); int widthR = width;//*(fluidTank.getFluidAmount()/fluidTank.getCapacity()); - int heightR = (int) (width*((float)fluidStack.amount/(float)this.getMaxFluid())); + int heightR = (int) (width * ((float) fluidStack.amount / (float) this.getMaxFluid())); - int yR = y+(height-heightR); + int yR = y + (height - heightR); int widthL = 0; int heightL = 0; @@ -268,13 +284,14 @@ public static void setColor3ubFromInt(int color) { } - public List drawTooltip(int recipe, int offsetx, int offsety, List currenttip){ + @Override + public List drawTooltip(int recipe, int offsetx, int offsety, List currenttip) { - if(((SimpleFluidPair)this.arecipes.get(recipe)).fluidStack == null)return currenttip; + if (((SimpleFluidPair) this.arecipes.get(recipe)).fluidStack == null) return currenttip; - if(42 drawTooltip(int recipe, int offsetx, int offsety, List getHandlerClass(); + abstract String getHandlerName(); + abstract RecipeSimpleFluid getRecipe(); + abstract String getGuiRecipeName(); + + @Override public abstract Class getGuiClass(); + abstract int getMaxFluid(); @Override public String getRecipeName() { - return I18n.format("nei."+getGuiRecipeName()); + return I18n.format("nei." + getGuiRecipeName()); } } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java b/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java index acf2de8..a038bfb 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginAppleMilk.java @@ -4,6 +4,7 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.block.BlockSandpit; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -14,6 +15,7 @@ public class PluginAppleMilk implements IPlugin { public static Item chalcedonyKnife; + public static Item clam; public static Item princessClam; @Override @@ -26,21 +28,22 @@ public void prePlugin(FMLPreInitializationEvent event) { public void initPlugin(FMLInitializationEvent event) { this.chalcedonyKnife = GameRegistry.findItem("DCsAppleMilk", "defeatedcrow.chalcedonyKnife"); - princessClam = GameRegistry.findItem("DCsAppleMilk", "defeatedcrow.princessClam"); + this.clam = GameRegistry.findItem("DCsAppleMilk", "defeatedcrow.clam"); + this.princessClam = GameRegistry.findItem("DCsAppleMilk", "defeatedcrow.princessClam"); - OreDictionary.registerOre("craftingToolWireCutter", new ItemStack(chalcedonyKnife,1,OreDictionary.WILDCARD_VALUE)); - OreDictionary.registerOre("craftingToolKnife", new ItemStack(chalcedonyKnife,1,OreDictionary.WILDCARD_VALUE)); + OreDictionary.registerOre("craftingToolWireCutter", new ItemStack(chalcedonyKnife, 1, OreDictionary.WILDCARD_VALUE)); + OreDictionary.registerOre("craftingToolKnife", new ItemStack(chalcedonyKnife, 1, OreDictionary.WILDCARD_VALUE)); - OreDictionary.registerOre("craftingMagic", new ItemStack(princessClam,1, 0)); + OreDictionary.registerOre("craftingMagic", new ItemStack(princessClam, 1, 0)); - SSRecipes.magicFuel.add(new ItemStack(princessClam,1, 0), 3200); + SSRecipes.magicFuel.add(new ItemStack(princessClam, 1, 0), 3200); } @Override public void postPlugin(FMLPostInitializationEvent event) { - + BlockSandpit.addShell(new ItemStack(clam, 1, 0), 14); } @@ -55,5 +58,4 @@ public void preClientPlugin(FMLPreInitializationEvent event) { } - } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java b/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java index 24395bb..5bdd94b 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java @@ -7,6 +7,7 @@ import net.minecraftforge.oredict.OreDictionary; import shift.sextiarysector.SSFluids; import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.module.ModuleFigure; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -14,11 +15,12 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class PluginCleaver implements IPlugin { +public class PluginCleaver implements IPlugin { public static Item itemCleaverNormal; public static Item itemCleaverBlaze; public static Item itemCleaverSoul; + public static Item itemCleaverOgre; @Override public void prePlugin(FMLPreInitializationEvent event) { @@ -29,20 +31,25 @@ public void prePlugin(FMLPreInitializationEvent event) { public void initPlugin(FMLInitializationEvent event) { this.itemCleaverNormal = GameRegistry.findItem("schr0.cleaver", "itemCleaverNormal"); - + this.itemCleaverBlaze = GameRegistry.findItem("schr0.cleaver", "itemCleaverBlaze"); this.itemCleaverSoul = GameRegistry.findItem("schr0.cleaver", "itemCleaverSoul"); + this.itemCleaverOgre = GameRegistry.findItem("schr0.cleaver", "itemCleaverOgre"); - OreDictionary.registerOre("craftingToolWireCutter", new ItemStack(itemCleaverNormal,1,0)); - OreDictionary.registerOre("craftingToolKnife", new ItemStack(itemCleaverNormal,1,0)); + OreDictionary.registerOre("craftingToolWireCutter", new ItemStack(itemCleaverNormal, 1, 0)); + OreDictionary.registerOre("craftingToolKnife", new ItemStack(itemCleaverNormal, 1, 0)); - SSRecipes.fluidFurnace.add(new ItemStack(this.itemCleaverNormal,1), new ItemStack(Items.stick,1), new FluidStack(SSFluids.iron, 3500)); - SSRecipes.magicFuel.add(new ItemStack(this.itemCleaverSoul,1), 3200); + SSRecipes.fluidFurnace.add(new ItemStack(this.itemCleaverNormal, 1), new ItemStack(Items.stick, 1), new FluidStack(SSFluids.iron, 3500)); + SSRecipes.magicFuel.add(new ItemStack(this.itemCleaverSoul, 1), 3200); } @Override public void postPlugin(FMLPostInitializationEvent event) { - // TODO 自動生成されたメソッド・スタブ + + ModuleFigure.addFigure("schr0_cleaver", new ItemStack(itemCleaverNormal, 1), 20); + ModuleFigure.addFigure("schr0_cleaver", new ItemStack(itemCleaverBlaze, 1), 20); + ModuleFigure.addFigure("schr0_cleaver", new ItemStack(itemCleaverSoul, 1), 20); + ModuleFigure.addFigure("schr0_cleaver", new ItemStack(itemCleaverOgre, 1), 20); } diff --git a/src/main/java/shift/sextiarysector/potion/PotionHotSprings.java b/src/main/java/shift/sextiarysector/potion/PotionHotSprings.java new file mode 100644 index 0000000..d25a421 --- /dev/null +++ b/src/main/java/shift/sextiarysector/potion/PotionHotSprings.java @@ -0,0 +1,46 @@ +package shift.sextiarysector.potion; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import shift.sextiarysector.player.EntityPlayerManager; +import shift.sextiarysector.player.MoistureStats; +import shift.sextiarysector.player.StaminaStats; + +public class PotionHotSprings extends PotionSS { + + public PotionHotSprings(int id, boolean isBadEffect, int liquidColor, int icon) { + super(id, isBadEffect, liquidColor, icon); + } + + @Override + public void performEffect(EntityLivingBase p_76394_1_, int p_76394_2_) + { + + if (!(p_76394_1_ instanceof EntityPlayer)) return; + + EntityPlayer player = (EntityPlayer) p_76394_1_; + + if (player.worldObj.getTotalWorldTime() % 60 != 0) + return; + + StaminaStats stats = EntityPlayerManager.getStaminaStats(player); + if (stats == null) return; + + if (!stats.needStamina()) return; + + MoistureStats moistStats = EntityPlayerManager.getMoistureStats(player); + if (moistStats == null) return; + + if (moistStats.getMoistureLevel() < 3) return; + + stats.addStats(3, 0.7f); + moistStats.addExhaustion(1.9f); + + } + + @Override + public boolean isReady(int p_76397_1_, int amplifier) + { + return p_76397_1_ % (5 - Math.min(4, amplifier)) == 0; + } +} diff --git a/src/main/java/shift/sextiarysector/potion/PotionSS.java b/src/main/java/shift/sextiarysector/potion/PotionSS.java index 247e0f4..2c6fd18 100644 --- a/src/main/java/shift/sextiarysector/potion/PotionSS.java +++ b/src/main/java/shift/sextiarysector/potion/PotionSS.java @@ -6,29 +6,30 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class PotionSS extends Potion{ +public class PotionSS extends Potion { protected static final ResourceLocation field_147001_a = new ResourceLocation("sextiarysector:textures/guis/potion.png"); - private int iconID; + private final int iconID; - public PotionSS(int p_i1573_1_, boolean p_i1573_2_, int p_i1573_3_, int icon) { - super(p_i1573_1_, p_i1573_2_, p_i1573_3_); + public PotionSS(int id, boolean isBadEffect, int liquidColor, int icon) { + super(id, isBadEffect, liquidColor); this.iconID = icon; } - @SideOnly(Side.CLIENT) - public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc) { + @Override + @SideOnly(Side.CLIENT) + public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc) { - mc.getTextureManager().bindTexture(field_147001_a); - mc.currentScreen.drawTexturedModalRect(x + 6, y + 7, (iconID%14)*18,(iconID/14)*18,18,18); + mc.getTextureManager().bindTexture(field_147001_a); + mc.currentScreen.drawTexturedModalRect(x + 6, y + 7, (iconID % 14) * 18, (iconID / 14) * 18, 18, 18); - } - - @SideOnly(Side.CLIENT) - public boolean hasStatusIcon() - { - return false; - } + } + @Override + @SideOnly(Side.CLIENT) + public boolean hasStatusIcon() + { + return false; + } } diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 4514b62..56dffb7 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -25,6 +25,7 @@ import shift.sextiarysector.renderer.block.RendererHole; import shift.sextiarysector.renderer.block.RendererMonitor; import shift.sextiarysector.renderer.block.RendererPaddy; +import shift.sextiarysector.renderer.block.RendererPipe; import shift.sextiarysector.renderer.block.RendererSaw; import shift.sextiarysector.renderer.block.RendererShaft; import shift.sextiarysector.renderer.block.RendererSmallWaterwheel; @@ -42,6 +43,7 @@ import shift.sextiarysector.tileentity.TileEntityFluidCrafter; import shift.sextiarysector.tileentity.TileEntityGearShaft; import shift.sextiarysector.tileentity.TileEntityMonitor; +import shift.sextiarysector.tileentity.TileEntityPipe; import shift.sextiarysector.tileentity.TileEntitySSChest; import shift.sextiarysector.tileentity.TileEntitySaw; import shift.sextiarysector.tileentity.TileEntityShaft; @@ -56,13 +58,13 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ClientProxy extends CommonProxy{ +public class ClientProxy extends CommonProxy { @SideOnly(Side.CLIENT) public shift.sextiarysector.renderer.model.ModelShiftHat model = new shift.sextiarysector.renderer.model.ModelShiftHat(); @Override - public EntityPlayer getClientPlayer(){ + public EntityPlayer getClientPlayer() { return Minecraft.getMinecraft().thePlayer; } @@ -79,6 +81,8 @@ public void setCustomRenderers() { this.woodHopperType = RenderingRegistry.getNextAvailableRenderId(); + this.pipeType = RenderingRegistry.getNextAvailableRenderId(); + this.ShaftRenderType = RenderingRegistry.getNextAvailableRenderId(); this.GearShaftRenderType = RenderingRegistry.getNextAvailableRenderId(); @@ -111,6 +115,8 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererWoodHopper()); + RenderingRegistry.registerBlockHandler(new RendererPipe()); + RenderingRegistry.registerBlockHandler(new RendererShaft()); RenderingRegistry.registerBlockHandler(new RendererGearShaft()); @@ -131,7 +137,6 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererPaddy()); RenderingRegistry.registerBlockHandler(new RendererWood()); - this.setCustomClientRenderers(); } @@ -147,6 +152,8 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySquare.class, new RendererSquare()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPipe.class, new RendererPipe()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFigure.class, new RendererFigure()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFluidCrafter.class, new RendererFluidCrafter()); @@ -161,12 +168,11 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFan.class, new RendererFan()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySaw.class, new RendererSaw()); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySSChest.class, new RendererChest()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMonitor.class, new RendererMonitor()); RenderingRegistry.registerEntityRenderingHandler(EntityMineboatChest.class, new RenderMineboat()); - RenderingRegistry.registerEntityRenderingHandler(EntityMineboat.class, new RenderMineboat()); + RenderingRegistry.registerEntityRenderingHandler(EntityMineboat.class, new RenderMineboat()); } @@ -175,26 +181,28 @@ public void registerItemRenderer(Item item) { MinecraftForgeClient.registerItemRenderer(item, new RenderGF()); } - public void openGUI(int id){ + @Override + public void openGUI(int id) { PacketHandler.INSTANCE.sendToServer(new PacketGuiId(id)); } + @Override public void registerInventoryTabs() - { + { /* - if (!Loader.isModLoaded("TConstruct") || TabRegistry.getTabList().size() < 3) - { - TabRegistry.registerTab(new InventoryTabVanilla()); - } - - TabRegistry.registerTab(new InventoryTabSextiarysector()); - TabRegistry.registerTab(new InventoryTabSextiarysector()); - TabRegistry.registerTab(new InventoryTabSextiarysector()); - TabRegistry.registerTab(new InventoryTabSextiarysector()); - TabRegistry.registerTab(new InventoryTabSextiarysector()); - TabRegistry.registerTab(new InventoryTabSextiarysector()); - TabRegistry.registerTab(new InventoryTabSextiarysector()); - */ + if (!Loader.isModLoaded("TConstruct") || TabRegistry.getTabList().size() < 3) + { + TabRegistry.registerTab(new InventoryTabVanilla()); + } + + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + TabRegistry.registerTab(new InventoryTabSextiarysector()); + */ TabManager.initTabManager(); //TabManager.registerTab(new InventoryTabEquipment()); //TabManager.registerTab(new InventoryTabEquipment()); @@ -203,12 +211,13 @@ public void registerInventoryTabs() //TabManager.registerTab(new InventoryTabEquipment()); //TabManager.registerTab(new InventoryTabEquipment()); - } + } + @Override public void setPluginCustomRenderers(FMLPreInitializationEvent event) - { + { - for(IPlugin p : SSPlugins.plugins) + for (IPlugin p : SSPlugins.plugins) { try { @@ -216,16 +225,16 @@ public void setPluginCustomRenderers(FMLPreInitializationEvent event) } catch (Exception e) { - SextiarySector.Log.log(Level.WARN, p.getModName() +" integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.log(Level.WARN, p.getModName() + " integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); SextiarySector.Log.catching(e); } } + } - } - - public Object getShiftHat(){ + @Override + public Object getShiftHat() { return model; } diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 53618f7..e5191a1 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -15,6 +15,8 @@ public class CommonProxy { public int woodHopperType; + public int pipeType; + public int ShaftRenderType; public int GearShaftRenderType; @@ -35,8 +37,7 @@ public class CommonProxy { public int paddyType; public int woodType; - - public EntityPlayer getClientPlayer(){ + public EntityPlayer getClientPlayer() { return null; } @@ -47,23 +48,22 @@ public void registerItemRenderer(Item item) { } - public void openGUI(int id){ + public void openGUI(int id) { } public void registerInventoryTabs() - { + { - } + } public void setPluginCustomRenderers(FMLPreInitializationEvent event) - { + { - } + } - public Object getShiftHat(){ + public Object getShiftHat() { return null; } - } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java index 03968b2..8334bd7 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java @@ -12,107 +12,104 @@ public class RecipeSimpleFluid { - protected final HashMap metaSimpleMachineList = new HashMap(); protected final HashMap oreSimpleMachineList = new HashMap(); public void add(ItemStack par1ItemStack, ItemStack par2ItemStack, FluidStack par3FluidStack) - { - metaSimpleMachineList.put(par1ItemStack, new Object[]{par2ItemStack,par3FluidStack}); - } + { + metaSimpleMachineList.put(par1ItemStack, new Object[] { par2ItemStack, par3FluidStack }); + } public void add(String par1String, ItemStack par2ItemStack, FluidStack par3FluidStack) - { - oreSimpleMachineList.put(par1String, new Object[]{par2ItemStack,par3FluidStack}); - } + { + oreSimpleMachineList.put(par1String, new Object[] { par2ItemStack, par3FluidStack }); + } public ItemStack getResult(ItemStack item) - { - if (item == null) - { - return null; - } - for (String key : oreSimpleMachineList.keySet()) { - ArrayList items = OreDictionary.getOres(key); - for(int i = 0; i< items.size() ; i++){ - if(checkItem(item,items.get(i))){ - if((ItemStack) oreSimpleMachineList.get(key)[0] == null)return null; - return ((ItemStack) oreSimpleMachineList.get(key)[0]).copy(); - } - } - } - - Iterator iterator = this.metaSimpleMachineList.entrySet().iterator(); - Entry entry; - - do - { - if (!iterator.hasNext()) - { - return null; - } - - entry = (Entry)iterator.next(); - } - while (!this.checkItem(item, (ItemStack)entry.getKey())); - - if(((ItemStack) ((Object[])entry.getValue())[0]) == null)return null; - - return ((ItemStack) ((Object[])entry.getValue())[0]).copy(); - - //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); - } + { + if (item == null) + { + return null; + } + for (String key : oreSimpleMachineList.keySet()) { + ArrayList items = OreDictionary.getOres(key); + for (int i = 0; i < items.size(); i++) { + if (checkItem(item, items.get(i))) { + if (oreSimpleMachineList.get(key)[0] == null) return null; + return ((ItemStack) (oreSimpleMachineList.get(key)[0])).copy(); + } + } + } + + Iterator iterator = this.metaSimpleMachineList.entrySet().iterator(); + Entry entry; + + do + { + if (!iterator.hasNext()) + { + return null; + } + + entry = (Entry) iterator.next(); + } while (!this.checkItem(item, (ItemStack) entry.getKey())); + + if (((ItemStack) ((Object[]) entry.getValue())[0]) == null) return null; + + return ((ItemStack) ((Object[]) entry.getValue())[0]).copy(); + + //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); + } public FluidStack getFluidResult(ItemStack item) - { - if (item == null) - { - return null; - } - for (String key : oreSimpleMachineList.keySet()) { - ArrayList items = OreDictionary.getOres(key); - for(int i = 0; i< items.size() ; i++){ - if(checkItem(item,items.get(i))){ - if((FluidStack) oreSimpleMachineList.get(key)[1] == null)return null; - return ((FluidStack) oreSimpleMachineList.get(key)[1]).copy(); - } - } - } - - Iterator iterator = this.metaSimpleMachineList.entrySet().iterator(); - Entry entry; - - do - { - if (!iterator.hasNext()) - { - return null; - } - - entry = (Entry)iterator.next(); - } - while (!this.checkItem(item, (ItemStack)entry.getKey())); - - if((FluidStack) ((Object[])entry.getValue())[1] == null)return null; - - return ((FluidStack) ((Object[])entry.getValue())[1]).copy(); - - //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); - } + { + if (item == null) + { + return null; + } + for (String key : oreSimpleMachineList.keySet()) { + ArrayList items = OreDictionary.getOres(key); + for (int i = 0; i < items.size(); i++) { + if (checkItem(item, items.get(i))) { + if ((FluidStack) oreSimpleMachineList.get(key)[1] == null) return null; + return ((FluidStack) oreSimpleMachineList.get(key)[1]).copy(); + } + } + } + + Iterator iterator = this.metaSimpleMachineList.entrySet().iterator(); + Entry entry; + + do + { + if (!iterator.hasNext()) + { + return null; + } + + entry = (Entry) iterator.next(); + } while (!this.checkItem(item, (ItemStack) entry.getKey())); + + if ((FluidStack) ((Object[]) entry.getValue())[1] == null) return null; + + return ((FluidStack) ((Object[]) entry.getValue())[1]).copy(); + + //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); + } private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) - { - return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); - } + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == OreDictionary.WILDCARD_VALUE || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } public Map getMetaList() - { - return metaSimpleMachineList; - } + { + return metaSimpleMachineList; + } public Map getOreList() - { - return oreSimpleMachineList; - } + { + return oreSimpleMachineList; + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index 21c1fd8..6ffbff1 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -5,73 +5,88 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SSItems; public class RecipesCore { public static void addRecipes(CraftingManager p_77608_1_) - { - - p_77608_1_.addRecipe(new ItemStack(SSItems.calendar, 1), - new Object[] { - " y ", "yxy", " y ", - 'x', Items.redstone, - 'y', Items.paper, - }); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.emptyBottle, 4), - new Object[] { - "x", "x", - 'x', "paneGlassColorless", - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.smallCloth, 1), - new Object[] { - "xx", "xx", - 'x', "craftingString", - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.stringBobbin, 1), - new Object[] { - "xxx", "xyx", "xxx", - 'x', Items.string, - 'y', "stickWood", - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.fleshBobbin, 1), - new Object[] { - "xxx", "xyx", "xxx", - 'x', SSItems.dryingFlesh, - 'y', "stickWood", - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.woodHopper, 1), - new Object[] { - "y y", "yxy", " y ", - 'x', Blocks.chest, - 'y', "plateWood", - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.square, 1), - new Object[] { - "x x","x x", "xxx", - 'x', "plateWood", - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.rucksack, 1), - new Object[] { - "xxx","x x", "xxx", - 'x', SSItems.cloth, - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.mineboatChest, 1), - new Object[] { - "x", "y", - 'x', Blocks.chest, - 'y', Items.boat, - })); - - } + { + + p_77608_1_.addRecipe(new ItemStack(SSItems.calendar, 1), + new Object[] { + " y ", "yxy", " y ", + 'x', Items.redstone, + 'y', Items.paper, + }); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.emptyBottle, 4), + new Object[] { + "x", "x", + 'x', "paneGlassColorless", + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.smallCloth, 1), + new Object[] { + "xx", "xx", + 'x', "craftingString", + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.stringBobbin, 1), + new Object[] { + "xxx", "xyx", "xxx", + 'x', Items.string, + 'y', "stickWood", + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.fleshBobbin, 1), + new Object[] { + "xxx", "xyx", "xxx", + 'x', SSItems.dryingFlesh, + 'y', "stickWood", + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.woodHopper, 1), + new Object[] { + "y y", "yxy", " y ", + 'x', Blocks.chest, + 'y', "plateWood", + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.square, 1), + new Object[] { + "x x", "x x", "xxx", + 'x', "plateWood", + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.rucksack, 1), + new Object[] { + "xxx", "x x", "xxx", + 'x', SSItems.cloth, + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.mineboatChest, 1), + new Object[] { + "x", "y", + 'x', Blocks.chest, + 'y', Items.boat, + })); + + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(Items.string, 1), + new Object[] { + "craftingSmallCloth", + "craftingToolKnife" + })); + + //料理 + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(SSItems.riceBall, 1), + new Object[] { + "condimentSalt", + "cookingRice", + "cookingLaver" + })); + + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java index 408838c..954157e 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFluidFurnace.java @@ -10,31 +10,30 @@ public class RecipesFluidFurnace { public static void addRecipes(RecipeSimpleFluid recipe) - { + { //recipe.add(new ItemStack(Blocks.netherrack,1),null, new FluidStack(SSFluids.drinkingWater, 50)); - recipe.add(new ItemStack(Items.water_bucket,1),new ItemStack(Items.stick, 1), new FluidStack(SSFluids.drinkingWater, 1000)); + recipe.add(new ItemStack(Items.water_bucket, 1), new ItemStack(Items.stick, 1), new FluidStack(SSFluids.drinkingWater, 1000)); - recipe.add(new ItemStack(Items.rotten_flesh,1),new ItemStack(SSItems.dryingFlesh, 1), new FluidStack(FluidRegistry.WATER, 500)); + recipe.add(new ItemStack(Items.rotten_flesh, 1), new ItemStack(SSItems.dryingFlesh, 1), new FluidStack(FluidRegistry.WATER, 500)); - recipe.add(new ItemStack(Items.iron_door,1), null, new FluidStack(SSFluids.iron, 5000)); - recipe.add(new ItemStack(Items.iron_ingot,1), null, new FluidStack(SSFluids.iron, 1000)); - recipe.add(new ItemStack(Items.iron_axe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 2500)); - recipe.add(new ItemStack(Items.iron_hoe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 1500)); - recipe.add(new ItemStack(Items.iron_pickaxe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 2500)); - recipe.add(new ItemStack(Items.iron_shovel,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 500)); - recipe.add(new ItemStack(Items.iron_sword,1), new ItemStack(Items.stick, 1), new FluidStack(SSFluids.iron, 1500)); + recipe.add(new ItemStack(Items.iron_door, 1), null, new FluidStack(SSFluids.iron, 5000)); + recipe.add(new ItemStack(Items.iron_ingot, 1), null, new FluidStack(SSFluids.iron, 1000)); + recipe.add(new ItemStack(Items.iron_axe, 1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 2500)); + recipe.add(new ItemStack(Items.iron_hoe, 1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 1500)); + recipe.add(new ItemStack(Items.iron_pickaxe, 1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 2500)); + recipe.add(new ItemStack(Items.iron_shovel, 1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.iron, 500)); + recipe.add(new ItemStack(Items.iron_sword, 1), new ItemStack(Items.stick, 1), new FluidStack(SSFluids.iron, 1500)); + recipe.add(new ItemStack(Items.gold_ingot, 1), null, new FluidStack(SSFluids.gold, 1000)); + recipe.add(new ItemStack(Items.golden_axe, 1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 2500)); + recipe.add(new ItemStack(Items.golden_hoe, 1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 1500)); + recipe.add(new ItemStack(Items.golden_pickaxe, 1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 2500)); + recipe.add(new ItemStack(Items.golden_shovel, 1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 500)); + recipe.add(new ItemStack(Items.golden_sword, 1), new ItemStack(Items.stick, 1), new FluidStack(SSFluids.gold, 1500)); - recipe.add(new ItemStack(Items.gold_ingot,1), null, new FluidStack(SSFluids.gold, 1000)); - recipe.add(new ItemStack(Items.golden_axe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 2500)); - recipe.add(new ItemStack(Items.golden_hoe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 1500)); - recipe.add(new ItemStack(Items.golden_pickaxe,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 2500)); - recipe.add(new ItemStack(Items.golden_shovel,1), new ItemStack(Items.stick, 2), new FluidStack(SSFluids.gold, 500)); - recipe.add(new ItemStack(Items.golden_sword,1), new ItemStack(Items.stick, 1), new FluidStack(SSFluids.gold, 1500)); + recipe.add("logWood", new ItemStack(Items.coal, 1, 1), new FluidStack(SSFluids.sap, 500)); - - - } + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index 988d9d6..68cb2ab 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -14,11 +14,10 @@ import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockMonitor.MonitorType; - public class RecipesFurnaceCraft { public static void addRecipes(FurnaceCraftingManager p_77608_1_) - { + { //飲み物 //p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.drinkingWaterBottle, 1), @@ -29,193 +28,243 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) //スライム p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.slime_ball, 2), new Object[] { - SSItems.dustWaterLily, - "condimentSugar", - Items.water_bucket, - })); + SSItems.dustWaterLily, + "condimentSugar", + "fluidWater", + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.slime_ball, 2), + new Object[] { + "condimentSugar", + "condimentSugar", + "condimentSalt", + "fluidSap", + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.slime_ball, 2), + new Object[] { + "algaLaver", + "algaLaver", + "condimentSalt", + "fluidWater", + })); p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.drinkingWaterBottle, 2), new Object[] { - SSItems.emptyBottle, - SSItems.emptyBottle, - SSItems.waterBottle, - })); + SSItems.emptyBottle, + SSItems.emptyBottle, + SSItems.waterBottle, + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.chocolate, 1), + new Object[] { + "condimentSugar", + "condimentSugar", + "condimentSugar", + "condimentCocoa", + })); p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.blueStoneSlimeBall, 1), new Object[] { - "dustBluestone", - Items.slime_ball - })); + "dustBluestone", + Items.slime_ball + })); p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.steelIngot, 1), new Object[] { - "dustCoal", - "dustIron" - })); + "dustCoal", + "dustIron" + })); p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.brassIngot, 1), new Object[] { - "dustCopper", - "dustCopper", - "dustZinc" - })); - + "dustCopper", + "dustCopper", + "dustZinc" + })); p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.ninjaIngot, 1), new Object[] { - "dustMithril", - "dustDiamond" - })); + "dustMithril", + "dustDiamond" + })); p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.unit, 1), - new Object[] { "xxx", "xyx","xxx", - Character.valueOf('y'), SSItems.blueStoneSlimeBall, - Character.valueOf('x'), "cobblestone", - })); + new Object[] { "xxx", "xyx", "xxx", + Character.valueOf('y'), SSItems.blueStoneSlimeBall, + Character.valueOf('x'), "cobblestone", + })); p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.emptyBottle, 8), - new Object[] { - "x", "x", - 'x', "paneGlassColorless", - })); + new Object[] { + "x", "x", + 'x', "paneGlassColorless", + })); p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.orichalcumGem, 1), - new Object[] { - "xyb", "aza", "byx", - 'x', "ingotBrass", - 'y', "ingotSilver", - 'z', "craftingMagic", - 'a', "ingotMithril", - 'b', "ingotGold" - })); + new Object[] { + "xyb", "aza", "byx", + 'x', "ingotBrass", + 'y', "ingotSilver", + 'z', "craftingMagic", + 'a', "ingotMithril", + 'b', "ingotGold" + })); //Hammer - p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.hammer, 1), - new Object[] { "xxx", " y "," y ", - Character.valueOf('x'), "ingotIron", - Character.valueOf('y'), "stickWood", - })); - - //鉄のリング - p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.ironRing, 1), - new Object[] { " x ", "x x"," x ", - Character.valueOf('x'), "ingotIron", - })); - - //クリーパーリング - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.creeperRing, 1), - new Object[] { - "ringIron", - SSItems.objectReactor, - BlockMonitor.getMonitor(MonitorType.creeper) - })); - - - - //液体カマド - p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.fluidFurnace, 1), - new Object[] { "xxx", "xyx","xxx", - Character.valueOf('x'), "cobblestone", - Character.valueOf('y'), Blocks.glass_pane, - })); - - //魔法カマド - p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.magicFurnace, 1), - new Object[] { "xxx", "xyx","xxx", - Character.valueOf('x'), "cobblestone", - Character.valueOf('y'), SSItems.magicDust, - })); - - //フリーザー - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSBlocks.freezer, 1), - new Object[] { - SSItems.objectReactor, - Blocks.ice, - Blocks.furnace, - })); - - //乾燥機 - p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.foodSmokers, 1), - new Object[] { "xxx", "xyx","xxx", - Character.valueOf('x'), "ingotSteel", - Character.valueOf('y'), Blocks.glass_pane, - })); - - //time - p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.chunkLoader, 1), - new Object[] { "xyx", "yzy","xyx", - Character.valueOf('x'), "ingotIron", - Character.valueOf('y'), Blocks.obsidian, - Character.valueOf('z'), Items.clock, - })); - - //料理 - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.curryRice, 1), - new Object[] { - "containerWoodBowl", - "condimentCurryPowder", - "cookingRice", - "cropPotato", - "cropCarrot" - })); - - - //スープ - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.carrotSoup, 1), - new Object[] { - "containerWoodBowl", - "fluidWater", - "cropCarrot" - })); - - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.cornSoup, 1), - new Object[] { - "containerWoodBowl", - "fluidWater", - "cropCorn" - })); - - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.eggSoup, 1), - new Object[] { - "containerWoodBowl", - "fluidWater", - "eggChicken" - })); - - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.onionSoup, 1), - new Object[] { - "containerWoodBowl", - "fluidWater", - "cropOnion" - })); - - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.tomatoSoup, 1), - new Object[] { - "containerWoodBowl", - "fluidWater", - "cropTomato" - })); + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.hammer, 1), + new Object[] { "xxx", " y ", " y ", + Character.valueOf('x'), "ingotIron", + Character.valueOf('y'), "stickWood", + })); + + //鉄のリング + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.ironRing, 1), + new Object[] { " x ", "x x", " x ", + Character.valueOf('x'), "ingotIron", + })); + + //クリーパーリング + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.creeperRing, 1), + new Object[] { + "ringIron", + SSItems.objectReactor, + BlockMonitor.getMonitor(MonitorType.creeper) + })); + + //液体カマド + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.fluidFurnace, 1), + new Object[] { "xxx", "xyx", "xxx", + Character.valueOf('x'), "cobblestone", + Character.valueOf('y'), Blocks.glass_pane, + })); + + //魔法カマド + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.magicFurnace, 1), + new Object[] { "xxx", "xyx", "xxx", + Character.valueOf('x'), "cobblestone", + Character.valueOf('y'), SSItems.magicDust, + })); + + //フリーザー + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSBlocks.freezer, 1), + new Object[] { + SSItems.objectReactor, + Blocks.ice, + Blocks.furnace, + })); + + //乾燥機 + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.foodSmokers, 1), + new Object[] { "xxx", "xyx", "xxx", + Character.valueOf('x'), "ingotSteel", + Character.valueOf('y'), Blocks.glass_pane, + })); + + //time + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.chunkLoader, 1), + new Object[] { "xyx", "yzy", "xyx", + Character.valueOf('x'), "ingotIron", + Character.valueOf('y'), Blocks.obsidian, + Character.valueOf('z'), Items.clock, + })); + + //パイプ + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.ironPipe, 4), + new Object[] { + "x", "x", "x", + 'x', "ingotIron", + })); + + //料理 + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.curryRice, 1), + new Object[] { + "containerWoodBowl", + "condimentCurryPowder", + "cookingRice", + "cropPotato", + "cropCarrot" + })); + + //スープ + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.carrotSoup, 1), + new Object[] { + "containerWoodBowl", + "fluidWater", + "cropCarrot" + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.cornSoup, 1), + new Object[] { + "containerWoodBowl", + "fluidWater", + "cropCorn" + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.eggSoup, 1), + new Object[] { + "containerWoodBowl", + "fluidWater", + "eggChicken" + })); - } + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.onionSoup, 1), + new Object[] { + "containerWoodBowl", + "fluidWater", + "cropOnion" + })); + + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.tomatoSoup, 1), + new Object[] { + "containerWoodBowl", + "fluidWater", + "cropTomato" + })); + + //輸送系 + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.poweredBuoy, 4), + new Object[] { "xyx", "yzy", "xyx", + Character.valueOf('x'), "ingotIron", + Character.valueOf('y'), SSItems.dustWaterLily, + Character.valueOf('z'), Items.redstone, + })); + + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.boardingBuoy, 4), + new Object[] { "xyx", "yzy", "xyx", + Character.valueOf('x'), "ingotGold", + Character.valueOf('y'), SSItems.dustWaterLily, + Character.valueOf('z'), Items.redstone, + })); + + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.detectorBuoy, 4), + new Object[] { "xyx", "yzy", "xyx", + Character.valueOf('z'), "ingotIron", + Character.valueOf('x'), SSItems.dustWaterLily, + Character.valueOf('y'), Items.redstone, + })); + + } public static void addVanillaRecipes() - { + { - for( Map.Entry e : ((HashMap)FurnaceRecipes.smelting().getSmeltingList()).entrySet()){ + for (Map.Entry e : ((HashMap) FurnaceRecipes.smelting().getSmeltingList()).entrySet()) { - if(e.getValue().getItem().hasContainerItem(e.getValue().copy()) && e.getKey().getItem().hasContainerItem(e.getKey().copy()) ){ - if(checkItem(e.getValue().getItem().getContainerItem(e.getValue().copy()), e.getKey().getItem().getContainerItem(e.getKey().copy())))continue; + if (e.getValue().getItem().hasContainerItem(e.getValue().copy()) && e.getKey().getItem().hasContainerItem(e.getKey().copy())) { + if (checkItem(e.getValue().getItem().getContainerItem(e.getValue().copy()), e.getKey().getItem().getContainerItem(e.getKey().copy()))) + continue; } - FurnaceCraftingManager.getInstance().addShapelessRecipe(e.getValue(), new Object[]{e.getKey()}); + FurnaceCraftingManager.getInstance().addShapelessRecipe(e.getValue(), new Object[] { e.getKey() }); - } + } - } + } private static boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) - { - return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); - } + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java b/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java index b677126..82a6bbe 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java @@ -1,30 +1,33 @@ package shift.sextiarysector.recipe; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import shift.sextiarysector.SSItems; public class RecipesPulverizer { public static void addRecipes(RecipeSimpleMachine recipe) - { + { - recipe.add("oreCoal",new ItemStack(SSItems.coalDust, 2)); - recipe.add("oreIron",new ItemStack(SSItems.ironDust, 2)); - recipe.add("oreGold",new ItemStack(SSItems.goldDust, 2)); - recipe.add("oreCopper",new ItemStack(SSItems.copperDust, 2)); - recipe.add("oreZinc",new ItemStack(SSItems.zincDust, 2)); - recipe.add("gemDiamond",new ItemStack(SSItems.diamondDust, 1)); + recipe.add("oreCoal", new ItemStack(SSItems.coalDust, 2)); + recipe.add(new ItemStack(Items.coal, 1, 0), new ItemStack(SSItems.coalDust, 1)); + recipe.add(new ItemStack(Items.coal, 1, 1), new ItemStack(SSItems.coalDust, 1)); + recipe.add("oreIron", new ItemStack(SSItems.ironDust, 2)); + recipe.add("oreGold", new ItemStack(SSItems.goldDust, 2)); + recipe.add("oreCopper", new ItemStack(SSItems.copperDust, 2)); + recipe.add("oreZinc", new ItemStack(SSItems.zincDust, 2)); + recipe.add("gemDiamond", new ItemStack(SSItems.diamondDust, 1)); - recipe.add("oreMithril",new ItemStack(SSItems.mithrilDust, 2)); + recipe.add("oreMithril", new ItemStack(SSItems.mithrilDust, 2)); - recipe.add("ingotCoal",new ItemStack(SSItems.coalDust, 1)); - recipe.add("ingotIron",new ItemStack(SSItems.ironDust, 1)); - recipe.add("ingotGold",new ItemStack(SSItems.goldDust, 1)); - recipe.add("ingotCopper",new ItemStack(SSItems.copperDust, 1)); - recipe.add("ingotZinc",new ItemStack(SSItems.zincDust, 1)); + recipe.add("ingotCoal", new ItemStack(SSItems.coalDust, 1)); + recipe.add("ingotIron", new ItemStack(SSItems.ironDust, 1)); + recipe.add("ingotGold", new ItemStack(SSItems.goldDust, 1)); + recipe.add("ingotCopper", new ItemStack(SSItems.copperDust, 1)); + recipe.add("ingotZinc", new ItemStack(SSItems.zincDust, 1)); - recipe.add("ingotMithril",new ItemStack(SSItems.mithrilDust, 1)); + recipe.add("ingotMithril", new ItemStack(SSItems.mithrilDust, 1)); - } + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java index b62df37..df1066a 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTimeMachine.java @@ -8,27 +8,30 @@ public class RecipesTimeMachine { public static void addRecipes(RecipeSimpleMachine recipe) - { + { - recipe.add(new ItemStack(SSItems.turnip),new ItemStack(SSBlocks.turnip, 1)); - recipe.add(new ItemStack(SSItems.cucumber),new ItemStack(SSBlocks.cucumber, 1)); - recipe.add(new ItemStack(SSItems.ironTurnip),new ItemStack(SSBlocks.ironTurnip, 1)); + recipe.add(new ItemStack(SSItems.turnip), new ItemStack(SSBlocks.turnip, 1)); + recipe.add(new ItemStack(SSItems.cucumber), new ItemStack(SSBlocks.cucumber, 1)); + recipe.add(new ItemStack(SSItems.ironTurnip), new ItemStack(SSBlocks.ironTurnip, 1)); - recipe.add(new ItemStack(SSItems.onion),new ItemStack(SSBlocks.onion, 1)); - recipe.add(new ItemStack(SSItems.tomato),new ItemStack(SSBlocks.tomato, 1)); - recipe.add(new ItemStack(SSItems.corn),new ItemStack(SSBlocks.corn, 1)); - recipe.add(new ItemStack(SSItems.goldenCorn),new ItemStack(SSBlocks.goldenCorn, 1)); + recipe.add(new ItemStack(SSItems.onion), new ItemStack(SSBlocks.onion, 1)); + recipe.add(new ItemStack(SSItems.tomato), new ItemStack(SSBlocks.tomato, 1)); + recipe.add(new ItemStack(SSItems.corn), new ItemStack(SSBlocks.corn, 1)); + recipe.add(new ItemStack(SSItems.goldenCorn), new ItemStack(SSBlocks.goldenCorn, 1)); - recipe.add(new ItemStack(SSItems.eggplant),new ItemStack(SSBlocks.eggplant, 1)); - recipe.add(new ItemStack(SSItems.sweetPotato),new ItemStack(SSBlocks.sweetPotato, 1)); - recipe.add(new ItemStack(SSItems.greenPepper),new ItemStack(SSBlocks.greenPepper, 1)); + recipe.add(new ItemStack(SSItems.eggplant), new ItemStack(SSBlocks.eggplant, 1)); + recipe.add(new ItemStack(SSItems.sweetPotato), new ItemStack(SSBlocks.sweetPotato, 1)); + recipe.add(new ItemStack(SSItems.greenPepper), new ItemStack(SSBlocks.greenPepper, 1)); - recipe.add(new ItemStack(SSItems.radish),new ItemStack(SSBlocks.radish, 1)); + recipe.add(new ItemStack(SSItems.radish), new ItemStack(SSBlocks.radish, 1)); - recipe.add(new ItemStack(SSItems.rice),new ItemStack(SSBlocks.rice, 1)); + recipe.add(new ItemStack(SSItems.rice), new ItemStack(SSBlocks.rice, 1)); - recipe.add(new ItemStack(Blocks.red_mushroom),new ItemStack(SSBlocks.redMushroom, 1)); + recipe.add(new ItemStack(Blocks.red_mushroom), new ItemStack(SSBlocks.redMushroom, 1)); - } + recipe.add(new ItemStack(SSItems.attackRustUnit), new ItemStack(SSItems.attackUnit, 1)); + recipe.add(new ItemStack(SSItems.defenseRustUnit), new ItemStack(SSItems.defenseUnit, 1)); + + } } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java b/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java index c305f9c..808821a 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererFluidCrafter.java @@ -21,15 +21,15 @@ import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -public class RendererFluidCrafter extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { +public class RendererFluidCrafter extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); private static final ResourceLocation bottleTextures = new ResourceLocation("sextiarysector:textures/models/fluid_crafter.png"); - private final Minecraft mc = FMLClientHandler.instance().getClient(); + private final Minecraft mc = FMLClientHandler.instance().getClient(); - private final RenderBlocks blockrender = new RenderBlocks(); + private final RenderBlocks blockrender = new RenderBlocks(); public static ModelFluidCrafter modelFluidCrafter = new ModelFluidCrafter(); @@ -41,33 +41,32 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GL11.glColor3f(1,1,1); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glColor3f(1, 1, 1); this.bind(MC_BLOCK_SHEET); - //GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + //GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); - GL11.glRotatef(-(FMLClientHandler.instance().getClient().getMinecraft().getSystemTime()/50)%360, 0, 1, 0); + GL11.glRotatef(-(FMLClientHandler.instance().getClient().getMinecraft().getSystemTime() / 50) % 360, 0, 1, 0); - if(metadata!=0&&FluidRegistry.getFluid(metadata)!=null && FluidRegistry.getFluid(metadata).getIcon()!=null){ + if (metadata != 0 && FluidRegistry.getFluid(metadata) != null) { - IIcon icon = FluidRegistry.getFluid(metadata).getIcon(); + IIcon icon = blockrender.getIconSafe(FluidRegistry.getFluid(metadata).getIcon()); - setColor3ubFromInt(FluidRegistry.getFluid(metadata).getColor()); + setColor3ubFromInt(FluidRegistry.getFluid(metadata).getColor()); - float i = 0.0625f; + float i = 0.0625f; - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + renderer.renderAllFaces = true; + renderer.setOverrideBlockTexture(icon); + renderer.setRenderBounds(-3.9f / 16.0f, -3.9f / 16.0f, -3.9f / 16.0f, 3.9f / 16.0f, 3.9 / 16.0f, 3.9f / 16.0f); + Tessellator tessellator = Tessellator.instance; - renderer.renderAllFaces = true; - renderer.setOverrideBlockTexture(icon); - renderer.setRenderBounds(-3.9f/16.0f, -3.9f/16.0f, -3.9f/16.0f, 3.9f/16.0f, 3.9/16.0f, 3.9f/16.0f); - Tessellator tessellator = Tessellator.instance; - - tessellator.startDrawingQuads(); + tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, -1.0F, 0.0F); renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, icon); tessellator.draw(); @@ -97,25 +96,22 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB } + this.bind(bottleTextures); + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180, 1, 0, 0); - this.bind(bottleTextures); - - float scale = 0.0625f; - GL11.glScalef(scale,scale,scale); - GL11.glRotatef(180, 1, 0, 0); - - GL11.glColor3f(1,1,1); - + GL11.glColor3f(1, 1, 1); - modelFluidCrafter.render(null, 0,0,0, 0,0, 1.0f); + modelFluidCrafter.render(null, 0, 0, 0, 0, 0, 1.0f); - GL11.glPopMatrix(); + GL11.glPopMatrix(); } @Override - public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,RenderBlocks renderer) { + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { return true; } @@ -135,42 +131,41 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_LIGHT0); - GL11.glColor3f(1,1,1); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_LIGHT0); + GL11.glColor3f(1, 1, 1); - GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); - GL11.glRotatef(((TileEntityFluidCrafter)tileentity).x, 1, 0, 0); - GL11.glRotatef(((TileEntityFluidCrafter)tileentity).y, 0, 1, 0); - GL11.glRotatef(((TileEntityFluidCrafter)tileentity).z, 0, 0, 1); + GL11.glRotatef(((TileEntityFluidCrafter) tileentity).x, 1, 0, 0); + GL11.glRotatef(((TileEntityFluidCrafter) tileentity).y, 0, 1, 0); + GL11.glRotatef(((TileEntityFluidCrafter) tileentity).z, 0, 0, 1); - if(((TileEntityFluidCrafter)tileentity).hasFluid()){ + if (((TileEntityFluidCrafter) tileentity).hasFluid()) { - IIcon icon = ((TileEntityFluidCrafter)tileentity).getFluidIcon(); + IIcon icon = blockrender.getIconSafe(((TileEntityFluidCrafter) tileentity).getFluidIcon()); Block block = tileentity.getBlockType(); - //float i = 0.3125f; + //float i = 0.3125f; - this.bindTexture(MC_BLOCK_SHEET); + this.bindTexture(MC_BLOCK_SHEET); - this.setColor3ubFromInt(((TileEntityFluidCrafter)tileentity).getFluidColor()); + this.setColor3ubFromInt(((TileEntityFluidCrafter) tileentity).getFluidColor()); - blockrender.blockAccess =tileentity.getWorldObj(); + blockrender.blockAccess = tileentity.getWorldObj(); - blockrender.renderAllFaces = true; - blockrender.setOverrideBlockTexture(icon); - //blockrender.setRenderBounds(i*2.3, -0.0625*6, i*2.3, 1-i*2.5,0.0625*1.8f, 1-i*2.3); - blockrender.setRenderBounds(-3.9f/16.0f, -3.9f/16.0f, -3.9f/16.0f, 3.9f/16.0f, 3.9/16.0f, 3.9f/16.0f); - //blockrender.setRenderBounds(i, 0.0625*2, i, 1-i,0.0625*8f, 1-i); - //blockrender.renderStandardBlock(Block.blocksList[tileentity.getWorldObj().getBlockId(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord)], tileentity.xCoord, tileentity.yCoord,tileentity.zCoord); + blockrender.renderAllFaces = true; + blockrender.setOverrideBlockTexture(icon); + //blockrender.setRenderBounds(i*2.3, -0.0625*6, i*2.3, 1-i*2.5,0.0625*1.8f, 1-i*2.3); + blockrender.setRenderBounds(-3.9f / 16.0f, -3.9f / 16.0f, -3.9f / 16.0f, 3.9f / 16.0f, 3.9 / 16.0f, 3.9f / 16.0f); + //blockrender.setRenderBounds(i, 0.0625*2, i, 1-i,0.0625*8f, 1-i); + //blockrender.renderStandardBlock(Block.blocksList[tileentity.getWorldObj().getBlockId(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord)], tileentity.xCoord, tileentity.yCoord,tileentity.zCoord); + Tessellator tessellator = Tessellator.instance; - Tessellator tessellator = Tessellator.instance; - - tessellator.startDrawingQuads(); + tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, -1.0F, 0.0F); blockrender.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, icon); tessellator.draw(); @@ -195,31 +190,29 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double blockrender.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, icon); tessellator.draw(); - blockrender.renderAllFaces = false; - blockrender.clearOverrideBlockTexture(); + blockrender.renderAllFaces = false; + blockrender.clearOverrideBlockTexture(); } + this.bindTexture(bottleTextures); - this.bindTexture(bottleTextures); - - float scale = 0.0625f; - GL11.glScalef(scale,scale,scale); - GL11.glRotatef(180, 1, 0, 0); + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180, 1, 0, 0); - GL11.glColor3f(1,1,1); + GL11.glColor3f(1, 1, 1); - modelFluidCrafter.render(null, 0,0,0, 0,0, 1.0f); + modelFluidCrafter.render(null, 0, 0, 0, 0, 0, 1.0f); - GL11.glPopMatrix(); + GL11.glPopMatrix(); } - private void bind(ResourceLocation res) - { - mc.getTextureManager().bindTexture(res); - } + { + mc.getTextureManager().bindTexture(res); + } public static void setColor3ubFromInt(int color) { diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java b/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java new file mode 100644 index 0000000..2078cac --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java @@ -0,0 +1,106 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.IFluidHandler; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.renderer.model.ModelPipe; +import shift.sextiarysector.tileentity.TileEntityPipe; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererPipe extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { + + if (modelId != this.getRenderId()) { + return; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); + + GL11.glRotatef(180, 0, 1, 0); + + this.bind(this.fanShaftTextures); + + modelPipe.render(null, 0, 0, 0, 0, 0, 1.0f); + modelPipe.renderPipe(null, 0, 0, 0, 0, 0, 1.0f, 0, false); + modelPipe.renderPipe(null, 0, 0, 0, 0, 0, 1.0f, 1, false); + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + return true; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.pipeType; + } + + private static final ResourceLocation fanShaftTextures = new ResourceLocation("sextiarysector:textures/models/iron_pipe.png"); + + static public ModelPipe modelPipe = new ModelPipe(); + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x1, double y1, double z1, float p_147500_8_) { + + TileEntityPipe tile = (TileEntityPipe) tileentity; + + GL11.glPushMatrix(); + GL11.glTranslated(x1 + 0.5F, y1 + 0.5F, z1 + 0.5F); + float scale = 0.0624f; + GL11.glScalef(scale, scale, scale); + + this.bindTexture(fanShaftTextures); + + modelPipe.render(null, 0, 0, 0, 0, 0, 1.0f); + + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + + int x = tile.xCoord + d.offsetX; + int y = tile.yCoord + d.offsetY; + int z = tile.zCoord + d.offsetZ; + + TileEntity t = tileentity.getWorldObj().getTileEntity(x, y, z); + + if (t instanceof IFluidHandler) { + modelPipe.renderPipe(null, 0, 0, 0, 0, 0, 1.0f, d.ordinal(), false); + } + + } + + GL11.glPopMatrix(); + + } + + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java b/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java index f4f0675..fcfc7e9 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererSquare.java @@ -76,15 +76,58 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + + float scale = 0.0625f; + // float scale = 0.125f; + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180, 1, 0, 0); + switch (tile.direction) { + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case NORTH: + GL11.glRotatef(180, 0, 1, 0); + default: + break; + } + + if (tile.direction.ordinal() == ForgeDirection.UP.ordinal()) { + this.bindTexture(squareTextures); + } else if (tile.direction.ordinal() == ForgeDirection.DOWN.ordinal()) { + this.bindTexture(squareUunderTextures); + } else { + this.bindTexture(squareTextures); + modelSquare.renderConnection(null, 0, 0, 0, 0, 0, 1.0f); + } + + modelSquare.render(null, 0, 0, 0, 0, 0, 1.0f); + + + GL11.glPopMatrix(); + + GL11.glPushMatrix(); + + GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHT0); + //GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glColor3f(1,1,1); - GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + + + GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); + + // float scale = 0.125f; + if(tile.hasFluid()){ @@ -136,39 +179,16 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double } + //GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glColor3f(1,1,1); - float scale = 0.0625f; - // float scale = 0.125f; - GL11.glScalef(scale, scale, scale); - GL11.glRotatef(180, 1, 0, 0); - switch (tile.direction) { - case WEST: - GL11.glRotatef(90, 0, 1, 0); - break; - case EAST: - GL11.glRotatef(90, 0, -1, 0); - break; - case NORTH: - GL11.glRotatef(180, 0, 1, 0); - default: - break; - } + GL11.glColor3f(1,1,1); - if (tile.direction.ordinal() == ForgeDirection.UP.ordinal()) { - this.bindTexture(squareTextures); - } else if (tile.direction.ordinal() == ForgeDirection.DOWN.ordinal()) { - this.bindTexture(squareUunderTextures); - } else { - this.bindTexture(squareTextures); - modelSquare.renderConnection(null, 0, 0, 0, 0, 0, 1.0f); - } - modelSquare.render(null, 0, 0, 0, 0, 0, 1.0f); GL11.glPopMatrix(); diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelPipe.java b/src/main/java/shift/sextiarysector/renderer/model/ModelPipe.java new file mode 100644 index 0000000..864b863 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelPipe.java @@ -0,0 +1,160 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelPipe extends ModelBase +{ + + ModelRenderer Core; + ModelRenderer Pipe01; + ModelRenderer Pipe02; + ModelRenderer Pipe11; + ModelRenderer Pipe12; + ModelRenderer Pipe21; + ModelRenderer Pipe22; + ModelRenderer Pipe31; + ModelRenderer Pipe32; + ModelRenderer Pipe41; + ModelRenderer Pipe42; + ModelRenderer Pipe51; + ModelRenderer Pipe52; + + public ModelPipe() + { + textureWidth = 64; + textureHeight = 64; + + Core = new ModelRenderer(this, 0, 0); + Core.addBox(-3F, -3F, -3F, 6, 6, 6); + Core.setRotationPoint(0F, 0F, 0F); + Core.setTextureSize(64, 64); + Core.mirror = true; + setRotation(Core, 0F, 0F, 0F); + Pipe11 = new ModelRenderer(this, 0, 12); + Pipe11.addBox(-3F, 3F, -3F, 6, 5, 6); + Pipe11.setRotationPoint(0F, 0F, 0F); + Pipe11.setTextureSize(64, 64); + Pipe11.mirror = true; + setRotation(Pipe11, 0F, 0F, 0F); + Pipe12 = new ModelRenderer(this, 0, 23); + Pipe12.addBox(-4F, 6F, -4F, 8, 2, 8); + Pipe12.setRotationPoint(0F, 0F, 0F); + Pipe12.setTextureSize(64, 64); + Pipe12.mirror = true; + setRotation(Pipe12, 0F, 0F, 0F); + Pipe01 = new ModelRenderer(this, 0, 12); + Pipe01.addBox(-3F, -8F, -3F, 6, 5, 6); + Pipe01.setRotationPoint(0F, 0F, 0F); + Pipe01.setTextureSize(64, 64); + Pipe01.mirror = true; + setRotation(Pipe01, 0F, 0F, 0F); + Pipe02 = new ModelRenderer(this, 0, 23); + Pipe02.addBox(-4F, -8F, -4F, 8, 2, 8); + Pipe02.setRotationPoint(0F, 0F, 0F); + Pipe02.setTextureSize(64, 64); + Pipe02.mirror = true; + setRotation(Pipe02, 0F, 0F, 0F); + Pipe51 = new ModelRenderer(this, 0, 33); + Pipe51.addBox(3F, -3F, -3F, 5, 6, 6); + Pipe51.setRotationPoint(0F, 0F, 0F); + Pipe51.setTextureSize(64, 64); + Pipe51.mirror = true; + setRotation(Pipe51, 0F, 0F, 0F); + Pipe52 = new ModelRenderer(this, 0, 45); + Pipe52.addBox(6F, -4F, -4F, 2, 8, 8); + Pipe52.setRotationPoint(0F, 0F, 0F); + Pipe52.setTextureSize(64, 64); + Pipe52.mirror = true; + setRotation(Pipe52, 0F, 0F, 0F); + Pipe41 = new ModelRenderer(this, 0, 33); + Pipe41.addBox(-8F, -3F, -3F, 5, 6, 6); + Pipe41.setRotationPoint(0F, 0F, 0F); + Pipe41.setTextureSize(64, 64); + Pipe41.mirror = true; + setRotation(Pipe41, 0F, 0F, 0F); + Pipe42 = new ModelRenderer(this, 0, 45); + Pipe42.addBox(-8F, -4F, -4F, 2, 8, 8); + Pipe42.setRotationPoint(0F, 0F, 0F); + Pipe42.setTextureSize(64, 64); + Pipe42.mirror = true; + setRotation(Pipe42, 0F, 0F, 0F); + Pipe21 = new ModelRenderer(this, 32, 0); + Pipe21.addBox(-3F, -3F, -8F, 6, 6, 5); + Pipe21.setRotationPoint(0F, 0F, 0F); + Pipe21.setTextureSize(64, 64); + Pipe21.mirror = true; + setRotation(Pipe21, 0F, 0F, 0F); + Pipe22 = new ModelRenderer(this, 32, 11); + Pipe22.addBox(-4F, -4F, -8F, 8, 8, 2); + Pipe22.setRotationPoint(0F, 0F, 0F); + Pipe22.setTextureSize(64, 64); + Pipe22.mirror = true; + setRotation(Pipe22, 0F, 0F, 0F); + Pipe31 = new ModelRenderer(this, 32, 0); + Pipe31.addBox(-3F, -3F, 3F, 6, 6, 5); + Pipe31.setRotationPoint(0F, 0F, 0F); + Pipe31.setTextureSize(64, 64); + Pipe31.mirror = true; + setRotation(Pipe31, 0F, 0F, 0F); + Pipe32 = new ModelRenderer(this, 32, 11); + Pipe32.addBox(-4F, -4F, 6F, 8, 8, 2); + Pipe32.setRotationPoint(0F, 0F, 0F); + Pipe32.setTextureSize(64, 64); + Pipe32.mirror = true; + setRotation(Pipe32, 0F, 0F, 0F); + } + + @Override + 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); + Core.render(f5); + } + + public void renderPipe(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, int direction, boolean isStraight) + { + + if (direction == 0) { + + Pipe01.render(f5); + if (!isStraight) Pipe02.render(f5); + + } else if (direction == 1) { + + Pipe11.render(f5); + if (!isStraight) Pipe12.render(f5); + + } else if (direction == 2) { + + Pipe21.render(f5); + if (!isStraight) Pipe22.render(f5); + + } else if (direction == 3) { + + Pipe31.render(f5); + if (!isStraight) Pipe32.render(f5); + + } else if (direction == 4) { + + Pipe41.render(f5); + if (!isStraight) Pipe42.render(f5); + + } else if (direction == 5) { + + Pipe51.render(f5); + if (!isStraight) Pipe52.render(f5); + + } + + } + + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityPipe.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityPipe.java new file mode 100644 index 0000000..109ef03 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityPipe.java @@ -0,0 +1,196 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + +public class TileEntityPipe extends TileEntity implements IFluidHandler { + + protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 16); + private final boolean isIN[] = { false, false, false, false, false, false }; + + @Override + public void updateEntity() { + + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() { + } + + public void updateServerEntity() { + + if (this.tank.getFluidAmount() > 0 && getConnectSize() > 0) this.addFluid(); + this.clearIN(); + + } + + private void addFluid() { + + int add = Math.min(50, this.tank.getFluidAmount() / getConnectSize()); + int doAdd = 0; + + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + + TileEntity t = this.worldObj.getTileEntity(xCoord + d.offsetX, yCoord + d.offsetY, zCoord + d.offsetZ); + + if (!isIN[d.ordinal()] && t instanceof IFluidHandler) { + + FluidStack f = this.tank.getFluid().copy(); + f.amount = add; + + int i = ((IFluidHandler) t).fill(d.getOpposite(), f, true); + if (i > 0) doAdd += i; + + } + + } + + this.tank.drain(doAdd, true); + + } + + private void clearIN() { + + for (int i = 0; i < isIN.length; i++) { + isIN[i] = false; + } + + } + + private int getConnectSize() { + + int i = 0; + + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + TileEntity t = this.worldObj.getTileEntity(xCoord + d.offsetX, yCoord + d.offsetY, zCoord + d.offsetZ); + + if (!isIN[d.ordinal()] && t instanceof IFluidHandler && ((IFluidHandler) t).fill(d.getOpposite(), tank.getFluid(), false) > 0) { + i++; + } + + } + + return i; + + } + + private int getIsIN() { + + int i = 0; + + for (boolean b : isIN) { + if (b) i++; + } + + return i; + + } + + /* IFluidHandler */ + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + int i = tank.fill(resource, doFill); + + if (i > 0 && doFill) { + this.isIN[from.ordinal()] = true; + } + + return i; + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(tank.getFluid())) + { + return null; + } + return tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return tank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { tank.getInfo() }; + } + + /* NBT */ + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + tank.readFromNBT(par1nbtTagCompound); + if (par1nbtTagCompound.hasKey("Empty") && tank.getFluidAmount() > 0) this.tank.setFluid(null); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + tank.writeToNBT(par1nbtTagCompound); + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + //this.worldObj.func_147479_m(xCoord, yCoord, zCoord); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + public boolean isStraight() { + + int i = 0; + int x = this.xCoord; + int y = this.yCoord; + int z = this.zCoord; + + if (this.worldObj.getBlock(x + 1, y, z) == this.getBlockType() && this.worldObj.getBlock(x - 1, y, z) == this.getBlockType()) i++; + if (this.worldObj.getBlock(x, y + 1, z) == this.getBlockType() && this.worldObj.getBlock(x, y - 1, z) == this.getBlockType()) i++; + if (this.worldObj.getBlock(x, y, z + 1) == this.getBlockType() && this.worldObj.getBlock(x, y, z - 1) == this.getBlockType()) i++; + + return i == 1; + } + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 8bc006f..8b575f5 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -30,6 +30,9 @@ tile.ss.bottle.name=Fluid Bottle tile.ss.fluid_crafter.name=Fluid Crafter tile.ss.square.name=Wood Square +tile.ss.iron_pipe.name=Iron Pipe + + tile.ss.wood_hopper.name=Wood Hopper tile.ss.chunk_loader.name=Time Loader @@ -37,6 +40,25 @@ tile.ss.chunk_loader.name=Time Loader tile.ss.figure.name=Figure +tile.ss.drinking_water.name=Drinking Water +tile.ss.hot_springs.name=Hot Springs + + +tile.ss.blue_stone.name=Blue Stone Ore +tile.ss.yellow_stone.name=Yellow Stone Ore + +tile.ss.copper_ore.name=Copper Ore +tile.ss.zinc_ore.name=Zinc Ore +tile.ss.silver_ore.name=Silver Ore + +tile.ss.mithril_ore.name=Mithril Ore +tile.ss.orichalcum_ore.name=Orichalcum Ore + +tile.ss.coal_large_ore.name=Coal Large Ore +tile.ss.iron_large_ore.name=Iron Large Ore +tile.ss.gold_large_ore.name=Gold Large Ore + + tile.ss.small_windmill.name=Small Windmill tile.ss.windmill.name=Windmill tile.ss.small_waterwheel.name=Small Waterwheel @@ -77,19 +99,6 @@ tile.ss.fan.name=Fan tile.ss.saw.name=Saw tile.ss.pump.name=Pump -tile.ss.blue_stone.name=Blue Stone Ore -tile.ss.yellow_stone.name=Yellow Stone Ore - -tile.ss.copper_ore.name=Copper Ore -tile.ss.zinc_ore.name=Zinc Ore -tile.ss.silver_ore.name=Silver Ore - -tile.ss.mithril_ore.name=Mithril Ore -tile.ss.orichalcum_ore.name=Orichalcum Ore - -tile.ss.coal_large_ore.name=Coal Large Ore -tile.ss.iron_large_ore.name=Iron Large Ore -tile.ss.gold_large_ore.name=Gold Large Ore tile.ss.creeper_chest.name=Creeper Monger Chest tile.ss.shipping_box.name=Shipping Box @@ -115,6 +124,10 @@ tile.ss.mushroom_red.name=Red Mushroom Seed tile.ss.sandpit.name=Sandpit +tile.ss.boarding_buoy.name=Boarding Buoy +tile.ss.powered_buoy.name=Powered Buoy +tile.ss.detector_buoy.name=Detector Buoy + tile.ss.monitor.name=Monitor monitor.type=Type monitor.creeper=Simple Creeper Shop @@ -124,6 +137,37 @@ tile.ss.electric_motor.name=Electric Motor tile.ss.tofu_motor.name=Tofu Motor #Item +item.ss.unit.name=Unit + +item.ss.wood_gear.name=Wood Gear +item.ss.stone_gear.name=Stone Gear +item.ss.steel_gear.name=Steel Gear +item.ss.ninja_gear.name=Ninja Gear +item.ss.orichalcum_gear.name=Orichalcum Gear + +item.ss.wood_unit_gear.name=Wood Unit Gear +item.ss.stone_unit_gear.name=Stone Unit Gear +item.ss.steel_unit_gear.name=Steel Unit Gear +item.ss.ninja_unit_gear.name=Ninja Unit Gear +item.ss.orichalcum_unit_gear.name=Orichalcum Unit Gear + +item.ss.wood_gf_storage.name=Wood GF Storage +item.ss.stone_gf_storage.name=Stone GF Storage +item.ss.steel_gf_storage.name=Steel GF Storage +item.ss.ninja_gf_storage.name=Ninja GF Storage +item.ss.orichalcum_gf_storage.name=Orichalcum GF Storage + +item.ss.hammer.name=Hammer + +item.ss.calendar.name=Calendar +item.ss.season_stone.name=Season Stone +item.ss.season_stone_spring.name=Season Stone -Spring- +item.ss.season_stone_summer.name=Season Stone -Summer- +item.ss.season_stone_autumn.name=Season Stone -Autumn- +item.ss.season_stone_winter.name=Season Stone -Winter- + + + item.ss.dust_waterlily.name=WaterLily Dust item.ss.stone_dust.name=Stone Dust @@ -159,15 +203,27 @@ item.ss.ninja_ingot.name=Ninja Ingot item.ss.blue_stone_slime_ball.name=Blue Stone Slime Ball - item.ss.energy_reactor.name=Energy Reactor item.ss.object_reactor.name=Object Reactor + + item.ss.empty_bottle.name=Empty Bottle item.ss.water_bottle.name=Water Bottle item.ss.lava_bottle.name=Lava Bottle +item.ss.sap_bottle.name=Sap Bottle + +item.ss.steam_bucket.name=Steam Bucket +item.ss.iron_fluid_bucket.name=Iron Fluid Bucket +item.ss.gold_fluid_bucket.name=Gold Fluid Bucket + item.ss.craft_unit.name=Craft Unit +item.ss.attack_unit.name=Attack Unit +item.ss.defense_unit.name=Defense Unit +item.ss.attack_rust_unit.name=Attack Rust Unit +item.ss.defense_rust_unit.name=Defense Rust Unit + item.ss.iron_ring.name=Iron Ring item.ss.creeper_ring.name=Creeper Shop Ring @@ -175,36 +231,6 @@ item.ss.creeper_ring.name=Creeper Shop Ring item.ss.magic_dust.name=Magic Dust -item.ss.unit.name=Unit - -item.ss.wood_gear.name=Wood Gear -item.ss.stone_gear.name=Stone Gear -item.ss.steel_gear.name=Steel Gear -item.ss.ninja_gear.name=Ninja Gear -item.ss.orichalcum_gear.name=Orichalcum Gear - -item.ss.wood_unit_gear.name=Wood Unit Gear -item.ss.stone_unit_gear.name=Stone Unit Gear -item.ss.steel_unit_gear.name=Steel Unit Gear -item.ss.ninja_unit_gear.name=Ninja Unit Gear -item.ss.orichalcum_unit_gear.name=Orichalcum Unit Gear - -item.ss.wood_gf_storage.name=Wood GF Storage -item.ss.stone_gf_storage.name=Stone GF Storage -item.ss.steel_gf_storage.name=Steel GF Storage -item.ss.ninja_gf_storage.name=Ninja GF Storage -item.ss.orichalcum_gf_storage.name=Orichalcum GF Storage - -item.ss.hammer.name=Hammer -item.ss.calendar.name=Calendar - -item.ss.calendar.name=Calendar -item.ss.season_stone.name=Season Stone -item.ss.season_stone_spring.name=Season Stone -Spring- -item.ss.season_stone_summer.name=Season Stone -Summer- -item.ss.season_stone_autumn.name=Season Stone -Autumn- -item.ss.season_stone_winter.name=Season Stone -Winter- - item.ss.string_bobbin.name=String Bobbin item.ss.cloth.name=Cloth @@ -270,6 +296,7 @@ item.ss.chicken_smoked.name=Smoked Chicken item.ss.porkchop_smoked.name=Smoked Porkchop item.ss.beef_smoked.name=Smoked Beef +item.ss.rice_ball.name=Rice Ball item.ss.curry_rice.name=Curry Rice item.ss.carrot_soup.name=Carrot Soup @@ -280,6 +307,8 @@ item.ss.onion_soup.name=Onion Soup item.ss.ender_soup.name=Ender Soup item.ss.tomato_soup.name=Tomato Soup +item.ss.chocolate.name=Chocolate + item.ss.drinking_water_bottle.name=Drinking Water Bottle item.ss.takumi_tea_bottle.name=TAKUMI Tea Bottle @@ -290,13 +319,16 @@ item.ss.gf_contact_lenses.name=GF Contact Lenses #Fluid fluid.ss.takumi_tea=TAKUMI Tea fluid.ss.drinking_water=Drinking Water +fluid.ss.hot_springs=Hot Springs fluid.ss.steam=Steam +fluid.ss.sap=Sap fluid.ss.iron=Iron Fluid fluid.ss.gold=Gold Fluid #Potion ss.potion.burn=Burn +ss.potion.hot_springs=Hot Springs #GUI container.large_furnace=Large Furnace @@ -347,6 +379,9 @@ tooltip.edition=Edition #Edition edition.creative=CreativeTab edition.figure_beginner=Figure Beginner +edition.ore_festival=Ore Festival + +edition.schr0_cleaver=Schr0 Cleaver #Tab itemGroup.ss.core=SextiarySector -Core- diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_0.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_0.png new file mode 100644 index 0000000000000000000000000000000000000000..9bada97f1667fa117611d1a4bc9188a65814801a GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5*_mEOyq1d1@oW`;zRIOpf) zrskD^_zccPsfi`2DGKG8B^e6tp1uJoda3L{@nlaI#}JFt$$$R;w`W#u;GBMB`{t_u zy0KUONAFtkfB*Ji@$I_*|NlSUr90>9zwZVH|M-&ti40KeSV{ ze_-_UwdCFZJZu8D{rx5!f5~+0qJzwtMvE+lj|>byH=dd-w*~g6t)pzOL+d*=5+Q1io=7p9BiYW`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wK=GxXE{-7mXgs94CE6ow2b21Rg*~g6t)pzOL+d*=5*F^j5wSeghPe%?ybsan8@p zP0cF-av2z$i&7IyQd1PlGfOfQ+&z5*QuI>Uf#P+ZE{-7%et~Nn#7%7C*@RuqV}I+n3T;3?g-G7g^FyGM_0bVf<{ep&^p5 ez3$QfhPCF8zMh&~FM0AR$cdh=elF{r5}E+0S7{>v literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_1_active.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_1_active.png new file mode 100644 index 0000000000000000000000000000000000000000..128a9b3253022d71445c17f4672ca6b0700d70ab GIT binary patch literal 349 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5+Q1!ssT$pM9AGeaUuobz*Y zQ}arITm}Z`qSVBa)D(sC%#sWRcTeAd6une-p!gO~7sn8b(_1eY@-aG!9Q*kHT%LL% zBWLdorxVkbZDSX>ULe%zG{@ngP*iJ5t9AjCtk?Xc)-Q9{Y#+W$Yq+8Fe8IG=CbogR^ zL?J>$Y(s!0cZ5bKtIm}B3itSGYvw)rJmvAO^y-J4$9g&p9nyZ!)jy*9=*wBYNju(E jPndeQyYjS&W9kw1Dz800ZeS3j3^P6*~g6t)pzOL+d*=5*_^(U^`x)&%Un;8;O;+&tG zo0?YwlI!39d*|-@U)X5~R3fjvtsw08{lf=-*mpEOv~OlSTpyEEvA3Y- zq5a`nr=%S*AHMdyt7l{G@Ksko@&CB$F^gG3?2U{JxtZy|4@X61gIwb2>gTe~DWM4f Dd>3OU literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_2_active.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_2_active.png new file mode 100644 index 0000000000000000000000000000000000000000..393d6d99e461b32e5e2bd70203a0c94c2c6fbf61 GIT binary patch literal 339 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5+Ql;xGGeaUuobz*Y zQ}arITm}Z`qSVBa)D(sC%#sWRcTeAd6une-p!h0J7sn8b({CpkavgFIafuhQKFG~+ zt0US&Woh(oc7gQ|Jz2OvvWUeUGHVsMsQrTT&6P_V1J-QfHk`)iWBlRyf5|$PPOFZU zo%5{z;%4h+ct(PqB6<=#_92gA(j ztuNH)SJ?AyJeM%{;TGT3mU~VoIvx>G_$(fM%)it6$j{k4lXl1kort^Lox1%J>sId? YrZXmUZ*~g6t)pzOL+d*=5*FnZN4Q-2e*7W`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wK=A-i7sn8b)5!@Etj!WNwu^t?KNR_P zf9vL3|94xL{F|K90Ak9q9sBRd!}DK~N1{OLK+E|F$w2nI;76=%%pGsl)ldAFKgM|4 eWtC#HegfmPbw*~g6t)pzOL+d*=5+QO9V@inS7rB#|k{lda8+8u4%H%2bCpP8lh|4fbXJe95! z%NP7(lVp1y>fPBp<%Y-Xz^k=dp7M(?=Vo-Rm)vJ?B6RvrCsqyioAp6Os?VAme!XOK zxWzq}?Vi8g$6eWzZ*&}SlbL3?^MGBW;jzX137;Bk9b=UH;(PwEg$Yg1<#~3|cJ7rq n!f(WV69w3o9uAn)<-CXayuehJrwfj40C~>S)z4*}Q$iB}?}UNW literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_4.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_4.png new file mode 100644 index 0000000000000000000000000000000000000000..1e47aad2eee0dda6e589b2abc57fc8ee4014096f GIT binary patch literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5*_t^O1Sh5?0SGeaUuobz*Y zQ}arITm}Z`qSVBa)D(sC%#sWRcTeAd6une-pm?gMi(`nz>Eu8E|JyUGHgq;R8DufY zG4Gpu^>_ZuMgQ(!a{c>%@7!HG7Qg!c|9`~B*3Gy6%ds8%@5saRUy?`S-{YY6>)gjB z{u$pHn@mvv4F FO#mW+W4!*~g6t)pzOL+d*=5+Qbk`;1-vA29W`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wK=Cb}E{-7eKGk_zRUD zTAucY)r%$X_P!js)6X`3yS(jp=p?(eS*}qJvOD#8ioQ;rcY$e^<4%96b%(NKF6^~q z)M#56eBgJdu>5gGv;K{hXDTPx@Ee|0N~`E$;JK>sPGCBhz{DeeCp1+0>pzoKDUABw j;wTZ~gTe~DWM4f81;U1 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_5.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_5.png new file mode 100644 index 0000000000000000000000000000000000000000..44042ec6bd5c9d75ff856970ffeac3a9fe1eec8b GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5*F1qvtFgG`gn42dXl&d<$F z%_{+N85o?4QWHy3QxwWGOEMJPJ$(aG^itV@;$@yLjv*GOlmGnxZ_ljS(Anr@ki{U! zyl?K+-}x^W{kwn3_3!_^b9e1n{ObSz{}CHoH{bd%$9C+$BM;AiNgj!RkAvE;b03%Z zXM9Kf344rMz3t-P^A9p4{XWV0$s+cE$J8kvB@GWhF>PdQGZ*OOGKkSrFguVT)WLA# W%&Ez>zg5*hPV;p2b6Mw<&;$TWKWKCS literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_5_active.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_5_active.png new file mode 100644 index 0000000000000000000000000000000000000000..1c92290cb262f82d64e267d3a15a16f975fabbee GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5+QH8+UOY5)q!W`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wK=B$+7sn8b)5(AS|F>sWZRl)tGRR_( zW8Noo>0kcKMgQ(!a{c>%rJv=Uz_0)R*RQ#8DDv%p6}Dynxg}=&GnO#;b9^b^dhs6; z5)wOReq1gr79-@nX{Kbzy?@CGKwu%M(0iG|ZPgN&Ma(?m3PREe70eT7FdUZbIKn33 b%OuF4t6Fh?gTR-gAP0K7`njxgN@xNA(amK; literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_6.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_6.png new file mode 100644 index 0000000000000000000000000000000000000000..00a16e20153bf912524c198a056ce435b94dcc22 GIT binary patch literal 276 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5*FxTe1RZVMEW%?ybsan8@p zP0cF-av2z$i&7IyQd1PlGfOfQ+&z5*QuI>Uf#TVoE{-7%Zt-EB>dd+N@4JD)KmMeIALkPee2||mVaD_Q zkYU?@p6?fVj;pm@WsN`o;$ON!!;O-nrawS^Hw+$Uc*(E;{W$Ak`tMijt%pJG@pScb JS?83{1OTpXW@rEa literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_6_active.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_6_active.png new file mode 100644 index 0000000000000000000000000000000000000000..f75e576b10bce3f67c495386f05b2a2fd28354e8 GIT binary patch literal 342 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5+Q%!8SxEdmP3W`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wK=HMnE{-7t>@%|c*065$2=w@T_H&C=fNxxL%`I!uhNl(_OLs9& z;Cvu_+yb4qOWl*-hKwD6@a3qtNtN@k{PiX4zu5 b7L;_B^Us=lOR=*~g6t)pzOL+d*=5*F6fHyfYJozsnIRD+&iT2y zsd*(pE(3#eQEFmIYKlU6W=V#EyQgnJie4%^P`t*|#WBR<^xFv=d7B*sSibKUG!nM` zHKG5nXn;85+Y1arLR%VEZ@65TV9ES?gYPk~>F3_{GJo;jqhkB4Yl?S}UgWP0{TwUy z#brFrP!VBOc>U8nLtt0!XXXXJMFMKJ_Q!6_Zv5SSWb2HhdA^&wzRrI(^GM#rwMqSx cE12F?G6~e2n#{R7&jaK@Pgg&ebxsLQ0BzD}bpQYW literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_7_active.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy_7_active.png new file mode 100644 index 0000000000000000000000000000000000000000..bbd92fe08c431494282452f17d887e340caf6913 GIT binary patch literal 348 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5+Q*`$vzzX=qQ%?ybsan8@p zP0cF-av2z$i&7IyQd1PlGfOfQ+&z5*QuI>Uf#RDzT^vI!POqJ0$aTm;#3kPBC5yg7 zhVrrr9$wqa_!Z&~Pv#JN#Hq8VWo@g#MeP@yZ?0V0C}6F;+tcpPtHXb09(S3v!kF#B zKKWC-Lar^f(%Y5THA%vsEh>4-!44VEL*-|~SMY9m^udDjK$+a-{d*ZSmd#aYTp`%8 z|Cn@+q)hyVXY+04H+bGWD4t_1F#oyWwWSf$i*BZdWGZ8BWIbXmTsz58s6UwP j=kw}~uUIWt@P6c7u6$wH%Oo#BkiR@#{an^LB{Ts5MVWo` literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/detector_buoy.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/detector_buoy.png new file mode 100644 index 0000000000000000000000000000000000000000..66ae39ff70b68d5911fbf6ca1e92182e421a7158 GIT binary patch literal 328 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5-I^m-eYF9Hh5W`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wK=JvWE{-7dYe^39 zydLQ5-_R_bXvw(9chz?R?si7sfM&%NZ`DpK{XDs2{`8sl_dSwMMW~&VH(=nn_%dS+ z-!ToB@bz9n>%T3?zP)P7BDRp*v#%fUe{iYP=AHR9XUVK5XUmq#u3&uln(vIio#Atz zjy?fd%jbnH+hhGA&P9Cq8d3Y}$_^H>&H9f#l$Nr{eV7m=^)%s=V0_!f{RI<(5_f?7 N;OXk;vd$@?2>@oecXI#$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/detector_buoy_powered.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/detector_buoy_powered.png new file mode 100644 index 0000000000000000000000000000000000000000..dad5d159734b88e0f88e1a7b89a6c30514f39e6c GIT binary patch literal 339 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5)T#0n27JO&EMW`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wK=D_#(v@fR*VJ@BV6HhRo1?WqDO>pmFRSD6XB&3Ov_x1L+%-CLu4jS^FOSwoaR~vA ziyxD8qBrtfOkF)Grgv?GUwO1mda=$o_BHqPHH!?kwN&0Q+!b3WH;e0J+&Xh_GXtAQ zMVlGBC(qY0T-qWa>r~>QIaRZytgywAnfb?`=-NMR7B8E$**sThJz%VG2*~g6t)pzOL+d*=5+7rSs;MX8A;sVNHOnI#zt?w-B@DSD~wK=Ik0E{-7_z@pA4DzpWArJFw~Rg~>uU&$u|Sq@*3?o;Ba(W941p$?9t7 z|8AP;R>AJpzWBJK#_d&YKSC3fqZn@NO#NNKSYW+YoiVN5f+5Xirk1*!##NB}Jzf1= J);T3K0RYwkb29({ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_0.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_0.png new file mode 100644 index 0000000000000000000000000000000000000000..7da9b36630bd3e1bef0c8de595d419a333089b18 GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5+74Y#Uakpc?IW`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wK=GNLE{-7`dD{wlDEqA6JNK? zdiH_I&3%Eo!>8*~g6t)pzOL+d*=5*Sbl;`RO#%wZW`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wK=GxXE{-7f++ERK#=9Z|Ngy8>ZPDh%ys5@NX8| zFs+{XW8J+;MG8+3eBJU%bx)&VLXU*Y{rnl+5zfX9MQF}5G{o^O< RU>^hWiKnZd%Q~loCIB5VbSnS= literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_2.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_2.png new file mode 100644 index 0000000000000000000000000000000000000000..503fa26d9090905c83a5986e8207ce3bd6daed7d GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5+7t(3mMX8A;sVNHOnI#zt?w-B@DSD~wK=GNLE{-7hpi>dDnSTc=GeQ zn`e}3jwK#2e55cX+xO;Gw%=~t4A$Rs*~g6t)pzOL+d*=5*S%u<-H*8zoOGeaUuobz*Y zQ}arITm}Z`qSVBa)D(sC%#sWRcTeAd6une-p!jr87sn8b({Cp!@-aCIu)JpTJjCuX zA%`PPWp%!M+tGX6es7}W8k@~O@YEzv*zRuDzGQOY+;cv@<&z?mk{AACG-g~Xa#Tbl zI6!mhKP}J6#jn0g8T8I52>E<=-Uh~NtMzSHsy?67sx0$#&T8or`^-nL%T$&*_%t3* zbr-(DZ@|_g$ehod?R#KZ&7_Jr{s#?*|L)0U+AZ-&T6E2x4ga!Db3ktQboFyt=akR{ E0PQGlSO5S3 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_4.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_4.png new file mode 100644 index 0000000000000000000000000000000000000000..d413b2046e0294ae90e851173a999a48616cb666 GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5*SIF=@#x(XDM%?ybsan8@p zP0cF-av2z$i&7IyQd1PlGfOfQ+&z5*QuI>Uf#Op=T^vI!PQRVBoA;1|fXn=Tfljsw z9JNj=(nTBB8w3S~KX_oal*4F6qtS_WwwhE{`38v(-g#MS zJ=G{*@2;9z@-24tyakO4JXgP|#YZrnK00~cl{wy;hXmTZG_P{cT5s~P?%u>Am8U1Z z?x>W1v@iQ5Cl8B(U9$z-o79f&m&JGtcF0`Y-}-|=Va}cnbL_Usfn4tC>gTe~DWM4f DUG{P; literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_5.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/powered_buoy_5.png new file mode 100644 index 0000000000000000000000000000000000000000..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P|%9=#F?UUf)9X?>h2o9d&{6l=UPTFth4*v zRL$(jdiL8kwz>r*8?{p7+0HsyM@AsHrjaMs7>!6Jt+b~RjEJ^?%#A0ohePAB=K;!L ziJp3^f*Jw=q3h}T{%TO*Us3KOP!LiKH9^XA1zWH!c&wO=0PWyVD^}zP0c+A#FO;FY zFJfYw-5r-i(&+wsa*7g{@qKP>!|3tv!Iz0AksG0v>VL^$eBT38a9veHJN^{hdb_x3{~7nw@U!;C%YHZi+N+kV&r3Nz z(Fw$hA#qjEk_@mI#aR6@JTNU+SYdZe>%XN|TmL2XN9}E4AGMEuCAHrl!p0XF;Xj1g zr#m!TKRSP-4cPO8yw=5Dn8%3UVL>if?i@Y>1^?5+!4!I3@uyp4HYfGwzHr;T-MIiy GKKmzn#oogJ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/potion.png b/src/main/resources/assets/sextiarysector/textures/guis/potion.png index 2a4a8d08396d65bf74e4f01dd2bb71b071912205..3c5652c8833547538d4ca2aa315621d13fc3ef8e 100644 GIT binary patch literal 1683 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6|H(?D8gCb z5n0T@z%2~Ij105pNB{-dOFVsD+3z#)@~Sep+nxyq3dv@MM3gw^=jNv7l>oU649-QV zi6yBi3gww484B*6z5ywEsq734tlvFd978H@y}i9ZdrG;?fsg0ITliSr74_0yb-Ig* zTeo^`m~c3!^+CLX#dk?2NnSqwb*=xHofga%QgnQix~X{2tda>w4lWeozUkGT-+t%w zmwBhxcYC@Ntrx%Z;f`(Gq92v^_um(LYMnOnTdmP`!gBtv+90p=Pj>04uWxP5sQvNb zX^nHiF}>c?@g_^B_!sdci#P0imnGs__(q|p>Rw>@uZPDg`RmW^l>79!FHwiN;PKC> zdwa^a8{Rp5*zS6)?T0o_R8T1TfZVz z`IqVJyv+!Ku?cfF6Z9v*+J>L&!=wfcz#xcM}E1VOXRfqsadNM|9?F5y$BUW(3Dq8h7gskt zpL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fb>6F$v=^2UYP0wGk-)9nN=;*ldcD~E<%atEaS-vg2 zzw1)}{swiv1Gg?_#=XxmW&8dk;r`qCcdGC3T>kt~{KFORhO6ew4Xt(@XRqG6_t&$M zeXLb!f2)q1QFM>5t1+0r^kVPpxod-NEuVROxuE-5jh_7JWiIQl{|~5In#%ok4hWQ<3$?`g^JeoXr`$HE+KEu5A4H@ zJ9%dO&inuAS5@+c@Kpv^_SJk8ZjGGI(46_#x8`4Iwhq@>?Ygi3ww!J_e(&x1GeKUR zpFe*-mT>>ZjTPI?&CH|{E$r?4YK)n9%4EOdMHd6jj$?*7@ZJ$(N6dBx29 z5nUY`Z?h8kul=i(3B0v9`1kAxYpsi~zj|esui~(I)plQJRWJY@ zM(5Gn=zhjTH}Aud4w`TM;@QOI^7hRvmR zdi{s5xkt)OU!1=FeS2}q$^bFLr|k1I7_J&EkUD*JYVEArxqj)(GIs_XxLmbO*Q76t(ZYB2;DfGM78ra@grO$Uw|Ng#R}{x8_iXun4C{mn@2 QPzE6IboFyt=akR{05!|rOaK4? diff --git a/src/main/resources/assets/sextiarysector/textures/items/buoy/boarding_buoy.png b/src/main/resources/assets/sextiarysector/textures/items/buoy/boarding_buoy.png new file mode 100644 index 0000000000000000000000000000000000000000..324646d5cbce764e70ef9f6345381aaed07e6b3e GIT binary patch literal 319 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=Dh+L6~vJ#O${~LG}_)Usv{fjM98+`Zk<7sn8b)5(AS|F>sWZQz`KWc%hSo@sio!1#OFt4C%J z|Ns9Vv9WctlrulGvakd?4SgKGGu zuPkEoxdXhpRTqYE>n+edmZke6DnVJOWYSrc;2bsM-Ciy)nA_+5_}^3*{lVFv!R)1E z!z8uES_Ohi1cNlbNr6 apDRCWYo(9ql!MA3&w0A~xvX;S@h0q-8KUVpgx@q6MB9=1S^S@Yn^W5^n?Kj<5&9**s!zYd_ S;MF3KpFCatT-G@yGywpq19<%a literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/fluid/gold_fluid_bucket.png b/src/main/resources/assets/sextiarysector/textures/items/fluid/gold_fluid_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..f8a05cef52ffdff420ea2f7bbb727ce591d39abb GIT binary patch literal 398 zcmV;90df9`P)UM^H`Z461s9PSmY} z4%eg(|1`lA!P>NYZCD5ipSt_reRucn-Gl#z)<-&yQ`NR%7!4oCu@ZmKCtS{fk<|%2 z{&?pSui8zdwZ+T%Hu&^JZR=oa*~$t3TWi*yVBAq}%A4$=XNF3K>`5mvA0uKKSor;^Gf4ST|^z^-kGU zVI#mW$8K-=nNp_oe1;QGdo21y8MfNJI_rK*`QM?xdPSDm0a>;mYvot!Px!TH>C|5$ zEB!a>tgdHY%Gn^(EA=PEj^)9%sJ}T33M~mn@}DYdKlsMk6qj#hzq#r+m!p72-{TPW zqs@1X&TZ<^=vu|Ptt>#vH@HPWqK(mE-t+l)trz6|esoShetUK2wp{Ubufr-QsXVFV wYj|GS`>|S`%2Mot zpkQI)6??~qkYEt687qU}?Qy3#)eQUb{n;7#W2wByhusY^#xR<`v332dN)bd+B2W2QU0sc)qYQlc^DGXM8iW<*KYYNR?_`@ fUv>V&|34T`@9F!lD|~h@(6bDlu6{1-oD!M<4dj4l literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/dessert/chocolate.png b/src/main/resources/assets/sextiarysector/textures/items/food/dessert/chocolate.png new file mode 100644 index 0000000000000000000000000000000000000000..23c303e0ec923464488126b59174ad2925222c99 GIT binary patch literal 414 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=Dh+L6~vJ#O${~LG}_)Usv|~OuQWO@-M^hngE4lGeaUuobz*YQ}arITm}Z`qSVBa z)D(sC%#sWRcTeAd6une-1_nkZPZ!4!i_=#p@Ap0&Akw;DTsdM9XOI)SuEmvwd|oe= z^yVJDxIgrdILkzyMlP1jLpSaw**G6l@On^xcN}LB{>82O4J?3S^}l zoYdYb_Wh1!kh_;Gwp8xR;h^}(YrpSEdSYeP>Z6g;BtPv(VyC#rL)M^-=ovgRtOb@* zMgPBaZQYuockRL^m)pj^Y<;IzoewKmdvN~WL*g6)Ei;~ObhQKplc%en%Q~loCIIn3 Bo}mB$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/attack_rust_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/attack_rust_unit.png new file mode 100644 index 0000000000000000000000000000000000000000..3e7958572194304d3f731d8649f301bb2df0ead7 GIT binary patch literal 1293 zcmV+o1@iidP)WFU8GbZ8()Nlj2>E@cM*00ePKL_t(o!|j*Pj}%1| z$3L&Cr+aq{5+VlNli7<28ZZ1E#u!5gA%?8-lB4YL{U}p+;yDG+r3^7=NyOu1@IUXkt8jmD86ruIoNKG z@!I}<+`V&W2rt^Ykmo&~{P8PKS0A&n(P4e8jaZ@E?NSs4f|LaEwsVe}zNYk+ zz`6W>Q7T*!s6gkk+UfFq%Arfyb3;E!sQ&yM8zSJn|4qxhDS|8YuzV@y{R>&`c==Kw zv0Wtm;Mgub|3zRhhgE4+ZxtveIK6i<kbKsNB~#GJBD;{ z?_$cK3t3(3OLHkl=0hZo%x5gkrYz0&D@9dMr0gZKvj`|kh^92dsR8s}1zP@oX)fjH zm5imi6bu}_n(@u~X;j0xp$H~yZgS@-2w05@7#vII1E{KS^h(Cv*%a@oKdXigswz0A zg!9Tjztc*&?)>>?2cP7I6#DhAF z4N<8uwUF`U*=d|A$FJSw)|mi)>rBdt8$lnwd`1xBI3`Jw9f(kUqm^n|#C7l2eqDQo z6W1~pKMwg{oJl!xJ!5eu<UyTDWT2kQG_61OlmstLFvufe_d%OW!A zoSW=!^!9jHH2QsBI5vA5OiWAw@ZiCN7k`9a*pU4Tit5(H-b}g900000NkvXXu0mjf D-WFU8GbZ8()Nlj2>E@cM*00e(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HLkV1gCIGgbfq literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/defense_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/defense_unit.png new file mode 100644 index 0000000000000000000000000000000000000000..710ecea1a3338729a80b530a6d84390ccfe7add9 GIT binary patch literal 1243 zcmV<11SI>3P)cy;03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00citL_t(o!|j*PZX87r z#(&i_Ue6lGQ3Mwxk|5^>M_&kN^A@}Xk}W$x{y>DR`~hMc=Q(%+xjdS-WaZP>k&mU?Ekr>EBBp9pha+2td1Mt3}@CB-6!+2bz`{NfgX}fcIrvXTZ-^+3PCjkh1!TS|VD{^VI zh&2q{8{>j%_u9C)Y!;QQbK}42kPr+E|BaqI<_jI?viaFo@ zn$E@@I_tOT?p%puJ6Gwf->Ool2(g=$gy8YPFHem?uXptMQSXrVLLadKR#ig5u!>CG z?JIQFzKhbrxU_bI?(SyA;y0rRnL{ik6n%P!ujw83&PeZ8FW>E=FV1B+uIyb{^Xl9t&PyvQwX2Yu3 z1lU=`^`=Ogq_kSC=>QVvaETk$Z5eLz|9!5LlgFg)u1f7R0IgPw`PMux zO&}3O<1W@LBtrDesuM_@VG{rhoI|Q^W~l0P0H0j^lt=r|$VyM|*&jFzu{!XIsScw( zJcz1NYKW<;B44MoG-FXj)Ga3&lKxcKo$@%c?ombHiMRaHU=v9da$EX$t- zS@t0;=Xw83@S(AnfcKufpR>Fi3*dtX58nO}dfSe*e*mvVGd000McNliru-vST|IS-c$e{TQ)1N=!u zK~#9!?OMN2+dvfl&M{OGicpDQ>XIyE02f87I)ons9oVuXbz?zD9V!|zR${2+W~zjQ zs{SEeGLQx_R6^h&kqJ*sl~|Y%$z2C(3mhMJu`iCD`jbxayL+*dckkYP_nrwjXti35 zQVLDez!(D|1di<2zq-0gpa@YuTjve*dOZLDrS!=suU{pie743L$Ye4ggh10Y5JFs; z*RK*$K0Eb*)B{F53(aPed4t;W@(JrbI6&X6oe2E#sJ0u zLI6zz``1L{%88Ku#YW>}qrd-yjmG%%wGdm0G;sP`IJf^0mkj-Xc zSr!1m8P82mV^xx9 zOl{;IaCvzNUDvryG@f`5kYQ*lnOW>SK$fAYVrG$VgJE-VVaJ2!@{}!su(`NVFf!$m?jser+yRyTG`4fN-k3HTPPr zmT2lba6%+V&3&v4kc70>Pz^9Hj4!YO#yu;XE&-7OFXQ{)7$8Z!J`fL(t^V@*y>ilc z0ufbz9f+#H4&q)7?mG*V%Vlm^%d#x@T2?P{G2pp<-l_hIAgdQk1C0AVFI)nm>aJ`R zIH^lObE><3t=(?B*RpzvGk~i1^PIjEDN-Z~e*v&It5|z5 Date: Tue, 3 Mar 2015 15:04:34 +0900 Subject: [PATCH 69/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E6=BC=8F?= =?UTF-8?q?=E6=96=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・漏斗を追加 ・銅パイプを追加 ・タンクを追加 ・タンクボートを追加 ・銅ツールを追加 --- build.gradle | 2 +- .../java/shift/sextiarysector/SSBlocks.java | 29 +- .../java/shift/sextiarysector/SSEntitys.java | 6 +- .../java/shift/sextiarysector/SSEvents.java | 3 + .../shift/sextiarysector/SSGuiHandler.java | 8 + .../java/shift/sextiarysector/SSItems.java | 34 +- .../shift/sextiarysector/SSOreDictionary.java | 3 + .../shift/sextiarysector/SextiarySector.java | 16 +- .../api/event/VanillaFoodHandler.java | 50 +- .../sextiarysector/block/BlockFunnel.java | 98 ++++ .../shift/sextiarysector/block/BlockPipe.java | 106 ++++ .../shift/sextiarysector/block/BlockTank.java | 148 ++++++ .../shift/sextiarysector/block/BlockTrap.java | 147 ++++++ .../sextiarysector/block/BlockWoodHopper.java | 50 +- .../container/ContainerFunnel.java | 209 ++++++++ .../container/ContainerMPRepair.java | 210 ++------ .../entity/EntityMineboatTank.java | 190 +++++++ .../event/CommonEventHandler.java | 320 ++++++------ .../event/OreDictionaryEventHandler.java | 33 ++ .../event/PlayerUnitEventHandler.java | 4 +- .../shift/sextiarysector/gui/GuiFunnel.java | 140 +++++ .../shift/sextiarysector/item/ItemKnife.java | 101 ++-- .../sextiarysector/item/ItemMineboat.java | 183 +++---- .../sextiarysector/item/ItemMineboatTank.java | 15 + .../shift/sextiarysector/item/ItemSSAxe.java | 12 + .../sextiarysector/item/ItemSSPickaxe.java | 11 + .../shift/sextiarysector/item/ItemScoop.java | 162 +++--- .../sextiarysector/module/ModuleSandpit.java | 16 +- .../module/ModuleToolMaterial.java | 44 ++ .../sextiarysector/module/ModuleTrap.java | 200 ++++++++ .../sextiarysector/proxy/ClientProxy.java | 12 + .../sextiarysector/proxy/CommonProxy.java | 2 + .../sextiarysector/recipe/RecipesCore.java | 14 + .../recipe/RecipesFurnaceCraft.java | 4 +- .../sextiarysector/recipe/RecipesTool.java | 178 +++---- .../renderer/block/RendererFunnel.java | 211 ++++++++ .../renderer/block/RendererHole.java | 393 +++++++------- .../renderer/block/RendererPipe.java | 4 +- .../renderer/block/RendererSteamMotor.java | 94 ++-- .../renderer/block/RendererTank.java | 168 ++++++ .../renderer/entity/RenderMineboat.java | 6 +- .../renderer/entity/RenderMineboatTank.java | 128 +++++ .../renderer/model/ModelTank.java | 77 +++ .../tileentity/TileEntityFunnel.java | 480 ++++++++++++++++++ .../tileentity/TileEntityPump.java | 91 ++-- .../tileentity/TileEntityTank.java | 130 +++++ .../tileentity/TileEntityTrap.java | 133 +++++ .../assets/sextiarysector/lang/en_US.lang | 14 +- .../assets/sextiarysector/lang/ja_JP.lang | 237 ++++++--- .../textures/blocks/funnel_inside.png | Bin 0 -> 401 bytes .../textures/blocks/funnel_outside.png | Bin 0 -> 476 bytes .../textures/blocks/funnel_top.png | Bin 0 -> 364 bytes .../sextiarysector/textures/blocks/trap.png | Bin 0 -> 595 bytes ...pper_inside.png => wood_hopper_inside.png} | Bin ...er_outside.png => wood_hopper_outside.png} | Bin .../{hopper_top.png => wood_hopper_top.png} | Bin .../sextiarysector/textures/guis/funnel.png | Bin 0 -> 1333 bytes .../sextiarysector/textures/guis/hopper.png | Bin 0 -> 1081 bytes .../sextiarysector/textures/items/funnel.png | Bin 0 -> 781 bytes .../textures/items/mineboat_tank.png | Bin 0 -> 461 bytes .../textures/items/tool/copper_axe.png | Bin 0 -> 314 bytes .../textures/items/tool/copper_hoe.png | Bin 0 -> 287 bytes .../textures/items/tool/copper_pickaxe.png | Bin 0 -> 326 bytes .../textures/items/tool/copper_shovel.png | Bin 0 -> 297 bytes .../textures/items/tool/copper_sword.png | Bin 0 -> 348 bytes .../textures/items/tool/diamond_axe.png | Bin 0 -> 171 bytes .../textures/items/tool/ninja_axe.png | Bin 0 -> 313 bytes .../textures/items/tool/ninja_hoe.png | Bin 0 -> 302 bytes .../textures/items/tool/ninja_pickaxe.png | Bin 0 -> 328 bytes .../textures/items/tool/ninja_shovel.png | Bin 0 -> 311 bytes .../textures/items/tool/ninja_sword.png | Bin 0 -> 338 bytes .../textures/models/copper_pipe.png | Bin 0 -> 1462 bytes .../textures/models/iron_pipe.png | Bin 1135 -> 1198 bytes .../sextiarysector/textures/models/tank.png | Bin 0 -> 958 bytes 74 files changed, 3860 insertions(+), 1066 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockFunnel.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockTank.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockTrap.java create mode 100644 src/main/java/shift/sextiarysector/container/ContainerFunnel.java create mode 100644 src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java create mode 100644 src/main/java/shift/sextiarysector/event/OreDictionaryEventHandler.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiFunnel.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemMineboatTank.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemSSAxe.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemSSPickaxe.java create mode 100644 src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java create mode 100644 src/main/java/shift/sextiarysector/module/ModuleTrap.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererFunnel.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererTank.java create mode 100644 src/main/java/shift/sextiarysector/renderer/entity/RenderMineboatTank.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelTank.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityFunnel.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityTank.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityTrap.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/funnel_inside.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/funnel_outside.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/funnel_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/trap.png rename src/main/resources/assets/sextiarysector/textures/blocks/{hopper_inside.png => wood_hopper_inside.png} (100%) rename src/main/resources/assets/sextiarysector/textures/blocks/{hopper_outside.png => wood_hopper_outside.png} (100%) rename src/main/resources/assets/sextiarysector/textures/blocks/{hopper_top.png => wood_hopper_top.png} (100%) create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/funnel.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/hopper.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/funnel.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/mineboat_tank.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/copper_axe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/copper_hoe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/copper_pickaxe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/copper_shovel.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/copper_sword.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/diamond_axe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/ninja_axe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/ninja_hoe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/ninja_pickaxe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/ninja_shovel.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/ninja_sword.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/copper_pipe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/tank.png diff --git a/build.gradle b/build.gradle index 136dca5..e5c5389 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.6.a-${project.minecraft.version}" +version = "2.1.6.b-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 9f3b948..9057ece 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -16,6 +16,7 @@ import shift.sextiarysector.block.BlockFluidFurnace; import shift.sextiarysector.block.BlockFoodSmokers; import shift.sextiarysector.block.BlockFreezer; +import shift.sextiarysector.block.BlockFunnel; import shift.sextiarysector.block.BlockGFTank; import shift.sextiarysector.block.BlockGearBox; import shift.sextiarysector.block.BlockGearShaft; @@ -47,6 +48,8 @@ import shift.sextiarysector.block.BlockSmallWindmill; import shift.sextiarysector.block.BlockSquare; import shift.sextiarysector.block.BlockSteamMotor; +import shift.sextiarysector.block.BlockTank; +import shift.sextiarysector.block.BlockTrap; import shift.sextiarysector.block.BlockWindmill; import shift.sextiarysector.block.BlockWood; import shift.sextiarysector.block.BlockWoodHopper; @@ -56,6 +59,7 @@ import shift.sextiarysector.item.ItemBlockFigure; import shift.sextiarysector.item.ItemBlockFluidCrafter; import shift.sextiarysector.item.ItemBlockGearShaft; +import shift.sextiarysector.item.ItemBlockMeta; import shift.sextiarysector.item.ItemBlockMonitor; import shift.sextiarysector.tileentity.TileEntityFan; import shift.sextiarysector.tileentity.TileEntityFarmland; @@ -64,6 +68,7 @@ import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityFoodSmokers; import shift.sextiarysector.tileentity.TileEntityFreezer; +import shift.sextiarysector.tileentity.TileEntityFunnel; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityGearBox; import shift.sextiarysector.tileentity.TileEntityGearShaft; @@ -82,6 +87,8 @@ import shift.sextiarysector.tileentity.TileEntitySmallWindmill; import shift.sextiarysector.tileentity.TileEntitySquare; import shift.sextiarysector.tileentity.TileEntitySteamMotor; +import shift.sextiarysector.tileentity.TileEntityTank; +import shift.sextiarysector.tileentity.TileEntityTrap; import shift.sextiarysector.tileentity.TileEntityWindmill; import shift.sextiarysector.tileentity.TileEntityWood; import cpw.mods.fml.common.registry.GameRegistry; @@ -107,12 +114,16 @@ public class SSBlocks { public static Block square; - public static Block ironPipe; + public static Block tank; + public static Block funnel; + public static Block copperPipe; public static Block blueFire; public static Block figure; + public static Block trap; + //液体 public static Block drinkingWater; public static Block hotSprings; @@ -278,8 +289,16 @@ public static void initBlicks() { GameRegistry.registerBlock(square, ItemBlockDirection.class, "Square"); GameRegistry.registerTileEntity(TileEntitySquare.class, "Square"); - ironPipe = new BlockPipe().setBlockName("ss.iron_pipe").setBlockTextureName("planks_oak"); - GameRegistry.registerBlock(ironPipe, "IronPipe"); + tank = new BlockTank().setBlockName("ss.tank").setBlockTextureName("glass").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(tank, "Tank"); + GameRegistry.registerTileEntity(TileEntityTank.class, "SSTank"); + + funnel = new BlockFunnel().setBlockName("ss.funnel").setBlockTextureName("sextiarysector:funnel").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(funnel, "Funnel"); + GameRegistry.registerTileEntity(TileEntityFunnel.class, "Funnel"); + + copperPipe = new BlockPipe().setBlockName("ss.copper_pipe").setBlockTextureName("planks_oak"); + GameRegistry.registerBlock(copperPipe, "CopperPipe"); GameRegistry.registerTileEntity(TileEntityPipe.class, "SSPipe"); woodGrate = (new BlockSSPane(ID + ":wood_grate", ID + ":wood_grate", Material.wood, false, 0)).setHardness(0.5F).setBlockName("ss.wood_grate").setCreativeTab(SextiarySectorAPI.TabSSCore); @@ -319,6 +338,10 @@ public static void initBlicks() { GameRegistry.registerBlock(figure, ItemBlockFigure.class, "Figure"); GameRegistry.registerTileEntity(TileEntityFigure.class, "SSFigure"); + trap = new BlockTrap().setBlockName("ss.trap").setBlockTextureName("sextiarysector:wood_grate").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(trap, ItemBlockMeta.class, "Trap"); + GameRegistry.registerTileEntity(TileEntityTrap.class, "SSTrap"); + //液体 drinkingWater = new BlockSSFluid(SSFluids.drinkingWater).setBlockName("ss.drinking_water").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(drinkingWater, "DrinkingWater"); diff --git a/src/main/java/shift/sextiarysector/SSEntitys.java b/src/main/java/shift/sextiarysector/SSEntitys.java index df10f15..263ccef 100644 --- a/src/main/java/shift/sextiarysector/SSEntitys.java +++ b/src/main/java/shift/sextiarysector/SSEntitys.java @@ -1,13 +1,15 @@ package shift.sextiarysector; import shift.sextiarysector.entity.EntityMineboatChest; +import shift.sextiarysector.entity.EntityMineboatTank; import cpw.mods.fml.common.registry.EntityRegistry; public class SSEntitys { - public static void initEntity(){ + public static void initEntity() { - EntityRegistry.registerModEntity(EntityMineboatChest.class, "MineboatChest", 0, SextiarySector.instance, 250, 5, true); + EntityRegistry.registerModEntity(EntityMineboatChest.class, "MineboatChest", 0, SextiarySector.instance, 250, 5, true); + EntityRegistry.registerModEntity(EntityMineboatTank.class, "EntityMineboatTank", 1, SextiarySector.instance, 250, 5, true); } diff --git a/src/main/java/shift/sextiarysector/SSEvents.java b/src/main/java/shift/sextiarysector/SSEvents.java index a50fcc1..38a9160 100644 --- a/src/main/java/shift/sextiarysector/SSEvents.java +++ b/src/main/java/shift/sextiarysector/SSEvents.java @@ -6,6 +6,7 @@ import shift.sextiarysector.event.ClientEventHandler; import shift.sextiarysector.event.CommonEventHandler; import shift.sextiarysector.event.HUDEventHandler; +import shift.sextiarysector.event.OreDictionaryEventHandler; import shift.sextiarysector.event.PlayerStatusEventHandler; import shift.sextiarysector.event.PlayerUnitEventHandler; import shift.sextiarysector.event.WorldEventHandler; @@ -32,6 +33,8 @@ public static void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new PlayerUnitEventHandler()); MinecraftForge.EVENT_BUS.register(new VanillaFoodHandler()); + MinecraftForge.EVENT_BUS.register(new OreDictionaryEventHandler()); + if (event.getSide().isClient()) { MinecraftForge.EVENT_BUS.register(new ClientEventHandler()); } diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index 10d88d7..ef7c629 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -7,6 +7,7 @@ import shift.sextiarysector.container.ContainerCraftFurnace; import shift.sextiarysector.container.ContainerFluidMachineBase; import shift.sextiarysector.container.ContainerFreezer; +import shift.sextiarysector.container.ContainerFunnel; import shift.sextiarysector.container.ContainerGFTank; import shift.sextiarysector.container.ContainerLargeFurnace; import shift.sextiarysector.container.ContainerMPRepair; @@ -20,6 +21,7 @@ import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiFoodSmokers; import shift.sextiarysector.gui.GuiFreezer; +import shift.sextiarysector.gui.GuiFunnel; import shift.sextiarysector.gui.GuiGFTank; import shift.sextiarysector.gui.GuiInventoryNext; import shift.sextiarysector.gui.GuiLargeFurnace; @@ -39,6 +41,7 @@ import shift.sextiarysector.tileentity.TileEntityCraftFurnace; import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; import shift.sextiarysector.tileentity.TileEntityFreezer; +import shift.sextiarysector.tileentity.TileEntityFunnel; import shift.sextiarysector.tileentity.TileEntityGFTank; import shift.sextiarysector.tileentity.TileEntityLargeFurnace; import shift.sextiarysector.tileentity.TileEntityMagicFurnace; @@ -76,6 +79,8 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world, int case 10: return new ContainerMPRepair(player.inventory, world, x, y, z, player); + case 11: + return new ContainerFunnel(player.inventory, (TileEntityFunnel) world.getTileEntity(x, y, z)); case 20: case 21: @@ -159,6 +164,9 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int case 10: return new GuiMPRepair(player.inventory, world, x, y, z); + case 11: + return new GuiFunnel(player.inventory, (TileEntityFunnel) world.getTileEntity(x, y, z)); + case 20: return new GuiMillstone(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); case 21: diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index b778784..59cbb6b 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -2,8 +2,12 @@ import java.util.ArrayList; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemHoe; +import net.minecraft.item.ItemSpade; +import net.minecraft.item.ItemSword; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.item.ItemBottle; import shift.sextiarysector.item.ItemCalendar; @@ -20,7 +24,10 @@ import shift.sextiarysector.item.ItemKnife; import shift.sextiarysector.item.ItemLavaBottle; import shift.sextiarysector.item.ItemMineboat; +import shift.sextiarysector.item.ItemMineboatTank; import shift.sextiarysector.item.ItemRucksack; +import shift.sextiarysector.item.ItemSSAxe; +import shift.sextiarysector.item.ItemSSPickaxe; import shift.sextiarysector.item.ItemScoop; import shift.sextiarysector.item.ItemSeasonStone; import shift.sextiarysector.item.ItemShiftHat; @@ -30,6 +37,7 @@ import shift.sextiarysector.item.ItemUnit; import shift.sextiarysector.item.ItemWaterBottle; import shift.sextiarysector.item.ItemWateringCan; +import shift.sextiarysector.module.ModuleToolMaterial; import cpw.mods.fml.common.registry.GameRegistry; public class SSItems { @@ -148,10 +156,18 @@ public class SSItems { public static Item goldKnife; public static Item diamondKnife; + //道具 バニラ + public static Item copperShovel; + public static Item copperPickaxe; + public static Item copperAxe; + public static Item copperSword; + public static Item copperHoe; + public static Item woodWateringCan; //水産 public static Item mineboatChest; + public static Item mineboatTank; public static Item laver; @@ -447,6 +463,19 @@ public static void initItems() { GameRegistry.registerItem(goldKnife, "GoldKnife"); GameRegistry.registerItem(diamondKnife, "DiamondKnife"); + //バニラ + copperShovel = new ItemSpade(ModuleToolMaterial.copper).setUnlocalizedName("ss.copper_shovel").setTextureName("sextiarysector:tool/copper_shovel").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(copperShovel, "CopperShovel"); + copperPickaxe = new ItemSSPickaxe(ModuleToolMaterial.copper).setUnlocalizedName("ss.copper_pickaxe").setTextureName("sextiarysector:tool/copper_pickaxe").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(copperPickaxe, "CopperPickaxe"); + copperAxe = new ItemSSAxe(ModuleToolMaterial.copper).setUnlocalizedName("ss.copper_axe").setTextureName("sextiarysector:tool/copper_axe").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(copperAxe, "CopperAxe"); + copperSword = new ItemSword(ModuleToolMaterial.copper).setUnlocalizedName("ss.copper_sword").setTextureName("sextiarysector:tool/copper_sword").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(copperSword, "CopperSword"); + copperHoe = new ItemHoe(ModuleToolMaterial.copper).setUnlocalizedName("ss.copper_hoe").setTextureName("sextiarysector:tool/copper_hoe").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(copperHoe, "CopperHoe"); + //Item i = Items.iron_axe; + woodWateringCan = new ItemWateringCan(ToolMaterial.WOOD).setUnlocalizedName("ss.wood_watering_can").setTextureName("wood_watering_can"); GameRegistry.registerItem(woodWateringCan, "WoodWateringCan"); @@ -454,6 +483,9 @@ public static void initItems() { mineboatChest = new ItemMineboat().setUnlocalizedName("ss.mineboat_chest").setTextureName("sextiarysector:mineboat_chest"); GameRegistry.registerItem(mineboatChest, "MineboatChest"); + mineboatTank = new ItemMineboatTank().setUnlocalizedName("ss.mineboat_tank").setTextureName("sextiarysector:mineboat_tank"); + GameRegistry.registerItem(mineboatTank, "MineboatTank"); + laver = new Item().setUnlocalizedName("ss.laver").setTextureName("sextiarysector:food/fish/laver").setCreativeTab(SextiarySectorAPI.TabSSFishery); GameRegistry.registerItem(laver, "Laver"); @@ -522,7 +554,7 @@ public static void initItems() { riceBall = new ItemFoodDrink(4, 0.6f, 0, 0, 4, 6.0f, false).setUnlocalizedName("ss.rice_ball").setTextureName("sextiarysector:food/rice/rice_ball").setCreativeTab(SextiarySectorAPI.TabSSCooking); GameRegistry.registerItem(riceBall, "RiceBall"); - curryRice = new ItemFoodDrink(9, 12.6f, 0, 0, 15, 2.0f, false).setUnlocalizedName("ss.curry_rice").setTextureName("sextiarysector:food/rice/curry_rice").setCreativeTab(SextiarySectorAPI.TabSSCooking); + curryRice = new ItemFoodDrink(9, 12.6f, 0, 0, 15, 2.0f, false).setUnlocalizedName("ss.curry_rice").setTextureName("sextiarysector:food/rice/curry_rice").setContainerItem(Items.bowl).setCreativeTab(SextiarySectorAPI.TabSSCooking); GameRegistry.registerItem(curryRice, "CurryRice"); carrotSoup = new ItemSoup(2, 0.6f, 4, 1, 0, 0.0f, false).setUnlocalizedName("ss.carrot_soup").setTextureName("sextiarysector:food/soup/carrot_soup"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index 3dd26ae..6dc1331 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -120,11 +120,14 @@ public static void init() { } OreDictionary.registerOre("fluidSap", new ItemStack(SSItems.sapBottle)); + OreDictionary.registerOre("fluidSap", new ItemStack(SSBlocks.fluidCrafter, 1, SSFluids.sap.getID())); //食べ物 OreDictionary.registerOre("condimentCurryPowder", SSItems.curryPowder); OreDictionary.registerOre("condimentSalt", SSItems.salt); + //OreDictionary.registerOre("salt", SSItems.salt); + //OreDictionary.registerOre("itemSalt", SSItems.salt); OreDictionary.registerOre("algaLaver", SSItems.laver); OreDictionary.registerOre("cookingLaver", SSItems.laverRoasted); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index fe50802..8c9f913 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -18,6 +18,8 @@ import shift.sextiarysector.module.ModuleSandpit; import shift.sextiarysector.module.ModuleSeason; import shift.sextiarysector.module.ModuleStatistics; +import shift.sextiarysector.module.ModuleToolMaterial; +import shift.sextiarysector.module.ModuleTrap; import shift.sextiarysector.packet.SSPacketHandler; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.plugin.SSPlugins; @@ -30,10 +32,10 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkRegistry; -@Mod(modid = SextiarySectorAPI.MODID, version = SextiarySector.VERSION, dependencies = SextiarySector.DEPENDENCY) +@Mod(modid = SextiarySector.MODID, version = SextiarySector.VERSION, dependencies = SextiarySector.DEPENDENCY) public class SextiarySector { - //public static final String MODID = "SextiarySector"; + public static final String MODID = "SextiarySector"; public static final String VERSION = "2.1.6"; @Mod.Instance("SextiarySector") @@ -70,9 +72,15 @@ public void preInit(FMLPreInitializationEvent event) modules.add(ModuleChunkLoader.getInstance()); modules.add(ModuleSeason.getInstance()); modules.add(ModuleAgriculture.getInstance()); + modules.add(ModuleTrap.getInstance()); modules.add(ModuleSandpit.getInstance()); modules.add(ModuleHotSprings.getInstance()); modules.add(ModuleFigure.getInstance()); + modules.add(ModuleToolMaterial.getInstance()); + + for (IModule m : modules) { + m.preInit(event); + } SSRecipes.deleteVanillaRecipe(); SSRecipes.initRecipeLists(); @@ -90,10 +98,6 @@ public void preInit(FMLPreInitializationEvent event) SSOreDictionary.init(); - for (IModule m : modules) { - m.preInit(event); - } - /* GameRegistry.registerTileEntity(TileEmptyCauldron.class, "SSCauldron"); Iterable> cc = new ArrayList(); diff --git a/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java b/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java index 42c0994..58cd595 100644 --- a/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java +++ b/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java @@ -15,126 +15,126 @@ public class VanillaFoodHandler { /**バニラの食べ物を食べた時の動作*/ @SubscribeEvent - public void onPlayerEatenEvent(PlayerEatenEvent event) { + public void onPlayerEatenEvent(PlayerEatenEvent event) { ItemStack food = event.food; EntityPlayer player = (EntityPlayer) event.entity; //水入り瓶 - if(food.getItem() == Items.potionitem && food.getItemDamage()==0){ + if (food.getItem() == Items.potionitem && food.getItemDamage() == 0) { SextiarySectorAPI.playerManager.addMoistureStats(player, 3, 0); player.addExhaustion(4.5f); - player.addPotionEffect(new PotionEffect(Potion.hunger.getId(),30,0)); + player.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 30, 0)); } //きのこシチュー - if(food.getItem() == Items.mushroom_stew){ + if (food.getItem() == Items.mushroom_stew) { SextiarySectorAPI.playerManager.addMoistureStats(player, 2, 2); } //鳥 - if(food.getItem() == Items.chicken){ + if (food.getItem() == Items.chicken) { SextiarySectorAPI.playerManager.addMoistureStats(player, 1, 0); } - if(food.getItem() == Items.cooked_chicken){ + if (food.getItem() == Items.cooked_chicken) { SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 9.2f); SextiarySectorAPI.playerManager.addStaminaStats(player, 4, 2); } //豚 - if(food.getItem() == Items.porkchop){ + if (food.getItem() == Items.porkchop) { SextiarySectorAPI.playerManager.addMoistureStats(player, 1, 0); } - if(food.getItem() == Items.cooked_porkchop){ + if (food.getItem() == Items.cooked_porkchop) { SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 12.2f); SextiarySectorAPI.playerManager.addStaminaStats(player, 5, 1); } //牛 - if(food.getItem() == Items.beef){ + if (food.getItem() == Items.beef) { SextiarySectorAPI.playerManager.addMoistureStats(player, 1, 0); } - if(food.getItem() == Items.cooked_beef){ + if (food.getItem() == Items.cooked_beef) { SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 16.2f); SextiarySectorAPI.playerManager.addStaminaStats(player, 7, 4); } //魚 - if(food.getItem() == Items.fish){ + if (food.getItem() == Items.fish) { SextiarySectorAPI.playerManager.addMoistureStats(player, 4, 2); - player.addPotionEffect(new PotionEffect(Potion.hunger.getId(),600,0)); + player.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 600, 0)); } - if(food.getItem() == Items.cooked_fished){ + if (food.getItem() == Items.cooked_fished) { SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 6.2f); SextiarySectorAPI.playerManager.addStaminaStats(player, 6, 2); } //リンゴ - if(food.getItem() == Items.apple){ + if (food.getItem() == Items.apple) { - SextiarySectorAPI.playerManager.addMoistureStats(player, 1,1.0f); + SextiarySectorAPI.playerManager.addMoistureStats(player, 1, 1.0f); } //スイカ - if(food.getItem() == Items.melon){ + if (food.getItem() == Items.melon) { - SextiarySectorAPI.playerManager.addMoistureStats(player, 3,1.0f); + SextiarySectorAPI.playerManager.addMoistureStats(player, 3, 1.0f); } //パン - if(food.getItem() == Items.bread){ + if (food.getItem() == Items.bread) { SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 6.8f); SextiarySectorAPI.playerManager.addStaminaStats(player, 4, 4); } //牛乳 - if(food.getItem() == Items.milk_bucket){ + if (food.getItem() == Items.milk_bucket) { SextiarySectorAPI.playerManager.addMoistureStats(player, 4, 4); } - if(food.getItem() instanceof IDrink){ - SextiarySectorAPI.playerManager.addMoistureStats(player, ((IDrink)food.getItem()).getMoisture(food), ((IDrink)food.getItem()).getMoistureSaturation(food)); + if (food.getItem() instanceof IDrink) { + SextiarySectorAPI.playerManager.addMoistureStats(player, ((IDrink) food.getItem()).getMoisture(food), ((IDrink) food.getItem()).getMoistureSaturation(food)); } } /**バニラの液体を飲んだ時の動作*/ @SubscribeEvent - public void onPlayerEatenEvent(BlockBottleEvent event) { + public void onPlayerEatenEvent(BlockBottleEvent event) { FluidStack fluid = event.fluid; EntityPlayer player = (EntityPlayer) event.entity; - if(fluid.fluidID == FluidRegistry.WATER.getID()){ + if (fluid.fluidID == FluidRegistry.WATER.getID()) { SextiarySectorAPI.playerManager.addMoistureStats(player, 3, 0); player.addExhaustion(4.5f); - player.addPotionEffect(new PotionEffect(Potion.hunger.getId(),30,0)); + player.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 30, 0)); } - if(fluid.fluidID == FluidRegistry.LAVA.getID()){ + if (fluid.fluidID == FluidRegistry.LAVA.getID()) { SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 12.0f); diff --git a/src/main/java/shift/sextiarysector/block/BlockFunnel.java b/src/main/java/shift/sextiarysector/block/BlockFunnel.java new file mode 100644 index 0000000..dbac590 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockFunnel.java @@ -0,0 +1,98 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntityFunnel; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockFunnel extends BlockContainer { + + private IIcon field_149923_M; + private IIcon field_149921_b; + private IIcon field_149924_N; + + public BlockFunnel() { + super(Material.iron); + } + + @Override + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + { + if (par1World.isRemote) + { + return true; + } + else + { + TileEntityFunnel tileentityfurnace = (TileEntityFunnel) par1World.getTileEntity(par2, par3, par4); + + if (tileentityfurnace != null) + { + par5EntityPlayer.openGui(SextiarySector.instance, 11, par1World, par2, par3, par4); + } + + return true; + } + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.funnelType; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + return p_149691_1_ == 1 ? this.field_149923_M : this.field_149921_b; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(this.textureName + "_outside"); + this.field_149921_b = p_149651_1_.registerIcon(this.textureName + "_outside"); + this.field_149923_M = p_149651_1_.registerIcon(this.textureName + "_top"); + this.field_149924_N = p_149651_1_.registerIcon(this.textureName + "_inside"); + } + + @Override + @SideOnly(Side.CLIENT) + public String getItemIconName() + { + return this.textureName; + } + + @SideOnly(Side.CLIENT) + public IIcon getFunnelIcon(String p_149916_0_) + { + return p_149916_0_.equals("funnel_outside") ? this.field_149921_b : (p_149916_0_.equals("funnel_inside") ? this.field_149924_N : null); + } + + @Override + public boolean renderAsNormalBlock() + { + return false; + } + + @Override + public boolean isOpaqueCube() + { + return false; + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityFunnel(); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockPipe.java b/src/main/java/shift/sextiarysector/block/BlockPipe.java index eefb496..484fba0 100644 --- a/src/main/java/shift/sextiarysector/block/BlockPipe.java +++ b/src/main/java/shift/sextiarysector/block/BlockPipe.java @@ -3,13 +3,21 @@ import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.IFluidHandler; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.tileentity.TileEntityPipe; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockPipe extends BlockContainer { + public double one = 1.0d / 16.0d; + public BlockPipe() { super(Material.iron); this.setHardness(0.8F); @@ -22,6 +30,104 @@ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityPipe(); } + @Override + public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) + { + float[] defaultSize = new float[] { (float) (one * 4), (float) (one * 12), (float) (one * 4), (float) (one * 12), (float) (one * 4), (float) (one * 12) }; + + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + + float setX = 0.5f; + float setY = 0.5f; + float setZ = 0.5f; + + if (d.offsetX != 0 && this.canConnect(par1IBlockAccess, par2, par3, par4, d)) { + defaultSize[d.ordinal()] = (float) (setX + 0.5 * d.offsetX); + } + + if (d.offsetY != 0 && this.canConnect(par1IBlockAccess, par2, par3, par4, d)) { + defaultSize[d.ordinal()] = (float) (setY + 0.5 * d.offsetY); + } + + if (d.offsetZ != 0 && this.canConnect(par1IBlockAccess, par2, par3, par4, d)) { + defaultSize[d.ordinal()] = (float) (setZ + 0.5 * d.offsetZ); + } + + } + + this.setBlockBounds(0 + defaultSize[4], 0 + defaultSize[0], 0 + defaultSize[2], 0 + defaultSize[5], 0 + defaultSize[1], 0 + defaultSize[3]); + } + + //当たり判定。サボテンやソウルサンドを参考にすると良い。ココの設定をすると、onEntityCollidedWithBlockが呼ばれるようになる + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + + double[] defaultSize = new double[] { one * 4, one * 12, one * 4, one * 12, one * 4, one * 12 }; + + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + + double setX = 0.5d; + double setY = 0.5d; + double setZ = 0.5d; + + if (d.offsetX != 0 && this.canConnect(par1World, par2, par3, par4, d)) { + defaultSize[d.ordinal()] = setX + 0.5 * d.offsetX; + } + + if (d.offsetY != 0 && this.canConnect(par1World, par2, par3, par4, d)) { + defaultSize[d.ordinal()] = setY + 0.5 * d.offsetY; + } + + if (d.offsetZ != 0 && this.canConnect(par1World, par2, par3, par4, d)) { + defaultSize[d.ordinal()] = setZ + 0.5 * d.offsetZ; + } + + } + + return AxisAlignedBB.getBoundingBox(par2 + defaultSize[4], par3 + defaultSize[0], par4 + defaultSize[2], par2 + defaultSize[5], par3 + defaultSize[1], par4 + defaultSize[3]); + } + + //ブロックに視点を合わせた時に出てくる黒い線のアレ + @Override + @SideOnly(Side.CLIENT) + public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + + double[] defaultSize = new double[] { one * 4, one * 12, one * 4, one * 12, one * 4, one * 12 }; + + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + + double setX = 0.5d; + double setY = 0.5d; + double setZ = 0.5d; + + if (d.offsetX != 0 && this.canConnect(par1World, par2, par3, par4, d)) { + defaultSize[d.ordinal()] = setX + 0.5 * d.offsetX; + } + + if (d.offsetY != 0 && this.canConnect(par1World, par2, par3, par4, d)) { + defaultSize[d.ordinal()] = setY + 0.5 * d.offsetY; + } + + if (d.offsetZ != 0 && this.canConnect(par1World, par2, par3, par4, d)) { + defaultSize[d.ordinal()] = setZ + 0.5 * d.offsetZ; + } + + } + + return AxisAlignedBB.getBoundingBox(par2 + defaultSize[4], par3 + defaultSize[0], par4 + defaultSize[2], par2 + defaultSize[5], par3 + defaultSize[1], par4 + defaultSize[3]); + } + + public boolean canConnect(IBlockAccess world, int x, int y, int z, ForgeDirection d) { + + TileEntity t = world.getTileEntity(x + d.offsetX, y + d.offsetY, z + d.offsetZ); + + if (t != null && t instanceof IFluidHandler) return true; + + return false; + } + @Override public boolean renderAsNormalBlock() { return false; diff --git a/src/main/java/shift/sextiarysector/block/BlockTank.java b/src/main/java/shift/sextiarysector/block/BlockTank.java new file mode 100644 index 0000000..2060001 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockTank.java @@ -0,0 +1,148 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; +import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntityTank; + +public class BlockTank extends BlockContainer { + + public BlockTank() { + super(Material.glass); + float b = 1.0f / 16.0f; + this.setBlockBounds(b, 0, b, 1.0f - b, 1, 1.0f - b); + this.setHardness(0.3f); + this.setStepSound(soundTypeGlass); + } + + //プレイヤーの右クリック処理 + @Override + public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) + { + + ItemStack itemstack = player.inventory.getCurrentItem(); + TileEntityTank tank = (TileEntityTank) par1World.getTileEntity(x, y, z); + + if (tank == null) return false; + if (!FluidContainerRegistry.isContainer(itemstack)) return false; + + FluidStack fluid = tank.getFluidStack(); + + if (FluidContainerRegistry.isFilledContainer(itemstack)) { + return this.addFluid(par1World, x, y, z, itemstack, tank, player); + } + else if (fluid != null && fluid.getFluid() != null && FluidContainerRegistry.isContainer(itemstack)) { + return this.drainFluid(par1World, x, y, z, itemstack, tank, player); + } + + return false; + + } + + public boolean addFluid(World world, int x, int y, int z, ItemStack itemstack, TileEntityTank tank, EntityPlayer player) { + + FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(itemstack); + int put = tank.fill(ForgeDirection.UNKNOWN, fluid, false); + + if (put != fluid.amount) return false; + + tank.fill(ForgeDirection.UNKNOWN, fluid, true); + this.addContainerItemToPlayer(itemstack, FluidContainerRegistry.drainFluidContainer(itemstack), player); + + tank.markDirty(); + world.markBlockForUpdate(x, y, z); + + world.playSoundAtEntity(player, "random.pop", 0.4F, 1.8F); + + return true; + + } + + public boolean drainFluid(World world, int x, int y, int z, ItemStack empty, TileEntityTank tank, EntityPlayer player) { + + for (FluidContainerData f : FluidContainerRegistry.getRegisteredFluidContainerData()) { + + if (!(f.emptyContainer.isItemEqual(empty) && f.fluid.isFluidEqual(tank.getFluidStack()) && f.fluid.amount <= tank.tank.getFluidAmount())) continue; + + this.addContainerItemToPlayer(empty, FluidContainerRegistry.fillFluidContainer(tank.getFluidStack(), empty), player); + tank.tank.drain(f.fluid.amount, true); + + tank.markDirty(); + world.markBlockForUpdate(x, y, z); + + world.playSoundAtEntity(player, "random.pop", 0.4F, 1.8F); + + return true; + + } + + return false; + + } + + public void addContainerItemToPlayer(ItemStack itemstack, ItemStack newstack, EntityPlayer player) { + + if (player.capabilities.isCreativeMode) return; + + if (itemstack.stackSize == 1 && player.worldObj.isRemote) return; + + --itemstack.stackSize; + + ItemStack emptyContainer = newstack; + + if (emptyContainer != null) + { + + if (!player.capabilities.isCreativeMode) { + + if (itemstack.stackSize <= 0) { + + player.inventory.setInventorySlotContents(player.inventory.currentItem, emptyContainer); + + } else { + + if (!player.inventory.addItemStackToInventory(emptyContainer)) { + player.dropPlayerItemWithRandomChoice(emptyContainer, false); + + } + + player.inventory.markDirty(); + + } + + } + + } + + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.tankType; + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityTank(); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockTrap.java b/src/main/java/shift/sextiarysector/block/BlockTrap.java new file mode 100644 index 0000000..2671da9 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockTrap.java @@ -0,0 +1,147 @@ +package shift.sextiarysector.block; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import shift.sextiarysector.tileentity.TileEntityTrap; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockTrap extends BlockContainer { + + public static double one = 1.0d / 64.0d; + private IIcon grass; + + public BlockTrap() { + super(Material.wood); + this.setTickRandomly(true); + } + + @Override + public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) + { + if (p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_) == 0) return; + + p_149674_1_.scheduleBlockUpdate(p_149674_2_, p_149674_3_, p_149674_4_, this, this.tickRate(p_149674_1_) + p_149674_5_.nextInt(100)); + + //ModuleTrap.spawnTrap(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_); + } + + @Override + public int tickRate(World p_149738_1_) + { + return 200; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int par1, int par2) + { + + if (par2 == 1) { + return this.grass; + } + + return this.blockIcon; + + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) + { + super.registerBlockIcons(par1IconRegister); + this.grass = par1IconRegister.registerIcon("sextiarysector:trap"); + } + + @Override + public void addCollisionBoxesToList(World p_149743_1_, int x, int y, int z, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_) + { + AxisAlignedBB axisalignedbb1 = AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.one, z + this.maxZ); + + if (axisalignedbb1 != null && p_149743_5_.intersectsWith(axisalignedbb1)) + { + p_149743_6_.add(axisalignedbb1); + } + + AxisAlignedBB axisalignedbb2 = AxisAlignedBB.getBoundingBox(x + this.minX, y + this.maxY - this.one, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ); + + if (axisalignedbb2 != null && p_149743_5_.intersectsWith(axisalignedbb2)) + { + p_149743_6_.add(axisalignedbb2); + } + + AxisAlignedBB axisalignedbb3 = AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.one, y + this.maxY, z + this.maxZ); + + if (axisalignedbb3 != null && p_149743_5_.intersectsWith(axisalignedbb3)) + { + p_149743_6_.add(axisalignedbb3); + } + + AxisAlignedBB axisalignedbb4 = AxisAlignedBB.getBoundingBox(x + this.maxX - this.one, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ); + + if (axisalignedbb4 != null && p_149743_5_.intersectsWith(axisalignedbb4)) + { + p_149743_6_.add(axisalignedbb4); + } + + AxisAlignedBB axisalignedbb5 = AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.one); + + if (axisalignedbb5 != null && p_149743_5_.intersectsWith(axisalignedbb5)) + { + p_149743_6_.add(axisalignedbb5); + } + + AxisAlignedBB axisalignedbb6 = AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.maxZ - this.one, x + this.maxX, y + this.maxY, z + this.maxZ); + + if (axisalignedbb6 != null && p_149743_5_.intersectsWith(axisalignedbb6)) + { + p_149743_6_.add(axisalignedbb6); + } + } + + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() + { + return 0; + } + + @Override + public boolean renderAsNormalBlock() + { + return false; + } + + @Override + public boolean isOpaqueCube() + { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + 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)); + p_149666_3_.add(new ItemStack(p_149666_1_, 1, 1)); + + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityTrap(); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java b/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java index 83471b3..d57b7a1 100644 --- a/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java +++ b/src/main/java/shift/sextiarysector/block/BlockWoodHopper.java @@ -8,47 +8,51 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockWoodHopper extends BlockHopper{ +public class BlockWoodHopper extends BlockHopper { private IIcon field_149923_M; private IIcon field_149921_b; private IIcon field_149924_N; - public BlockWoodHopper(){ + public BlockWoodHopper() { this.setHardness(0.5f); this.setStepSound(soundTypeWood); this.setCreativeTab(SextiarySectorAPI.TabSSCore); } + @Override public int getRenderType() - { - return SextiarySector.proxy.woodHopperType; - } + { + return SextiarySector.proxy.woodHopperType; + } + @Override @SideOnly(Side.CLIENT) - public String getItemIconName() - { - return "sextiarysector:wood_hopper"; - } + public String getItemIconName() + { + return "sextiarysector:wood_hopper"; + } + @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(int p_149691_1_, int p_149691_2_) - { - return p_149691_1_ == 1 ? this.field_149923_M : this.field_149921_b; - } + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + return p_149691_1_ == 1 ? this.field_149923_M : this.field_149921_b; + } + @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister p_149651_1_) - { - this.field_149921_b = p_149651_1_.registerIcon("sextiarysector:hopper_outside"); - this.field_149923_M = p_149651_1_.registerIcon("sextiarysector:hopper_top"); - this.field_149924_N = p_149651_1_.registerIcon("sextiarysector:hopper_inside"); - } + public void registerBlockIcons(IIconRegister p_149651_1_) + { + this.field_149921_b = p_149651_1_.registerIcon("sextiarysector:wood_hopper_outside"); + this.field_149923_M = p_149651_1_.registerIcon("sextiarysector:wood_hopper_top"); + this.field_149924_N = p_149651_1_.registerIcon("sextiarysector:wood_hopper_inside"); + } @SideOnly(Side.CLIENT) - public IIcon getHopperIcon2(String p_149916_0_) - { - return p_149916_0_.equals("hopper_outside") ? this.field_149921_b : (p_149916_0_.equals("hopper_inside") ? this.field_149924_N : null); - } + public IIcon getHopperIcon2(String p_149916_0_) + { + return p_149916_0_.equals("hopper_outside") ? this.field_149921_b : (p_149916_0_.equals("hopper_inside") ? this.field_149924_N : null); + } } diff --git a/src/main/java/shift/sextiarysector/container/ContainerFunnel.java b/src/main/java/shift/sextiarysector/container/ContainerFunnel.java new file mode 100644 index 0000000..801309e --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerFunnel.java @@ -0,0 +1,209 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.tileentity.TileEntityFunnel; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ContainerFunnel extends Container +{ + private final TileEntityFunnel tileFurnace; + + //private int lastFluid; + private int lastFluidID; + private int lastFluidAmount; + + public ContainerFunnel(InventoryPlayer p_i1812_1_, TileEntityFunnel p_i1812_2_) + { + this.tileFurnace = p_i1812_2_; + //this.addSlotToContainer(new Slot(p_i1812_2_, 0, 56, 17)); + //this.addSlotToContainer(new Slot(p_i1812_2_, 1, 56, 53)); + //this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 2, 107, 53)); + //this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 3, 125, 53)); + this.addSlotToContainer(new SlotFluid(p_i1812_2_, 0, 26, 20)); + this.addSlotToContainer(new SlotFluid(p_i1812_2_, 1, 134, 20)); + int i; + + byte b0 = 51; + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(p_i1812_1_, j + i * 9 + 9, 8 + j * 18, i * 18 + b0)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(p_i1812_1_, i, 8 + i * 18, 58 + b0)); + } + } + + @Override + public void addCraftingToCrafters(ICrafting p_75132_1_) + { + super.addCraftingToCrafters(p_75132_1_); + if (this.tileFurnace.getFluidStack() == null) { + p_75132_1_.sendProgressBarUpdate(this, 0, 0); + p_75132_1_.sendProgressBarUpdate(this, 1, 0); + } else { + p_75132_1_.sendProgressBarUpdate(this, 0, this.tileFurnace.getFluidStack().getFluid().getID()); + p_75132_1_.sendProgressBarUpdate(this, 1, this.tileFurnace.getFluidStack().amount); + } + + } + + /** + * Looks for changes made in the container, sends them to every listener. + */ + @Override + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + + for (int i = 0; i < this.crafters.size(); ++i) + { + ICrafting icrafting = (ICrafting) this.crafters.get(i); + + if (this.lastFluidAmount != this.tileFurnace.tank.getFluidAmount()) + { + if (this.tileFurnace.getFluidStack() == null) { + icrafting.sendProgressBarUpdate(this, 0, 0); + icrafting.sendProgressBarUpdate(this, 1, 0); + } else { + icrafting.sendProgressBarUpdate(this, 0, this.tileFurnace.getFluidStack().getFluid().getID()); + icrafting.sendProgressBarUpdate(this, 1, this.tileFurnace.getFluidStack().amount); + } + } + + } + + this.lastFluidAmount = this.tileFurnace.tank.getFluidAmount(); + + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int p_75137_1_, int p_75137_2_) + { + + if (p_75137_1_ == 0 || p_75137_1_ == 1) + { + + if (p_75137_2_ == 0) { + this.tileFurnace.tank.setFluid(null); + return; + } + + if (this.tileFurnace.getFluidStack() == null) { + + if (p_75137_1_ == 0) { + + this.tileFurnace.tank.setFluid(new FluidStack(p_75137_2_, 1)); + + } else if (p_75137_1_ == 1) { + + this.tileFurnace.tank.setFluid(new FluidStack(1, p_75137_2_)); + + } + + } else { + + if (p_75137_1_ == 0) { + + this.tileFurnace.tank.getFluid().fluidID = p_75137_2_; + + } else if (p_75137_1_ == 1) { + + this.tileFurnace.tank.getFluid().amount = p_75137_2_; + + } + + } + + } + + } + + @Override + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return this.tileFurnace.isUseableByPlayer(p_75145_1_); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ == 1) + { + if (!this.mergeItemStack(itemstack1, 2, 38, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (p_82846_2_ != 1 && p_82846_2_ != 0) + { + if (FluidContainerRegistry.isContainer(itemstack)) + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return null; + } + } + else if (p_82846_2_ >= 2 && p_82846_2_ < 29) + { + if (!this.mergeItemStack(itemstack1, 29, 38, false)) + { + return null; + } + } + else if (p_82846_2_ >= 29 && p_82846_2_ < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 2, 38, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack) null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerMPRepair.java b/src/main/java/shift/sextiarysector/container/ContainerMPRepair.java index f63f51c..797f2e4 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerMPRepair.java +++ b/src/main/java/shift/sextiarysector/container/ContainerMPRepair.java @@ -1,5 +1,6 @@ package shift.sextiarysector.container; +import java.lang.reflect.Field; import java.util.Iterator; import java.util.Map; @@ -9,60 +10,41 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; -import net.minecraft.inventory.Container; +import net.minecraft.inventory.ContainerRepair; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryBasic; -import net.minecraft.inventory.InventoryCraftResult; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; - -import org.apache.commons.lang3.StringUtils; - import shift.mceconomy2.api.MCEconomyAPI; +import cpw.mods.fml.relauncher.ReflectionHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ContainerMPRepair extends Container { +public class ContainerMPRepair extends ContainerRepair { - /** Here comes out item you merged and/or renamed. */ - private final IInventory outputSlot = new InventoryCraftResult(); - /** The 2slots where you put your items in that you want to merge and/or rename. */ - private final IInventory inputSlots = new InventoryBasic("Repair", true, 2) - { - /** - * For tile entities, ensures the chunk containing the tile entity is saved to disk later - the game won't think - * it hasn't changed and skip it. - */ - @Override - public void markDirty() - { - super.markDirty(); - ContainerMPRepair.this.onCraftMatrixChanged(this); - } - }; - private World theWorld; - private int field_82861_i; - private int field_82858_j; - private int field_82859_k; - /** The maximum cost of repairing/renaming in the anvil. */ - public int maximumCost; - /** determined by damage of input item and stackSize of repair materials */ - public int stackSizeToBeUsedInRepair; - private String repairedItemName; - /** The player that has this container open. */ + private final Field _outputSlot = ReflectionHelper.findField(ContainerRepair.class, "outputSlot", "field_82852_f"); + private final Field _inputSlots = ReflectionHelper.findField(ContainerRepair.class, "inputSlots", "field_82853_g"); + private final Field _materialCost = ReflectionHelper.findField(ContainerRepair.class, "materialCost", "stackSizeToBeUsedInRepair", "field_82856_l"); private final EntityPlayer thePlayer; + private final IInventory outputSlot, inputSlots; + private final int materialCost; + public ContainerMPRepair(InventoryPlayer p_i1800_1_, final World p_i1800_2_, final int p_i1800_3_, final int p_i1800_4_, final int p_i1800_5_, EntityPlayer p_i1800_6_) { - super(); - this.theWorld = p_i1800_2_; - this.field_82861_i = p_i1800_3_; - this.field_82858_j = p_i1800_4_; - this.field_82859_k = p_i1800_5_; + super(p_i1800_1_, p_i1800_2_, p_i1800_3_, p_i1800_4_, p_i1800_5_, p_i1800_6_); this.thePlayer = p_i1800_6_; + + try { + outputSlot = (IInventory) _outputSlot.get(this); + inputSlots = (IInventory) _inputSlots.get(this); + materialCost = _materialCost.getInt(this); + } catch (Exception e) { + throw new RuntimeException(e); + } + this.addSlotToContainer(new Slot(this.inputSlots, 0, 27, 47)); this.addSlotToContainer(new Slot(this.inputSlots, 1, 76, 47)); this.addSlotToContainer(new Slot(this.outputSlot, 2, 134, 47) @@ -178,6 +160,7 @@ public void onCraftMatrixChanged(IInventory p_75130_1_) /** * called when the Anvil Input Slot changes, calculates the new result and puts it in the output slot */ + @Override public void updateRepairOutput() { ItemStack itemstack = this.inputSlots.getStackInSlot(0); @@ -347,28 +330,28 @@ public void updateRepairOutput() } } } + /* + if (StringUtils.isBlank(this.repairedItemName)) + { + if (itemstack.hasDisplayName()) + { + j = itemstack.isItemStackDamageable() ? 7 : itemstack.stackSize * 5; + i += j; + itemstack1.func_135074_t(); + } + } + else if (!this.repairedItemName.equals(itemstack.getDisplayName())) + { + j = itemstack.isItemStackDamageable() ? 7 : itemstack.stackSize * 5; + i += j; - if (StringUtils.isBlank(this.repairedItemName)) - { - if (itemstack.hasDisplayName()) - { - j = itemstack.isItemStackDamageable() ? 7 : itemstack.stackSize * 5; - i += j; - itemstack1.func_135074_t(); - } - } - else if (!this.repairedItemName.equals(itemstack.getDisplayName())) - { - j = itemstack.isItemStackDamageable() ? 7 : itemstack.stackSize * 5; - i += j; - - if (itemstack.hasDisplayName()) - { - k2 += j / 2; - } + if (itemstack.hasDisplayName()) + { + k2 += j / 2; + } - itemstack1.setStackDisplayName(this.repairedItemName); - } + itemstack1.setStackDisplayName(this.repairedItemName); + }*/ k = 0; @@ -466,124 +449,17 @@ else if (!this.repairedItemName.equals(itemstack.getDisplayName())) public void addCraftingToCrafters(ICrafting p_75132_1_) { super.addCraftingToCrafters(p_75132_1_); - p_75132_1_.sendProgressBarUpdate(this, 0, this.maximumCost); + p_75132_1_.sendProgressBarUpdate(this, 1, this.maximumCost); } @Override @SideOnly(Side.CLIENT) public void updateProgressBar(int p_75137_1_, int p_75137_2_) { - if (p_75137_1_ == 0) + if (p_75137_1_ == 1) { this.maximumCost = p_75137_2_; } } - /** - * Called when the container is closed. - */ - @Override - public void onContainerClosed(EntityPlayer p_75134_1_) - { - super.onContainerClosed(p_75134_1_); - - if (!this.theWorld.isRemote) - { - for (int i = 0; i < this.inputSlots.getSizeInventory(); ++i) - { - ItemStack itemstack = this.inputSlots.getStackInSlotOnClosing(i); - - if (itemstack != null) - { - p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); - } - } - } - } - - @Override - public boolean canInteractWith(EntityPlayer p_75145_1_) - { - return this.theWorld.getBlock(this.field_82861_i, this.field_82858_j, this.field_82859_k) != Blocks.anvil ? false : p_75145_1_.getDistanceSq(this.field_82861_i + 0.5D, this.field_82858_j + 0.5D, this.field_82859_k + 0.5D) <= 64.0D; - } - - /** - * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. - */ - @Override - public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) - { - ItemStack itemstack = null; - Slot slot = (Slot) this.inventorySlots.get(p_82846_2_); - - if (slot != null && slot.getHasStack()) - { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - if (p_82846_2_ == 2) - { - if (!this.mergeItemStack(itemstack1, 3, 39, true)) - { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } - else if (p_82846_2_ != 0 && p_82846_2_ != 1) - { - if (p_82846_2_ >= 3 && p_82846_2_ < 39 && !this.mergeItemStack(itemstack1, 0, 2, false)) - { - return null; - } - } - else if (!this.mergeItemStack(itemstack1, 3, 39, false)) - { - return null; - } - - if (itemstack1.stackSize == 0) - { - slot.putStack((ItemStack) null); - } - else - { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) - { - return null; - } - - slot.onPickupFromSlot(p_82846_1_, itemstack1); - } - - return itemstack; - } - - /** - * used by the Anvil GUI to update the Item Name being typed by the player - */ - public void updateItemName(String p_82850_1_) - { - this.repairedItemName = p_82850_1_; - - if (this.getSlot(2).getHasStack()) - { - ItemStack itemstack = this.getSlot(2).getStack(); - - if (StringUtils.isBlank(p_82850_1_)) - { - itemstack.func_135074_t(); - } - else - { - itemstack.setStackDisplayName(this.repairedItemName); - } - } - - this.updateRepairOutput(); - } - } diff --git a/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java b/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java new file mode 100644 index 0000000..fc93d13 --- /dev/null +++ b/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java @@ -0,0 +1,190 @@ +package shift.sextiarysector.entity; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.SSBlocks; + +public class EntityMineboatTank extends EntityMineboat implements IFluidHandler { + + protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 32); + private int lastID = 0; + private int lastAmount = 0; + + public EntityMineboatTank(World par1World) { + super(par1World); + + } + + public EntityMineboatTank(World par1World, double par2, double par4, double par6) { + super(par1World, par2, par4, par6); + } + + @Override + protected void entityInit() + { + + super.entityInit(); + this.dataWatcher.addObject(23, new Integer(0)); + this.dataWatcher.addObject(24, new Integer(0)); + + } + + @Override + public void onUpdate() + { + super.onUpdate(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + + if (this.lastID != this.getFluidID()) { + + if (this.getFluidID() == 0) { + this.tank.setFluid(null); + } else { + this.tank.setFluid(new FluidStack(this.getFluidID(), this.getFluidAmount())); + } + + this.lastID = this.getFluidID(); + this.lastAmount = this.getFluidAmount(); + + } + + if (this.lastAmount != this.getFluidAmount()) { + this.tank.getFluid().amount = this.getFluidAmount(); + + this.lastID = this.getFluidID(); + this.lastAmount = this.getFluidAmount(); + + } + + } + + private void updateServerEntity() { + + if (this.lastAmount != this.tank.getFluidAmount()) { + + this.dataWatcher.updateObject(24, this.tank.getFluidAmount()); + + if (this.tank.getFluidAmount() == 0) { + this.dataWatcher.updateObject(23, 0); + } else { + this.dataWatcher.updateObject(23, this.tank.getFluid().fluidID); + } + + this.lastAmount = this.tank.getFluidAmount(); + + } + + } + + private int getFluidID() { + return this.dataWatcher.getWatchableObjectInt(23); + } + + private int getFluidAmount() { + return this.dataWatcher.getWatchableObjectInt(24); + } + + public float getRendererAmount() { + return (float) this.tank.getFluidAmount() / (float) this.tank.getCapacity(); + } + + public boolean hasFluidStack() { + return tank.getFluidAmount() > 0; + } + + public FluidStack getFluidStack() { + return tank.getFluid(); + } + + @Override + public Block getDefaultDisplayTile() + { + return SSBlocks.tank; + } + + @Override + public void killMineBoat(DamageSource par1DamageSource) + { + super.killMineBoat(par1DamageSource); + this.func_145778_a(Item.getItemFromBlock(SSBlocks.tank), 1, 0.0F); + } + + /* IFluidHandler */ + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + return tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(tank.getFluid())) + { + return null; + } + return tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return tank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { tank.getInfo() }; + } + + //NBT + @Override + protected void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + tank.writeToNBT(par1NBTTagCompound); + } + + @Override + protected void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + tank.readFromNBT(par1NBTTagCompound); + if (par1NBTTagCompound.hasKey("Empty") && tank.getFluidAmount() > 0) this.tank.setFluid(null); + } + +} diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index 83d0cb3..ef67cce 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -12,6 +12,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.stats.Achievement; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; @@ -21,6 +22,7 @@ import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; +import net.minecraftforge.event.entity.player.AchievementEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.entity.player.PlayerWakeUpEvent; import net.minecraftforge.event.world.WorldEvent; @@ -30,46 +32,68 @@ import shift.sextiarysector.SSFluids.SSFluid; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.event.BlockBottleEvent; +import shift.sextiarysector.block.BlockFigure; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockMonitor.MonitorType; import shift.sextiarysector.item.ItemKnife; import cpw.mods.fml.common.eventhandler.SubscribeEvent; - public class CommonEventHandler { @SubscribeEvent public void useEvent(PlayerInteractEvent event) { - ItemStack item = event.entityPlayer.getCurrentEquippedItem(); EntityPlayer p = event.entityPlayer; - if(item!=null && item.getItem()==Items.fireworks && item.stackTagCompound !=null){ + if (item != null && item.getItem() == Items.fireworks && item.stackTagCompound != null) { NBTTagCompound nbt = item.getTagCompound().getCompoundTag("Fireworks"); if (nbt != null) - { + { NBTTagList nbttaglist = nbt.getTagList("Explosions", 10); if (nbttaglist != null && nbttaglist.tagCount() > 0) - { + { NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(0); byte b0 = nbttagcompound1.getByte("Type"); - if(b0==3){ + if (b0 == 3) { p.addStat(SSAchievement.creeperFirework, 1); } - } + } + + } + + } + + } + + @SubscribeEvent + public void onAchievementEvent(AchievementEvent event) { + + Achievement achievement = event.achievement; + EntityPlayer player = event.entityPlayer; + ItemStack item = achievement.theItemStack; - } + if (item == null) return; + if (((EntityPlayerMP) player).func_147099_x().hasAchievementUnlocked(achievement)) return; + ItemStack f = new ItemStack(SSBlocks.figure); + BlockFigure.setFigureItem(f, item.copy(), "achievement"); + + if (!player.inventory.addItemStackToInventory(f)) + { + if (player.worldObj.isRemote) return; + player.dropPlayerItemWithRandomChoice(f, false); } + player.inventory.markDirty(); + } /* 無理でした(╹◡╹) @@ -88,76 +112,76 @@ public void useBottleEvent(PlayerInteractEvent event) { MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(w, p, true); - if (movingobjectposition == null) - { - return; - } - else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!w.canMineBlock(p, i, j, k)) - { - return; - } - - if (!p.canPlayerEdit(i, j, k, movingobjectposition.sideHit, item)) - { - return; - } - - if (w.getBlock(i, j, k) == SSBlocks.drinkingWater) - { - --item.stackSize; - event.useItem = Result.DENY; - //event.setCanceled(true); - - if (item.stackSize <= 0) - { - p.inventory.setInventorySlotContents(p.inventory.currentItem, new ItemStack(SSItems.drinkingWaterSmallBottle)); - return; - //return new ItemStack(SSItems.drinkingWaterSmallBottle); - } - - if (!p.inventory.addItemStackToInventory(new ItemStack(SSItems.drinkingWaterSmallBottle))) - { - p.dropPlayerItemWithRandomChoice(new ItemStack(SSItems.drinkingWaterSmallBottle, 1, 0), false); - } - } - } - - return; - } + if (movingobjectposition == null) + { + return; + } + else + { + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!w.canMineBlock(p, i, j, k)) + { + return; + } + + if (!p.canPlayerEdit(i, j, k, movingobjectposition.sideHit, item)) + { + return; + } + + if (w.getBlock(i, j, k) == SSBlocks.drinkingWater) + { + --item.stackSize; + event.useItem = Result.DENY; + //event.setCanceled(true); + + if (item.stackSize <= 0) + { + p.inventory.setInventorySlotContents(p.inventory.currentItem, new ItemStack(SSItems.drinkingWaterSmallBottle)); + return; + //return new ItemStack(SSItems.drinkingWaterSmallBottle); + } + + if (!p.inventory.addItemStackToInventory(new ItemStack(SSItems.drinkingWaterSmallBottle))) + { + p.dropPlayerItemWithRandomChoice(new ItemStack(SSItems.drinkingWaterSmallBottle, 1, 0), false); + } + } + } + + return; + } }*/ protected MovingObjectPosition getMovingObjectPositionFromPlayer(World p_77621_1_, EntityPlayer p_77621_2_, boolean p_77621_3_) - { - float f = 1.0F; - float f1 = p_77621_2_.prevRotationPitch + (p_77621_2_.rotationPitch - p_77621_2_.prevRotationPitch) * f; - float f2 = p_77621_2_.prevRotationYaw + (p_77621_2_.rotationYaw - p_77621_2_.prevRotationYaw) * f; - double d0 = p_77621_2_.prevPosX + (p_77621_2_.posX - p_77621_2_.prevPosX) * (double)f; - double d1 = p_77621_2_.prevPosY + (p_77621_2_.posY - p_77621_2_.prevPosY) * (double)f + (double)(p_77621_1_.isRemote ? p_77621_2_.getEyeHeight() - p_77621_2_.getDefaultEyeHeight() : p_77621_2_.getEyeHeight()); // isRemote check to revert changes to ray trace position due to adding the eye height clientside and player yOffset differences - double d2 = p_77621_2_.prevPosZ + (p_77621_2_.posZ - p_77621_2_.prevPosZ) * (double)f; - Vec3 vec3 = Vec3.createVectorHelper(d0, d1, d2); - float f3 = MathHelper.cos(-f2 * 0.017453292F - (float)Math.PI); - float f4 = MathHelper.sin(-f2 * 0.017453292F - (float)Math.PI); - float f5 = -MathHelper.cos(-f1 * 0.017453292F); - float f6 = MathHelper.sin(-f1 * 0.017453292F); - float f7 = f4 * f5; - float f8 = f3 * f5; - double d3 = 5.0D; - if (p_77621_2_ instanceof EntityPlayerMP) - { - d3 = ((EntityPlayerMP)p_77621_2_).theItemInWorldManager.getBlockReachDistance(); - } - Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3); - return p_77621_1_.func_147447_a(vec3, vec31, p_77621_3_, !p_77621_3_, false); - } + { + float f = 1.0F; + float f1 = p_77621_2_.prevRotationPitch + (p_77621_2_.rotationPitch - p_77621_2_.prevRotationPitch) * f; + float f2 = p_77621_2_.prevRotationYaw + (p_77621_2_.rotationYaw - p_77621_2_.prevRotationYaw) * f; + double d0 = p_77621_2_.prevPosX + (p_77621_2_.posX - p_77621_2_.prevPosX) * f; + double d1 = p_77621_2_.prevPosY + (p_77621_2_.posY - p_77621_2_.prevPosY) * f + (p_77621_1_.isRemote ? p_77621_2_.getEyeHeight() - p_77621_2_.getDefaultEyeHeight() : p_77621_2_.getEyeHeight()); // isRemote check to revert changes to ray trace position due to adding the eye height clientside and player yOffset differences + double d2 = p_77621_2_.prevPosZ + (p_77621_2_.posZ - p_77621_2_.prevPosZ) * f; + Vec3 vec3 = Vec3.createVectorHelper(d0, d1, d2); + float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI); + float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI); + float f5 = -MathHelper.cos(-f1 * 0.017453292F); + float f6 = MathHelper.sin(-f1 * 0.017453292F); + float f7 = f4 * f5; + float f8 = f3 * f5; + double d3 = 5.0D; + if (p_77621_2_ instanceof EntityPlayerMP) + { + d3 = ((EntityPlayerMP) p_77621_2_).theItemInWorldManager.getBlockReachDistance(); + } + Vec3 vec31 = vec3.addVector(f7 * d3, f6 * d3, f8 * d3); + return p_77621_1_.func_147447_a(vec3, vec31, p_77621_3_, !p_77621_3_, false); + } /**クリーパーチェスト*/ @SubscribeEvent @@ -173,32 +197,31 @@ public void LivingSleepingEvent(PlayerWakeUpEvent event) { EntityPlayerMP player = (EntityPlayerMP) event.entityLiving; - if(!player.func_147099_x().hasAchievementUnlocked(SSAchievement.creeperFirework)||player.func_147099_x().hasAchievementUnlocked(SSAchievement.creeperChest)){ + if (!player.func_147099_x().hasAchievementUnlocked(SSAchievement.creeperFirework) || player.func_147099_x().hasAchievementUnlocked(SSAchievement.creeperChest)) { return; } int x = (int) player.posX; - int y = (int) player.posY; - int z = (int) player.posZ; - World world = player.worldObj; - - int range = 1; - for (int i = -range; i < range; i++){ - for (int j = -range; j < range; j++) { - for(int k = -range; k < range; k++){ - if (world.isAirBlock(x + i, y + k, z + j)) { - if (generateChest(world, x + i, y + k, z + j)) { - player.addStat(SSAchievement.creeperChest, 1); - return; - } - } - } - } - } + int y = (int) player.posY; + int z = (int) player.posZ; + World world = player.worldObj; + + int range = 1; + for (int i = -range; i < range; i++) { + for (int j = -range; j < range; j++) { + for (int k = -range; k < range; k++) { + if (world.isAirBlock(x + i, y + k, z + j)) { + if (generateChest(world, x + i, y + k, z + j)) { + player.addStat(SSAchievement.creeperChest, 1); + return; + } + } + } + } + } } - /**クリーパーチェスト*/ /* @SubscribeEvent @@ -249,90 +272,90 @@ public void livingSleepingEvent(LivingUpdateEvent event) { protected boolean generateChest(World world, int x, int y, int z) { - boolean isGen = world.setBlock(x, y, z,SSBlocks.creeperChest); - if (isGen) - { - TileEntityChest tileEntityChest = (TileEntityChest)world.getTileEntity(x, y, z); - if (tileEntityChest != null) { + boolean isGen = world.setBlock(x, y, z, SSBlocks.creeperChest); + if (isGen) + { + TileEntityChest tileEntityChest = (TileEntityChest) world.getTileEntity(x, y, z); + if (tileEntityChest != null) { - tileEntityChest.setInventorySlotContents(0,new ItemStack(SSBlocks.shippingBox)); - tileEntityChest.setInventorySlotContents(1,BlockMonitor.getMonitor(MonitorType.creeper)); - tileEntityChest.setInventorySlotContents(2,new ItemStack(Items.gunpowder,16)); - tileEntityChest.setInventorySlotContents(3,new ItemStack(Items.diamond,4)); + tileEntityChest.setInventorySlotContents(0, new ItemStack(SSBlocks.shippingBox)); + tileEntityChest.setInventorySlotContents(1, BlockMonitor.getMonitor(MonitorType.creeper)); + tileEntityChest.setInventorySlotContents(2, new ItemStack(Items.gunpowder, 16)); + tileEntityChest.setInventorySlotContents(3, new ItemStack(Items.diamond, 4)); - return true; + return true; - } - } - return false; + } + } + return false; } @SubscribeEvent - public void onSpawn(LivingSpawnEvent.CheckSpawn event) - { + public void onSpawn(LivingSpawnEvent.CheckSpawn event) + { World world = event.world; - EntityLivingBase living = event.entityLiving; + EntityLivingBase living = event.entityLiving; - if(world.rand.nextInt(12) != 0)return; + if (world.rand.nextInt(12) != 0) return; - if (living instanceof IMob) - { - int x = (int)event.x; - int y = (int)event.y; - int z = (int)event.z; + if (living instanceof IMob) + { + int x = (int) event.x; + int y = (int) event.y; + int z = (int) event.z; - if(!world.getBlock(x, y, z).isAir(world, x, y, z))return; + if (!world.getBlock(x, y, z).isAir(world, x, y, z)) return; - if(world.getBlock(x, y-1, z) != Blocks.sand)return; + if (world.getBlock(x, y - 1, z) != Blocks.sand) return; - if(!BiomeDictionary.isBiomeOfType(world.getBiomeGenForCoords(x, z), Type.BEACH))return; + if (!BiomeDictionary.isBiomeOfType(world.getBiomeGenForCoords(x, z), Type.BEACH)) return; - world.setBlock(x, y, z, SSBlocks.sandpit); + world.setBlock(x, y, z, SSBlocks.sandpit); - } - } + } + } @SubscribeEvent - public void onSpawns( WorldEvent.PotentialSpawns event) - { + public void onSpawns(WorldEvent.PotentialSpawns event) + { World world = event.world; - if(world.rand.nextInt(6) != 0)return; + if (world.rand.nextInt(6) != 0) return; - int x = (int)event.x; - int y = (int)event.y; - int z = (int)event.z; + int x = event.x; + int y = event.y; + int z = event.z; - if(!world.getBlock(x, y, z).isAir(world, x, y, z))return; + if (!world.getBlock(x, y, z).isAir(world, x, y, z)) return; - if(world.getBlock(x, y-1, z) != Blocks.sand)return; + if (world.getBlock(x, y - 1, z) != Blocks.sand) return; - if(!BiomeDictionary.isBiomeOfType(world.getBiomeGenForCoords(x, z), Type.BEACH))return; + if (!BiomeDictionary.isBiomeOfType(world.getBiomeGenForCoords(x, z), Type.BEACH)) return; - world.setBlock(x, y, z, SSBlocks.sandpit); + world.setBlock(x, y, z, SSBlocks.sandpit); - } + } /** */ @SubscribeEvent - public void onPlayerEatenEvent(BlockBottleEvent event) { + public void onPlayerEatenEvent(BlockBottleEvent event) { FluidStack fluid = event.fluid; EntityPlayer player = (EntityPlayer) event.entity; - if(fluid.getFluid() instanceof SSFluid){ + if (fluid.getFluid() instanceof SSFluid) { - SextiarySectorAPI.playerManager.addMoistureStats(player, ((SSFluid)fluid.getFluid()).moisture, ((SSFluid)fluid.getFluid()).moistureSaturation); + SextiarySectorAPI.playerManager.addMoistureStats(player, ((SSFluid) fluid.getFluid()).moisture, ((SSFluid) fluid.getFluid()).moistureSaturation); } } @SubscribeEvent - public void onLivingDrops(LivingDropsEvent event) - { + public void onLivingDrops(LivingDropsEvent event) + { if (event.source.getSourceOfDamage() == null || event.source.getEntity() == null) { return; @@ -341,31 +364,30 @@ public void onLivingDrops(LivingDropsEvent event) Entity entity = event.source.getEntity(); if (entity instanceof EntityPlayer) - { - EntityPlayer p = (EntityPlayer)entity; + { + EntityPlayer p = (EntityPlayer) entity; ItemStack item = p.getCurrentEquippedItem(); - if(item == null){ + if (item == null) { return; } - if(item.getItem() instanceof ItemKnife){ + if (item.getItem() instanceof ItemKnife) { double x = event.entityLiving.posX; double y = event.entityLiving.posY; double z = event.entityLiving.posZ; - if(event.entityLiving instanceof EntityCreeper){ + if (event.entityLiving instanceof EntityCreeper) { event.drops.add(new EntityItem(event.entityLiving.worldObj, x, y, z, new ItemStack(Items.skull, 1, 4))); } } + } - } - - } + } /* @SubscribeEvent @@ -375,12 +397,4 @@ public void onFluidRegisterEvent(FluidRegisterEvent event) { }*/ - - - - - - - - } diff --git a/src/main/java/shift/sextiarysector/event/OreDictionaryEventHandler.java b/src/main/java/shift/sextiarysector/event/OreDictionaryEventHandler.java new file mode 100644 index 0000000..8529abf --- /dev/null +++ b/src/main/java/shift/sextiarysector/event/OreDictionaryEventHandler.java @@ -0,0 +1,33 @@ +package shift.sextiarysector.event; + +import java.util.Locale; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +public class OreDictionaryEventHandler { + + @SubscribeEvent + public void onOreRegisterEvent(OreRegisterEvent event) { + + String ore = event.Name; + ore = ore.toLowerCase(Locale.ENGLISH); + ItemStack item = event.Ore; + + if (ore.matches(".*salt.*") && !ore.matches(".*condiment.*")) { + + OreDictionary.registerOre("condimentSalt", item); + + } + + if (ore.matches(".water.*") && !ore.matches(".*fluid.*")) { + + OreDictionary.registerOre("fluidWater", item); + + } + + } + +} diff --git a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java index 4466998..8d87f3d 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java @@ -25,6 +25,8 @@ public void livingDashEvent(LivingUpdateEvent event) { EntityPlayer player = (EntityPlayer) event.entityLiving; + if (player.capabilities.isCreativeMode) return; + if (EntityPlayerManager.getStaminaStats(player).getStaminaLevel() < 5) { player.motionX *= 0.8; @@ -43,7 +45,7 @@ public void livingDashEvent(LivingUpdateEvent event) { public float getMaxMove() { - return 2.4f; + return 3.4f; } diff --git a/src/main/java/shift/sextiarysector/gui/GuiFunnel.java b/src/main/java/shift/sextiarysector/gui/GuiFunnel.java new file mode 100644 index 0000000..e230ec5 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiFunnel.java @@ -0,0 +1,140 @@ +package shift.sextiarysector.gui; + +import java.text.NumberFormat; +import java.util.ArrayList; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.container.ContainerFunnel; +import shift.sextiarysector.tileentity.TileEntityFunnel; + +public class GuiFunnel extends GuiContainer +{ + private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("sextiarysector:textures/guis/funnel.png"); + private final TileEntityFunnel tileFurnace; + + public GuiFunnel(InventoryPlayer p_i1091_1_, TileEntityFunnel p_i1091_2_) + { + super(new ContainerFunnel(p_i1091_1_, p_i1091_2_)); + this.tileFurnace = p_i1091_2_; + //this.allowUserInput = false; + this.ySize = 133; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + @Override + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + String s = this.tileFurnace.hasCustomInventoryName() ? this.tileFurnace.getInventoryName() : I18n.format(this.tileFurnace.getInventoryName(), new Object[0]); + this.fontRendererObj.drawString(s, 8, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(furnaceGuiTextures); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + + //Fluid + if (this.tileFurnace.isFluid()) + { + //FluidStack f = this.tileFurnace.getTank().getFluid(); + this.drawFluidTank(k + 62, l + 20, this.tileFurnace.getTank(), 52, 16); + + } + this.mc.getTextureManager().bindTexture(furnaceGuiTextures); + this.drawTexturedModalRect(k + 61, l + 19, 176, 0, 53, 17); + + } + + @Override + public void drawScreen(int par1, int par2, float par3) + { + super.drawScreen(par1, par2, par3); + + ArrayList arraylist = new ArrayList(); + + String f = "None"; + + if (this.tileFurnace.isFluid()) + { + f = this.tileFurnace.getTank().getFluid().getFluid().getLocalizedName(this.tileFurnace.getTank().getFluid()); + } + + NumberFormat nfNum = NumberFormat.getNumberInstance(); + + arraylist.add(0, "" + EnumChatFormatting.RESET + "Fluid Tank" + EnumChatFormatting.RESET); + arraylist.add(1, "" + EnumChatFormatting.GRAY + "Fluid : " + f); + arraylist.add(2, "" + EnumChatFormatting.GRAY + "Amount : " + nfNum.format(this.tileFurnace.getTank().getFluidAmount()) + " / " + nfNum.format(this.tileFurnace.getTank().getCapacity()) + " mB"); + + GL11.glPushMatrix(); + if (this.func_146978_c(61, 19, 53, 17, par1, par2)) + { + drawHoveringText(arraylist, par1, par2, fontRendererObj); + } + GL11.glPopMatrix(); + + } + + public void drawFluidTank(int x, int y, FluidTank fluidTank, int width, int height) { + + GL11.glColor3f(1, 1, 1); + + FluidStack fluidStack = fluidTank.getFluid(); + + ResourceLocation r; + if (fluidStack.getFluid().getSpriteNumber() == 0) { + r = TextureMap.locationBlocksTexture; + } else { + r = TextureMap.locationItemsTexture; + } + + this.mc.getTextureManager().bindTexture(r); + this.setColor3ubFromInt(fluidStack.getFluid().getColor(fluidStack)); + + int widthR = width;//*(fluidTank.getFluidAmount()/fluidTank.getCapacity()); + int heightR = (int) (height * ((float) fluidTank.getFluidAmount() / (float) fluidTank.getCapacity())); + + int yR = y + (height - heightR); + + int widthL = 0; + int heightL = 0; + IIcon icon = (fluidStack.getFluid().getIcon(fluidStack)); + + for (int i = 0; i < widthR; i += 16) { + + for (int j = 0; j < heightR; j += 16) { + + widthL = Math.min(widthR - i, 16); + heightL = Math.min(heightR - j, 16); + this.drawTexturedModelRectFromIcon(x + i, yR + j, icon, widthL, heightL); + + } + } + + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); + + } + + public static void setColor3ubFromInt(int color) { + + GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + + } +} diff --git a/src/main/java/shift/sextiarysector/item/ItemKnife.java b/src/main/java/shift/sextiarysector/item/ItemKnife.java index ab4ad0d..fe93d3e 100644 --- a/src/main/java/shift/sextiarysector/item/ItemKnife.java +++ b/src/main/java/shift/sextiarysector/item/ItemKnife.java @@ -17,39 +17,42 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ItemKnife extends ItemTool +public class ItemKnife extends ItemTool { - private static final Set field_150916_c = Sets.newHashSet(new Block[] {Blocks.crafting_table}); + private static final Set field_150916_c = Sets.newHashSet(new Block[] { Blocks.crafting_table }); - private boolean repair = false; - public ItemKnife(ToolMaterial p_i45343_1_) - { - super(1.0F, p_i45343_1_, field_150916_c); - int i = p_i45343_1_.getHarvestLevel(); - this.setHarvestLevel("knife", i); - if(i==0){ - this.setHarvestLevel("axe", 0); - }else{ - this.setHarvestLevel("axe", i-1); - } - this.setCreativeTab(SextiarySectorAPI.TabSSCooking); - FMLCommonHandler.instance().bus().register(this); - } + private boolean repair = false; - //アイテムがクラフト後に戻らないようにする - @Override - public boolean doesContainerItemLeaveCraftingGrid(ItemStack par1ItemStack) - { - return false; - } + public ItemKnife(ToolMaterial p_i45343_1_) + { + super(1.0F, p_i45343_1_, field_150916_c); + int i = p_i45343_1_.getHarvestLevel(); + float d = p_i45343_1_.getMaxUses(); + this.setHarvestLevel("knife", i); + if (i == 0) { + this.setHarvestLevel("axe", 0); + } else { + this.setHarvestLevel("axe", i - 1); + } + this.setMaxDamage((int) (d / 2.0f)); + this.setCreativeTab(SextiarySectorAPI.TabSSCooking); + FMLCommonHandler.instance().bus().register(this); + } - //修理以外ならクラフト後にgetContainerItemStackを呼び出す - @Override - public boolean hasContainerItem() - { - return !repair; - } + //アイテムがクラフト後に戻らないようにする + @Override + public boolean doesContainerItemLeaveCraftingGrid(ItemStack par1ItemStack) + { + return false; + } + + //修理以外ならクラフト後にgetContainerItemStackを呼び出す + @Override + public boolean hasContainerItem() + { + return !repair; + } //修理かどうかを判定する @SubscribeEvent @@ -59,27 +62,29 @@ public void onCrafting(ItemCraftedEvent event) repair = this == event.crafting.getItem(); } - //クラフト後のアイテムを、ダメージを与えて返す - @Override - public ItemStack getContainerItem(ItemStack itemStack) - { - if (itemStack != null && itemStack.getItem() == this) - { - itemStack.setItemDamage(itemStack.getItemDamage() + 1); - } - return itemStack; - } + //クラフト後のアイテムを、ダメージを与えて返す + @Override + public ItemStack getContainerItem(ItemStack itemStack) + { + if (itemStack != null && itemStack.getItem() == this) + { + itemStack.setItemDamage(itemStack.getItemDamage() + 1); + } + return itemStack; + } - @SideOnly(Side.CLIENT) - public boolean isFull3D() - { - return true; - } + @Override + @SideOnly(Side.CLIENT) + public boolean isFull3D() + { + return true; + } - public Item setTextureName(String p_111206_1_) - { - this.iconString = "sextiarysector:tool/"+p_111206_1_; - return this; - } + @Override + public Item setTextureName(String p_111206_1_) + { + this.iconString = "sextiarysector:tool/" + p_111206_1_; + return this; + } } diff --git a/src/main/java/shift/sextiarysector/item/ItemMineboat.java b/src/main/java/shift/sextiarysector/item/ItemMineboat.java index 6aa9f50..69e90a4 100644 --- a/src/main/java/shift/sextiarysector/item/ItemMineboat.java +++ b/src/main/java/shift/sextiarysector/item/ItemMineboat.java @@ -13,102 +13,109 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.entity.EntityMineboat; import shift.sextiarysector.entity.EntityMineboatChest; -public class ItemMineboat extends Item{ +public class ItemMineboat extends Item { public ItemMineboat() { super(); this.maxStackSize = 1; - this.setCreativeTab(SextiarySectorAPI.TabSSTransport); + this.setCreativeTab(SextiarySectorAPI.TabSSTransport); } + @Override public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) - { - float f = 1.0F; - float f1 = p_77659_3_.prevRotationPitch + (p_77659_3_.rotationPitch - p_77659_3_.prevRotationPitch) * f; - float f2 = p_77659_3_.prevRotationYaw + (p_77659_3_.rotationYaw - p_77659_3_.prevRotationYaw) * f; - double d0 = p_77659_3_.prevPosX + (p_77659_3_.posX - p_77659_3_.prevPosX) * (double)f; - double d1 = p_77659_3_.prevPosY + (p_77659_3_.posY - p_77659_3_.prevPosY) * (double)f + 1.62D - (double)p_77659_3_.yOffset; - double d2 = p_77659_3_.prevPosZ + (p_77659_3_.posZ - p_77659_3_.prevPosZ) * (double)f; - Vec3 vec3 = Vec3.createVectorHelper(d0, d1, d2); - float f3 = MathHelper.cos(-f2 * 0.017453292F - (float)Math.PI); - float f4 = MathHelper.sin(-f2 * 0.017453292F - (float)Math.PI); - float f5 = -MathHelper.cos(-f1 * 0.017453292F); - float f6 = MathHelper.sin(-f1 * 0.017453292F); - float f7 = f4 * f5; - float f8 = f3 * f5; - double d3 = 5.0D; - Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3); - MovingObjectPosition movingobjectposition = p_77659_2_.rayTraceBlocks(vec3, vec31, true); - - if (movingobjectposition == null) - { - return p_77659_1_; - } - else - { - Vec3 vec32 = p_77659_3_.getLook(f); - boolean flag = false; - float f9 = 1.0F; - List list = p_77659_2_.getEntitiesWithinAABBExcludingEntity(p_77659_3_, p_77659_3_.boundingBox.addCoord(vec32.xCoord * d3, vec32.yCoord * d3, vec32.zCoord * d3).expand((double)f9, (double)f9, (double)f9)); - int i; - - for (i = 0; i < list.size(); ++i) - { - Entity entity = (Entity)list.get(i); - - if (entity.canBeCollidedWith()) - { - float f10 = entity.getCollisionBorderSize(); - AxisAlignedBB axisalignedbb = entity.boundingBox.expand((double)f10, (double)f10, (double)f10); - - if (axisalignedbb.isVecInside(vec3)) - { - flag = true; - } - } - } - - if (flag) - { - return p_77659_1_; - } - else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (p_77659_2_.getBlock(i, j, k) == Blocks.snow_layer) - { - --j; - } - - EntityMineboatChest entityboat = new EntityMineboatChest(p_77659_2_, (double)((float)i + 0.5F), (double)((float)j + 1.0F), (double)((float)k + 0.5F)); - entityboat.rotationYaw = (float)(((MathHelper.floor_double((double)(p_77659_3_.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3) - 1) * 90); - - if (!p_77659_2_.getCollidingBoundingBoxes(entityboat, entityboat.boundingBox.expand(-0.1D, -0.1D, -0.1D)).isEmpty()) - { - return p_77659_1_; - } - - if (!p_77659_2_.isRemote) - { - p_77659_2_.spawnEntityInWorld(entityboat); - } - - if (!p_77659_3_.capabilities.isCreativeMode) - { - --p_77659_1_.stackSize; - } - } - - return p_77659_1_; - } - } - } + { + float f = 1.0F; + float f1 = p_77659_3_.prevRotationPitch + (p_77659_3_.rotationPitch - p_77659_3_.prevRotationPitch) * f; + float f2 = p_77659_3_.prevRotationYaw + (p_77659_3_.rotationYaw - p_77659_3_.prevRotationYaw) * f; + double d0 = p_77659_3_.prevPosX + (p_77659_3_.posX - p_77659_3_.prevPosX) * f; + double d1 = p_77659_3_.prevPosY + (p_77659_3_.posY - p_77659_3_.prevPosY) * f + 1.62D - p_77659_3_.yOffset; + double d2 = p_77659_3_.prevPosZ + (p_77659_3_.posZ - p_77659_3_.prevPosZ) * f; + Vec3 vec3 = Vec3.createVectorHelper(d0, d1, d2); + float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI); + float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI); + float f5 = -MathHelper.cos(-f1 * 0.017453292F); + float f6 = MathHelper.sin(-f1 * 0.017453292F); + float f7 = f4 * f5; + float f8 = f3 * f5; + double d3 = 5.0D; + Vec3 vec31 = vec3.addVector(f7 * d3, f6 * d3, f8 * d3); + MovingObjectPosition movingobjectposition = p_77659_2_.rayTraceBlocks(vec3, vec31, true); + + if (movingobjectposition == null) + { + return p_77659_1_; + } + else + { + Vec3 vec32 = p_77659_3_.getLook(f); + boolean flag = false; + float f9 = 1.0F; + List list = p_77659_2_.getEntitiesWithinAABBExcludingEntity(p_77659_3_, p_77659_3_.boundingBox.addCoord(vec32.xCoord * d3, vec32.yCoord * d3, vec32.zCoord * d3).expand(f9, f9, f9)); + int i; + + for (i = 0; i < list.size(); ++i) + { + Entity entity = (Entity) list.get(i); + + if (entity.canBeCollidedWith()) + { + float f10 = entity.getCollisionBorderSize(); + AxisAlignedBB axisalignedbb = entity.boundingBox.expand(f10, f10, f10); + + if (axisalignedbb.isVecInside(vec3)) + { + flag = true; + } + } + } + + if (flag) + { + return p_77659_1_; + } + else + { + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (p_77659_2_.getBlock(i, j, k) == Blocks.snow_layer) + { + --j; + } + + EntityMineboat entityboat = this.createMineboat(p_77659_2_, i, j, k);//new EntityMineboatChest(p_77659_2_, i + 0.5F, j + 1.0F, k + 0.5F); + entityboat.rotationYaw = ((MathHelper.floor_double(p_77659_3_.rotationYaw * 4.0F / 360.0F + 0.5D) & 3) - 1) * 90; + + if (!p_77659_2_.getCollidingBoundingBoxes(entityboat, entityboat.boundingBox.expand(-0.1D, -0.1D, -0.1D)).isEmpty()) + { + return p_77659_1_; + } + + if (!p_77659_2_.isRemote) + { + p_77659_2_.spawnEntityInWorld(entityboat); + } + + if (!p_77659_3_.capabilities.isCreativeMode) + { + --p_77659_1_.stackSize; + } + } + + return p_77659_1_; + } + } + } + + public EntityMineboat createMineboat(World par1World, double par2, double par4, double par6) { + return new EntityMineboatChest(par1World, par2 + 0.5F, par4 + 1.0F, par6 + 0.5F); + + } } diff --git a/src/main/java/shift/sextiarysector/item/ItemMineboatTank.java b/src/main/java/shift/sextiarysector/item/ItemMineboatTank.java new file mode 100644 index 0000000..a4fcd18 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemMineboatTank.java @@ -0,0 +1,15 @@ +package shift.sextiarysector.item; + +import net.minecraft.world.World; +import shift.sextiarysector.entity.EntityMineboat; +import shift.sextiarysector.entity.EntityMineboatTank; + +public class ItemMineboatTank extends ItemMineboat { + + @Override + public EntityMineboat createMineboat(World par1World, double par2, double par4, double par6) { + return new EntityMineboatTank(par1World, par2 + 0.5F, par4 + 1.0F, par6 + 0.5F); + + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemSSAxe.java b/src/main/java/shift/sextiarysector/item/ItemSSAxe.java new file mode 100644 index 0000000..6e6a921 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemSSAxe.java @@ -0,0 +1,12 @@ +package shift.sextiarysector.item; + +import net.minecraft.item.ItemAxe; + +public class ItemSSAxe extends ItemAxe { + + public ItemSSAxe(ToolMaterial p_i45327_1_) { + super(p_i45327_1_); + //this.setCreativeTab(SextiarySectorAPI.TabSSCore); + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemSSPickaxe.java b/src/main/java/shift/sextiarysector/item/ItemSSPickaxe.java new file mode 100644 index 0000000..5cf0bcc --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemSSPickaxe.java @@ -0,0 +1,11 @@ +package shift.sextiarysector.item; + +import net.minecraft.item.ItemPickaxe; + +public class ItemSSPickaxe extends ItemPickaxe { + + public ItemSSPickaxe(ToolMaterial p_i45347_1_) { + super(p_i45347_1_); + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemScoop.java b/src/main/java/shift/sextiarysector/item/ItemScoop.java index f881a12..94365d3 100644 --- a/src/main/java/shift/sextiarysector/item/ItemScoop.java +++ b/src/main/java/shift/sextiarysector/item/ItemScoop.java @@ -18,86 +18,90 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ItemScoop extends ItemTool{ +public class ItemScoop extends ItemTool { //protected Item.ToolMaterial theToolMaterial; - private static final Set field_150916_c = Sets.newHashSet(new Block[] {Blocks.sand, Blocks.gravel, Blocks.snow}); - - public ItemScoop(ToolMaterial p_i45343_1_) - { - super(1.0F, p_i45343_1_, field_150916_c); - int i = p_i45343_1_.getHarvestLevel(); - this.setHarvestLevel("scoop", i); - if(i==0){ - this.setHarvestLevel("shovel", 0); - }else{ - this.setHarvestLevel("shovel", i-1); - } - this.setCreativeTab(SextiarySectorAPI.TabSSAgriculture); - } - - - public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) - { - if (!p_77648_2_.canPlayerEdit(p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_1_)) - { - return false; - } - else - { - - Block block = p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_); - - if (p_77648_7_ != 0 && p_77648_3_.getBlock(p_77648_4_, p_77648_5_ + 1, p_77648_6_).isAir(p_77648_3_, p_77648_4_, p_77648_5_ + 1, p_77648_6_) && (block == Blocks.grass || block == Blocks.dirt)) - { - Block block1 = SSBlocks.hole; - p_77648_3_.playSoundEffect((double)((float)p_77648_4_ + 0.5F), (double)((float)p_77648_5_ + 0.5F), (double)((float)p_77648_6_ + 0.5F), block1.stepSound.getStepResourcePath(), (block1.stepSound.getVolume() + 1.0F) / 2.0F, block1.stepSound.getPitch() * 0.8F); - - p_77648_2_.addStat(SSAchievement.hole, 1); - if (p_77648_3_.isRemote) - { - return true; - } - else - { - p_77648_3_.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, block1); - p_77648_1_.damageItem(1, p_77648_2_); - return true; - } - } - else if(p_77648_7_ != 0 && p_77648_3_.getBlock(p_77648_4_, p_77648_5_ + 1, p_77648_6_).isAir(p_77648_3_, p_77648_4_, p_77648_5_ + 1, p_77648_6_) && (block == Blocks.farmland )){ - - Block block1 = SSBlocks.farmland; - p_77648_3_.playSoundEffect((double)((float)p_77648_4_ + 0.5F), (double)((float)p_77648_5_ + 0.5F), (double)((float)p_77648_6_ + 0.5F), block1.stepSound.getStepResourcePath(), (block1.stepSound.getVolume() + 1.0F) / 2.0F, block1.stepSound.getPitch() * 0.8F); - - p_77648_2_.addStat(SSAchievement.farmland, 1); - if (p_77648_3_.isRemote) - { - return true; - } - else - { - p_77648_3_.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, block1); - p_77648_1_.damageItem(1, p_77648_2_); - return true; - } - - }else{ - return false; - } - } - } - - @SideOnly(Side.CLIENT) - public boolean isFull3D() - { - return true; - } - - public Item setTextureName(String p_111206_1_) - { - this.iconString = "sextiarysector:tool/"+p_111206_1_; - return this; - } + private static final Set field_150916_c = Sets.newHashSet(new Block[] { Blocks.sand, Blocks.gravel, Blocks.snow }); + + public ItemScoop(ToolMaterial p_i45343_1_) + { + super(1.0F, p_i45343_1_, field_150916_c); + int i = p_i45343_1_.getHarvestLevel(); + float d = p_i45343_1_.getMaxUses(); + this.setHarvestLevel("scoop", i); + if (i == 0) { + this.setHarvestLevel("shovel", 0); + } else { + this.setHarvestLevel("shovel", i - 1); + } + this.setMaxDamage((int) (d / 2.0f)); + this.setCreativeTab(SextiarySectorAPI.TabSSAgriculture); + } + + @Override + public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) + { + if (!p_77648_2_.canPlayerEdit(p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_1_)) + { + return false; + } + else + { + + Block block = p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_); + + if (p_77648_7_ != 0 && p_77648_3_.getBlock(p_77648_4_, p_77648_5_ + 1, p_77648_6_).isAir(p_77648_3_, p_77648_4_, p_77648_5_ + 1, p_77648_6_) && (block == Blocks.grass || block == Blocks.dirt)) + { + Block block1 = SSBlocks.hole; + p_77648_3_.playSoundEffect(p_77648_4_ + 0.5F, p_77648_5_ + 0.5F, p_77648_6_ + 0.5F, block1.stepSound.getStepResourcePath(), (block1.stepSound.getVolume() + 1.0F) / 2.0F, block1.stepSound.getPitch() * 0.8F); + + p_77648_2_.addStat(SSAchievement.hole, 1); + if (p_77648_3_.isRemote) + { + return true; + } + else + { + p_77648_3_.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, block1); + p_77648_1_.damageItem(1, p_77648_2_); + return true; + } + } + else if (p_77648_7_ != 0 && p_77648_3_.getBlock(p_77648_4_, p_77648_5_ + 1, p_77648_6_).isAir(p_77648_3_, p_77648_4_, p_77648_5_ + 1, p_77648_6_) && (block == Blocks.farmland)) { + + Block block1 = SSBlocks.farmland; + p_77648_3_.playSoundEffect(p_77648_4_ + 0.5F, p_77648_5_ + 0.5F, p_77648_6_ + 0.5F, block1.stepSound.getStepResourcePath(), (block1.stepSound.getVolume() + 1.0F) / 2.0F, block1.stepSound.getPitch() * 0.8F); + + p_77648_2_.addStat(SSAchievement.farmland, 1); + if (p_77648_3_.isRemote) + { + return true; + } + else + { + p_77648_3_.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, block1); + p_77648_1_.damageItem(1, p_77648_2_); + return true; + } + + } else { + return false; + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public boolean isFull3D() + { + return true; + } + + @Override + public Item setTextureName(String p_111206_1_) + { + this.iconString = "sextiarysector:tool/" + p_111206_1_; + return this; + } } diff --git a/src/main/java/shift/sextiarysector/module/ModuleSandpit.java b/src/main/java/shift/sextiarysector/module/ModuleSandpit.java index 560d355..0c4fb77 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleSandpit.java +++ b/src/main/java/shift/sextiarysector/module/ModuleSandpit.java @@ -17,7 +17,7 @@ private ModuleSandpit() { } public static ModuleSandpit getInstance() { - if(instance==null){ + if (instance == null) { instance = new ModuleSandpit(); } return instance; @@ -36,17 +36,17 @@ public void load(FMLInitializationEvent event) { @Override public void postInit(FMLPostInitializationEvent event) { - BlockSandpit.addShell(new ItemStack(Items.stick), 25); + BlockSandpit.addShell(new ItemStack(Items.stick), 45); - BlockSandpit.addShell(new ItemStack(Items.glass_bottle), 7); + BlockSandpit.addShell(new ItemStack(Items.glass_bottle), 14); - BlockSandpit.addShell(new ShellEntry(new ItemStack(Items.book), 5).setEnchant()); + BlockSandpit.addShell(new ShellEntry(new ItemStack(Items.book), 10).setEnchant()); - BlockSandpit.addShell(new ItemStack(SSItems.laver), 16); + BlockSandpit.addShell(new ItemStack(SSItems.laver), 26); - BlockSandpit.addShell(new ItemStack(Items.redstone), 5); - BlockSandpit.addShell(new ItemStack(SSItems.blueStoneDust), 5); - BlockSandpit.addShell(new ItemStack(SSItems.yellowStoneDust), 5); + BlockSandpit.addShell(new ItemStack(Items.redstone), 8); + BlockSandpit.addShell(new ItemStack(SSItems.blueStoneDust), 8); + BlockSandpit.addShell(new ItemStack(SSItems.yellowStoneDust), 8); BlockSandpit.addShell(new ItemStack(SSItems.mithrilDust), 3); BlockSandpit.addShell(new ItemStack(SSItems.orichalcumGem), 1); diff --git a/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java b/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java new file mode 100644 index 0000000..5aad755 --- /dev/null +++ b/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java @@ -0,0 +1,44 @@ +package shift.sextiarysector.module; + +import net.minecraft.item.Item.ToolMaterial; +import net.minecraftforge.common.util.EnumHelper; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class ModuleToolMaterial implements IModule { + + private static ModuleToolMaterial instance; + + private ModuleToolMaterial() { + } + + public static ModuleToolMaterial getInstance() { + if (instance == null) { + instance = new ModuleToolMaterial(); + } + return instance; + } + + public static ToolMaterial copper; + + @Override + public void preInit(FMLPreInitializationEvent event) { + + copper = EnumHelper.addToolMaterial("copper", 2, 200, 4.0F, 1.0F, 10); + + } + + @Override + public void load(FMLInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void postInit(FMLPostInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + +} diff --git a/src/main/java/shift/sextiarysector/module/ModuleTrap.java b/src/main/java/shift/sextiarysector/module/ModuleTrap.java new file mode 100644 index 0000000..28361ed --- /dev/null +++ b/src/main/java/shift/sextiarysector/module/ModuleTrap.java @@ -0,0 +1,200 @@ +package shift.sextiarysector.module; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandom; +import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class ModuleTrap implements IModule { + + private static ModuleTrap instance; + + private ModuleTrap() { + } + + public static ModuleTrap getInstance() { + if (instance == null) { + instance = new ModuleTrap(); + } + return instance; + } + + static final List smallTrapList = new ArrayList(); + + @Override + public void preInit(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void load(FMLInitializationEvent event) { + + addTrap(new ItemStack(Items.feather), 50); + addTrap(new ItemStack(Items.egg), 20); + + } + + @Override + public void postInit(FMLPostInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + public static void addTrap(ItemStack seed, int weight) + { + addTrap(new TrapEntry(seed, weight)); + } + + public static void addTrap(TrapEntry shellEntry) { + smallTrapList.add(shellEntry); + } + + //public static void addTrap(Class entity, int weight) { + // smallTrapList.add(new TrapEntry(entity, weight)); + //} + + public static class TrapEntry extends WeightedRandom.Item + { + public final ItemStack item; + //public final Class entity; + private float damage; + private boolean enchant; + + public TrapEntry(ItemStack seed, int weight) + { + super(weight); + this.item = seed; + //this.entity = null; + } + + public TrapEntry(Class entity, int weight) + { + super(weight); + this.item = null; + //this.entity = entity; + } + + public ItemStack addCustom(Random p_150708_1_) + { + ItemStack itemstack = this.item.copy(); + + if (this.damage > 0.0F) + { + int i = (int) (this.damage * this.item.getMaxDamage()); + int j = itemstack.getMaxDamage() - p_150708_1_.nextInt(p_150708_1_.nextInt(i) + 1); + + if (j > i) + { + j = i; + } + + if (j < 1) + { + j = 1; + } + + itemstack.setItemDamage(j); + } + + if (this.enchant) + { + EnchantmentHelper.addRandomEnchantment(p_150708_1_, itemstack, 30); + } + + return itemstack; + } + + public TrapEntry setDamage(float p_150709_1_) + { + this.damage = p_150709_1_; + return this; + } + + public TrapEntry setEnchant() + { + this.enchant = true; + return this; + } + + } + + public static ItemStack getTrapItem(World world) { + + TrapEntry entry = (TrapEntry) WeightedRandom.getRandomItem(world.rand, smallTrapList); + + if (entry == null) return null; + + if (entry.item != null) + { + return entry.addCustom(world.rand); + } + + return null; + + } + + public static void spawnTrap(World world, int x, int y, int z) + { + + Entity entity = null; + + TrapEntry entry = (TrapEntry) WeightedRandom.getRandomItem(world.rand, smallTrapList); + + if (entry == null) return; + + if (entry.item != null) + { + entity = new EntityItem(world, x + 0.5d, y + 0.5d, z + 0.5d, entry.addCustom(world.rand)); + } + + /*if (entry.entity != null) + { + entity = createEntityByClass(entry.entity, world); + if (entity != null && entity instanceof EntityLivingBase) + { + EntityLiving entityliving = (EntityLiving) entity; + entity.setLocationAndAngles(x + 0.5d, y + 0.5d, z + 0.5d, MathHelper.wrapAngleTo180_float(world.rand.nextFloat() * 360.0F), 0.0F); + entityliving.rotationYawHead = entityliving.rotationYaw; + entityliving.renderYawOffset = entityliving.rotationYaw; + //entityliving.onSpawnWithEgg((IEntityLivingData) null); + entityliving.playLivingSound(); + } + }*/ + + if (entity != null) world.spawnEntityInWorld(entity); + + } + + public static Entity createEntityByClass(Class entityClass, World p_75616_1_) + { + Entity entity = null; + + try + { + Class oclass = entityClass; + + if (oclass != null) + { + entity = (Entity) oclass.getConstructor(new Class[] { World.class }).newInstance(new Object[] { p_75616_1_ }); + } + } catch (Exception exception) + { + SextiarySector.Log.catching(exception); + } + + return entity; + } + +} diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 56dffb7..1a519cf 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -11,6 +11,7 @@ import shift.sextiarysector.SextiarySector; import shift.sextiarysector.entity.EntityMineboat; import shift.sextiarysector.entity.EntityMineboatChest; +import shift.sextiarysector.entity.EntityMineboatTank; import shift.sextiarysector.gui.tab.TabManager; import shift.sextiarysector.packet.PacketGuiId; import shift.sextiarysector.plugin.IPlugin; @@ -21,6 +22,7 @@ import shift.sextiarysector.renderer.block.RendererFarmland; import shift.sextiarysector.renderer.block.RendererFigure; import shift.sextiarysector.renderer.block.RendererFluidCrafter; +import shift.sextiarysector.renderer.block.RendererFunnel; import shift.sextiarysector.renderer.block.RendererGearShaft; import shift.sextiarysector.renderer.block.RendererHole; import shift.sextiarysector.renderer.block.RendererMonitor; @@ -32,10 +34,12 @@ import shift.sextiarysector.renderer.block.RendererSmallWindmill; import shift.sextiarysector.renderer.block.RendererSquare; import shift.sextiarysector.renderer.block.RendererSteamMotor; +import shift.sextiarysector.renderer.block.RendererTank; import shift.sextiarysector.renderer.block.RendererWindmill; import shift.sextiarysector.renderer.block.RendererWood; import shift.sextiarysector.renderer.block.RendererWoodHopper; import shift.sextiarysector.renderer.entity.RenderMineboat; +import shift.sextiarysector.renderer.entity.RenderMineboatTank; import shift.sextiarysector.renderer.item.RenderGF; import shift.sextiarysector.tileentity.TileEntityBlockBottle; import shift.sextiarysector.tileentity.TileEntityFan; @@ -51,6 +55,7 @@ import shift.sextiarysector.tileentity.TileEntitySmallWindmill; import shift.sextiarysector.tileentity.TileEntitySquare; import shift.sextiarysector.tileentity.TileEntitySteamMotor; +import shift.sextiarysector.tileentity.TileEntityTank; import shift.sextiarysector.tileentity.TileEntityWindmill; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; @@ -81,6 +86,8 @@ public void setCustomRenderers() { this.woodHopperType = RenderingRegistry.getNextAvailableRenderId(); + this.tankType = RenderingRegistry.getNextAvailableRenderId(); + this.funnelType = RenderingRegistry.getNextAvailableRenderId(); this.pipeType = RenderingRegistry.getNextAvailableRenderId(); this.ShaftRenderType = RenderingRegistry.getNextAvailableRenderId(); @@ -115,6 +122,8 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererWoodHopper()); + RenderingRegistry.registerBlockHandler(new RendererTank()); + RenderingRegistry.registerBlockHandler(new RendererFunnel()); RenderingRegistry.registerBlockHandler(new RendererPipe()); RenderingRegistry.registerBlockHandler(new RendererShaft()); @@ -152,6 +161,8 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySquare.class, new RendererSquare()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTank.class, new RendererTank()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTank.class, new RendererTank()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPipe.class, new RendererPipe()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFigure.class, new RendererFigure()); @@ -172,6 +183,7 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMonitor.class, new RendererMonitor()); RenderingRegistry.registerEntityRenderingHandler(EntityMineboatChest.class, new RenderMineboat()); + RenderingRegistry.registerEntityRenderingHandler(EntityMineboatTank.class, new RenderMineboatTank()); RenderingRegistry.registerEntityRenderingHandler(EntityMineboat.class, new RenderMineboat()); } diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index e5191a1..a057ddc 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -16,6 +16,8 @@ public class CommonProxy { public int woodHopperType; public int pipeType; + public int tankType; + public int funnelType; public int ShaftRenderType; diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index 6ffbff1..e8e29a7 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -60,6 +60,20 @@ public static void addRecipes(CraftingManager p_77608_1_) 'x', "plateWood", })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.tank, 1), + new Object[] { + "xyx", "y y", "xyx", + 'x', Items.stick, + 'y', "paneGlassColorless", + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.funnel, 1), + new Object[] { + "y y", "yxy", " y ", + 'x', SSBlocks.tank, + 'y', "ingotCopper", + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.rucksack, 1), new Object[] { "xxx", "x x", "xxx", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index 68cb2ab..ebf5a38 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -170,10 +170,10 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) })); //パイプ - p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.ironPipe, 4), + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.copperPipe, 4), new Object[] { "x", "x", "x", - 'x', "ingotIron", + 'x', "ingotCopper", })); //料理 diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java index 729754d..1d677a0 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java @@ -11,188 +11,194 @@ public class RecipesTool { public static void addRecipes(CraftingManager p_77608_1_) - { + { //Scoop - Object[] material = new Object[]{"plankWood","cobblestone","ingotIron","ingotGold","gemDiamond"}; - Item[] scoop = new Item[]{SSItems.woodScoop,SSItems.stoneScoop,SSItems.ironScoop,SSItems.goldScoop,SSItems.diamondScoop}; - for(int i = 0;i> 16 & 255) / 255.0F; + float f1 = (l >> 8 & 255) / 255.0F; + float f2 = (l & 255) / 255.0F; + + if (EntityRenderer.anaglyphEnable) + { + float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F; + float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F; + float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F; + f = f3; + f1 = f4; + f2 = f5; + } + + tessellator.setColorOpaque_F(f, f1, f2); + return this.renderBlockFunnelMetadata(p_147803_1_, p_147803_2_, p_147803_3_, p_147803_4_, renderer.blockAccess.getBlockMetadata(p_147803_2_, p_147803_3_, p_147803_4_), false, renderer); + } + + public boolean renderBlockFunnelMetadata(Block p_147799_1_, int p_147799_2_, int p_147799_3_, int p_147799_4_, int p_147799_5_, boolean p_147799_6_, RenderBlocks renderer) + { + Tessellator tessellator = Tessellator.instance; + int i1 = 0;//BlockHopper.getDirectionFromMetadata(p_147799_5_); + double d0 = 0.625D; + renderer.setRenderBounds(0.0D, d0, 0.0D, 1.0D, 1.0D, 1.0D); + + if (p_147799_6_) + { + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + renderer.renderFaceYNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 0, p_147799_5_)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 1, p_147799_5_)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 2, p_147799_5_)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 3, p_147799_5_)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 4, p_147799_5_)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(p_147799_1_, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(p_147799_1_, 5, p_147799_5_)); + tessellator.draw(); + } + else + { + renderer.renderStandardBlock(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_); + } + + float f1; + + if (!p_147799_6_) + { + tessellator.setBrightness(p_147799_1_.getMixedBrightnessForBlock(renderer.blockAccess, p_147799_2_, p_147799_3_, p_147799_4_)); + int j1 = p_147799_1_.colorMultiplier(renderer.blockAccess, p_147799_2_, p_147799_3_, p_147799_4_); + float f = (j1 >> 16 & 255) / 255.0F; + f1 = (j1 >> 8 & 255) / 255.0F; + float f2 = (j1 & 255) / 255.0F; + + if (EntityRenderer.anaglyphEnable) + { + float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F; + float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F; + float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F; + f = f3; + f1 = f4; + f2 = f5; + } + + tessellator.setColorOpaque_F(f, f1, f2); + } + + IIcon iicon = ((BlockFunnel) SSBlocks.funnel).getFunnelIcon("funnel_outside"); + IIcon iicon1 = ((BlockFunnel) SSBlocks.funnel).getFunnelIcon("funnel_inside"); + f1 = 0.125F; + + if (p_147799_6_) + { + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(p_147799_1_, -1.0F + f1, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(p_147799_1_, 1.0F - f1, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(p_147799_1_, 0.0D, 0.0D, -1.0F + f1, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(p_147799_1_, 0.0D, 0.0D, 1.0F - f1, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(p_147799_1_, 0.0D, -1.0D + d0, 0.0D, iicon1); + tessellator.draw(); + } + else + { + renderer.renderFaceXPos(p_147799_1_, p_147799_2_ - 1.0F + f1, p_147799_3_, p_147799_4_, iicon); + renderer.renderFaceXNeg(p_147799_1_, p_147799_2_ + 1.0F - f1, p_147799_3_, p_147799_4_, iicon); + renderer.renderFaceZPos(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_ - 1.0F + f1, iicon); + renderer.renderFaceZNeg(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_ + 1.0F - f1, iicon); + renderer.renderFaceYPos(p_147799_1_, p_147799_2_, p_147799_3_ - 1.0F + d0, p_147799_4_, iicon1); + } + + renderer.setOverrideBlockTexture(iicon); + double d3 = 0.125D;//0.25D; + double d4 = 0.375D;//0.25D; + renderer.setRenderBounds(d3, d4, d3, 1.0D - d3, d0 - 0.002D, 1.0D - d3); + + if (p_147799_6_) + { + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + renderer.renderFaceYNeg(p_147799_1_, 0.0D, 0.0D, 0.0D, iicon); + tessellator.draw(); + } + else + { + renderer.renderStandardBlock(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_); + } + + if (!p_147799_6_) + { + double d1 = 0.25D;//0.375D; + renderer.setOverrideBlockTexture(iicon); + + renderer.setRenderBounds(d1, 0.0D, d1, 1.0D - d1, d4, 1.0D - d1); + renderer.renderStandardBlock(p_147799_1_, p_147799_2_, p_147799_3_, p_147799_4_); + + } + + renderer.clearOverrideBlockTexture(); + return true; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return false; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.funnelType; + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererHole.java b/src/main/java/shift/sextiarysector/renderer/block/RendererHole.java index d35db4e..e4735da 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererHole.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererHole.java @@ -18,13 +18,13 @@ public class RendererHole implements ISimpleBlockRenderingHandler { public static RenderSSBlocks renderer = new RenderSSBlocks(); @Override - public void renderInventoryBlock(Block block, int metadata, int modelId,RenderBlocks renderer) { + public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { } @Override - public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block block, int modelId, RenderBlocks renderer) { + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { - if(this.getRenderId()!=modelId)return false; + if (this.getRenderId() != modelId) return false; this.renderer.blockAccess = world; @@ -34,12 +34,10 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block bl this.renderer.renderStandardBlock(block, x, y, z); //Tessellator tessellator = Tessellator.instance; - //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y+1, z)); + //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y+1, z)); //renderer.setOverrideBlockTexture(Blocks.dirt.getIcon(0, 0)); - - float f = 0.125F; float minx = 0; @@ -47,217 +45,214 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block bl float maxx = 1; float maxz = 1; - - if(!this.isSame(world, x, y, z,block, ForgeDirection.getOrientation(4))){ + if (!this.isSame(world, x, y, z, block, ForgeDirection.getOrientation(4))) { //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y+1, z)); this.renderer.setRenderBounds(0.0f, 0.0F, 0.0F, f, 1.0F, 1.0F); this.renderer.renderStandardBlock(block, x, y, z, ForgeDirection.getOrientation(4)); minx = f; - } - - if(!this.isSame(world, x, y, z,block, ForgeDirection.getOrientation(2))){ - //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); - this.renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); - this.renderer.renderStandardBlock(block, x, y, z, ForgeDirection.getOrientation(2)); - //this.renderStandardBlock(block, world, x, y, z, renderer); - minz = f; - } - - if(!this.isSame(world, x, y, z,block, ForgeDirection.getOrientation(5))){ - //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); - this.renderer.setRenderBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - this.renderer.renderStandardBlock(block, x, y, z, ForgeDirection.getOrientation(5)); - //this.renderStandardBlock(block, world, x, y, z, renderer); - maxx = 1-f; - } - - if(!this.isSame(world, x, y, z,block, ForgeDirection.getOrientation(3))){ - //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); - this.renderer.setRenderBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); - this.renderer.renderStandardBlock(block, x, y, z,ForgeDirection.getOrientation(3)); - //this.renderStandardBlock(block, world, x, y, z, renderer); - maxz = 1-f; - } - + } + + if (!this.isSame(world, x, y, z, block, ForgeDirection.getOrientation(2))) { + //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + this.renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); + this.renderer.renderStandardBlock(block, x, y, z, ForgeDirection.getOrientation(2)); + //this.renderStandardBlock(block, world, x, y, z, renderer); + minz = f; + } + + if (!this.isSame(world, x, y, z, block, ForgeDirection.getOrientation(5))) { + //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + this.renderer.setRenderBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + this.renderer.renderStandardBlock(block, x, y, z, ForgeDirection.getOrientation(5)); + //this.renderStandardBlock(block, world, x, y, z, renderer); + maxx = 1 - f; + } + + if (!this.isSame(world, x, y, z, block, ForgeDirection.getOrientation(3))) { + //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + this.renderer.setRenderBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); + this.renderer.renderStandardBlock(block, x, y, z, ForgeDirection.getOrientation(3)); + //this.renderStandardBlock(block, world, x, y, z, renderer); + maxz = 1 - f; + } - //Tessellator tessellator = Tessellator.instance; - //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); - - //IIcon iicon = BlockLiquid.getLiquidIcon("water_still"); - //this.renderer.renderFaceYPos(block, (double)x, (double)((float)y - 1.0F + (15f/16f)), (double)z, iicon); + //Tessellator tessellator = Tessellator.instance; + //tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); - this.renderer.field_152631_f = false; - this.renderer.renderAllFaces = false; + //IIcon iicon = BlockLiquid.getLiquidIcon("water_still"); + //this.renderer.renderFaceYPos(block, (double)x, (double)((float)y - 1.0F + (15f/16f)), (double)z, iicon); + this.renderer.field_152631_f = false; + this.renderer.renderAllFaces = false; - /* + /* renderer.renderStandardBlock(block, x, y, z); - Tessellator tessellator = Tessellator.instance; - tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); - int l = block.colorMultiplier(world, x, y, z); - f = (float)(l >> 16 & 255) / 255.0F; - float f1 = (float)(l >> 8 & 255) / 255.0F; - float f2 = (float)(l & 255) / 255.0F; - float f4; - - if (EntityRenderer.anaglyphEnable) - { - float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F; - f4 = (f * 30.0F + f1 * 70.0F) / 100.0F; - float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F; - f = f3; - f1 = f4; - f2 = f5; - } - - tessellator.setColorOpaque_F(f, f1, f2); - IIcon iicon1 = block.getBlockTextureFromSide(2); - f4 = 0.125F; - renderer.renderFaceXPos(block, (double)((float)x - 1.0F + f4), (double)y, (double)z, iicon1); - renderer.renderFaceXNeg(block, (double)((float)x + 1.0F - f4), (double)y, (double)z, iicon1); - renderer.renderFaceZPos(block, (double)x, (double)y, (double)((float)z - 1.0F + f4), iicon1); - renderer.renderFaceZNeg(block, (double)x, (double)y, (double)((float)z + 1.0F - f4), iicon1); - IIcon iicon2 = block.getBlockTextureFromSide(2); - renderer.renderFaceYPos(block, (double)x, (double)((float)y - 1.0F + 0.25F), (double)z, iicon2); - renderer.renderFaceYNeg(block, (double)x, (double)((float)y + 1.0F - 0.75F), (double)z, iicon2); - */ - - return true; + Tessellator tessellator = Tessellator.instance; + tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + int l = block.colorMultiplier(world, x, y, z); + f = (float)(l >> 16 & 255) / 255.0F; + float f1 = (float)(l >> 8 & 255) / 255.0F; + float f2 = (float)(l & 255) / 255.0F; + float f4; + + if (EntityRenderer.anaglyphEnable) + { + float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F; + f4 = (f * 30.0F + f1 * 70.0F) / 100.0F; + float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F; + f = f3; + f1 = f4; + f2 = f5; + } + + tessellator.setColorOpaque_F(f, f1, f2); + IIcon iicon1 = block.getBlockTextureFromSide(2); + f4 = 0.125F; + renderer.renderFaceXPos(block, (double)((float)x - 1.0F + f4), (double)y, (double)z, iicon1); + renderer.renderFaceXNeg(block, (double)((float)x + 1.0F - f4), (double)y, (double)z, iicon1); + renderer.renderFaceZPos(block, (double)x, (double)y, (double)((float)z - 1.0F + f4), iicon1); + renderer.renderFaceZNeg(block, (double)x, (double)y, (double)((float)z + 1.0F - f4), iicon1); + IIcon iicon2 = block.getBlockTextureFromSide(2); + renderer.renderFaceYPos(block, (double)x, (double)((float)y - 1.0F + 0.25F), (double)z, iicon2); + renderer.renderFaceYNeg(block, (double)x, (double)((float)y + 1.0F - 0.75F), (double)z, iicon2); + */ + + return true; } - protected boolean isSame(IBlockAccess p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_ ,Block b, ForgeDirection d){ + protected boolean isSame(IBlockAccess p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_, Block b, ForgeDirection d) { - if(p_149743_1_.getBlock(p_149743_2_ + d.offsetX, p_149743_3_ + d.offsetY, p_149743_4_ + d.offsetZ) == b)return true; + if (p_149743_1_.getBlock(p_149743_2_ + d.offsetX, p_149743_3_ + d.offsetY, p_149743_4_ + d.offsetZ) == b) return true; return false; } - public boolean renderStandardBlock(Block p_147784_1_,IBlockAccess world, int p_147784_2_, int p_147784_3_, int p_147784_4_,RenderBlocks renderer) - { - int l = p_147784_1_.colorMultiplier(world, p_147784_2_, p_147784_3_, p_147784_4_); - float f = (float)(l >> 16 & 255) / 255.0F; - float f1 = (float)(l >> 8 & 255) / 255.0F; - float f2 = (float)(l & 255) / 255.0F; - - if (EntityRenderer.anaglyphEnable) - { - float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F; - float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F; - float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F; - f = f3; - f1 = f4; - f2 = f5; - } - - return Minecraft.isAmbientOcclusionEnabled() && p_147784_1_.getLightValue() == 0 ? (renderer.partialRenderBounds ? renderer.renderStandardBlockWithAmbientOcclusionPartial(p_147784_1_, p_147784_2_, p_147784_3_, p_147784_4_, f, f1, f2) : this.renderStandardBlockWithColorMultiplier(p_147784_1_, world, p_147784_2_, p_147784_3_, p_147784_4_, f, f1, f2, renderer)) : this.renderStandardBlockWithColorMultiplier(p_147784_1_, world, p_147784_2_, p_147784_3_, p_147784_4_, f, f1, f2, renderer); - - //return this.renderStandardBlockWithColorMultiplier(p_147784_1_, world, p_147784_2_, p_147784_3_, p_147784_4_, f, f1, f2, renderer); - } - - public boolean renderStandardBlockWithColorMultiplier(Block p_147736_1_,IBlockAccess world, int p_147736_2_, int p_147736_3_, int p_147736_4_, float p_147736_5_, float p_147736_6_, float p_147736_7_ ,RenderBlocks renderer) - { - System.out.println("AAA"); - renderer.enableAO = false; - Tessellator tessellator = Tessellator.instance; - boolean flag = false; - float f3 = 0.5F; - float f4 = 1.0F; - float f5 = 0.8F; - float f6 = 0.6F; - float f7 = f4 * p_147736_5_; - float f8 = f4 * p_147736_6_; - float f9 = f4 * p_147736_7_; - float f10 = f3; - float f11 = f5; - float f12 = f6; - float f13 = f3; - float f14 = f5; - float f15 = f6; - float f16 = f3; - float f17 = f5; - float f18 = f6; - - IBlockAccess blockAccess = world; - - - if (p_147736_1_ != Blocks.grass) - { - f10 = f3 * p_147736_5_; - f11 = f5 * p_147736_5_; - f12 = f6 * p_147736_5_; - f13 = f3 * p_147736_6_; - f14 = f5 * p_147736_6_; - f15 = f6 * p_147736_6_; - f16 = f3 * p_147736_7_; - f17 = f5 * p_147736_7_; - f18 = f6 * p_147736_7_; - } - - int l = p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_, p_147736_3_, p_147736_4_); - tessellator.setBrightness(l); - - if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(blockAccess, p_147736_2_, p_147736_3_ - 1, p_147736_4_, 0)) - { - //tessellator.setBrightness(renderer.renderMinY > 0.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_, p_147736_3_ - 1, p_147736_4_)); - tessellator.setColorOpaque_F(f10, f13, f16); - renderer.renderFaceYNeg(p_147736_1_, (double)p_147736_2_, (double)p_147736_3_, (double)p_147736_4_, renderer.getBlockIcon(p_147736_1_, blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 0)); - flag = true; - } - - if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(blockAccess, p_147736_2_, p_147736_3_ + 1, p_147736_4_, 1)) - { - //tessellator.setBrightness(renderer.renderMaxY < 1.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_, p_147736_3_ + 1, p_147736_4_)); - tessellator.setColorOpaque_F(f7, f8, f9); - renderer.renderFaceYPos(p_147736_1_, (double)p_147736_2_, (double)p_147736_3_, (double)p_147736_4_, renderer.getBlockIcon(p_147736_1_, blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 1)); - flag = true; - } - - IIcon iicon; - - if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(blockAccess, p_147736_2_, p_147736_3_, p_147736_4_ - 1, 2)) - { - //tessellator.setBrightness(renderer.renderMinZ > 0.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_, p_147736_3_, p_147736_4_ - 1)); - tessellator.setColorOpaque_F(f11, f14, f17); - iicon = renderer.getBlockIcon(p_147736_1_, renderer.blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 2); - renderer.renderFaceZNeg(p_147736_1_, (double)p_147736_2_, (double)p_147736_3_, (double)p_147736_4_, iicon); - - flag = true; - } - - if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(renderer.blockAccess, p_147736_2_, p_147736_3_, p_147736_4_ + 1, 3)) - { - //tessellator.setBrightness(renderer.renderMaxZ < 1.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_, p_147736_3_, p_147736_4_ + 1)); - tessellator.setColorOpaque_F(f11, f14, f17); - iicon = renderer.getBlockIcon(p_147736_1_, blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 3); - renderer.renderFaceZPos(p_147736_1_, (double)p_147736_2_, (double)p_147736_3_, (double)p_147736_4_, iicon); - - flag = true; - } - - if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(blockAccess, p_147736_2_ - 1, p_147736_3_, p_147736_4_, 4)) - { - //tessellator.setBrightness(renderer.renderMinX > 0.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_ - 1, p_147736_3_, p_147736_4_)); - tessellator.setColorOpaque_F(f12, f15, f18); - iicon = renderer.getBlockIcon(p_147736_1_, blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 4); - renderer.renderFaceXNeg(p_147736_1_, (double)p_147736_2_, (double)p_147736_3_, (double)p_147736_4_, iicon); - - flag = true; - } - - if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(blockAccess, p_147736_2_ + 1, p_147736_3_, p_147736_4_, 5)) - { - //tessellator.setBrightness(renderer.renderMaxX < 1.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_ + 1, p_147736_3_, p_147736_4_)); - tessellator.setColorOpaque_F(f12, f15, f18); - iicon = renderer.getBlockIcon(p_147736_1_, blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 5); - renderer.renderFaceXPos(p_147736_1_, (double)p_147736_2_, (double)p_147736_3_, (double)p_147736_4_, iicon); - - flag = true; - } - - return flag; - } + public boolean renderStandardBlock(Block p_147784_1_, IBlockAccess world, int p_147784_2_, int p_147784_3_, int p_147784_4_, RenderBlocks renderer) + { + int l = p_147784_1_.colorMultiplier(world, p_147784_2_, p_147784_3_, p_147784_4_); + float f = (l >> 16 & 255) / 255.0F; + float f1 = (l >> 8 & 255) / 255.0F; + float f2 = (l & 255) / 255.0F; + + if (EntityRenderer.anaglyphEnable) + { + float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F; + float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F; + float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F; + f = f3; + f1 = f4; + f2 = f5; + } + + return Minecraft.isAmbientOcclusionEnabled() && p_147784_1_.getLightValue() == 0 ? (renderer.partialRenderBounds ? renderer.renderStandardBlockWithAmbientOcclusionPartial(p_147784_1_, p_147784_2_, p_147784_3_, p_147784_4_, f, f1, f2) : this + .renderStandardBlockWithColorMultiplier(p_147784_1_, world, p_147784_2_, p_147784_3_, p_147784_4_, f, f1, f2, renderer)) : this.renderStandardBlockWithColorMultiplier(p_147784_1_, world, p_147784_2_, p_147784_3_, p_147784_4_, f, f1, f2, + renderer); + + //return this.renderStandardBlockWithColorMultiplier(p_147784_1_, world, p_147784_2_, p_147784_3_, p_147784_4_, f, f1, f2, renderer); + } + public boolean renderStandardBlockWithColorMultiplier(Block p_147736_1_, IBlockAccess world, int p_147736_2_, int p_147736_3_, int p_147736_4_, float p_147736_5_, float p_147736_6_, float p_147736_7_, RenderBlocks renderer) + { + //System.out.println("AAA"); + renderer.enableAO = false; + Tessellator tessellator = Tessellator.instance; + boolean flag = false; + float f3 = 0.5F; + float f4 = 1.0F; + float f5 = 0.8F; + float f6 = 0.6F; + float f7 = f4 * p_147736_5_; + float f8 = f4 * p_147736_6_; + float f9 = f4 * p_147736_7_; + float f10 = f3; + float f11 = f5; + float f12 = f6; + float f13 = f3; + float f14 = f5; + float f15 = f6; + float f16 = f3; + float f17 = f5; + float f18 = f6; + + IBlockAccess blockAccess = world; + + if (p_147736_1_ != Blocks.grass) + { + f10 = f3 * p_147736_5_; + f11 = f5 * p_147736_5_; + f12 = f6 * p_147736_5_; + f13 = f3 * p_147736_6_; + f14 = f5 * p_147736_6_; + f15 = f6 * p_147736_6_; + f16 = f3 * p_147736_7_; + f17 = f5 * p_147736_7_; + f18 = f6 * p_147736_7_; + } + + int l = p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_, p_147736_3_, p_147736_4_); + tessellator.setBrightness(l); + + if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(blockAccess, p_147736_2_, p_147736_3_ - 1, p_147736_4_, 0)) + { + //tessellator.setBrightness(renderer.renderMinY > 0.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_, p_147736_3_ - 1, p_147736_4_)); + tessellator.setColorOpaque_F(f10, f13, f16); + renderer.renderFaceYNeg(p_147736_1_, p_147736_2_, p_147736_3_, p_147736_4_, renderer.getBlockIcon(p_147736_1_, blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 0)); + flag = true; + } + + if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(blockAccess, p_147736_2_, p_147736_3_ + 1, p_147736_4_, 1)) + { + //tessellator.setBrightness(renderer.renderMaxY < 1.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_, p_147736_3_ + 1, p_147736_4_)); + tessellator.setColorOpaque_F(f7, f8, f9); + renderer.renderFaceYPos(p_147736_1_, p_147736_2_, p_147736_3_, p_147736_4_, renderer.getBlockIcon(p_147736_1_, blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 1)); + flag = true; + } + + IIcon iicon; + + if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(blockAccess, p_147736_2_, p_147736_3_, p_147736_4_ - 1, 2)) + { + //tessellator.setBrightness(renderer.renderMinZ > 0.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_, p_147736_3_, p_147736_4_ - 1)); + tessellator.setColorOpaque_F(f11, f14, f17); + iicon = renderer.getBlockIcon(p_147736_1_, renderer.blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 2); + renderer.renderFaceZNeg(p_147736_1_, p_147736_2_, p_147736_3_, p_147736_4_, iicon); + + flag = true; + } + + if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(renderer.blockAccess, p_147736_2_, p_147736_3_, p_147736_4_ + 1, 3)) + { + //tessellator.setBrightness(renderer.renderMaxZ < 1.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_, p_147736_3_, p_147736_4_ + 1)); + tessellator.setColorOpaque_F(f11, f14, f17); + iicon = renderer.getBlockIcon(p_147736_1_, blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 3); + renderer.renderFaceZPos(p_147736_1_, p_147736_2_, p_147736_3_, p_147736_4_, iicon); + + flag = true; + } + + if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(blockAccess, p_147736_2_ - 1, p_147736_3_, p_147736_4_, 4)) + { + //tessellator.setBrightness(renderer.renderMinX > 0.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_ - 1, p_147736_3_, p_147736_4_)); + tessellator.setColorOpaque_F(f12, f15, f18); + iicon = renderer.getBlockIcon(p_147736_1_, blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 4); + renderer.renderFaceXNeg(p_147736_1_, p_147736_2_, p_147736_3_, p_147736_4_, iicon); + + flag = true; + } + + if (renderer.renderAllFaces || p_147736_1_.shouldSideBeRendered(blockAccess, p_147736_2_ + 1, p_147736_3_, p_147736_4_, 5)) + { + //tessellator.setBrightness(renderer.renderMaxX < 1.0D ? l : p_147736_1_.getMixedBrightnessForBlock(blockAccess, p_147736_2_ + 1, p_147736_3_, p_147736_4_)); + tessellator.setColorOpaque_F(f12, f15, f18); + iicon = renderer.getBlockIcon(p_147736_1_, blockAccess, p_147736_2_, p_147736_3_, p_147736_4_, 5); + renderer.renderFaceXPos(p_147736_1_, p_147736_2_, p_147736_3_, p_147736_4_, iicon); + + flag = true; + } + + return flag; + } @Override public boolean shouldRender3DInInventory(int modelId) { diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java b/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java index 2078cac..9d98fd2 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java @@ -62,7 +62,7 @@ public int getRenderId() { return SextiarySector.proxy.pipeType; } - private static final ResourceLocation fanShaftTextures = new ResourceLocation("sextiarysector:textures/models/iron_pipe.png"); + private static final ResourceLocation fanShaftTextures = new ResourceLocation("sextiarysector:textures/models/copper_pipe.png"); static public ModelPipe modelPipe = new ModelPipe(); @@ -75,6 +75,7 @@ public void renderTileEntityAt(TileEntity tileentity, double x1, double y1, doub GL11.glTranslated(x1 + 0.5F, y1 + 0.5F, z1 + 0.5F); float scale = 0.0624f; GL11.glScalef(scale, scale, scale); + GL11.glDisable(GL11.GL_LIGHTING); this.bindTexture(fanShaftTextures); @@ -94,6 +95,7 @@ public void renderTileEntityAt(TileEntity tileentity, double x1, double y1, doub } + GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererSteamMotor.java b/src/main/java/shift/sextiarysector/renderer/block/RendererSteamMotor.java index 4a9708e..4aa0449 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererSteamMotor.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererSteamMotor.java @@ -15,33 +15,33 @@ import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -public class RendererSteamMotor extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { +public class RendererSteamMotor extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { - if(modelID!=this.getRenderId()){ - return ; + if (modelID != this.getRenderId()) { + return; } GL11.glPushMatrix(); - float scale = 0.0625f; - GL11.glScalef(scale,scale,scale); + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); - GL11.glRotatef(90, 1, 0, 0); - GL11.glRotatef(180, 0, 1, 0); + GL11.glRotatef(90, 1, 0, 0); + GL11.glRotatef(180, 0, 1, 0); - this.bind(steamMotorTextures); + this.bind(steamMotorTextures); - modelSteamMotor.render(null, 0,0,0, 0,0, 1.0f); - modelSteamMotor.renderShaft(null, 0,0,0, 0,0, 1.0f); + modelSteamMotor.render(null, 0, 0, 0, 0, 0, 1.0f); + modelSteamMotor.renderShaft(null, 0, 0, 0, 0, 0, 1.0f); - GL11.glPopMatrix(); + GL11.glPopMatrix(); - this.bind(MC_BLOCK_SHEET); + this.bind(MC_BLOCK_SHEET); } @@ -58,7 +58,7 @@ public boolean shouldRender3DInInventory(int modelId) { @Override public int getRenderId() { - return SextiarySector.proxy.steamMotorType; + return SextiarySector.proxy.steamMotorType; } private static final ResourceLocation steamMotorTextures = new ResourceLocation("sextiarysector:textures/models/steam_motor.png"); @@ -68,52 +68,54 @@ public int getRenderId() { @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { - TileEntitySteamMotor tile = (TileEntitySteamMotor)tileentity; + TileEntitySteamMotor tile = (TileEntitySteamMotor) tileentity; //System.out.println("renderTileEntityAt"); GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); - float scale = 0.0625f; - GL11.glScalef(scale,scale,scale); - - this.bindTexture(steamMotorTextures); - - switch(tile.direction){ - case UP: - GL11.glRotatef(90, 1, 0, 0); - break; - case DOWN: - GL11.glRotatef(90, -1, 0, 0); - break; - case WEST: - GL11.glRotatef(90, 0, 1, 0); - break; - case EAST: - GL11.glRotatef(90, 0, -1, 0); - break; - case SOUTH: - GL11.glRotatef(180, 0, 1, 0); - break; + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); + + GL11.glDisable(GL11.GL_CULL_FACE); + + this.bindTexture(steamMotorTextures); + + switch (tile.direction) { + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; default: break; - } + } - modelSteamMotor.render(null, 0,0,0, 0,0, 1.0f); + modelSteamMotor.render(null, 0, 0, 0, 0, 0, 1.0f); - //傾きのスピード - GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + GL11.glEnable(GL11.GL_CULL_FACE); + //傾きのスピード + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); - modelSteamMotor.renderShaft(null, 0,0,0, 0,0, 1.0f); + modelSteamMotor.renderShaft(null, 0, 0, 0, 0, 0, 1.0f); - GL11.glPopMatrix(); + GL11.glPopMatrix(); } - private static void bind(ResourceLocation res) - { - FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); - } + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererTank.java b/src/main/java/shift/sextiarysector/renderer/block/RendererTank.java new file mode 100644 index 0000000..d7d6836 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererTank.java @@ -0,0 +1,168 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.renderer.model.ModelTank; +import shift.sextiarysector.tileentity.TileEntityTank; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererTank extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + private static final ResourceLocation bottleTextures = new ResourceLocation("sextiarysector:textures/models/tank.png"); + + private final Minecraft mc = FMLClientHandler.instance().getClient(); + + private final RenderBlocks blockrender = new RenderBlocks(); + + static public ModelTank modelTank = new ModelTank(); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + + GL11.glPushMatrix(); + + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + this.bind(bottleTextures); + + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180, 1, 0, 0); + + GL11.glColor3f(1, 1, 1); + + modelTank.render(null, 0, 0, 0, 0, 0, 1.0f); + + GL11.glPopMatrix(); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + return true; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.tankType; + } + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + + GL11.glPushMatrix(); + + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_LIGHT0); + //GL11.glDisable(GL11.GL_CULL_FACE); + + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); + + if (((TileEntityTank) tileentity).hasFluidStack()) { + + //System.out.println("renderTileEntityAt"); + IIcon icon = ((TileEntityTank) tileentity).getFluidStack().getFluid().getIcon(((TileEntityTank) tileentity).getFluidStack()); + icon = blockrender.getIconSafe(icon); + + float i = 0.4375f; + + float f1 = ((TileEntityTank) tileentity).getRendererAmount(); + if (f1 >= 0.99) f1 = 0.98f; + + this.bindTexture(MC_BLOCK_SHEET); + + setColor3ub(((TileEntityTank) tileentity).getFluidStack().getFluid().getColor()); + + blockrender.blockAccess = tileentity.getWorldObj(); + + blockrender.renderAllFaces = true; + blockrender.setOverrideBlockTexture(icon); + //blockrender.setRenderBounds(i*2.3, -0.0625*6, i*2.3, 1-i*2.5,0.0625*1.8f, 1-i*2.3); + blockrender.setRenderBounds(-i + 0.01f, -0.49f, -i + 0.01f, i - 0.01f, f1 - 0.49f, i - 0.01f); + //blockrender.setRenderBounds(i, 0.0625*2, i, 1-i,0.0625*8f, 1-i); + //blockrender.renderStandardBlock(Block.blocksList[tileentity.getWorldObj().getBlockId(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord)], tileentity.xCoord, tileentity.yCoord,tileentity.zCoord); + + Tessellator tessellator = Tessellator.instance; + + Block block = tileentity.getWorldObj().getBlock(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord); + + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + blockrender.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + blockrender.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + blockrender.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + blockrender.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + blockrender.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + blockrender.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + + blockrender.renderAllFaces = false; + blockrender.clearOverrideBlockTexture(); + + } + + this.bindTexture(bottleTextures); + + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); + GL11.glRotatef(180, 1, 0, 0); + + GL11.glColor3f(1, 1, 1); + + modelTank.render(null, 0, 0, 0, 0, 0, 1.0f); + + //GL11.glEnable(GL11.GL_CULL_FACE); + + GL11.glPopMatrix(); + + } + + private void bind(ResourceLocation res) + { + mc.getTextureManager().bindTexture(res); + } + + public static void setColor3ub(int color) { + + GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/entity/RenderMineboat.java b/src/main/java/shift/sextiarysector/renderer/entity/RenderMineboat.java index 1f438fe..ce53724 100644 --- a/src/main/java/shift/sextiarysector/renderer/entity/RenderMineboat.java +++ b/src/main/java/shift/sextiarysector/renderer/entity/RenderMineboat.java @@ -17,14 +17,14 @@ public class RenderMineboat extends RenderBoat{ private static final ResourceLocation field_110782_f = new ResourceLocation("textures/entity/boat.png"); - protected final RenderBlocks field_94145_f; + protected final RenderBlocks blockrender; public RenderMineboat() { this.shadowSize = 0.5F; this.modelBoat = new ModelMineboat(); // - this.field_94145_f = new RenderBlocks(); + this.blockrender = new RenderBlocks(); } public void renderMineboat(EntityMineboat par1EntityBoat, double par2, double par4, double par6, float par8, float par9) @@ -78,7 +78,7 @@ protected void renderBlockInMinecart(EntityMineboat par1EntityMineboat, float pa { float f1 = par1EntityMineboat.getBrightness(par2); GL11.glPushMatrix(); - this.field_94145_f.renderBlockAsItem(par3Block, par4, f1); + this.blockrender.renderBlockAsItem(par3Block, par4, f1); GL11.glPopMatrix(); } diff --git a/src/main/java/shift/sextiarysector/renderer/entity/RenderMineboatTank.java b/src/main/java/shift/sextiarysector/renderer/entity/RenderMineboatTank.java new file mode 100644 index 0000000..1e995d9 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/entity/RenderMineboatTank.java @@ -0,0 +1,128 @@ +package shift.sextiarysector.renderer.entity; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.init.Blocks; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.entity.EntityMineboat; +import shift.sextiarysector.entity.EntityMineboatTank; + +public class RenderMineboatTank extends RenderMineboat { + + @Override + public void renderMineboat(EntityMineboat par1EntityBoat, double par2, double par4, double par6, float par8, float par9) + { + super.renderMineboat(par1EntityBoat, par2, par4, par6, par8, par9); + + GL11.glPushMatrix(); + GL11.glTranslatef((float) par2, (float) par4, (float) par6); + GL11.glRotatef(180.0F - par8, 0.0F, 1.0F, 0.0F); + float f2 = par1EntityBoat.getTimeSinceHit() - par9; + float f3 = par1EntityBoat.getDamageTaken() - par9; + + if (f3 < 0.0F) + { + f3 = 0.0F; + } + + if (f2 > 0.0F) + { + GL11.glRotatef(MathHelper.sin(f2) * f2 * f3 / 10.0F * par1EntityBoat.getForwardDirection(), 1.0F, 0.0F, 0.0F); + } + + float f8 = 1.0f; + GL11.glScalef(f8, f8, f8); + GL11.glTranslatef(0.0F, 4 / 16.0F, 0.0F); + + if (((EntityMineboatTank) par1EntityBoat).hasFluidStack()) { + + EntityMineboatTank boat = (EntityMineboatTank) par1EntityBoat; + + IIcon icon = boat.getFluidStack().getFluid().getIcon(boat.getFluidStack()); + icon = blockrender.getIconSafe(icon); + + float i = 0.4375f; + + float f1 = boat.getRendererAmount(); + if (f1 >= 0.99) f1 = 0.98f; + + this.bindTexture(TextureMap.locationBlocksTexture); + + setColor3ub(boat.getFluidStack().getFluid().getColor()); + + blockrender.blockAccess = boat.worldObj; + + blockrender.renderAllFaces = true; + blockrender.setOverrideBlockTexture(icon); + //blockrender.setRenderBounds(i*2.3, -0.0625*6, i*2.3, 1-i*2.5,0.0625*1.8f, 1-i*2.3); + blockrender.setRenderBounds(-i + 0.01f, -0.49f, -i + 0.01f, i - 0.01f, f1 - 0.49f, i - 0.01f); + //blockrender.setRenderBounds(i, 0.0625*2, i, 1-i,0.0625*8f, 1-i); + //blockrender.renderStandardBlock(Block.blocksList[tileentity.getWorldObj().getBlockId(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord)], tileentity.xCoord, tileentity.yCoord,tileentity.zCoord); + + Tessellator tessellator = Tessellator.instance; + + Block block = Blocks.air;//boat.worldObj.getBlock(boat.posX, boat.posY, boat.posZ); + + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + blockrender.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + blockrender.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + blockrender.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + blockrender.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + blockrender.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + blockrender.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, icon); + tessellator.draw(); + + blockrender.renderAllFaces = false; + blockrender.clearOverrideBlockTexture(); + + } + + /* + //kokokara + int j = 4;//par1EntityBoat.getDisplayTileOffset(); + Block block = par1EntityBoat.getDisplayTile(); + int k = par1EntityBoat.getDisplayTileData(); + + if (block != null) + { + GL11.glPushMatrix(); + this.bindTexture(TextureMap.locationBlocksTexture); + float f8 = 1.0f;//0.75F; + GL11.glScalef(f8, f8, f8); + GL11.glTranslatef(0.0F, j / 16.0F, 0.0F); + this.renderBlockInMinecart(par1EntityBoat, par9, block, k); + GL11.glPopMatrix(); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.bindEntityTexture(par1EntityBoat); + }*/ + + GL11.glPopMatrix(); + + } + + public static void setColor3ub(int color) { + + GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelTank.java b/src/main/java/shift/sextiarysector/renderer/model/ModelTank.java new file mode 100644 index 0000000..bb47c5c --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelTank.java @@ -0,0 +1,77 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelTank extends ModelBase +{ + //fields + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + + public ModelTank() + { + textureWidth = 64; + textureHeight = 32; + + Shape1 = new ModelRenderer(this, 0, 0); + Shape1.addBox(-7F, -8F, -7F, 1, 16, 1); + Shape1.setRotationPoint(0F, 0F, 0F); + Shape1.setTextureSize(64, 32); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 0, 0); + Shape2.addBox(-7F, -8F, 6F, 1, 16, 1); + Shape2.setRotationPoint(0F, 0F, 0F); + Shape2.setTextureSize(64, 32); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape3 = new ModelRenderer(this, 0, 0); + Shape3.addBox(6F, -8F, -7F, 1, 16, 1); + Shape3.setRotationPoint(0F, 0F, 0F); + Shape3.setTextureSize(64, 32); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0F, 0F); + Shape4 = new ModelRenderer(this, 0, 0); + Shape4.addBox(6F, -8F, 6F, 1, 16, 1); + Shape4.setRotationPoint(0F, 0F, 0F); + Shape4.setTextureSize(64, 32); + Shape4.mirror = true; + setRotation(Shape4, 0F, 0F, 0F); + Shape5 = new ModelRenderer(this, 5, 0); + Shape5.addBox(-7F, -8F, -7F, 14, 16, 14); + Shape5.setRotationPoint(0F, 0F, 0F); + Shape5.setTextureSize(64, 32); + Shape5.mirror = true; + setRotation(Shape5, 0F, 0F, 0F); + } + + @Override + 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); + Shape1.render(f5); + Shape2.render(f5); + Shape3.render(f5); + Shape4.render(f5); + Shape5.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) + { + super.setRotationAngles(f, f1, f2, f3, f4, f5, null); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFunnel.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFunnel.java new file mode 100644 index 0000000..4093734 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFunnel.java @@ -0,0 +1,480 @@ +package shift.sextiarysector.tileentity; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.container.ItemBox; + +public class TileEntityFunnel extends TileEntity implements ISidedInventory, IFluidHandler { + + protected static final int[] slots_top = new int[] { 0 }; + protected static final int[] slots_bottom = new int[] { 1 }; + protected static final int[] slots_sides = new int[] { 0, 1 }; + + protected ItemBox items = new ItemBox("Base", 2); + + public FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 32); + protected int lastAmount; + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + + } + + private void updateServerEntity() { + + /* + if (this.tank.getFluidAmount() * (0.01f) != lastAmount) { + //System.out.println(this.tank.getFluidAmount()); + lastAmount = (int) (this.tank.getFluidAmount() * (0.01f)); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + }*/ + + if (items.getStackInSlot(0) != null) { + this.doSlotFluid(); + } + + this.addDownFluidEntity(); + this.getUPFluidEntity(); + + this.addFluidBlock(); + + } + + private void addFluidBlock() { + + if (this.tank.getFluidAmount() == 0) return; + + TileEntity t = this.worldObj.getTileEntity(xCoord, yCoord - 1, zCoord); + + if (!(t instanceof IFluidHandler)) return; + + IFluidHandler f = (IFluidHandler) t; + + FluidStack fs = this.tank.getFluid().copy(); + if (fs.amount > 50) fs.amount = 50; + + int i = f.fill(ForgeDirection.DOWN.getOpposite(), fs, true); + this.tank.drain(i, true); + + } + + private void getUPFluidEntity() { + + //if (this.tank.getFluidAmount() == 0) return; + + AxisAlignedBB aabb = getDirectionAABB(ForgeDirection.UP); + + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity) null, aabb, null); + IFluidHandler f = null; + + for (Entity e : list) { + if (!(e instanceof IFluidHandler)) continue; + f = (IFluidHandler) e; + break; + } + + if (f == null) return; + + if (this.tank.getFluid() == null) { + + if (f.getTankInfo(ForgeDirection.UP.getOpposite()) != null && f.getTankInfo(ForgeDirection.UP.getOpposite())[0].fluid != null && f.canDrain(ForgeDirection.UP.getOpposite(), f.getTankInfo(ForgeDirection.UP.getOpposite())[0].fluid.getFluid())) { + + FluidStack fs = f.drain(ForgeDirection.UP.getOpposite(), 50, true); + this.tank.fill(fs, true); + } + + } else if (f.canDrain(ForgeDirection.UP.getOpposite(), this.tank.getFluid().getFluid())) { + FluidStack fs = f.drain(ForgeDirection.UP.getOpposite(), 50, false); + + int fill = this.tank.fill(fs, true); + + f.drain(ForgeDirection.UP.getOpposite(), fill, true); + + } + + //this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + + private void addDownFluidEntity() { + + if (this.tank.getFluidAmount() == 0) return; + + AxisAlignedBB aabb = getDirectionAABB(ForgeDirection.DOWN); + + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity) null, aabb, null); + IFluidHandler f = null; + + for (Entity e : list) { + if (!(e instanceof IFluidHandler)) continue; + f = (IFluidHandler) e; + break; + } + + if (f == null) return; + + if (f.canFill(ForgeDirection.DOWN.getOpposite(), this.tank.getFluid().getFluid())) { + + FluidStack fs = this.tank.getFluid().copy(); + if (fs.amount > 50) fs.amount = 50; + + int i = f.fill(ForgeDirection.DOWN.getOpposite(), fs, true); + this.tank.drain(i, true); + + //this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + + } + + private AxisAlignedBB getDirectionAABB(ForgeDirection d) { + + int minX = 0, minY = 0, minZ = 0; + int maxX = 1, maxY = 1, maxZ = 1; + + switch (d) { + case DOWN: + minY = -2; + break; + case UP: + maxY = 3; + break; + default: + break; + } + + return AxisAlignedBB.getBoundingBox(this.xCoord + minX, this.yCoord + minY, this.zCoord + minZ, this.xCoord + maxX, this.yCoord + maxY, this.zCoord + maxZ); + } + + private void doSlotFluid() { + + if (this.canChargeFluid()) { + this.chargeFluid(); + } + + if (this.canDrainFluid()) { + this.drainFluid(); + } + + } + + public void chargeFluid() { + + FluidStack f = FluidContainerRegistry.getFluidForFilledItem(items.getStackInSlot(0)); + this.fill(ForgeDirection.UP, f, true); + ItemStack item = FluidContainerRegistry.drainFluidContainer(items.getStackInSlot(0));//items.getStackInSlot(0).getItem().getContainerItem(items.getStackInSlot(0)); + + if (item != null) { + + if (this.items.getStackInSlot(1) == null) + { + this.setInventorySlotContents(1, item.copy()); + } + else if (this.items.getStackInSlot(1).isItemEqual(item)) + { + this.items.getStackInSlot(1).stackSize += item.stackSize; + } + + } + + this.items.reduceStackSize(0, 1); + + this.markDirty(); + + //this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + + public boolean canChargeFluid() { + + FluidStack f = FluidContainerRegistry.getFluidForFilledItem(items.getStackInSlot(0)); + + if (f == null) return false; + + int i = this.fill(ForgeDirection.UP, f, false); + + if (i != f.amount) return false; + + if (items.getStackInSlot(0) == null) return false; + if (this.items.getStackInSlot(1) == null) return true; + ItemStack item = FluidContainerRegistry.drainFluidContainer(items.getStackInSlot(0));// items.getStackInSlot(0).getItem().getContainerItem(items.getStackInSlot(0).copy()); + if (item == null) return true; + int result = this.items.getStackInSlot(1).stackSize + item.stackSize; + return (result <= getInventoryStackLimit() && result <= item.getMaxStackSize()); + + } + + private void drainFluid() { + + if (canDrainFluid()) { + + ItemStack empty = items.getStackInSlot(0); + + for (FluidContainerData f : FluidContainerRegistry.getRegisteredFluidContainerData()) { + + if (f.emptyContainer.isItemEqual(empty) && f.fluid.isFluidEqual(this.tank.getFluid()) && f.fluid.amount <= this.tank.getFluidAmount()) { + + ItemStack item = FluidContainerRegistry.fillFluidContainer(this.tank.getFluid(), empty); + if (this.items.getStackInSlot(1) == null) + { + this.setInventorySlotContents(1, item.copy()); + } + else if (this.items.getStackInSlot(1).isItemEqual(item)) + { + this.items.getStackInSlot(1).stackSize += item.stackSize; + } + + this.tank.drain(f.fluid.amount, true); + + this.items.reduceStackSize(0, 1); + + this.markDirty(); + + //this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + return; + } + + } + + } + + } + + public boolean canDrainFluid() + { + if (items.getStackInSlot(0) == null) return false; + ItemStack item = FluidContainerRegistry.fillFluidContainer(this.tank.getFluid(), items.getStackInSlot(0)); + if (item == null) return false; + if (this.items.getStackInSlot(1) == null) return true; + int result = this.items.getStackInSlot(1).stackSize + item.stackSize; + return (result <= getInventoryStackLimit() && result <= item.getMaxStackSize()); + } + + public float getRendererAmount() { + return (float) this.tank.getFluidAmount() / (float) this.tank.getCapacity(); + } + + public boolean hasFluidStack() { + return tank.getFluidAmount() > 0; + } + + public FluidStack getFluidStack() { + return tank.getFluid(); + } + + //GUI + public FluidTank getTank() { + return tank; + } + + public boolean isFluid() { + return this.getTank().getFluidAmount() > 0; + } + + //IInventory関係 + @Override + public int getSizeInventory() { + return items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return items.getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return items.decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return items.getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + items.setInventorySlotContents(i, itemstack); + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return items.getInventoryStackLimit(); + } + + @Override + public void markDirty() { + super.markDirty(); + items.onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer.getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + /*入れる*/ + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + return i == 0; + + } + + //ISidedInventory関係 + //0 素材 ,1 燃料 ,2 完成品 ,3 素材のコンテナ ,4 空のボトル , 5 液体の入ったボトル + @Override + public int[] getAccessibleSlotsFromSide(int var1) { + + if (var1 == 0) { + return slots_bottom; + } + + if (var1 == 1) { + return slots_top; + } + + return slots_sides; + + } + + @Override + public boolean canInsertItem(int i, ItemStack itemstack, int j) { + return this.isItemValidForSlot(i, itemstack); + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) + { + + if (p_102008_1_ == 1) { + return true; + } + + return false; + } + + @Override + public String getInventoryName() { + return "gui.ss.funnel"; + } + + /* IFluidHandler */ + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + return tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(tank.getFluid())) + { + return null; + } + return tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return tank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { tank.getInfo() }; + } + + //NBT + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + this.items.readFromNBT(par1nbtTagCompound); + tank.readFromNBT(par1nbtTagCompound); + if (par1nbtTagCompound.hasKey("Empty") && tank.getFluidAmount() > 0) this.tank.setFluid(null); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + this.items.writeToNBT(par1nbtTagCompound); + tank.writeToNBT(par1nbtTagCompound); + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + //this.worldObj.func_147479_m(xCoord, yCoord, zCoord); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java index 6f155a7..c60a15b 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java @@ -1,5 +1,7 @@ package shift.sextiarysector.tileentity; +import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; @@ -9,12 +11,13 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidHandler; import shift.sextiarysector.api.machine.energy.EnergyStorage; import shift.sextiarysector.api.machine.energy.IEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityPump extends TileEntityDirection implements IFluidHandler, IEnergyHandler ,IGearForceGrid{ +public class TileEntityPump extends TileEntityDirection implements IFluidHandler, IEnergyHandler, IGearForceGrid { protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME); @@ -42,10 +45,10 @@ public void updateServerEntity() { cooltime++; - if(cooltime>10){ - cooltime=0; + if (cooltime > 10) { + cooltime = 0; - if(storage.drawEnergy(2, 20, false) >= 18){ + if (storage.drawEnergy(2, 20, false) >= 18) { this.updateServerOutWorkEntity(); this.updateServerInWorkEntity(); } @@ -54,34 +57,39 @@ public void updateServerEntity() } - public void updateServerInWorkEntity() { - int x = this.xCoord+this.direction.offsetX; - int y = this.yCoord+this.direction.offsetY; - int z = this.zCoord+this.direction.offsetZ; + int x = this.xCoord + this.direction.offsetX; + int y = this.yCoord + this.direction.offsetY; + int z = this.zCoord + this.direction.offsetZ; + + Block block = this.getWorldObj().getBlock(x, y, z); + + Fluid f = FluidRegistry.lookupFluidForBlock(block); - Fluid f = FluidRegistry.lookupFluidForBlock(this.getWorldObj().getBlock(x, y, z)); + if (block instanceof BlockLiquid || block instanceof IFluidBlock) { + if (this.getWorldObj().getBlockMetadata(x, y, z) != 0) return; + } - if(f!=null&&this.tank.getFluid()==null){ + if (f != null && this.tank.getFluid() == null) { this.worldObj.removeTileEntity(x, y, z); this.worldObj.setBlock(x, y, z, Blocks.air, 0, 3); this.tank.setFluid(new FluidStack(f, FluidContainerRegistry.BUCKET_VOLUME)); - }else if(this.worldObj.getTileEntity(x, y, z) instanceof IFluidHandler){ + } else if (this.worldObj.getTileEntity(x, y, z) instanceof IFluidHandler) { IFluidHandler t = (IFluidHandler) this.worldObj.getTileEntity(x, y, z); - if(this.tank.getFluid()==null ){ + if (this.tank.getFluid() == null) { - if(t.getTankInfo(direction.getOpposite())!=null && t.getTankInfo(direction.getOpposite())[0].fluid!=null && t.canDrain(this.direction.getOpposite(), t.getTankInfo(direction.getOpposite())[0].fluid.getFluid())){ + if (t.getTankInfo(direction.getOpposite()) != null && t.getTankInfo(direction.getOpposite())[0].fluid != null && t.canDrain(this.direction.getOpposite(), t.getTankInfo(direction.getOpposite())[0].fluid.getFluid())) { FluidStack fs = t.drain(direction.getOpposite(), FluidContainerRegistry.BUCKET_VOLUME, true); this.tank.fill(fs, true); } - }else if(t.canDrain(this.direction.getOpposite(), this.tank.getFluid().getFluid())){ + } else if (t.canDrain(this.direction.getOpposite(), this.tank.getFluid().getFluid())) { FluidStack fs = t.drain(direction.getOpposite(), FluidContainerRegistry.BUCKET_VOLUME - this.tank.getFluidAmount(), true); this.tank.fill(fs, true); } @@ -92,58 +100,57 @@ public void updateServerInWorkEntity() public void updateServerOutWorkEntity() { - int x = this.xCoord+ForgeDirection.UP.offsetX; - int y = this.yCoord+ForgeDirection.UP.offsetY; - int z = this.zCoord+ForgeDirection.UP.offsetZ; + int x = this.xCoord + ForgeDirection.UP.offsetX; + int y = this.yCoord + ForgeDirection.UP.offsetY; + int z = this.zCoord + ForgeDirection.UP.offsetZ; FluidStack f = this.tank.getFluid(); - if(f!=null){ + if (f != null) { - if(this.worldObj.isAirBlock(x, y, z) && f.getFluid().canBePlacedInWorld()){ + if (this.worldObj.isAirBlock(x, y, z) && f.getFluid().canBePlacedInWorld()) { this.worldObj.setBlock(x, y, z, this.tank.getFluid().getFluid().getBlock()); this.tank.setFluid(null); - }else if(this.worldObj.getTileEntity(x, y, z) instanceof IFluidHandler&&((IFluidHandler) this.worldObj.getTileEntity(x, y, z)).canFill(ForgeDirection.DOWN, f.getFluid())){ + } else if (this.worldObj.getTileEntity(x, y, z) instanceof IFluidHandler && ((IFluidHandler) this.worldObj.getTileEntity(x, y, z)).canFill(ForgeDirection.DOWN, f.getFluid())) { - int i=((IFluidHandler) this.worldObj.getTileEntity(x, y, z)).fill(ForgeDirection.DOWN, f, true); + int i = ((IFluidHandler) this.worldObj.getTileEntity(x, y, z)).fill(ForgeDirection.DOWN, f, true); this.tank.drain(i, true); } - } } - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - tank.readFromNBT(tag); - storage.readFromNBT(tag); - } + @Override + public void readFromNBT(NBTTagCompound tag) + { + super.readFromNBT(tag); + tank.readFromNBT(tag); + storage.readFromNBT(tag); + } - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - tank.writeToNBT(tag); - storage.writeToNBT(tag); - } + @Override + public void writeToNBT(NBTTagCompound tag) + { + super.writeToNBT(tag); + tank.writeToNBT(tag); + storage.writeToNBT(tag); + } @Override - public int addEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { - if(this.getDirection().ordinal()==from.ordinal())return 0; + if (this.getDirection().ordinal() == from.ordinal()) return 0; int i = storage.addEnergy(power, speed, simulate); return i; } @Override - public int drawEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + public int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate) { return 0; } @@ -182,7 +189,7 @@ public boolean canOut(ForgeDirection from) { return false; } - //IFluidHandler + //IFluidHandler @Override public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { return 0; @@ -200,12 +207,12 @@ public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { @Override public boolean canFill(ForgeDirection from, Fluid fluid) { - return from.ordinal()==ForgeDirection.UP.ordinal(); + return from.ordinal() == ForgeDirection.UP.ordinal(); } @Override public boolean canDrain(ForgeDirection from, Fluid fluid) { - return from.ordinal()==ForgeDirection.UP.ordinal(); + return from.ordinal() == ForgeDirection.UP.ordinal(); } @Override diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityTank.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityTank.java new file mode 100644 index 0000000..126f998 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityTank.java @@ -0,0 +1,130 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + +public class TileEntityTank extends TileEntity implements IFluidHandler { + + public FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 32); + protected int lastAmount; + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + + } + + private void updateServerEntity() { + + if (this.tank.getFluidAmount() * (0.01f) != lastAmount) { + //System.out.println(this.tank.getFluidAmount()); + lastAmount = (int) (this.tank.getFluidAmount() * (0.01f)); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + } + + public float getRendererAmount() { + return (float) this.tank.getFluidAmount() / (float) this.tank.getCapacity(); + } + + public boolean hasFluidStack() { + return tank.getFluidAmount() > 0; + } + + public FluidStack getFluidStack() { + return tank.getFluid(); + } + + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + tank.readFromNBT(par1nbtTagCompound); + if (par1nbtTagCompound.hasKey("Empty") && tank.getFluidAmount() > 0) this.tank.setFluid(null); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + tank.writeToNBT(par1nbtTagCompound); + } + + /* IFluidHandler */ + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + return tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(tank.getFluid())) + { + return null; + } + return tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return tank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { tank.getInfo() }; + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + //this.worldObj.func_147479_m(xCoord, yCoord, zCoord); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityTrap.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityTrap.java new file mode 100644 index 0000000..6b2494e --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityTrap.java @@ -0,0 +1,133 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import shift.sextiarysector.container.ItemBox; + +public class TileEntityTrap extends TileEntity implements ISidedInventory { + + protected ItemBox items = new ItemBox("Base", 1); + public int use = 0; + public boolean isGrass = false; + protected static final int[] material = new int[] { 0 }; + + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + items.readFromNBT(par1nbtTagCompound); + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + items.writeToNBT(par1nbtTagCompound); + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + //this.worldObj.func_147479_m(xCoord, yCoord, zCoord); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + //IInventory関係 + @Override + public int getSizeInventory() { + return items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return items.getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return items.decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return items.getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + items.setInventorySlotContents(i, itemstack); + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return items.getInventoryStackLimit(); + } + + @Override + public void markDirty() { + super.markDirty(); + items.onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer + .getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + /*入れる*/ + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + return false; + } + + //ISidedInventory関係 + //0 素材 ,1 燃料 ,2 完成品 ,3 素材のコンテナ ,4 空のボトル , 5 液体の入ったボトル + @Override + public int[] getAccessibleSlotsFromSide(int var1) { + + return material; + } + + @Override + public boolean canInsertItem(int i, ItemStack itemstack, int j) { + return this.isItemValidForSlot(i, itemstack); + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) + { + return true; + } + + @Override + public String getInventoryName() { + return "ss.trap"; + } + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 8b575f5..2d869a8 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -30,7 +30,9 @@ tile.ss.bottle.name=Fluid Bottle tile.ss.fluid_crafter.name=Fluid Crafter tile.ss.square.name=Wood Square -tile.ss.iron_pipe.name=Iron Pipe +tile.ss.tank.name=Tank +tile.ss.funnel.name=Funnel +tile.ss.copper_pipe.name=Copper Pipe tile.ss.wood_hopper.name=Wood Hopper @@ -39,6 +41,7 @@ tile.ss.chunk_loader.name=Time Loader tile.ss.figure.name=Figure +tile.ss.trap.name=Trap tile.ss.drinking_water.name=Drinking Water tile.ss.hot_springs.name=Hot Springs @@ -254,9 +257,16 @@ item.ss.iron_knife.name=Iron Knife item.ss.gold_knife.name=Gold Knife item.ss.diamond_knife.name=Diamond Knife +item.ss.copper_shovel.name=Copper Shovel +item.ss.copper_pickaxe.name=Copper Pickaxe +item.ss.copper_axe.name=Copper Axe +item.ss.copper_sword.name=Copper Sword +item.ss.copper_hoe.name=Copper Hoe + item.ss.wood_watering_can.name=Wood Watering Can item.ss.mineboat_chest.name=Mineboat Chest +item.ss.mineboat_tank.name=Mineboat Tank item.ss.laver.name=Laver @@ -340,6 +350,7 @@ gui.ss.fluid_furnace=Fluid Furnace gui.ss.food_smokers=Food Smokers gui.ss.magic_furnace=Magic Furnace gui.ss.freezer=Freezer +gui.ss.funnel=Fluid Funnel gui.ss.rucksack=Rucksack @@ -378,6 +389,7 @@ tooltip.edition=Edition #Edition edition.creative=CreativeTab +edition.achievement=Achievement edition.figure_beginner=Figure Beginner edition.ore_festival=Ore Festival diff --git a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang index 42dec74..a843b99 100644 --- a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang +++ b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang @@ -1,6 +1,6 @@ -#Japanese ja_JP +#日本語 ja_JP -#Block +#ブロック tile.ss.large_furnace.name=大型かまど tile.ss.fluid_furnace.name=流体かまど @@ -19,47 +19,72 @@ tile.ss.acacia_wood_plate.name=アカシアの木板 tile.ss.big_oak_wood_plate.name=ダークオークの木版 tile.ss.iron_plate.name=鉄板 -tile.ss.gold_plate.name=金の板 +tile.ss.gold_plate.name=金板 tile.ss.hole.name=穴 tile.ss.farmland.name=農地 tile.ss.paddy.name=水田 -tile.ss.wood.name=木 +tile.ss.wood.name=原木 tile.ss.bottle.name=液体ボトル tile.ss.fluid_crafter.name=流体クラフター tile.ss.square.name=枡 +tile.ss.iron_pipe.name=鉄のパイプ + + tile.ss.wood_hopper.name=木のホッパー tile.ss.chunk_loader.name=タイムローダー +tile.ss.figure.name=フィギュア + + +tile.ss.drinking_water.name=飲料水 +tile.ss.hot_springs.name=温泉水 + + +tile.ss.blue_stone.name=ブルーストーン鉱石 +tile.ss.yellow_stone.name=イエローストーン鉱石 + +tile.ss.copper_ore.name=銅鉱石 +tile.ss.zinc_ore.name=亜鉛鉱石 +tile.ss.silver_ore.name=銀鉱石 + +tile.ss.mithril_ore.name=ミスリル鉱石 +tile.ss.orichalcum_ore.name=オリハルコン鉱石 + +tile.ss.coal_large_ore.name=大きな石炭鉱石 +tile.ss.iron_large_ore.name=大きな鉄鉱石 +tile.ss.gold_large_ore.name=大きな金鉱石 + tile.ss.small_windmill.name=小さい風車 tile.ss.windmill.name=風車 tile.ss.small_waterwheel.name=小さい水車 +tile.ss.steam_motor.name=蒸気モーター tile.ss.wood_shaft.name=木のシャフト tile.ss.stone_shaft.name=石のシャフト -tile.ss.steel_shaft.name=鋼のシャフト +tile.ss.steel_shaft.name=鋼鉄のシャフト tile.ss.ninja_shaft.name=ニンジャのシャフト tile.ss.orichalcum_shaft.name=オリハルコンのシャフト tile.ss.wood_gear_box.name=木のギアボックス tile.ss.stone_gear_box.name=石のギアボックス -tile.ss.steel_gear_box.name=鋼のギアボックス +tile.ss.steel_gear_box.name=鋼鉄のギアボックス tile.ss.ninja_gear_box.name=ニンジャのギアボックス tile.ss.orichalcum_gear_box.name=オリハルコンのギアボックス tile.ss.wood_gf_tank.name=木のGFタンク tile.ss.stone_gf_tank.name=石のGFタンク -tile.ss.steel_gf_tank.name=鋼のGFタンク +tile.ss.steel_gf_tank.name=鋼鉄のGFタンク tile.ss.ninja_gf_tank.name=ニンジャのGFタンク tile.ss.orichalcum_gf_tank.name=オリハルコンのGFタンク tile.ss.wood_stone_gear_shaft.name=木と石のギアシャフト -tile.ss.stone_steel_gear_shaft.name=石と鋼のギアシャフト -tile.ss.steel_ninja_gear_shaft.name=鋼とニンジャのギアシャフト +tile.ss.stone_steel_gear_shaft.name=石と鋼鉄のギアシャフト +tile.ss.steel_ninja_gear_shaft.name=鋼鉄とニンジャのギアシャフト tile.ss.ninja_orichalcum_gear_shaft.name=ニンジャとオリハルコンのギアシャフト tile.ss.millstone.name=石臼 @@ -69,17 +94,11 @@ tile.ss.pulverizer.name=粉砕機 tile.ss.rolling_machine.name=圧延機 tile.ss.time_machine.name=タイムマシン -tile.ss.fan.name=ファン -tile.ss.blue_stone.name=ブルーストーン鉱石 -tile.ss.yellow_stone.name=イエローストーン鉱石 - -tile.ss.mithril_ore.name=ミスリル鉱石 -tile.ss.orichalcum_ore.name=オリハルコン鉱石 +tile.ss.fan.name=ファン +tile.ss.saw.name=ノコ +tile.ss.pump.name=ポンプ -tile.ss.coal_large_ore.name=大きな石炭鉱石 -tile.ss.iron_large_ore.name=大きな鉄鉱石 -tile.ss.gold_large_ore.name=大きな金鉱石 tile.ss.creeper_chest.name=クリーパーチェスト tile.ss.shipping_box.name=出荷箱 @@ -97,22 +116,59 @@ tile.ss.eggplant.name=ナスの種 tile.ss.sweet_potato.name=サツマイモの種 tile.ss.green_pepper.name=ピーマンの種 -tile.ss.radish.name=大根の種 +tile.ss.radish.name=ダイコンの種 + +tile.ss.rice.name=種籾 -tile.ss.rice.name=米の種 +tile.ss.mushroom_red.name=赤キノコの胞子 tile.ss.sandpit.name=砂場 +tile.ss.boarding_buoy.name=乗降用ブイ +tile.ss.powered_buoy.name=パワードブイ +tile.ss.detector_buoy.name=ディテクターブイ + tile.ss.monitor.name=モニター monitor.type=店種 monitor.creeper=クリーパーショップ -monitor.robot=ロボショップ +monitor.robot=ロボさんショップ tile.ss.electric_motor.name=電気モーター tile.ss.tofu_motor.name=豆腐モーター -#Item -item.ss.dust_waterlily.name=蓮の粉 +#アイテム +item.ss.unit.name=ユニット + +item.ss.wood_gear.name=木の歯車 +item.ss.stone_gear.name=石の歯車 +item.ss.steel_gear.name=鋼鉄の歯車 +item.ss.ninja_gear.name=ニンジャの歯車 +item.ss.orichalcum_gear.name=オリハルコンのギア + +item.ss.wood_unit_gear.name=木のギアユニット +item.ss.stone_unit_gear.name=石のギアユニット +item.ss.steel_unit_gear.name=鋼鉄のギアユニット +item.ss.ninja_unit_gear.name=ニンジャのギアユニット +item.ss.orichalcum_unit_gear.name=オリハルコンのギアユニット + +item.ss.wood_gf_storage.name=木のGFストレージ +item.ss.stone_gf_storage.name=石のGFストレージ +item.ss.steel_gf_storage.name=鋼鉄のGFストレージ +item.ss.ninja_gf_storage.name=ニンジャのGFストレージ +item.ss.orichalcum_gf_storage.name=オリハルコンのGFストレージ + +item.ss.hammer.name=ハンマー + +item.ss.calendar.name=カレンダー +item.ss.season_stone.name=シーズンストーン +item.ss.season_stone_spring.name=シーズンストーン -春- +item.ss.season_stone_summer.name=シーズンストーン -夏- +item.ss.season_stone_autumn.name=シーズンストーン -秋- +item.ss.season_stone_winter.name=シーズンストーン -冬- + + + +item.ss.dust_waterlily.name=水連の粉 item.ss.stone_dust.name=石の粉 @@ -124,6 +180,9 @@ item.ss.iron_dust.name=鉄の粉 item.ss.gold_dust.name=金の粉 item.ss.diamond_dust.name=ダイヤの粉 +item.ss.copper_dust.name=銅の粉 +item.ss.zinc_dust.name=亜鉛の粉 + item.ss.mithril_dust.name=ミスリルの粉 @@ -133,63 +192,52 @@ item.ss.brass_ingot.name=真鍮インゴット item.ss.bluestone_ingot.name=ブルーストーンインゴット item.ss.yellowstone_ingot.name=イエローストーンインゴット +item.ss.copper_ingot.name=銅インゴット +item.ss.zinc_ingot.name=亜鉛インゴット +item.ss.silver_ingot.name=銀インゴット + item.ss.mithril_ingot.name=ミスリルインゴット item.ss.orichalcum_gem.name=オリハルコン item.ss.ninja_ingot.name=ニンジャインゴット -item.ss.blue_stone_slime_ball.name=ブルーストーンのボール - +item.ss.blue_stone_slime_ball.name=ブルーストーンボール item.ss.energy_reactor.name=エネルギーリアクター item.ss.object_reactor.name=オブジェクトリアクター + + item.ss.empty_bottle.name=空のボトル item.ss.water_bottle.name=水入りボトル item.ss.lava_bottle.name=溶岩入りボトル +item.ss.sap_bottle.name=樹液入りボトル -item.ss.craft_unit.name=クラフトユニット - -item.ss.iron_ring.name=鉄のリング -item.ss.creeper_ring.name=クリーパーショップリング - +item.ss.steam_bucket.name=蒸気入りバケツ +item.ss.iron_fluid_bucket.name=融けた鉄入りバケツ +item.ss.gold_fluid_bucket.name=融けた金入りバケツ -item.ss.magic_dust.name=魔法の粉 - -item.ss.unit.name=ユニット -item.ss.wood_gear.name=木の歯車 -item.ss.stone_gear.name=石の歯車 -item.ss.steel_gear.name=鋼の歯車 -item.ss.ninja_gear.name=ニンジャの歯車 -item.ss.orichalcum_gear.name=オリハルコンのギア +item.ss.craft_unit.name=クラフトユニット +item.ss.attack_unit.name=アタックユニット +item.ss.defense_unit.name=ディフェンスユニット -item.ss.wood_unit_gear.name=木のギアユニット -item.ss.stone_unit_gear.name=石のギアユニット -item.ss.steel_unit_gear.name=鋼のギアユニット -item.ss.ninja_unit_gear.name=ニンジャのギアユニット -item.ss.orichalcum_unit_gear.name=オリハルコンのギアユニット -item.ss.wood_gf_storage.name=木のGFストレージ -item.ss.stone_gf_storage.name=石のGFストレージ -item.ss.steel_gf_storage.name=鋼のGFストレージ -item.ss.ninja_gf_storage.name=ニンジャのGFストレージ -item.ss.orichalcum_gf_storage.name=オリハルコンのGFストレージ +item.ss.iron_ring.name=鉄の指輪 +item.ss.creeper_ring.name=クリーパーショップの指輪 -item.ss.hammer.name=ハンマー -item.ss.calendar.name=カレンダー -item.ss.calendar.name=カレンダー -item.ss.season_stone.name=シーズンストーン -item.ss.season_stone_spring.name=シーズンストーン-春- -item.ss.season_stone_summer.name=シーズンストーン-夏- -item.ss.season_stone_autumn.name=シーズンストーン-秋- -item.ss.season_stone_winter.name=シーズンストーン-冬- +item.ss.magic_dust.name=魔法の粉 item.ss.string_bobbin.name=糸のボビン item.ss.cloth.name=布 +item.ss.small_cloth.name=小さな布 item.ss.canvas.name=粗布 +item.ss.drying_flesh.name=乾燥肉 +item.ss.flesh_bobbin.name=肉のボビン + +item.ss.figure_box.name=フィギュアボックス item.ss.wood_scoop.name=木のスコップ @@ -230,7 +278,7 @@ item.ss.green_pepper.name=ピーマン item.ss.blue_potato.name=青サツマイモ -item.ss.radish.name=大根 +item.ss.radish.name=ダイコン item.ss.rice.name=米 @@ -242,20 +290,23 @@ item.ss.curry_powder.name=カレーパウダー item.ss.laver_roasted.name=焼き海苔 -item.ss.chicken_smoked.name=スモークチキン -item.ss.porkchop_smoked.name=スモークポーク -item.ss.beef_smoked.name=スモークビーフ +item.ss.chicken_smoked.name=鶏肉の燻製 +item.ss.porkchop_smoked.name=豚肉の燻製 +item.ss.beef_smoked.name=牛肉の燻製 +item.ss.rice_ball.name=おにぎり item.ss.curry_rice.name=カレーライス item.ss.carrot_soup.name=にんじんスープ item.ss.corn_soup.name=コーンスープ item.ss.egg_soup.name=たまごスープ -item.ss.mushroom_stew.name=きのこソテー -item.ss.onion_soup.name=玉ねぎスープ +item.ss.mushroom_stew.name=きのこシチュー +item.ss.onion_soup.name=オニオンスープ item.ss.ender_soup.name=エンダースープ item.ss.tomato_soup.name=トマトスープ +item.ss.chocolate.name=チョコレート + item.ss.drinking_water_bottle.name=飲料水入りボトル item.ss.takumi_tea_bottle.name=匠茶入りボトル @@ -263,16 +314,19 @@ item.ss.shift_hat.name=Shiftの帽子 item.ss.rucksack.name=リュックサック item.ss.gf_contact_lenses.name=GFコンタクトレンズ -#Fluid +#液体 fluid.ss.takumi_tea=匠茶 fluid.ss.drinking_water=飲料水 +fluid.ss.hot_springs=温泉水 fluid.ss.steam=蒸気 +fluid.ss.sap=樹液 fluid.ss.iron=融けた鉄 fluid.ss.gold=融けた金 -#Potion -ss.potion.burn=炎上 +#ポーション +ss.potion.burn=火傷 +ss.potion.hot_springs=温泉 #GUI container.large_furnace=大型かまど @@ -287,6 +341,8 @@ gui.ss.freezer=冷凍機 gui.ss.rucksack=リュックサック +gui.ss.steam_motor=蒸気モーター + gui.ss.millstone=石臼 gui.ss.loom=織機 gui.ss.sawmill=製材機 @@ -296,12 +352,14 @@ gui.ss.time_machine=タイムマシン gui.ss.gf_tank_1=木のGFタンク gui.ss.gf_tank_2=石のGFタンク -gui.ss.gf_tank_3=鋼のGFタンク +gui.ss.gf_tank_3=鋼鉄のGFタンク +gui.ss.gf_tank_4=ニンジャのGFタンク +gui.ss.gf_tank_5=オリハルコンのGFタンク shop.ss.creeper=クリーパーショップ shop.ss.robot=ロボショップ -#ToolTip +#ツールチップ tooltip.season.pm=PM tooltip.season.am=AM tooltip.season.day=日 @@ -313,7 +371,16 @@ tooltip.season.summer=夏 tooltip.season.autumn=秋 tooltip.season.winter=冬 -#Tab +tooltip.name=名前 +tooltip.edition=エディション + +#エディション +edition.creative=CreativeTab +edition.figure_beginner=Figure Beginner + +edition.schr0_cleaver=Schr0 Cleaver + +#タブ itemGroup.ss.core=SextiarySector -コア- itemGroup.ss.fluid=SextiarySector -液体- itemGroup.ss.player=SextiarySector -プレイヤー- @@ -335,7 +402,7 @@ player.tab.item.ss.rucksack=リュックサック player.tab.item.ss.creeper_ring=クリーパーショップ -#Achievement +#実績 stat.sell=売却数 achievement.ss.core=SS2 -コア- @@ -453,7 +520,7 @@ achievement.ss.millstone.desc2=私は小麦粉? achievement.ss.loom=布! achievement.ss.loom.desc=織機を作ろう -achievement.ss.loom.desc2=それは裸を取り除く! +achievement.ss.loom.desc2=裸から解放される! achievement.ss.stone_gear=パワーアップ @@ -464,30 +531,38 @@ achievement.ss.windmill=上昇気流 achievement.ss.windmill.desc=風車を作る achievement.ss.windmill.desc2=でもこの風、少し泣いています +achievement.ss.small_waterwheel=水のチカラ +achievement.ss.small_waterwheel.desc=小さな水車を作成する +achievement.ss.small_waterwheel.desc2=溶岩に着せないで! + achievement.ss.sawmill=刃物? achievement.ss.sawmill.desc=製材機を作る achievement.ss.sawmill.desc2=一緒に解体しよう! -achievement.ss.steel_gear=鋼の力 -achievement.ss.steel_gear.desc=鋼の歯車を作る +achievement.ss.steel_gear=鋼のチカラ +achievement.ss.steel_gear.desc=鋼鉄の歯車を作成する achievement.ss.steel_gear.desc2=石炭不足? -achievement.ss.small_waterwheel=水の力 -achievement.ss.small_waterwheel.desc=小さい水車を作る -achievement.ss.small_waterwheel.desc2=溶岩に着せないで! +achievement.ss.steam_motor=蒸気のチカラ +achievement.ss.steam_motor.desc=蒸気モーターを作成する +achievement.ss.steam_motor.desc2=産業革命 -achievement.ss.pulverizer=工業時代 +achievement.ss.pulverizer=工業の時代 achievement.ss.pulverizer.desc=粉砕機を作る achievement.ss.pulverizer.desc2=これで2倍! -achievement.ss.fan=ああ~ +achievement.ss.fan=ああ^〜 achievement.ss.fan.desc=ファンを作る achievement.ss.fan.desc2=青い炎? -achievement.ss.ninja_gear=謎の力? +achievement.ss.saw=ブロックブレイカー +achievement.ss.saw.desc=ノコを作成する +achievement.ss.saw.desc2=ただ壊すのみ + +achievement.ss.ninja_gear=不思議な力? achievement.ss.ninja_gear.desc=ニンジャの歯車を作る -achievement.ss.ninja_gear.desc2=ジャパン! +achievement.ss.ninja_gear.desc2=ニッポン! achievement.ss.rolling_machine=まな板 achievement.ss.rolling_machine.desc=圧延機を作る @@ -524,10 +599,10 @@ nei.ss.fluid_furnace=流体かまど nei.ss.food_smokers=燻製器 nei.ss.magic_furnace=魔法かまど -nei.ss.magic_fuel=魔法燃料 +nei.ss.magic_fuel=魔法の燃料 nei.ss.freezer=フリーザー -nei.ss.ice=fuel=氷燃料 +nei.ss.ice=fuel=製氷剤 nei.ss.millstone=石臼 nei.ss.loom=織機 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/funnel_inside.png b/src/main/resources/assets/sextiarysector/textures/blocks/funnel_inside.png new file mode 100644 index 0000000000000000000000000000000000000000..bb41604e257a69e325cc551a41557d20eaeca8ed GIT binary patch literal 401 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~lMJ7%zgXAZFzO}03T!Hq+ t{%JM6nv!#8T%D#7@ipN6T(_Pd+{fkCSZ-0zUJVR922WQ%mvv4FO#p^Asp9|u literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/funnel_outside.png b/src/main/resources/assets/sextiarysector/textures/blocks/funnel_outside.png new file mode 100644 index 0000000000000000000000000000000000000000..6162822ef7005aa38321029d67e4ecbb442c3180 GIT binary patch literal 476 zcmV<20VDp2P)000McNliru-vS&C9UnJI^Zoz;0clA@ zK~y-)b(76bgFqC8KcI zo!jW)o_;X{fVu_WL!Ll&RDE*}n;oRFzNc}(Jbi#$mr&H&%%%b@W{^xo(t23V_02{4 z)vW|u4-N!&kv7v9nofrR-YPxUC0wQ=P2=D=23fq$r3@lyI@P|1?Oyd}r}w&*YXG;( zl*dJ|YXX7QwtO$AAR*rm1mz*v$&--JMRN7uYCXhm=z%G$%K+H!W!Ykxv&9U`gYZoU zZk*SaSp|X3kuAIK(=F7kUO+MIP@V+xY^rBbt2VqFtGh_o^t*9}S zVEL^d)F*y?+CQ(Y`^= Sjb-5g0000!_AM|T6kZ7_0r>iY= zSK#rC*+W+xLmyitmhlTJqv=cN0&| zKB4oxGem#glG~zuL+Gpb&J9YvU+s3jQ0L70th6lVN~%&rt<;)r(jA)O%cU#U9Q>8Z z?ZvmQ`N;P6=%)$&+=qFt_5C&~DEDzG-Fg1lx#bz}RSTxwbG1Iz+Apq@)1(*3er?X0 z!|bUGKEE{l$?)9mY+cZ0_M0WL3sz2w@H9!EHUFLIf9CT~Gv$I4!fb(oz~JfX=d#Wz Gp$Py_%ae@& literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/trap.png b/src/main/resources/assets/sextiarysector/textures/blocks/trap.png new file mode 100644 index 0000000000000000000000000000000000000000..d91e706e7668c16bbae966a430c8f44f6bda5df5 GIT binary patch literal 595 zcmV-Z0<8UsP)p%hlTY_-U8mg8S5oK&4%0mwGuDn*%tnche|opCN!-v^IdeUL zJ})@BPIx@9wFH3v%~F4lTT!Y2%FU80?!VHFVi>^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nIjDyKwG+JagHz`l>hNv&w z^i^#^Y-4ZmA&d9rtZ7Raa`+Ailojt(kV$jhHI~9Pv+L0$GBw5qmw5)ZzdSsVK}3lH;UvE75HErwK!`U0(?wJ_Qh*^CIZRO!=Yb`ESoP(bmdKI;Vst08`|H(?D8gCb z5n0T@z;_UY8Fx&~ehU<2FY)wsWxvlP!O6(&c=9(70|WChPZ!6Kid%2*9?ZS%AmDH@ z(mB*KcY`3~o95ODr2(nE{Ct9k*=6@E*`vL$+)Gb5RkU^jmyOO$NkPG-Q`W~jJT}^F z(OMg`jsL$GQ^wu>_3M>3H1o^XRc&6kTKn4Gq+g}3U;pdK_qPWx%)D&k>T<;9d>(t& zdWL=fkG0GD$uKy8Ji@{tfR)j}7901m{m%REuOtr}9C=%o{pzdE=}TAUTsxP({<`yX z#vA_}uSgs(yk5&%y=Pu(EH6%(T$sAAncd2^sylc<) zy#9T((90zy&CMm^frI$6%&v}(%6ZDh-NJ?33>*v!3=IqnOb7;qc_7l}Z{~sW+MaEe zwP!!h_-M~{;2YbOjE{!5o_#Sr?!R&uD^9Ng-NIPFqQG!~)Ala=hjslI&6cmXlzIO0 z@xfdcqvfrZ_U25LHb1)8F>Etm(AI1I?8>=~f+xz+T!G>)1%^JLZ5E2sjb}3J_>KdW z&w2Lz2FDloaE9B`0f&!C7iR&vPpq+qG&E=g7~FxroHL=<;hBkj`(vBC94xw<1W)Kf z{J;Ox7jK8?#m3*xgzqsSM+A~3=y6266l&ZOuMdwysBR=AdU52Fbu~mP00f?{elF{r G5}E+3s38Xc literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/funnel.png b/src/main/resources/assets/sextiarysector/textures/items/funnel.png new file mode 100644 index 0000000000000000000000000000000000000000..1ab4a9babdbab82b5bbd817eb1a4ed5c5c9401ef GIT binary patch literal 781 zcmV+o1M>WdP)000McNliru-vS&CAsMaNFEjuE0-8xg zK~y-)eUV*A(@_}4f9LOCogXa46bm)Wh{!BSf*hG9lt>pd6G}ma6wQl7iZY6XZX!d{ zu7sc@6f{A?pezeX2~(RIIBgl`CsU@)IcJ-;{CBbZ7=q8u;k@s8-sgRuBffoZ1)wNB zmn@BjgK;4=zZqb3ZVsoS0C3!BB(b1?DWj3TsVRm{CLTVoW}r`p&}cM7M@O>;r_fYQzpu zdqc-K{8)?=a!d7f=)Fg?!R2@5FW6SVy1YU1@&J_#{$4P#;Hp`dL6Rhd*4vwk!as^_ zWrHwiQusOp&Q;f4mLN71qC*4#lM4zR41f@I0Lc-9ib{sWNWo5D7kP6Y zO+yM}7Dz6v6!-5|V0PG%0n}b9OjZji`&|m{W6Boq4yVfo!2J9IF~_24@6;o&J$U+} znpF@|y;ez#6wKQdOiS)VIwv8ctU>g4_pH}sfXdoRLL;K^QwK5nzY*voP|3=AXfrlf zz{c@0x1o~RVJGim5i=7b%#IFiS$jKV9X*V6`al$Bhn=eO3am>uJaXR(U_Hb&b;BH# z*7b?$858<`9iwgCv{>G1IMMD({cqVfqqo2+G5 za4-=#_%ORjfJ#M>-OiP?H2ii8p1k@(%8@V{x`vS@38xU;F398`%y0woKNQ;*00000 LNkvXXu0mjfWQAU0 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/mineboat_tank.png b/src/main/resources/assets/sextiarysector/textures/items/mineboat_tank.png new file mode 100644 index 0000000000000000000000000000000000000000..d02d6f8bb6747b6d025f9f3df2e575845c9a686d GIT binary patch literal 461 zcmV;;0W$uHP)G6OiKWn92oK)Pcg}r>_u!8u{M6JsVp8?5?S$E8?GmVU#Ka#50G!q&{j`o) zJwfW2g0dk2pehZPuO6}?@z}p%zS;o@wiBKO@{Y10p(+gkTCA`u zIcN7L|NQ^I@9FU@4sOM>xA*>#d{_JHP{HGa_G_|cbX+`h;J|?e3lAJQuuA9DgooMHp})k5;m`C@|%4TFhd%=6L~{kOh+^?&w>!vDub=l1+CIqh9wB(vkg zw1>wQueZ2r7_?}nM!GOl4|AF^+ldd8mE(<785nf$M`g&HUHb|25`(9!pUXO@geCx+ CrF_-^ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/copper_hoe.png b/src/main/resources/assets/sextiarysector/textures/items/tool/copper_hoe.png new file mode 100644 index 0000000000000000000000000000000000000000..5a617248a7c347c518579468f20413bffc9632f3 GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~lO!(>vn%JJQ$V3Lo-U3d7N?UF76=$Tn!H6Y^#^~l zd}VLEZrIuV$v^+!|C0W%{_^~v_L~w_B$Jd+eW+h-_xS()jeq{eQTZ)7|7=C9gZS)?yBgM+B{%Tc fTYfSPW@3299=&_FSk+OWyBR!P{an^LB{Ts5_p^5p literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/copper_pickaxe.png b/src/main/resources/assets/sextiarysector/textures/items/tool/copper_pickaxe.png new file mode 100644 index 0000000000000000000000000000000000000000..f06c962fbad7677f36b716555ea8f2740c5c18d7 GIT binary patch literal 326 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~lO(SItCy_RBB0P^PZ!4!i_^&o5*Y_Nyp>{Re6-(n zk z(rRo#(8epI#q)W)ed3OfFSM0C>%N)@|NU=0?f-w@`e*-7v>6Moj*M%X?D+kGJXp1A zTup(vk>KK+2Ln1D9%$VTw5B$7jrFJg#M?{#d0cifq#4`U8w+L|Z<^D_BwWYLadXX) z%2B6S3PZ!4!i_^&o5*Y_Px{{;=+x{DT zn|NJdug;Q;d+!gPKL7+9-d<8?V{7~Wzkg3!LW+{>=e_>%65C>b9eJ?yIQ#Tupg=GC ze+d(j86Nx^{>B&oOMjL8fB#GRzyH?L{@WKt2rS)c9Q${Fn~Ztttc%Hw2_{vuI{!_d z{vgGo;Gyo}UiWxO&u_+?&Z?-Y1m(7AUzqUt-+GOMM;|0;95JZ>Exc$hZ+}RU$zqkK lZO+cZSo-U3d7N?U_6qs|ar2pYhHlDor zrgwjT5p@+%s4x>NY z1yg_cuS%QZpffcor9rYuF5$LbZPJJRKjsVGWe}5id?K68jjiqf|JWN65)v+w9hZ6@ zGNm~5q_F{kTTbG`L&pwmcrL!_bOEziO5gICFX}5f{n~7g%Ny?4U}zxGWng4r@aMn( z34tBY&Xs)qFI9Bs|HS0f#dgYWZx-xeP}9^uc+#N$w{V+u|30HdR)6jPxj6Ue{$LPh mW@dK&ZoKIWP`iNv1B2bZR@pC0zU2cw&EVB>Ar-fh6Be*P*lhlr|4>S{ zSzWDEkEa>SvdG%YYyRIletkk3!=^NeZzjTj=RZ{cK3|2|!K~Tjbm`RQOkT@(|5e!K zPNbzcdwk+Lb5mhZ+Nb=?kFT%hVb|NEdXCi~+yDqPR*D-N)a^a>;o;kQwoqBIHsR&ljSd`Q zTF;$V*OMF)q@M;dWykl(iH@P|ty^AvHWB`Nf9AS>@y>m}?bp3XIkG%5u4(ea1FhS6 z%;jp2uI!sAbk@akwm^c6!E8f^w)rwYXK6ArTsx5L_;0_CFVIH}p00i_>zopr0NJT~ A7ytkO literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/ninja_hoe.png b/src/main/resources/assets/sextiarysector/textures/items/tool/ninja_hoe.png new file mode 100644 index 0000000000000000000000000000000000000000..db4e1d0151a7908ca26566e8562ac6706a0d1fef GIT binary patch literal 302 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~lO!*%YM*>r8Bl1qr;B5V#p&dP1p)?-CWkza{~~{E z-%mrn)lp(Kvo3F9l9*@r=k$kfSMAx_E_eS+Hg3@n=P2G~9AUB1Fz4>BnU0=&XE??+ zO-?+v%)Q6ucktZ$i~lR8Z~wnmCGOvQpYZ?d6_4|Nml8H)yYoll_>WhU*_;cM)DLgn zeO%&S{T#n2kLp>S|IUAy{2Qq5ue@bK=e3@9Ig6MtUiSI2e-DfL;YRL!$vm51r#wPu sf85oeXO>*b7@K>HVM9gQ0&@n2XU_3kE*nU10D6PL)78&qol`;+07fHu7XSbN literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/ninja_pickaxe.png b/src/main/resources/assets/sextiarysector/textures/items/tool/ninja_pickaxe.png new file mode 100644 index 0000000000000000000000000000000000000000..8a3c97d3b1e2539988ffade43c8014bef831d6c7 GIT binary patch literal 328 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~lO!)c$IovbjXi2)gH}fu=-#k{CEAzqV9)pSJ(5X`{lP*w|7RI{UkJp=XT!- zka-3b)xQtLo^a_&V|P|;V-~+>bf@CW)Q?AAuKiG;n89!+EyaE@vszNF+caUZ{cSSe>ysAE5S)GX#vI>}5W!87`X@e2R*pATWng$FllVY<7gspY OgAAUoelF{r5}E*!%YgU* literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/ninja_shovel.png b/src/main/resources/assets/sextiarysector/textures/items/tool/ninja_shovel.png new file mode 100644 index 0000000000000000000000000000000000000000..debc0f15e8ed7efa4a9a9645e9dcb9d71a304194 GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~lO(T@g0X&2I#B3{r;B5V#p&b(iHrjtT}h??T>mG& znJxcVLQ+CPBEsY1oN1y5Kwv}pWqvlcHrN08bv?-`O0J(Tx7SPR&HZ=w!JFfZ)02S$ zx5NKSv>ct`!O!e(eDQx$jX8)XvE=DY$u!^F4E)TCOv;z7{(pVKfmLcFZ=hfs2^_R&X>%y`Q;TrpnCBhwFDecVm!#6WJS}SoZVAFDZ{A{aB+sqL^!)6?j)$+R<=x!8OoX2@)yxXy33wj= zWqxC0h!jSUPIuq`rJZhc1~$t1bLac=#^`cz5&w%z_^21`;|1+MfwWJ+=9 zNn6v{@rLV*fnr9(@|iE{D>?nz{<23)Oi8tou-o(Z{D*J9{r0pOC}x)#h$LAQJk&jW zw!g5aeEyq+ir=;BUI&s`U;XL+xB9dGulWzvzsEcG{kGSu+{0Fpx&P354*rCsgoFlm c2}=fsi4}dCMq0b40KLlK>FVdQ&MBb@02F_M00000 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/copper_pipe.png b/src/main/resources/assets/sextiarysector/textures/models/copper_pipe.png new file mode 100644 index 0000000000000000000000000000000000000000..6b5e5c0d019fc46f4bc49bd22e71da1241df4727 GIT binary patch literal 1462 zcmV;n1xfmeP)VGd000McNliru-vSy34+;p{1C;;(1w%9r86vr^`c4O;vwZO;2a+p3Q@z zrt3Yrs$SK5@7M1QK?u>M8iiv6t)`n%r~r-)7$!g+fEa*dgUoFbBt-q3+YIG6HtUDW z?(tlaEsXQ2gT$$ibB8OyFxfOZS1=xqIKWGT;7b?NB-mBUx z^>OZS1(+ki@HuIse*t>Jejn`#I~+Nmyb1Ji?r0xyup?|SR}?2A+bNfc>+lvQsn4m+ z-Xg)Wb+_!n4#=Dp;sEvhqDhx(wDZEwOp<*So)hDv7uu&G@!JdPcIQ%FD7ujFHS61WKGt#e4?!;d*)7x_s9GGg-Q#Ir1FH=SX(}D^C7a; zs?nnlkYlRXqk7{okHPYW<(n~F_AO9J{H6`%)nTn0S#1Rvru) z<=Ob54Lm;zY&U@@{_9^N792K%7uW!91dIW|M97;yZRk0@us}fFJph;n+ps~@{Meu~ zjA4CdVP)PQhOAi&D<7{UhIt;|1buiDbaD*1cn#u^_3{Li{_Ju4t=^VOwlqNq1N z#QOJNV*T~+-24Y00zdvG_$s-?OrT$6JMIPmk9S$){P$kemrL$jpii`W)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dH-+Hu=r7O@(Rk4HZmU#6yR zjhsAfb}w6PMT54Yb;oTpQ)KvZ?^*#*9xh^aX&$Rf^CPc-UgSG1pdaff1o#t%G<5-wgQE!B`TJ6RNw_2cdR)X)d&mI8|vv~kOwR(ANH}$^u zirXVXHzK^_k>`Hfh17>{wl%)KxDhtKHUV0PAUnJMIFN7jfKhp0hWx0ze%BsQtzM3N z1{l})uLtZM7}7T@pAgx)3|)r+wOS43i*w`(71YIu0eBS_d!QFlqR@T}2n#;JehiEd z<^*xP0}vQ$7@{LGm7`7V98RYb3r;5hpxzJ{{eFD8ty9`3b{6~ni%4{AgGBLxIMeS( z=N4&tJWvc{Kt2i`iz z1k>XIc6Tl2GwU!Ei-6m0idkUqz>xA%keTBoal~rYb6nm##OC%=w;2}vQBP2I!L-t=X8ea?8Zn=p70!N=zd2>*%PNnmS z`9iTuejJCMZse^TeZm6BkRNpJ4**K$15J8>=sMi%2bpyk0MxLU=gZN5RWc`-@3fIm gW*x>PCUF&i0WZvMxUNyfP5=M^07*qoM6N<$g6DjiiU0rr literal 0 HcmV?d00001 From 01790e4fef8ccd62523e30467c6028fe2a2c7edf Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 3 Mar 2015 18:40:49 +0900 Subject: [PATCH 70/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E8=80=95?= =?UTF-8?q?=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・耕地が飲料水を必要とするように ・バージョンを2.1.7に --- build.gradle | 2 +- .../java/shift/sextiarysector/SSShops.java | 4 + .../shift/sextiarysector/SextiarySector.java | 2 +- .../sextiarysector/block/BlockSSFarmland.java | 108 +++++++++--------- .../shift/sextiarysector/block/BlockWood.java | 101 ++++++++-------- .../entity/EntityMineboatTank.java | 8 ++ .../event/AchievementEventHandler.java | 44 ++++++- .../event/CommonEventHandler.java | 27 ----- .../shift/sextiarysector/item/ItemScoop.java | 4 +- .../sextiarysector/recipe/RecipesCore.java | 14 +++ .../sextiarysector/recipe/RecipesTool.java | 3 +- .../tileentity/TileEntityFarmland.java | 37 +++--- .../tileentity/TileEntitySSCrop.java | 85 +++++++------- 13 files changed, 245 insertions(+), 194 deletions(-) diff --git a/build.gradle b/build.gradle index e5c5389..0d48582 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.6.b-${project.minecraft.version}" +version = "2.1.7.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index 3252b07..8d3c1ce 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -3,7 +3,9 @@ import java.util.ArrayList; import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; import shift.mceconomy2.api.MCEconomyAPI; import shift.mceconomy2.api.shop.IProductItem; import shift.mceconomy2.api.shop.IProductList; @@ -142,6 +144,8 @@ public ArrayList getProductList() { public static void initPurchase() { + MCEconomyAPI.addPurchaseItem(new ItemStack(Items.skull, 1, OreDictionary.WILDCARD_VALUE), 25); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.turnip), 280); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.cucumber), 350); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.ironTurnip), 300); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 8c9f913..665180f 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -36,7 +36,7 @@ public class SextiarySector { public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.1.6"; + public static final String VERSION = "2.1.7"; @Mod.Instance("SextiarySector") public static SextiarySector instance; diff --git a/src/main/java/shift/sextiarysector/block/BlockSSFarmland.java b/src/main/java/shift/sextiarysector/block/BlockSSFarmland.java index e372fe5..ef57ed6 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSSFarmland.java +++ b/src/main/java/shift/sextiarysector/block/BlockSSFarmland.java @@ -11,74 +11,72 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SSFluids; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.module.FertilizerManager; import shift.sextiarysector.tileentity.TileEntityFarmland; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockSSFarmland extends BlockFarmland implements ITileEntityProvider{ +public class BlockSSFarmland extends BlockFarmland implements ITileEntityProvider { public BlockSSFarmland() - { - super(); - this.setTickRandomly(false); - this.setHardness(0.6F); - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, (1.0f/16.0f)*14 , 1.0F); - this.setStepSound(soundTypeGravel); - this.setLightOpacity(255); - this.useNeighborBrightness = true; - } + { + super(); + this.setTickRandomly(false); + this.setHardness(0.6F); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, (1.0f / 16.0f) * 14, 1.0F); + this.setStepSound(soundTypeGravel); + this.setLightOpacity(255); + this.useNeighborBrightness = true; + } @Override - public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6,float par7, float par8, float par9) { + public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { - if(FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem())!=null && par1World.isAirBlock(x, y+1, z)){ + if (FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem()) != null && par1World.isAirBlock(x, y + 1, z)) { return this.setFertilizer(par1World, x, y, z, par5EntityPlayer); } - if(par5EntityPlayer.getCurrentEquippedItem()!=null){ + if (par5EntityPlayer.getCurrentEquippedItem() != null) { FluidStack f = FluidContainerRegistry.getFluidForFilledItem(par5EntityPlayer.getCurrentEquippedItem()); - if(f!=null){ + if (f != null) { TileEntityFarmland t = (TileEntityFarmland) par1World.getTileEntity(x, y, z); - if(t.fill(ForgeDirection.getOrientation(par6), f, true)>0){ + if (t.fill(ForgeDirection.getOrientation(par6), f, true) > 0) { ItemStack item = par5EntityPlayer.getCurrentEquippedItem().getItem().getContainerItem(par5EntityPlayer.getCurrentEquippedItem()); if (!par5EntityPlayer.capabilities.isCreativeMode && !par1World.isRemote) - { - --par5EntityPlayer.getCurrentEquippedItem().stackSize; - - if(item!=null){ + { + --par5EntityPlayer.getCurrentEquippedItem().stackSize; - if(par5EntityPlayer.getCurrentEquippedItem().stackSize==0){ + if (item != null) { - par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, item); + if (par5EntityPlayer.getCurrentEquippedItem().stackSize == 0) { + par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, item); - }else if (!par5EntityPlayer.inventory.addItemStackToInventory(item)) - { - par5EntityPlayer.dropPlayerItemWithRandomChoice(item,false); - } - + } else if (!par5EntityPlayer.inventory.addItemStackToInventory(item)) + { + par5EntityPlayer.dropPlayerItemWithRandomChoice(item, false); + } } - } + } return true; } - }else{ + } else { return false; } @@ -87,20 +85,20 @@ public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlay return false; } - private boolean setFertilizer(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer){ + private boolean setFertilizer(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer) { TileEntityFarmland t = (TileEntityFarmland) par1World.getTileEntity(x, y, z); - if(t.getFertilizer()!=null){ + if (t.getFertilizer() != null) { return false; } t.setFertilizer(FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem()).getFertilizer()); if (!par5EntityPlayer.capabilities.isCreativeMode && !par1World.isRemote) - { - --par5EntityPlayer.getCurrentEquippedItem().stackSize; - } + { + --par5EntityPlayer.getCurrentEquippedItem().stackSize; + } par1World.markBlockForUpdate(x, y, z); @@ -108,41 +106,45 @@ private boolean setFertilizer(World par1World, int x, int y, int z, EntityPlayer } - public boolean addWater(World par1World, int x, int y, int z){ + public boolean addWater(World par1World, int x, int y, int z) { TileEntityFarmland t = (TileEntityFarmland) par1World.getTileEntity(x, y, z); - return t.fill(ForgeDirection.UP, new FluidStack(FluidRegistry.WATER, 1000), true) > 0; + return t.fill(ForgeDirection.UP, new FluidStack(SSFluids.drinkingWater, 1000), true) > 0; } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) - { - super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); - p_149749_1_.removeTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); - } - - public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_) - { - super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_); - TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_); - return tileentity != null ? tileentity.receiveClientEvent(p_149696_5_, p_149696_6_) : false; - } + { + super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); + p_149749_1_.removeTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); + } + + @Override + public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_) + { + super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_); + TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_); + return tileentity != null ? tileentity.receiveClientEvent(p_149696_5_, p_149696_6_) : false; + } @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityFarmland(); } + @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(int p_149691_1_, int p_149691_2_) - { + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { return Blocks.farmland.getIcon(p_149691_1_, p_149691_2_); - } + } + @Override public int getRenderType() - { - return SextiarySector.proxy.farmlandType; - } + { + return SextiarySector.proxy.farmlandType; + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockWood.java b/src/main/java/shift/sextiarysector/block/BlockWood.java index b1c07b3..7384eeb 100644 --- a/src/main/java/shift/sextiarysector/block/BlockWood.java +++ b/src/main/java/shift/sextiarysector/block/BlockWood.java @@ -10,8 +10,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SSFluids; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.module.FertilizerManager; import shift.sextiarysector.tileentity.TileEntityFarmland; @@ -19,7 +19,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockWood extends BlockContainer{ +public class BlockWood extends BlockContainer { private IIcon blockTopIcon; private IIcon blockTop2Icon; @@ -28,59 +28,57 @@ public BlockWood() { super(Material.wood); this.setLightOpacity(255); this.setStepSound(soundTypeGrass); - this.setBlockBounds(2.0f/16.0f, 0.0f, 2.0f/16.0f, 14.0f/16.0f, 15.0f/16.0f, 14.0f/16.0f); + this.setBlockBounds(2.0f / 16.0f, 0.0f, 2.0f / 16.0f, 14.0f / 16.0f, 15.0f / 16.0f, 14.0f / 16.0f); this.setHardness(1.2f); this.setStepSound(soundTypeWood); this.useNeighborBrightness = true; } @Override - public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6,float par7, float par8, float par9) { + public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { - if(FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem())!=null && par1World.isAirBlock(x, y+1, z)){ + if (FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem()) != null && par1World.isAirBlock(x, y + 1, z)) { return this.setFertilizer(par1World, x, y, z, par5EntityPlayer); } - if(par5EntityPlayer.getCurrentEquippedItem()!=null){ + if (par5EntityPlayer.getCurrentEquippedItem() != null) { FluidStack f = FluidContainerRegistry.getFluidForFilledItem(par5EntityPlayer.getCurrentEquippedItem()); - if(f!=null){ + if (f != null) { TileEntityWood t = (TileEntityWood) par1World.getTileEntity(x, y, z); - if(t.fill(ForgeDirection.getOrientation(par6), f, true)>0){ + if (t.fill(ForgeDirection.getOrientation(par6), f, true) > 0) { ItemStack item = par5EntityPlayer.getCurrentEquippedItem().getItem().getContainerItem(par5EntityPlayer.getCurrentEquippedItem()); if (!par5EntityPlayer.capabilities.isCreativeMode && !par1World.isRemote) - { - --par5EntityPlayer.getCurrentEquippedItem().stackSize; + { + --par5EntityPlayer.getCurrentEquippedItem().stackSize; - if(item!=null){ + if (item != null) { - if(par5EntityPlayer.getCurrentEquippedItem().stackSize==0){ + if (par5EntityPlayer.getCurrentEquippedItem().stackSize == 0) { - par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, item); - - - }else if (!par5EntityPlayer.inventory.addItemStackToInventory(item)) - { - par5EntityPlayer.dropPlayerItemWithRandomChoice(item,false); - } + par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, item); + } else if (!par5EntityPlayer.inventory.addItemStackToInventory(item)) + { + par5EntityPlayer.dropPlayerItemWithRandomChoice(item, false); + } } - } + } return true; } - }else{ + } else { return false; } @@ -89,20 +87,20 @@ public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlay return false; } - private boolean setFertilizer(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer){ + private boolean setFertilizer(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer) { TileEntityWood t = (TileEntityWood) par1World.getTileEntity(x, y, z); - if(t.getFertilizer()!=null){ + if (t.getFertilizer() != null) { return false; } t.setFertilizer(FertilizerManager.getFertilizer(par5EntityPlayer.getCurrentEquippedItem()).getFertilizer()); if (!par5EntityPlayer.capabilities.isCreativeMode && !par1World.isRemote) - { - --par5EntityPlayer.getCurrentEquippedItem().stackSize; - } + { + --par5EntityPlayer.getCurrentEquippedItem().stackSize; + } par1World.markBlockForUpdate(x, y, z); @@ -110,11 +108,11 @@ private boolean setFertilizer(World par1World, int x, int y, int z, EntityPlayer } - public boolean addWater(World par1World, int x, int y, int z){ + public boolean addWater(World par1World, int x, int y, int z) { TileEntityFarmland t = (TileEntityFarmland) par1World.getTileEntity(x, y, z); - return t.fill(ForgeDirection.UP, new FluidStack(FluidRegistry.WATER, 1000), true) > 0; + return t.fill(ForgeDirection.UP, new FluidStack(SSFluids.drinkingWater, 1000), true) > 0; } @@ -123,42 +121,47 @@ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityWood(); } + @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(this.getTextureName()); - this.blockTopIcon = p_149651_1_.registerIcon(this.getTextureName()+"_top"); - this.blockTop2Icon = p_149651_1_.registerIcon(this.getTextureName()+"_top2"); - } + public void registerBlockIcons(IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(this.getTextureName()); + this.blockTopIcon = p_149651_1_.registerIcon(this.getTextureName() + "_top"); + this.blockTop2Icon = p_149651_1_.registerIcon(this.getTextureName() + "_top2"); + } + @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(int p_149691_1_, int p_149691_2_) - { - if(p_149691_1_!=0 && p_149691_1_!=1){ + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + if (p_149691_1_ != 0 && p_149691_1_ != 1) { return this.blockIcon; } - if(p_149691_2_==0){ + if (p_149691_2_ == 0) { return this.blockTopIcon; - }else{ + } else { return this.blockTop2Icon; } - } + } + @Override public boolean isOpaqueCube() - { - return false; - } + { + return false; + } + @Override public boolean renderAsNormalBlock() - { - return false; - } + { + return false; + } + @Override public int getRenderType() - { - return SextiarySector.proxy.woodType; - } + { + return SextiarySector.proxy.woodType; + } } diff --git a/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java b/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java index fc93d13..2c92d56 100644 --- a/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java +++ b/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java @@ -1,6 +1,7 @@ package shift.sextiarysector.entity; import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; @@ -130,6 +131,13 @@ public void killMineBoat(DamageSource par1DamageSource) this.func_145778_a(Item.getItemFromBlock(SSBlocks.tank), 1, 0.0F); } + @Override + //ここに重要な事がある。 + public boolean interactFirst(EntityPlayer par1EntityPlayer) + { + return true; + } + /* IFluidHandler */ @Override public int fill(ForgeDirection from, FluidStack resource, boolean doFill) diff --git a/src/main/java/shift/sextiarysector/event/AchievementEventHandler.java b/src/main/java/shift/sextiarysector/event/AchievementEventHandler.java index 22bba0a..3afa6b2 100644 --- a/src/main/java/shift/sextiarysector/event/AchievementEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/AchievementEventHandler.java @@ -1,7 +1,16 @@ package shift.sextiarysector.event; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import net.minecraftforge.event.entity.player.AchievementEvent; +import shift.mceconomy2.api.MCEconomyAPI; import shift.mceconomy2.api.shop.ShopBuyEvent; import shift.sextiarysector.SSAchievement; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.block.BlockFigure; import shift.sextiarysector.item.ItemBlockCrop; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -9,7 +18,40 @@ public class AchievementEventHandler { @SubscribeEvent public void useEvent(ShopBuyEvent event) { - if(event.buy.getItem() instanceof ItemBlockCrop)event.entityPlayer.addStat(SSAchievement.seed, 1); + if (event.buy.getItem() instanceof ItemBlockCrop) event.entityPlayer.addStat(SSAchievement.seed, 1); + } + + @SubscribeEvent + public void onAchievementEvent(AchievementEvent event) { + + Achievement achievement = event.achievement; + EntityPlayer player = event.entityPlayer; + ItemStack item = achievement.theItemStack; + + if (item == null) return; + + if (((EntityPlayerMP) player).func_147099_x().hasAchievementUnlocked(achievement)) return; + if (!((EntityPlayerMP) player).func_147099_x().canUnlockAchievement(achievement)) return; + + ItemStack f = new ItemStack(SSBlocks.figure); + BlockFigure.setFigureItem(f, item.copy(), "achievement"); + + /* + if (!player.inventory.addItemStackToInventory(f)) + { + System.out.println("AA"); + player.dropPlayerItemWithRandomChoice(f, false); + }*/ + + MCEconomyAPI.addPlayerMP(player, 500, false); + + EntityItem eItem = new EntityItem(player.worldObj, player.posX + 0.5d, player.posY + 0.5d, player.posZ + 0.5d, f); + eItem.lifespan = 12000; + + player.worldObj.spawnEntityInWorld(eItem); + + //player.inventory.markDirty(); + } } diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index ef67cce..914f6cd 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -12,7 +12,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.stats.Achievement; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; @@ -22,7 +21,6 @@ import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; -import net.minecraftforge.event.entity.player.AchievementEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.entity.player.PlayerWakeUpEvent; import net.minecraftforge.event.world.WorldEvent; @@ -32,7 +30,6 @@ import shift.sextiarysector.SSFluids.SSFluid; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.event.BlockBottleEvent; -import shift.sextiarysector.block.BlockFigure; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockMonitor.MonitorType; import shift.sextiarysector.item.ItemKnife; @@ -72,30 +69,6 @@ public void useEvent(PlayerInteractEvent event) { } - @SubscribeEvent - public void onAchievementEvent(AchievementEvent event) { - - Achievement achievement = event.achievement; - EntityPlayer player = event.entityPlayer; - ItemStack item = achievement.theItemStack; - - if (item == null) return; - - if (((EntityPlayerMP) player).func_147099_x().hasAchievementUnlocked(achievement)) return; - - ItemStack f = new ItemStack(SSBlocks.figure); - BlockFigure.setFigureItem(f, item.copy(), "achievement"); - - if (!player.inventory.addItemStackToInventory(f)) - { - if (player.worldObj.isRemote) return; - player.dropPlayerItemWithRandomChoice(f, false); - } - - player.inventory.markDirty(); - - } - /* 無理でした(╹◡╹) @SubscribeEvent public void useBottleEvent(PlayerInteractEvent event) { diff --git a/src/main/java/shift/sextiarysector/item/ItemScoop.java b/src/main/java/shift/sextiarysector/item/ItemScoop.java index 94365d3..eb34bd9 100644 --- a/src/main/java/shift/sextiarysector/item/ItemScoop.java +++ b/src/main/java/shift/sextiarysector/item/ItemScoop.java @@ -55,7 +55,7 @@ public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_ Block block1 = SSBlocks.hole; p_77648_3_.playSoundEffect(p_77648_4_ + 0.5F, p_77648_5_ + 0.5F, p_77648_6_ + 0.5F, block1.stepSound.getStepResourcePath(), (block1.stepSound.getVolume() + 1.0F) / 2.0F, block1.stepSound.getPitch() * 0.8F); - p_77648_2_.addStat(SSAchievement.hole, 1); + if (!p_77648_3_.isRemote) p_77648_2_.addStat(SSAchievement.hole, 1); if (p_77648_3_.isRemote) { return true; @@ -72,7 +72,7 @@ else if (p_77648_7_ != 0 && p_77648_3_.getBlock(p_77648_4_, p_77648_5_ + 1, p_77 Block block1 = SSBlocks.farmland; p_77648_3_.playSoundEffect(p_77648_4_ + 0.5F, p_77648_5_ + 0.5F, p_77648_6_ + 0.5F, block1.stepSound.getStepResourcePath(), (block1.stepSound.getVolume() + 1.0F) / 2.0F, block1.stepSound.getPitch() * 0.8F); - p_77648_2_.addStat(SSAchievement.farmland, 1); + if (!p_77648_3_.isRemote) p_77648_2_.addStat(SSAchievement.farmland, 1); if (p_77648_3_.isRemote) { return true; diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index e8e29a7..775cf7e 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -74,6 +74,13 @@ public static void addRecipes(CraftingManager p_77608_1_) 'y', "ingotCopper", })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.shippingBox, 1), + new Object[] { + "yyy", "yxy", "yyy", + 'x', Blocks.ender_chest, + 'y', "plateWood", + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.rucksack, 1), new Object[] { "xxx", "x x", "xxx", @@ -87,6 +94,13 @@ public static void addRecipes(CraftingManager p_77608_1_) 'y', Items.boat, })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.mineboatTank, 1), + new Object[] { + "x", "y", + 'x', SSBlocks.tank, + 'y', Items.boat, + })); + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(Items.string, 1), new Object[] { "craftingSmallCloth", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java index 1d677a0..f28c674 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java @@ -38,8 +38,9 @@ public static void addRecipes(CraftingManager p_77608_1_) for (int i = 0; i < wateringCan.length; i++) { p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(wateringCan[i], 1, (wateringCan[i].getMaxDamage() - 1)), - new Object[] { "yyy", " yy", + new Object[] { "yxy", " yy", Character.valueOf('y'), material[i], + Character.valueOf('x'), "craftingFilterCloth", })); } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFarmland.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFarmland.java index 323200d..99eb22e 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFarmland.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFarmland.java @@ -9,21 +9,22 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.SSFluids; import shift.sextiarysector.api.agriculture.IFarmland; -public class TileEntityFarmland extends TileEntity implements IFluidHandler , IFarmland{ +public class TileEntityFarmland extends TileEntity implements IFluidHandler, IFarmland { //水 protected FluidTank water = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME); + @Override public void updateEntity() { - if(!this.worldObj.isRemote){ + if (!this.worldObj.isRemote) { this.updateServerEntity(); } @@ -31,12 +32,12 @@ public void updateEntity() { public void updateServerEntity() { - if(this.getBlockMetadata()==0&&water.getFluidAmount()>500){ + if (this.getBlockMetadata() == 0 && water.getFluidAmount() > 500) { this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 1, 4); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } - if(this.getBlockMetadata()==1&&water.getFluidAmount()<=500){ + if (this.getBlockMetadata() == 1 && water.getFluidAmount() <= 500) { this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 4); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } @@ -52,23 +53,25 @@ public ItemStack getFertilizer() { } public void setFertilizer(ItemStack fertilizer) { - if(fertilizer==null){ + if (fertilizer == null) { this.fertilizerItem = null; - }else{ + } else { this.fertilizerItem = fertilizer.copy(); } } - public void clearFertilizer(){ + public void clearFertilizer() { this.fertilizerItem = null; } - public boolean canGrowth(){ - return water.getFluidAmount()>=500; + @Override + public boolean canGrowth() { + return water.getFluidAmount() >= 500; } - public void growth(){ + @Override + public void growth() { this.water.drain(500, true); } @@ -78,7 +81,7 @@ public void readFromNBT(NBTTagCompound par1nbtTagCompound) { //if(par1nbtTagCompound.hasKey("fertilizer")){ // this.fertilizer = par1nbtTagCompound.getString("fertilizer"); //} - if(par1nbtTagCompound.hasKey("fertilizeritem")){ + if (par1nbtTagCompound.hasKey("fertilizeritem")) { this.fertilizerItem = ItemStack.loadItemStackFromNBT(par1nbtTagCompound.getCompoundTag("fertilizeritem")); } @@ -89,8 +92,8 @@ public void readFromNBT(NBTTagCompound par1nbtTagCompound) { public void writeToNBT(NBTTagCompound par1nbtTagCompound) { super.writeToNBT(par1nbtTagCompound); //if(fertilizer!=null)par1nbtTagCompound.setString("fertilizer", fertilizer); - if(fertilizerItem!=null){ - NBTTagCompound itemNBT =new NBTTagCompound(); + if (fertilizerItem != null) { + NBTTagCompound itemNBT = new NBTTagCompound(); fertilizerItem.writeToNBT(itemNBT); par1nbtTagCompound.setTag("fertilizeritem", itemNBT); } @@ -114,7 +117,7 @@ public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { @Override public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { - if(!this.canFill(from, resource.getFluid())){ + if (!this.canFill(from, resource.getFluid())) { return 0; } @@ -123,7 +126,7 @@ public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { } @Override - public FluidStack drain(ForgeDirection from, FluidStack resource,boolean doDrain) { + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { return null; } @@ -134,7 +137,7 @@ public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { @Override public boolean canFill(ForgeDirection from, Fluid fluid) { - return fluid.getID()==FluidRegistry.WATER.getID(); + return fluid.getID() == SSFluids.drinkingWater.getID(); } @Override diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java index bc58e6c..e7b65fd 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySSCrop.java @@ -16,20 +16,21 @@ import shift.sextiarysector.block.BlockSSCrop; import shift.sextiarysector.block.BlockSSCrop.CropStatus; -public class TileEntitySSCrop extends TileEntity implements IFluidHandler{ +public class TileEntitySSCrop extends TileEntity implements IFluidHandler { private int lastMinutes = 0; - private int lastDay =0; + private int lastDay = 0; //成長何日目か - private int day=0; + private int day = 0; //再収穫 - private int day2=0; + private int day2 = 0; + @Override public void updateEntity() { - if(!this.worldObj.isRemote){ + if (!this.worldObj.isRemote) { this.updateServerEntity(); } @@ -37,33 +38,33 @@ public void updateEntity() { public void updateServerEntity() { - if(this.getBlockMetadata()==4 && !this.getStatus().isReHarvest()){ + if (this.getBlockMetadata() == 4 && !this.getStatus().isReHarvest()) { this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 3, 0); } - if(lastMinutes==0){ - lastMinutes=SeasonAPI.getMinute(getWorldObj()); + if (lastMinutes == 0) { + lastMinutes = SeasonAPI.getMinute(getWorldObj()); } - if(lastMinutes==SeasonAPI.getMinute(getWorldObj())&&lastDay!=SeasonAPI.getDay(getWorldObj())){ + if (lastMinutes == SeasonAPI.getMinute(getWorldObj()) && lastDay != SeasonAPI.getDay(getWorldObj())) { Season[] s = this.getStatus().getSeason(); boolean notB = false; - for(int i = 0;i Date: Thu, 5 Mar 2015 22:07:08 +0900 Subject: [PATCH 71/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=9E?= =?UTF-8?q?=E3=83=AB=E3=83=81=E9=96=A2=E4=BF=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- .../shift/sextiarysector/SSAchievement.java | 53 ++- .../java/shift/sextiarysector/SSBlocks.java | 2 +- .../java/shift/sextiarysector/SSShops.java | 17 +- .../shift/sextiarysector/SextiarySector.java | 2 +- .../event/ClientEventHandler.java | 381 +++++++-------- .../sextiarysector/event/HUDEventHandler.java | 440 +++++++++--------- .../sextiarysector/item/ItemShopRing.java | 45 +- .../sextiarysector/plugin/PluginCleaver.java | 8 + .../tileentity/TileEntityFunnel.java | 28 ++ .../tileentity/TileEntityTank.java | 4 +- .../assets/sextiarysector/lang/en_US.lang | 29 +- .../textures/models/monitor_robot.png | Bin 1825 -> 1835 bytes 13 files changed, 537 insertions(+), 474 deletions(-) diff --git a/build.gradle b/build.gradle index 0d48582..2e9a104 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.7.a-${project.minecraft.version}" +version = "2.1.7.b-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSAchievement.java b/src/main/java/shift/sextiarysector/SSAchievement.java index 5b8a215..bf680c9 100644 --- a/src/main/java/shift/sextiarysector/SSAchievement.java +++ b/src/main/java/shift/sextiarysector/SSAchievement.java @@ -31,6 +31,9 @@ public class SSAchievement { public static Achievement bottle; public static Achievement drinkingWater; public static Achievement craftFurnace; + public static Achievement fluidFurnace; + public static Achievement hammer; + public static Achievement freezer; //Agriculture public static Achievement seed; @@ -45,7 +48,6 @@ public class SSAchievement { public static Achievement cucumber; - public static Achievement onion; public static Achievement tomato; @@ -53,21 +55,21 @@ public class SSAchievement { public static Achievement corn; public static Achievement goldenCorn; - public static Achievement eggplant; public static Achievement sweetPotato; public static Achievement greenPepper; - public static Achievement radish; - public static Achievement rice; //Mining public static Achievement blueStoneDust; + public static Achievement copperOre; + public static Achievement silverOre; + public static Achievement mithrilOre; //Industry public static Achievement blueStoneSlimeBall; @@ -99,23 +101,26 @@ public class SSAchievement { public static Achievement creeperChest; public static Achievement shipping; - public static void initAchievements(){ + public static void initAchievements() { - moisture = new AchievementBase("moisture", 3, -1, new ItemStack(Items.water_bucket), (Achievement)null, core).initIndependentStat().registerStat(); + moisture = new AchievementBase("moisture", 3, -1, new ItemStack(Items.water_bucket), (Achievement) null, core).initIndependentStat().registerStat(); bottle = new AchievementCraft("bottle", 1, 1, new ItemStack(SSItems.emptyBottle), AchievementList.buildWorkBench, core).registerStat(); drinkingWater = new AchievementFurnace("drinking_water", 3, 1, new ItemStack(SSItems.drinkingWaterBottle), bottle, core).registerStat(); - craftFurnace = new AchievementCraft("craft_furnace", -1, -1, new ItemStack(SSBlocks.LargeFurnace), AchievementList.buildWorkBench, core).registerStat(); + craftFurnace = new AchievementCraft("craft_furnace", -2, -1, new ItemStack(SSBlocks.LargeFurnace), AchievementList.buildWorkBench, core).registerStat(); + hammer = new AchievementFurnace("hammer", -4, -1, new ItemStack(SSItems.hammer), craftFurnace, core).registerStat(); + fluidFurnace = new AchievementFurnace("fluid_furnace", -2, 1, new ItemStack(SSBlocks.fluidFurnace), craftFurnace, core).registerStat(); + freezer = new AchievementFurnace("freezer", 0, -3, new ItemStack(SSBlocks.freezer), craftFurnace, core).registerStat(); AchievementPage.registerAchievementPage(new AchievementPageBase("achievement.ss.core", core)); - seed = new AchievementBase("seed", -8, -2, new ItemStack(SSBlocks.tomato), (Achievement)null, agriculture).initIndependentStat().registerStat(); - scoop =new AchievementCraft("scoop", -6, -3, new ItemStack(SSItems.woodScoop), AchievementList.buildWorkBench, agriculture).registerStat(); - farmland = new AchievementBase("farmland", -4, -4, new ItemStack(Items.wooden_hoe), scoop, agriculture).registerStat(); - wateringCan = new AchievementCraft("watering_can", 1, -2, new ItemStack(SSItems.woodWateringCan,1,OreDictionary.WILDCARD_VALUE), AchievementList.buildWorkBench, agriculture).registerStat(); + //農業 + seed = new AchievementBase("seed", -8, -2, new ItemStack(SSBlocks.tomato), (Achievement) null, agriculture).initIndependentStat().registerStat(); + scoop = new AchievementCraft("scoop", -6, -3, new ItemStack(SSItems.woodScoop), AchievementList.buildWorkBench, agriculture).registerStat(); + farmland = new AchievementBase("farmland", -4, -4, new ItemStack(Items.stone_hoe), scoop, agriculture).registerStat(); + wateringCan = new AchievementCraft("watering_can", 1, -2, new ItemStack(SSItems.woodWateringCan, 1, OreDictionary.WILDCARD_VALUE), AchievementList.buildWorkBench, agriculture).registerStat(); hole = new AchievementBase("hole", -4, -2, new ItemStack(SSItems.ironScoop), scoop, agriculture).registerStat(); paddy = new AchievementBase("paddy", -2, -2, new ItemStack(Items.water_bucket), hole, agriculture).registerStat(); - int spring = 1; turnip = new AchievementCrop("turnip", -7, spring, new ItemStack(SSItems.turnip), SSBlocks.turnip, seed, agriculture).registerStat(); ironTurnip = new AchievementPickup("iron_turnip", -5, spring - 1, new ItemStack(SSItems.ironTurnip), turnip, agriculture).registerStat(); @@ -138,18 +143,22 @@ public static void initAchievements(){ greenPepper = new AchievementCrop("green_pepper", -7, autumn + 8, new ItemStack(SSItems.greenPepper), SSBlocks.greenPepper, seed, agriculture).registerStat(); int winter = 36; - radish = new AchievementCrop("radish", -7, winter, new ItemStack(SSItems.radish), SSBlocks.radish, seed, agriculture).registerStat(); int spring2 = 41; - rice = new AchievementCrop("rice", -7, spring2, new ItemStack(SSItems.rice), SSBlocks.rice, seed, agriculture).registerStat(); AchievementPage.registerAchievementPage(new AchievementPageAgriculture("achievement.ss.agriculture", agriculture)); //鉱業 - blueStoneDust = new AchievementPickup("bluestone_dust", 0, 0, new ItemStack(SSItems.blueStoneDust), AchievementList.buildPickaxe, mining).registerStat(); + blueStoneDust = new AchievementPickup("bluestone_dust", 0, 0, new ItemStack(SSItems.blueStoneDust), AchievementList.buildPickaxe, mining).registerStat(); + + copperOre = new AchievementPickup("copper_ore", 2, 0, new ItemStack(SSBlocks.copperOre), AchievementList.buildPickaxe, mining).registerStat(); + + silverOre = new AchievementPickup("silver_ore", 4, 2, new ItemStack(SSBlocks.silverOre), AchievementList.buildPickaxe, mining).registerStat(); + + mithrilOre = new AchievementPickup("mithril_ore", -2, -1, new ItemStack(SSBlocks.mithrilOre), AchievementList.buildPickaxe, mining).registerStat(); AchievementPage.registerAchievementPage(new AchievementPageBase("achievement.ss.mining", mining)); @@ -157,9 +166,8 @@ public static void initAchievements(){ blueStoneSlimeBall = new AchievementFurnace("bluestone_slime_ball", -4, -1, new ItemStack(SSItems.blueStoneSlimeBall), blueStoneDust, industry).registerStat(); - woodGear = new AchievementCraft("wood_gear", -2, 0, new ItemStack(SSItems.woodGear), blueStoneSlimeBall, industry).registerStat(); - smallWindmill = new AchievementCraft("small_windmill", -1, -2, new ItemStack(SSBlocks.smallWindmill), woodGear, industry).registerStat(); + smallWindmill = new AchievementCraft("small_windmill", -1, -2, new ItemStack(SSBlocks.smallWindmill), woodGear, industry).registerStat(); millstone = new AchievementCraft("millstone", -1, 2, new ItemStack(SSBlocks.millstone), woodGear, industry).registerStat(); loom = new AchievementCraft("loom", -1, 3, new ItemStack(SSBlocks.loom), woodGear, industry).registerStat(); @@ -183,17 +191,12 @@ public static void initAchievements(){ AchievementPage.registerAchievementPage(new AchievementPageIndustry("achievement.ss.industry", industry)); //経済 - creeperFirework = new AchievementBase("creeper_firework", 0, 0, new ItemStack(Items.fireworks), (Achievement)null,economy).initIndependentStat().registerStat(); - creeperChest = new AchievementBase("creeper_chest", 1, -2, new ItemStack(SSBlocks.creeperChest), creeperFirework,economy).registerStat(); - shipping = new AchievementBase("shipping", 3, -2, new ItemStack(SSBlocks.shippingBox), creeperChest,economy).registerStat(); - - + creeperFirework = new AchievementBase("creeper_firework", 0, 0, new ItemStack(Items.fireworks), (Achievement) null, economy).initIndependentStat().registerStat(); + creeperChest = new AchievementBase("creeper_chest", 1, -2, new ItemStack(SSBlocks.creeperChest), creeperFirework, economy).registerStat(); + shipping = new AchievementBase("shipping", 3, -2, new ItemStack(SSBlocks.shippingBox), creeperChest, economy).registerStat(); AchievementPage.registerAchievementPage(new AchievementPageEconomy("achievement.ss.economy", economy)); } - - - } diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 9057ece..0af825f 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -204,10 +204,10 @@ public class SSBlocks { public static Block ironLargeOre; public static Block goldLargeOre; + //経済 public static Block shippingBox; public static Block creeperChest; - //経済 public static Block monitor; //農業 diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index 8d3c1ce..5bdf2d0 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -17,9 +17,11 @@ public class SSShops { + public static SSProductList[] creepers; + public static void initShops() { - SSProductList[] creepers = new SSProductList[4]; + creepers = new SSProductList[4]; for (int i = 0; i < 4; i++) { @@ -88,16 +90,17 @@ public static void initShops() { } MonitorType.creeper.setList(creepers); - SSProductList[] creepersR = new SSProductList[4]; - for (int i = 0; i < 4; i++) { - creepersR[i] = creepers[i].copySSProductList(); - } - ((ItemShopRing) SSItems.creeperRing).setList(creepersR); + //SSProductList[] creepersR = new SSProductList[4]; + //for (int i = 0; i < 4; i++) { + // creepersR[i] = creepers[i].copySSProductList(); + //} + //((ItemShopRing) SSItems.creeperRing).setList(creepersR); + ((ItemShopRing) SSItems.creeperRing).setList(creepers); SSProductList robot = new SSProductList("shop.ss.robot"); MonitorType.robot.setList(robot); - robot.addItemProduct(new ProductItem(new ItemStack(Blocks.chest, 1), 250)); + robot.addItemProduct(new ProductItem(new ItemStack(Blocks.lava, 1), 250)); } diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 665180f..dc65a46 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -43,7 +43,7 @@ public class SextiarySector { public static final String DEPENDENCY = "";//"required-after:mceconomy2"; - @SidedProxy(clientSide = "shift.sextiarysector.proxy.ClientProxy", serverSide = "shift.sextiarysector.proxy.CommonProxy") + @SidedProxy(modId = MODID, clientSide = "shift.sextiarysector.proxy.ClientProxy", serverSide = "shift.sextiarysector.proxy.CommonProxy") public static CommonProxy proxy; public static final Logger Log = LogManager.getLogger(SextiarySectorAPI.MODID); diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 8f44c7a..226a9a5 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -13,7 +13,6 @@ import net.minecraft.client.gui.achievement.GuiStats; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -50,19 +49,19 @@ public class ClientEventHandler { @SideOnly(Side.CLIENT) - public static Minecraft mc = FMLClientHandler.instance().getClient(); + public static Minecraft mc = FMLClientHandler.instance().getClient(); - @SubscribeEvent - @SideOnly(Side.CLIENT) - public void onGuiOpenEvent(GuiOpenEvent event) { + @SubscribeEvent + @SideOnly(Side.CLIENT) + public void onGuiOpenEvent(GuiOpenEvent event) { - if(event.gui instanceof GuiStats&&!(event.gui instanceof GuiStatsNext)){ + if (event.gui instanceof GuiStats && !(event.gui instanceof GuiStatsNext)) { - /* - Class c = GuiStats.class; + /* + Class c = GuiStats.class; - Field f1; - GuiScreen m = null; + Field f1; + GuiScreen m = null; try { f1 = c.getDeclaredField( "parentGui" ); f1.setAccessible( true ); @@ -81,118 +80,111 @@ public void onGuiOpenEvent(GuiOpenEvent event) { e.printStackTrace(); }*/ - event.gui = new GuiStatsNext(new GuiIngameMenu(),mc.thePlayer.getStatFileWriter()); - - - - //System.out.println("GuiOpenEvent"); - } - - if(event.gui instanceof GuiAchievements && !(event.gui instanceof GuiAchievementsNext)){ - - ((IProgressMeter)event.gui).func_146509_g(); - GuiScreen gui = ObfuscationReflectionHelper.getPrivateValue(GuiAchievements.class, (GuiAchievements)event.gui, "field_146562_a"); - event.gui = new GuiAchievementsNext(gui ,mc.thePlayer.getStatFileWriter()); + event.gui = new GuiStatsNext(new GuiIngameMenu(), mc.thePlayer.getStatFileWriter()); - } + //System.out.println("GuiOpenEvent"); + } - } + if (event.gui instanceof GuiAchievements && !(event.gui instanceof GuiAchievementsNext)) { - @SubscribeEvent - public void onItemTooltipEvent(ItemTooltipEvent event) { + ((IProgressMeter) event.gui).func_146509_g(); + GuiScreen gui = ObfuscationReflectionHelper.getPrivateValue(GuiAchievements.class, (GuiAchievements) event.gui, "field_146562_a"); + event.gui = new GuiAchievementsNext(gui, mc.thePlayer.getStatFileWriter()); + } - ItemStack itemStack = event.itemStack; - List toolTip = event.toolTip; + } - if(itemStack.getItem()==Items.clock){ - toolTip.add(SeasonManager.getInstance().getTime2(this.mc.theWorld)); - } + @SubscribeEvent + public void onItemTooltipEvent(ItemTooltipEvent event) { - } + ItemStack itemStack = event.itemStack; + List toolTip = event.toolTip; - public static IIcon slotGF; - public static IIcon slotFluid; + if (itemStack.getItem() == Items.clock) { + toolTip.add(SeasonManager.getInstance().getTime2(this.mc.theWorld)); + } - public static IIcon[] itemGF; + } - public static IIcon waterFlow; - public static IIcon waterStill; + public static IIcon slotGF; + public static IIcon slotFluid; - public static IIcon portal; + public static IIcon[] itemGF; - public static IIcon lavaFlow; - public static IIcon lavaStill; + public static IIcon waterFlow; + public static IIcon waterStill; - @SubscribeEvent - public void PreTextureStitchEvent(TextureStitchEvent.Pre event){ + public static IIcon portal; - //Item - if(event.map.getTextureType()==1){ + public static IIcon lavaFlow; + public static IIcon lavaStill; + @SubscribeEvent + public void PreTextureStitchEvent(TextureStitchEvent.Pre event) { - slotGF = event.map.registerIcon("sextiarysector:gui/slot_gf"); - slotFluid = event.map.registerIcon("sextiarysector:gui/slot_fluid"); + //Item + if (event.map.getTextureType() == 1) { - itemGF = new IIcon[2]; - itemGF[0] = event.map.registerIcon("sextiarysector:damage/damage_0"); - itemGF[1] = event.map.registerIcon("sextiarysector:damage/damage_1"); + slotGF = event.map.registerIcon("sextiarysector:gui/slot_gf"); + slotFluid = event.map.registerIcon("sextiarysector:gui/slot_fluid"); - for(EquipmentType type :EquipmentType.values()){ - type.registerIcon(event.map); - } + itemGF = new IIcon[2]; + itemGF[0] = event.map.registerIcon("sextiarysector:damage/damage_0"); + itemGF[1] = event.map.registerIcon("sextiarysector:damage/damage_1"); + for (EquipmentType type : EquipmentType.values()) { + type.registerIcon(event.map); + } - }else{ - waterFlow = event.map.registerIcon("sextiarysector:fluid/water_flow"); - waterStill = event.map.registerIcon("sextiarysector:fluid/water_still"); - portal = event.map.registerIcon("sextiarysector:fluid/portal"); - lavaFlow = event.map.registerIcon("sextiarysector:fluid/lava_flow"); - lavaStill = event.map.registerIcon("sextiarysector:fluid/lava_still"); - } - - } - - @SubscribeEvent - public void preFertilizerTextureStitchEvent(TextureStitchEvent.Pre event){ + } else { + waterFlow = event.map.registerIcon("sextiarysector:fluid/water_flow"); + waterStill = event.map.registerIcon("sextiarysector:fluid/water_still"); + portal = event.map.registerIcon("sextiarysector:fluid/portal"); + lavaFlow = event.map.registerIcon("sextiarysector:fluid/lava_flow"); + lavaStill = event.map.registerIcon("sextiarysector:fluid/lava_still"); + } - if(event.map.getTextureType()==0){ + } - for(IFertilizer f : ((FertilizerManager)AgricultureAPI.fertilizerManager).fertilizerIcons){ - f.registerFertilizerIcons(event.map); - } + @SubscribeEvent + public void preFertilizerTextureStitchEvent(TextureStitchEvent.Pre event) { - } + if (event.map.getTextureType() == 0) { - } + for (IFertilizer f : ((FertilizerManager) AgricultureAPI.fertilizerManager).fertilizerIcons) { + f.registerFertilizerIcons(event.map); + } - @SubscribeEvent - public void preVanillaTextureStitchEvent(TextureStitchEvent.Pre event){ + } - //Item - if(event.map.getTextureType()==0){ + } - IIcon icon = new TextureSeason("sextiarysector:vanilla/leaves_birch"); + @SubscribeEvent + public void preVanillaTextureStitchEvent(TextureStitchEvent.Pre event) { - ((TextureMap)event.map).setTextureEntry("sextiarysector:vanilla/leaves_birch", (TextureAtlasSprite)icon); + //Item + if (event.map.getTextureType() == 0) { + IIcon icon = new TextureSeason("sextiarysector:vanilla/leaves_birch"); + event.map.setTextureEntry("sextiarysector:vanilla/leaves_birch", (TextureAtlasSprite) icon); try { Field f; - BlockLeaves birch = (BlockLeaves) Blocks.leaves; - Class c = BlockLeaves.class; + BlockLeaves birch = Blocks.leaves; + Class c = BlockLeaves.class; f = c.getDeclaredField("field_150129_M"); f.setAccessible(true); - IIcon[] a = (IIcon[])Array.get(f.get(birch), 0); + IIcon[] a = (IIcon[]) Array.get(f.get(birch), 0); - Array.set(a, 2, icon); + Array.set(a, 2, icon); - //System.out.println("AAAAA"); + //System.out.println("AAAAA"); } catch (SecurityException e) { e.printStackTrace(); @@ -209,161 +201,150 @@ public void preVanillaTextureStitchEvent(TextureStitchEvent.Pre event){ e.printStackTrace(); } + } + } - } - - } + //車軸の線の描写 + @SubscribeEvent + public void onDrawBlockHighlight(DrawBlockHighlightEvent event) { + EntityPlayer player = event.player; + ItemStack itemstack = event.currentItem; + MovingObjectPosition target = event.target; + if (player == null) + { + return; + } - //車軸の線の描写 - @SubscribeEvent - public void onDrawBlockHighlight(DrawBlockHighlightEvent event) { + //if(itemstack == null) + //{ + // return; + // } - EntityPlayer player = event.player; - ItemStack itemstack = event.currentItem; - MovingObjectPosition target = event.target; + if (EntityPlayerManager.getCustomPlayerData(player).getEquipmentStats().inventory.getStackInSlot(EquipmentType.Face.getSlot()[0]) == null) { + return; + } - if(player == null) - { - return; - } + if (!(EntityPlayerManager.getCustomPlayerData(player).getEquipmentStats().inventory.getStackInSlot(EquipmentType.Face.getSlot()[0]).getItem() instanceof IGearForceGridItem)) + { + return; + } + if (target.typeOfHit != MovingObjectType.BLOCK) + { + return; + } + // + if (!(player.worldObj.getTileEntity(target.blockX, target.blockY, target.blockZ) instanceof IGearForceGrid)) { + return; + } - //if(itemstack == null) - //{ - // return; - // } + double x = target.blockX; + double y = target.blockY; + double z = target.blockZ; - if(EntityPlayerManager.getCustomPlayerData(player).getEquipmentStats().inventory.getStackInSlot(EquipmentType.Face.getSlot()[0]) == null){ - return; - } - - if(!(EntityPlayerManager.getCustomPlayerData(player).getEquipmentStats().inventory.getStackInSlot(EquipmentType.Face.getSlot()[0]).getItem() instanceof IGearForceGridItem)) - { - return; - } - - if(target.typeOfHit != MovingObjectType.BLOCK) - { - return; - } -// - if(!(player.worldObj.getTileEntity(target.blockX, target.blockY, target.blockZ) instanceof IGearForceGrid)){ - return; - } - - - double x = target.blockX; - double y = target.blockY; - double z = target.blockZ; - - IGearForceGrid tileEntity = (IGearForceGrid)player.worldObj.getTileEntity(target.blockX, target.blockY, target.blockZ); + IGearForceGrid tileEntity = (IGearForceGrid) player.worldObj.getTileEntity(target.blockX, target.blockY, target.blockZ); //if(tileEntity==null){ // return ; //}/ GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - //GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); - GL11.glLineWidth(2.0F); - GL11.glDisable(GL11.GL_TEXTURE_2D); - GL11.glDepthMask(false); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + //GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + GL11.glLineWidth(2.0F); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDepthMask(false); double d0 = player.lastTickPosX + (player.posX - player.lastTickPosX) * event.partialTicks; - double d1 = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks; - double d2 = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks; - - float f1 = 0.002F; + double d1 = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks; + double d2 = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks; - for(ForgeDirection d:ForgeDirection.VALID_DIRECTIONS){ - if(tileEntity.canIn(d)){ - this.drawInFromDirection((int)x, (int)y, (int)z, d0, d1, d2, d); - } - } - - GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); - - for(ForgeDirection d:ForgeDirection.VALID_DIRECTIONS){ - if(tileEntity.canOut(d)){ - this.drawOutFromDirection((int)x, (int)y, (int)z, d0, d1, d2, d); - } - } + float f1 = 0.002F; + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + if (tileEntity.canIn(d)) { + this.drawInFromDirection((int) x, (int) y, (int) z, d0, d1, d2, d); + } + } + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); - GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + if (tileEntity.canOut(d)) { + this.drawOutFromDirection((int) x, (int) y, (int) z, d0, d1, d2, d); + } + } - GL11.glDepthMask(true); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glDisable(GL11.GL_BLEND); + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + GL11.glDepthMask(true); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_BLEND); - } + } - private void drawOutFromDirection(int x, int y, int z, double d0, double d1, double d2, ForgeDirection d){ + private void drawOutFromDirection(int x, int y, int z, double d0, double d1, double d2, ForgeDirection d) { - float f1 = 0.002F; + float f1 = 0.002F; - GL11.glColor4f(1.0F, 0.0F, 0.0F, 0.8F); - double x1 = x + d.offsetX; + GL11.glColor4f(1.0F, 0.0F, 0.0F, 0.8F); + double x1 = x + d.offsetX; double y1 = y + d.offsetY; double z1 = z + d.offsetZ; - AxisAlignedBB axisAlignedBB = AxisAlignedBB.getBoundingBox(x1, y1, z1, x1 + 1.0D, y1 + 1.0D, z1 + 1.0D); - axisAlignedBB = axisAlignedBB.expand(f1, f1, f1).getOffsetBoundingBox(-d0, -d1, -d2); - this.drawOutlinedBoundingBox(axisAlignedBB); + AxisAlignedBB axisAlignedBB = AxisAlignedBB.getBoundingBox(x1, y1, z1, x1 + 1.0D, y1 + 1.0D, z1 + 1.0D); + axisAlignedBB = axisAlignedBB.expand(f1, f1, f1).getOffsetBoundingBox(-d0, -d1, -d2); + this.drawOutlinedBoundingBox(axisAlignedBB); - GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); - } + } - private void drawInFromDirection(int x, int y, int z, double d0, double d1, double d2, ForgeDirection d){ + private void drawInFromDirection(int x, int y, int z, double d0, double d1, double d2, ForgeDirection d) { - float f1 = 0.002F; + float f1 = 0.002F; - GL11.glColor4f(0.0F, 1.0F, 0.0F, 0.7F); - double x2 = x + d.offsetX; + GL11.glColor4f(0.0F, 1.0F, 0.0F, 0.7F); + double x2 = x + d.offsetX; double y2 = y + d.offsetY; double z2 = z + d.offsetZ; - AxisAlignedBB axisAlignedBB2 = AxisAlignedBB.getBoundingBox(x2, y2, z2, x2 + 1.0D, y2 + 1.0D, z2 + 1.0D); - axisAlignedBB2 = axisAlignedBB2.expand(f1, f1, f1).getOffsetBoundingBox(-d0, -d1, -d2); - this.drawOutlinedBoundingBox(axisAlignedBB2); - - GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); - - } - - - private void drawOutlinedBoundingBox(AxisAlignedBB par1AxisAlignedBB) - { - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawing(3); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); - tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); - tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); - tessellator.draw(); - tessellator.startDrawing(3); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); - tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); - tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); - tessellator.draw(); - tessellator.startDrawing(1); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); - tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); - tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); - tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); - tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); - tessellator.draw(); - } - + AxisAlignedBB axisAlignedBB2 = AxisAlignedBB.getBoundingBox(x2, y2, z2, x2 + 1.0D, y2 + 1.0D, z2 + 1.0D); + axisAlignedBB2 = axisAlignedBB2.expand(f1, f1, f1).getOffsetBoundingBox(-d0, -d1, -d2); + this.drawOutlinedBoundingBox(axisAlignedBB2); + + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); + + } + + private void drawOutlinedBoundingBox(AxisAlignedBB par1AxisAlignedBB) + { + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawing(3); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); + tessellator.draw(); + tessellator.startDrawing(3); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); + tessellator.draw(); + tessellator.startDrawing(1); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); + tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ); + tessellator.draw(); + } } diff --git a/src/main/java/shift/sextiarysector/event/HUDEventHandler.java b/src/main/java/shift/sextiarysector/event/HUDEventHandler.java index 2928aa2..5e99a29 100644 --- a/src/main/java/shift/sextiarysector/event/HUDEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/HUDEventHandler.java @@ -9,6 +9,7 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.GuiIngameForge; import net.minecraftforge.client.event.RenderGameOverlayEvent; +import shift.mceconomy2.gui.HUDMP; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.player.MoistureStats; import cpw.mods.fml.client.FMLClientHandler; @@ -18,87 +19,90 @@ public class HUDEventHandler { public static final ResourceLocation icons = new ResourceLocation("sextiarysector:textures/guis/icons.png"); - public static int left_height = 39; - public static int right_height = 39; + public static int left_height = 39; + public static int right_height = 39; - protected final Random rand = new Random(); + protected final Random rand = new Random(); - public static boolean visibleStamina = false; - public static boolean visibleMoisture = false; + public static boolean visibleStamina = false; + public static boolean visibleMoisture = false; //private boolean ARMOR = false; - public static Minecraft mc = FMLClientHandler.instance().getClient(); + public static Minecraft mc = FMLClientHandler.instance().getClient(); - //描写のEvent - @SubscribeEvent - public void onRenderGameOverlayEventPre(RenderGameOverlayEvent.Pre event) { + public static boolean isPM = false; - int width = event.resolution.getScaledWidth(); - int height = event.resolution.getScaledHeight(); + //描写のEvent + @SubscribeEvent + public void onRenderGameOverlayEventPre(RenderGameOverlayEvent.Pre event) { - /*if(event.type == ElementType.FOOD && mc.playerController.shouldDrawHUD()){ - renderMoisture( width, height); + int width = event.resolution.getScaledWidth(); + int height = event.resolution.getScaledHeight(); - renderStamina( width, height); + /*if(event.type == ElementType.FOOD && mc.playerController.shouldDrawHUD()){ + renderMoisture( width, height); - //renderSeason( width, height); + renderStamina( width, height); - }*/ + //renderSeason( width, height); - /* - if(event.type == ElementType.ARMOR&&ForgeHooks.getTotalArmorValue(mc.thePlayer)>0){ - //System.out.println("AIR"); + }*/ - if(!ARMOR){ + /* + if(event.type == ElementType.ARMOR&&ForgeHooks.getTotalArmorValue(mc.thePlayer)>0){ + //System.out.println("AIR"); - GuiIngameForge.left_height+=(left_height-29); + if(!ARMOR){ - ARMOR =false; - }else{ - GuiIngameForge.left_height-=(left_height-29); - ARMOR =true; - } - }*/ + GuiIngameForge.left_height+=(left_height-29); + ARMOR =false; + }else{ + GuiIngameForge.left_height-=(left_height-29); + ARMOR =true; + } + }*/ - if (event.type == RenderGameOverlayEvent.ElementType.ALL) - { - visibleStamina = GuiIngameForge.renderFood | GuiIngameForge.renderHealthMount | GuiIngameForge.renderHealth; - visibleMoisture = GuiIngameForge.renderFood | GuiIngameForge.renderHealthMount | GuiIngameForge.renderHealth; - } - else if (event.type == RenderGameOverlayEvent.ElementType.ARMOR) - { - if (visibleStamina) - { - renderStamina(width, height); - visibleStamina = false; - } - } - else if ((event.type == RenderGameOverlayEvent.ElementType.HOTBAR) && (mc.playerController.shouldDrawHUD())) - { - if (visibleMoisture) - { - renderMoisture(width, height); - visibleMoisture = false; - } - if (visibleStamina) - { - renderStamina(width, height); - visibleStamina = false; - } - } + if (event.type == RenderGameOverlayEvent.ElementType.ALL) + { + visibleStamina = GuiIngameForge.renderFood | GuiIngameForge.renderHealthMount | GuiIngameForge.renderHealth; + visibleMoisture = GuiIngameForge.renderFood | GuiIngameForge.renderHealthMount | GuiIngameForge.renderHealth; + } + else if (event.type == RenderGameOverlayEvent.ElementType.ARMOR) + { + if (visibleStamina) + { + renderStamina(width, height); + visibleStamina = false; + } + } + else if ((event.type == RenderGameOverlayEvent.ElementType.HOTBAR) && (mc.playerController.shouldDrawHUD())) + { + if (visibleMoisture) + { + renderMoisture(width, height); + visibleMoisture = false; + } + if (visibleStamina) + { + renderStamina(width, height); + visibleStamina = false; + } + } + HUDMP.isRenderer = false; + isPM = true; - } + } - @SubscribeEvent - public void onRenderGameOverlayEventPost(RenderGameOverlayEvent.Post event) { + @SubscribeEvent + public void onRenderGameOverlayEventPost(RenderGameOverlayEvent.Post event) { - int width = event.resolution.getScaledWidth(); - int height = event.resolution.getScaledHeight(); + int width = event.resolution.getScaledWidth(); + int height = event.resolution.getScaledHeight(); - if ((event.type == RenderGameOverlayEvent.ElementType.FOOD) || (event.type == RenderGameOverlayEvent.ElementType.HEALTHMOUNT)) - { + if ((event.type == RenderGameOverlayEvent.ElementType.FOOD) || (event.type == RenderGameOverlayEvent.ElementType.HEALTHMOUNT)) + { if (visibleMoisture) { renderMoisture(width, height); visibleMoisture = false; @@ -107,188 +111,192 @@ public void onRenderGameOverlayEventPost(RenderGameOverlayEvent.Post event) { renderStamina(width, height); visibleStamina = false; } - } - } + if (isPM) { + HUDMP.renderMoney(width, height); + HUDMP.renderAddMoney(width, height); + isPM = false; + HUDMP.isRenderer = false; + } + + } - //アイテムテキストずらし - //@SubscribeEvent - //public void onRenderGameOverlayEventPost(RenderGameOverlayEvent.Post event) { + } - /*if(event.type == ElementType.EXPERIENCE||event.type == ElementType.JUMPBAR){ + //アイテムテキストずらし + //@SubscribeEvent + //public void onRenderGameOverlayEventPost(RenderGameOverlayEvent.Post event) { - }*/ + /*if(event.type == ElementType.EXPERIENCE||event.type == ElementType.JUMPBAR){ - //} + }*/ + //} - protected void renderMoisture(int width, int height) - { + protected void renderMoisture(int width, int height) + { - if(!visibleMoisture) return; - visibleMoisture = false; + if (!visibleMoisture) return; + visibleMoisture = false; - //mc.thePlayer.addStat(StatList.distanceByBoatStat, 2); + //mc.thePlayer.addStat(StatList.distanceByBoatStat, 2); //System.out.println("StatList"); - mc.mcProfiler.startSection("moisture"); + mc.mcProfiler.startSection("moisture"); - bind(icons); + bind(icons); - int updateCounter = mc.ingameGUI.getUpdateCounter()+2; + int updateCounter = mc.ingameGUI.getUpdateCounter() + 2; - int left = width / 2 + 91; - //int top = height - right_height -10; - int top = height - GuiIngameForge.right_height; + int left = width / 2 + 91; + //int top = height - right_height -10; + int top = height - GuiIngameForge.right_height; - GuiIngameForge.right_height += 10; - //right_height += 10; - boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic + GuiIngameForge.right_height += 10; + //right_height += 10; + boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic + MoistureStats stats = EntityPlayerManager.getMoistureStats(mc.thePlayer); + int level = EntityPlayerManager.getPrevMoistureLevel(mc.thePlayer); + //int levelLast = stats.getPrevFoodLevel(); + //System.out.println("BBB "+level+" : "+stats.getMoistureLevel()+" : "+stats.getSaturationLevel()); - MoistureStats stats = EntityPlayerManager.getMoistureStats(mc.thePlayer); - int level = EntityPlayerManager.getPrevMoistureLevel(mc.thePlayer); - //int levelLast = stats.getPrevFoodLevel(); + for (int i = 0; i < 10; ++i) + { + int idx = i * 2 + 1; + int x = left - i * 8 - 9; + int y = top; + int icon = 0; + byte backgound = 0; - //System.out.println("BBB "+level+" : "+stats.getMoistureLevel()+" : "+stats.getSaturationLevel()); + int iconY = 0; + int iconX = 0; - for (int i = 0; i < 10; ++i) - { - int idx = i * 2 + 1; - int x = left - i * 8 - 9; - int y = top; - int icon = 0; - byte backgound = 0; + if (mc.thePlayer.isPotionActive(Potion.hunger)) + { + iconX += 27; + backgound = 3; + } - int iconY = 0; - int iconX = 0; + if (unused) backgound = 1; //Probably should be a += 1 but vanilla never uses this - if (mc.thePlayer.isPotionActive(Potion.hunger)) - { - iconX += 27; - backgound = 3; - } + if (stats.getSaturationLevel() <= 0.0F && updateCounter % (level * 3 + 1) == 0) + { + y = top + (rand.nextInt(3) - 1); + } + + drawTexturedModalRect(x, y, iconX, iconY, 9, 9); + + /* + if (unused) + { + if (idx < levelLast) + drawTexturedModalRect(x, y, icon , iconY, 9, 9); + else if (idx == levelLast) + drawTexturedModalRect(x, y, icon + 9, iconY, 9, 9); + }*/ + + if (idx < level) { + drawTexturedModalRect(x, y, iconX + 9, iconY, 9, 9); + } else if (idx == level) { + drawTexturedModalRect(x, y, iconX + 18, iconY, 9, 9); + } + } + + mc.mcProfiler.endSection(); + bind(Gui.icons); + + } + + protected void renderStamina(int width, int height) + { + + if (!visibleStamina) return; + visibleStamina = false; - if (unused) backgound = 1; //Probably should be a += 1 but vanilla never uses this + mc.mcProfiler.startSection("stamina"); - if (stats.getSaturationLevel() <= 0.0F && updateCounter % (level * 3 + 1) == 0) - { - y = top + (rand.nextInt(3) - 1); - } + bind(icons); - drawTexturedModalRect(x, y, iconX , iconY, 9, 9); + int updateCounter = mc.ingameGUI.getUpdateCounter() + 1; - /* - if (unused) - { - if (idx < levelLast) - drawTexturedModalRect(x, y, icon , iconY, 9, 9); - else if (idx == levelLast) - drawTexturedModalRect(x, y, icon + 9, iconY, 9, 9); - }*/ + int left = width / 2 - 82; + int top = height - GuiIngameForge.left_height;//left_height -10; + GuiIngameForge.left_height += 10; + //right_height += 10; + boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic + + int level = EntityPlayerManager.getPrevStaminaLevel(mc.thePlayer); + + for (int i = 0; i < 10; ++i) + { + int idx = i * 2 + 1; + int x = left + i * 8 - 9; + int y = top; + int icon = 0; + byte backgound = 0; + + int iconY = 9; + int iconX = 0; + + /* + if (mc.thePlayer.isPotionActive(Potion.hunger)) + { + icon += 36; + backgound = 13; + }*/ + if (unused) backgound = 1; //Probably should be a += 1 but vanilla never uses this + + /* + if (mc.thePlayer.getFoodStats().getSaturationLevel() <= 0.0F && updateCounter % (level * 3 + 1) == 0) + { + y = top + (rand.nextInt(3) - 1); + } + */ + + drawTexturedModalRect(x, y, icon + backgound * 9, iconY, 9, 9); + + /* + if (unused) + { + if (idx < levelLast) + drawTexturedModalRect(x, y, icon , iconY, 9, 9); + else if (idx == levelLast) + drawTexturedModalRect(x, y, icon + 9, iconY, 9, 9); + }*/ + + if (idx < level) { + drawTexturedModalRect(x, y, icon + 9, iconY, 9, 9); + } else if (idx == level) { + drawTexturedModalRect(x, y, icon + 18, iconY, 9, 9); + } + } - if (idx < level){ - drawTexturedModalRect(x, y, iconX +9, iconY, 9, 9); - }else if (idx == level){ - drawTexturedModalRect(x, y, iconX +18, iconY, 9, 9); - } - } - - mc.mcProfiler.endSection(); - bind(Gui.icons); - - } - - protected void renderStamina(int width, int height) - { - - if(!visibleStamina) return; - visibleStamina = false; - - mc.mcProfiler.startSection("stamina"); - - bind(icons); - - int updateCounter = mc.ingameGUI.getUpdateCounter()+1; - - int left = width / 2 - 82; - int top = height - GuiIngameForge.left_height;//left_height -10; - GuiIngameForge.left_height += 10; - //right_height += 10; - boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic - - - int level = EntityPlayerManager.getPrevStaminaLevel(mc.thePlayer); - - for (int i = 0; i < 10; ++i) - { - int idx = i * 2 + 1; - int x = left + i * 8 - 9; - int y = top; - int icon = 0; - byte backgound = 0; - - int iconY = 9; - int iconX = 0; - - /* - if (mc.thePlayer.isPotionActive(Potion.hunger)) - { - icon += 36; - backgound = 13; - }*/ - if (unused) backgound = 1; //Probably should be a += 1 but vanilla never uses this - - /* - if (mc.thePlayer.getFoodStats().getSaturationLevel() <= 0.0F && updateCounter % (level * 3 + 1) == 0) - { - y = top + (rand.nextInt(3) - 1); - } - */ - - drawTexturedModalRect(x, y, icon + backgound * 9, iconY, 9, 9); - - /* - if (unused) - { - if (idx < levelLast) - drawTexturedModalRect(x, y, icon , iconY, 9, 9); - else if (idx == levelLast) - drawTexturedModalRect(x, y, icon + 9, iconY, 9, 9); - }*/ - - if (idx < level){ - drawTexturedModalRect(x, y, icon +9, iconY, 9, 9); - }else if (idx == level){ - drawTexturedModalRect(x, y, icon +18, iconY, 9, 9); - } - } - - mc.mcProfiler.endSection(); - bind(Gui.icons); - - } - - private void bind(ResourceLocation res) - { - FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); - } - - /** 描写位でのX Y テクスチャでのX Y 大きさ X Y */ - public void drawTexturedModalRect(int par1, int par2, int par3, int par4, int par5, int par6) - { - float zLevel = -90.0F; - - float f = 0.00390625F; - float f1 = 0.00390625F; - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.addVertexWithUV((par1 + 0), (par2 + par6), zLevel, ((par3 + 0) * f), ((par4 + par6) * f1)); - tessellator.addVertexWithUV((par1 + par5), (par2 + par6), zLevel, ((par3 + par5) * f), ((par4 + par6) * f1)); - tessellator.addVertexWithUV((par1 + par5), (par2 + 0), zLevel, ((par3 + par5) * f), ((par4 + 0) * f1)); - tessellator.addVertexWithUV((par1 + 0), (par2 + 0), zLevel, ((par3 + 0) * f), ((par4 + 0) * f1)); - tessellator.draw(); - } + mc.mcProfiler.endSection(); + bind(Gui.icons); + + } + + private void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } + + /** 描写位でのX Y テクスチャでのX Y 大きさ X Y */ + public void drawTexturedModalRect(int par1, int par2, int par3, int par4, int par5, int par6) + { + float zLevel = -90.0F; + + float f = 0.00390625F; + float f1 = 0.00390625F; + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawingQuads(); + tessellator.addVertexWithUV((par1 + 0), (par2 + par6), zLevel, ((par3 + 0) * f), ((par4 + par6) * f1)); + tessellator.addVertexWithUV((par1 + par5), (par2 + par6), zLevel, ((par3 + par5) * f), ((par4 + par6) * f1)); + tessellator.addVertexWithUV((par1 + par5), (par2 + 0), zLevel, ((par3 + par5) * f), ((par4 + 0) * f1)); + tessellator.addVertexWithUV((par1 + 0), (par2 + 0), zLevel, ((par3 + 0) * f), ((par4 + 0) * f1)); + tessellator.draw(); + } } diff --git a/src/main/java/shift/sextiarysector/item/ItemShopRing.java b/src/main/java/shift/sextiarysector/item/ItemShopRing.java index 2390105..500d43f 100644 --- a/src/main/java/shift/sextiarysector/item/ItemShopRing.java +++ b/src/main/java/shift/sextiarysector/item/ItemShopRing.java @@ -17,13 +17,16 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ItemShopRing extends Item implements IEquipment , ISSEquipment{ +public class ItemShopRing extends Item implements IEquipment, ISSEquipment { private SSProductList list; private SSProductList[] sList; public AbstractTab tab; - public ItemShopRing(){ + @SideOnly(Side.CLIENT) + public boolean isRing = false; + + public ItemShopRing() { this.setMaxStackSize(1); this.setCreativeTab(SextiarySectorAPI.TabSSEconomy); MinecraftForge.EVENT_BUS.register(this); @@ -31,7 +34,7 @@ public ItemShopRing(){ public SSProductList getList(World world) { - if(world==null||sList==null)return this.getList(); + if (world == null || sList == null) return this.getList(); return sList[SeasonAPI.getSeason(world).ordinal()]; } @@ -54,25 +57,28 @@ public void setTab(AbstractTab tab) { } @SideOnly(Side.CLIENT) - @SubscribeEvent - public void onOpenShopGuiEvent(shift.mceconomy2.api.shop.OpenShopGuiEvent event) { + @SubscribeEvent + public void onOpenShopGuiEvent(shift.mceconomy2.api.shop.OpenShopGuiEvent event) { - if(!isShop(event.shopID))return; + //if(!isShop(event.shopID))return; + if (!this.isRing) return; + + this.isRing = false; int xSize = 176; - int ySize = 166; + int ySize = 166; int guiLeft = (event.gui.width - xSize) / 2; - int guiTop = (event.gui.height - ySize) / 2; + int guiTop = (event.gui.height - ySize) / 2; - TabManager.updateTabValues(guiLeft, guiTop,event.buttonList, tab,false); + TabManager.updateTabValues(guiLeft, guiTop, event.buttonList, tab, false); - } + } - private boolean isShop(int id){ + private boolean isShop(int id) { - if(sList!=null){ - for(SSProductList l:sList){ - if(l.id==id)return true; + if (sList != null) { + for (SSProductList l : sList) { + if (l.id == id) return true; } } @@ -81,22 +87,23 @@ private boolean isShop(int id){ } @Override - public String getTabName(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + public String getTabName(EquipmentType equipment, ItemStack stack, EntityPlayer player) { return this.getUnlocalizedName(); } @Override - public boolean shouldAddToList(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + public boolean shouldAddToList(EquipmentType equipment, ItemStack stack, EntityPlayer player) { return true; } @Override - public void onTabClicked(EquipmentType equipment, ItemStack stack,EntityPlayer player) { - MCEconomyAPI.openShopGui(this.getList(player.worldObj).id, player, player.worldObj, (int)player.posX, (int)player.posY, (int)player.posZ); + public void onTabClicked(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + this.isRing = true; + MCEconomyAPI.openShopGui(this.getList(player.worldObj).id, player, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); } @Override - public boolean canTakeStack(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + public boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player) { return equipment.equals(EquipmentType.Ring); } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java b/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java index 5bdd94b..c7b5fc4 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginCleaver.java @@ -5,8 +5,12 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; +import shift.mceconomy2.api.shop.ProductItem; import shift.sextiarysector.SSFluids; +import shift.sextiarysector.SSItems; import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.SSShops; +import shift.sextiarysector.item.ItemFigureBox; import shift.sextiarysector.module.ModuleFigure; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; @@ -51,6 +55,10 @@ public void postPlugin(FMLPostInitializationEvent event) { ModuleFigure.addFigure("schr0_cleaver", new ItemStack(itemCleaverSoul, 1), 20); ModuleFigure.addFigure("schr0_cleaver", new ItemStack(itemCleaverOgre, 1), 20); + for (int i = 0; i < 4; i++) { + SSShops.creepers[i].addItemProduct(new ProductItem(((ItemFigureBox) SSItems.figureBox).getEditionFigureBox("schr0_cleaver"), 500)); + } + } @Override diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFunnel.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFunnel.java index 4093734..047cd3f 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFunnel.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFunnel.java @@ -70,6 +70,7 @@ private void updateServerEntity() { this.getUPFluidEntity(); this.addFluidBlock(); + this.getUPFluidBlock(); } @@ -91,6 +92,33 @@ private void addFluidBlock() { } + private void getUPFluidBlock() { + + TileEntity t = this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); + + if (!(t instanceof IFluidHandler)) return; + + IFluidHandler f = (IFluidHandler) t; + + if (this.tank.getFluid() == null) { + + if (f.getTankInfo(ForgeDirection.UP.getOpposite()) != null && f.getTankInfo(ForgeDirection.UP.getOpposite())[0].fluid != null && f.canDrain(ForgeDirection.UP.getOpposite(), f.getTankInfo(ForgeDirection.UP.getOpposite())[0].fluid.getFluid())) { + + FluidStack fs = f.drain(ForgeDirection.UP.getOpposite(), 50, true); + this.tank.fill(fs, true); + } + + } else if (f.canDrain(ForgeDirection.UP.getOpposite(), this.tank.getFluid().getFluid())) { + FluidStack fs = f.drain(ForgeDirection.UP.getOpposite(), 50, false); + + int fill = this.tank.fill(fs, true); + + f.drain(ForgeDirection.UP.getOpposite(), fill, true); + + } + + } + private void getUPFluidEntity() { //if (this.tank.getFluidAmount() == 0) return; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityTank.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityTank.java index 126f998..228c713 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityTank.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityTank.java @@ -39,9 +39,9 @@ public void updateClientEntity() private void updateServerEntity() { - if (this.tank.getFluidAmount() * (0.01f) != lastAmount) { + if (this.tank.getFluidAmount() * (0.1f) != lastAmount) { //System.out.println(this.tank.getFluidAmount()); - lastAmount = (int) (this.tank.getFluidAmount() * (0.01f)); + lastAmount = (int) (this.tank.getFluidAmount() * (0.1f)); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 2d869a8..a542602 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -369,8 +369,9 @@ gui.ss.gf_tank_3=Steel GF Tank gui.ss.gf_tank_4=Ninja GF Tank gui.ss.gf_tank_5=Orichalcum GF Tank +#Shop shop.ss.creeper=Simple Creeper Shop -shop.ss.robot=Blue Robot Shop +shop.ss.robot=Red Robot Shop #ToolTip tooltip.season.pm=PM @@ -438,6 +439,18 @@ achievement.ss.craft_furnace=Craft Furnace achievement.ss.craft_furnace.desc=Craft a large furnace achievement.ss.craft_furnace.desc2=Complex craft +achievement.ss.hammer=Hammer ! +achievement.ss.hammer.desc=Craft a large hammer +achievement.ss.hammer.desc2=invincible ? + +achievement.ss.fluid_furnace=Melted +achievement.ss.fluid_furnace.desc=Craft a fluid furnace +achievement.ss.fluid_furnace.desc2=It melts in touch + +achievement.ss.freezer=Latest refrigerator +achievement.ss.freezer.desc=Craft a freezer +achievement.ss.freezer.desc2=It's ... + achievement.ss.agriculture=SS2 -Agriculture- @@ -514,6 +527,18 @@ achievement.ss.bluestone_dust=Color is different ! achievement.ss.bluestone_dust.desc=Pickup a bluestone dust achievement.ss.bluestone_dust.desc2=Beautiful ! +achievement.ss.copper_ore=New ore +achievement.ss.copper_ore.desc=Pickup a copper ore +achievement.ss.copper_ore.desc2=Three + +achievement.ss.silver_ore=Assassination prevention +achievement.ss.silver_ore.desc=Pickup a silver ore +achievement.ss.silver_ore.desc2=Photo ? + +achievement.ss.mithril_ore=Beginning of the magic +achievement.ss.mithril_ore.desc=Pickup a mithril ore +achievement.ss.mithril_ore.desc2=Ring ? + achievement.ss.industry=SS2 -Industry- achievement.ss.bluestone_slime_ball=Mysterious slime @@ -603,7 +628,7 @@ achievement.ss.creeper_chest.desc2=Santa Creeper ? achievement.ss.shipping=Shipping Block achievement.ss.shipping.desc=Trying to shipment -achievement.ss.shipping.desc=I'm millionaire ! +achievement.ss.shipping.desc2=I'm millionaire ! #NEI nei.recipe=Recipes diff --git a/src/main/resources/assets/sextiarysector/textures/models/monitor_robot.png b/src/main/resources/assets/sextiarysector/textures/models/monitor_robot.png index 26ed1349292c639190a66cd11b29e8cdcd0688fd..4d2e478ce205cf3e05538c0ad754c64e7e34719a 100644 GIT binary patch delta 1812 zcmV+v2kZEu4yz83EPq7+MMJ=b#{d8T32;bRa{vGi!vFvd!vV){sAK>D00(qQO+^Ra z0|f*p8Rlg?!2kdTxJg7oRCwC$noVzANfCyh>TAc25h5Nb8JK)1iv%gsup?N+(jBDO zOZX4bumOqRkOe!0*dqP_+bq~+Nd&7I8)veB4dVnw77>w!e19hy$ET}U^!JHD@yE3t zbV|CqeNLZa->QDA>aFe)4k&k)mkqOUVMZKbmPhq8#3#yp^`7NfEMBawtqCV6GY5X7 zQp7}}G6sY(B1Iv|`e*s-hkt_|U>2B%^MAS-X9UDJX*sw7l2QgDhM6I86;(i@frMm; zVlxANvhZ`Z{(rs2_3vC~c6OErJfH%~iHke1{`rSm1q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d^wwQjAb_e6Cj4d8t#T6$c+E^>s*#!4OerKamty&9n3kutSv@Pi+IAXDhsV^-=Klv6UbQdxe4UEmiT&bSMS%N_$yPmMbycsXk=fob zce-rZ*zpbRA!um`uTO%ie`d5fI~vHMmFjm|bSrZKYXV}Q_%y$)?L-$1QU8>! s2N`6LK?WIQkU<6+WRO7yd0XT^(Y+t4&=S}A00000NkvXXt^-0~f}y8*l>h($ From 88b0ef845a7f1affee008e65ab78ef069add3964 Mon Sep 17 00:00:00 2001 From: shift02 Date: Thu, 12 Mar 2015 16:48:37 +0900 Subject: [PATCH 72/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E6=A4=8E?= =?UTF-8?q?=E8=8C=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 4 +- .../shift/sextiarysector/SSAchievement.java | 5 + .../java/shift/sextiarysector/SSBlocks.java | 11 +- .../java/shift/sextiarysector/SSFluids.java | 4 +- .../java/shift/sextiarysector/SSItems.java | 6 + .../java/shift/sextiarysector/SSShops.java | 5 + .../block/BlockSeasonFluid.java | 96 +++++++++++++ .../sextiarysector/item/ItemBlockFigure.java | 47 ++++--- .../sextiarysector/item/ItemShopRing.java | 2 +- .../module/ModuleStatistics.java | 128 +++++++++--------- .../sextiarysector/plugin/PluginMaid.java | 38 ++++++ .../shift/sextiarysector/potion/PotionSS.java | 9 ++ .../assets/sextiarysector/lang/en_US.lang | 7 + .../textures/blocks/crop/shiitake_stage_0.png | Bin 0 -> 195 bytes .../textures/blocks/crop/shiitake_stage_1.png | Bin 0 -> 247 bytes .../textures/blocks/crop/shiitake_stage_2.png | Bin 0 -> 310 bytes .../textures/blocks/crop/shiitake_stage_3.png | Bin 0 -> 337 bytes .../textures/items/food/mushroom/shiitake.png | Bin 0 -> 601 bytes .../textures/items/seed/shiitake_seed.png | Bin 0 -> 597 bytes src/main/resources/dependencies.info | 9 +- 20 files changed, 279 insertions(+), 92 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockSeasonFluid.java create mode 100644 src/main/java/shift/sextiarysector/plugin/PluginMaid.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/shiitake_stage_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/shiitake_stage_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/shiitake_stage_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/shiitake_stage_3.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/mushroom/shiitake.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/seed/shiitake_seed.png diff --git a/build.gradle b/build.gradle index 2e9a104..4e5eb92 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.7.b-${project.minecraft.version}" +version = "2.1.7.d-${project.minecraft.version}" minecraft { // replacing stuff in the source @@ -17,7 +17,7 @@ compile fileTree(dir: 'api', include: '*.jar') } //RpC̕R[hwJavão[WwB̏Ȃgradle2.0ł͓ȂB - [compileJava, compileTestJava,recompMinecraft, makeStart].each{ + [compileJava, compileTestJava,recompMinecraft].each{ it.options.encoding = 'UTF-8' it.options.compilerArgs += ['-source', '1.7', '-target', '1.7'] } diff --git a/src/main/java/shift/sextiarysector/SSAchievement.java b/src/main/java/shift/sextiarysector/SSAchievement.java index bf680c9..5c3dec8 100644 --- a/src/main/java/shift/sextiarysector/SSAchievement.java +++ b/src/main/java/shift/sextiarysector/SSAchievement.java @@ -65,6 +65,8 @@ public class SSAchievement { public static Achievement rice; + public static Achievement shiitake; + //Mining public static Achievement blueStoneDust; public static Achievement copperOre; @@ -148,6 +150,9 @@ public static void initAchievements() { int spring2 = 41; rice = new AchievementCrop("rice", -7, spring2, new ItemStack(SSItems.rice), SSBlocks.rice, seed, agriculture).registerStat(); + int spring3 = 46; + shiitake = new AchievementCrop("shiitake", -7, spring3, new ItemStack(SSItems.shiitake), SSBlocks.shiitake, seed, agriculture).registerStat(); + AchievementPage.registerAchievementPage(new AchievementPageAgriculture("achievement.ss.agriculture", agriculture)); //鉱業 diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 0af825f..4cb3b22 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -128,6 +128,8 @@ public class SSBlocks { public static Block drinkingWater; public static Block hotSprings; + public static Block season; + //GF public static Block woodShaft; public static Block stoneShaft; @@ -233,6 +235,7 @@ public class SSBlocks { public static Block rice; public static Block redMushroom; + public static Block shiitake; //水産 public static Block sandpit; @@ -269,7 +272,7 @@ public static void initBlicks() { freezer = new BlockFreezer().setBlockName("ss.freezer").setBlockTextureName("sextiarysector:ice/freezer").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(freezer, "Freezer"); - GameRegistry.registerTileEntity(TileEntityFreezer.class, "Freezer"); + GameRegistry.registerTileEntity(TileEntityFreezer.class, "SSFreezer"); //bottle = new BlockBottle().setBlockName("ss.bottle").setBlockTextureName("glass"); //GameRegistry.registerBlock(bottle,ItemBlockBottle.class, "Bottle"); @@ -349,6 +352,9 @@ public static void initBlicks() { hotSprings = new BlockHotSprings(SSFluids.hotSprings).setBlockName("ss.hot_springs").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(hotSprings, "HotSprings"); + //season = new BlockSeasonFluid(SSFluids.season).setBlockName("ss.season").setCreativeTab(SextiarySectorAPI.TabSSCore); + //GameRegistry.registerBlock(season, "Season"); + //鉱石 blueStoneOre = new BlockPowerStone().setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(blueStoneOre, "BlueStoneOre"); @@ -557,6 +563,9 @@ public static void initBlicks() { redMushroom = new BlockSSCrop(CropType.Close, new CropStatus(new int[] { 6, 8, 14 }, Season.SPRING, Season.SUMMER), wood, Item.getItemFromBlock(Blocks.red_mushroom), false).setBlockName("ss.mushroom_red").setBlockTextureName("mushroom_red"); GameRegistry.registerBlock(redMushroom, ItemBlockCrop.class, "BlockRedMushroom"); + shiitake = new BlockSSCrop(CropType.Close, new CropStatus(new int[] { 3, 5, 12 }, Season.SPRING), wood, SSItems.shiitake, false).setBlockName("ss.shiitake").setBlockTextureName("shiitake"); + GameRegistry.registerBlock(shiitake, ItemBlockCrop.class, "BlockShiitake"); + //水産 sandpit = new BlockSandpit().setBlockName("ss.sandpit").setBlockTextureName("sand"); GameRegistry.registerBlock(sandpit, "Sandpit"); diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index a4f90a4..7a91aad 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -17,6 +17,7 @@ public class SSFluids { public static Fluid hotSprings; public static Fluid steam; + public static Fluid season; public static Fluid sap; @@ -29,7 +30,8 @@ public static void initFluids() { drinkingWater = new SSFluid("DrinkingWater", 0, 0x87CEFA, 4, 1.0f).setUnlocalizedName("drinking_water"); hotSprings = new SSFluid("HotSprings", 0, 0xFFFFFF, 4, 1.0f).setUnlocalizedName("hot_springs"); - steam = new SSFluid("Steam", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("steam"); + steam = new SSFluid("Steam", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("steam").setGaseous(true); + //season = new SSFluid("season", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("season").setDensity(-10).setGaseous(true); sap = new SSFluid("Sap", 2, 0xFF7F50, 1, 1.0f).setUnlocalizedName("sap"); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 59cbb6b..f2b35e4 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -174,6 +174,7 @@ public class SSItems { //野菜 public static ArrayList farmlandCrops = new ArrayList(); public static ArrayList paddyCrops = new ArrayList(); + public static ArrayList woodCrops = new ArrayList(); public static Item turnip; public static Item cucumber; @@ -196,6 +197,8 @@ public class SSItems { public static Item rice; + public static Item shiitake; + //料理 public static Item whiteRice; @@ -529,6 +532,9 @@ public static void initItems() { rice = new ItemCrop(paddyCrops).setUnlocalizedName("ss.rice").setTextureName("sextiarysector:food/grain/rice").setCreativeTab(SextiarySectorAPI.TabSSAgriculture); GameRegistry.registerItem(rice, "Rice"); + shiitake = new ItemFoodCrop(woodCrops, 2, 1, 0, 0, 2, 0, false).setUnlocalizedName("ss.shiitake").setTextureName("sextiarysector:food/mushroom/shiitake"); + GameRegistry.registerItem(shiitake, "Shiitake"); + //料理 whiteRice = new Item().setUnlocalizedName("ss.white_rice").setTextureName("sextiarysector:food/grain/white_rice").setCreativeTab(SextiarySectorAPI.TabSSCooking); GameRegistry.registerItem(whiteRice, "WhiteRice"); diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index 5bdf2d0..95893fa 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -54,6 +54,7 @@ public static void initShops() { creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.cucumber, 1), 360)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.rice, 1), 280)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.shiitake, 1), 210)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.mithrilIngot, 1), 1400)); } @@ -183,6 +184,10 @@ public static void initPurchase() { MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.rice, 1, 1), 4000); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.shiitake), 310); + + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.shiitake, 1, 1), 3100); + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockSeasonFluid.java b/src/main/java/shift/sextiarysector/block/BlockSeasonFluid.java new file mode 100644 index 0000000..1ecded0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockSeasonFluid.java @@ -0,0 +1,96 @@ +package shift.sextiarysector.block; + +import java.util.Random; + +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; +import net.minecraft.block.material.MaterialTransparent; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.fluids.BlockFluidFinite; +import net.minecraftforge.fluids.Fluid; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockSeasonFluid extends BlockFluidFinite { + + public static final Material season = new SSMaterial(); + + public BlockSeasonFluid(Fluid fluid) { + super(fluid, season); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + if (p_149691_2_ == 0) { + return this.getFluid().getStillIcon(); + } else { + return this.getFluid().getFlowingIcon(); + } + } + + @Override + @SideOnly(Side.CLIENT) + public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) + { + return this.getFluid().getColor(); + } + + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) + { + + if (p_149734_5_.nextInt(12) == 0) + { + + float f = p_149734_2_ + 0.5F; + float f1 = p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; + float f2 = p_149734_4_ + 0.5F; + float f3 = 0.52F; + float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; + + p_149734_1_.spawnParticle("explode", f - f3, f1, f2 + f4, 0.0D, 0.05D, 0.0D); + + p_149734_1_.spawnParticle("explode", f + f3, f1, f2 + f4, 0.0D, 0.05D, 0.0D); + + p_149734_1_.spawnParticle("explode", f + f4, f1, f2 - f3, 0.0D, 0.05D, 0.0D); + + p_149734_1_.spawnParticle("explode", f + f4, f1, f2 + f3, 0.0D, 0.05D, 0.0D); + + } + } + + //Material + public static class SSMaterial extends MaterialTransparent { + + public SSMaterial() { + super(MapColor.airColor); + this.setNoPushMobility(); + } + + } + + /* + @Override + public boolean isAir(IBlockAccess world, int x, int y, int z) + { + return true;//getMaterial() == Material.air; + }*/ + + /* + @Override + public boolean isReplaceable(IBlockAccess world, int x, int y, int z) + { + return true;//blockMaterial.isReplaceable(); + } + + @Override + public boolean isBlockSolid(IBlockAccess p_149747_1_, int p_149747_2_, int p_149747_3_, int p_149747_4_, int p_149747_5_) + { + return false;//p_149747_1_.getBlock(p_149747_2_, p_149747_3_, p_149747_4_).getMaterial().isSolid(); + }*/ +} diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockFigure.java b/src/main/java/shift/sextiarysector/item/ItemBlockFigure.java index 5476e99..96af16e 100644 --- a/src/main/java/shift/sextiarysector/item/ItemBlockFigure.java +++ b/src/main/java/shift/sextiarysector/item/ItemBlockFigure.java @@ -10,10 +10,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; import shift.sextiarysector.block.BlockFigure; import shift.sextiarysector.tileentity.TileEntityFigure; -public class ItemBlockFigure extends ItemBlock{ +public class ItemBlockFigure extends ItemBlock { private static ItemStack fItem = new ItemStack(Blocks.dirt); @@ -23,41 +24,47 @@ public ItemBlockFigure(Block p_i45328_1_) { } @Override - public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) - { - boolean result = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ,metadata); + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) + { + boolean result = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata); - if(result && world.getTileEntity(x, y, z) instanceof TileEntityFigure){ - TileEntityFigure tile = (TileEntityFigure)world.getTileEntity(x, y, z); + if (result && world.getTileEntity(x, y, z) instanceof TileEntityFigure) { + TileEntityFigure tile = (TileEntityFigure) world.getTileEntity(x, y, z); tile.setFigure(BlockFigure.getFigureItem(stack)); tile.setEdition(BlockFigure.getEdition(stack)); } return result; - } + } @Override - public void addInformation(ItemStack itemstack,EntityPlayer par1EntityPlayer, List list , boolean flag) - { + public void addInformation(ItemStack itemstack, EntityPlayer par1EntityPlayer, List list, boolean flag) + { + try { - NBTTagCompound nbt = itemstack.stackTagCompound; + NBTTagCompound nbt = itemstack.stackTagCompound; - if(nbt == null) - { - return; - } + if (nbt == null) + { + return; + } - if(nbt.hasKey("figure")){ + if (nbt.hasKey("figure")) { - fItem.readFromNBT(nbt.getCompoundTag("figure")); - list.add(StatCollector.translateToLocal("tooltip.name") + " : " + fItem.getDisplayName()); - list.add(StatCollector.translateToLocal("tooltip.edition") + " : " + StatCollector.translateToLocal("edition."+BlockFigure.getEdition(itemstack))); + fItem.readFromNBT(nbt.getCompoundTag("figure")); + list.add(StatCollector.translateToLocal("tooltip.name") + " : " + fItem.getDisplayName()); + list.add(StatCollector.translateToLocal("tooltip.edition") + " : " + StatCollector.translateToLocal("edition." + BlockFigure.getEdition(itemstack))); - } + } + + } catch (Exception e) { + SextiarySector.Log.catching(e); - } + } + + } } diff --git a/src/main/java/shift/sextiarysector/item/ItemShopRing.java b/src/main/java/shift/sextiarysector/item/ItemShopRing.java index 500d43f..4b3ac2a 100644 --- a/src/main/java/shift/sextiarysector/item/ItemShopRing.java +++ b/src/main/java/shift/sextiarysector/item/ItemShopRing.java @@ -24,7 +24,7 @@ public class ItemShopRing extends Item implements IEquipment, ISSEquipment { public AbstractTab tab; @SideOnly(Side.CLIENT) - public boolean isRing = false; + public boolean isRing; public ItemShopRing() { this.setMaxStackSize(1); diff --git a/src/main/java/shift/sextiarysector/module/ModuleStatistics.java b/src/main/java/shift/sextiarysector/module/ModuleStatistics.java index 476da11..8aa4b8a 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleStatistics.java +++ b/src/main/java/shift/sextiarysector/module/ModuleStatistics.java @@ -18,7 +18,6 @@ public class ModuleStatistics implements IModule { - private static ModuleStatistics instance; public static StatBase[] objectSellStats = new StatBase[32000]; @@ -27,7 +26,7 @@ private ModuleStatistics() { } public static ModuleStatistics getInstance() { - if(instance==null){ + if (instance == null) { instance = new ModuleStatistics(); } return instance; @@ -37,11 +36,11 @@ public static ModuleStatistics getInstance() { public void preInit(FMLPreInitializationEvent event) { } - @Override public void load(FMLInitializationEvent event) { } + @Override public void postInit(FMLPostInitializationEvent event) { @@ -50,78 +49,81 @@ public void postInit(FMLPostInitializationEvent event) { } private static void initStats() - { - Iterator iterator = Item.itemRegistry.iterator(); + { + Iterator iterator = Item.itemRegistry.iterator(); - while (iterator.hasNext()) - { + while (iterator.hasNext()) + { - try{ + try { - Item item = (Item)iterator.next(); + Item item = (Item) iterator.next(); - if (item != null) - { - int i = Item.getIdFromItem(item); + if (item != null) + { + int i = Item.getIdFromItem(item); - objectSellStats[i] = (new StatCrafting("stat.sellItem." + i, new ChatComponentTranslation("stat.sellItem", new Object[] {(new ItemStack(item)).func_151000_E()}), item)).registerStat(); + objectSellStats[i] = (new StatCrafting("stat.sellItem." + i, new ChatComponentTranslation("stat.sellItem", new Object[] { (new ItemStack(item)).func_151000_E() }), item)).registerStat(); - if (!(item instanceof ItemBlock)) - { - StatList.itemStats.add((StatCrafting)objectSellStats[i]); - } + if (!(item instanceof ItemBlock)) + { + StatList.itemStats.add(objectSellStats[i]); + } - } + } + } catch (NullPointerException e) { + SextiarySector.Log.catching(e); + } catch (ArrayIndexOutOfBoundsException e) { + SextiarySector.Log.catching(e); + } catch (NoClassDefFoundError e) { + SextiarySector.Log.catching(e); + } catch (IndexOutOfBoundsException e) { + SextiarySector.Log.catching(e); + } catch (Exception e) { + SextiarySector.Log.info("(╹◡╹)「クラッシュをすちゃり」"); + SextiarySector.Log.catching(e); + } - }catch (NullPointerException e){ - SextiarySector.Log.catching(e); - }catch (ArrayIndexOutOfBoundsException e){ - SextiarySector.Log.catching(e); - }catch (NoClassDefFoundError e){ - SextiarySector.Log.catching(e); - } - - } + } - replaceAllSimilarBlocks(objectSellStats); - } + replaceAllSimilarBlocks(objectSellStats); + } private static void replaceAllSimilarBlocks(StatBase[] p_75924_0_) - { - func_151180_a(p_75924_0_, Blocks.water, Blocks.flowing_water); - func_151180_a(p_75924_0_, Blocks.lava, Blocks.flowing_lava); - func_151180_a(p_75924_0_, Blocks.lit_pumpkin, Blocks.pumpkin); - func_151180_a(p_75924_0_, Blocks.lit_furnace, Blocks.furnace); - func_151180_a(p_75924_0_, Blocks.lit_redstone_ore, Blocks.redstone_ore); - func_151180_a(p_75924_0_, Blocks.powered_repeater, Blocks.unpowered_repeater); - func_151180_a(p_75924_0_, Blocks.powered_comparator, Blocks.unpowered_comparator); - func_151180_a(p_75924_0_, Blocks.redstone_torch, Blocks.unlit_redstone_torch); - func_151180_a(p_75924_0_, Blocks.lit_redstone_lamp, Blocks.redstone_lamp); - func_151180_a(p_75924_0_, Blocks.red_mushroom, Blocks.brown_mushroom); - func_151180_a(p_75924_0_, Blocks.double_stone_slab, Blocks.stone_slab); - func_151180_a(p_75924_0_, Blocks.double_wooden_slab, Blocks.wooden_slab); - func_151180_a(p_75924_0_, Blocks.grass, Blocks.dirt); - func_151180_a(p_75924_0_, Blocks.farmland, Blocks.dirt); - } - - private static void func_151180_a(StatBase[] p_151180_0_, Block p_151180_1_, Block p_151180_2_) - { - int i = Block.getIdFromBlock(p_151180_1_); - int j = Block.getIdFromBlock(p_151180_2_); - - if (p_151180_0_[i] != null && p_151180_0_[j] == null) - { - p_151180_0_[j] = p_151180_0_[i]; - } - else - { - StatList.allStats.remove(p_151180_0_[i]); - StatList.objectMineStats.remove(p_151180_0_[i]); - StatList.generalStats.remove(p_151180_0_[i]); - p_151180_0_[i] = p_151180_0_[j]; - } - } + { + func_151180_a(p_75924_0_, Blocks.water, Blocks.flowing_water); + func_151180_a(p_75924_0_, Blocks.lava, Blocks.flowing_lava); + func_151180_a(p_75924_0_, Blocks.lit_pumpkin, Blocks.pumpkin); + func_151180_a(p_75924_0_, Blocks.lit_furnace, Blocks.furnace); + func_151180_a(p_75924_0_, Blocks.lit_redstone_ore, Blocks.redstone_ore); + func_151180_a(p_75924_0_, Blocks.powered_repeater, Blocks.unpowered_repeater); + func_151180_a(p_75924_0_, Blocks.powered_comparator, Blocks.unpowered_comparator); + func_151180_a(p_75924_0_, Blocks.redstone_torch, Blocks.unlit_redstone_torch); + func_151180_a(p_75924_0_, Blocks.lit_redstone_lamp, Blocks.redstone_lamp); + func_151180_a(p_75924_0_, Blocks.red_mushroom, Blocks.brown_mushroom); + func_151180_a(p_75924_0_, Blocks.double_stone_slab, Blocks.stone_slab); + func_151180_a(p_75924_0_, Blocks.double_wooden_slab, Blocks.wooden_slab); + func_151180_a(p_75924_0_, Blocks.grass, Blocks.dirt); + func_151180_a(p_75924_0_, Blocks.farmland, Blocks.dirt); + } + + private static void func_151180_a(StatBase[] p_151180_0_, Block p_151180_1_, Block p_151180_2_) + { + int i = Block.getIdFromBlock(p_151180_1_); + int j = Block.getIdFromBlock(p_151180_2_); + if (p_151180_0_[i] != null && p_151180_0_[j] == null) + { + p_151180_0_[j] = p_151180_0_[i]; + } + else + { + StatList.allStats.remove(p_151180_0_[i]); + StatList.objectMineStats.remove(p_151180_0_[i]); + StatList.generalStats.remove(p_151180_0_[i]); + p_151180_0_[i] = p_151180_0_[j]; + } + } } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginMaid.java b/src/main/java/shift/sextiarysector/plugin/PluginMaid.java new file mode 100644 index 0000000..b78c500 --- /dev/null +++ b/src/main/java/shift/sextiarysector/plugin/PluginMaid.java @@ -0,0 +1,38 @@ +package shift.sextiarysector.plugin; + +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class PluginMaid implements IPlugin { + + @Override + public String getModName() { + return "Maid"; + } + + @Override + public void prePlugin(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void preClientPlugin(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void initPlugin(FMLInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void postPlugin(FMLPostInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + +} diff --git a/src/main/java/shift/sextiarysector/potion/PotionSS.java b/src/main/java/shift/sextiarysector/potion/PotionSS.java index 2c6fd18..c4b3dd7 100644 --- a/src/main/java/shift/sextiarysector/potion/PotionSS.java +++ b/src/main/java/shift/sextiarysector/potion/PotionSS.java @@ -25,10 +25,19 @@ public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecra } + /* + @Override + @SideOnly(Side.CLIENT) + public int getStatusIconIndex() + { + return this.iconID; + }*/ + @Override @SideOnly(Side.CLIENT) public boolean hasStatusIcon() { + //net.minecraft.client.Minecraft.getMinecraft().getTextureManager().bindTexture(field_147001_a); return false; } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index a542602..72a8edf 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -124,6 +124,8 @@ tile.ss.radish.name=Radish Seed tile.ss.rice.name=Rice Seed tile.ss.mushroom_red.name=Red Mushroom Seed +tile.ss.shiitake.name=Shiitake Seed + tile.ss.sandpit.name=Sandpit @@ -294,6 +296,8 @@ item.ss.radish.name=Radish item.ss.rice.name=Rice +item.ss.shiitake.name=Shiitake + item.ss.white_rice.name=White Rice @@ -521,6 +525,9 @@ achievement.ss.radish.desc=Pickup a radish achievement.ss.rice=Rice achievement.ss.rice.desc=Pickup a rice +achievement.ss.shiitake=Shiitake +achievement.ss.shiitake.desc=Pickup a shiitake + achievement.ss.mining=SS2 -Mining- achievement.ss.bluestone_dust=Color is different ! diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/shiitake_stage_0.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/shiitake_stage_0.png new file mode 100644 index 0000000000000000000000000000000000000000..56501cdf60bb2610270b6055689c09ab0aac5a64 GIT binary patch literal 195 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=Dh+L6~vJ#O${~LG}_)Usv|~%slK$`~n?4AOmDGLn2C?^K)}k^GbkR1_tM%)Wnk1 z6ovB4k_-iRPv3wPy;OFfxVoo{V~EA++bT&E}WF1(+xR~w2;fB4&d;h77|LvJo8#)`E46+WaVBBJUz{T;w{?4WY z^_zGM0tJ5DkIX##V3qQrhVue@^aO+-C4fM|Rl$QR+XUnD?pR;`ZO_ci++6%C%xx3% e$LEv%E1ojOMv1)k3OPR=WWT4YpUXO@geCwrj#A|S literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/shiitake_stage_2.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/shiitake_stage_2.png new file mode 100644 index 0000000000000000000000000000000000000000..2d5fd4c21c25793d770b6edad2816efe2050d59d GIT binary patch literal 310 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=Dh+L6~vJ#O${~LG}_)Usv|~%slKWI#0GneF6%}W`;zRIOpf)rskCZxeN@>MX8A; zsVNHOnI#zt?w-B@DSD~wK=E0gE{-77Om*>vE4fUzeV5VY~%uUmZL?Y>WJhgBnD zKRmph-)5Q~x1ghShDX9zE#+-zQWhzEsIS{@%nSsFzt69iw75A_Qpo$ek-$^dlnv#} rzSo0{dH!W>Pm25F^Xl_IoML8JQ(<}T&U5n(Am@9!`njxgN@xNAM$vL< literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/shiitake_stage_3.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/shiitake_stage_3.png new file mode 100644 index 0000000000000000000000000000000000000000..6fa9848175c3130448c9703716ddf6059fa59662 GIT binary patch literal 337 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=Dh+L6~vJ#O${~LG}_)Usv|~%slLB65q|w90dx=W`;zRIOpf)rskCZxeN@>MX8A; zsVNHOnI#zt?w-B@DSD~wK=G}fE{-7$gBO$K z=LgKn7ujZLaQr#{?MlPv_`QEmBrH<+AU|8N=Y{4)7sm(nD`u)N1Hs|;{QZGX%Hk`V z9}3Nhvncv)d${*`{DVIN!kmu|KREIBJ5O;{j6~et-{%z6j-34P>TY@4s%?vpNESRh z$nGZ0%Gh!L{@)+}U)|+zo9}ODXjlKg`Qe#n{uydOm&vQ&Gd}$K|23)E|9@Nwn8U~5 Wn3f+3lk#cDi8nw03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00F&8L_t(I%axNcXcJKw z$A6zB5W{KDrU*xB2#7J3B0@taHw7mli%Yv?6f-zf+(e{;NmH^-H9Sz_Z!+}>55+`B-n(WLrycm3&0zl(_A z+R1s+DVwJUAL?Rx#(ckV`xWae#fW6&3JbY80NhMP7t1sFtpL9jP`vsafOAtRK5R9~ zI~I-Yj!7c&h;F8$*Gs3_`rZbhTi;=7Hwk(1@u!B8u|yw>g{OzG-wNo~cL2DxTm_KH z;0$j&YjP+NSAcJH#qR`tft#sl>Ea0k_do+buCD>$cLEts%=B_Ra~Ocqo!2Aap2Mc9 nhzPU28Q2dTNnv=({IqP)D?8x+!}WFU8GbZ8()Nlj2>E@cM*00Fs4L_t(o!|j(nNCIIT z#(x(HQbtEXAO(q&Nwg?VZ3)pPVUvrr6h+ihTLn3^20=6i;To+)OJGD$TR~7zk!eKX znIBLF*N}Ilpwwp7B{1nwpXZkk2n9WyN0Xf1CG~BA0-i`^NTf1&rgs4to88lY zGxEBv%=!C>Jfs152|r^un>f0P(PA_(U~lIv@^b}*d=C`L@26h=Xy3262dZ`+(7LkK j-I-AM?VC`|DezzK=NX)%BOPba00000NkvXXu0mjfB Date: Mon, 16 Mar 2015 23:19:39 +0900 Subject: [PATCH 73/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20FMP=E3=81=AB?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・FMPに対応 ・銅装備を追加 ・ツルハシUnitを追加 --- build.gradle | 2 +- .../java/shift/sextiarysector/Config.java | 2 + .../java/shift/sextiarysector/SSBlocks.java | 4 +- .../java/shift/sextiarysector/SSFluids.java | 2 + .../java/shift/sextiarysector/SSItems.java | 36 +- .../shift/sextiarysector/SSMaterials.java | 18 + .../java/shift/sextiarysector/SSRecipes.java | 23 +- .../java/shift/sextiarysector/SSShops.java | 3 +- .../shift/sextiarysector/SextiarySector.java | 3 +- .../api/agriculture/package-info.java | 3 +- .../api/machine/energy/EnergyStorage.java | 8 +- .../api/machine/energy/IEnergyStorage.java | 4 +- ...ergyHandler.java => IGFEnergyHandler.java} | 11 +- .../api/machine/energy/TileEnergyHandler.java | 10 +- .../api/machine/item/IGearForceItem.java | 10 +- .../api/machine/item/IHammer.java | 5 +- .../api/machine/item/ItemGearForce.java | 53 +- .../sextiarysector/api/package-info.java | 1 + .../api/season/package-info.java | 3 +- .../sextiarysector/block/BlockDirection.java | 65 ++- .../block/BlockFluidFurnace.java | 358 ++++++------- .../block/BlockFluidMachineBase.java | 434 ++++++++-------- .../block/BlockFoodSmokers.java | 199 ++++--- .../sextiarysector/block/BlockGFTank.java | 4 +- .../sextiarysector/block/BlockGearBox.java | 4 +- .../sextiarysector/block/BlockGearShaft.java | 89 ++-- .../sextiarysector/block/BlockShaft.java | 87 ++-- .../block/BlockShippingBox.java | 101 +++- .../block/BlockSimpleMachine.java | 194 +++---- .../container/InventoryRucksack.java | 353 ++++++------- .../event/PlayerUnitEventHandler.java | 40 ++ .../java/shift/sextiarysector/fmp/IShaft.java | 23 + .../fmp/ItemBlockShaftPart.java | 94 ++++ .../sextiarysector/fmp/PartRegistry.java | 86 +++ .../sextiarysector/fmp/SSMultipartSPH.java | 22 + .../sextiarysector/fmp/ShaftEventHandler.java | 121 +++++ .../shift/sextiarysector/fmp/ShaftPart.java | 490 ++++++++++++++++++ .../shift/sextiarysector/gui/GuiGFTank.java | 4 +- .../sextiarysector/gui/GuiSimpleMachine.java | 4 +- .../item/GearForceItemManager.java | 172 +++--- .../sextiarysector/item/ItemGFHammer.java | 25 + .../shift/sextiarysector/item/ItemHammer.java | 30 +- .../sextiarysector/item/ItemSSArmor.java | 26 + .../sextiarysector/module/ModuleChest.java | 6 +- .../module/ModuleToolMaterial.java | 9 +- .../player/CustomPlayerData.java | 16 +- .../player/EntityPlayerManager.java | 119 +++-- .../plugin/PluginComputerCraft.java | 12 +- .../sextiarysector/plugin/PluginFMP.java | 37 ++ .../sextiarysector/plugin/SSPlugins.java | 45 +- .../sextiarysector/recipe/RecipesArmor.java | 33 ++ .../recipe/RecipesMagicFuel.java | 8 +- .../renderer/block/RendererShaft.java | 246 ++++++--- .../renderer/item/RenderGF.java | 2 +- .../tileentity/TileEntityElectricMotor.java | 12 +- .../tileentity/TileEntityFan.java | 12 +- .../tileentity/TileEntityGFTank.java | 46 +- .../tileentity/TileEntityGearBox.java | 20 +- .../tileentity/TileEntityGearShaft.java | 34 +- .../tileentity/TileEntityMonitor.java | 12 +- .../tileentity/TileEntityPump.java | 12 +- .../tileentity/TileEntitySaw.java | 12 +- .../tileentity/TileEntityShaft.java | 74 +-- .../tileentity/TileEntityShippingBox.java | 318 ++++++++++++ .../tileentity/TileEntitySimpleMachine.java | 202 ++++---- .../tileentity/TileEntitySmallWaterwheel.java | 12 +- .../tileentity/TileEntitySmallWindmill.java | 12 +- .../tileentity/TileEntitySteamMotor.java | 12 +- .../tileentity/TileEntityTofuMotor.java | 6 +- .../tileentity/TileEntityWindmill.java | 12 +- .../assets/sextiarysector/lang/en_US.lang | 7 + .../textures/guis/shipping_box.png | Bin 0 -> 1328 bytes .../textures/items/armor/copper_boots.png | Bin 0 -> 277 bytes .../items/armor/copper_chestplate.png | Bin 0 -> 313 bytes .../textures/items/armor/copper_helmet.png | Bin 0 -> 248 bytes .../textures/items/armor/copper_leggings.png | Bin 0 -> 231 bytes .../textures/items/armor/iron_boots.png | Bin 0 -> 154 bytes .../textures/items/armor/iron_chestplate.png | Bin 0 -> 172 bytes .../textures/items/armor/iron_helmet.png | Bin 0 -> 141 bytes .../textures/items/armor/iron_leggings.png | Bin 0 -> 136 bytes .../textures/items/gearforce/gf_hammer.png | Bin 0 -> 496 bytes .../textures/items/gearforce/hammer.png | Bin 0 -> 433 bytes .../textures/items/unit/attack_rust_unit.png | Bin 1293 -> 1152 bytes .../textures/items/unit/attack_unit.png | Bin 1307 -> 1302 bytes .../textures/items/unit/defense_rust_unit.png | Bin 1223 -> 1115 bytes .../textures/items/unit/defense_unit.png | Bin 1243 -> 1237 bytes .../textures/items/unit/pickaxe_unit.png | Bin 0 -> 1294 bytes .../textures/items/unit/rust_unit.png | Bin 0 -> 926 bytes .../textures/items/unit/unit.png | Bin 1383 -> 1064 bytes .../textures/models/armor/copper_layer_1.png | Bin 0 -> 1589 bytes .../textures/models/armor/copper_layer_2.png | Bin 0 -> 812 bytes .../textures/models/armor/iron_layer_1.png | Bin 0 -> 1096 bytes .../textures/models/armor/iron_layer_2.png | Bin 0 -> 649 bytes 93 files changed, 3110 insertions(+), 1464 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/SSMaterials.java rename src/main/java/shift/sextiarysector/api/machine/energy/{IEnergyHandler.java => IGFEnergyHandler.java} (88%) create mode 100644 src/main/java/shift/sextiarysector/fmp/IShaft.java create mode 100644 src/main/java/shift/sextiarysector/fmp/ItemBlockShaftPart.java create mode 100644 src/main/java/shift/sextiarysector/fmp/PartRegistry.java create mode 100644 src/main/java/shift/sextiarysector/fmp/SSMultipartSPH.java create mode 100644 src/main/java/shift/sextiarysector/fmp/ShaftEventHandler.java create mode 100644 src/main/java/shift/sextiarysector/fmp/ShaftPart.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemGFHammer.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemSSArmor.java create mode 100644 src/main/java/shift/sextiarysector/plugin/PluginFMP.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesArmor.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityShippingBox.java create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/shipping_box.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/copper_boots.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/copper_chestplate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/copper_helmet.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/copper_leggings.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/iron_boots.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/iron_chestplate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/iron_helmet.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/iron_leggings.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/gf_hammer.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/hammer.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/pickaxe_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/rust_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/armor/copper_layer_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/armor/copper_layer_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/armor/iron_layer_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/armor/iron_layer_2.png diff --git a/build.gradle b/build.gradle index 4e5eb92..f5500a8 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.7.d-${project.minecraft.version}" +version = "2.1.8.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index 0046887..a9d68a8 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -24,6 +24,7 @@ public class Config { public static boolean modTofu; public static boolean modTcon; public static boolean modCleaver; + public static boolean modFMP; public static void ConfigRead(FMLPreInitializationEvent event) { @@ -70,6 +71,7 @@ public static void configForPlugin(Configuration cfg) { modTofu = cfg.getBoolean("Tofu", "general", true, ""); modTcon = cfg.getBoolean("Tcon", "general", true, ""); modCleaver = cfg.getBoolean("Cleaver", "general", true, ""); + modFMP = cfg.getBoolean("ForgeMultipart", "general", true, ""); } diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 4cb3b22..7362920 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -82,6 +82,7 @@ import shift.sextiarysector.tileentity.TileEntitySSCrop; import shift.sextiarysector.tileentity.TileEntitySaw; import shift.sextiarysector.tileentity.TileEntityShaft; +import shift.sextiarysector.tileentity.TileEntityShippingBox; import shift.sextiarysector.tileentity.TileEntitySimpleMachine; import shift.sextiarysector.tileentity.TileEntitySmallWaterwheel; import shift.sextiarysector.tileentity.TileEntitySmallWindmill; @@ -346,7 +347,7 @@ public static void initBlicks() { GameRegistry.registerTileEntity(TileEntityTrap.class, "SSTrap"); //液体 - drinkingWater = new BlockSSFluid(SSFluids.drinkingWater).setBlockName("ss.drinking_water").setCreativeTab(SextiarySectorAPI.TabSSCore); + drinkingWater = new BlockSSFluid(SSFluids.springWater).setBlockName("ss.drinking_water").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(drinkingWater, "DrinkingWater"); hotSprings = new BlockHotSprings(SSFluids.hotSprings).setBlockName("ss.hot_springs").setCreativeTab(SextiarySectorAPI.TabSSCore); @@ -498,6 +499,7 @@ public static void initBlicks() { shippingBox = new BlockShippingBox().setBlockName("ss.shipping_box").setBlockTextureName("sextiarysector:shipping_box").setCreativeTab(SextiarySectorAPI.TabSSEconomy); GameRegistry.registerBlock(shippingBox, "ShippingBox"); + GameRegistry.registerTileEntity(TileEntityShippingBox.class, "ShippingBox"); creeperChest = new BlockSSChest(6).setBlockName("ss.creeper_chest").setHardness(2.5F).setStepSound(Block.soundTypeWood).setCreativeTab(SextiarySectorAPI.TabSSEconomy); GameRegistry.registerBlock(creeperChest, "CreeperChest"); diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index 7a91aad..fd1afac 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -14,6 +14,7 @@ public class SSFluids { public static Fluid takumiTea; public static Fluid drinkingWater; + public static Fluid springWater; public static Fluid hotSprings; public static Fluid steam; @@ -28,6 +29,7 @@ public static void initFluids() { takumiTea = new SSFluid("TakumiTea", 0, 0x006400, 5, 2.0f).setUnlocalizedName("takumi_tea"); drinkingWater = new SSFluid("DrinkingWater", 0, 0x87CEFA, 4, 1.0f).setUnlocalizedName("drinking_water"); + springWater = new SSFluid("SpringWater", 0, 0x87CEFA, 4, 1.0f).setUnlocalizedName("spring_water"); hotSprings = new SSFluid("HotSprings", 0, 0xFFFFFF, 4, 1.0f).setUnlocalizedName("hot_springs"); steam = new SSFluid("Steam", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("steam").setGaseous(true); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index f2b35e4..96662d7 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -26,6 +26,7 @@ import shift.sextiarysector.item.ItemMineboat; import shift.sextiarysector.item.ItemMineboatTank; import shift.sextiarysector.item.ItemRucksack; +import shift.sextiarysector.item.ItemSSArmor; import shift.sextiarysector.item.ItemSSAxe; import shift.sextiarysector.item.ItemSSPickaxe; import shift.sextiarysector.item.ItemScoop; @@ -124,6 +125,8 @@ public class SSItems { public static Item attackRustUnit; public static Item defenseRustUnit; + public static Item pickaxeUnit; + //ring public static Item ironRing; public static Item creeperRing; @@ -163,6 +166,12 @@ public class SSItems { public static Item copperSword; public static Item copperHoe; + //防具 + public static Item copperHelmet; + public static Item copperChestplate; + public static Item copperLeggings; + public static Item copperBoots; + public static Item woodWateringCan; //水産 @@ -407,6 +416,9 @@ public static void initItems() { defenseRustUnit = new ItemUnit().setUnlocalizedName("ss.defense_rust_unit").setTextureName("sextiarysector:unit/defense_rust_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(defenseRustUnit, "DefenseRustUnit"); + pickaxeUnit = new ItemUnit().setUnlocalizedName("ss.pickaxe_unit").setTextureName("sextiarysector:unit/pickaxe_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(pickaxeUnit, "PickaxeUnit"); + //Ring ironRing = new Item().setUnlocalizedName("ss.iron_ring").setTextureName("sextiarysector:ring/iron_ring").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(ironRing, "IronRing"); @@ -467,18 +479,32 @@ public static void initItems() { GameRegistry.registerItem(diamondKnife, "DiamondKnife"); //バニラ - copperShovel = new ItemSpade(ModuleToolMaterial.copper).setUnlocalizedName("ss.copper_shovel").setTextureName("sextiarysector:tool/copper_shovel").setCreativeTab(SextiarySectorAPI.TabSSCore); + copperShovel = new ItemSpade(ModuleToolMaterial.copperTool).setUnlocalizedName("ss.copper_shovel").setTextureName("sextiarysector:tool/copper_shovel").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(copperShovel, "CopperShovel"); - copperPickaxe = new ItemSSPickaxe(ModuleToolMaterial.copper).setUnlocalizedName("ss.copper_pickaxe").setTextureName("sextiarysector:tool/copper_pickaxe").setCreativeTab(SextiarySectorAPI.TabSSCore); + copperPickaxe = new ItemSSPickaxe(ModuleToolMaterial.copperTool).setUnlocalizedName("ss.copper_pickaxe").setTextureName("sextiarysector:tool/copper_pickaxe").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(copperPickaxe, "CopperPickaxe"); - copperAxe = new ItemSSAxe(ModuleToolMaterial.copper).setUnlocalizedName("ss.copper_axe").setTextureName("sextiarysector:tool/copper_axe").setCreativeTab(SextiarySectorAPI.TabSSCore); + copperAxe = new ItemSSAxe(ModuleToolMaterial.copperTool).setUnlocalizedName("ss.copper_axe").setTextureName("sextiarysector:tool/copper_axe").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(copperAxe, "CopperAxe"); - copperSword = new ItemSword(ModuleToolMaterial.copper).setUnlocalizedName("ss.copper_sword").setTextureName("sextiarysector:tool/copper_sword").setCreativeTab(SextiarySectorAPI.TabSSCore); + copperSword = new ItemSword(ModuleToolMaterial.copperTool).setUnlocalizedName("ss.copper_sword").setTextureName("sextiarysector:tool/copper_sword").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(copperSword, "CopperSword"); - copperHoe = new ItemHoe(ModuleToolMaterial.copper).setUnlocalizedName("ss.copper_hoe").setTextureName("sextiarysector:tool/copper_hoe").setCreativeTab(SextiarySectorAPI.TabSSCore); + copperHoe = new ItemHoe(ModuleToolMaterial.copperTool).setUnlocalizedName("ss.copper_hoe").setTextureName("sextiarysector:tool/copper_hoe").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(copperHoe, "CopperHoe"); //Item i = Items.iron_axe; + //防具 + copperHelmet = new ItemSSArmor(ModuleToolMaterial.copperArmor, 0, 0).setUnlocalizedName("ss.copper_helmet").setTextureName("sextiarysector:armor/copper_helmet"); + GameRegistry.registerItem(copperHelmet, "CopperHelmet"); + + copperChestplate = new ItemSSArmor(ModuleToolMaterial.copperArmor, 0, 1).setUnlocalizedName("ss.copper_chestplate").setTextureName("sextiarysector:armor/copper_chestplate"); + GameRegistry.registerItem(copperChestplate, "CopperChestplate"); + + copperLeggings = new ItemSSArmor(ModuleToolMaterial.copperArmor, 0, 2).setUnlocalizedName("ss.copper_leggings").setTextureName("sextiarysector:armor/copper_leggings"); + GameRegistry.registerItem(copperLeggings, "CopperLeggings"); + + copperBoots = new ItemSSArmor(ModuleToolMaterial.copperArmor, 0, 3).setUnlocalizedName("ss.copper_boots").setTextureName("sextiarysector:armor/copper_boots"); + GameRegistry.registerItem(copperBoots, "CopperBoots"); + + //水やり woodWateringCan = new ItemWateringCan(ToolMaterial.WOOD).setUnlocalizedName("ss.wood_watering_can").setTextureName("wood_watering_can"); GameRegistry.registerItem(woodWateringCan, "WoodWateringCan"); diff --git a/src/main/java/shift/sextiarysector/SSMaterials.java b/src/main/java/shift/sextiarysector/SSMaterials.java new file mode 100644 index 0000000..4ea9df4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/SSMaterials.java @@ -0,0 +1,18 @@ +package shift.sextiarysector; + +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; + +public class SSMaterials extends Material { + + public SSMaterials(MapColor p_i2116_1_) { + super(p_i2116_1_); + } + + public static Material machine; + + public static void preInitMaterial() { + machine = (new SSMaterials(MapColor.ironColor)).setRequiresTool(); + } + +} diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index 8047c13..ed75702 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -9,6 +9,7 @@ import shift.sextiarysector.recipe.RecipeSimpleFluid; import shift.sextiarysector.recipe.RecipeSimpleFuel; import shift.sextiarysector.recipe.RecipeSimpleMachine; +import shift.sextiarysector.recipe.RecipesArmor; import shift.sextiarysector.recipe.RecipesCore; import shift.sextiarysector.recipe.RecipesFluidFurnace; import shift.sextiarysector.recipe.RecipesFoodSmokers; @@ -46,7 +47,7 @@ public class SSRecipes { public static RecipeSimpleMachine rollingMachine; public static RecipeSimpleMachine timeMachine; - public static void initRecipeLists(){ + public static void initRecipeLists() { fluidFurnace = new RecipeSimpleFluid(); foodSmokers = new RecipeSimpleFluid(); @@ -64,7 +65,7 @@ public static void initRecipeLists(){ timeMachine = new RecipeSimpleMachine(); } - public static void initRecipes(){ + public static void initRecipes() { CraftingManager m = CraftingManager.getInstance(); @@ -75,6 +76,7 @@ public static void initRecipes(){ RecipesMachine.addRecipes(m); RecipesCore.addRecipes(m); RecipesTool.addRecipes(m); + RecipesArmor.addRecipes(m); FurnaceCraftingManager fm = FurnaceCraftingManager.getInstance(); @@ -102,30 +104,23 @@ public static void initRecipes(){ RecipesTimeMachine.addRecipes(timeMachine); - } - public static void deleteVanillaRecipe(){ + public static void deleteVanillaRecipe() { CraftingManager m = CraftingManager.getInstance(); ItemStack wool = new ItemStack(Blocks.wool); - for(int i=0;i< m.getRecipeList().size();i++){ + for (int i = 0; i < m.getRecipeList().size(); i++) { - IRecipe re = (IRecipe)m.getRecipeList().get(i); - if(re != null &&re.getRecipeOutput()!=null && re.getRecipeOutput().isItemEqual(wool) && re instanceof ShapedRecipes){ + IRecipe re = (IRecipe) m.getRecipeList().get(i); + if (re != null && re.getRecipeOutput() != null && re.getRecipeOutput().isItemEqual(wool) && re instanceof ShapedRecipes) { m.getRecipeList().remove(i); - return ; + return; } } - } - - - - - } diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index 95893fa..30ae6ae 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -45,7 +45,8 @@ public static void initShops() { //creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.attackUnit, 1), 2400)); //creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.defenseUnit, 1), 3600)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.craftUnit, 1), 6800)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.craftUnit, 1), 5300)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.pickaxeUnit, 1), 6800)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.wood, 1), 180)); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index dc65a46..a8311ed 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -36,7 +36,7 @@ public class SextiarySector { public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.1.7"; + public static final String VERSION = "2.1.8"; @Mod.Instance("SextiarySector") public static SextiarySector instance; @@ -90,6 +90,7 @@ public void preInit(FMLPreInitializationEvent event) SSCreativeTabs.initCreativeTabs(); SSFluids.initFluids(); SSPotions.initPotions(); + SSMaterials.preInitMaterial(); SSItems.initItems(); SSBlocks.initBlicks(); SSEntitys.initEntity(); diff --git a/src/main/java/shift/sextiarysector/api/agriculture/package-info.java b/src/main/java/shift/sextiarysector/api/agriculture/package-info.java index bc715c3..585534a 100644 --- a/src/main/java/shift/sextiarysector/api/agriculture/package-info.java +++ b/src/main/java/shift/sextiarysector/api/agriculture/package-info.java @@ -1,4 +1,5 @@ -@API(apiVersion = "1.0.0", owner = shift.sextiarysector.api.SextiarySectorAPI.MODID, provides = "SextiarySectorAPI|agriculture") +@API(apiVersion = "1.0.0", owner = "SextiarySectorAPI|core", provides = "SextiarySectorAPI|agriculture") package shift.sextiarysector.api.agriculture; + import cpw.mods.fml.common.API; diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/EnergyStorage.java b/src/main/java/shift/sextiarysector/api/machine/energy/EnergyStorage.java index baba657..e23c4a1 100644 --- a/src/main/java/shift/sextiarysector/api/machine/energy/EnergyStorage.java +++ b/src/main/java/shift/sextiarysector/api/machine/energy/EnergyStorage.java @@ -138,7 +138,7 @@ public void modifyEnergyStored(int energy) { @Override public int addEnergy(int maxPower, int maxSpeed, boolean simulate) { - if(!this.isTransmissionGear()&&maxPower!=this.getMaxPowerStored()){ + if(!this.isTransmissionGear()&&maxPower!=this.getMaxPower()){ return 0; } @@ -155,7 +155,7 @@ public int addEnergy(int maxPower, int maxSpeed, boolean simulate) { @Override public int drawEnergy(int maxPower, int maxSpeed, boolean simulate) { - if(!this.isTransmissionGear()&&maxPower!=this.getMaxPowerStored()){ + if(!this.isTransmissionGear()&&maxPower!=this.getMaxPower()){ return 0; } @@ -194,12 +194,12 @@ public int getSpeedStored() { } @Override - public int getMaxPowerStored() { + public int getMaxPower() { return powerCapacity; } @Override - public int getMaxSpeedStored() { + public int getMaxSpeed() { return speedCapacity; } diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyStorage.java b/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyStorage.java index 72e6882..387c395 100644 --- a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyStorage.java +++ b/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyStorage.java @@ -46,11 +46,11 @@ public interface IEnergyStorage { /** * @return 最大の力の値 */ - int getMaxPowerStored(); + int getMaxPower(); /** * @return 最大の速度の値 */ - int getMaxSpeedStored(); + int getMaxSpeed(); } diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java b/src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java similarity index 88% rename from src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java rename to src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java index 33ba8c9..08962e4 100644 --- a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java +++ b/src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java @@ -3,14 +3,14 @@ import net.minecraftforge.common.util.ForgeDirection; /** - * IEnergyHandler TileEntity用のエネルギーインターフェース
+ * IGFEnergyHandler TileEntity用のエネルギーインターフェース
* TileEntityに実装して使ってください。 * @see IEnergyStorage * @see EnergyStorage - * @version 1.0.0 + * @version 1.1.0 * @author Shift02 */ -public interface IEnergyHandler { +public interface IGFEnergyHandler { /** * addEnergy エレルギーの追加 @@ -32,7 +32,6 @@ public interface IEnergyHandler { */ int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate); - /** * canInterface 繋がるか * @param from 方角 @@ -52,7 +51,7 @@ public interface IEnergyHandler { * @param from 方角 * @return その方角の現在の速度の量 */ - long getSpeedStored(ForgeDirection from); + int getSpeedStored(ForgeDirection from); /** * getMaxPowerStored 力の最大値(容量)の取得 @@ -66,6 +65,6 @@ public interface IEnergyHandler { * @param from 方角 * @return 最大値(容量) */ - long getMaxSpeedStored(ForgeDirection from); + int getMaxSpeedStored(ForgeDirection from); } diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/TileEnergyHandler.java b/src/main/java/shift/sextiarysector/api/machine/energy/TileEnergyHandler.java index 6c285a6..5af6c30 100644 --- a/src/main/java/shift/sextiarysector/api/machine/energy/TileEnergyHandler.java +++ b/src/main/java/shift/sextiarysector/api/machine/energy/TileEnergyHandler.java @@ -7,7 +7,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -public class TileEnergyHandler extends TileEntity implements IEnergyHandler { +public class TileEnergyHandler extends TileEntity implements IGFEnergyHandler { EnergyStorage storage = new EnergyStorage("Base",1,1000); @@ -42,7 +42,7 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return storage.getSpeedStored(); @@ -51,14 +51,14 @@ public long getSpeedStored(ForgeDirection from) { @Override public int getMaxPowerStored(ForgeDirection from) { - return storage.getMaxPowerStored(); + return storage.getMaxPower(); } @Override - public long getMaxSpeedStored(ForgeDirection from) { + public int getMaxSpeedStored(ForgeDirection from) { - return storage.getMaxSpeedStored(); + return storage.getMaxSpeed(); } diff --git a/src/main/java/shift/sextiarysector/api/machine/item/IGearForceItem.java b/src/main/java/shift/sextiarysector/api/machine/item/IGearForceItem.java index 57af6de..4b779d7 100644 --- a/src/main/java/shift/sextiarysector/api/machine/item/IGearForceItem.java +++ b/src/main/java/shift/sextiarysector/api/machine/item/IGearForceItem.java @@ -11,9 +11,15 @@ */ public interface IGearForceItem { - int getMaxPowerStored(ItemStack container); + /** + * アイテムにチャージ出来るパワー + * + * @param container アイテム + * @return + */ + int getMaxPower(ItemStack container); - int getMaxSpeedStored(ItemStack container); + int getMaxSpeed(ItemStack container); boolean canSetSlot(int power); diff --git a/src/main/java/shift/sextiarysector/api/machine/item/IHammer.java b/src/main/java/shift/sextiarysector/api/machine/item/IHammer.java index 98cb768..62228ec 100644 --- a/src/main/java/shift/sextiarysector/api/machine/item/IHammer.java +++ b/src/main/java/shift/sextiarysector/api/machine/item/IHammer.java @@ -1,11 +1,12 @@ package shift.sextiarysector.api.machine.item; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; public interface IHammer { - public boolean canUse(ItemStack item); + public boolean canUse(ItemStack item, EntityPlayer player, int damage); - public boolean use(ItemStack item); + public boolean use(ItemStack item, EntityPlayer player, int damage); } diff --git a/src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java b/src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java index 0b08ba5..3584c7f 100644 --- a/src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java +++ b/src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java @@ -15,28 +15,28 @@ * @version 1.0.0 * @author Shift02 */ -public class ItemGearForce extends Item implements IGearForceItem{ +public class ItemGearForce extends Item implements IGearForceItem { int power; int speed; int slot; - public ItemGearForce(int power, int maxSpeed, int slot){ + public ItemGearForce(int power, int maxSpeed, int slot) { this.setMaxStackSize(1); - this.setNoRepair(); + this.setNoRepair(); - this.power=power; - this.speed=maxSpeed; + this.power = power; + this.speed = maxSpeed; - this.slot=slot; + this.slot = slot; } @Override - public void addInformation(ItemStack itemStack, EntityPlayer par3EntityPlayer, List list, boolean par4) - { + public void addInformation(ItemStack itemStack, EntityPlayer par3EntityPlayer, List list, boolean par4) + { /* if(!par3EntityPlayer.capabilities.isCreativeMode){ @@ -50,31 +50,46 @@ public void addInformation(ItemStack itemStack, EntityPlayer par3EntityPlayer, L int power = GearForceItem.manager.getPower(itemStack); int speed = GearForceItem.manager.getSpeed(itemStack); - list.add(""+ EnumChatFormatting.RED + "Power " + EnumChatFormatting.GRAY + power +" / "+this.getMaxPowerStored(itemStack)+ ""); - list.add(""+ EnumChatFormatting.BLUE + "Speed " + EnumChatFormatting.GRAY + nf.format(speed) +" / "+ nf.format(this.getMaxSpeedStored(itemStack))+ ""); + list.add("" + EnumChatFormatting.RED + "Power " + EnumChatFormatting.GRAY + power + " / " + this.getMaxPower(itemStack) + ""); + list.add("" + EnumChatFormatting.BLUE + "Speed " + EnumChatFormatting.GRAY + nf.format(speed) + " / " + nf.format(this.getMaxSpeed(itemStack)) + ""); - } + } + + @Override + public boolean showDurabilityBar(ItemStack stack) + { + + if (GearForceItem.manager.getSpeed(stack) == 0) return false; + + return true;//stack.isItemDamaged(); + } @Override - public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { + public double getDurabilityForDisplay(ItemStack stack) + { + return 1.0D - ((double) GearForceItem.manager.getSpeed(stack) / (double) this.getMaxSpeed(stack)); + } + + @Override + public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) + { ItemStack empty = new ItemStack(this); ItemStack full = new ItemStack(this); - GearForceItem.manager.setEnergy(empty, this.getMaxPowerStored(empty), 0); - GearForceItem.manager.setEnergy(full, this.getMaxPowerStored(empty), this.getMaxSpeedStored(full)); + GearForceItem.manager.setEnergy(empty, this.getMaxPower(empty), 0); + GearForceItem.manager.setEnergy(full, this.getMaxPower(empty), this.getMaxSpeed(full)); par3List.add(empty); par3List.add(full); - } + } @Override - public int getMaxPowerStored(ItemStack container) { + public int getMaxPower(ItemStack container) { return this.power; } @Override - public int getMaxSpeedStored(ItemStack container) { + public int getMaxSpeed(ItemStack container) { return this.speed; } @@ -85,7 +100,7 @@ public boolean isCustomDamage(ItemStack container) { @Override public boolean canSetSlot(int power) { - return slot>=power; + return slot >= power; } } diff --git a/src/main/java/shift/sextiarysector/api/package-info.java b/src/main/java/shift/sextiarysector/api/package-info.java index 41b7324..7f7aac4 100644 --- a/src/main/java/shift/sextiarysector/api/package-info.java +++ b/src/main/java/shift/sextiarysector/api/package-info.java @@ -1,4 +1,5 @@ @API(apiVersion = "1.0.4", owner = shift.sextiarysector.api.SextiarySectorAPI.MODID, provides = "SextiarySectorAPI|core") package shift.sextiarysector.api; + import cpw.mods.fml.common.API; diff --git a/src/main/java/shift/sextiarysector/api/season/package-info.java b/src/main/java/shift/sextiarysector/api/season/package-info.java index b6df146..d37f79d 100644 --- a/src/main/java/shift/sextiarysector/api/season/package-info.java +++ b/src/main/java/shift/sextiarysector/api/season/package-info.java @@ -1,4 +1,5 @@ -@API(apiVersion = "1.0.0", owner = shift.sextiarysector.api.SextiarySectorAPI.MODID, provides = "SextiarySectorAPI|season") +@API(apiVersion = "1.0.0", owner = "SextiarySectorAPI|core", provides = "SextiarySectorAPI|season") package shift.sextiarysector.api.season; + import cpw.mods.fml.common.API; diff --git a/src/main/java/shift/sextiarysector/block/BlockDirection.java b/src/main/java/shift/sextiarysector/block/BlockDirection.java index b9f790b..cf132ee 100644 --- a/src/main/java/shift/sextiarysector/block/BlockDirection.java +++ b/src/main/java/shift/sextiarysector/block/BlockDirection.java @@ -2,6 +2,7 @@ import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -9,37 +10,81 @@ import shift.sextiarysector.api.machine.item.IHammer; import shift.sextiarysector.tileentity.TileEntityDirection; -public abstract class BlockDirection extends BlockContainer{ +public abstract class BlockDirection extends BlockContainer { protected BlockDirection(Material p_i45386_1_) { super(p_i45386_1_); + this.setHarvestLevel("hammer", 0); } @Override - public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6,float par7, float par8, float par9) { + public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { - ItemStack item = par5EntityPlayer.getCurrentEquippedItem(); + ItemStack item = par5EntityPlayer.getCurrentEquippedItem(); - if(item == null || !(item.getItem() instanceof IHammer))return false; + if (item == null || !(item.getItem() instanceof IHammer)) return false; - if(!((IHammer)item.getItem()).canUse(item))return false; + if (par1World.isRemote) return true; + + if (!par5EntityPlayer.isSneaking()) { + this.changeToHammer(par1World, x, y, z, par5EntityPlayer, item); + } else { + this.breakToHammer(par1World, x, y, z, par5EntityPlayer, item); + } + + return true; + } + + /* + @Override + public void onBlockClicked(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer) { + + ItemStack item = par5EntityPlayer.getCurrentEquippedItem(); + + if (item == null || !(item.getItem() instanceof IHammer)) return; + + if (par1World.isRemote) return; + + this.breakToHammer(par1World, x, y, z, par5EntityPlayer, item); + + return; + + }*/ + + private void changeToHammer(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, ItemStack item) { + + if (!((IHammer) item.getItem()).canUse(item, par5EntityPlayer, 2)) return; TileEntityDirection t = (TileEntityDirection) par1World.getTileEntity(x, y, z); ForgeDirection d = t.getDirection(); - if(d.ordinal()>4){ + if (d.ordinal() > 4) { t.direction = d.getOrientation(0); - }else{ - t.direction = d.getOrientation(d.ordinal()+1); + } else { + t.direction = d.getOrientation(d.ordinal() + 1); } - ((IHammer)item.getItem()).use(item); + ((IHammer) item.getItem()).use(item, par5EntityPlayer, 2); par1World.playSoundEffect(x, y, z, this.stepSound.getStepResourcePath(), 1.0F, par1World.rand.nextFloat() * 0.1F + 0.6F); par1World.markBlockForUpdate(x, y, z); - return true; + } + + private void breakToHammer(World par1World, int x, int y, int z, EntityPlayer player, ItemStack item) { + + if (!((IHammer) item.getItem()).canUse(item, player, 10)) return; + + EntityItem eItem = new EntityItem(player.worldObj, x + 0.5d, y + 0.5d, z + 0.5d, new ItemStack(this, 1)); + + player.worldObj.spawnEntityInWorld(eItem); + + ((IHammer) item.getItem()).use(item, player, 10); + + player.worldObj.setBlockToAir(x, y, z); + player.worldObj.removeTileEntity(x, y, z); + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java b/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java index d990baa..7724adf 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java @@ -10,6 +10,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -26,17 +27,17 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockFluidFurnace extends BlockFluidMachineBase{ +public class BlockFluidFurnace extends BlockFluidMachineBase { private final Random furnaceRand = new Random(); - private static boolean keepFurnaceInventory; + private static boolean keepFurnaceInventory; - @SideOnly(Side.CLIENT) - private IIcon furnaceIconTop; - @SideOnly(Side.CLIENT) - private IIcon[] furnaceIconFront; - @SideOnly(Side.CLIENT) + @SideOnly(Side.CLIENT) + private IIcon furnaceIconTop; + @SideOnly(Side.CLIENT) + private IIcon[] furnaceIconFront; + @SideOnly(Side.CLIENT) private IIcon furnaceIconTopOn; public BlockFluidFurnace() { @@ -45,232 +46,233 @@ public BlockFluidFurnace() { this.setStepSound(soundTypeStone); } - + @Override public int getLightValue(IBlockAccess world, int x, int y, int z) - { - TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)world.getTileEntity(x, y, z); - if(tileentityfurnace.isFuel())return 15; + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase) world.getTileEntity(x, y, z); + if (tileentityfurnace.isFuel()) return 15; return 0; - } + } @Override - public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) - { - if (par1World.isRemote) - { - return true; - } - else - { - TileEntityFluidFurnace tileentityfurnace = (TileEntityFluidFurnace)par1World.getTileEntity(par2, par3, par4); + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9) + { + if (par1World.isRemote) + { + return true; + } + else + { + TileEntityFluidFurnace tileentityfurnace = (TileEntityFluidFurnace) par1World.getTileEntity(par2, par3, par4); - if(par5EntityPlayer.getCurrentEquippedItem() != null){ - if(par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof IHammer && ((IHammer)par5EntityPlayer.getCurrentEquippedItem().getItem()).canUse(par5EntityPlayer.getCurrentEquippedItem())){ + if (player.getCurrentEquippedItem() != null) { - tileentityfurnace.on = !tileentityfurnace.on; - ((IHammer)par5EntityPlayer.getCurrentEquippedItem().getItem()).use(par5EntityPlayer.getCurrentEquippedItem()); - par1World.markBlockForUpdate(par2, par3, par4); - return true; + Item item = player.getCurrentEquippedItem().getItem(); - } - } + if (item instanceof IHammer && ((IHammer) item).canUse(player.getCurrentEquippedItem(), player, 2)) { + tileentityfurnace.on = !tileentityfurnace.on; + ((IHammer) player.getCurrentEquippedItem().getItem()).use(player.getCurrentEquippedItem(), player, 2); + par1World.markBlockForUpdate(par2, par3, par4); + return true; + } + } - if (tileentityfurnace != null) - { - par5EntityPlayer.openGui(SextiarySector.instance, 1, par1World, par2, par3, par4); - } + if (tileentityfurnace != null) + { + player.openGui(SextiarySector.instance, 1, par1World, par2, par3, par4); + } - return true; - } - } + return true; + } + } @Override public void onBlockAdded(World par1World, int par2, int par3, int par4) - { - super.onBlockAdded(par1World, par2, par3, par4); - } + { + super.onBlockAdded(par1World, par2, par3, par4); + } private void setDefaultDirection(World par1World, int par2, int par3, int par4) - { - if (!par1World.isRemote) - { - Block block = par1World.getBlock(par2, par3, par4 - 1); - Block block1 = par1World.getBlock(par2, par3, par4 + 1); - Block block2 = par1World.getBlock(par2 - 1, par3, par4); - Block block3 = par1World.getBlock(par2 + 1, par3, par4); - - TileEntityDirection tileEntity = (TileEntityDirection)par1World.getTileEntity(par2, par3, par4); - - - byte b0 = 3; - - if (block.func_149730_j() && !block1.func_149730_j()) - { - b0 = 3; - } - - if (block1.func_149730_j() && !block.func_149730_j()) - { - b0 = 2; - } - - if (block2.func_149730_j() && !block3.func_149730_j()) - { - b0 = 5; - } - - if (block3.func_149730_j() && !block2.func_149730_j()) - { - b0 = 4; - } - - //par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); - tileEntity.direction = ForgeDirection.getOrientation(b0); - } - } + { + if (!par1World.isRemote) + { + Block block = par1World.getBlock(par2, par3, par4 - 1); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); + + TileEntityDirection tileEntity = (TileEntityDirection) par1World.getTileEntity(par2, par3, par4); + + byte b0 = 3; + + if (block.func_149730_j() && !block1.func_149730_j()) + { + b0 = 3; + } + + if (block1.func_149730_j() && !block.func_149730_j()) + { + b0 = 2; + } + + if (block2.func_149730_j() && !block3.func_149730_j()) + { + b0 = 5; + } + + if (block3.func_149730_j() && !block2.func_149730_j()) + { + b0 = 4; + } + + //par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); + tileEntity.direction = ForgeDirection.getOrientation(b0); + } + } @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(int par1, int par2) - { + public IIcon getIcon(int par1, int par2) + { return par1 == 1 ? this.furnaceIconTop : (par1 == 0 ? this.furnaceIconTop : (par1 != 3 ? this.blockIcon : this.furnaceIconFront[1])); - } + } + @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) - { + public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) + { - TileEntityFluidMachineBase tileEntity = (TileEntityFluidMachineBase)p_149673_1_.getTileEntity(x, y, z); + TileEntityFluidMachineBase tileEntity = (TileEntityFluidMachineBase) p_149673_1_.getTileEntity(x, y, z); - int meta = tileEntity.getDirection().ordinal();//p_149673_1_.getBlockMetadata(x, y, z); + int meta = tileEntity.getDirection().ordinal();//p_149673_1_.getBlockMetadata(x, y, z); return side == 1 ? (tileEntity.on ? this.furnaceIconTopOn : this.furnaceIconTop) : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isFuel() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); - } + } @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister par1IconRegister) - { - this.blockIcon = par1IconRegister.registerIcon("furnace_side"); - this.furnaceIconFront = new IIcon[2]; - this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); - this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); - this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top"); - this.furnaceIconTopOn = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top_on"); - } + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon("furnace_side"); + this.furnaceIconFront = new IIcon[2]; + this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); + this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); + this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top"); + this.furnaceIconTopOn = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top_on"); + } @Override public TileEntity createNewTileEntity(World par1World, int p_149915_2_) - { - return new TileEntityFluidFurnace(); - } + { + return new TileEntityFluidFurnace(); + } @Override public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) - { - int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; - TileEntityDirection tileEntity = (TileEntityDirection)par1World.getTileEntity(par2, par3, par4); - - if (l == 0) - { - //par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); - tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[2]; - } - - if (l == 1) - { - //par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); - tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[5]; - } - - if (l == 2) - { - //par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); - tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[3]; - } - - if (l == 3) - { - //par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); - tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[4]; - } - - } + { + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + TileEntityDirection tileEntity = (TileEntityDirection) par1World.getTileEntity(par2, par3, par4); + + if (l == 0) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[2]; + } + + if (l == 1) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[5]; + } + + if (l == 2) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[3]; + } + + if (l == 3) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[4]; + } + + } @Override public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) - { - if (!keepFurnaceInventory) - { - TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)par1World.getTileEntity(par2, par3, par4); + { + if (!keepFurnaceInventory) + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase) par1World.getTileEntity(par2, par3, par4); - if (tileentityfurnace != null) - { - for (int j1 = 0; j1 < tileentityfurnace.getSizeInventory(); ++j1) - { - ItemStack itemstack = tileentityfurnace.getStackInSlot(j1); + if (tileentityfurnace != null) + { + for (int j1 = 0; j1 < tileentityfurnace.getSizeInventory(); ++j1) + { + ItemStack itemstack = tileentityfurnace.getStackInSlot(j1); - this.dropItem(itemstack, par1World, par2, par3, par4); + this.dropItem(itemstack, par1World, par2, par3, par4); - } + } - par1World.func_147453_f(par2, par3, par4, par5); - } - } + par1World.func_147453_f(par2, par3, par4, par5); + } + } - super.breakBlock(par1World, par2, par3, par4, par5, par6); - } + super.breakBlock(par1World, par2, par3, par4, par5, par6); + } - private void dropItem(ItemStack itemstack ,World par1World,int par2, int par3, int par4){ + private void dropItem(ItemStack itemstack, World par1World, int par2, int par3, int par4) { if (itemstack != null) - { - float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F; - float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; - float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; - - while (itemstack.stackSize > 0) - { - int k1 = this.furnaceRand.nextInt(21) + 10; - - if (k1 > itemstack.stackSize) - { - k1 = itemstack.stackSize; - } - - itemstack.stackSize -= k1; - EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); - - if (itemstack.hasTagCompound()) - { - entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); - } - - float f3 = 0.05F; - entityitem.motionX = (float)this.furnaceRand.nextGaussian() * f3; - entityitem.motionY = (float)this.furnaceRand.nextGaussian() * f3 + 0.2F; - entityitem.motionZ = (float)this.furnaceRand.nextGaussian() * f3; - par1World.spawnEntityInWorld(entityitem); - } - } + { + float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + + while (itemstack.stackSize > 0) + { + int k1 = this.furnaceRand.nextInt(21) + 10; + + if (k1 > itemstack.stackSize) + { + k1 = itemstack.stackSize; + } + + itemstack.stackSize -= k1; + EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float) this.furnaceRand.nextGaussian() * f3; + entityitem.motionY = (float) this.furnaceRand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float) this.furnaceRand.nextGaussian() * f3; + par1World.spawnEntityInWorld(entityitem); + } + } } @Override public boolean hasComparatorInputOverride() - { - return true; - } + { + return true; + } - @Override + @Override public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) - { - return Container.calcRedstoneFromInventory((IInventory)par1World.getTileEntity(par2, par3, par4)); - } + { + return Container.calcRedstoneFromInventory((IInventory) par1World.getTileEntity(par2, par3, par4)); + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java b/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java index 4f32b90..286798b 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java +++ b/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java @@ -25,17 +25,17 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public abstract class BlockFluidMachineBase extends BlockContainer{ +public abstract class BlockFluidMachineBase extends BlockContainer { private final Random furnaceRand = new Random(); - private static boolean keepFurnaceInventory; + private static boolean keepFurnaceInventory; - @SideOnly(Side.CLIENT) - private IIcon furnaceIconTop; - @SideOnly(Side.CLIENT) - private IIcon[] furnaceIconFront; - @SideOnly(Side.CLIENT) + @SideOnly(Side.CLIENT) + private IIcon furnaceIconTop; + @SideOnly(Side.CLIENT) + private IIcon[] furnaceIconFront; + @SideOnly(Side.CLIENT) private IIcon furnaceIconTopOn; public BlockFluidMachineBase(Material material) { @@ -43,263 +43,261 @@ public BlockFluidMachineBase(Material material) { this.setHardness(1.0F); } - + @Override public int getLightValue(IBlockAccess world, int x, int y, int z) - { - TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)world.getTileEntity(x, y, z); - if(tileentityfurnace.isFuel())return 15; + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase) world.getTileEntity(x, y, z); + if (tileentityfurnace.isFuel()) return 15; return 0; - } + } @Override - public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) - { - if (par1World.isRemote) - { - return true; - } - else - { - TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)par1World.getTileEntity(par2, par3, par4); - - if(par5EntityPlayer.getCurrentEquippedItem() != null){ - if(par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof IHammer && ((IHammer)par5EntityPlayer.getCurrentEquippedItem().getItem()).canUse(par5EntityPlayer.getCurrentEquippedItem())){ - - tileentityfurnace.on = !tileentityfurnace.on; - ((IHammer)par5EntityPlayer.getCurrentEquippedItem().getItem()).use(par5EntityPlayer.getCurrentEquippedItem()); - par1World.markBlockForUpdate(par2, par3, par4); - return true; - - } - } - - - - if (tileentityfurnace != null) - { - par5EntityPlayer.openGui(SextiarySector.instance, 1, par1World, par2, par3, par4); - } - - return true; - } - } + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9) + { + if (par1World.isRemote) + { + return true; + } + else + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase) par1World.getTileEntity(par2, par3, par4); + + if (player.getCurrentEquippedItem() != null) { + if (player.getCurrentEquippedItem().getItem() instanceof IHammer && ((IHammer) player.getCurrentEquippedItem().getItem()).canUse(player.getCurrentEquippedItem(), player, 2)) { + + tileentityfurnace.on = !tileentityfurnace.on; + ((IHammer) player.getCurrentEquippedItem().getItem()).use(player.getCurrentEquippedItem(), player, 2); + par1World.markBlockForUpdate(par2, par3, par4); + return true; + + } + } + + if (tileentityfurnace != null) + { + player.openGui(SextiarySector.instance, 1, par1World, par2, par3, par4); + } + + return true; + } + } @Override public void onBlockAdded(World par1World, int par2, int par3, int par4) - { - super.onBlockAdded(par1World, par2, par3, par4); - } + { + super.onBlockAdded(par1World, par2, par3, par4); + } private void setDefaultDirection(World par1World, int par2, int par3, int par4) - { - if (!par1World.isRemote) - { - Block block = par1World.getBlock(par2, par3, par4 - 1); - Block block1 = par1World.getBlock(par2, par3, par4 + 1); - Block block2 = par1World.getBlock(par2 - 1, par3, par4); - Block block3 = par1World.getBlock(par2 + 1, par3, par4); - - TileEntityDirection tileEntity = (TileEntityDirection)par1World.getTileEntity(par2, par3, par4); - - - byte b0 = 3; - - if (block.func_149730_j() && !block1.func_149730_j()) - { - b0 = 3; - } - - if (block1.func_149730_j() && !block.func_149730_j()) - { - b0 = 2; - } - - if (block2.func_149730_j() && !block3.func_149730_j()) - { - b0 = 5; - } - - if (block3.func_149730_j() && !block2.func_149730_j()) - { - b0 = 4; - } - - //par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); - tileEntity.direction = ForgeDirection.getOrientation(b0); - } - } + { + if (!par1World.isRemote) + { + Block block = par1World.getBlock(par2, par3, par4 - 1); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); + + TileEntityDirection tileEntity = (TileEntityDirection) par1World.getTileEntity(par2, par3, par4); + + byte b0 = 3; + + if (block.func_149730_j() && !block1.func_149730_j()) + { + b0 = 3; + } + + if (block1.func_149730_j() && !block.func_149730_j()) + { + b0 = 2; + } + + if (block2.func_149730_j() && !block3.func_149730_j()) + { + b0 = 5; + } + + if (block3.func_149730_j() && !block2.func_149730_j()) + { + b0 = 4; + } + + //par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); + tileEntity.direction = ForgeDirection.getOrientation(b0); + } + } @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(int par1, int par2) - { + public IIcon getIcon(int par1, int par2) + { return par1 == 1 ? this.furnaceIconTop : (par1 == 0 ? this.furnaceIconTop : (par1 != 3 ? this.blockIcon : this.furnaceIconFront[1])); - } + } + @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) - { + public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) + { - TileEntityFluidMachineBase tileEntity = (TileEntityFluidMachineBase)p_149673_1_.getTileEntity(x, y, z); + TileEntityFluidMachineBase tileEntity = (TileEntityFluidMachineBase) p_149673_1_.getTileEntity(x, y, z); - int meta = tileEntity.getDirection().ordinal();//p_149673_1_.getBlockMetadata(x, y, z); + int meta = tileEntity.getDirection().ordinal();//p_149673_1_.getBlockMetadata(x, y, z); return side == 1 ? (tileEntity.on ? this.furnaceIconTopOn : this.furnaceIconTop) : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isFuel() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); - } + } @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister par1IconRegister) - { - this.blockIcon = par1IconRegister.registerIcon("furnace_side"); - this.furnaceIconFront = new IIcon[2]; - this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); - this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); - this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top"); - this.furnaceIconTopOn = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top_on"); - } + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon("furnace_side"); + this.furnaceIconFront = new IIcon[2]; + this.furnaceIconFront[0] = par1IconRegister.registerIcon("furnace_front_on"); + this.furnaceIconFront[1] = par1IconRegister.registerIcon("furnace_front_off"); + this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top"); + this.furnaceIconTopOn = par1IconRegister.registerIcon("sextiarysector:fluid_furnace_top_on"); + } @Override public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) - { - int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; - TileEntityDirection tileEntity = (TileEntityDirection)par1World.getTileEntity(par2, par3, par4); - - if (l == 0) - { - //par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); - tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[2]; - } - - if (l == 1) - { - //par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); - tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[5]; - } - - if (l == 2) - { - //par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); - tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[3]; - } - - if (l == 3) - { - //par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); - tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[4]; - } - - } + { + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + TileEntityDirection tileEntity = (TileEntityDirection) par1World.getTileEntity(par2, par3, par4); + + if (l == 0) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[2]; + } + + if (l == 1) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[5]; + } + + if (l == 2) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[3]; + } + + if (l == 3) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); + tileEntity.direction = ForgeDirection.VALID_DIRECTIONS[4]; + } + + } @Override public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) - { - if (!keepFurnaceInventory) - { - TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)par1World.getTileEntity(par2, par3, par4); + { + if (!keepFurnaceInventory) + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase) par1World.getTileEntity(par2, par3, par4); - if (tileentityfurnace != null) - { - for (int j1 = 0; j1 < tileentityfurnace.getSizeInventory(); ++j1) - { - ItemStack itemstack = tileentityfurnace.getStackInSlot(j1); + if (tileentityfurnace != null) + { + for (int j1 = 0; j1 < tileentityfurnace.getSizeInventory(); ++j1) + { + ItemStack itemstack = tileentityfurnace.getStackInSlot(j1); - this.dropItem(itemstack, par1World, par2, par3, par4); + this.dropItem(itemstack, par1World, par2, par3, par4); - } + } - par1World.func_147453_f(par2, par3, par4, par5); - } - } + par1World.func_147453_f(par2, par3, par4, par5); + } + } - super.breakBlock(par1World, par2, par3, par4, par5, par6); - } + super.breakBlock(par1World, par2, par3, par4, par5, par6); + } - private void dropItem(ItemStack itemstack ,World par1World,int par2, int par3, int par4){ + private void dropItem(ItemStack itemstack, World par1World, int par2, int par3, int par4) { if (itemstack != null) - { - float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F; - float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; - float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; - - while (itemstack.stackSize > 0) - { - int k1 = this.furnaceRand.nextInt(21) + 10; - - if (k1 > itemstack.stackSize) - { - k1 = itemstack.stackSize; - } - - itemstack.stackSize -= k1; - EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); - - if (itemstack.hasTagCompound()) - { - entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); - } - - float f3 = 0.05F; - entityitem.motionX = (float)this.furnaceRand.nextGaussian() * f3; - entityitem.motionY = (float)this.furnaceRand.nextGaussian() * f3 + 0.2F; - entityitem.motionZ = (float)this.furnaceRand.nextGaussian() * f3; - par1World.spawnEntityInWorld(entityitem); - } - } + { + float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + + while (itemstack.stackSize > 0) + { + int k1 = this.furnaceRand.nextInt(21) + 10; + + if (k1 > itemstack.stackSize) + { + k1 = itemstack.stackSize; + } + + itemstack.stackSize -= k1; + EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float) this.furnaceRand.nextGaussian() * f3; + entityitem.motionY = (float) this.furnaceRand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float) this.furnaceRand.nextGaussian() * f3; + par1World.spawnEntityInWorld(entityitem); + } + } } + @Override @SideOnly(Side.CLIENT) - public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) - { - TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); - - - if (tileentityfurnace.isFuel()) - { - int l = tileentityfurnace.getDirection().ordinal(); - float f = (float)p_149734_2_ + 0.5F; - float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; - float f2 = (float)p_149734_4_ + 0.5F; - float f3 = 0.52F; - float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; - - if (l == 4) - { - p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - } - else if (l == 5) - { - p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - } - else if (l == 2) - { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); - } - else if (l == 3) - { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - } - } - } + public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase) p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); + + if (tileentityfurnace.isFuel()) + { + int l = tileentityfurnace.getDirection().ordinal(); + float f = p_149734_2_ + 0.5F; + float f1 = p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; + float f2 = p_149734_4_ + 0.5F; + float f3 = 0.52F; + float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; + + if (l == 4) + { + p_149734_1_.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + } + else if (l == 5) + { + p_149734_1_.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + } + else if (l == 2) + { + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + } + else if (l == 3) + { + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + } + } + } @Override public boolean hasComparatorInputOverride() - { - return true; - } + { + return true; + } - @Override + @Override public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) - { - return Container.calcRedstoneFromInventory((IInventory)par1World.getTileEntity(par2, par3, par4)); - } + { + return Container.calcRedstoneFromInventory((IInventory) par1World.getTileEntity(par2, par3, par4)); + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java b/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java index c2b45b5..2f1f55b 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java +++ b/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java @@ -16,135 +16,134 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockFoodSmokers extends BlockFluidMachineBase{ +public class BlockFoodSmokers extends BlockFluidMachineBase { @SideOnly(Side.CLIENT) - private IIcon furnaceIconTop; - @SideOnly(Side.CLIENT) - private IIcon[] furnaceIconFront; - @SideOnly(Side.CLIENT) + private IIcon furnaceIconTop; + @SideOnly(Side.CLIENT) + private IIcon[] furnaceIconFront; + @SideOnly(Side.CLIENT) private IIcon furnaceIconTopOn; - public BlockFoodSmokers() { + public BlockFoodSmokers() { super(Material.iron); this.setHardness(1.0F); this.setStepSound(soundTypeMetal); } - @Override + @Override public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) - { - if (par1World.isRemote) - { - return true; - } - else - { - TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)par1World.getTileEntity(par2, par3, par4); - - if(par5EntityPlayer.getCurrentEquippedItem() != null){ - if(par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof IHammer && ((IHammer)par5EntityPlayer.getCurrentEquippedItem().getItem()).canUse(par5EntityPlayer.getCurrentEquippedItem())){ - - tileentityfurnace.on = !tileentityfurnace.on; - ((IHammer)par5EntityPlayer.getCurrentEquippedItem().getItem()).use(par5EntityPlayer.getCurrentEquippedItem()); - par1World.markBlockForUpdate(par2, par3, par4); - return true; - - } - } - - - - if (tileentityfurnace != null) - { - par5EntityPlayer.openGui(SextiarySector.instance, 2, par1World, par2, par3, par4); - } - - return true; - } - } + { + if (par1World.isRemote) + { + return true; + } + else + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase) par1World.getTileEntity(par2, par3, par4); + + if (par5EntityPlayer.getCurrentEquippedItem() != null) { + if (par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof IHammer && ((IHammer) par5EntityPlayer.getCurrentEquippedItem().getItem()).canUse(par5EntityPlayer.getCurrentEquippedItem(), par5EntityPlayer, 2)) { + + tileentityfurnace.on = !tileentityfurnace.on; + ((IHammer) par5EntityPlayer.getCurrentEquippedItem().getItem()).use(par5EntityPlayer.getCurrentEquippedItem(), par5EntityPlayer, 2); + par1World.markBlockForUpdate(par2, par3, par4); + return true; + + } + } + + if (tileentityfurnace != null) + { + par5EntityPlayer.openGui(SextiarySector.instance, 2, par1World, par2, par3, par4); + } + + return true; + } + } - @Override + @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(int par1, int par2) - { + public IIcon getIcon(int par1, int par2) + { return par1 == 1 ? this.furnaceIconTop : (par1 == 0 ? this.furnaceIconTop : (par1 != 3 ? this.blockIcon : this.furnaceIconFront[1])); - } + } + @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) - { + public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) + { - TileEntityFoodSmokers tileEntity = (TileEntityFoodSmokers)p_149673_1_.getTileEntity(x, y, z); + TileEntityFoodSmokers tileEntity = (TileEntityFoodSmokers) p_149673_1_.getTileEntity(x, y, z); - int meta = tileEntity.getDirection().ordinal();//p_149673_1_.getBlockMetadata(x, y, z); + int meta = tileEntity.getDirection().ordinal();//p_149673_1_.getBlockMetadata(x, y, z); return side == 1 ? (tileEntity.on ? this.furnaceIconTopOn : this.furnaceIconTop) : (side == 0 ? this.furnaceIconTop : (side != meta ? this.blockIcon : (tileEntity.isFuel() ? this.furnaceIconFront[0] : this.furnaceIconFront[1]))); - } + } @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister par1IconRegister) - { - this.blockIcon = par1IconRegister.registerIcon("sextiarysector:food_smokers_side"); - this.furnaceIconFront = new IIcon[2]; - this.furnaceIconFront[0] = par1IconRegister.registerIcon("sextiarysector:food_smokers_front_on"); - this.furnaceIconFront[1] = par1IconRegister.registerIcon("sextiarysector:food_smokers_front_off"); - this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:food_smokers_top"); - this.furnaceIconTopOn = par1IconRegister.registerIcon("sextiarysector:food_smokers_top_on"); - } + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon("sextiarysector:food_smokers_side"); + this.furnaceIconFront = new IIcon[2]; + this.furnaceIconFront[0] = par1IconRegister.registerIcon("sextiarysector:food_smokers_front_on"); + this.furnaceIconFront[1] = par1IconRegister.registerIcon("sextiarysector:food_smokers_front_off"); + this.furnaceIconTop = par1IconRegister.registerIcon("sextiarysector:food_smokers_top"); + this.furnaceIconTopOn = par1IconRegister.registerIcon("sextiarysector:food_smokers_top_on"); + } + @Override @SideOnly(Side.CLIENT) - public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) - { - TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase)p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); - - - if (tileentityfurnace.isFuel()) - { - int l = tileentityfurnace.getDirection().ordinal(); - - for(int i=0;i<5;i++){ - - float f = (float)p_149734_2_ + 0.5F; - float f1 = (float)p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; - float f2 = (float)p_149734_4_ + 0.5F; - float f3 = 0.52F; - float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; - - if (l == 4) - { - p_149734_1_.spawnParticle("explode", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - } - else if (l == 5) - { - p_149734_1_.spawnParticle("explode", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - } - else if (l == 2) - { - p_149734_1_.spawnParticle("explode", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); - } - else if (l == 3) - { - p_149734_1_.spawnParticle("explode", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - } - - } - - } - } + public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) + { + TileEntityFluidMachineBase tileentityfurnace = (TileEntityFluidMachineBase) p_149734_1_.getTileEntity(p_149734_2_, p_149734_3_, p_149734_4_); + + if (tileentityfurnace.isFuel()) + { + int l = tileentityfurnace.getDirection().ordinal(); + + for (int i = 0; i < 5; i++) { + + float f = p_149734_2_ + 0.5F; + float f1 = p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F; + float f2 = p_149734_4_ + 0.5F; + float f3 = 0.52F; + float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F; + + if (l == 4) + { + p_149734_1_.spawnParticle("explode", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + } + else if (l == 5) + { + p_149734_1_.spawnParticle("explode", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + } + else if (l == 2) + { + p_149734_1_.spawnParticle("explode", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + } + else if (l == 3) + { + p_149734_1_.spawnParticle("explode", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + } + + } + + } + } @Override public TileEntity createNewTileEntity(World par1World, int p_149915_2_) - { - return new TileEntityFoodSmokers(); - } + { + return new TileEntityFoodSmokers(); + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockGFTank.java b/src/main/java/shift/sextiarysector/block/BlockGFTank.java index e78441e..0659884 100644 --- a/src/main/java/shift/sextiarysector/block/BlockGFTank.java +++ b/src/main/java/shift/sextiarysector/block/BlockGFTank.java @@ -14,7 +14,7 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.api.SextiarySectorAPI; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.tileentity.TileEntityDirection; import shift.sextiarysector.tileentity.TileEntityGFTank; import cpw.mods.fml.relauncher.Side; @@ -71,7 +71,7 @@ public IIcon getIcon(IBlockAccess par1IBlockAccess, int par2, int par3, int par4 TileEntity t = par1IBlockAccess.getTileEntity(par2 + d.offsetX, par3 + d.offsetY, par4 + d.offsetZ); - if(t instanceof IEnergyHandler && ((IEnergyHandler) t).canInterface(d.getOpposite()))return in; + if(t instanceof IGFEnergyHandler && ((IGFEnergyHandler) t).canInterface(d.getOpposite()))return in; return this.blockIcon; } diff --git a/src/main/java/shift/sextiarysector/block/BlockGearBox.java b/src/main/java/shift/sextiarysector/block/BlockGearBox.java index 5a00214..3e2afd3 100644 --- a/src/main/java/shift/sextiarysector/block/BlockGearBox.java +++ b/src/main/java/shift/sextiarysector/block/BlockGearBox.java @@ -12,7 +12,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.SextiarySectorAPI; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.tileentity.TileEntityDirection; import shift.sextiarysector.tileentity.TileEntityGearBox; import cpw.mods.fml.relauncher.Side; @@ -47,7 +47,7 @@ public IIcon getIcon(IBlockAccess par1IBlockAccess, int par2, int par3, int par4 TileEntity t = par1IBlockAccess.getTileEntity(par2 + d.offsetX, par3 + d.offsetY, par4 + d.offsetZ); - if(t instanceof IEnergyHandler && ((IEnergyHandler) t).canInterface(d.getOpposite()))return out; + if(t instanceof IGFEnergyHandler && ((IGFEnergyHandler) t).canInterface(d.getOpposite()))return out; return this.blockIcon; } diff --git a/src/main/java/shift/sextiarysector/block/BlockGearShaft.java b/src/main/java/shift/sextiarysector/block/BlockGearShaft.java index 16fa8e9..55ea7ab 100644 --- a/src/main/java/shift/sextiarysector/block/BlockGearShaft.java +++ b/src/main/java/shift/sextiarysector/block/BlockGearShaft.java @@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockGearShaft extends BlockDirection{ +public class BlockGearShaft extends BlockDirection { private int type; @@ -45,23 +45,23 @@ public boolean isOpaqueCube() { @Override public int getRenderType() - { - return SextiarySector.proxy.GearShaftRenderType; - } + { + return SextiarySector.proxy.GearShaftRenderType; + } /* public int damageDropped(int p_149692_1_) - { - return p_149692_1_; - } + { + return p_149692_1_; + } @SideOnly(Side.CLIENT) - public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) - { + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) + { for(int i=0;i<5;i++){ p_149666_3_.add(new ItemStack(p_149666_1_,1,i)); } - }*/ + }*/ @Override public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) @@ -69,11 +69,11 @@ public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, double[] i = getBoxFromPool(par1IBlockAccess.getTileEntity(par2, par3, par4).getWorldObj(), par2, par3, par4); - float x = (float)i[0] ; - float y = (float)i[1] ; - float z = (float)i[2] ; + float x = (float) i[0]; + float y = (float) i[1]; + float z = (float) i[2]; - this.setBlockBounds((0.0F+x),(0.0F+y), (0.0F+z), (1.0F-x), (1.0F-y), (1.0F-z)); + this.setBlockBounds((0.0F + x), (0.0F + y), (0.0F + z), (1.0F - x), (1.0F - y), (1.0F - z)); } //当たり判定。サボテンやソウルサンドを参考にすると良い。ココの設定をすると、onEntityCollidedWithBlockが呼ばれるようになる @@ -82,11 +82,11 @@ public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, { double[] i = getBoxFromPool(par1World, par2, par3, par4); - double x = i[0] ; - double y = i[1] ; - double z = i[2] ; + double x = i[0]; + double y = i[1]; + double z = i[2]; - return AxisAlignedBB.getBoundingBox(par2+x, par3+y, par4+z, (par2 + 1)-x, (par3 + 1)-y, (par4 + 1)-z); + return AxisAlignedBB.getBoundingBox(par2 + x, par3 + y, par4 + z, (par2 + 1) - x, (par3 + 1) - y, (par4 + 1) - z); } //ブロックに視点を合わせた時に出てくる黒い線のアレ @@ -96,44 +96,46 @@ public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, i { double[] i = getBoxFromPool(par1World, par2, par3, par4); - double x = i[0] ; - double y = i[1] ; - double z = i[2] ; + double x = i[0]; + double y = i[1]; + double z = i[2]; GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); - return AxisAlignedBB.getBoundingBox(par2+x, par3+y, par4+z, (par2 + 1)-x, (par3 + 1)-y, (par4 + 1)-z); + return AxisAlignedBB.getBoundingBox(par2 + x, par3 + y, par4 + z, (par2 + 1) - x, (par3 + 1) - y, (par4 + 1) - z); } public double[] getBoxFromPool(World par1World, int par2, int par3, int par4) { double[] i = new double[3]; - i[0]=0;//x - i[1]=0;//y - i[2]=0;//z + i[0] = 0;//x + i[1] = 0;//y + i[2] = 0;//z - TileEntityDirection tileEntity = (TileEntityDirection)par1World.getTileEntity(par2, par3, par4); + if (!(par1World.getTileEntity(par2, par3, par4) instanceof TileEntityDirection)) return i; - if(tileEntity==null){ - return i ; + TileEntityDirection tileEntity = (TileEntityDirection) par1World.getTileEntity(par2, par3, par4); + + if (tileEntity == null) { + return i; } ForgeDirection d = tileEntity.direction; - if(d.ordinal()==0||d.ordinal()==1){ - i[0]=0.3125; - i[2]=0.3125; + if (d.ordinal() == 0 || d.ordinal() == 1) { + i[0] = 0.3125; + i[2] = 0.3125; } - if(d.ordinal()==2||d.ordinal()==3){ - i[0]=0.3125; - i[1]=0.3125; + if (d.ordinal() == 2 || d.ordinal() == 3) { + i[0] = 0.3125; + i[1] = 0.3125; } - if(d.ordinal()==4||d.ordinal()==5){ - i[1]=0.3125; - i[2]=0.3125; + if (d.ordinal() == 4 || d.ordinal() == 5) { + i[1] = 0.3125; + i[2] = 0.3125; } - return i ; + return i; } @Override @@ -141,13 +143,14 @@ public TileEntity createNewTileEntity(World world, int p_149915_2_) { return new TileEntityGearShaft(this.getType()); } + @Override @SideOnly(Side.CLIENT) - public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) - { + 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)); - p_149666_3_.add(new ItemStack(p_149666_1_,1,1)); - } + p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0)); + p_149666_3_.add(new ItemStack(p_149666_1_, 1, 1)); + } public int getType() { return type; diff --git a/src/main/java/shift/sextiarysector/block/BlockShaft.java b/src/main/java/shift/sextiarysector/block/BlockShaft.java index f71356c..243c98b 100644 --- a/src/main/java/shift/sextiarysector/block/BlockShaft.java +++ b/src/main/java/shift/sextiarysector/block/BlockShaft.java @@ -11,11 +11,12 @@ import shift.sextiarysector.SextiarySector; import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.fmp.IShaft; import shift.sextiarysector.tileentity.TileEntityShaft; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockShaft extends BlockDirection{ +public class BlockShaft extends BlockDirection { private int type; @@ -39,23 +40,23 @@ public boolean isOpaqueCube() { @Override public int getRenderType() - { - return SextiarySector.proxy.ShaftRenderType; - } + { + return SextiarySector.proxy.ShaftRenderType; + } /* public int damageDropped(int p_149692_1_) - { - return p_149692_1_; - } + { + return p_149692_1_; + } @SideOnly(Side.CLIENT) - public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) - { + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) + { for(int i=0;i<5;i++){ p_149666_3_.add(new ItemStack(p_149666_1_,1,i)); } - }*/ + }*/ @Override public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) @@ -63,11 +64,11 @@ public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, double[] i = getBoxFromPool(par1IBlockAccess.getTileEntity(par2, par3, par4).getWorldObj(), par2, par3, par4); - float x = (float)i[0] ; - float y = (float)i[1] ; - float z = (float)i[2] ; + float x = (float) i[0]; + float y = (float) i[1]; + float z = (float) i[2]; - this.setBlockBounds((0.0F+x),(0.0F+y), (0.0F+z), (1.0F-x), (1.0F-y), (1.0F-z)); + this.setBlockBounds((0.0F + x), (0.0F + y), (0.0F + z), (1.0F - x), (1.0F - y), (1.0F - z)); } //当たり判定。サボテンやソウルサンドを参考にすると良い。ココの設定をすると、onEntityCollidedWithBlockが呼ばれるようになる @@ -76,11 +77,11 @@ public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, { double[] i = getBoxFromPool(par1World, par2, par3, par4); - double x = i[0] ; - double y = i[1] ; - double z = i[2] ; + double x = i[0]; + double y = i[1]; + double z = i[2]; - return AxisAlignedBB.getBoundingBox(par2+x, par3+y, par4+z, (par2 + 1)-x, (par3 + 1)-y, (par4 + 1)-z); + return AxisAlignedBB.getBoundingBox(par2 + x, par3 + y, par4 + z, (par2 + 1) - x, (par3 + 1) - y, (par4 + 1) - z); } //ブロックに視点を合わせた時に出てくる黒い線のアレ @@ -90,44 +91,51 @@ public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, i { double[] i = getBoxFromPool(par1World, par2, par3, par4); - double x = i[0] ; - double y = i[1] ; - double z = i[2] ; + double x = i[0]; + double y = i[1]; + double z = i[2]; GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); - return AxisAlignedBB.getBoundingBox(par2+x, par3+y, par4+z, (par2 + 1)-x, (par3 + 1)-y, (par4 + 1)-z); + return AxisAlignedBB.getBoundingBox(par2 + x, par3 + y, par4 + z, (par2 + 1) - x, (par3 + 1) - y, (par4 + 1) - z); } public double[] getBoxFromPool(World par1World, int par2, int par3, int par4) { double[] i = new double[3]; - i[0]=0;//x - i[1]=0;//y - i[2]=0;//z + i[0] = 0;//x + i[1] = 0;//y + i[2] = 0;//z + + if (!(par1World.getTileEntity(par2, par3, par4) instanceof IShaft)) { + i[0] = 0.25f; + i[1] = 0.25f; + i[2] = 0.25f; + return i; + } - TileEntityShaft tileEntity = (TileEntityShaft)par1World.getTileEntity(par2, par3, par4); + IShaft tileEntity = (IShaft) par1World.getTileEntity(par2, par3, par4); - if(tileEntity==null){ - return i ; + if (tileEntity == null) { + return i; } - ForgeDirection d = tileEntity.direction; + ForgeDirection d = tileEntity.getDirection(); - if(d.ordinal()==0||d.ordinal()==1){ - i[0]=0.3125; - i[2]=0.3125; + if (d.ordinal() == 0 || d.ordinal() == 1) { + i[0] = 0.25; + i[2] = 0.25; } - if(d.ordinal()==2||d.ordinal()==3){ - i[0]=0.3125; - i[1]=0.3125; + if (d.ordinal() == 2 || d.ordinal() == 3) { + i[0] = 0.25; + i[1] = 0.25; } - if(d.ordinal()==4||d.ordinal()==5){ - i[1]=0.3125; - i[2]=0.3125; + if (d.ordinal() == 4 || d.ordinal() == 5) { + i[1] = 0.25; + i[2] = 0.25; } - return i ; + return i; } @Override @@ -143,5 +151,4 @@ public void setType(int type) { this.type = type; } - } diff --git a/src/main/java/shift/sextiarysector/block/BlockShippingBox.java b/src/main/java/shift/sextiarysector/block/BlockShippingBox.java index 6243cc0..04b20a6 100644 --- a/src/main/java/shift/sextiarysector/block/BlockShippingBox.java +++ b/src/main/java/shift/sextiarysector/block/BlockShippingBox.java @@ -1,22 +1,22 @@ package shift.sextiarysector.block; -import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChatComponentText; import net.minecraft.util.IIcon; import net.minecraft.world.World; import shift.mceconomy2.api.MCEconomyAPI; -import shift.sextiarysector.SSAchievement; import shift.sextiarysector.SSItems; -import shift.sextiarysector.module.ModuleStatistics; +import shift.sextiarysector.tileentity.TileEntityShippingBox; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockShippingBox extends Block{ +public class BlockShippingBox extends BlockContainer { private IIcon top; @@ -28,13 +28,52 @@ public BlockShippingBox() { @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { - if(par5EntityPlayer.getCurrentEquippedItem()==null){ - return false; + + TileEntityShippingBox s = (TileEntityShippingBox) world.getTileEntity(x, y, z); + ItemStack pItem = par5EntityPlayer.getCurrentEquippedItem(); + + if (!par5EntityPlayer.isSneaking() && pItem == null) { + + String name = par5EntityPlayer.getDisplayName(); + + if (s.player == null) { + + s.setPlayer(par5EntityPlayer); + + if (!world.isRemote) par5EntityPlayer.addChatMessage(new ChatComponentText("Set Owner : " + name)); + + } else if (s.player.equals(par5EntityPlayer.getGameProfile().getId())) { + + s.player = null; + + if (!world.isRemote) par5EntityPlayer.addChatMessage(new ChatComponentText("Delete Owner : " + name)); + + } + + return true; + } + + if (par5EntityPlayer.isSneaking() && pItem == null && (s.player == null || s.player.equals(par5EntityPlayer.getGameProfile().getId()))) { + + int mp = (int) s.mp; + + if (mp == 0) return true; + + MCEconomyAPI.addPlayerMP(par5EntityPlayer, mp, false); + s.mp -= mp; + par5EntityPlayer.worldObj.playSoundAtEntity(par5EntityPlayer, "mceconomy2:coin", 0.6f, 0.8f); + + return true; + } - if(!world.isRemote && par5EntityPlayer.getCurrentEquippedItem().getItem()==SSItems.hammer){ + if (pItem == null) return false; + + if (!world.isRemote && pItem.getItem() == SSItems.hammer) { - EntityItem item = new EntityItem(world, x+0.5d, y+0.5d, z+0.5d, new ItemStack(this,1)); + if (s.player != null && !s.player.equals(par5EntityPlayer.getGameProfile().getId())) return false; + + EntityItem item = new EntityItem(world, x + 0.5d, y + 0.5d, z + 0.5d, new ItemStack(this, 1)); world.spawnEntityInWorld(item); @@ -42,42 +81,50 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p return true; } - ItemStack item = par5EntityPlayer.getCurrentEquippedItem(); - - int i = MCEconomyAPI.getPurchase(item); - if(i==-2){ + int i = MCEconomyAPI.getPurchase(pItem); + if (i == -2) { return false; } - if(i==-1){ + if (i == -1) { return false; } - MCEconomyAPI.addPlayerMP(par5EntityPlayer, i,false); + /* + MCEconomyAPI.addPlayerMP(par5EntityPlayer, i, false); par5EntityPlayer.addStat(ModuleStatistics.objectSellStats[Item.getIdFromItem(item.getItem())], 1); par5EntityPlayer.addStat(SSAchievement.shipping, 1); - item.stackSize--; - world.playSoundAtEntity(par5EntityPlayer, "damage.fallsmall", 1.0F, 1.0F); + */ + + s.setInventorySlotContents(0, pItem.copy()); + pItem.stackSize = 0; + //item.stackSize--; + world.playSoundAtEntity(par5EntityPlayer, "game.neutral.hurt.fall.small", 1.0F, 1.0F); return true; } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister par1IconRegister) - { - this.blockIcon = par1IconRegister.registerIcon(this.getTextureName()); - this.top = par1IconRegister.registerIcon(this.getTextureName()+"_top"); + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon(this.getTextureName()); + this.top = par1IconRegister.registerIcon(this.getTextureName() + "_top"); - } + } @Override public IIcon getIcon(int par1, int par2) - { - if(par1==0||par1==1){ + { + if (par1 == 0 || par1 == 1) { return this.top; } - return this.blockIcon; - } + return this.blockIcon; + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityShippingBox(); + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockSimpleMachine.java b/src/main/java/shift/sextiarysector/block/BlockSimpleMachine.java index ba1d1fc..c1f0702 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSimpleMachine.java +++ b/src/main/java/shift/sextiarysector/block/BlockSimpleMachine.java @@ -5,7 +5,6 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; @@ -20,6 +19,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SSMaterials; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.recipe.RecipeSimpleMachine; import shift.sextiarysector.tileentity.TileEntitySimpleMachine; @@ -34,31 +34,31 @@ public class BlockSimpleMachine extends BlockContainer { private IIcon iconTop; @SideOnly(Side.CLIENT) private IIcon iconUnder; - private String frontIcon; + private final String frontIcon; @SideOnly(Side.CLIENT) private IIcon iconFront; - private int guiID; - private RecipeSimpleMachine recipe; + private final int guiID; + private final RecipeSimpleMachine recipe; private String guiuUnlocalizedName; - private int type; + private final int type; - public BlockSimpleMachine(String iconFront,int gui,RecipeSimpleMachine recipe,int type) { - super( Material.wood); + public BlockSimpleMachine(String iconFront, int gui, RecipeSimpleMachine recipe, int type) { + super(SSMaterials.machine); this.setHardness(3.0F); this.frontIcon = iconFront; this.guiID = gui; - this.recipe=recipe; - this.type =type; + this.recipe = recipe; + this.type = type; + this.setHarvestLevel("hammer", 1); IconName = ("sextiarysector:machine/machine"); } @Override @SideOnly(Side.CLIENT) - - public IIcon getIcon(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) - { - int d = ((TileEntitySimpleMachine)par1IBlockAccess.getTileEntity(par2, par3, par4)).direction.ordinal(); + public IIcon getIcon(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + int d = ((TileEntitySimpleMachine) par1IBlockAccess.getTileEntity(par2, par3, par4)).direction.ordinal(); if (par5 == 1) { @@ -71,13 +71,12 @@ else if (par5 == 0) else if (par5 == d) { return this.iconFront; - }else + } else { return this.blockIcon; } - - } + } @SideOnly(Side.CLIENT) @Override @@ -95,7 +94,7 @@ else if (par1 == 0) else if (par1 == 3) { return this.iconFront; - }else + } else { return this.blockIcon; } @@ -107,12 +106,12 @@ else if (par1 == 3) public void registerBlockIcons(IIconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon(IconName); - this.iconTop = par1IconRegister.registerIcon(IconName+"_top"); - this.iconUnder = par1IconRegister.registerIcon(IconName+"_under"); + this.iconTop = par1IconRegister.registerIcon(IconName + "_top"); + this.iconUnder = par1IconRegister.registerIcon(IconName + "_under"); //iconFront = new Icon[SimpleMachine.values().length]; - this.iconFront = par1IconRegister.registerIcon("sextiarysector:machine/"+this.frontIcon); + this.iconFront = par1IconRegister.registerIcon("sextiarysector:machine/" + this.frontIcon); /* for(int i =0;i 0) - { - int k1 = this.furnaceRand.nextInt(21) + 10; - - if (k1 > itemstack.stackSize) - { - k1 = itemstack.stackSize; - } - - itemstack.stackSize -= k1; - EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); - - if (itemstack.hasTagCompound()) - { - entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); - } - - float f3 = 0.05F; - entityitem.motionX = (float)this.furnaceRand.nextGaussian() * f3; - entityitem.motionY = (float)this.furnaceRand.nextGaussian() * f3 + 0.2F; - entityitem.motionZ = (float)this.furnaceRand.nextGaussian() * f3; - par1World.spawnEntityInWorld(entityitem); - } - } + { + float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F; + + while (itemstack.stackSize > 0) + { + int k1 = this.furnaceRand.nextInt(21) + 10; + + if (k1 > itemstack.stackSize) + { + k1 = itemstack.stackSize; + } + + itemstack.stackSize -= k1; + EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float) this.furnaceRand.nextGaussian() * f3; + entityitem.motionY = (float) this.furnaceRand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float) this.furnaceRand.nextGaussian() * f3; + par1World.spawnEntityInWorld(entityitem); + } + } } + @Override public Block setBlockName(String p_149663_1_) - { + { super.setBlockName(p_149663_1_); - this.guiuUnlocalizedName = p_149663_1_; - return this; - } + this.guiuUnlocalizedName = p_149663_1_; + return this; + } public String getGUIUnlocalizedName() - { - return this.guiuUnlocalizedName; - } + { + return this.guiuUnlocalizedName; + } - public ItemStack getResult(ItemStack itemstack){ + public ItemStack getResult(ItemStack itemstack) { return this.recipe.getResult(itemstack); } @Override - public TileEntity createNewTileEntity(World world,int i) { + public TileEntity createNewTileEntity(World world, int i) { return new TileEntitySimpleMachine(type); } diff --git a/src/main/java/shift/sextiarysector/container/InventoryRucksack.java b/src/main/java/shift/sextiarysector/container/InventoryRucksack.java index a684492..528ef16 100644 --- a/src/main/java/shift/sextiarysector/container/InventoryRucksack.java +++ b/src/main/java/shift/sextiarysector/container/InventoryRucksack.java @@ -8,181 +8,182 @@ import net.minecraft.nbt.NBTTagList; import shift.sextiarysector.player.EquipmentType; -public class InventoryRucksack implements IInventory +public class InventoryRucksack implements IInventory { - private IInventory inventoryPlayer; - private ItemStack currentItem; - private ItemStack[] items; - - public InventoryRucksack(InventoryPlayer inventory) - { - inventoryPlayer = inventory; - currentItem = ((InventoryPlayer)inventoryPlayer).getCurrentItem(); - - //InventorySize - items = new ItemStack[54]; - } - - public InventoryRucksack(InventoryPlayerNext inventory) - { - inventoryPlayer = inventory; - currentItem = inventoryPlayer.getStackInSlot(EquipmentType.Bag.getSlot()[0]); - - //InventorySize - items = new ItemStack[54]; - } - - @Override - public int getSizeInventory() - { - return items.length; - } - - @Override - public ItemStack getStackInSlot(int slot) - { - return items[slot]; - } - - @Override - public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) - { - if (this.items[p_70298_1_] != null) - { - ItemStack itemstack; - - if (this.items[p_70298_1_].stackSize <= p_70298_2_) - { - itemstack = this.items[p_70298_1_]; - this.items[p_70298_1_] = null; - this.markDirty(); - return itemstack; - } - else - { - itemstack = this.items[p_70298_1_].splitStack(p_70298_2_); - - if (this.items[p_70298_1_].stackSize == 0) - { - this.items[p_70298_1_] = null; - } - - this.markDirty(); - return itemstack; - } - } - return null; - } - - @Override - public ItemStack getStackInSlotOnClosing(int p_70304_1_) - { - if (this.items[p_70304_1_] != null) - { - ItemStack itemstack = this.items[p_70304_1_]; - this.items[p_70304_1_] = null; - return itemstack; - } - return null; - } - - @Override - public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) - { - this.items[p_70299_1_] = p_70299_2_; - - if (p_70299_2_ != null && p_70299_2_.stackSize > this.getInventoryStackLimit()) - { - p_70299_2_.stackSize = this.getInventoryStackLimit(); - } - - this.markDirty(); - } - - @Override - public String getInventoryName() - { - return "InventoryItem"; - } - - @Override - public boolean hasCustomInventoryName() - { - return false; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - @Override - public void markDirty() {} - - @Override - public boolean isUseableByPlayer(EntityPlayer p_70300_1_) - { - return true; - } - - /* - Containerが開かれたタイミングでItemStackの持っているNBTからアイテムを読み込んでいる - */ - @Override - public void openInventory() - { - if(!currentItem.hasTagCompound()) - { - currentItem.setTagCompound(new NBTTagCompound()); - currentItem.getTagCompound().setTag("Items", new NBTTagList()); - } - NBTTagList tags = (NBTTagList)currentItem.getTagCompound().getTag("Items"); - - for(int i = 0; i < tags.tagCount(); i++) - { - NBTTagCompound tagCompound = tags.getCompoundTagAt(i); - int slot = tagCompound.getByte("Slot"); - if(slot >= 0 && slot < items.length) - { - items[slot] = ItemStack.loadItemStackFromNBT(tagCompound); - } - } - } - - /* - Containerを閉じるときに保存 - */ - @Override - public void closeInventory() - { - NBTTagList tagList = new NBTTagList(); - for(int i = 0; i < items.length; i++) - { - if(items[i] != null) - { - NBTTagCompound compound = new NBTTagCompound(); - compound.setByte("Slot", (byte)i); - items[i].writeToNBT(compound); - tagList.appendTag(compound); - } - } - ItemStack result = new ItemStack(currentItem.getItem(), 1); - result.setTagCompound(new NBTTagCompound()); - result.getTagCompound().setTag("Items", tagList); - - //ItemStackをセットする。NBTは右クリック等のタイミングでしか保存されないため再セットで保存している。 - if(inventoryPlayer instanceof InventoryPlayer){ - ((InventoryPlayer)inventoryPlayer).mainInventory[((InventoryPlayer)inventoryPlayer).currentItem] = result; - }else if(inventoryPlayer instanceof InventoryPlayerNext){ - inventoryPlayer.setInventorySlotContents(EquipmentType.Bag.getSlot()[0], result); - } - - } - - @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) - { - return true; - } + private final IInventory inventoryPlayer; + private final ItemStack currentItem; + private final ItemStack[] items; + + public InventoryRucksack(InventoryPlayer inventory) + { + inventoryPlayer = inventory; + currentItem = ((InventoryPlayer) inventoryPlayer).getCurrentItem(); + + //InventorySize + items = new ItemStack[27]; + } + + public InventoryRucksack(InventoryPlayerNext inventory) + { + inventoryPlayer = inventory; + currentItem = inventoryPlayer.getStackInSlot(EquipmentType.Bag.getSlot()[0]); + + //InventorySize + items = new ItemStack[27]; + } + + @Override + public int getSizeInventory() + { + return items.length; + } + + @Override + public ItemStack getStackInSlot(int slot) + { + return items[slot]; + } + + @Override + public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) + { + if (this.items[p_70298_1_] != null) + { + ItemStack itemstack; + + if (this.items[p_70298_1_].stackSize <= p_70298_2_) + { + itemstack = this.items[p_70298_1_]; + this.items[p_70298_1_] = null; + this.markDirty(); + return itemstack; + } + else + { + itemstack = this.items[p_70298_1_].splitStack(p_70298_2_); + + if (this.items[p_70298_1_].stackSize == 0) + { + this.items[p_70298_1_] = null; + } + + this.markDirty(); + return itemstack; + } + } + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(int p_70304_1_) + { + if (this.items[p_70304_1_] != null) + { + ItemStack itemstack = this.items[p_70304_1_]; + this.items[p_70304_1_] = null; + return itemstack; + } + return null; + } + + @Override + public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) + { + this.items[p_70299_1_] = p_70299_2_; + + if (p_70299_2_ != null && p_70299_2_.stackSize > this.getInventoryStackLimit()) + { + p_70299_2_.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + @Override + public String getInventoryName() + { + return "InventoryItem"; + } + + @Override + public boolean hasCustomInventoryName() + { + return false; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + @Override + public void markDirty() { + } + + @Override + public boolean isUseableByPlayer(EntityPlayer p_70300_1_) + { + return true; + } + + /* + Containerが開かれたタイミングでItemStackの持っているNBTからアイテムを読み込んでいる + */ + @Override + public void openInventory() + { + if (!currentItem.hasTagCompound()) + { + currentItem.setTagCompound(new NBTTagCompound()); + currentItem.getTagCompound().setTag("Items", new NBTTagList()); + } + NBTTagList tags = (NBTTagList) currentItem.getTagCompound().getTag("Items"); + + for (int i = 0; i < tags.tagCount(); i++) + { + NBTTagCompound tagCompound = tags.getCompoundTagAt(i); + int slot = tagCompound.getByte("Slot"); + if (slot >= 0 && slot < items.length) + { + items[slot] = ItemStack.loadItemStackFromNBT(tagCompound); + } + } + } + + /* + Containerを閉じるときに保存 + */ + @Override + public void closeInventory() + { + NBTTagList tagList = new NBTTagList(); + for (int i = 0; i < items.length; i++) + { + if (items[i] != null) + { + NBTTagCompound compound = new NBTTagCompound(); + compound.setByte("Slot", (byte) i); + items[i].writeToNBT(compound); + tagList.appendTag(compound); + } + } + ItemStack result = new ItemStack(currentItem.getItem(), 1); + result.setTagCompound(new NBTTagCompound()); + result.getTagCompound().setTag("Items", tagList); + + //ItemStackをセットする。NBTは右クリック等のタイミングでしか保存されないため再セットで保存している。 + if (inventoryPlayer instanceof InventoryPlayer) { + ((InventoryPlayer) inventoryPlayer).mainInventory[((InventoryPlayer) inventoryPlayer).currentItem] = result; + } else if (inventoryPlayer instanceof InventoryPlayerNext) { + inventoryPlayer.setInventorySlotContents(EquipmentType.Bag.getSlot()[0], result); + } + + } + + @Override + public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) + { + return true; + } } diff --git a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java index 8d87f3d..333d325 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java @@ -1,9 +1,11 @@ package shift.sextiarysector.event; +import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; +import net.minecraftforge.event.entity.player.PlayerEvent; import shift.sextiarysector.SSItems; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.player.EquipmentStats; @@ -49,6 +51,8 @@ public float getMaxMove() { } + //Unit関係のEvent + @SubscribeEvent public void playerAttackEvent(LivingHurtEvent event) { @@ -88,4 +92,40 @@ public void playeDefenseEvent(LivingHurtEvent event) { } } + + @SubscribeEvent + public void playeHarvestCheckEvent(PlayerEvent.HarvestCheck event) { + + if (!(event.entity instanceof EntityPlayer)) return; + + EquipmentStats e = EntityPlayerManager.getEquipmentStats((EntityPlayer) event.entity); + + Block block = event.block; + + for (int i = 0; i < EquipmentType.Unit.getSlot().length; i++) { + + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlot()[i]); + + if (item == null) continue; + + if (item.getItem() == null) continue; + + if (item.getItem() == SSItems.pickaxeUnit) { + + for (int meta = 0; meta < 16; meta++) { + String tool = block.getHarvestTool(meta); + + if (tool == null) continue; + + if (tool.equals("pickaxe") && block.getHarvestLevel(meta) <= 1) { + event.success = true; + } + } + + } + + } + + } + } diff --git a/src/main/java/shift/sextiarysector/fmp/IShaft.java b/src/main/java/shift/sextiarysector/fmp/IShaft.java new file mode 100644 index 0000000..5d84647 --- /dev/null +++ b/src/main/java/shift/sextiarysector/fmp/IShaft.java @@ -0,0 +1,23 @@ +package shift.sextiarysector.fmp; + +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.machine.energy.EnergyStorage; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; + +public interface IShaft extends IGFEnergyHandler { + + public void setDirection(ForgeDirection d); + + public ForgeDirection getDirection(); + + public void setRotateStep(float r); + + public float getRotateStep(); + + public EnergyStorage getStorage(); + + public IShaft getInTileEntityShaft(); + + public IShaft getOutTileEntityShaft(); + +} diff --git a/src/main/java/shift/sextiarysector/fmp/ItemBlockShaftPart.java b/src/main/java/shift/sextiarysector/fmp/ItemBlockShaftPart.java new file mode 100644 index 0000000..708e9f7 --- /dev/null +++ b/src/main/java/shift/sextiarysector/fmp/ItemBlockShaftPart.java @@ -0,0 +1,94 @@ +package shift.sextiarysector.fmp; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; +import shift.sextiarysector.tileentity.TileEntityShaft; +import codechicken.lib.raytracer.RayTracer; +import codechicken.lib.vec.BlockCoord; +import codechicken.lib.vec.Vector3; + +public class ItemBlockShaftPart extends ItemBlock { + + public ItemBlockShaftPart(Block par1) { + super(par1); + } + + @Override + public boolean onItemUse(ItemStack itemStack, EntityPlayer par2EntityPlayer, World par3World, int x, int y, int z, + int side, float hitX, float hitY, float hitZ) + { + MovingObjectPosition hit = RayTracer.reTrace(par3World, par2EntityPlayer); + if (hit == null) { + return false; + } + BlockCoord pos = new BlockCoord(x, y, z); + Vector3 vhit = new Vector3(hitX, hitY, hitZ); + double d = getHitDepth(vhit, side); + if ((d < 1.0D) && (place(itemStack, par2EntityPlayer, par3World, pos, side, vhit))) { + return true; + } + pos.offset(side); + return place(itemStack, par2EntityPlayer, par3World, pos, side, vhit); + + } + + double getHitDepth(Vector3 vhit, int side) + { + return vhit.copy().scalarProject(codechicken.lib.vec.Rotation.axes[side]) + (side % 2 ^ 0x1); + } + + private boolean place(ItemStack item, EntityPlayer player, World world, BlockCoord pos, int side, Vector3 vhit) + { + ShaftPart part = newPart(item, player, world, pos, side, vhit); + if ((part == null) || (!PartRegistry.canPlacePart(world, pos, part))) { + return false; + } + if (!world.isRemote) + { + PartRegistry.addPart(world, pos, part); + world.playSoundEffect(pos.x + 0.5, pos.y + 0.5, pos.z + 0.5, + part.getBlock().stepSound.soundName, + (part.getBlock().stepSound.getVolume() + 1.0F) / 2.0F, + part.getBlock().stepSound.getPitch() * 0.8F); + if (!player.capabilities.isCreativeMode) + { + item.stackSize--; + if (item.stackSize == 0) + { + player.inventory.mainInventory[player.inventory.currentItem] = null; + MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(player, item)); + } + } + } + return true; + } + + public ShaftPart newPart(ItemStack arg0, EntityPlayer arg1, World arg2, BlockCoord arg3, int arg4, Vector3 arg5) + { + return new ShaftPart(1, ForgeDirection.getOrientation(arg4), arg2, arg3.x, arg3.y, arg3.z); + } + + @Override + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) + { + boolean result = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata); + TileEntityShaft tile = (TileEntityShaft) world.getTileEntity(x, y, z); + tile.direction = ForgeDirection.getOrientation(side); + + return result; + } + + /* + @Override + public boolean canPlaceItemBlockOnSide(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer, ItemStack par7ItemStack) + { + return true; + }*/ +} diff --git a/src/main/java/shift/sextiarysector/fmp/PartRegistry.java b/src/main/java/shift/sextiarysector/fmp/PartRegistry.java new file mode 100644 index 0000000..ebb18b0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/fmp/PartRegistry.java @@ -0,0 +1,86 @@ +package shift.sextiarysector.fmp; + +import java.util.Arrays; + +import net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntityShaft; +import codechicken.lib.packet.PacketCustom; +import codechicken.lib.vec.BlockCoord; +import codechicken.multipart.MultiPartRegistry; +import codechicken.multipart.MultiPartRegistry.IPartConverter; +import codechicken.multipart.MultiPartRegistry.IPartFactory; +import codechicken.multipart.MultipartGenerator; +import codechicken.multipart.TMultiPart; +import codechicken.multipart.TileMultipart; + +public class PartRegistry implements IPartFactory, IPartConverter { + + public static PartRegistry instance = new PartRegistry(); + + @Override + public Iterable blockTypes() { + return Arrays.asList( + SSBlocks.woodShaft, + SSBlocks.stoneShaft, + SSBlocks.steelShaft, + SSBlocks.ninjaShaft, + SSBlocks.orichalcumShaft + ); + } + + public static void init() + { + //PartRegistry p = new PartRegistry(); + MinecraftForge.EVENT_BUS.register(new ShaftEventHandler()); + PacketCustom.assignHandler(SextiarySector.instance, new SSMultipartSPH()); + MultiPartRegistry.registerConverter(instance); + + MultipartGenerator.registerPassThroughInterface("shift.sextiarysector.fmp.IShaft"); + MultiPartRegistry.registerParts(instance, new String[] { + "sextiarysector:wood_shaft", + "sextiarysector:stone_shaft", + "sextiarysector:steel_shaft", + "sextiarysector:ninja_shaft", + "sextiarysector:orichalcum_shaft" + }); + } + + @Override + public TMultiPart convert(World world, BlockCoord pos) { + Block b = world.getBlock(pos.x, pos.y, pos.z); + int meta = world.getBlockMetadata(pos.x, pos.y, pos.z); + TileEntity tile = world.getTileEntity(pos.x, pos.y, pos.z); + if (b == SSBlocks.woodShaft) return new ShaftPart((TileEntityShaft) tile); + if (b == SSBlocks.stoneShaft) return new ShaftPart((TileEntityShaft) tile); + if (b == SSBlocks.steelShaft) return new ShaftPart((TileEntityShaft) tile); + if (b == SSBlocks.ninjaShaft) return new ShaftPart((TileEntityShaft) tile); + if (b == SSBlocks.orichalcumShaft) return new ShaftPart((TileEntityShaft) tile); + return null; + } + + @Override + public TMultiPart createPart(String name, boolean client) { + + if (name.equals("sextiarysector:wood_shaft")) return new ShaftPart(1); + if (name.equals("sextiarysector:stone_shaft")) return new ShaftPart(2); + if (name.equals("sextiarysector:steel_shaft")) return new ShaftPart(3); + if (name.equals("sextiarysector:ninja_shaft")) return new ShaftPart(4); + if (name.equals("sextiarysector:orichalcum_shaft")) return new ShaftPart(5); + + return null; + } + + public static boolean canPlacePart(World world, BlockCoord pos, ShaftPart part) { + return TileMultipart.canPlacePart(world, pos, part); + } + + public static void addPart(World world, BlockCoord pos, ShaftPart part) { + TileMultipart.addPart(world, pos, part); + } + +} diff --git a/src/main/java/shift/sextiarysector/fmp/SSMultipartSPH.java b/src/main/java/shift/sextiarysector/fmp/SSMultipartSPH.java new file mode 100644 index 0000000..5ef51ee --- /dev/null +++ b/src/main/java/shift/sextiarysector/fmp/SSMultipartSPH.java @@ -0,0 +1,22 @@ +package shift.sextiarysector.fmp; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.network.play.INetHandlerPlayServer; +import shift.sextiarysector.SextiarySector; +import codechicken.lib.packet.PacketCustom; +import codechicken.lib.packet.PacketCustom.IServerPacketHandler; + +public class SSMultipartSPH implements IServerPacketHandler +{ + public static Object channel = SextiarySector.instance; + + @Override + public void handlePacket(PacketCustom packet, EntityPlayerMP sender, INetHandlerPlayServer netHandler) { + switch (packet.getType()) { + case 1: + ShaftEventHandler.place(sender, sender.worldObj); + break; + } + } + +} diff --git a/src/main/java/shift/sextiarysector/fmp/ShaftEventHandler.java b/src/main/java/shift/sextiarysector/fmp/ShaftEventHandler.java new file mode 100644 index 0000000..14eb1c9 --- /dev/null +++ b/src/main/java/shift/sextiarysector/fmp/ShaftEventHandler.java @@ -0,0 +1,121 @@ +package shift.sextiarysector.fmp; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; +import shift.sextiarysector.SSBlocks; +import codechicken.lib.packet.PacketCustom; +import codechicken.lib.raytracer.RayTracer; +import codechicken.lib.vec.BlockCoord; +import codechicken.lib.vec.Vector3; +import codechicken.multipart.TileMultipart; +import codechicken.multipart.minecraft.McBlockPart; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +public class ShaftEventHandler { + + private final ThreadLocal placing = new ThreadLocal(); + + @SubscribeEvent(priority = EventPriority.LOW) + public void playerInteract(PlayerInteractEvent event) + { + + if (event.action == Action.RIGHT_CLICK_BLOCK && event.entityPlayer.worldObj.isRemote) + { + if (placing.get() != null) return;//for mods that do dumb stuff and call this event like MFR + placing.set(event); + if (place(event.entityPlayer, event.entityPlayer.worldObj)) event.setCanceled(true); + placing.set(null); + } + } + + public static boolean place(EntityPlayer player, World world) + { + MovingObjectPosition hit = RayTracer.reTrace(world, player); + if (hit == null) + return false; + + BlockCoord pos = new BlockCoord(hit.blockX, hit.blockY, hit.blockZ).offset(hit.sideHit); + ItemStack held = player.getHeldItem(); + McBlockPart part = null; + if (held == null) + return false; + + Block heldBlock = Block.getBlockFromItem(held.getItem()); + if (heldBlock == Blocks.air) + return false; + + if (heldBlock == SSBlocks.woodShaft) part = ShaftPart.placement(1, world, pos, player, hit.sideHit); + if (heldBlock == SSBlocks.stoneShaft) part = ShaftPart.placement(2, world, pos, player, hit.sideHit); + if (heldBlock == SSBlocks.steelShaft) part = ShaftPart.placement(3, world, pos, player, hit.sideHit); + if (heldBlock == SSBlocks.ninjaShaft) part = ShaftPart.placement(4, world, pos, player, hit.sideHit); + if (heldBlock == SSBlocks.orichalcumShaft) part = ShaftPart.placement(5, world, pos, player, hit.sideHit); + + if (part == null) return false; + + if (world.isRemote && !player.isSneaking())//attempt to use block activated like normal and tell the server the right stuff + { + Vector3 f = new Vector3(hit.hitVec).add(-hit.blockX, -hit.blockY, -hit.blockZ); + Block block = world.getBlock(hit.blockX, hit.blockY, hit.blockZ); + if (!ignoreActivate(block) && block.onBlockActivated(world, hit.blockX, hit.blockY, hit.blockZ, player, hit.sideHit, (float) f.x, (float) f.y, (float) f.z)) + { + player.swingItem(); + PacketCustom.sendToServer(new C08PacketPlayerBlockPlacement( + hit.blockX, hit.blockY, hit.blockZ, hit.sideHit, + player.inventory.getCurrentItem(), + (float) f.x, (float) f.y, (float) f.z)); + return true; + } + } + + TileMultipart tile = TileMultipart.getOrConvertTile(world, pos); + if (tile == null || !tile.canAddPart(part)) + return false; + + if (!world.isRemote) + { + + TileMultipart.addPart(world, pos, part); + world.playSoundEffect(pos.x + 0.5, pos.y + 0.5, pos.z + 0.5, + part.getBlock().stepSound.func_150496_b(), + (part.getBlock().stepSound.getVolume() + 1.0F) / 2.0F, + part.getBlock().stepSound.getPitch() * 0.8F); + if (!player.capabilities.isCreativeMode) + { + held.stackSize--; + if (held.stackSize == 0) + { + player.inventory.mainInventory[player.inventory.currentItem] = null; + MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(player, held)); + } + } + } + else + { + player.swingItem(); + new PacketCustom(SSMultipartSPH.channel, 1).sendToServer(); + } + return true; + } + + /** + * Because vanilla is weird. + */ + private static boolean ignoreActivate(Block block) + { + if (block instanceof BlockFence) + return true; + return false; + } + +} diff --git a/src/main/java/shift/sextiarysector/fmp/ShaftPart.java b/src/main/java/shift/sextiarysector/fmp/ShaftPart.java new file mode 100644 index 0000000..65724a0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/fmp/ShaftPart.java @@ -0,0 +1,490 @@ +package shift.sextiarysector.fmp; + +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.api.machine.energy.EnergyStorage; +import shift.sextiarysector.api.machine.item.IHammer; +import shift.sextiarysector.renderer.block.RendererShaft; +import shift.sextiarysector.renderer.model.ModelShaft; +import shift.sextiarysector.tileentity.TileEntityShaft; +import codechicken.lib.data.MCDataInput; +import codechicken.lib.data.MCDataOutput; +import codechicken.lib.vec.BlockCoord; +import codechicken.lib.vec.Cuboid6; +import codechicken.lib.vec.Vector3; +import codechicken.multipart.JIconHitEffects; +import codechicken.multipart.JNormalOcclusion; +import codechicken.multipart.TMultiPart; +import codechicken.multipart.minecraft.McBlockPart; + +public class ShaftPart extends McBlockPart implements JNormalOcclusion, JIconHitEffects, IShaft { + + //public TileEntityShaft shaft = new TileEntityShaft(); + + //public ForgeDirection direction = ForgeDirection.UNKNOWN; + public TileEntityShaft tShaft = null; + public int sType = 0; + + double minX = 0.25D; + double minY = 0.25D; + double minZ = 0.25D; + double maxX = 0.75D; + double maxY = 0.75D; + double maxZ = 0.75D; + private final Cuboid6 minmam = new Cuboid6(0.1875D, 0.1875D, 0.1875D, 0.8125D, 0.8125D, 0.8125D); + + public ShaftPart(int type, ForgeDirection d, World w, int x, int y, int z) { + //this.direction = d; + TileEntityShaft shaft = new TileEntityShaft(type); + shaft.setDirection(d); + shaft.setWorldObj(w); + shaft.xCoord = x; + shaft.yCoord = y; + shaft.zCoord = z; + + this.tShaft = shaft; + this.sType = type; + this.directionChange(); + + } + + public ShaftPart(TileEntityShaft t) { + this.tShaft = t; + this.sType = t.getStorage().getMaxPower(); + this.directionChange(); + } + + public ShaftPart(int type) { + sType = type; + } + + @Override + public Block getBlock() + { + switch (this.sType) { + case 1: + return SSBlocks.woodShaft; + case 2: + return SSBlocks.stoneShaft; + case 3: + return SSBlocks.steelShaft; + case 4: + return SSBlocks.ninjaShaft; + case 5: + return SSBlocks.orichalcumShaft; + } + return SSBlocks.woodShaft; + } + + public int rotateStep = 360; + + @Override + public void update() + { + + //if (rotateStep <= 0) { + // rotateStep += 360; + //} + + //rotateStep -= 2.2; + this.tShaft.setWorldObj(this.world()); + this.tShaft.xCoord = this.x(); + this.tShaft.yCoord = this.y(); + this.tShaft.zCoord = this.z(); + if (this.sType != 0 && this.tShaft.getStorage().getMaxPower() != this.sType) this.tShaft.getStorage().setPowerCapacity(this.sType); + + if (!this.tShaft.getWorldObj().isRemote & this.tShaft.getStorage().getSpeedStored() != this.tShaft.lastSpeed) { + this.tShaft.lastSpeed = (this.tShaft.getStorage().getSpeedStored()); + + sendDescUpdate(); + tile().notifyPartChange(this); + tile().markDirty(); + + } + + this.tShaft.updateEntity(); + + } + + @Override + public boolean activate(EntityPlayer player, MovingObjectPosition part, ItemStack item) + { + + if (item == null || !(item.getItem() instanceof IHammer)) return false; + + World world = world(); + if (world.isRemote) return true; + + //IShaft t = (IShaft) this.world().getTileEntity(this.x(), this.y(), this.z()); + + if (!player.isSneaking()) { + this.changeToHammer(player, part, item); + } else { + //System.out.println("AA"); + //this.breakToHammer(player, part, item); + } + + //this.world().markBlockForUpdate(this.x(), this.y(), this.z()); + + sendDescUpdate(); + tile().notifyPartChange(this); + tile().markDirty(); + + return true; + + } + + private void changeToHammer(EntityPlayer player, MovingObjectPosition part, ItemStack item) { + + if (!((IHammer) item.getItem()).canUse(item, player, 2)) return; + + IShaft t = (IShaft) this.world().getTileEntity(this.x(), this.y(), this.z()); + + ForgeDirection d = t.getDirection(); + + if (d.ordinal() > 4) { + t.setDirection(d.getOrientation(0)); + } else { + t.setDirection(d.getOrientation(d.ordinal() + 1)); + } + + ((IHammer) item.getItem()).use(item, player, 2); + + directionChange(); + this.world().playSoundEffect(this.x(), this.y(), this.z(), this.getBlock().stepSound.getStepResourcePath(), 1.0F, this.world().rand.nextFloat() * 0.1F + 0.6F); + + } + + private void breakToHammer(EntityPlayer player, MovingObjectPosition part, ItemStack item) { + + if (!((IHammer) item.getItem()).canUse(item, player, 10)) return; + + List l = this.tile().jPartList(); + + Iterator i = l.iterator(); + + while (i.hasNext()) { + + if (i == this) { + + EntityItem eItem = new EntityItem(player.worldObj, this.x() + 0.5d, this.y() + 0.5d, this.z() + 0.5d, new ItemStack(this.getBlock(), 1)); + + player.worldObj.spawnEntityInWorld(eItem); + + ((IHammer) item.getItem()).use(item, player, 10); + + //i.remove(); + this.tile().remPart(this); + + } + + } + + } + + public static McBlockPart placement(int type, World world, BlockCoord pos, EntityPlayer player, int side) + { + //pos = pos.copy().offset(side ^ 1); + //if (!world.isSideSolid(pos.x, pos.y, pos.z, ForgeDirection.getOrientation(side))) + // return null; + + //int meta = sideMetaMap[side ^ 1]; + //if (side < 2 && (MathHelper.floor_double(player.rotationYaw / 90 + 0.5) & 1) == 0) + // meta = metaSwapMap[side ^ 1]; + + return new ShaftPart(type, ForgeDirection.getOrientation(side), world, pos.x, pos.y, pos.z); + + } + + private static final ResourceLocation shaftTextures = new ResourceLocation("sextiarysector:textures/models/shaft.png"); + static public ModelShaft modelShaft = new ModelShaft(); + + @Override + public void renderDynamic(Vector3 pos, float frame, int pass) + { + + /*this.tShaft.setWorldObj(this.world()); + this.tShaft.xCoord = this.x(); + this.tShaft.yCoord = this.y(); + this.tShaft.zCoord = this.z();*/ + + getShaft(); + + this.directionChange(); + + RendererShaft.renderTileEntityAt2(this.world().getTileEntity(this.x(), this.y(), this.z()), pos.x, pos.y, pos.z, frame); + + } + + @Override + public Cuboid6 getBounds() { + + /*this.tShaft.setWorldObj(this.world()); + this.tShaft.xCoord = this.x(); + this.tShaft.yCoord = this.y(); + this.tShaft.zCoord = this.z();*/ + + getShaft(); + + directionChange(); + return new Cuboid6(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ); + } + + @Override + public Iterable getOcclusionBoxes() { + + return Arrays.asList(new Cuboid6[] { this.getBounds() }); + + } + + @Override + public Iterable getCollisionBoxes() + { + return Arrays.asList(new Cuboid6[] { this.getBounds() }); + } + + @Override + public String getType() { + + switch (this.sType) { + case 1: + return "sextiarysector:wood_shaft"; + case 2: + return "sextiarysector:stone_shaft"; + case 3: + return "sextiarysector:steel_shaft"; + case 4: + return "sextiarysector:ninja_shaft"; + case 5: + return "sextiarysector:orichalcum_shaft"; + } + return "sextiarysector:wood_shaft"; + } + + private void directionChange() + { + if (tShaft.getDirection().ordinal() == 0 || tShaft.getDirection().ordinal() == 1) { + minY = 0; + maxY = 1; + minZ = 0.25D; + maxZ = 0.75D; + minX = 0.25D; + maxX = 0.75D; + } else if (tShaft.getDirection().ordinal() == 2 || tShaft.getDirection().ordinal() == 3) { + minZ = 0; + maxZ = 1; + minX = 0.25D; + maxX = 0.75D; + minY = 0.25D; + maxY = 0.75D; + } else if (tShaft.getDirection().ordinal() == 4 || tShaft.getDirection().ordinal() == 5) { + minX = 0; + maxX = 1; + minZ = 0.25D; + maxZ = 0.75D; + minY = 0.25D; + maxY = 0.75D; + } + } + + @Override + public Iterable getDrops() + { + return Arrays.asList(new ItemStack[] { new ItemStack(this.getBlock(), 1, 0) }); + } + + @Override + public ItemStack pickItem(MovingObjectPosition hit) + { + return new ItemStack(this.getBlock(), 1, 0); + } + + @Override + public IIcon getBreakingIcon(Object arg0, int arg1) { + return Blocks.stone.getIcon(0, 0); + } + + @Override + public IIcon getBrokenIcon(int arg0) { + return Blocks.stone.getIcon(0, 0); + } + + private TileEntityShaft getShaft() { + + if (tShaft == null) tShaft = new TileEntityShaft(); + + try { + + tShaft.setWorldObj(this.world()); + this.tShaft.xCoord = this.x(); + this.tShaft.yCoord = this.y(); + this.tShaft.zCoord = this.z(); + + } catch (NullPointerException e) { + } + + directionChange(); + + return tShaft; + } + + @Override + public void save(NBTTagCompound tag) + { + tag.setByte("stype", (byte) this.sType); + NBTTagCompound s = new NBTTagCompound(); + + tShaft.setWorldObj(this.world()); + this.tShaft.xCoord = this.x(); + this.tShaft.yCoord = this.y(); + this.tShaft.zCoord = this.z(); + + if (tShaft != null) tShaft.writeToNBT(s); + tag.setTag("shaft", s); + + } + + @Override + public void load(NBTTagCompound tag) + { + this.sType = tag.getByte("stype"); + + NBTTagCompound s = tag.getCompoundTag("shaft"); + if (tShaft == null) tShaft = new TileEntityShaft(); + tShaft.readFromNBT(s); + try { + this.world().markBlockForUpdate(this.x(), this.y(), this.z()); + } catch (NullPointerException e) { + } + + //tShaft.setWorldObj(this.world()); + //this.tShaft.xCoord = this.x(); + //this.tShaft.yCoord = this.y(); + //this.tShaft.zCoord = this.z(); + + } + + @Override + public void writeDesc(MCDataOutput packet) + { + packet.writeByte((byte) this.sType); + + NBTTagCompound s = new NBTTagCompound(); + + /*this.tShaft.setWorldObj(this.world()); + this.tShaft.xCoord = this.x(); + this.tShaft.yCoord = this.y(); + this.tShaft.zCoord = this.z();*/ + + //getShaft(); + + if (tShaft != null) tShaft.writeToNBT(s); + packet.writeNBTTagCompound(s); + + } + + @Override + public void readDesc(MCDataInput packet) + { + this.sType = packet.readByte(); + + NBTTagCompound s = packet.readNBTTagCompound(); + if (tShaft == null) tShaft = new TileEntityShaft(); + tShaft.readFromNBT(s); + try { + this.world().markBlockForUpdate(this.x(), this.y(), this.z()); + } catch (NullPointerException e) { + } + //tShaft.setWorldObj(this.world()); + //this.tShaft.xCoord = this.x(); + //this.tShaft.yCoord = this.y(); + //this.tShaft.zCoord = this.z(); + + } + + @Override + public void setDirection(ForgeDirection d) { + this.tShaft.setDirection(d); + } + + @Override + public ForgeDirection getDirection() { + return this.getShaft().getDirection(); + } + + @Override + public void setRotateStep(float r) { + this.getShaft().setRotateStep(r); + } + + @Override + public float getRotateStep() { + return this.getShaft().getRotateStep(); + } + + //GF + @Override + public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + return this.getShaft().addEnergy(from, power, speed, simulate); + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + return this.getShaft().drawEnergy(from, power, speed, simulate); + } + + @Override + public boolean canInterface(ForgeDirection from) { + return this.getShaft().canInterface(from); + } + + @Override + public int getPowerStored(ForgeDirection from) { + return this.getShaft().getPowerStored(from); + } + + @Override + public int getSpeedStored(ForgeDirection from) { + return this.getShaft().getSpeedStored(from); + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + return this.getShaft().getMaxPowerStored(from); + } + + @Override + public int getMaxSpeedStored(ForgeDirection from) { + return this.getShaft().getMaxSpeedStored(from); + } + + @Override + public EnergyStorage getStorage() { + return this.getShaft().getStorage(); + } + + @Override + public IShaft getInTileEntityShaft() { + return this.getShaft().getInTileEntityShaft(); + } + + @Override + public IShaft getOutTileEntityShaft() { + return this.getShaft().getOutTileEntityShaft(); + } + +} diff --git a/src/main/java/shift/sextiarysector/gui/GuiGFTank.java b/src/main/java/shift/sextiarysector/gui/GuiGFTank.java index 154565d..b975d8a 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiGFTank.java +++ b/src/main/java/shift/sextiarysector/gui/GuiGFTank.java @@ -138,8 +138,8 @@ public void drawScreen(int par1, int par2, float par3) int p3 = tankInventory.storage.getPowerStored(); long s3 = tankInventory.storage.getSpeedStored(); - int p2_1 = tankInventory.storage.getMaxPowerStored(); - long s2_1 = tankInventory.storage.getMaxSpeedStored(); + int p2_1 = tankInventory.storage.getMaxPower(); + long s2_1 = tankInventory.storage.getMaxSpeed(); arraylist3.add(0,"" + EnumChatFormatting.RESET+ "Machine Storage" + EnumChatFormatting.RESET ); arraylist3.add(1,"" + EnumChatFormatting.RED + "Power" + EnumChatFormatting.RESET ); diff --git a/src/main/java/shift/sextiarysector/gui/GuiSimpleMachine.java b/src/main/java/shift/sextiarysector/gui/GuiSimpleMachine.java index d4a1485..2fd8d8e 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiSimpleMachine.java +++ b/src/main/java/shift/sextiarysector/gui/GuiSimpleMachine.java @@ -121,8 +121,8 @@ public void drawScreen(int par1, int par2, float par3) int p2 = machineInventory.storage.getPowerStored(); long s2 = machineInventory.storage.getSpeedStored(); - int p2_1 = machineInventory.storage.getMaxPowerStored(); - long s2_1 = machineInventory.storage.getMaxSpeedStored(); + int p2_1 = machineInventory.storage.getMaxPower(); + long s2_1 = machineInventory.storage.getMaxSpeed(); arraylist2.add(0,"" + EnumChatFormatting.RESET+ "Machine Storage" + EnumChatFormatting.RESET ); arraylist2.add(1,"" + EnumChatFormatting.RED + "Power" + EnumChatFormatting.RESET ); diff --git a/src/main/java/shift/sextiarysector/item/GearForceItemManager.java b/src/main/java/shift/sextiarysector/item/GearForceItemManager.java index 90f416b..e1638f3 100644 --- a/src/main/java/shift/sextiarysector/item/GearForceItemManager.java +++ b/src/main/java/shift/sextiarysector/item/GearForceItemManager.java @@ -6,7 +6,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import shift.sextiarysector.SextiarySector; import shift.sextiarysector.api.machine.item.IGearForceItem; import shift.sextiarysector.api.machine.item.IGearForceItemManager; @@ -19,93 +18,98 @@ public class GearForceItemManager implements IGearForceItemManager { @Override public int reduceEnergy(ItemStack itemStack, int power, int speed, boolean simulate) { - if(!(itemStack.getItem() instanceof IGearForceItem)){ + if (!(itemStack.getItem() instanceof IGearForceItem)) { return 0; } - IGearForceItem item = (IGearForceItem)itemStack.getItem(); + IGearForceItem item = (IGearForceItem) itemStack.getItem(); - if(this.getSpeed(itemStack)<=0){ + if (this.getSpeed(itemStack) <= 0) { return 0; } + if (power != item.getMaxPower(itemStack)) return 0; + int sp = speed; - if(item.getMaxPowerStored(itemStack)power){ - sp = (int) (speed*Math.pow(0.25, item.getMaxPowerStored(itemStack)-power)); - } + if(item.getMaxPower(itemStack)>power){ + sp = (int) (speed*Math.pow(0.25, item.getMaxPower(itemStack)-power)); + }*/ int speedReceived = 0; int speedReceived2 = 0; - if(this.getSpeed(itemStack)>=sp){ + if (this.getSpeed(itemStack) >= sp) { speedReceived = this.getSpeed(itemStack) - sp; speedReceived2 = sp; - }else{ + } else { speedReceived = 0; speedReceived2 = this.getSpeed(itemStack); } - if (!simulate) - { - this.setEnergy(itemStack, item.getMaxPowerStored(itemStack), speedReceived); - } + if (!simulate) + { + this.setEnergy(itemStack, item.getMaxPower(itemStack), speedReceived); + } - return speedReceived2; + return speedReceived2; } //増やす @Override public int addEnergy(ItemStack itemStack, int power, int speed, boolean simulate) { - - if(!(itemStack.getItem() instanceof IGearForceItem)){ + if (!(itemStack.getItem() instanceof IGearForceItem)) { return 0; } - IGearForceItem item = (IGearForceItem)itemStack.getItem(); + IGearForceItem item = (IGearForceItem) itemStack.getItem(); - if(item.getMaxPowerStored(itemStack)>power){ + if (item.getMaxPower(itemStack) > power) { return 0; } + if (power != item.getMaxPower(itemStack)) return 0; + int sp = speed; - if(item.getMaxPowerStored(itemStack)this.getSpeed(itemStack)+sp){ - speedReceived = this.getSpeed(itemStack)+sp; + if (item.getMaxSpeed(itemStack) > this.getSpeed(itemStack) + sp) { + speedReceived = this.getSpeed(itemStack) + sp; speedReceived2 = sp; - }else{ - speedReceived = item.getMaxSpeedStored(itemStack); - speedReceived2 = item.getMaxSpeedStored(itemStack)-this.getSpeed(itemStack); + } else { + speedReceived = item.getMaxSpeed(itemStack); + speedReceived2 = item.getMaxSpeed(itemStack) - this.getSpeed(itemStack); } - if (!simulate) - { - this.setEnergy(itemStack, item.getMaxPowerStored(itemStack) , speedReceived); - } + if (!simulate) + { + this.setEnergy(itemStack, item.getMaxPower(itemStack), speedReceived); + } - return speedReceived2; + return speedReceived2; } @Override public int getPower(ItemStack theItem) { if (theItem.getTagCompound() == null) - { + { theItem.setTagCompound(new NBTTagCompound()); return 0; - } + } return theItem.getTagCompound().getInteger("gfpower"); @@ -115,106 +119,108 @@ public int getPower(ItemStack theItem) { public int getSpeed(ItemStack theItem) { if (theItem.getTagCompound() == null) - { + { theItem.setTagCompound(new NBTTagCompound()); return 0; - } + } return theItem.getTagCompound().getInteger("gfspeed"); } @Override - public boolean setEnergy(ItemStack itemStack, int power, int speed) - { + public boolean setEnergy(ItemStack itemStack, int power, int speed) + { - if(!(itemStack.getItem() instanceof IGearForceItem)){ - return false ; + if (!(itemStack.getItem() instanceof IGearForceItem)) { + return false; } - IGearForceItem item = (IGearForceItem)itemStack.getItem(); + IGearForceItem item = (IGearForceItem) itemStack.getItem(); if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } + { + itemStack.setTagCompound(new NBTTagCompound()); + } int d = 100; - int powerStored = Math.max(Math.min(power, item.getMaxPowerStored(itemStack)), 0); - int speedStored = Math.max(Math.min(speed, item.getMaxSpeedStored(itemStack)), 0); - itemStack.getTagCompound().setInteger("gfpower", powerStored); - if(speedStored==0)itemStack.getTagCompound().setInteger("gfpower", 0); - itemStack.getTagCompound().setInteger("gfspeed", speedStored); - int damage = (int) (d - (speedStored / (double) item.getMaxSpeedStored(itemStack)) * d); - if(speedStored==0){ - damage = 0; - } - if(speedStored==item.getMaxSpeedStored(itemStack)){ - damage = 1; - } - if(damage==0&&speedStored!=0){ - damage = 1; - } - - if(!r.contains(itemStack.getItem())&&((IGearForceItem)itemStack.getItem()).isCustomDamage(itemStack)){ - SextiarySector.proxy.registerItemRenderer(itemStack.getItem()); - r.add(itemStack.getItem()); - } - - //itemStack.setItemDamage(damage); + int powerStored = Math.max(Math.min(power, item.getMaxPower(itemStack)), 0); + int speedStored = Math.max(Math.min(speed, item.getMaxSpeed(itemStack)), 0); + itemStack.getTagCompound().setInteger("gfpower", powerStored); + if (speedStored == 0) itemStack.getTagCompound().setInteger("gfpower", 0); + itemStack.getTagCompound().setInteger("gfspeed", speedStored); + int damage = (int) (d - (speedStored / (double) item.getMaxSpeed(itemStack)) * d); + if (speedStored == 0) { + damage = 0; + } + if (speedStored == item.getMaxSpeed(itemStack)) { + damage = 1; + } + if (damage == 0 && speedStored != 0) { + damage = 1; + } + + /* + if (!r.contains(itemStack.getItem()) && ((IGearForceItem) itemStack.getItem()).isCustomDamage(itemStack)) { + SextiarySector.proxy.registerItemRenderer(itemStack.getItem()); + r.add(itemStack.getItem()); + }*/ + + //itemStack.setItemDamage(damage); return true; - } + } @Override public boolean canUse(ItemStack itemStack, int speed) { - if(speed<0||!(itemStack.getItem() instanceof IGearForceItem)){ + if (speed < 0 || !(itemStack.getItem() instanceof IGearForceItem)) { return false; } - IGearForceItem item = (IGearForceItem)itemStack.getItem(); + IGearForceItem item = (IGearForceItem) itemStack.getItem(); if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } + { + itemStack.setTagCompound(new NBTTagCompound()); + } long speedStored = itemStack.getTagCompound().getInteger("gfspeed"); - if(item.getMaxSpeedStored(itemStack) tabList){ diff --git a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java index f1b25c1..a1b35ed 100644 --- a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java +++ b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java @@ -13,8 +13,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent; - -public class EntityPlayerManager implements IPlayerManager{//implements {//IPlayerTracker{ +public class EntityPlayerManager implements IPlayerManager {//implements {//IPlayerTracker{ //@SideOnly(Side.CLIENT) //public static Minecraft mc = FMLClientHandler.instance().getClient(); @@ -41,45 +40,45 @@ public class EntityPlayerManager implements IPlayerManager{//implements {//IPla public static EntityPlayerManager instance = new EntityPlayerManager(); - private EntityPlayerManager(){ + private EntityPlayerManager() { } @Override public void addMoistureStats(EntityPlayer entityPlayer, int par1, float par2) { if (!entityPlayer.worldObj.isRemote) - { + { getMoistureStats(entityPlayer).addStats(par1, par2); //Achievement entityPlayer.addStat(SSAchievement.moisture, 1); - } + } } @Override public void addStaminaStats(EntityPlayer entityPlayer, int par1, float par2) { if (!entityPlayer.worldObj.isRemote) - { + { getStaminaStats(entityPlayer).addStats(par1, par2); - } + } } @Override - public void addMoistureExhaustion(EntityPlayer entityPlayer,float par1) - { + public void addMoistureExhaustion(EntityPlayer entityPlayer, float par1) + { if (!entityPlayer.worldObj.isRemote) - { + { getMoistureStats(entityPlayer).addExhaustion(par1); - } - } + } + } @Override - public void addStaminaExhaustion(EntityPlayer entityPlayer,float par1) - { + public void addStaminaExhaustion(EntityPlayer entityPlayer, float par1) + { if (!entityPlayer.worldObj.isRemote) - { + { getStaminaStats(entityPlayer).addExhaustion(par1); - } - } + } + } //触らない @@ -87,7 +86,7 @@ public void addStaminaExhaustion(EntityPlayer entityPlayer,float par1) @SubscribeEvent public void LivingUpdateEvent(LivingUpdateEvent event) { - if(!event.entityLiving.worldObj.isRemote && event.entityLiving instanceof EntityPlayer){ + if (!event.entityLiving.worldObj.isRemote && event.entityLiving instanceof EntityPlayer) { onUpdateEntity((EntityPlayer) event.entityLiving); @@ -96,8 +95,7 @@ public void LivingUpdateEvent(LivingUpdateEvent event) } public static void onUpdateEntity(EntityPlayer entityPlayer) - { - + { getCustomPlayerData(entityPlayer).onUpdateEntity(entityPlayer); @@ -144,7 +142,7 @@ public static void onUpdateEntity(EntityPlayer entityPlayer) if (lM != m.getMoistureLevel() || m.getSaturationLevel() == 0.0F != wM || lS != s.getStaminaLevel() || s.getSaturationLevel() == 0.0F != wS) - { + { entityPlayer.playerNetServerHandler.sendPacketToPlayer(getPacketUpdate(m.getMoistureLevel(),m.getSaturationLevel(),s.getStaminaLevel(),s.getSaturationLevel())); lastMoistureLevel.put(name, m.getMoistureLevel()); lastStaminaLevel.put(name, s.getStaminaLevel()); @@ -155,40 +153,55 @@ public static void onUpdateEntity(EntityPlayer entityPlayer) m.writeNBT(nbt); s.writeNBT(nbt); - }*/ + }*/ - } + } @SubscribeEvent public void onPlayerDropsEvent(PlayerDropsEvent event) { - this.getCustomPlayerData(event.entityPlayer).getEquipmentStats().inventory.dropAllItems(); + if (!event.entityPlayer.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) { + this.getCustomPlayerData(event.entityPlayer).getEquipmentStats().inventory.dropAllItems(); + } + } - private void oneton(){ + @SubscribeEvent + public void onPlayerCloneEvent(net.minecraftforge.event.entity.player.PlayerEvent.Clone event) + { + if (!event.wasDeath) return; + + if (event.entityPlayer.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) { + + this.getCustomPlayerData(event.entityPlayer).setEquipmentStats(this.getEquipmentStats(event.original)); + + } } + private void oneton() { + + } /** Playerのデータの登録*/ @SubscribeEvent - public void onEntityConstructing(EntityEvent.EntityConstructing event) { - if (event.entity instanceof EntityPlayer) { - EntityPlayerManager.register((EntityPlayer)event.entity); - } - } + public void onEntityConstructing(EntityEvent.EntityConstructing event) { + if (event.entity instanceof EntityPlayer) { + EntityPlayerManager.register((EntityPlayer) event.entity); + } + } - public static void register(EntityPlayer entityPlayer){ + public static void register(EntityPlayer entityPlayer) { entityPlayer.registerExtendedProperties(kye, new CustomPlayerData()); } - public static CustomPlayerData getCustomPlayerData(EntityPlayer entityPlayer){ + public static CustomPlayerData getCustomPlayerData(EntityPlayer entityPlayer) { return (CustomPlayerData) entityPlayer.getExtendedProperties(kye); } public static MoistureStats getMoistureStats(EntityPlayer entityPlayer) - { + { return getCustomPlayerData(entityPlayer).getMoisture(); /* @@ -202,10 +215,10 @@ public static MoistureStats getMoistureStats(EntityPlayer entityPlayer) return moistureMap.get(name); }*/ - } + } public static StaminaStats getStaminaStats(EntityPlayer entityPlayer) - { + { return getCustomPlayerData(entityPlayer).getStamina(); @@ -220,9 +233,9 @@ public static StaminaStats getStaminaStats(EntityPlayer entityPlayer) return staminaMap.get(name); }*/ - } + } - public static EquipmentStats getEquipmentStats(EntityPlayer entityPlayer){ + public static EquipmentStats getEquipmentStats(EntityPlayer entityPlayer) { return getCustomPlayerData(entityPlayer).getEquipmentStats(); } @@ -292,21 +305,21 @@ public static Packet getPacketUpdate(int m,float f,int s,float g) }*/ //GUI用 - public static int getPrevMoistureLevel(EntityPlayer entityPlayer) - { + public static int getPrevMoistureLevel(EntityPlayer entityPlayer) + { - return getMoistureStats(entityPlayer).getMoistureLevel()/(MAX_MOISTURE_LEVEL/MAX_PREVMOISTURE_LEVEL); + return getMoistureStats(entityPlayer).getMoistureLevel() / (MAX_MOISTURE_LEVEL / MAX_PREVMOISTURE_LEVEL); - } + } - public static int getPrevStaminaLevel(EntityPlayer entityPlayer) - { + public static int getPrevStaminaLevel(EntityPlayer entityPlayer) + { - return getStaminaStats(entityPlayer).getStaminaLevel()/(MAX_STAMINA_LEVEL/MAX_PREV_STAMINA_LEVEL); + return getStaminaStats(entityPlayer).getStaminaLevel() / (MAX_STAMINA_LEVEL / MAX_PREV_STAMINA_LEVEL); - } + } - /* + /* @Override public void onPlayerLogin(EntityPlayer player){ //プレイヤーがログインした時の処理 @@ -355,9 +368,9 @@ public void onPlayerLogout(EntityPlayer player) { } -*/ + */ - @SubscribeEvent + @SubscribeEvent /* ワールドに入った時に呼ばれるイベント。 */ public void onEntityJoinWorld(EntityJoinWorldEvent event) { @@ -368,19 +381,19 @@ public void onEntityJoinWorld(EntityJoinWorldEvent event) { } } - @SubscribeEvent + @SubscribeEvent public void onPlayerChangedDimension(PlayerEvent.PlayerChangedDimensionEvent event) { //プレイヤーがディメンション間を移動したときの処理 - if(!event.player.worldObj.isRemote)SSPacketHandler.INSTANCE.sendTo(new PacketPlayerData(this.getCustomPlayerData(event.player)), (EntityPlayerMP) event.player); + if (!event.player.worldObj.isRemote) SSPacketHandler.INSTANCE.sendTo(new PacketPlayerData(this.getCustomPlayerData(event.player)), (EntityPlayerMP) event.player); } - @SubscribeEvent + @SubscribeEvent public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) { //プレイヤーがリスポーンした時の処理 - //System.out.println("onPlayerRespawn"); - if(!event.player.worldObj.isRemote)SSPacketHandler.INSTANCE.sendTo(new PacketPlayerData(this.getCustomPlayerData(event.player)), (EntityPlayerMP) event.player); + //System.out.println("onPlayerRespawn"); + if (!event.player.worldObj.isRemote) SSPacketHandler.INSTANCE.sendTo(new PacketPlayerData(this.getCustomPlayerData(event.player)), (EntityPlayerMP) event.player); } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java b/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java index ad9d7ba..32d7fd8 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java @@ -8,7 +8,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SSItems; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -106,12 +106,12 @@ public TurtleCommandResult useTool(ITurtleAccess turtle,TurtleSide side, TurtleV } TileEntity t = world.getTileEntity(newX, newY, newZ); - if(t instanceof IEnergyHandler){ + if(t instanceof IGFEnergyHandler){ if(verb==TurtleVerb.Attack){ - return this.addEnergy(turtle, (IEnergyHandler) t,ForgeDirection.getOrientation(direction) ); + return this.addEnergy(turtle, (IGFEnergyHandler) t,ForgeDirection.getOrientation(direction) ); }else{ - return this.getEnergy(turtle, (IEnergyHandler) t, ForgeDirection.getOrientation(direction) ); + return this.getEnergy(turtle, (IGFEnergyHandler) t, ForgeDirection.getOrientation(direction) ); } } @@ -119,7 +119,7 @@ public TurtleCommandResult useTool(ITurtleAccess turtle,TurtleSide side, TurtleV return TurtleCommandResult.failure(); } - private TurtleCommandResult addEnergy(ITurtleAccess turtle,IEnergyHandler h,ForgeDirection direction){ + private TurtleCommandResult addEnergy(ITurtleAccess turtle,IGFEnergyHandler h,ForgeDirection direction){ if(turtle.getFuelLevel()>0){ @@ -136,7 +136,7 @@ private TurtleCommandResult addEnergy(ITurtleAccess turtle,IEnergyHandler h,Forg } - private TurtleCommandResult getEnergy(ITurtleAccess turtle,IEnergyHandler h,ForgeDirection direction){ + private TurtleCommandResult getEnergy(ITurtleAccess turtle,IGFEnergyHandler h,ForgeDirection direction){ int i = h.drawEnergy(direction.getOpposite(), 1, 100, true)/10; if(i>0){ diff --git a/src/main/java/shift/sextiarysector/plugin/PluginFMP.java b/src/main/java/shift/sextiarysector/plugin/PluginFMP.java new file mode 100644 index 0000000..6bce3b0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/plugin/PluginFMP.java @@ -0,0 +1,37 @@ +package shift.sextiarysector.plugin; + +import shift.sextiarysector.fmp.PartRegistry; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class PluginFMP implements IPlugin { + + @Override + public String getModName() { + return "ForgeMultipart"; + } + + @Override + public void prePlugin(FMLPreInitializationEvent event) { + + } + + @Override + public void preClientPlugin(FMLPreInitializationEvent event) { + + } + + @Override + public void initPlugin(FMLInitializationEvent event) { + + } + + @Override + public void postPlugin(FMLPostInitializationEvent event) { + + PartRegistry.init(); + + } + +} diff --git a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java index 35706e0..0b198a6 100644 --- a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java +++ b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java @@ -22,16 +22,18 @@ public class SSPlugins { public static boolean modTofu; public static boolean modTcon; public static boolean modCleaver; + public static boolean modFMP; public static void initModHelper() { modDCsAppleMilk = Loader.isModLoaded("DCsAppleMilk") && Config.modDCsAppleMilk; modComputerCraft = Loader.isModLoaded("ComputerCraft") && Config.modComputerCraft; - modTHKaguya = Loader.isModLoaded("THKaguyaMod") && Config.modTHKaguya; - modIC2 = Loader.isModLoaded("IC2") && Config.modIC2; - modTofu = Loader.isModLoaded("TofuCraft") && Config.modTofu; - modTcon = Loader.isModLoaded("TConstruct") && Config.modTcon; - modCleaver = Loader.isModLoaded("schr0.cleaver") && Config.modCleaver; + modTHKaguya = Loader.isModLoaded("THKaguyaMod") && Config.modTHKaguya; + modIC2 = Loader.isModLoaded("IC2") && Config.modIC2; + modTofu = Loader.isModLoaded("TofuCraft") && Config.modTofu; + modTcon = Loader.isModLoaded("TConstruct") && Config.modTcon; + modCleaver = Loader.isModLoaded("schr0.cleaver") && Config.modCleaver; + modFMP = Loader.isModLoaded("ForgeMultipart") && Config.modFMP; if (modDCsAppleMilk) { @@ -138,20 +140,35 @@ public static void initModHelper() { } } + if (modFMP) { + + try { + + SextiarySector.Log.info("ForgeMultipart Plugin is loaded"); + plugins.add(new PluginFMP()); + + } catch (Exception e) { + + SextiarySector.Log.log(Level.WARN, "ForgeMultipart integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.catching(e); + + } + } + } public static void prePlugins(FMLPreInitializationEvent event) { - for(IPlugin p : plugins) + for (IPlugin p : plugins) { try { - SextiarySector.Log.info(p.getModName()+" Plugin is pre init"); + SextiarySector.Log.info(p.getModName() + " Plugin is pre init"); p.prePlugin(event); } catch (Exception e) { - SextiarySector.Log.log(Level.WARN, p.getModName() +" integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.log(Level.WARN, p.getModName() + " integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); SextiarySector.Log.catching(e); } @@ -161,16 +178,16 @@ public static void prePlugins(FMLPreInitializationEvent event) { public static void initPlugins(FMLInitializationEvent event) { - for(IPlugin p : plugins) + for (IPlugin p : plugins) { try { - SextiarySector.Log.info(p.getModName()+" Plugin is init"); + SextiarySector.Log.info(p.getModName() + " Plugin is init"); p.initPlugin(event); } catch (Exception e) { - SextiarySector.Log.log(Level.WARN, p.getModName() +" integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.log(Level.WARN, p.getModName() + " integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); SextiarySector.Log.catching(e); } @@ -180,16 +197,16 @@ public static void initPlugins(FMLInitializationEvent event) { public static void postPlugins(FMLPostInitializationEvent event) { - for(IPlugin p : plugins) + for (IPlugin p : plugins) { try { - SextiarySector.Log.info(p.getModName()+" Plugin is post init"); + SextiarySector.Log.info(p.getModName() + " Plugin is post init"); p.postPlugin(event); } catch (Exception e) { - SextiarySector.Log.log(Level.WARN, p.getModName() +" integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.log(Level.WARN, p.getModName() + " integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); SextiarySector.Log.catching(e); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesArmor.java b/src/main/java/shift/sextiarysector/recipe/RecipesArmor.java new file mode 100644 index 0000000..1cc45c2 --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesArmor.java @@ -0,0 +1,33 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraftforge.oredict.ShapedOreRecipe; +import shift.sextiarysector.SSItems; + +public class RecipesArmor { + + public static void addRecipes(CraftingManager p_77608_1_) + { + + String[][] recipePatterns = new String[][] { { "XXX", "X X" }, { "X X", "XXX", "XXX" }, { "XXX", "X X", "X X" }, { "X X", "X X" } }; + Object[] materialItems = new String[] { "ingotCopper" }; + ItemStack[][] recipeItems = new ItemStack[][] { + { new ItemStack(SSItems.copperHelmet), new ItemStack(SSItems.copperChestplate), new ItemStack(SSItems.copperLeggings), new ItemStack(SSItems.copperBoots) } + }; + + for (int i = 0; i < materialItems.length; ++i) + { + Object object = materialItems[i]; + + for (int j = 0; j < recipeItems[i].length; ++j) + { + ItemStack item = recipeItems[i][j]; + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(item, new Object[] { recipePatterns[j], 'X', object })); + } + + } + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java index 98e2695..148ca9a 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMagicFuel.java @@ -2,15 +2,17 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSItems; public class RecipesMagicFuel { public static void addRecipes(RecipeSimpleFuel recipe) - { - recipe.add(new ItemStack(Items.ender_pearl,1), 1000); + { + recipe.add(new ItemStack(Items.ender_pearl, 1), 1000); recipe.add("dustRedstone", 400); recipe.add("dustBluestone", 400); recipe.add("dustYellowstone", 400); - } + recipe.add(new ItemStack(SSItems.magicDust, 1), 1200); + } } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java b/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java index 4eaa790..fec68a7 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererShaft.java @@ -11,6 +11,7 @@ import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.fmp.IShaft; import shift.sextiarysector.renderer.model.ModelShaft; import shift.sextiarysector.tileentity.TileEntityShaft; import cpw.mods.fml.client.FMLClientHandler; @@ -23,36 +24,36 @@ public class RendererShaft extends TileEntitySpecialRenderer implements ISimpleB @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { - if(modelID!=this.getRenderId()){ - return ; + if (modelID != this.getRenderId()) { + return; } GL11.glPushMatrix(); - float scale = 0.0625f; - GL11.glScalef(scale,scale,scale); - - GL11.glRotatef(90, 1, 0, 0); - - if(block == SSBlocks.woodShaft){ - this.bind(woodShaftTextures); - }else if(block == SSBlocks.stoneShaft){ - this.bind(stoneShaftTextures); - } else if(block == SSBlocks.steelShaft){ - this.bind(this.steelShaftTextures); - }else if(block == SSBlocks.ninjaShaft){ - this.bind(ninjaShaftTextures); - }else if(block == SSBlocks.orichalcumShaft){ - this.bind(orichalcumShaftTextures); - } + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); + + GL11.glRotatef(90, 1, 0, 0); + + if (block == SSBlocks.woodShaft) { + this.bind(woodShaftTextures); + } else if (block == SSBlocks.stoneShaft) { + this.bind(stoneShaftTextures); + } else if (block == SSBlocks.steelShaft) { + this.bind(this.steelShaftTextures); + } else if (block == SSBlocks.ninjaShaft) { + this.bind(ninjaShaftTextures); + } else if (block == SSBlocks.orichalcumShaft) { + this.bind(orichalcumShaftTextures); + } - modelShaft.render(null, 0,0,0, 0,0, 1.0f); - modelShaft.renderIn(null, 0,0,0, 0,0, 1.0f); - modelShaft.renderOut(null, 0,0,0, 0,0, 1.0f); + modelShaft.render(null, 0, 0, 0, 0, 0, 1.0f); + modelShaft.renderIn(null, 0, 0, 0, 0, 0, 1.0f); + modelShaft.renderOut(null, 0, 0, 0, 0, 0, 1.0f); - GL11.glPopMatrix(); + GL11.glPopMatrix(); - this.bind(MC_BLOCK_SHEET); + this.bind(MC_BLOCK_SHEET); } @@ -83,105 +84,178 @@ public int getRenderId() { @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { - TileEntityShaft tile = (TileEntityShaft)tileentity; + TileEntityShaft tile = (TileEntityShaft) tileentity; //System.out.println("renderTileEntityAt"); GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); - float scale = 0.0625f; - GL11.glScalef(scale,scale,scale); - - switch(tile.getStorage().getMaxPowerStored()){ - case 1:this.bindTexture(woodShaftTextures);break; - case 2:this.bindTexture(stoneShaftTextures);break; - case 3:this.bindTexture(steelShaftTextures);break; - case 4:this.bindTexture(ninjaShaftTextures);break; - case 5:this.bindTexture(orichalcumShaftTextures);break; - } - - - switch(tile.direction){ - case UP: - GL11.glRotatef(90, 1, 0, 0); - break; - case DOWN: - GL11.glRotatef(90, -1, 0, 0); - break; - case WEST: - GL11.glRotatef(90, 0, 1, 0); - break; - case EAST: - GL11.glRotatef(90, 0, -1, 0); - break; - case SOUTH: - GL11.glRotatef(180, 0, 1, 0); - break; + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); + + switch (tile.getStorage().getMaxPower()) { + case 1: + this.bindTexture(woodShaftTextures); + break; + case 2: + this.bindTexture(stoneShaftTextures); + break; + case 3: + this.bindTexture(steelShaftTextures); + break; + case 4: + this.bindTexture(ninjaShaftTextures); + break; + case 5: + this.bindTexture(orichalcumShaftTextures); + break; + } + + switch (tile.direction) { + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; default: break; - } + } - if(!this.isIn(tileentity)){ - modelShaft.renderIn(null, 0,0,0, 0,0, 1.0f); - } + if (!this.isIn(tileentity)) { + modelShaft.renderIn(null, 0, 0, 0, 0, 0, 1.0f); + } - if(!this.isOut(tileentity)){ - modelShaft.renderOut(null, 0,0,0, 0,0, 1.0f); - } + if (!this.isOut(tileentity)) { + modelShaft.renderOut(null, 0, 0, 0, 0, 0, 1.0f); + } - //傾きのスピード - GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + //傾きのスピード + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); - modelShaft.render(null, 0,0,0, 0,0, 1.0f); + modelShaft.render(null, 0, 0, 0, 0, 0, 1.0f); - GL11.glPopMatrix(); + GL11.glPopMatrix(); } + public static void renderTileEntityAt2(TileEntity tileentity, double x, double y, double z, float f) { - private static void bind(ResourceLocation res) - { - FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); - } + if (!(tileentity instanceof IShaft)) return; + IShaft tile = (IShaft) tileentity; - public boolean isOut(TileEntity tileentity){ + //System.out.println("renderTileEntityAt"); - TileEntityShaft tile = (TileEntityShaft) tileentity; + GL11.glPushMatrix(); + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); - int x = tile.xCoord + tile.direction.offsetX; - int y = tile.yCoord + tile.direction.offsetY; - int z = tile.zCoord + tile.direction.offsetZ; + switch (tile.getStorage().getMaxPower()) { + case 1: + bind(woodShaftTextures); + break; + case 2: + bind(stoneShaftTextures); + break; + case 3: + bind(steelShaftTextures); + break; + case 4: + bind(ninjaShaftTextures); + break; + case 5: + bind(orichalcumShaftTextures); + break; + } - TileEntity tile2 = tile.getWorldObj().getTileEntity(x, y, z); + switch (tile.getDirection()) { + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + default: + break; + } - if(tile2 instanceof TileEntityShaft && ((TileEntityShaft) tile2).getOutDirection().ordinal()==tile.getOutDirection().ordinal()){ - return true; - }else{ - return false; + if (!isIn(tileentity)) { + modelShaft.renderIn(null, 0, 0, 0, 0, 0, 1.0f); + } + + if (!isOut(tileentity)) { + modelShaft.renderOut(null, 0, 0, 0, 0, 0, 1.0f); } + //傾きのスピード + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + + modelShaft.render(null, 0, 0, 0, 0, 0, 1.0f); + + GL11.glPopMatrix(); + } - public boolean isIn(TileEntity tileentity){ + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } - TileEntityShaft tile = (TileEntityShaft) tileentity; + public static boolean isOut(TileEntity tileentity) { - int x = tile.xCoord - tile.direction.offsetX; - int y = tile.yCoord - tile.direction.offsetY; - int z = tile.zCoord - tile.direction.offsetZ; + IShaft tile = (IShaft) tileentity; - TileEntity tile2 = tile.getWorldObj().getTileEntity(x, y, z); + int x = tileentity.xCoord + tile.getDirection().offsetX; + int y = tileentity.yCoord + tile.getDirection().offsetY; + int z = tileentity.zCoord + tile.getDirection().offsetZ; + + TileEntity tile2 = tileentity.getWorldObj().getTileEntity(x, y, z); - if(tile2 instanceof TileEntityShaft && ((TileEntityShaft) tile2).getOutDirection().ordinal()==tile.getOutDirection().ordinal()){ + if (tile2 instanceof IShaft && ((IShaft) tile2).getDirection().ordinal() == tile.getDirection().ordinal()) { return true; - }else{ + } else { return false; } } + public static boolean isIn(TileEntity tileentity) { + + IShaft tile = (IShaft) tileentity; + + int x = tileentity.xCoord - tile.getDirection().offsetX; + int y = tileentity.yCoord - tile.getDirection().offsetY; + int z = tileentity.zCoord - tile.getDirection().offsetZ; + + TileEntity tile2 = tileentity.getWorldObj().getTileEntity(x, y, z); + + if (tile2 instanceof IShaft && ((IShaft) tile2).getDirection().ordinal() == tile.getDirection().ordinal()) { + return true; + } else { + return false; + } + } /* public static boolean isOut(TileEntity tileentity){ diff --git a/src/main/java/shift/sextiarysector/renderer/item/RenderGF.java b/src/main/java/shift/sextiarysector/renderer/item/RenderGF.java index a0b76bd..49612b9 100644 --- a/src/main/java/shift/sextiarysector/renderer/item/RenderGF.java +++ b/src/main/java/shift/sextiarysector/renderer/item/RenderGF.java @@ -38,7 +38,7 @@ public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if(item.getItem() instanceof IGearForceItem && type == ItemRenderType.INVENTORY) { - int k = (int)Math.round(GearForceItem.manager.getSpeed(item) * 13.0D / ((IGearForceItem)item.getItem()).getMaxSpeedStored(item)); + int k = (int)Math.round(GearForceItem.manager.getSpeed(item) * 13.0D / ((IGearForceItem)item.getItem()).getMaxSpeed(item)); GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_ALPHA_TEST); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java index be38d02..23a7659 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java @@ -4,10 +4,10 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityElectricMotor extends TileEntityDirection implements IEnergyHandler, IGearForceGrid{ +public class TileEntityElectricMotor extends TileEntityDirection implements IGFEnergyHandler, IGearForceGrid{ private BasicSink ic2EnergySink = new BasicSink(this, 2000, 1){ @@ -89,9 +89,9 @@ private void updateServerEntity() { if(this.ic2EnergySink.canUseEnergy(20)){ TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IEnergyHandler){ + if(t!=null && t instanceof IGFEnergyHandler){ - int i = ((IEnergyHandler)t).addEnergy(this.direction, 3, 40, false); + int i = ((IGFEnergyHandler)t).addEnergy(this.direction, 3, 40, false); this.ic2EnergySink.useEnergy(i); @@ -129,7 +129,7 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return 0; } @@ -139,7 +139,7 @@ public int getMaxPowerStored(ForgeDirection from) { } @Override - public long getMaxSpeedStored(ForgeDirection from) { + public int getMaxSpeedStored(ForgeDirection from) { return 0; } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java index 3a93796..a387790 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java @@ -10,10 +10,10 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SSBlocks; import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityFan extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ +public class TileEntityFan extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ public float rotateStep = 360; private int speed = 0; @@ -174,18 +174,18 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return storage.getSpeedStored(); } @Override public int getMaxPowerStored(ForgeDirection from) { - return storage.getMaxPowerStored(); + return storage.getMaxPower(); } @Override - public long getMaxSpeedStored(ForgeDirection from) { - return storage.getMaxSpeedStored(); + public int getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeed(); } @Override diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java index f420c2e..922b811 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java @@ -7,12 +7,12 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; import shift.sextiarysector.api.machine.item.GearForceItem; import shift.sextiarysector.container.ItemBox; -public class TileEntityGFTank extends TileEntityDirection implements ISidedInventory, IEnergyHandler ,IGearForceGrid{ +public class TileEntityGFTank extends TileEntityDirection implements ISidedInventory, IGFEnergyHandler ,IGearForceGrid{ protected static final int[] slots_top = new int[] { 0 }; protected static final int[] slots_bottom = new int[] { 1 }; @@ -93,12 +93,12 @@ public void updateChargeEntity() if(this.items.getStackInSlot(1)==null)return; - if(GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPowerStored(), 1, true)>0){ - int s = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPowerStored(), 20, true); + if(GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true)>0){ + int s = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 20, true); - int i = this.storage.addEnergy(this.storage.getMaxPowerStored(), s, false); - GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPowerStored(), i, false); - if(i>0)this.inPower = this.storage.getMaxPowerStored(); + int i = this.storage.addEnergy(this.storage.getMaxPower(), s, false); + GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), i, false); + if(i>0)this.inPower = this.storage.getMaxPower(); //this.inSpeed += (int) i; this.markDirty(); @@ -110,16 +110,16 @@ public void updateChargeItem(){ if(this.items.getStackInSlot(0)==null)return; - if(this.storage.drawEnergy(this.storage.getMaxPowerStored(), 1, true)>0&&this.items.getStackInSlot(0)!=null){ + if(this.storage.drawEnergy(this.storage.getMaxPower(), 1, true)>0&&this.items.getStackInSlot(0)!=null){ - int i = this.storage.drawEnergy(this.storage.getMaxPowerStored(), 20, true); + int i = this.storage.drawEnergy(this.storage.getMaxPower(), 20, true); - int s = GearForceItem.manager.addEnergy(this.items.getStackInSlot(0), this.storage.getMaxPowerStored(), i, false); + int s = GearForceItem.manager.addEnergy(this.items.getStackInSlot(0), this.storage.getMaxPower(), i, false); - int j = this.storage.drawEnergy(this.storage.getMaxPowerStored(), s, false); + int j = this.storage.drawEnergy(this.storage.getMaxPower(), s, false); this.outSpeed+=j; - if(j>0)this.outPower=this.storage.getMaxPowerStored(); + if(j>0)this.outPower=this.storage.getMaxPower(); //int i = this.storage.addEnergy(this.storage.getMaxPowerStored(), s, false); //if(i>0)this.inPower = this.storage.getMaxPowerStored(); @@ -135,16 +135,16 @@ public void addOutEnergy(){ TileEntity t = this.worldObj.getTileEntity(xCoord + this.getDirection().offsetX, yCoord + this.getDirection().offsetY, zCoord + this.getDirection().offsetZ); - if(t instanceof IEnergyHandler && ((IEnergyHandler)t).canInterface(getDirection().getOpposite())){ + if(t instanceof IGFEnergyHandler && ((IGFEnergyHandler)t).canInterface(getDirection().getOpposite())){ - int i = ((IEnergyHandler)t).addEnergy(getDirection().getOpposite(), this.storage.getMaxPowerStored(), Math.min(160, this.storage.getSpeedStored()), true); + int i = ((IGFEnergyHandler)t).addEnergy(getDirection().getOpposite(), this.storage.getMaxPower(), Math.min(160, this.storage.getSpeedStored()), true); - int j = this.storage.drawEnergy(this.storage.getMaxPowerStored(), i, false); + int j = this.storage.drawEnergy(this.storage.getMaxPower(), i, false); - ((IEnergyHandler)t).addEnergy(getDirection().getOpposite(), this.storage.getMaxPowerStored(), j, false); + ((IGFEnergyHandler)t).addEnergy(getDirection().getOpposite(), this.storage.getMaxPower(), j, false); this.outSpeed+=j; - if(j>0)this.outPower=this.storage.getMaxPowerStored(); + if(j>0)this.outPower=this.storage.getMaxPower(); } @@ -178,7 +178,7 @@ public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { @Override public String getInventoryName() { - return "gui.ss.gf_tank_"+this.storage.getMaxPowerStored(); + return "gui.ss.gf_tank_"+this.storage.getMaxPower(); } @Override @@ -253,24 +253,24 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return storage.getSpeedStored(); } @Override public int getMaxPowerStored(ForgeDirection from) { - return storage.getMaxPowerStored(); + return storage.getMaxPower(); } @Override - public long getMaxSpeedStored(ForgeDirection from) { - return storage.getMaxSpeedStored(); + public int getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeed(); } //gui public int getEnergyProgressScaled(int par1) { - return (int) (this.storage.getSpeedStored() / ((float)this.storage.getMaxSpeedStored() / (float)par1)); + return (int) (this.storage.getSpeedStored() / ((float)this.storage.getMaxSpeed() / (float)par1)); } //NBT関係 diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java index 3b6cef5..989dae5 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java @@ -4,10 +4,10 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityGearBox extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ +public class TileEntityGearBox extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ public EnergyStorage storage = new EnergyStorage("Base", 1, 960, 160); @@ -51,11 +51,11 @@ public void updateServerEntity() { TileEntity t = this.worldObj.getTileEntity(x, y, z); - if(t instanceof IEnergyHandler){ + if(t instanceof IGFEnergyHandler){ - int j = ((IEnergyHandler) t).addEnergy(d.getOpposite(), this.storage.getMaxPowerStored(), i, false); + int j = ((IGFEnergyHandler) t).addEnergy(d.getOpposite(), this.storage.getMaxPower(), i, false); - this.storage.drawEnergy(this.storage.getMaxPowerStored(), j, false); + this.storage.drawEnergy(this.storage.getMaxPower(), j, false); } @@ -77,7 +77,7 @@ public int getConnect(){ TileEntity t = this.worldObj.getTileEntity(x, y, z); - if(t instanceof IEnergyHandler && ((IEnergyHandler) t).addEnergy(d.getOpposite(), this.storage.getMaxPowerStored(), 1, true)>0){ + if(t instanceof IGFEnergyHandler && ((IGFEnergyHandler) t).addEnergy(d.getOpposite(), this.storage.getMaxPower(), 1, true)>0){ i++; } @@ -134,7 +134,7 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return storage.getSpeedStored(); @@ -143,14 +143,14 @@ public long getSpeedStored(ForgeDirection from) { @Override public int getMaxPowerStored(ForgeDirection from) { - return storage.getMaxPowerStored(); + return storage.getMaxPower(); } @Override - public long getMaxSpeedStored(ForgeDirection from) { + public int getMaxSpeedStored(ForgeDirection from) { - return storage.getMaxSpeedStored(); + return storage.getMaxSpeed(); } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java index 14e78cd..009c231 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java @@ -4,10 +4,10 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityGearShaft extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ +public class TileEntityGearShaft extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ public float rotateUpStep = 0; public float rotateDownStep = 0; @@ -41,26 +41,26 @@ public void updateClientEntity() { private void updateServerEntity() { - if(!(this.getOutTileEntity() instanceof IEnergyHandler)){ + if(!(this.getOutTileEntity() instanceof IGFEnergyHandler)){ return; } - IEnergyHandler out = (IEnergyHandler) this.getOutTileEntity(); + IGFEnergyHandler out = (IGFEnergyHandler) this.getOutTileEntity(); - int i = storage.drawEnergy(storage.getMaxPowerStored(), storage.getMaxSpeedStored(), true); + int i = storage.drawEnergy(storage.getMaxPower(), storage.getMaxSpeed(), true); if(this.isUP()){ int add = (int)((float)i/4.0f); - int a = out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPowerStored()+1, add, true); - storage.drawEnergy(storage.getMaxPowerStored(), a*4, false); - out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPowerStored()+1, add, false); + int a = out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPower()+1, add, true); + storage.drawEnergy(storage.getMaxPower(), a*4, false); + out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPower()+1, add, false); }else{ - int a = out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPowerStored(), i, true); - storage.drawEnergy(storage.getMaxPowerStored(), a, false); - out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPowerStored(), i, false); + int a = out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPower(), i, true); + storage.drawEnergy(storage.getMaxPower(), a, false); + out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPower(), i, false); } @@ -93,9 +93,9 @@ public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate if(!this.canInterface(from))return 0; - if(power==this.storage.getMaxPowerStored() && this.isUP()){ + if(power==this.storage.getMaxPower() && this.isUP()){ return this.storage.addEnergy(power, speed, simulate); - }else if(power==this.storage.getMaxPowerStored()+1 && !this.isUP()){ + }else if(power==this.storage.getMaxPower()+1 && !this.isUP()){ return (int)((float)this.storage.addEnergy(power-1, speed*4, simulate)/4.0f); } @@ -119,18 +119,18 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return storage.getSpeedStored(); } @Override public int getMaxPowerStored(ForgeDirection from) { - return storage.getMaxPowerStored(); + return storage.getMaxPower(); } @Override - public long getMaxSpeedStored(ForgeDirection from) { - return storage.getMaxSpeedStored(); + public int getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeed(); } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java index 70414a6..f169f69 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java @@ -3,11 +3,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; import shift.sextiarysector.block.BlockMonitor.MonitorType; -public class TileEntityMonitor extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ +public class TileEntityMonitor extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ public EnergyStorage storage = new EnergyStorage("Base", 1, 10000); public MonitorType type = MonitorType.unknown; @@ -90,7 +90,7 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { if(!this.canInterface(from))return 0; return 0; } @@ -98,13 +98,13 @@ public long getSpeedStored(ForgeDirection from) { @Override public int getMaxPowerStored(ForgeDirection from) { if(!this.canInterface(from))return 0; - return this.storage.getMaxPowerStored(); + return this.storage.getMaxPower(); } @Override - public long getMaxSpeedStored(ForgeDirection from) { + public int getMaxSpeedStored(ForgeDirection from) { if(!this.canInterface(from))return 0; - return this.storage.getMaxSpeedStored(); + return this.storage.getMaxSpeed(); } @Override diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java index c60a15b..8905641 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java @@ -14,10 +14,10 @@ import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidHandler; import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityPump extends TileEntityDirection implements IFluidHandler, IEnergyHandler, IGearForceGrid { +public class TileEntityPump extends TileEntityDirection implements IFluidHandler, IGFEnergyHandler, IGearForceGrid { protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME); @@ -165,18 +165,18 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return storage.getSpeedStored(); } @Override public int getMaxPowerStored(ForgeDirection from) { - return storage.getMaxPowerStored(); + return storage.getMaxPower(); } @Override - public long getMaxSpeedStored(ForgeDirection from) { - return storage.getMaxSpeedStored(); + public int getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeed(); } @Override diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java index 710fb87..4fa6376 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java @@ -10,10 +10,10 @@ import net.minecraft.util.DamageSource; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntitySaw extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ +public class TileEntitySaw extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ public float rotateStep = 360; private int speed = 0; @@ -167,18 +167,18 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return storage.getSpeedStored(); } @Override public int getMaxPowerStored(ForgeDirection from) { - return storage.getMaxPowerStored(); + return storage.getMaxPower(); } @Override - public long getMaxSpeedStored(ForgeDirection from) { - return storage.getMaxSpeedStored(); + public int getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeed(); } @Override diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java index 81bb8df..02cbe8e 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java @@ -4,28 +4,31 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.fmp.IShaft; -public class TileEntityShaft extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ +public class TileEntityShaft extends TileEntityDirection implements IGFEnergyHandler, IGearForceGrid, IShaft { public float rotateStep = 360; - private EnergyStorage storage = new EnergyStorage("Base", 1, 320, 160); + private final EnergyStorage storage = new EnergyStorage("Base", 1, 320, 160); // 表示用 public int lastSpeed = 0; private final int cooltime = 0; - public TileEntityShaft(){ + public TileEntityShaft() { } - public TileEntityShaft(int i){ + public TileEntityShaft(int i) { this.getStorage().setPowerCapacity(i); } @Override public void updateEntity() { + super.updateEntity(); + if (this.worldObj.isRemote) { this.updateClientEntity(); } else { @@ -42,7 +45,7 @@ public void updateClientEntity() { yCoord + this.getInDirection().offsetY, zCoord + this.getInDirection().offsetZ); - if (t instanceof TileEntityShaft&& ((TileEntityShaft) t).getDirection().ordinal() == this.direction.ordinal()) { + if (t instanceof IShaft && ((IShaft) t).getDirection().ordinal() == this.direction.ordinal()) { return; } @@ -50,17 +53,17 @@ public void updateClientEntity() { * if(this.rotateStep>=360){ this.rotateStep-=360; } */ - this.rotateStep += (float)this.lastSpeed/10.0f; + this.rotateStep += this.lastSpeed / 10.0f; - t = this.worldObj.getTileEntity(xCoord + this.getOutDirection().offsetX,yCoord + this.getOutDirection().offsetY,zCoord + this.getOutDirection().offsetZ); + t = this.worldObj.getTileEntity(xCoord + this.getOutDirection().offsetX, yCoord + this.getOutDirection().offsetY, zCoord + this.getOutDirection().offsetZ); - for (int i = 2; t instanceof TileEntityShaft&& ((TileEntityShaft) t).getDirection().ordinal() == this.direction.ordinal(); i++) { + for (int i = 2; t instanceof IShaft && ((IShaft) t).getDirection().ordinal() == this.direction.ordinal(); i++) { // System.out.println("b"); - ((TileEntityShaft) t).rotateStep = this.rotateStep; + ((IShaft) t).setRotateStep(this.rotateStep); //if(this.worldObj.rand.nextInt(30)==1)this.worldObj.spawnParticle("reddust", t.xCoord+0.5f, t.yCoord+0.5f, t.zCoord+0.5f, -0.3D, 0.0D, 1.0D); - t = this.worldObj.getTileEntity(xCoord+ this.getOutDirection().offsetX * i,yCoord + this.getOutDirection().offsetY * i,zCoord + this.getOutDirection().offsetZ * i); + t = this.worldObj.getTileEntity(xCoord + this.getOutDirection().offsetX * i, yCoord + this.getOutDirection().offsetY * i, zCoord + this.getOutDirection().offsetZ * i); } } @@ -68,14 +71,14 @@ public void updateClientEntity() { public void updateServerEntity() { if (this.getStorage().getSpeedStored() != lastSpeed) { - lastSpeed = (int) (this.getStorage().getSpeedStored()); + lastSpeed = (this.getStorage().getSpeedStored()); // PacketDispatcher.sendPacketToAllPlayers(this.getDescriptionPacket()); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } if (this.getStorage().getSpeedStored() > 0) { - this.getStorage().drawEnergy(this.getStorage().getMaxPowerStored(), 10, false); + this.getStorage().drawEnergy(this.getStorage().getMaxPower(), 10, false); } /* @@ -107,8 +110,8 @@ public void updateServerEntity() { public int getShaftLength() { - TileEntityShaft in = this.getInTileEntityShaft(); - TileEntityShaft out = this.getOutTileEntityShaft(); + TileEntity in = (TileEntity) this.getInTileEntityShaft(); + TileEntity out = (TileEntity) this.getOutTileEntityShaft(); int x = Math.abs(in.xCoord - out.yCoord); int y = Math.abs(in.yCoord - out.yCoord); @@ -118,41 +121,42 @@ public int getShaftLength() { } - public TileEntityShaft getInTileEntityShaft() { + @Override + public IShaft getInTileEntityShaft() { if (this.isInShaft()) { return this; } else { - return ((TileEntityShaft) this.getInTileEntity()) - .getInTileEntityShaft(); + return ((IShaft) this.getInTileEntity()).getInTileEntityShaft(); } } - public TileEntityShaft getOutTileEntityShaft() { + @Override + public IShaft getOutTileEntityShaft() { if (this.isOutShaft()) { return this; } else { - return ((TileEntityShaft) this.getOutTileEntity()).getOutTileEntityShaft(); + return ((IShaft) this.getOutTileEntity()).getOutTileEntityShaft(); } } public boolean isInShaft() { - return !(this.getInTileEntity() instanceof TileEntityShaft)|| ((TileEntityShaft) this.getInTileEntity()).getDirection().ordinal() != this.getDirection().ordinal(); + return !(this.getInTileEntity() instanceof IShaft) || ((IShaft) this.getInTileEntity()).getDirection().ordinal() != this.getDirection().ordinal(); } public boolean isOutShaft() { - return !(this.getOutTileEntity() instanceof TileEntityShaft)|| ((TileEntityShaft) this.getOutTileEntity()).getDirection().ordinal() != this.getDirection().ordinal(); + return !(this.getOutTileEntity() instanceof IShaft) || ((IShaft) this.getOutTileEntity()).getDirection().ordinal() != this.getDirection().ordinal(); } public TileEntity getInTileEntity() { - return this.worldObj.getTileEntity(xCoord+ this.getInDirection().offsetX, yCoord+ this.getInDirection().offsetY, zCoord+ this.getInDirection().offsetZ); + return this.worldObj.getTileEntity(xCoord + this.getInDirection().offsetX, yCoord + this.getInDirection().offsetY, zCoord + this.getInDirection().offsetZ); } public TileEntity getOutTileEntity() { - return this.worldObj.getTileEntity(xCoord+ this.getOutDirection().offsetX,yCoord + this.getOutDirection().offsetY,zCoord + this.getOutDirection().offsetZ); + return this.worldObj.getTileEntity(xCoord + this.getOutDirection().offsetX, yCoord + this.getOutDirection().offsetY, zCoord + this.getOutDirection().offsetZ); } public ForgeDirection getInDirection() { @@ -178,19 +182,27 @@ public void writeToNBT(NBTTagCompound par1nbtTagCompound) { par1nbtTagCompound.setInteger("lastSpeed", lastSpeed); } + @Override public float getRotateStep() { return rotateStep / 2.0f; } + @Override + public void setRotateStep(float r) { + this.rotateStep = r; + } + @Override public ForgeDirection getDirection() { return direction; } + @Override public void setDirection(ForgeDirection d) { direction = d; } + @Override public EnergyStorage getStorage() { //if(storage==null){ @@ -202,15 +214,15 @@ public EnergyStorage getStorage() { // EnergyStorageの利用 @Override - public int addEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { if (this.getInDirection().ordinal() != from.ordinal()) return 0; - if (!(this.getOutTileEntity() instanceof IEnergyHandler) || power != this.getStorage().getMaxPowerStored()) + if (!(this.getOutTileEntity() instanceof IGFEnergyHandler) || power != this.getStorage().getMaxPower()) return 0; - int i = ((IEnergyHandler) this.getOutTileEntity()).addEnergy(from,power, speed, simulate); + int i = ((IGFEnergyHandler) this.getOutTileEntity()).addEnergy(from, power, speed, simulate); // storage.addEnergy(power, speed, simulate); if (!simulate) @@ -249,7 +261,7 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return this.getStorage().getSpeedStored(); @@ -258,14 +270,14 @@ public long getSpeedStored(ForgeDirection from) { @Override public int getMaxPowerStored(ForgeDirection from) { - return this.getStorage().getMaxPowerStored(); + return this.getStorage().getMaxPower(); } @Override - public long getMaxSpeedStored(ForgeDirection from) { + public int getMaxSpeedStored(ForgeDirection from) { - return this.getStorage().getMaxSpeedStored(); + return this.getStorage().getMaxSpeed(); } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityShippingBox.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityShippingBox.java new file mode 100644 index 0000000..7251805 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityShippingBox.java @@ -0,0 +1,318 @@ +package shift.sextiarysector.tileentity; + +import java.util.ArrayList; +import java.util.UUID; + +import net.minecraft.entity.item.EntityFireworkRocket; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemDye; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import shift.mceconomy2.api.MCEconomyAPI; +import shift.sextiarysector.api.season.SeasonAPI; +import shift.sextiarysector.container.ItemBox; +import shift.sextiarysector.module.ModuleStatistics; + +public class TileEntityShippingBox extends TileEntity implements IInventory, IFluidHandler { + + public UUID player = null; + public double mp = 0; + public double lastmp = 0; + protected ItemBox items = new ItemBox("Base", 1); + public FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 8); + + public void setPlayer(EntityPlayer p) { + + player = p.getGameProfile().getId(); + + } + + @Override + public void updateEntity() { + + if (!this.worldObj.isRemote) { + this.updateServerEntity(); + } + + } + + public void updateServerEntity() { + + if (SeasonAPI.getHour(getWorldObj(), 1) != 7 || SeasonAPI.getMinute(getWorldObj()) != 0) return; + + if (lastmp > 0) { + + mp += lastmp; + + ItemStack p_77648_1_ = this.getFireworks(); + + EntityFireworkRocket entityfireworkrocket = new EntityFireworkRocket(worldObj, xCoord + 0.5f, yCoord + 1.2f, zCoord + 0.5f, p_77648_1_); + getWorldObj().spawnEntityInWorld(entityfireworkrocket); + + if (lastmp > 1000) { + + ItemStack p_77648_2_ = this.getFireworks(); + + EntityFireworkRocket entityfireworkrocket2 = new EntityFireworkRocket(worldObj, xCoord + 0.5f, yCoord + 1.7f, zCoord + 0.5f, p_77648_2_); + getWorldObj().spawnEntityInWorld(entityfireworkrocket2); + + } + + if (lastmp > 10000) { + + for (int i = 0; i < 4; i++) { + + ItemStack p_77648_3_ = this.getFireworks(); + + EntityFireworkRocket entityfireworkrocket3 = new EntityFireworkRocket(worldObj, xCoord + this.worldObj.rand.nextFloat(), yCoord + 1.7f, zCoord + this.worldObj.rand.nextFloat(), p_77648_3_); + getWorldObj().spawnEntityInWorld(entityfireworkrocket3); + + } + + } + + lastmp = 0; + + } + + } + + private ItemStack getFireworks() { + + ItemStack p_77648_1_ = new ItemStack(Items.fireworks); + + NBTTagCompound nbttagcompound = new NBTTagCompound();//Explosion + + ArrayList arraylist = new ArrayList(); + arraylist.add(Integer.valueOf(ItemDye.field_150922_c[2])); + int[] aint1 = new int[arraylist.size()]; + + for (int l2 = 0; l2 < aint1.length; ++l2) + { + aint1[l2] = ((Integer) arraylist.get(l2)).intValue(); + } + + if (SeasonAPI.getHour(getWorldObj(), 0) == 7) { + nbttagcompound.setBoolean("Flicker", true); + } else { + nbttagcompound.setBoolean("Trail", true); + } + + nbttagcompound.setIntArray("Colors", aint1); + nbttagcompound.setByte("Type", (byte) 3); + + NBTTagCompound nbttagcompound1 = new NBTTagCompound(); + NBTTagCompound nbttagcompound2 = new NBTTagCompound(); + NBTTagList nbttaglist = new NBTTagList(); + + nbttaglist.appendTag(nbttagcompound); + + nbttagcompound1.setTag("Explosions", nbttaglist); + nbttagcompound1.setByte("Flight", (byte) 3); + nbttagcompound2.setTag("Fireworks", nbttagcompound1); + + p_77648_1_.setTagCompound(nbttagcompound2); + + return p_77648_1_; + + } + + //IInventory関係 + @Override + public int getSizeInventory() { + return items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return items.getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return items.decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return items.getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + //items.setInventorySlotContents(i, itemstack); + + if (i != 0 || itemstack == null) return; + + int mp = 0; + + mp = MCEconomyAPI.getPurchase(itemstack) * itemstack.stackSize; + + if (mp > 0 && player != null && this.worldObj.func_152378_a(player) != null) { + this.worldObj.func_152378_a(player).addStat(ModuleStatistics.objectSellStats[Item.getIdFromItem(itemstack.getItem())], itemstack.stackSize); + } + + this.lastmp += mp; + + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return items.getInventoryStackLimit(); + } + + @Override + public void markDirty() { + super.markDirty(); + items.onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer.getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public String getInventoryName() { + return "ss.shipping_box"; + } + + @Override + public boolean isItemValidForSlot(int p_94041_1_, ItemStack itemstack) { + + if (itemstack == null) return false; + + return MCEconomyAPI.hasPurchase(itemstack); + + } + + /* IFluidHandler */ + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + //return tank.fill(resource, doFill); + + double mp = 0; + + if (!MCEconomyAPI.hasFluidPurchase(resource.getFluid())) return 0; + + mp = MCEconomyAPI.getFluidPurchase(resource.getFluid()) * resource.amount; + + if (mp > 0 && doFill) { + this.lastmp += mp; + } + + return resource.amount; + + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(tank.getFluid())) + { + return null; + } + return tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return tank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { tank.getInfo() }; + } + + //NBT + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); + this.items.readFromNBT(par1nbtTagCompound); + tank.readFromNBT(par1nbtTagCompound); + if (par1nbtTagCompound.hasKey("Empty") && tank.getFluidAmount() > 0) this.tank.setFluid(null); + this.mp = par1nbtTagCompound.getDouble("mp"); + this.lastmp = par1nbtTagCompound.getDouble("lastmp"); + if (par1nbtTagCompound.hasKey("owner")) { + long i = par1nbtTagCompound.getLong("uuid1"); + long j = par1nbtTagCompound.getLong("uuid2"); + this.player = new UUID(i, j); + } + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); + this.items.writeToNBT(par1nbtTagCompound); + tank.writeToNBT(par1nbtTagCompound); + par1nbtTagCompound.setDouble("mp", this.mp); + par1nbtTagCompound.setDouble("lastmp", this.lastmp); + if (this.player != null) { + par1nbtTagCompound.setBoolean("owner", true); + + par1nbtTagCompound.setLong("uuid1", this.player.getMostSignificantBits()); + par1nbtTagCompound.setLong("uuid2", this.player.getLeastSignificantBits()); + + } + + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + //this.worldObj.func_147479_m(xCoord, yCoord, zCoord); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java index 12eb379..c225cf1 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java @@ -6,13 +6,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; import shift.sextiarysector.api.machine.item.GearForceItem; import shift.sextiarysector.block.BlockSimpleMachine; import shift.sextiarysector.container.ItemBox; -public class TileEntitySimpleMachine extends TileEntityDirection implements ISidedInventory, IEnergyHandler ,IGearForceGrid{ +public class TileEntitySimpleMachine extends TileEntityDirection implements ISidedInventory, IGFEnergyHandler, IGearForceGrid { protected static final int[] slots_top = new int[] { 0 }; protected static final int[] slots_bottom = new int[] { 2, 1 }; @@ -30,18 +30,17 @@ public class TileEntitySimpleMachine extends TileEntityDirection implements ISid public int machineMaxProgressTime = 2000; //表示用 - public int inPower = 0,inSpeed = 0; + public int inPower = 0, inSpeed = 0; public int lastSeed = 0; - public boolean In ; + public boolean In; private int cooltime = 0; public TileEntitySimpleMachine() { } - public TileEntitySimpleMachine(int type) { this.storage.setPowerCapacity(type); } @@ -69,56 +68,56 @@ public void updateServerEntity() { //System.out.println("updateServerEntity"+this.storage.getSpeedStored()); - if(this.inSpeed==0)inPower=0; - if(lastSeed!=this.storage.getSpeedStored()){ - this.inSpeed = this.storage.getSpeedStored()-lastSeed; + if (this.inSpeed == 0) inPower = 0; + if (lastSeed != this.storage.getSpeedStored()) { + this.inSpeed = this.storage.getSpeedStored() - lastSeed; this.lastSeed = this.storage.getSpeedStored(); - }else{ + } else { this.inSpeed = 0; } - if(this.storage.getSpeedStored()<=0){ + if (this.storage.getSpeedStored() <= 0) { this.storage.setPowerStored(0); } - if(this.isCharging()){ + if (this.isCharging()) { this.updateChargeEntity(); } - if(cooltime<=10){ + if (cooltime <= 10) { this.cooltime++; - }else{ + } else { - this.cooltime=0; + this.cooltime = 0; - if (this.canWork() ) - { - if(this.storage.getSpeedStored()>=1){ - //++this.machineWorkProgressTime; - this.machineWorkProgressTime+=this.storage.drawEnergy(this.storage.getMaxPowerStored(), 100, false); + if (this.canWork()) + { + if (this.storage.getSpeedStored() >= 1) { + //++this.machineWorkProgressTime; + this.machineWorkProgressTime += this.storage.drawEnergy(this.storage.getMaxPower(), 100, false); - if (this.machineWorkProgressTime >= machineMaxProgressTime) - { - this.machineWorkProgressTime = 0; - this.workItem(); + if (this.machineWorkProgressTime >= machineMaxProgressTime) + { + this.machineWorkProgressTime = 0; + this.workItem(); - if(this.storage.getSpeedStored() == 0){ - this.storage.setPowerStored(0); - } + if (this.storage.getSpeedStored() == 0) { + this.storage.setPowerStored(0); + } - //PacketDispatcher.sendPacketToAllPlayers(getDescriptionPacket()); - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - this.markDirty(); + //PacketDispatcher.sendPacketToAllPlayers(getDescriptionPacket()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + this.markDirty(); - } - } + } + } - } - else - { + } + else + { - this.machineWorkProgressTime = 0; - } + this.machineWorkProgressTime = 0; + } } @@ -126,14 +125,14 @@ public void updateServerEntity() public void updateChargeEntity() { - if(this.items.getStackInSlot(1)==null)return; + if (this.items.getStackInSlot(1) == null) return; - if(GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPowerStored(), 1, true)>0){ - int s = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPowerStored(), 20, true); + if (GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0) { + int s = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 20, true); - int i = this.storage.addEnergy(this.storage.getMaxPowerStored(), s, false); - GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPowerStored(), i, false); - if(i>0)this.inPower = this.storage.getMaxPowerStored(); + int i = this.storage.addEnergy(this.storage.getMaxPower(), s, false); + GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), i, false); + if (i > 0) this.inPower = this.storage.getMaxPower(); //this.inSpeed += (int) i; this.markDirty(); @@ -142,66 +141,66 @@ public void updateChargeEntity() } public boolean canWork() - { - if (this.items.getStackInSlot(0) == null) - { - return false; - } - else - { - ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); - if (itemstack == null) return false; - if (this.items.getStackInSlot(2) == null) return true; - if (!this.items.getStackInSlot(2).isItemEqual(itemstack)) return false; - int result = this.items.getStackInSlot(2).stackSize + itemstack.stackSize; - return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); - } - } + { + if (this.items.getStackInSlot(0) == null) + { + return false; + } + else + { + ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); + if (itemstack == null) return false; + if (this.items.getStackInSlot(2) == null) return true; + if (!this.items.getStackInSlot(2).isItemEqual(itemstack)) return false; + int result = this.items.getStackInSlot(2).stackSize + itemstack.stackSize; + return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); + } + } public void workItem() - { - if (this.canWork()) - { - ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); + { + if (this.canWork()) + { + ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); - if (this.items.getStackInSlot(2) == null) - { - this.setInventorySlotContents(2, itemstack.copy()); - } - else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) - { - this.items.getStackInSlot(2).stackSize += itemstack.stackSize; - } + if (this.items.getStackInSlot(2) == null) + { + this.setInventorySlotContents(2, itemstack.copy()); + } + else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) + { + this.items.getStackInSlot(2).stackSize += itemstack.stackSize; + } - this.items.reduceStackSize(0, 1); + this.items.reduceStackSize(0, 1); - } - } + } + } - public ItemStack getResult(ItemStack itemstack){ - return ((BlockSimpleMachine)this.getBlockType()).getResult(itemstack); + public ItemStack getResult(ItemStack itemstack) { + return ((BlockSimpleMachine) this.getBlockType()).getResult(itemstack); } public boolean isWorking() - { - return this.machineWorkProgressTime > 0&&this.storage.getPowerStored()>0; - } + { + return this.machineWorkProgressTime > 0 && this.storage.getPowerStored() > 0; + } public boolean isCharging() - { + { - boolean f1,f2,f3; + boolean f1, f2, f3; - if(this.items.getStackInSlot(1)==null)return false; + if (this.items.getStackInSlot(1) == null) return false; - f1=this.storage.getMaxSpeedStored()>this.storage.getSpeedStored(); - f2=(this.items.getStackInSlot(1)!=null&&GearForceItem.manager.isGearForceItem(this.items.getStackInSlot(1))); - f3=GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPowerStored(), 1, true)>0; + f1 = this.storage.getMaxSpeed() > this.storage.getSpeedStored(); + f2 = (this.items.getStackInSlot(1) != null && GearForceItem.manager.isGearForceItem(this.items.getStackInSlot(1))); + f3 = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0; //System.out.println(f1+" "+f2+" "+f3); - return f1&&f2&&f3; - } + return f1 && f2 && f3; + } //IInventory関係 @Override @@ -231,7 +230,7 @@ public void setInventorySlotContents(int i, ItemStack itemstack) { @Override public String getInventoryName() { - return "gui."+((BlockSimpleMachine)this.blockType).getGUIUnlocalizedName();//+SimpleMachine.values()[this.worldObj.getBlockMetadata(xCoord, yCoord, zCoord)].icon+".name"; + return "gui." + ((BlockSimpleMachine) this.blockType).getGUIUnlocalizedName();//+SimpleMachine.values()[this.worldObj.getBlockMetadata(xCoord, yCoord, zCoord)].icon+".name"; } @Override @@ -245,7 +244,7 @@ public int getInventoryStackLimit() { } @Override - public void markDirty(){ + public void markDirty() { super.markDirty(); items.onInventoryChanged(); } @@ -283,12 +282,11 @@ public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate int i = storage.addEnergy(power, speed, simulate); - if(!simulate&&i>0){ - this.inPower=power; + if (!simulate && i > 0) { + this.inPower = power; //this.inSpeed+=i; } - return i; } @@ -318,7 +316,7 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return storage.getSpeedStored(); @@ -327,14 +325,14 @@ public long getSpeedStored(ForgeDirection from) { @Override public int getMaxPowerStored(ForgeDirection from) { - return storage.getMaxPowerStored(); + return storage.getMaxPower(); } @Override - public long getMaxSpeedStored(ForgeDirection from) { + public int getMaxSpeedStored(ForgeDirection from) { - return storage.getMaxSpeedStored(); + return storage.getMaxSpeed(); } @@ -356,14 +354,14 @@ public boolean canExtractItem(int i, ItemStack itemstack, int j) { } public int getWorkProgressScaled(int par1) - { - return this.machineWorkProgressTime / (machineMaxProgressTime / par1); - } + { + return this.machineWorkProgressTime / (machineMaxProgressTime / par1); + } public int getEnergyProgressScaled(int par1) - { - return (int) (this.storage.getSpeedStored() / (this.storage.getMaxSpeedStored() / par1)); - } + { + return this.storage.getSpeedStored() / (this.storage.getMaxSpeed() / par1); + } //NBT関係 @Override @@ -383,18 +381,16 @@ public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); storage.writeToNBT(nbt); items.writeToNBT(nbt); - nbt.setShort("WorkTime", (short)this.machineWorkProgressTime); + nbt.setShort("WorkTime", (short) this.machineWorkProgressTime); nbt.setInteger("inPower", this.inPower); nbt.setInteger("inSpeed", this.inSpeed); } - @Override public boolean canIn(ForgeDirection from) { return true; } - @Override public boolean canOut(ForgeDirection from) { return false; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java index e77d5d0..c5a3d8e 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java @@ -4,10 +4,10 @@ import net.minecraft.block.BlockLiquid; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntitySmallWaterwheel extends TileEntityDirection implements IEnergyHandler,IGearForceGrid{ +public class TileEntitySmallWaterwheel extends TileEntityDirection implements IGFEnergyHandler,IGearForceGrid{ public float rotateStep = 0; @@ -43,9 +43,9 @@ public void updateClientEntity() public void updateServerEntity() { TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IEnergyHandler && this.isWork()){ + if(t!=null && t instanceof IGFEnergyHandler && this.isWork()){ - ((IEnergyHandler)t).addEnergy(this.direction, 2, 40, false); + ((IGFEnergyHandler)t).addEnergy(this.direction, 2, 40, false); } } @@ -110,7 +110,7 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return 0; } @@ -120,7 +120,7 @@ public int getMaxPowerStored(ForgeDirection from) { } @Override - public long getMaxSpeedStored(ForgeDirection from) { + public int getMaxSpeedStored(ForgeDirection from) { return 0; } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java index 7e7761f..f348195 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java @@ -2,10 +2,10 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntitySmallWindmill extends TileEntityDirection implements IEnergyHandler,IGearForceGrid { +public class TileEntitySmallWindmill extends TileEntityDirection implements IGFEnergyHandler,IGearForceGrid { public float rotateStep = 0; @@ -42,9 +42,9 @@ public void updateClientEntity() public void updateServerEntity() { TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IEnergyHandler && this.isWork()){ + if(t!=null && t instanceof IGFEnergyHandler && this.isWork()){ - ((IEnergyHandler)t).addEnergy(this.direction, 1, 20, false); + ((IGFEnergyHandler)t).addEnergy(this.direction, 1, 20, false); } } @@ -98,7 +98,7 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return 0; } @@ -108,7 +108,7 @@ public int getMaxPowerStored(ForgeDirection from) { } @Override - public long getMaxSpeedStored(ForgeDirection from) { + public int getMaxSpeedStored(ForgeDirection from) { return 0; } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java index 0ef27f7..802d578 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java @@ -12,11 +12,11 @@ import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; import shift.sextiarysector.container.ItemBox; -public class TileEntitySteamMotor extends TileEntityDirection implements IEnergyHandler, IGearForceGrid, ISidedInventory, IFluidHandler{ +public class TileEntitySteamMotor extends TileEntityDirection implements IGFEnergyHandler, IGearForceGrid, ISidedInventory, IFluidHandler{ protected static final int[] slots_top = new int[] { 0 }; protected static final int[] slots_bottom = new int[] { 1 }; @@ -93,9 +93,9 @@ public void work(){ } TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IEnergyHandler && this.canWork()){ + if(t!=null && t instanceof IGFEnergyHandler && this.canWork()){ - ((IEnergyHandler)t).addEnergy(this.direction, 3, use, false); + ((IGFEnergyHandler)t).addEnergy(this.direction, 3, use, false); } } @@ -286,7 +286,7 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return 0; } @@ -296,7 +296,7 @@ public int getMaxPowerStored(ForgeDirection from) { } @Override - public long getMaxSpeedStored(ForgeDirection from) { + public int getMaxSpeedStored(ForgeDirection from) { return 0; } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java index cfe7f11..17a4368 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java @@ -2,7 +2,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import tsuteto.tofu.api.tileentity.ITfConsumer; @@ -48,9 +48,9 @@ private void updateServerEntity() { TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IEnergyHandler){ + if(t!=null && t instanceof IGFEnergyHandler){ - int i = ((IEnergyHandler)t).addEnergy(this.direction, 2, 40, false); + int i = ((IGFEnergyHandler)t).addEnergy(this.direction, 2, 40, false); this.tofu-=(i/100.0); } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java index 39c3e45..44f181a 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java @@ -2,10 +2,10 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.IEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityWindmill extends TileEntityDirection implements IEnergyHandler ,IGearForceGrid{ +public class TileEntityWindmill extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ public float rotateStep = 0; @@ -42,9 +42,9 @@ public void updateClientEntity() public void updateServerEntity() { TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IEnergyHandler && this.isWork()){ + if(t!=null && t instanceof IGFEnergyHandler && this.isWork()){ - ((IEnergyHandler)t).addEnergy(this.direction, 2, 20, false); + ((IGFEnergyHandler)t).addEnergy(this.direction, 2, 20, false); } } @@ -98,7 +98,7 @@ public int getPowerStored(ForgeDirection from) { } @Override - public long getSpeedStored(ForgeDirection from) { + public int getSpeedStored(ForgeDirection from) { return 0; } @@ -108,7 +108,7 @@ public int getMaxPowerStored(ForgeDirection from) { } @Override - public long getMaxSpeedStored(ForgeDirection from) { + public int getMaxSpeedStored(ForgeDirection from) { return 0; } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 72a8edf..99f795b 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -228,6 +228,7 @@ item.ss.attack_unit.name=Attack Unit item.ss.defense_unit.name=Defense Unit item.ss.attack_rust_unit.name=Attack Rust Unit item.ss.defense_rust_unit.name=Defense Rust Unit +item.ss.pickaxe_unit.name=Pickaxe Unit item.ss.iron_ring.name=Iron Ring @@ -265,6 +266,11 @@ item.ss.copper_axe.name=Copper Axe item.ss.copper_sword.name=Copper Sword item.ss.copper_hoe.name=Copper Hoe +item.ss.copper_helmet.name=Copper Helmet +item.ss.copper_chestplate.name=Copper Chestplate +item.ss.copper_leggings.name=Copper Leggings +item.ss.copper_boots.name=Copper Boots + item.ss.wood_watering_can.name=Wood Watering Can item.ss.mineboat_chest.name=Mineboat Chest @@ -333,6 +339,7 @@ item.ss.gf_contact_lenses.name=GF Contact Lenses #Fluid fluid.ss.takumi_tea=TAKUMI Tea fluid.ss.drinking_water=Drinking Water +fluid.ss.spring_water=Spring Water fluid.ss.hot_springs=Hot Springs fluid.ss.steam=Steam fluid.ss.sap=Sap diff --git a/src/main/resources/assets/sextiarysector/textures/guis/shipping_box.png b/src/main/resources/assets/sextiarysector/textures/guis/shipping_box.png new file mode 100644 index 0000000000000000000000000000000000000000..b5439f412c936320ab2041780805b197dc45c871 GIT binary patch literal 1328 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6|H(?D8gCb z5n0T@z;_UY8Fx&~ehU<2FY)wsWxvnN%cNx8?|s*nfq`YOr;B4q#jUq@4fAe$h%`Jr ze!ye%(|L*w8*3S&^Dap<#++DNy51h6llrzzCR&f=eGgcOyp^9fZ{DQ&+rRe<&abNue^R07f9vRdlWX?Mk$+t; z+Vnd_PV?;k{^gU_ZT0`w-SaoDe0{6$>jCSA`Eqh{F`{g_n{OWZ`n5D?`|WcaI@3?9 zm6lI9%y-~XdXdh*a25ugI>v^JzkVEjB+jrY_RszOQGb{mrU3;RSQrEt96%xSZO#rB zfxzouyYsc@olTqk?`)GS!wtqgIU6HX{x|%rkqZr-dHL|1?(Xh;^DNTS(@z?|lUKg? z|3{iA-%qgwyZP#W8?I)FLKN+@KNC7F_0oO&y?eUuvu_eOcmDk5KL&H687jmW85slx z7z7~HiPLZ2u4Qmo*Zu$5GdG3I%j5GeKksx%`6SgK zTye};{j1CDyLswLGe1f({O@95YT!^{=zvj|AI)tLds{#2`F7?qh7K+!hrTxqcbE)5 z9{siY|5M#MYlb5!LDNpBKE5c*U=;f&HBwA2krCw56Nw+||0Dq&c~kG-`*__tMupu+ zGAikEi)KysfTf?|NLSObjSk3UG+T{d-r^@{+rCoaObxF zbaBRohp*f>)L^)<@yGIi`xqG;{_p&;e2caK!;Q;d`wp&r%f-U*P3-^rxQIEAqB~g` z=Dm#i6a1&QnZe=EItK=Y%dw3N3``6?leaS&XDy!|p8uOaVm&Lvy;INa?RIeFF#=iCXd{`vKRAB#~sNAWj*7NDT*TZUWg3a!HVXFTUVc2QW*i0lryArM9b z!wwb&28Xse94Y4>JTI^Tne(A|4#yWa>xOTP9uJR57Y9AJ5Im8M<{cDc6d3dvIT$7= zsx!?r{$VNO4@@xzE`BUU5KkOfU9ykkMMy$%n?d^jkc28Ohu;iK3SOa8^O5u>lY)l>T)8g!Jl%JB}FgB-m^h-5p=p zVH_ycam5&<|Nq9I{5@T7T_q*telIx2CG7LLFulW`f8Vinl979y`x_a>q;+nH9GR1n zQ1MAt@V@#zLxW>;Qhw||BIE9~Ng(OR|0mW?0+Gf>4*twLuJ9T%FuXi!Ipe@J%}$_e O89ZJ6T-G@yGywo*A7i-y literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/armor/copper_chestplate.png b/src/main/resources/assets/sextiarysector/textures/items/armor/copper_chestplate.png new file mode 100644 index 0000000000000000000000000000000000000000..a1db5971b2913491cf05f62a76dac92f72ee5502 GIT binary patch literal 313 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~vjCfd>Hqy()qq0BJY5_^EKZ-DXvo)OAkn&CN-Rvs z-0z{1-zb5#p?Znoj|-{w~`OPV%0mfI?QYWw z&Vl)T3?17(i7nl9Uc2EpcVV5+vJCC_Cc%2rFRG4k7+8CY>b0A&M{MWFw7bhx^ZWC@ zyL%e~3_`ZWC1xI+TF`6a7QgNEx9?0mN1pF~I{yW)154ml|K$>XKp!!9y85}Sb4q9e E04@M|xc~qF literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/armor/copper_helmet.png b/src/main/resources/assets/sextiarysector/textures/items/armor/copper_helmet.png new file mode 100644 index 0000000000000000000000000000000000000000..2b2a9526f355d600b01606f91683c5be5a44911e GIT binary patch literal 248 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~vjCf-#Nz53LO`KbPZ!4!i_^&o5}z6bXD?_KI9#9e zNc~>os`Mkve(o?{_N;lmq(qXRk%7(6zE$mM_mJ=l4(U20Dnr)78&qol`;+0PBHSVE_OC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/armor/copper_leggings.png b/src/main/resources/assets/sextiarysector/textures/items/armor/copper_leggings.png new file mode 100644 index 0000000000000000000000000000000000000000..7576e55105ce2ab92aae404ae6c26379a06934c4 GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~vjCf-Rhjh6Z$P0EPZ!4!i_^&o5*Y_N^b!=0e2|~t zCj36&tHGjdyLUa&pATN=;W1Q~l$clJ{v!F%vJd+wnjfxL&R?|WK$G{Q3+L8q)Kmw) zc{SrhW}hYJ!5<95dYm)j=hvhstl8nx#(1PDka>ed!3WcKAs!)4heY4ETw=b-z~KEy W{*L}#zPmvC89ZJ6T-G@yGywp-CsK(3 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/armor/iron_boots.png b/src/main/resources/assets/sextiarysector/textures/items/armor/iron_boots.png new file mode 100644 index 0000000000000000000000000000000000000000..b69ca05c3a0046f0ed2288b0947ef5b62865084f GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`iJmTwAr-goPQ1u@z=6X#pSQgr z*1bsA+m1;t^mnM2{)6+%ob$F{s|>pOz-JBb?&=wl9Ue9xH!-Z@()xFf?Y`)TxxtLj zze(S0Cpg-PZnM zm)yzht!Iumbgy$0SfkK#&PF$*=l;<-#fs&x9TU>LL*tXKO|&18qR-89ZJ6T-G@yGywqh8$v+< literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/armor/iron_helmet.png b/src/main/resources/assets/sextiarysector/textures/items/armor/iron_helmet.png new file mode 100644 index 0000000000000000000000000000000000000000..65e64cc5c81b8d6d6cf735ab35a622f9cb22df05 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`A)YRdAr-fh6C~z2gol5(H}l!@ zEctj};)Be~%l=NEGUbo|lr#wk^M(bAC)g4$`)pxU=y_8zopr01l=vIRF3v literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/armor/iron_leggings.png b/src/main/resources/assets/sextiarysector/textures/items/armor/iron_leggings.png new file mode 100644 index 0000000000000000000000000000000000000000..ad536739e067aaacd318f24781416704f5ecdc7f GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`{+=$5Ar-fh6C_F;!o$DY+xY~1 z-k5y6;8Et~Wq+qnnexZ~0)xbY6ATlQQhX*c8u%(4Rq&a{c!I02vtPB jm=g;7^BBwuS1~X|#Qu-i`r`C0pwSGTu6{1-oD!M<6t^y? literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/gf_hammer.png b/src/main/resources/assets/sextiarysector/textures/items/gearforce/gf_hammer.png new file mode 100644 index 0000000000000000000000000000000000000000..9629ba69776df9916803f8aae9a035aaf5b343ac GIT binary patch literal 496 zcmV5%93_LM4eLgkZ4JSnQBMf&2nnC86;LnAqCWSW(zoOK}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6;#GD zJ5a4})v%`WmI0f%?*M8J@gDDGYbF2@NmUqx2*Faq*6M$DH$IKF?{uqycS1Bnt&S`5 z<4gb{1gfec#(aYE@xU+gw`L=z3~K-|#}-7Ys!BtqlhwX|u{YOludkJVAlNEFl+Ao2qX8ayjbxn60e!CIGje?fGEcRPR)Ox4LhJ5bJqpg08QXtX%4~ zw5z6TWvze54_}lce{=2Eo)-Za?_slA6BRgEzf!WY)=R+!KDg53-lZ~a3w6>ajO`O+ z))rvYVl$0C)LU@xQpxeliHW-x%RMyKZvx^3LuxIVV+b2jNv#vq#&&%?_=~2{ftf)4 zTSIWExaIjz1KLKT*0 zGB6knR<`>Cc80G}1tCNuDs`|##fdL_-1@w%=LBw^TjkWX)Q;V1@=@yrhP#nx+kN_j z{=u0H#25)xNLx^^pprggaO+$-IaFgC^4+K91Y@eBLH6F`Ge3I^8pSfJ=b)ys32Y|Z z{A_=fkFNEInxyvhSJ(OWY}u|JGTH>y^nl9qoT4b^7(&yD${N~RRje!j=IknGzP=8? zjZgL$CZrZKapawx%(>YB%+iU+NR_J^>DA0Yt&9dYJ}#dxBO+;g%s?DI^JJZTHUQ@{ zTzkCQBOv2G+o#g8@0baKK~wd-LX>40oxFd86Njkb1XQKTl0b@p12IcI78wDM5lC16 zMp|$>8^F8o9OcO$8-z~I=CeVfvQ{vQMl?&6)igJtVu&N@7B^~VjL5R0Ey7z500000NkvXXu0mjf3?C^l diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/defense_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/defense_unit.png index 710ecea1a3338729a80b530a6d84390ccfe7add9..cc98c91623e771ebabaf02cad5305f5957087bb2 100644 GIT binary patch delta 1130 zcmV-w1eN>S3DpUZQV9bP2NoPP)7A))TP%M$Nkl|`^mo9v-c zXb}qCi?!gzUOaf|q5TKiVg+j(ya}TCCy3xha#bj)wBV^81d)2l*+UEBO`)15DYfmk zWV6XmcHVcM$HO}_yPGE6?WqU*!aKaYGw=KTK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ne5b;n|M1-xaE#f%FIfnoUn1S!t2!fE8 zPM+lU;$JixO#s%{*ZBIIZ{_L=_aPe_5u>9Kg0Q){Ntz^xC#Wh(lHi;p zZna3ALkhDU0AUbtWAQ$|@6%{B*^bwExO^Lky>z@W=JRT(BL-tgWpheuLo9F)VE(ruZF-bkbHq z3_%dAoE6L8F%-lD&nH^?llu?u@nFpF4mOe6*4+pdsZ$1h@1HTKc>}c z0WdN$!j&uE!|E?g91QvG__^YB?fJeh0EbIcFfD>h3nN_xqRG?D&CTujZhCr}>FH@k z?%m?@{0ig8ZC9)e1OPx)F;k>qZ#@bCM3Zk8_xbOI`3uaPeV^9Bw>dJkK!oMMI|Eo< zU44>LT=Bp4UaQ89=8qScI2dyIi;n@AnVF&a`wta>`PeH6_XZ%aLlJ0wPb? z4XcuuN_0o_>cuYevmaER74W1UBj9`#qiIY;VJOsoE{Fu!)G%Y63yu2_jqyvp3% z9MOqWc?Ovx0>1ALRtfV`EJar_q(~i^~{GkDwk(ps?Wd<0EnRTQ6%()^KY8nd3ZIin>CU*`I|@HVf={xd)bh^=cF^d!nOSX)a!MI>%(|{ z4Qhg@08-fRoO5PY>_GB2tOtOB=OM)~GgP%dfWwCm5iYF|WGT_gZ9J^#3FPijE!8eJ zqN-%-a@Rp+e`sW8Gz3N(`|&)lKY%FO%J+uXepF literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/rust_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/rust_unit.png new file mode 100644 index 0000000000000000000000000000000000000000..8855b01ed09e6743a26ce89a904c3be423787109 GIT binary patch literal 926 zcmV;P17ZA$P)WFU8GbZ8()Nlj2>E@cM*00RO^L_t(o!|j(#kK;rX zg}+;_PV6C_jMNQ?5z$pXP1ntm`$zm(3aVpq8?3n!U& zCmp+k&@7l*Se9eod+MH3=iZ2_@-CO*9k2HQ?EMGdefy0%mvee@Op)jG2Yp0@@pyvw z1tNwRBO=0dI>k9h2mt{QPz7rf(lq1q7ccnp_z!x$eE@E6hkXCTkFphjb2-2Me#YtR zD@LO+{r(t1m`o=4qCkugW27hwLI}9o3?Blr2)hK3r76E0zrk8dueZ?TDBB&~1P=BwCibf?wP}S9Y%axcpNg^ahDC1xJ%xCQ=m^;UCc#HiI zK7QIIlyNJEBDIRvK!^xN;N)`7n~T4>7}#b2X_k?tDN!Mmk*E;2V$dxBz$OqCtT7}> z3jiX*-A%<<4;mlvtxbj|0>)Iqj1jEeYX(ph1x20{pRh6M?#?L;2K{Cq@V=n%1?3{^ zzqRVO^l3X0dLIbhqj$FbU-k>L8FhS+>&L7m@MWy)>+9wU)PN{kfi!_MQa>%NM7Yq) z&PgAZV9Q>x@>AB&|EAmR4r}$8kr770hRg?0*AeIpXq`FkYsdISm zt5dY>tihAd9G^aaPMQsY!xl4Pp7YhqFRJ^wBTciFdSi@)5I`$V_j@03aQG2t=jU8q zUJ!h!c$Q^r_qdtk=;#Q5>2$WPmG}P*|Mvj?0mg==uTwac%m4rY07*qoM6N<$f-5$n AzW@LL literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/unit.png index 40ba101140c4bd390cc96ed83755eff3de721806..1ff8d6e140c1d60a5c8d6ee98cf081a837560f1b 100644 GIT binary patch delta 997 zcmVDlq^60002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2q_2NMpv9a9C7TPuG9j7da6R9M69mpyOXMi7RdS*}iGayk_j0@w&(KyKm~NR!G% zeq9hCeI^@XJ+1+*%LG4 zV;+u=e0&1%{To02@V({vinG%biq(qA;RF$3Hk%Vdfrvv@5fOhDiv@X}6JtaG1kAwu zgfz|g>iKhCpZv{ud;q}B%{4#${EIvYkmoCY|LdHyx0g((GbWQ6f-s-Y2}OZ8K~*V= zf*2$Da!H60si$oKvNYwllXrOU8IKRR&9C|Hn-{|#I6FPz?CmAlvu_c9z@7l6Ov(~9 zMF2BHt;9^xvc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Pm1ocNnt7{Yo z58Z%YG z*(p=isr1@ff?mMx`Pvs=sV?&w0M0pIXbMx{T-gflT5G=#fd0Qaf4|JeC+HtA#;#do zKpo;0*lXw>bM5(~51!tB3xJ4#fOGD4)hryMiqL;B=#O@Qy^i+)HgQ_p&JxTTskQ$8 z0oo$qX4p*ctB*_21ynIbWFCN)5?yvWC#dcLqBXDC3+kC$YcST#0!Y&_<8)`LgqN-k z>dp8MuI~X+S_)LmSF%Y)HpylISZh1TrXboza{If!b$=zML$z#}uUKoa)_VK(O0kfp z;}3tv=?>4?38Fb#S3*HiolQO2qZ&^A5+E93iwWt@BhsDpP*o20@Ido`MhSJU$6WWw z{r!AUXOln_MMTlU{6eIvs8g>*)m3VS+VldQCXi~Y6wk>9otEJ^j!BZFRWGCqAPfS6 zFlb5HDne+t9HaYtz+dJF1ct)_(L&^vDC>V-;sFc>1BQd4SE9)PrFw&vy2a`|*?ZX_ zb1jo<4JyBpG@oyicTV^1|F9Qq`Q9A*~TqOFJA67z_uq9=N%& z(NQ9ZLI?$MRTSwIQkfP-(Hcir5kVmcka{%V9#L2=!wi7kJm<{G6P!GCijC1WacO@@ zxBnnO5pOt$I_K5)FQU#-I$JGWE6Y@sQk5lv#ieI?W-;+f%)Sp4IX~X`#h=((`w3%9 zk~sE=n|AF=S4m%Os@L=^!x&R#QS(e|$R`;u9y>;yBpf+<4qd;Fb8Z&E=`&~97;Sqc z0CsmX;y58%m;$iYR+Tjn%Ch`MkQHiU?MjwS4q0Pcy#$OgWRr}Ql@$Qi*Vnxgb3L$r z>v#FLnZJJG1fPBWMMsHScSaR}=G*WInIj0sTC!}y<1k-+?bXhl=lP#}oHhVdwd2mG c`D@4e8!*V|dtS_~`2YX_07*qoM6N<$f(|`uH2?qr diff --git a/src/main/resources/assets/sextiarysector/textures/models/armor/copper_layer_1.png b/src/main/resources/assets/sextiarysector/textures/models/armor/copper_layer_1.png new file mode 100644 index 0000000000000000000000000000000000000000..4e581783d941e6dbf594b201bf6c922bd4df387c GIT binary patch literal 1589 zcmV-52Fm$~P)A;Uq91VL5h`!MlENS@p2VV5c{@#h|$6cr< z%~)ptB}QJI1~5HNg-Zlifw7GJE6{-89AG>ahjm#^Qwiv)19uOkP+wY_A-$gPB>e3^|;zmPSRwJwHshbaWnlJ9z0uH}VCr8#1 z>}{pb8w)Yg84q*Yudo3|g8=H`y;OwKh<6~77)h(X^JOYzX(b_LGQveDHG~k+fZE>% zr4tIgL#hehIdn}ldt0D&sy9aPj>-J$_mJ`%i0;1z^9ovB;^9xY2pyY_y6HSNFpVD# zM1A#7)F)2WGP$7&ftCU3^mA)V{OB=-&W#H`Z5gfeDQe;H0QK1wZvkU8Ve~i=+|eKwIc=W0hjZtW*6;KilOt;b#y52m`vx&rhtAl%63qzQ_Mfbe{W4@5KP7P7}+u&UaR`$2kT%$1(kz7P~ zZwqBhQ&amrglJ-mmqWrFtZ9b|fp?(~uv-@OAdrf^2$qT%&tAM7L( zmwkwO^fjvNAg$iTBLHJjy*|vQjVUT26=O@}{@oM0KRZEny6PG=s&-cnjmqJCTDlpz_w^($`br6%{vPL;gUj8xp@oz_*PTAtgf@%@1udA zT_Q1*W?H4?&(w3IFggjtc zIXZa{D(@IMSl-(LThg&9)8pU&O5-9CmwI>)igr4a{S1y0IhnFVOtIMGIRR3D5L4b5 zJYjf{7(6pN?H*JU#8s!ZL3IgHfh{!+{6d6&2~0;wr;jYHP*lgzUV4Ja#5;V5l&6G- z0~~H+BKG?0i>(_x@o0F4k&3_+`O97sJ-KGjW1viXyQI#V?EH(g{>Ywnqn+y9jb*2hQ7o`5ba n;_q7ZMJUW7_&iI(zG&AkwIbx(L`_&v00000NkvXXu0mjfa?kaR literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/armor/copper_layer_2.png b/src/main/resources/assets/sextiarysector/textures/models/armor/copper_layer_2.png new file mode 100644 index 0000000000000000000000000000000000000000..6aa457058da269c778a598c610fac50b1c90d2bd GIT binary patch literal 812 zcmV+{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on, 23 Mar 2015 22:54:03 +0900 Subject: [PATCH 74/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=83=96?= =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=82=B9=E3=83=88=E3=83=BC=E3=83=B3=E3=82=B8?= =?UTF-8?q?=E3=82=A7=E3=83=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・ブルーストーンジェルを追加 ・マナ抽出機を追加 ・紡績機を追加 --- build.gradle | 2 +- .../shift/sextiarysector/SSAchievement.java | 11 +- .../java/shift/sextiarysector/SSBlocks.java | 12 + .../java/shift/sextiarysector/SSFluids.java | 2 + .../shift/sextiarysector/SSGuiHandler.java | 13 + .../java/shift/sextiarysector/SSItems.java | 14 +- .../shift/sextiarysector/SSOreDictionary.java | 7 + .../java/shift/sextiarysector/SSRecipes.java | 10 + .../shift/sextiarysector/SextiarySector.java | 2 +- .../api/machine/energy/IEnergyHandler.java | 71 ++ .../api/machine/item/ItemGearForce.java | 2 +- .../block/BlockFluidFGFMachine.java | 326 +++++++++ .../ContainerFluidGFMachineBase.java | 219 ++++++ .../container/ContainerSimpleMachine.java | 351 +++++----- .../sextiarysector/event/HUDEventHandler.java | 17 +- .../sextiarysector/fmp/ShaftEventHandler.java | 41 +- .../gui/GuiFluidFGFMachineBase.java | 210 ++++++ .../sextiarysector/gui/GuiManaSqueezer.java | 20 + .../gui/GuiSpinningMachine.java | 19 + .../module/ModuleToolMaterial.java | 2 +- .../nei/ManaSqueezerRecipeHandler.java | 62 ++ .../nei/NEISextiarySectorConfig.java | 13 +- .../nei/SpinningMachineRecipeHandler.java | 40 ++ .../sextiarysector/plugin/PluginFMP.java | 4 +- .../sextiarysector/plugin/SSPlugins.java | 10 +- .../sextiarysector/recipe/RecipesCore.java | 6 + .../recipe/RecipesFurnaceCraft.java | 10 +- .../sextiarysector/recipe/RecipesMachine.java | 415 ++++++------ .../recipe/RecipesManaSqueezer.java | 15 + .../recipe/RecipesSpinningMachine.java | 18 + .../renderer/model/ModelGearShaftUp.java | 51 +- .../TileEntityFluidFGFMachineBase.java | 625 ++++++++++++++++++ .../tileentity/TileEntityGearShaft.java | 38 +- .../tileentity/TileEntitySimpleMachine.java | 3 +- .../tileentity/TileEntitySquare.java | 177 ++--- .../assets/sextiarysector/lang/en_US.lang | 25 +- .../textures/blocks/machine/mana_squeezer.png | Bin 0 -> 511 bytes .../blocks/machine/spinning_machine.png | Bin 0 -> 473 bytes .../textures/guis/machine/mana_squeezer.png | Bin 0 -> 2027 bytes .../guis/machine/mana_squeezer_nei.png | Bin 0 -> 2235 bytes .../guis/machine/spinning_machine.png | Bin 0 -> 2840 bytes .../guis/machine/spinning_machine_nei.png | Bin 0 -> 3127 bytes .../textures/items/gel/blue_gel.png | Bin 0 -> 412 bytes .../bluestone_slimeball.png | Bin .../textures/items/gel/red_gel.png | Bin 0 -> 429 bytes .../textures/items/gel/yellow_gel.png | Bin 0 -> 428 bytes 46 files changed, 2328 insertions(+), 535 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockFluidFGFMachine.java create mode 100644 src/main/java/shift/sextiarysector/container/ContainerFluidGFMachineBase.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiFluidFGFMachineBase.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiManaSqueezer.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiSpinningMachine.java create mode 100644 src/main/java/shift/sextiarysector/nei/ManaSqueezerRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/nei/SpinningMachineRecipeHandler.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesManaSqueezer.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFGFMachineBase.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/mana_squeezer.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/spinning_machine.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/mana_squeezer.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/mana_squeezer_nei.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/spinning_machine.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/spinning_machine_nei.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gel/blue_gel.png rename src/main/resources/assets/sextiarysector/textures/items/{slimeball => gel}/bluestone_slimeball.png (100%) create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gel/red_gel.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gel/yellow_gel.png diff --git a/build.gradle b/build.gradle index f5500a8..1856c55 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.8.a-${project.minecraft.version}" +version = "2.1.9.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSAchievement.java b/src/main/java/shift/sextiarysector/SSAchievement.java index 5c3dec8..8620d2d 100644 --- a/src/main/java/shift/sextiarysector/SSAchievement.java +++ b/src/main/java/shift/sextiarysector/SSAchievement.java @@ -76,25 +76,32 @@ public class SSAchievement { //Industry public static Achievement blueStoneSlimeBall; + //1 public static Achievement woodGear; public static Achievement smallWindmill; public static Achievement millstone; public static Achievement loom; + //2 public static Achievement stoneGear; public static Achievement windmill; public static Achievement smallWaterwheel; public static Achievement sawmill; + public static Achievement spinningMachine; + //3 public static Achievement steelGear; public static Achievement steamMotor; public static Achievement pulverizer; public static Achievement fan; public static Achievement saw; + //4 public static Achievement ninjaGear; public static Achievement rollingMachine; + public static Achievement manaSqueezer; + //5 public static Achievement orichalcumGear; public static Achievement timeMachine; @@ -169,7 +176,7 @@ public static void initAchievements() { //工業 - blueStoneSlimeBall = new AchievementFurnace("bluestone_slime_ball", -4, -1, new ItemStack(SSItems.blueStoneSlimeBall), blueStoneDust, industry).registerStat(); + blueStoneSlimeBall = new AchievementFurnace("blue_gel", -4, -1, new ItemStack(SSItems.blueGel), blueStoneDust, industry).registerStat(); woodGear = new AchievementCraft("wood_gear", -2, 0, new ItemStack(SSItems.woodGear), blueStoneSlimeBall, industry).registerStat(); smallWindmill = new AchievementCraft("small_windmill", -1, -2, new ItemStack(SSBlocks.smallWindmill), woodGear, industry).registerStat(); @@ -180,6 +187,7 @@ public static void initAchievements() { windmill = new AchievementCraft("windmill", 2, -2, new ItemStack(SSBlocks.windmill), stoneGear, industry).registerStat(); smallWaterwheel = new AchievementCraft("small_waterwheel", 2, -3, new ItemStack(SSBlocks.smallWaterwheel), stoneGear, industry).registerStat(); sawmill = new AchievementCraft("sawmill", 2, 2, new ItemStack(SSBlocks.sawmill), stoneGear, industry).registerStat(); + spinningMachine = new AchievementCraft("spinning_machine", 2, 3, new ItemStack(SSBlocks.spinningMachine), stoneGear, industry).registerStat(); steelGear = new AchievementCraft("steel_gear", 4, 0, new ItemStack(SSItems.steelGear), stoneGear, industry).registerStat(); steamMotor = new AchievementCraft("steam_motor", 5, -2, new ItemStack(SSBlocks.steamMotor), steelGear, industry).registerStat(); @@ -189,6 +197,7 @@ public static void initAchievements() { ninjaGear = new AchievementCraft("ninja_gear", 7, 0, new ItemStack(SSItems.ninjaGear), steelGear, industry).registerStat(); rollingMachine = new AchievementCraft("rolling_machine", 8, 2, new ItemStack(SSBlocks.rollingMachine), ninjaGear, industry).registerStat(); + manaSqueezer = new AchievementCraft("mana_squeezer", 8, 3, new ItemStack(SSBlocks.manaSqueezer), ninjaGear, industry).registerStat(); orichalcumGear = new AchievementCraft("orichalcum_gear", 10, 0, new ItemStack(SSItems.orichalcumGear), ninjaGear, industry).registerStat(); timeMachine = new AchievementCraft("time_machine", 11, 2, new ItemStack(SSBlocks.timeMachine), orichalcumGear, industry).registerStat(); diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 7362920..0b85852 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -13,6 +13,7 @@ import shift.sextiarysector.block.BlockFan; import shift.sextiarysector.block.BlockFigure; import shift.sextiarysector.block.BlockFluidCrafter; +import shift.sextiarysector.block.BlockFluidFGFMachine; import shift.sextiarysector.block.BlockFluidFurnace; import shift.sextiarysector.block.BlockFoodSmokers; import shift.sextiarysector.block.BlockFreezer; @@ -65,6 +66,7 @@ import shift.sextiarysector.tileentity.TileEntityFarmland; import shift.sextiarysector.tileentity.TileEntityFigure; import shift.sextiarysector.tileentity.TileEntityFluidCrafter; +import shift.sextiarysector.tileentity.TileEntityFluidFGFMachineBase; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityFoodSmokers; import shift.sextiarysector.tileentity.TileEntityFreezer; @@ -164,6 +166,7 @@ public class SSBlocks { public static Block loom; public static Block sawmill; + public static Block spinningMachine; public static Block pump; @@ -173,6 +176,7 @@ public class SSBlocks { public static Block saw; public static Block rollingMachine; + public static Block manaSqueezer; public static Block timeMachine; @@ -467,6 +471,8 @@ public static void initBlicks() { GameRegistry.registerBlock(steamMotor, ItemBlockDirection.class, "SteamMotor"); GameRegistry.registerTileEntity(TileEntitySimpleMachine.class, "SimpleMachine"); + GameRegistry.registerTileEntity(TileEntityFluidFGFMachineBase.class, "FluidFGFMachine"); + millstone = new BlockSimpleMachine("millstone", 20, SSRecipes.millstone, 1).setBlockName("ss.millstone").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(millstone, "Millstone"); @@ -476,6 +482,9 @@ public static void initBlicks() { sawmill = new BlockSimpleMachine("sawmill", 25, SSRecipes.sawmill, 2).setBlockName("ss.sawmill").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(sawmill, "Sawmill"); + spinningMachine = new BlockSimpleMachine("spinning_machine", 26, SSRecipes.spinning_machine, 2).setBlockName("ss.spinning_machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerBlock(spinningMachine, "SpinningMachine"); + pump = new BlockPump().setBlockTextureName("sextiarysector:machine/pump").setBlockName("ss.pump"); GameRegistry.registerTileEntity(TileEntityPump.class, "SSPump"); GameRegistry.registerBlock(pump, "pump"); @@ -494,6 +503,9 @@ public static void initBlicks() { rollingMachine = new BlockSimpleMachine("rolling_machine", 35, SSRecipes.rollingMachine, 4).setBlockName("ss.rolling_machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(rollingMachine, "RollingMachine"); + manaSqueezer = new BlockFluidFGFMachine("mana_squeezer", 36, SSRecipes.manaSqueezer, 4).setBlockName("ss.mana_squeezer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerBlock(manaSqueezer, "ManaSqueezer"); + timeMachine = new BlockSimpleMachine("time_machine", 40, SSRecipes.timeMachine, 5).setBlockName("ss.time_machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(timeMachine, "TimeMachine"); diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index fd1afac..2ff3b54 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -18,6 +18,7 @@ public class SSFluids { public static Fluid hotSprings; public static Fluid steam; + public static Fluid mana; public static Fluid season; public static Fluid sap; @@ -33,6 +34,7 @@ public static void initFluids() { hotSprings = new SSFluid("HotSprings", 0, 0xFFFFFF, 4, 1.0f).setUnlocalizedName("hot_springs"); steam = new SSFluid("Steam", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("steam").setGaseous(true); + mana = new SSFluid("Mana", 1, 0x7CF4E4, 1, 1.0f).setUnlocalizedName("mana").setGaseous(true); //season = new SSFluid("season", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("season").setDensity(-10).setGaseous(true); sap = new SSFluid("Sap", 2, 0xFF7F50, 1, 1.0f).setUnlocalizedName("sap"); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index ef7c629..d68929a 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -5,6 +5,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; import shift.sextiarysector.container.ContainerCraftFurnace; +import shift.sextiarysector.container.ContainerFluidGFMachineBase; import shift.sextiarysector.container.ContainerFluidMachineBase; import shift.sextiarysector.container.ContainerFreezer; import shift.sextiarysector.container.ContainerFunnel; @@ -28,17 +29,20 @@ import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMPRepair; import shift.sextiarysector.gui.GuiMagicFurnace; +import shift.sextiarysector.gui.GuiManaSqueezer; import shift.sextiarysector.gui.GuiMillstone; import shift.sextiarysector.gui.GuiPulverizer; import shift.sextiarysector.gui.GuiRollingMachine; import shift.sextiarysector.gui.GuiRucksack; import shift.sextiarysector.gui.GuiSawmill; +import shift.sextiarysector.gui.GuiSpinningMachine; import shift.sextiarysector.gui.GuiSteamMotor; import shift.sextiarysector.gui.GuiTabCrafting; import shift.sextiarysector.gui.GuiTimeMachine; import shift.sextiarysector.gui.IServerGuiElement; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.tileentity.TileEntityCraftFurnace; +import shift.sextiarysector.tileentity.TileEntityFluidFGFMachineBase; import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; import shift.sextiarysector.tileentity.TileEntityFreezer; import shift.sextiarysector.tileentity.TileEntityFunnel; @@ -85,11 +89,15 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world, int case 20: case 21: case 25: + case 26: case 30: case 35: case 40: return new ContainerSimpleMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 36: + return new ContainerFluidGFMachineBase(player.inventory, (TileEntityFluidFGFMachineBase) world.getTileEntity(x, y, z)); + case 50: case 51: case 52: @@ -174,6 +182,8 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int case 25: return new GuiSawmill(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 26: + return new GuiSpinningMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); case 30: return new GuiPulverizer(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); @@ -181,6 +191,9 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int case 35: return new GuiRollingMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 36: + return new GuiManaSqueezer(player.inventory, (TileEntityFluidFGFMachineBase) world.getTileEntity(x, y, z)); + case 40: return new GuiTimeMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 96662d7..70d510a 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -102,7 +102,9 @@ public class SSItems { public static Item ninjaIngot; - public static Item blueStoneSlimeBall; + public static Item redGel; + public static Item blueGel; + public static Item yellowGel; public static Item energyReactor; public static Item objectReactor; @@ -367,8 +369,14 @@ public static void initItems() { ninjaIngot = new Item().setUnlocalizedName("ss.ninja_ingot").setTextureName("sextiarysector:ingot/ninja_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(ninjaIngot, "NinjaIngot"); - blueStoneSlimeBall = new Item().setUnlocalizedName("ss.blue_stone_slime_ball").setTextureName("sextiarysector:slimeball/bluestone_slimeball").setCreativeTab(SextiarySectorAPI.TabSSCore); - GameRegistry.registerItem(blueStoneSlimeBall, "BlueStoneSlimeBall"); + redGel = new Item().setUnlocalizedName("ss.red_gel").setTextureName("sextiarysector:gel/red_gel").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(redGel, "RedGel"); + + blueGel = new Item().setUnlocalizedName("ss.blue_gel").setTextureName("sextiarysector:gel/blue_gel").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(blueGel, "BlueGel"); + + yellowGel = new Item().setUnlocalizedName("ss.yellow_gel").setTextureName("sextiarysector:gel/yellow_gel").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(yellowGel, "YellowGel"); energyReactor = new Item().setUnlocalizedName("ss.energy_reactor").setTextureName("sextiarysector:energy_reactor").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(energyReactor, "EnergyReactor"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index 6dc1331..a9b70b1 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -97,6 +97,10 @@ public static void init() { OreDictionary.registerOre("oreIron", SSItems.ironTurnip); OreDictionary.registerOre("oreGold", SSItems.goldenCorn); + OreDictionary.registerOre("gelRedstone", SSItems.redGel); + OreDictionary.registerOre("gelBluestone", SSItems.blueGel); + OreDictionary.registerOre("gelYellowstone", SSItems.yellowGel); + OreDictionary.registerOre("ringIron", SSItems.ironRing); OreDictionary.registerOre("craftingSmallCloth", SSItems.cloth); @@ -122,6 +126,9 @@ public static void init() { OreDictionary.registerOre("fluidSap", new ItemStack(SSItems.sapBottle)); OreDictionary.registerOre("fluidSap", new ItemStack(SSBlocks.fluidCrafter, 1, SSFluids.sap.getID())); + OreDictionary.registerOre("slimeball", new ItemStack(SSItems.sapBottle)); + OreDictionary.registerOre("slimeball", new ItemStack(SSBlocks.fluidCrafter, 1, SSFluids.sap.getID())); + //食べ物 OreDictionary.registerOre("condimentCurryPowder", SSItems.curryPowder); diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index ed75702..e165e96 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -21,11 +21,13 @@ import shift.sextiarysector.recipe.RecipesMachine; import shift.sextiarysector.recipe.RecipesMagicFuel; import shift.sextiarysector.recipe.RecipesMagicFurnace; +import shift.sextiarysector.recipe.RecipesManaSqueezer; import shift.sextiarysector.recipe.RecipesMillstone; import shift.sextiarysector.recipe.RecipesNormalBlock; import shift.sextiarysector.recipe.RecipesPulverizer; import shift.sextiarysector.recipe.RecipesRollingMachine; import shift.sextiarysector.recipe.RecipesSawmill; +import shift.sextiarysector.recipe.RecipesSpinningMachine; import shift.sextiarysector.recipe.RecipesTimeMachine; import shift.sextiarysector.recipe.RecipesTool; import shift.sextiarysector.recipe.RecipesVanilla; @@ -43,8 +45,10 @@ public class SSRecipes { public static RecipeSimpleMachine millstone; public static RecipeSimpleMachine loom; public static RecipeSimpleMachine sawmill; + public static RecipeSimpleMachine spinning_machine; public static RecipeSimpleMachine pulverizer; public static RecipeSimpleMachine rollingMachine; + public static RecipeSimpleFluid manaSqueezer; public static RecipeSimpleMachine timeMachine; public static void initRecipeLists() { @@ -60,8 +64,10 @@ public static void initRecipeLists() { millstone = new RecipeSimpleMachine(); loom = new RecipeSimpleMachine(); sawmill = new RecipeSimpleMachine(); + spinning_machine = new RecipeSimpleMachine(); pulverizer = new RecipeSimpleMachine(); rollingMachine = new RecipeSimpleMachine(); + manaSqueezer = new RecipeSimpleFluid(); timeMachine = new RecipeSimpleMachine(); } @@ -98,10 +104,14 @@ public static void initRecipes() { RecipesSawmill.addRecipes(sawmill); + RecipesSpinningMachine.addRecipes(spinning_machine); + RecipesPulverizer.addRecipes(pulverizer); RecipesRollingMachine.addRecipes(rollingMachine); + RecipesManaSqueezer.addRecipes(manaSqueezer); + RecipesTimeMachine.addRecipes(timeMachine); } diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index a8311ed..72f8d4f 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -36,7 +36,7 @@ public class SextiarySector { public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.1.8"; + public static final String VERSION = "2.1.9"; @Mod.Instance("SextiarySector") public static SextiarySector instance; diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java b/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java new file mode 100644 index 0000000..ad92b8b --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java @@ -0,0 +1,71 @@ +package shift.sextiarysector.api.machine.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +/** + * + * IGFEnergyHandlerを使ってください + * + * @see IEnergyStorage + * @see EnergyStorage + * @version 1.1.0 + * @author Shift02 + */ +@Deprecated +public interface IEnergyHandler { + + /** + * addEnergy エレルギーの追加 + * @param from エネルギーを加える方角 + * @param power 加える力の量 + * @param speed 加える速度の量 + * @param simulate シミュレーションかどうか + * @return 実際に加えれた速度 + */ + int addEnergy(ForgeDirection from, int power, int speed, boolean simulate); + + /** + * drawEnergy エレルギーの減少 + * @param from エネルギーを減らす方角 + * @param power 減らす力の量 + * @param speed 減らす速度の量 + * @param simulate シミュレーションかどうか + * @return 実際に減らせれた速度 + */ + int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate); + + /** + * canInterface 繋がるか + * @param from 方角 + * @return その方角に動力を入力または出力出来る場合はtrue + */ + boolean canInterface(ForgeDirection from); + + /** + * getPowerStored 力の取得 + * @param from 方角 + * @return その方角の現在の力の量 + */ + int getPowerStored(ForgeDirection from); + + /** + * getSpeedStored 速度の取得 + * @param from 方角 + * @return その方角の現在の速度の量 + */ + long getSpeedStored(ForgeDirection from); + + /** + * getMaxPowerStored 力の最大値(容量)の取得 + * @param from 方角 + * @return 最大値(容量) + */ + int getMaxPowerStored(ForgeDirection from); + + /** + * getMaxSpeedStored 速度の最大値(容量)の取得 + * @param from 方角 + * @return 最大値(容量) + */ + long getMaxSpeedStored(ForgeDirection from); +} diff --git a/src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java b/src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java index 3584c7f..92291c8 100644 --- a/src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java +++ b/src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java @@ -100,7 +100,7 @@ public boolean isCustomDamage(ItemStack container) { @Override public boolean canSetSlot(int power) { - return slot >= power; + return slot == power; } } diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidFGFMachine.java b/src/main/java/shift/sextiarysector/block/BlockFluidFGFMachine.java new file mode 100644 index 0000000..3b1f3b1 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockFluidFGFMachine.java @@ -0,0 +1,326 @@ +package shift.sextiarysector.block; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SSMaterials; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.recipe.RecipeSimpleFluid; +import shift.sextiarysector.tileentity.TileEntityFluidFGFMachineBase; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockFluidFGFMachine extends BlockContainer { + + private final Random furnaceRand = new Random(); + private final String IconName; + @SideOnly(Side.CLIENT) + private IIcon iconTop; + @SideOnly(Side.CLIENT) + private IIcon iconUnder; + private final String frontIcon; + @SideOnly(Side.CLIENT) + private IIcon iconFront; + + private final int guiID; + private final RecipeSimpleFluid recipe; + private String guiuUnlocalizedName; + private final int type; + + public BlockFluidFGFMachine(String iconFront, int gui, RecipeSimpleFluid recipe, int type) { + super(SSMaterials.machine); + this.setHardness(3.0F); + this.frontIcon = iconFront; + this.guiID = gui; + this.recipe = recipe; + this.type = type; + this.setHarvestLevel("hammer", 1); + IconName = ("sextiarysector:machine/machine"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + int d = ((TileEntityFluidFGFMachineBase) par1IBlockAccess.getTileEntity(par2, par3, par4)).direction.ordinal(); + + if (par5 == 1) + { + return this.iconTop; + } + else if (par5 == 0) + { + return this.iconUnder; + } + else if (par5 == d) + { + return this.iconFront; + } else + { + return this.blockIcon; + } + + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(int par1, int par2) + { + + if (par1 == 1) + { + return this.iconTop; + } + else if (par1 == 0) + { + return this.iconUnder; + } + else if (par1 == 3) + { + return this.iconFront; + } else + { + return this.blockIcon; + } + + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon(IconName); + this.iconTop = par1IconRegister.registerIcon(IconName + "_top"); + this.iconUnder = par1IconRegister.registerIcon(IconName + "_under"); + + //iconFront = new Icon[SimpleMachine.values().length]; + + this.iconFront = par1IconRegister.registerIcon("sextiarysector:machine/" + this.frontIcon); + + /* + for(int i =0;i 0) + { + int k1 = this.furnaceRand.nextInt(21) + 10; + + if (k1 > itemstack.stackSize) + { + k1 = itemstack.stackSize; + } + + itemstack.stackSize -= k1; + EntityItem entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float) this.furnaceRand.nextGaussian() * f3; + entityitem.motionY = (float) this.furnaceRand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float) this.furnaceRand.nextGaussian() * f3; + par1World.spawnEntityInWorld(entityitem); + } + } + + } + + @Override + public Block setBlockName(String p_149663_1_) + { + super.setBlockName(p_149663_1_); + this.guiuUnlocalizedName = p_149663_1_; + return this; + } + + public String getGUIUnlocalizedName() + { + return this.guiuUnlocalizedName; + } + + public ItemStack getResult(ItemStack itemstack) { + return this.recipe.getResult(itemstack); + } + + public FluidStack getFluidResult(ItemStack itemstack) { + return this.recipe.getFluidResult(itemstack); + } + + @Override + public TileEntity createNewTileEntity(World world, int i) { + return new TileEntityFluidFGFMachineBase(type); + } +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerFluidGFMachineBase.java b/src/main/java/shift/sextiarysector/container/ContainerFluidGFMachineBase.java new file mode 100644 index 0000000..64e1bea --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerFluidGFMachineBase.java @@ -0,0 +1,219 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.inventory.SlotFurnace; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.tileentity.TileEntityFluidFGFMachineBase; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ContainerFluidGFMachineBase extends Container +{ + private final TileEntityFluidFGFMachineBase tileFurnace; + private int lastWorkTime; + private int lastInPower; + private int lastInSpeed; + private int lastPower; + private int lastSpeed; + + //private int lastFluid; + //private int lastFluidID; + + public ContainerFluidGFMachineBase(InventoryPlayer p_i1812_1_, TileEntityFluidFGFMachineBase p_i1812_2_) + { + this.tileFurnace = p_i1812_2_; + this.addSlotToContainer(new Slot(p_i1812_2_, 0, 56, 17)); + this.addSlotToContainer(new SlotGF(p_i1812_2_, 1, 56, 53, this.tileFurnace.getMaxPowerStored(ForgeDirection.UP))); + this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 2, 107, 53)); + this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 3, 125, 53)); + this.addSlotToContainer(new SlotFluid(p_i1812_2_, 4, 152, 17)); + this.addSlotToContainer(new SlotFluid(p_i1812_2_, 5, 152, 53)); + int i; + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(p_i1812_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(p_i1812_1_, i, 8 + i * 18, 142)); + } + } + + @Override + public void addCraftingToCrafters(ICrafting par1ICrafting) + { + super.addCraftingToCrafters(par1ICrafting); + par1ICrafting.sendProgressBarUpdate(this, 0, this.tileFurnace.machineWorkProgressTime); + par1ICrafting.sendProgressBarUpdate(this, 1, this.tileFurnace.inPower); + par1ICrafting.sendProgressBarUpdate(this, 2, this.tileFurnace.inSpeed); + par1ICrafting.sendProgressBarUpdate(this, 3, this.tileFurnace.storage.getPowerStored()); + par1ICrafting.sendProgressBarUpdate(this, 4, this.tileFurnace.storage.getSpeedStored()); + } + + @Override + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + + for (int i = 0; i < this.crafters.size(); ++i) + { + ICrafting icrafting = (ICrafting) this.crafters.get(i); + + if (this.lastWorkTime != this.tileFurnace.machineWorkProgressTime) + { + icrafting.sendProgressBarUpdate(this, 0, this.tileFurnace.machineWorkProgressTime); + } + + if (this.lastInPower != this.tileFurnace.inPower) + { + icrafting.sendProgressBarUpdate(this, 1, this.tileFurnace.inPower); + } + + if (this.lastInSpeed != this.tileFurnace.inSpeed) + { + icrafting.sendProgressBarUpdate(this, 2, this.tileFurnace.inSpeed); + } + + if (this.lastPower != this.tileFurnace.storage.getPowerStored()) + { + icrafting.sendProgressBarUpdate(this, 3, this.tileFurnace.storage.getPowerStored()); + } + + if (this.lastSpeed != this.tileFurnace.storage.getSpeedStored()) + { + icrafting.sendProgressBarUpdate(this, 4, this.tileFurnace.storage.getSpeedStored()); + } + + } + + this.lastWorkTime = this.tileFurnace.machineWorkProgressTime; + this.lastInPower = this.tileFurnace.inPower; + this.lastInSpeed = this.tileFurnace.inSpeed; + this.lastPower = this.tileFurnace.storage.getPowerStored(); + this.lastSpeed = this.tileFurnace.storage.getSpeedStored(); + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) + { + if (par1 == 0) + { + this.tileFurnace.machineWorkProgressTime = par2; + } + + if (par1 == 1) + { + this.tileFurnace.inPower = par2; + } + + if (par1 == 2) + { + this.tileFurnace.inSpeed = par2; + } + + if (par1 == 3) + { + this.tileFurnace.storage.setPowerStored(par2); + } + + if (par1 == 4) + { + this.tileFurnace.storage.setEnergyStored(par2); + } + + } + + @Override + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return this.tileFurnace.isUseableByPlayer(p_75145_1_); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ == 2) + { + if (!this.mergeItemStack(itemstack1, 3, 39, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (p_82846_2_ != 1 && p_82846_2_ != 0) + { + if (tileFurnace.getResult(itemstack1) != null) + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return null; + } + } + else if (GearForceItem.manager.isGearForceItem(itemstack1)) + { + if (!this.mergeItemStack(itemstack1, 1, 2, false)) + { + return null; + } + } + else if (p_82846_2_ >= 6 && p_82846_2_ < 33) + { + if (!this.mergeItemStack(itemstack1, 33, 42, false)) + { + return null; + } + } + else if (p_82846_2_ >= 33 && p_82846_2_ < 42 && !this.mergeItemStack(itemstack1, 6, 33, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 6, 42, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack) null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerSimpleMachine.java b/src/main/java/shift/sextiarysector/container/ContainerSimpleMachine.java index c321023..3b75c57 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerSimpleMachine.java +++ b/src/main/java/shift/sextiarysector/container/ContainerSimpleMachine.java @@ -7,204 +7,205 @@ import net.minecraft.inventory.Slot; import net.minecraft.inventory.SlotFurnace; import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.machine.item.GearForceItem; import shift.sextiarysector.tileentity.TileEntitySimpleMachine; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ContainerSimpleMachine extends Container{ +public class ContainerSimpleMachine extends Container { private final TileEntitySimpleMachine machine; - private int lastWorkTime; - private int lastInPower; - private int lastInSpeed; - private int lastPower; - private int lastSpeed; + private int lastWorkTime; + private int lastInPower; + private int lastInSpeed; + private int lastPower; + private int lastSpeed; public ContainerSimpleMachine(InventoryPlayer par1InventoryPlayer, TileEntitySimpleMachine par2TileEntityFurnace) - { - this.machine = par2TileEntityFurnace; - this.addSlotToContainer(new Slot(par2TileEntityFurnace, 0, 56, 17)); - this.addSlotToContainer(new SlotGF(par2TileEntityFurnace, 1, 56, 53,1)); - this.addSlotToContainer(new SlotFurnace(par1InventoryPlayer.player, par2TileEntityFurnace, 2, 116, 35)); - int i; - - for (i = 0; i < 3; ++i) - { - for (int j = 0; j < 9; ++j) - { - this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - - for (i = 0; i < 9; ++i) - { - this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142)); - } - } + { + this.machine = par2TileEntityFurnace; + this.addSlotToContainer(new Slot(par2TileEntityFurnace, 0, 56, 17)); + this.addSlotToContainer(new SlotGF(par2TileEntityFurnace, 1, 56, 53, this.machine.getMaxPowerStored(ForgeDirection.UP))); + this.addSlotToContainer(new SlotFurnace(par1InventoryPlayer.player, par2TileEntityFurnace, 2, 116, 35)); + int i; + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142)); + } + } @Override public void addCraftingToCrafters(ICrafting par1ICrafting) - { - super.addCraftingToCrafters(par1ICrafting); - par1ICrafting.sendProgressBarUpdate(this, 0, this.machine.machineWorkProgressTime); - par1ICrafting.sendProgressBarUpdate(this, 1, this.machine.inPower); - par1ICrafting.sendProgressBarUpdate(this, 2, this.machine.inSpeed); - par1ICrafting.sendProgressBarUpdate(this, 3, this.machine.storage.getPowerStored()); - par1ICrafting.sendProgressBarUpdate(this, 4, (int) this.machine.storage.getSpeedStored()); - } + { + super.addCraftingToCrafters(par1ICrafting); + par1ICrafting.sendProgressBarUpdate(this, 0, this.machine.machineWorkProgressTime); + par1ICrafting.sendProgressBarUpdate(this, 1, this.machine.inPower); + par1ICrafting.sendProgressBarUpdate(this, 2, this.machine.inSpeed); + par1ICrafting.sendProgressBarUpdate(this, 3, this.machine.storage.getPowerStored()); + par1ICrafting.sendProgressBarUpdate(this, 4, this.machine.storage.getSpeedStored()); + } @Override public void detectAndSendChanges() - { - super.detectAndSendChanges(); - - for (int i = 0; i < this.crafters.size(); ++i) - { - ICrafting icrafting = (ICrafting)this.crafters.get(i); - - if (this.lastWorkTime != this.machine.machineWorkProgressTime) - { - icrafting.sendProgressBarUpdate(this, 0, this.machine.machineWorkProgressTime); - } - - if (this.lastInPower != this.machine.inPower) - { - icrafting.sendProgressBarUpdate(this, 1, this.machine.inPower); - } - - if (this.lastInSpeed != this.machine.inSpeed) - { - icrafting.sendProgressBarUpdate(this, 2, this.machine.inSpeed); - } - - if (this.lastPower != this.machine.storage.getPowerStored()) - { - icrafting.sendProgressBarUpdate(this, 3, this.machine.storage.getPowerStored()); - } - - if (this.lastSpeed != this.machine.storage.getSpeedStored()) - { - icrafting.sendProgressBarUpdate(this, 4, (int) this.machine.storage.getSpeedStored()); - } - - } - - this.lastWorkTime = this.machine.machineWorkProgressTime; - this.lastInPower = this.machine.inPower; - this.lastInSpeed = this.machine.inSpeed; - this.lastPower = this.machine.storage.getPowerStored(); - this.lastSpeed = (int) this.machine.storage.getSpeedStored(); - } + { + super.detectAndSendChanges(); + + for (int i = 0; i < this.crafters.size(); ++i) + { + ICrafting icrafting = (ICrafting) this.crafters.get(i); + + if (this.lastWorkTime != this.machine.machineWorkProgressTime) + { + icrafting.sendProgressBarUpdate(this, 0, this.machine.machineWorkProgressTime); + } + + if (this.lastInPower != this.machine.inPower) + { + icrafting.sendProgressBarUpdate(this, 1, this.machine.inPower); + } + + if (this.lastInSpeed != this.machine.inSpeed) + { + icrafting.sendProgressBarUpdate(this, 2, this.machine.inSpeed); + } + + if (this.lastPower != this.machine.storage.getPowerStored()) + { + icrafting.sendProgressBarUpdate(this, 3, this.machine.storage.getPowerStored()); + } + + if (this.lastSpeed != this.machine.storage.getSpeedStored()) + { + icrafting.sendProgressBarUpdate(this, 4, this.machine.storage.getSpeedStored()); + } + + } + + this.lastWorkTime = this.machine.machineWorkProgressTime; + this.lastInPower = this.machine.inPower; + this.lastInSpeed = this.machine.inSpeed; + this.lastPower = this.machine.storage.getPowerStored(); + this.lastSpeed = this.machine.storage.getSpeedStored(); + } @Override @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) - { - if (par1 == 0) - { - this.machine.machineWorkProgressTime = par2; - } - - if (par1 == 1) - { - this.machine.inPower = par2; - } - - if (par1 == 2) - { - this.machine.inSpeed = par2; - } - - if (par1 == 3) - { - this.machine.storage.setPowerStored(par2); - } - - if (par1 == 4) - { - this.machine.storage.setEnergyStored(par2); - } - - } + public void updateProgressBar(int par1, int par2) + { + if (par1 == 0) + { + this.machine.machineWorkProgressTime = par2; + } + + if (par1 == 1) + { + this.machine.inPower = par2; + } + + if (par1 == 2) + { + this.machine.inSpeed = par2; + } + + if (par1 == 3) + { + this.machine.storage.setPowerStored(par2); + } + + if (par1 == 4) + { + this.machine.storage.setEnergyStored(par2); + } + + } @Override public boolean canInteractWith(EntityPlayer par1EntityPlayer) - { - return this.machine.isUseableByPlayer(par1EntityPlayer); - } + { + return this.machine.isUseableByPlayer(par1EntityPlayer); + } @Override public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) - { - ItemStack itemstack = null; - Slot slot = (Slot)this.inventorySlots.get(par2); - - if (slot != null && slot.getHasStack()) - { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - if (par2 == 2) - { - if (!this.mergeItemStack(itemstack1, 3, 39, true)) - { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } - else if (par2 != 1 && par2 != 0) - { - if (machine.getResult(itemstack1) != null) - { - if (!this.mergeItemStack(itemstack1, 0, 1, false)) - { - return null; - } - } - else if (GearForceItem.manager.isGearForceItem(itemstack1)) - { - if (!this.mergeItemStack(itemstack1, 1, 2, false)) - { - return null; - } - } - else if (par2 >= 3 && par2 < 30) - { - if (!this.mergeItemStack(itemstack1, 30, 39, false)) - { - return null; - } - } - else if (par2 >= 30 && par2 < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) - { - return null; - } - } - else if (!this.mergeItemStack(itemstack1, 3, 39, false)) - { - return null; - } - - if (itemstack1.stackSize == 0) - { - slot.putStack((ItemStack)null); - } - else - { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) - { - return null; - } - - slot.onPickupFromSlot(par1EntityPlayer, itemstack1); - } - - return itemstack; - } + { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(par2); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (par2 == 2) + { + if (!this.mergeItemStack(itemstack1, 3, 39, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (par2 != 1 && par2 != 0) + { + if (machine.getResult(itemstack1) != null) + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return null; + } + } + else if (GearForceItem.manager.isGearForceItem(itemstack1)) + { + if (!this.mergeItemStack(itemstack1, 1, 2, false)) + { + return null; + } + } + else if (par2 >= 3 && par2 < 30) + { + if (!this.mergeItemStack(itemstack1, 30, 39, false)) + { + return null; + } + } + else if (par2 >= 30 && par2 < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 3, 39, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack) null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(par1EntityPlayer, itemstack1); + } + + return itemstack; + } } diff --git a/src/main/java/shift/sextiarysector/event/HUDEventHandler.java b/src/main/java/shift/sextiarysector/event/HUDEventHandler.java index 5e99a29..eda6836 100644 --- a/src/main/java/shift/sextiarysector/event/HUDEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/HUDEventHandler.java @@ -9,10 +9,10 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.GuiIngameForge; import net.minecraftforge.client.event.RenderGameOverlayEvent; -import shift.mceconomy2.gui.HUDMP; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.player.MoistureStats; import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class HUDEventHandler { @@ -30,10 +30,10 @@ public class HUDEventHandler { public static Minecraft mc = FMLClientHandler.instance().getClient(); - public static boolean isPM = false; + //public static boolean isPM = false; //描写のEvent - @SubscribeEvent + @SubscribeEvent(priority = EventPriority.HIGHEST) public void onRenderGameOverlayEventPre(RenderGameOverlayEvent.Pre event) { int width = event.resolution.getScaledWidth(); @@ -90,12 +90,12 @@ else if ((event.type == RenderGameOverlayEvent.ElementType.HOTBAR) && (mc.player } } - HUDMP.isRenderer = false; - isPM = true; + //HUDMP.isRenderer = false; + //isPM = true; } - @SubscribeEvent + @SubscribeEvent(priority = EventPriority.HIGHEST) public void onRenderGameOverlayEventPost(RenderGameOverlayEvent.Post event) { int width = event.resolution.getScaledWidth(); @@ -112,12 +112,13 @@ public void onRenderGameOverlayEventPost(RenderGameOverlayEvent.Post event) { visibleStamina = false; } - if (isPM) { + /* + if (!visibleMoisture && isPM) { HUDMP.renderMoney(width, height); HUDMP.renderAddMoney(width, height); isPM = false; HUDMP.isRenderer = false; - } + }*/ } diff --git a/src/main/java/shift/sextiarysector/fmp/ShaftEventHandler.java b/src/main/java/shift/sextiarysector/fmp/ShaftEventHandler.java index 14eb1c9..6cc301a 100644 --- a/src/main/java/shift/sextiarysector/fmp/ShaftEventHandler.java +++ b/src/main/java/shift/sextiarysector/fmp/ShaftEventHandler.java @@ -1,5 +1,7 @@ package shift.sextiarysector.fmp; +import java.util.NoSuchElementException; + import net.minecraft.block.Block; import net.minecraft.block.BlockFence; import net.minecraft.entity.player.EntityPlayer; @@ -13,6 +15,7 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.SextiarySector; import codechicken.lib.packet.PacketCustom; import codechicken.lib.raytracer.RayTracer; import codechicken.lib.vec.BlockCoord; @@ -79,26 +82,38 @@ public static boolean place(EntityPlayer player, World world) } TileMultipart tile = TileMultipart.getOrConvertTile(world, pos); - if (tile == null || !tile.canAddPart(part)) - return false; + if (tile == null || !tile.canAddPart(part)) return false; if (!world.isRemote) { - TileMultipart.addPart(world, pos, part); - world.playSoundEffect(pos.x + 0.5, pos.y + 0.5, pos.z + 0.5, - part.getBlock().stepSound.func_150496_b(), - (part.getBlock().stepSound.getVolume() + 1.0F) / 2.0F, - part.getBlock().stepSound.getPitch() * 0.8F); - if (!player.capabilities.isCreativeMode) - { - held.stackSize--; - if (held.stackSize == 0) + try { + + TileMultipart.addPart(world, pos, part); + + world.playSoundEffect(pos.x + 0.5, pos.y + 0.5, pos.z + 0.5, + part.getBlock().stepSound.func_150496_b(), + (part.getBlock().stepSound.getVolume() + 1.0F) / 2.0F, + part.getBlock().stepSound.getPitch() * 0.8F); + if (!player.capabilities.isCreativeMode) { - player.inventory.mainInventory[player.inventory.currentItem] = null; - MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(player, held)); + held.stackSize--; + if (held.stackSize == 0) + { + player.inventory.mainInventory[player.inventory.currentItem] = null; + MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(player, held)); + } } + + } catch (NoSuchElementException e) { + + SextiarySector.Log.catching(e); + + } catch (Exception e) { + SextiarySector.Log.info("(╹◡╹)「クラッシュをすちゃり」"); + SextiarySector.Log.catching(e); } + } else { diff --git a/src/main/java/shift/sextiarysector/gui/GuiFluidFGFMachineBase.java b/src/main/java/shift/sextiarysector/gui/GuiFluidFGFMachineBase.java new file mode 100644 index 0000000..230bb83 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiFluidFGFMachineBase.java @@ -0,0 +1,210 @@ +package shift.sextiarysector.gui; + +import java.text.NumberFormat; +import java.util.ArrayList; + +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.container.ContainerFluidGFMachineBase; +import shift.sextiarysector.tileentity.TileEntityFluidFGFMachineBase; + +public abstract class GuiFluidFGFMachineBase extends GUIGearMachine +{ + private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("sextiarysector:textures/guis/fluid_furnace.png"); + private final TileEntityFluidFGFMachineBase machineInventory; + float s = 0; + + public GuiFluidFGFMachineBase(InventoryPlayer p_i1091_1_, TileEntityFluidFGFMachineBase p_i1091_2_) + { + super(new ContainerFluidGFMachineBase(p_i1091_1_, p_i1091_2_)); + this.machineInventory = p_i1091_2_; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + @Override + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + String s = this.machineInventory.hasCustomInventoryName() ? this.machineInventory.getInventoryName() : I18n.format(this.machineInventory.getInventoryName(), new Object[0]); + this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(getBindTexture()); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + + int i1; + + if (this.machineInventory.isCharging() || this.machineInventory.isWorking() || (this.machineInventory.inPower != 0 || this.machineInventory.inSpeed != 0)) { + s = (this.mc.getSystemTime() / 20) % 360; + } + + this.drawGear(0, (int) -s, 46, 35); + + this.mc.getTextureManager().bindTexture(getBindTexture()); + + this.drawTexturedModalRect(k + 57, l + 36, 176, 0, 14, 14);//中央のgear + + this.drawGear(0, (int) -s, 26, 30); + + this.drawGear(1, (int) s, 37, 29); + + this.drawGear(2, (int) s, 16, 26); + + this.mc.getTextureManager().bindTexture(getBindTexture()); + + i1 = this.machineInventory.getWorkProgressScaled(24); + this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); + + this.drawTexturedModalRect(k + 7, l + 16, 201, 0, 18, 18); + + i1 = this.machineInventory.getEnergyProgressScaled(16); + //this.drawTexturedModalRect(k + 8, l + 17 + 16 - i1, 219, 14 + 16 - i1, 16, i1); + this.drawTexturedModalRect(k + 8, l + 17 + 16 - i1, 219, 16 - i1, 16, i1); + + //Fluid + if (this.machineInventory.isFluid()) + { + //FluidStack f = this.tileFurnace.getTank().getFluid(); + this.drawFluidTank(k + 107, l + 15, this.machineInventory.getTank(), 34, 36); + + } + this.mc.getTextureManager().bindTexture(getBindTexture()); + this.drawTexturedModalRect(k + 108, l + 17, 176, 31, 32, 36); + + } + + @Override + public void drawScreen(int par1, int par2, float par3) + { + super.drawScreen(par1, par2, par3); + + ArrayList arraylist = new ArrayList(); + + String f = "None"; + + if (this.machineInventory.isFluid()) + { + f = this.machineInventory.getTank().getFluid().getFluid().getLocalizedName(this.machineInventory.getTank().getFluid()); + } + + NumberFormat nfNum = NumberFormat.getNumberInstance(); + + arraylist.add(0, "" + EnumChatFormatting.RESET + "Fluid Tank" + EnumChatFormatting.RESET); + arraylist.add(1, "" + EnumChatFormatting.GRAY + "Fluid : " + f); + arraylist.add(2, "" + EnumChatFormatting.GRAY + "Amount : " + nfNum.format(this.machineInventory.getTank().getFluidAmount()) + " / " + nfNum.format(this.machineInventory.getTank().getCapacity()) + " mB"); + + GL11.glPushMatrix(); + if (this.func_146978_c(106, 14, 36, 38, par1, par2)) + { + drawHoveringText(arraylist, par1, par2, fontRendererObj); + } + GL11.glPopMatrix(); + + ArrayList arraylist2 = new ArrayList(); + + int p = machineInventory.inPower; + int s = machineInventory.inSpeed; + + arraylist2.add(0, "" + EnumChatFormatting.RESET + "Machine Status" + EnumChatFormatting.RESET); + arraylist2.add(1, "" + EnumChatFormatting.RED + "In Power" + EnumChatFormatting.RESET); + arraylist2.add(2, "" + EnumChatFormatting.GRAY + p); + arraylist2.add(3, "" + EnumChatFormatting.BLUE + "In Speed" + EnumChatFormatting.RESET); + arraylist2.add(4, EnumChatFormatting.GRAY + "" + s); + + GL11.glPushMatrix(); + if (this.func_146978_c(56, 35, 16, 16, par1, par2)) + { + drawHoveringText(arraylist2, par1, par2, fontRendererObj); + } + GL11.glPopMatrix(); + + ArrayList arraylist3 = new ArrayList(); + + //NumberFormat nfNum = NumberFormat.getNumberInstance(); + + int p2 = machineInventory.storage.getPowerStored(); + long s2 = machineInventory.storage.getSpeedStored(); + + int p2_1 = machineInventory.storage.getMaxPower(); + long s2_1 = machineInventory.storage.getMaxSpeed(); + + arraylist3.add(0, "" + EnumChatFormatting.RESET + "Machine Storage" + EnumChatFormatting.RESET); + arraylist3.add(1, "" + EnumChatFormatting.RED + "Power" + EnumChatFormatting.RESET); + arraylist3.add(2, "" + EnumChatFormatting.GRAY + p2 + " / " + p2_1); + arraylist3.add(3, "" + EnumChatFormatting.BLUE + "Speed" + EnumChatFormatting.RESET); + arraylist3.add(4, EnumChatFormatting.GRAY + "" + nfNum.format(s2) + " / " + nfNum.format(s2_1)); + + GL11.glPushMatrix(); + if (this.func_146978_c(6, 16, 18, 18, par1, par2)) + { + drawHoveringText(arraylist3, par1, par2, fontRendererObj); + } + GL11.glPopMatrix(); + + } + + public void drawFluidTank(int x, int y, FluidTank fluidTank, int width, int height) { + + GL11.glColor3f(1, 1, 1); + + FluidStack fluidStack = fluidTank.getFluid(); + + ResourceLocation r; + if (fluidStack.getFluid().getSpriteNumber() == 0) { + r = TextureMap.locationBlocksTexture; + } else { + r = TextureMap.locationItemsTexture; + } + + this.mc.getTextureManager().bindTexture(r); + this.setColor3ubFromInt(fluidStack.getFluid().getColor(fluidStack)); + + int widthR = width;//*(fluidTank.getFluidAmount()/fluidTank.getCapacity()); + int heightR = (int) (width * ((float) fluidTank.getFluidAmount() / (float) fluidTank.getCapacity())); + + int yR = y + (height - heightR); + + int widthL = 0; + int heightL = 0; + IIcon icon = (fluidStack.getFluid().getIcon(fluidStack)); + + for (int i = 0; i < widthR; i += 16) { + + for (int j = 0; j < heightR; j += 16) { + + widthL = Math.min(widthR - i, 16); + heightL = Math.min(heightR - j, 16); + this.drawTexturedModelRectFromIcon(x + i, yR + j, icon, widthL, heightL); + + } + } + + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); + + } + + public static void setColor3ubFromInt(int color) { + + GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF)); + + } + + protected abstract ResourceLocation getBindTexture(); +} diff --git a/src/main/java/shift/sextiarysector/gui/GuiManaSqueezer.java b/src/main/java/shift/sextiarysector/gui/GuiManaSqueezer.java new file mode 100644 index 0000000..86e67a4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiManaSqueezer.java @@ -0,0 +1,20 @@ +package shift.sextiarysector.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import shift.sextiarysector.tileentity.TileEntityFluidFGFMachineBase; + +public class GuiManaSqueezer extends GuiFluidFGFMachineBase { + + private static final ResourceLocation machineGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/mana_squeezer.png"); + + public GuiManaSqueezer(InventoryPlayer par1InventoryPlayer, TileEntityFluidFGFMachineBase par2TileEntity) { + super(par1InventoryPlayer, par2TileEntity); + } + + @Override + protected ResourceLocation getBindTexture() { + return machineGuiTextures; + } + +} diff --git a/src/main/java/shift/sextiarysector/gui/GuiSpinningMachine.java b/src/main/java/shift/sextiarysector/gui/GuiSpinningMachine.java new file mode 100644 index 0000000..e4d24c2 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiSpinningMachine.java @@ -0,0 +1,19 @@ +package shift.sextiarysector.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import shift.sextiarysector.tileentity.TileEntitySimpleMachine; + +public class GuiSpinningMachine extends GuiSimpleMachine { + + private static final ResourceLocation machineGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/spinning_machine.png"); + + public GuiSpinningMachine(InventoryPlayer par1InventoryPlayer, TileEntitySimpleMachine par2TileEntity) { + super(par1InventoryPlayer, par2TileEntity); + } + + @Override + protected ResourceLocation getBindTexture() { + return machineGuiTextures; + } +} diff --git a/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java b/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java index 2aed7d7..d037833 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java +++ b/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java @@ -30,7 +30,7 @@ public void preInit(FMLPreInitializationEvent event) { copperTool = EnumHelper.addToolMaterial("copper", 2, 200, 4.0F, 1.0F, 10); - copperArmor = EnumHelper.addArmorMaterial("copper", 2, new int[] { 2, 4, 4, 1 }, 7); + copperArmor = EnumHelper.addArmorMaterial("copper", 13, new int[] { 2, 6, 4, 2 }, 7); } diff --git a/src/main/java/shift/sextiarysector/nei/ManaSqueezerRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/ManaSqueezerRecipeHandler.java new file mode 100644 index 0000000..d230c39 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/ManaSqueezerRecipeHandler.java @@ -0,0 +1,62 @@ +package shift.sextiarysector.nei; + +import static codechicken.lib.gui.GuiDraw.*; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraftforge.fluids.FluidContainerRegistry; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiManaSqueezer; +import shift.sextiarysector.recipe.RecipeSimpleFluid; + +public class ManaSqueezerRecipeHandler extends SimpleFluidRecipeHandler { + + @Override + Class getHandlerClass() { + return ManaSqueezerRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_ManaSqueezer"; + } + + @Override + RecipeSimpleFluid getRecipe() { + return SSRecipes.manaSqueezer; + } + + @Override + String getGuiRecipeName() { + return "ss.mana_squeezer"; + } + + @Override + public Class getGuiClass() { + return GuiManaSqueezer.class; + } + + @Override + int getMaxFluid() { + return FluidContainerRegistry.BUCKET_VOLUME * 10; + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/machine/mana_squeezer_nei.png"; + } + + @Override + public void drawExtras(int recipe) + { + //drawProgressBar(52, 25, 176, 0, 14, 14, 48, 7); + drawProgressBar(74, 23, 176, 14, 24, 16, 48, 0); + + if (((SimpleFluidPair) this.arecipes.get(recipe)).fluidStack != null) { + this.drawFluidTank(102, 4, ((SimpleFluidPair) this.arecipes.get(recipe)).fluidStack, 34, 36); + } + + changeTexture(getGuiTexture()); + drawTexturedModalRect(103, 6, 176, 31, 32, 36); + + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java index 9a04ef3..e4351bb 100644 --- a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java +++ b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java @@ -6,10 +6,12 @@ import shift.sextiarysector.gui.GuiLargeFurnace; import shift.sextiarysector.gui.GuiLoom; import shift.sextiarysector.gui.GuiMagicFurnace; +import shift.sextiarysector.gui.GuiManaSqueezer; import shift.sextiarysector.gui.GuiMillstone; import shift.sextiarysector.gui.GuiPulverizer; import shift.sextiarysector.gui.GuiRollingMachine; import shift.sextiarysector.gui.GuiSawmill; +import shift.sextiarysector.gui.GuiSpinningMachine; import shift.sextiarysector.gui.GuiTimeMachine; import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; @@ -19,7 +21,6 @@ public class NEISextiarySectorConfig implements IConfigureNEI { @Override public void loadConfig() { - API.registerRecipeHandler(new MillstoneRecipeHandler()); API.registerUsageHandler(new MillstoneRecipeHandler()); @@ -29,12 +30,18 @@ public void loadConfig() { API.registerRecipeHandler(new SawmillRecipeHandler()); API.registerUsageHandler(new SawmillRecipeHandler()); + API.registerRecipeHandler(new SpinningMachineRecipeHandler()); + API.registerUsageHandler(new SpinningMachineRecipeHandler()); + API.registerRecipeHandler(new PulverizerRecipeHandler()); API.registerUsageHandler(new PulverizerRecipeHandler()); API.registerRecipeHandler(new RollingMachineRecipeHandler()); API.registerUsageHandler(new RollingMachineRecipeHandler()); + API.registerRecipeHandler(new ManaSqueezerRecipeHandler()); + API.registerUsageHandler(new ManaSqueezerRecipeHandler()); + API.registerRecipeHandler(new TimeMachineRecipeHandler()); API.registerUsageHandler(new TimeMachineRecipeHandler()); @@ -94,8 +101,10 @@ public void loadConfig() { API.registerGuiOverlay(GuiMillstone.class, "SS_Millstone"); API.registerGuiOverlay(GuiLoom.class, "SS_Loom"); API.registerGuiOverlay(GuiSawmill.class, "SS_Sawmill"); + API.registerGuiOverlay(GuiSpinningMachine.class, "SS_SpinningMachine"); API.registerGuiOverlay(GuiPulverizer.class, "SS_Pulverizer"); API.registerGuiOverlay(GuiRollingMachine.class, "SS_RollingMachine"); + API.registerGuiOverlay(GuiManaSqueezer.class, "SS_ManaSqueezer"); API.registerGuiOverlay(GuiTimeMachine.class, "SS_TimeMachine"); //API.registerGuiOverlay(GuiBrewingStand.class, "SextiarySectorBrewing"); @@ -108,7 +117,7 @@ public String getName() { @Override public String getVersion() { - return "0.0.3"; + return "0.0.4"; } } diff --git a/src/main/java/shift/sextiarysector/nei/SpinningMachineRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/SpinningMachineRecipeHandler.java new file mode 100644 index 0000000..9177c67 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/SpinningMachineRecipeHandler.java @@ -0,0 +1,40 @@ +package shift.sextiarysector.nei; + +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiSimpleMachine; +import shift.sextiarysector.gui.GuiSpinningMachine; +import shift.sextiarysector.recipe.RecipeSimpleMachine; + +public class SpinningMachineRecipeHandler extends SimpleMachineRecipeHandler { + + @Override + public Class getGuiClass() + { + return GuiSpinningMachine.class; + } + + @Override + Class getHandlerClass() { + return SpinningMachineRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_SpinningMachine"; + } + + @Override + RecipeSimpleMachine getRecipe() { + return SSRecipes.spinning_machine; + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/machine/spinning_machine_nei.png"; + } + + @Override + String getGuiRecipeName() { + return "ss.spinning_machine"; + } +} diff --git a/src/main/java/shift/sextiarysector/plugin/PluginFMP.java b/src/main/java/shift/sextiarysector/plugin/PluginFMP.java index 6bce3b0..0440c2f 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginFMP.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginFMP.java @@ -25,13 +25,13 @@ public void preClientPlugin(FMLPreInitializationEvent event) { @Override public void initPlugin(FMLInitializationEvent event) { + PartRegistry.init(); + } @Override public void postPlugin(FMLPostInitializationEvent event) { - PartRegistry.init(); - } } diff --git a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java index 0b198a6..2f3a208 100644 --- a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java +++ b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java @@ -161,10 +161,12 @@ public static void prePlugins(FMLPreInitializationEvent event) { for (IPlugin p : plugins) { + + SextiarySector.Log.info(p.getModName() + " Plugin is pre init"); try { - SextiarySector.Log.info(p.getModName() + " Plugin is pre init"); p.prePlugin(event); + SextiarySector.Log.info(p.getModName() + " Plugin was successful pre initialization"); } catch (Exception e) { @@ -180,10 +182,11 @@ public static void initPlugins(FMLInitializationEvent event) { for (IPlugin p : plugins) { + SextiarySector.Log.info(p.getModName() + " Plugin is init"); try { - SextiarySector.Log.info(p.getModName() + " Plugin is init"); p.initPlugin(event); + SextiarySector.Log.info(p.getModName() + " Plugin was successful initialization"); } catch (Exception e) { @@ -199,10 +202,11 @@ public static void postPlugins(FMLPostInitializationEvent event) { for (IPlugin p : plugins) { + SextiarySector.Log.info(p.getModName() + " Plugin is post init"); try { - SextiarySector.Log.info(p.getModName() + " Plugin is post init"); p.postPlugin(event); + SextiarySector.Log.info(p.getModName() + " Plugin was successful post initialization"); } catch (Exception e) { diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index 775cf7e..1e94d3b 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -27,6 +27,12 @@ public static void addRecipes(CraftingManager p_77608_1_) 'x', "paneGlassColorless", })); + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(SSItems.blueGel, 1), + new Object[] { + "dustBluestone", + "slimeball" + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.smallCloth, 1), new Object[] { "xx", "xx", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index ebf5a38..26f278d 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -26,13 +26,14 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) // })); //スライム - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.slime_ball, 2), + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.slime_ball, 1), new Object[] { SSItems.dustWaterLily, "condimentSugar", "fluidWater", })); + /* p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.slime_ball, 2), new Object[] { "condimentSugar", @@ -48,6 +49,7 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) "condimentSalt", "fluidWater", })); + */ p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.drinkingWaterBottle, 2), new Object[] { @@ -64,10 +66,10 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) "condimentCocoa", })); - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.blueStoneSlimeBall, 1), + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.blueGel, 2), new Object[] { "dustBluestone", - Items.slime_ball + "slimeball" })); p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.steelIngot, 1), @@ -91,7 +93,7 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.unit, 1), new Object[] { "xxx", "xyx", "xxx", - Character.valueOf('y'), SSItems.blueStoneSlimeBall, + Character.valueOf('y'), SSItems.blueGel, Character.valueOf('x'), "cobblestone", })); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index e16cbc4..b71f3dd 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -13,225 +13,230 @@ public class RecipesMachine { public static void addRecipes(CraftingManager p_77608_1_) - { - - p_77608_1_.addRecipe(new ItemStack(SSBlocks.LargeFurnace, 1), - new Object[] { - "xyx", "xax", "xzx", - 'x', Blocks.stone, - 'y', Blocks.crafting_table, - 'z', Blocks.chest, - 'a', Blocks.furnace - }); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.energyReactor, 2), - new Object[] { "xxx", "xyx","xxx", - Character.valueOf('y'), "ingotBluestone", - Character.valueOf('x'), "ingotYellowstone" - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.objectReactor, 2), - new Object[] { "xxx", "xyx","xxx", - Character.valueOf('y'), "ingotNinja", - Character.valueOf('x'), "ingotYellowstone" - })); - - Object[] material = new Object[]{"plankWood", "stone", "ingotSteel", "ingotNinja", "gemOrichalcum"}; - Item[] gear = new Item[]{SSItems.woodGear, SSItems.stoneGear, SSItems.steelGear, SSItems.ninjaGear, SSItems.orichalcumGear}; - String[] gearOre = new String[]{"gearWood", "gearStone", "gearSteel", "gearNinja", "gearOrichalcum"}; - Item[] unit = new Item[]{SSItems.woodUnitGear, SSItems.stoneUnitGear, SSItems.steelUnitGear, SSItems.ninjaUnitGear, SSItems.orichalcumUnitGear}; - Item[] storage = new Item[]{SSItems.woodGFStorage, SSItems.stoneGFStorage, SSItems.steelGFStorage, SSItems.ninjaGFStorage, SSItems.orichalcumGFStorage}; - Block[] shaft = new Block[]{SSBlocks.woodShaft, SSBlocks.stoneShaft, SSBlocks.steelShaft, SSBlocks.ninjaShaft, SSBlocks.orichalcumShaft}; - Block[] tank = new Block[]{SSBlocks.woodGFTank, SSBlocks.stoneGFTank, SSBlocks.steelGFTank, SSBlocks.ninjaGFTank, SSBlocks.orichalcumGFTank}; - Block[] box = new Block[]{SSBlocks.woodGearBox, SSBlocks.stoneGearBox, SSBlocks.steelGearBox, SSBlocks.ninjaGearBox, SSBlocks.orichalcumGearBox}; - - //GF Block - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.smallWindmill, 1), - new Object[] { "xzx", "zyz","xzx", - Character.valueOf('y'), SSBlocks.woodShaft, - Character.valueOf('x'), "plankWood", - Character.valueOf('z'), Blocks.wool - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.canvas, 1), - new Object[] { "xxy", "xxy"," y", - Character.valueOf('y'), Blocks.fence, - Character.valueOf('x'), SSItems.cloth - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.windmill, 1), - new Object[] { " x ", "xyx"," x ", - Character.valueOf('y'), SSBlocks.stoneShaft, - Character.valueOf('x'), SSItems.canvas - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.smallWaterwheel, 1), - new Object[] { "xxx", "xyx","xxx", - Character.valueOf('x'), "plateWood", - Character.valueOf('y'), SSBlocks.stoneShaft - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.steamMotor, 1), - new Object[] { "xzx", "xyx","pbp", - Character.valueOf('x'), "paneGlassColorless", - Character.valueOf('y'), SSItems.energyReactor, - Character.valueOf('z'), SSBlocks.steelShaft, - Character.valueOf('b'), new ItemStack(SSItems.dustWaterLily,1,0), - Character.valueOf('p'), "ingotSteel" - })); - - for(int i=0;i<5;i++){ - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(shaft[i], 4), - new Object[] { "xzx", "xyx","xzx", - Character.valueOf('y'), "dustBluestone", - Character.valueOf('x'), material[i], - Character.valueOf('z'), SSItems.blueStoneSlimeBall - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(tank[i], 1), - new Object[] { "yay", "xzx","yxy", - Character.valueOf('y'), material[i], - Character.valueOf('x'), storage[i], - Character.valueOf('z'), unit[i], - Character.valueOf('a'), gearOre[i] - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(box[i], 1), - new Object[] { "yxy", "xzx","yxy", - Character.valueOf('y'), material[i], - Character.valueOf('x'), gearOre[i], - Character.valueOf('z'), unit[i] - })); - - } - - Block[] gearShaft = new Block[]{SSBlocks.woodStoneGearShaft, SSBlocks.stoneSteelGearShaft, SSBlocks.steelNinjaGearShaft, SSBlocks.ninjaOrichalcumGearShaft}; - - for(int i=0;i<4;i++){ - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gearShaft[i], 1, 1), - new Object[] { "y", "z", "x", - Character.valueOf('y'), shaft[i], - Character.valueOf('x'), shaft[i+1], - Character.valueOf('z'), SSItems.energyReactor - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gearShaft[i], 1, 0), - new Object[] { "y", "z", "x", - Character.valueOf('y'), shaft[i+1], - Character.valueOf('x'), shaft[i], - Character.valueOf('z'), SSItems.energyReactor - })); - - } - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.millstone, 1), - new Object[] { "yyy", "aza","yxy", - Character.valueOf('y'), "plankWood", - Character.valueOf('x'), SSItems.woodGFStorage, - Character.valueOf('z'), SSItems.woodUnitGear, - Character.valueOf('a'), "stone" - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.loom, 1), - new Object[] { "yyy", "aza","yxy", - Character.valueOf('y'), "plankWood", - Character.valueOf('x'), SSItems.woodGFStorage, - Character.valueOf('z'), SSItems.woodUnitGear, - Character.valueOf('a'), "stickWood" - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.sawmill, 1), - new Object[] { "yyy", "aza","yxy", - Character.valueOf('y'), "plankWood", - Character.valueOf('x'), SSItems.stoneGFStorage, - Character.valueOf('z'), SSItems.stoneUnitGear, - Character.valueOf('a'), "ingotIron" - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.pump, 1), - new Object[] { "yyy", "axy","yzy", - Character.valueOf('x'), SSItems.stoneUnitGear, - Character.valueOf('y'), "plateWood", - Character.valueOf('z'), SSItems.stoneGear, - Character.valueOf('a'), SSBlocks.woodGrate, - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.pulverizer, 1), - new Object[] { "yay", "aza","yxy", - Character.valueOf('y'), "plankWood", - Character.valueOf('x'), SSItems.steelGFStorage, - Character.valueOf('z'), SSItems.steelUnitGear, - Character.valueOf('a'), "gemDiamond" - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.fan, 1), - new Object[] { "yay", "zxz","zbz", - Character.valueOf('y'), "ingotBrass", - Character.valueOf('x'), "plateWood", - Character.valueOf('z'), "stone", - Character.valueOf('a'), Blocks.iron_bars, - Character.valueOf('b'), SSBlocks.steelShaft - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.saw, 1), - new Object[] { "yay", "zxz","zbz", - Character.valueOf('y'), "ingotBrass", - Character.valueOf('x'), "plateIron", - Character.valueOf('z'), "stone", - Character.valueOf('a'), "dustDiamond", - Character.valueOf('b'), SSBlocks.steelShaft - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.rollingMachine, 1), - new Object[] { "yay", "aza","yxy", - Character.valueOf('y'), "plankWood", - Character.valueOf('x'), SSItems.ninjaGFStorage, - Character.valueOf('z'), SSItems.ninjaUnitGear, - Character.valueOf('a'), "ingotIron" - })); - - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.timeMachine, 1), - new Object[] { "yay", "aza","yxy", - Character.valueOf('y'), "plankWood", - Character.valueOf('x'), SSItems.orichalcumGFStorage, - Character.valueOf('z'), SSItems.orichalcumUnitGear, - Character.valueOf('a'), SSBlocks.chunkLoader - })); - - //GF Item - - for(int i=0;i<5;i++){ + { + + p_77608_1_.addRecipe(new ItemStack(SSBlocks.LargeFurnace, 1), + new Object[] { + "xyx", "xax", "xzx", + 'x', Blocks.stone, + 'y', Blocks.crafting_table, + 'z', Blocks.chest, + 'a', Blocks.furnace + }); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.energyReactor, 2), + new Object[] { "xxx", "xyx", "xxx", + Character.valueOf('y'), "ingotBluestone", + Character.valueOf('x'), "ingotYellowstone" + })); - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gear[i], 2), - new Object[] { " x ", "xyx"," x ", - Character.valueOf('y'), SSItems.blueStoneDust, - Character.valueOf('x'), material[i] + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.objectReactor, 2), + new Object[] { "xxx", "xyx", "xxx", + Character.valueOf('y'), "ingotNinja", + Character.valueOf('x'), "ingotYellowstone" })); + Object[] material = new Object[] { "plankWood", "stone", "ingotSteel", "ingotNinja", "gemOrichalcum" }; + Item[] gear = new Item[] { SSItems.woodGear, SSItems.stoneGear, SSItems.steelGear, SSItems.ninjaGear, SSItems.orichalcumGear }; + String[] gearOre = new String[] { "gearWood", "gearStone", "gearSteel", "gearNinja", "gearOrichalcum" }; + Item[] unit = new Item[] { SSItems.woodUnitGear, SSItems.stoneUnitGear, SSItems.steelUnitGear, SSItems.ninjaUnitGear, SSItems.orichalcumUnitGear }; + Item[] storage = new Item[] { SSItems.woodGFStorage, SSItems.stoneGFStorage, SSItems.steelGFStorage, SSItems.ninjaGFStorage, SSItems.orichalcumGFStorage }; + Block[] shaft = new Block[] { SSBlocks.woodShaft, SSBlocks.stoneShaft, SSBlocks.steelShaft, SSBlocks.ninjaShaft, SSBlocks.orichalcumShaft }; + Block[] tank = new Block[] { SSBlocks.woodGFTank, SSBlocks.stoneGFTank, SSBlocks.steelGFTank, SSBlocks.ninjaGFTank, SSBlocks.orichalcumGFTank }; + Block[] box = new Block[] { SSBlocks.woodGearBox, SSBlocks.stoneGearBox, SSBlocks.steelGearBox, SSBlocks.ninjaGearBox, SSBlocks.orichalcumGearBox }; + + //GF Block + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.smallWindmill, 1), + new Object[] { "xzx", "zyz", "xzx", + Character.valueOf('y'), SSBlocks.woodShaft, + Character.valueOf('x'), "plankWood", + Character.valueOf('z'), Blocks.wool + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.canvas, 1), + new Object[] { "xxy", "xxy", " y", + Character.valueOf('y'), Blocks.fence, + Character.valueOf('x'), SSItems.cloth + })); - p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(unit[i], 1), - new Object[] { - SSItems.unit, - gearOre[i] + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.windmill, 1), + new Object[] { " x ", "xyx", " x ", + Character.valueOf('y'), SSBlocks.stoneShaft, + Character.valueOf('x'), SSItems.canvas + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.smallWaterwheel, 1), + new Object[] { "xxx", "xyx", "xxx", + Character.valueOf('x'), "plateWood", + Character.valueOf('y'), SSBlocks.stoneShaft })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.steamMotor, 1), + new Object[] { "xzx", "xyx", "pbp", + Character.valueOf('x'), "paneGlassColorless", + Character.valueOf('y'), SSItems.energyReactor, + Character.valueOf('z'), SSBlocks.steelShaft, + Character.valueOf('b'), new ItemStack(SSItems.dustWaterLily, 1, 0), + Character.valueOf('p'), "ingotSteel" + })); + + for (int i = 0; i < 5; i++) { + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(shaft[i], 4), + new Object[] { "xzx", "xyx", "xzx", + Character.valueOf('y'), "dustBluestone", + Character.valueOf('x'), material[i], + Character.valueOf('z'), "gelBluestone" + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(tank[i], 1), + new Object[] { "yay", "xzx", "yxy", + Character.valueOf('y'), material[i], + Character.valueOf('x'), storage[i], + Character.valueOf('z'), unit[i], + Character.valueOf('a'), gearOre[i] + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(box[i], 1), + new Object[] { "yxy", "xzx", "yxy", + Character.valueOf('y'), material[i], + Character.valueOf('x'), gearOre[i], + Character.valueOf('z'), unit[i] + })); + } + Block[] gearShaft = new Block[] { SSBlocks.woodStoneGearShaft, SSBlocks.stoneSteelGearShaft, SSBlocks.steelNinjaGearShaft, SSBlocks.ninjaOrichalcumGearShaft }; + + for (int i = 0; i < 4; i++) { + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gearShaft[i], 1, 1), + new Object[] { "y", "z", "x", + Character.valueOf('y'), shaft[i], + Character.valueOf('x'), shaft[i + 1], + Character.valueOf('z'), SSItems.energyReactor + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gearShaft[i], 1, 0), + new Object[] { "y", "z", "x", + Character.valueOf('y'), shaft[i + 1], + Character.valueOf('x'), shaft[i], + Character.valueOf('z'), SSItems.energyReactor + })); + + } + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.millstone, 1), + new Object[] { "yyy", "aza", "yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.woodGFStorage, + Character.valueOf('z'), SSItems.woodUnitGear, + Character.valueOf('a'), "stone" + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.loom, 1), + new Object[] { "yyy", "aza", "yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.woodGFStorage, + Character.valueOf('z'), SSItems.woodUnitGear, + Character.valueOf('a'), "stickWood" + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.sawmill, 1), + new Object[] { "yyy", "aza", "yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.stoneGFStorage, + Character.valueOf('z'), SSItems.stoneUnitGear, + Character.valueOf('a'), "ingotIron" + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.spinningMachine, 1), + new Object[] { "yyy", "aza", "yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.stoneGFStorage, + Character.valueOf('z'), SSItems.stoneUnitGear, + Character.valueOf('a'), "ingotGold" + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.pump, 1), + new Object[] { "yyy", "axy", "yzy", + Character.valueOf('x'), SSItems.stoneUnitGear, + Character.valueOf('y'), "plateWood", + Character.valueOf('z'), SSItems.stoneGear, + Character.valueOf('a'), SSBlocks.woodGrate, + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.pulverizer, 1), + new Object[] { "yay", "aza", "yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.steelGFStorage, + Character.valueOf('z'), SSItems.steelUnitGear, + Character.valueOf('a'), "gemDiamond" + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.fan, 1), + new Object[] { "yay", "zxz", "zbz", + Character.valueOf('y'), "ingotBrass", + Character.valueOf('x'), "plateWood", + Character.valueOf('z'), "stone", + Character.valueOf('a'), Blocks.iron_bars, + Character.valueOf('b'), SSBlocks.steelShaft + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.saw, 1), + new Object[] { "yay", "zxz", "zbz", + Character.valueOf('y'), "ingotBrass", + Character.valueOf('x'), "plateIron", + Character.valueOf('z'), "stone", + Character.valueOf('a'), "dustDiamond", + Character.valueOf('b'), SSBlocks.steelShaft + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.rollingMachine, 1), + new Object[] { "yay", "aza", "yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.ninjaGFStorage, + Character.valueOf('z'), SSItems.ninjaUnitGear, + Character.valueOf('a'), "ingotIron" + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.timeMachine, 1), + new Object[] { "yay", "aza", "yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.orichalcumGFStorage, + Character.valueOf('z'), SSItems.orichalcumUnitGear, + Character.valueOf('a'), SSBlocks.chunkLoader + })); + + //GF Item + + for (int i = 0; i < 5; i++) { + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(gear[i], 2), + new Object[] { " x ", "xyx", " x ", + Character.valueOf('y'), "dustBluestone", + Character.valueOf('x'), material[i] + })); + + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(unit[i], 1), + new Object[] { + SSItems.unit, + gearOre[i] + })); + + } - for(int i=0;i<5;i++){ + for (int i = 0; i < 5; i++) { - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(storage[i], 1), - new Object[] { " y ", "xzx","xzx", - Character.valueOf('z'), SSItems.blueStoneDust, - Character.valueOf('x'), material[i], - Character.valueOf('y'), gearOre[i], + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(storage[i], 1), + new Object[] { " y ", "xzx", "xzx", + Character.valueOf('z'), "dustBluestone", + Character.valueOf('x'), material[i], + Character.valueOf('y'), gearOre[i], })); } - } + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesManaSqueezer.java b/src/main/java/shift/sextiarysector/recipe/RecipesManaSqueezer.java new file mode 100644 index 0000000..f110212 --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesManaSqueezer.java @@ -0,0 +1,15 @@ +package shift.sextiarysector.recipe; + +import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SSFluids; + +public class RecipesManaSqueezer { + + public static void addRecipes(RecipeSimpleFluid recipe) + { + + recipe.add("logWood", null, new FluidStack(SSFluids.mana, 200)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java new file mode 100644 index 0000000..aebc3a4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java @@ -0,0 +1,18 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +public class RecipesSpinningMachine { + + public static void addRecipes(RecipeSimpleMachine recipe) + { + + // + //recipe.add("plankWood", new ItemStack(SSBlocks.woodPlate, 4)); + + recipe.add("craftingSmallCloth", new ItemStack(Items.string, 4)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftUp.java b/src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftUp.java index 51dd1ec..c3d7c65 100644 --- a/src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftUp.java +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelGearShaftUp.java @@ -9,10 +9,17 @@ public class ModelGearShaftUp extends ModelBase { ModelRenderer b; ModelRenderer out; ModelRenderer in; + ModelRenderer d1; ModelRenderer d2; ModelRenderer d3; ModelRenderer d4; + + ModelRenderer d5; + ModelRenderer d6; + ModelRenderer d7; + ModelRenderer d8; + ModelRenderer u1; public ModelGearShaftUp() { @@ -34,6 +41,7 @@ public ModelGearShaftUp() { in.setRotationPoint(0F, 0F, 0F); in.setTextureSize(64, 32); in.mirror = true; + d1 = new ModelRenderer(this, 0, 0); d1.addBox(-1F, -7F, 1F, 2, 2, 2); d1.setRotationPoint(0F, 0F, 0F); @@ -54,6 +62,32 @@ public ModelGearShaftUp() { d4.setRotationPoint(0F, 0F, 0F); d4.setTextureSize(64, 32); d4.mirror = true; + + d5 = new ModelRenderer(this, 0, 0); + d5.addBox(-1F, -7F, 0F, 2, 2, 2); + d5.setRotationPoint(0F, 0F, 0F); + d5.setTextureSize(64, 32); + d5.mirror = true; + this.setRotation(d5, 0, 0, 0.90F); + d6 = new ModelRenderer(this, 0, 0); + d6.addBox(-7F, -1F, 0F, 2, 2, 2); + d6.setRotationPoint(0F, 0F, 0F); + d6.setTextureSize(64, 32); + d6.mirror = true; + this.setRotation(d6, 0, 0, 0.90F); + d7 = new ModelRenderer(this, 0, 0); + d7.addBox(5F, -1F, 0F, 2, 2, 2); + d7.setRotationPoint(0F, 0F, 0F); + d7.setTextureSize(64, 32); + d7.mirror = true; + this.setRotation(d7, 0, 0, 0.90F); + d8 = new ModelRenderer(this, 0, 0); + d8.addBox(-1F, 5F, 0F, 2, 2, 2); + d8.setRotationPoint(0F, 0F, 0F); + d8.setTextureSize(64, 32); + d8.mirror = true; + this.setRotation(d8, 0, 0, 0.90F); + u1 = new ModelRenderer(this, 0, 4); u1.addBox(-1F, -7F, -3F, 2, 2, 2); u1.setRotationPoint(0F, 0F, 0F); @@ -61,6 +95,7 @@ public ModelGearShaftUp() { u1.mirror = true; } + @Override 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); @@ -69,15 +104,27 @@ public void render(Entity entity, float f, float f1, float f2, float f3, in.render(f5); } - public void renderDown(Entity entity, float f, float f1, float f2, float f3,float f4, float f5) { + public void renderDown(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { d1.render(f5); d2.render(f5); d3.render(f5); d4.render(f5); + + d5.render(f5); + d6.render(f5); + d7.render(f5); + d8.render(f5); } - public void renderUp(Entity entity, float f, float f1, float f2, float f3,float f4, float f5) { + public void renderUp(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { u1.render(f5); } + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFGFMachineBase.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFGFMachineBase.java new file mode 100644 index 0000000..48a60d8 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFGFMachineBase.java @@ -0,0 +1,625 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.api.machine.energy.EnergyStorage; +import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; +import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.block.BlockFluidFGFMachine; +import shift.sextiarysector.container.ItemBox; + +public class TileEntityFluidFGFMachineBase extends TileEntityDirection implements ISidedInventory, IFluidHandler, IGFEnergyHandler, IGearForceGrid { + + protected static final int[] slots_top = new int[] { 0, 4 }; + protected static final int[] slots_bottom = new int[] { 2, 1, 3, 5 }; + protected static final int[] slots_sides = new int[] { 1 }; + + protected static final int[] material = new int[] { 0 }; + protected static final int[] empty_bottle = new int[] { 4 }; + + //0 素材 ,1 燃料 ,2 完成品 ,3 素材のコンテナ ,4 空のボトル , 5 液体の入ったボトル + protected ItemBox items = new ItemBox("Base", 6); + + //液体 + private final FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10); + + //GF + public EnergyStorage storage = new EnergyStorage("Base", 1, 10000); + + //表示用 + public int inPower = 0, inSpeed = 0; + + public int lastSeed = 0; + + //作業の進捗 + public int machineWorkProgressTime; + + //作業の進捗の最大値 この数字になると完了する 200Speed消費 + public int machineMaxProgressTime = 2000; + + private int cooltime; + + //燃料と投入されている燃料のマックス状態の量 + public int fuel; + public int fuelMax; + + public boolean on; + + public TileEntityFluidFGFMachineBase() { + } + + public TileEntityFluidFGFMachineBase(int type) { + this.storage.setPowerCapacity(type); + } + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + } + + public void updateServerEntity() + { + if (this.inSpeed == 0) inPower = 0; + if (lastSeed != this.storage.getSpeedStored()) { + this.inSpeed = this.storage.getSpeedStored() - lastSeed; + this.lastSeed = this.storage.getSpeedStored(); + } else { + this.inSpeed = 0; + } + + if (this.storage.getSpeedStored() <= 0) { + this.storage.setPowerStored(0); + } + + if (this.isCharging()) { + this.updateChargeEntity(); + } + + if (cooltime <= 10) { + this.cooltime++; + } else { + + this.cooltime = 0; + + if (this.isFuel() && this.canWork()) { + + this.machineWorkProgressTime += this.storage.drawEnergy(this.storage.getMaxPower(), 100, false); + + if (this.machineWorkProgressTime >= machineMaxProgressTime) + { + this.machineWorkProgressTime = 0; + this.workItem(); + + if (this.storage.getSpeedStored() == 0) { + this.storage.setPowerStored(0); + } + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + this.markDirty(); + + } + + } + + } + + this.chargeFluid(); + if (this.on && this.tank.getFluidAmount() > 0) this.chargeUPFluid(); + + } + + private void chargeUPFluid() { + + if (this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord) instanceof IFluidHandler) { + IFluidHandler f = (IFluidHandler) this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); + + if (f.canFill(ForgeDirection.DOWN, this.tank.getFluid().getFluid())) { + int i = f.fill(ForgeDirection.DOWN, this.tank.getFluid(), true); + this.tank.drain(i, true); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + } + + private void chargeFluid() { + + if (canChargeFluid()) { + + ItemStack empty = items.getStackInSlot(4); + + for (FluidContainerData f : FluidContainerRegistry.getRegisteredFluidContainerData()) { + + if (f.emptyContainer.isItemEqual(empty) && f.fluid.isFluidEqual(this.tank.getFluid()) && f.fluid.amount <= this.tank.getFluidAmount()) { + + ItemStack item = FluidContainerRegistry.fillFluidContainer(this.tank.getFluid(), empty); + if (this.items.getStackInSlot(5) == null) + { + this.setInventorySlotContents(5, item.copy()); + } + else if (this.items.getStackInSlot(5).isItemEqual(item)) + { + this.items.getStackInSlot(5).stackSize += item.stackSize; + } + + this.tank.drain(f.fluid.amount, true); + + this.items.reduceStackSize(4, 1); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + return; + } + + } + + } + + } + + public boolean canChargeFluid() + { + if (items.getStackInSlot(4) == null) return false; + ItemStack item = FluidContainerRegistry.fillFluidContainer(this.tank.getFluid(), items.getStackInSlot(4)); + if (item == null) return false; + if (this.items.getStackInSlot(5) == null) return true; + int result = this.items.getStackInSlot(5).stackSize + item.stackSize; + return (result <= getInventoryStackLimit() && result <= item.getMaxStackSize()); + } + + public boolean isCharging() + { + + boolean f1, f2, f3; + + if (this.items.getStackInSlot(1) == null) return false; + + f1 = this.storage.getMaxSpeed() > this.storage.getSpeedStored(); + f2 = (this.items.getStackInSlot(1) != null && GearForceItem.manager.isGearForceItem(this.items.getStackInSlot(1))); + f3 = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0; + + //System.out.println(f1+" "+f2+" "+f3); + + return f1 && f2 && f3; + } + + public void updateChargeEntity() + { + if (this.items.getStackInSlot(1) == null) return; + + if (GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0) { + int s = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 20, true); + + int i = this.storage.addEnergy(this.storage.getMaxPower(), s, false); + GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), i, false); + if (i > 0) this.inPower = this.storage.getMaxPower(); + //this.inSpeed += (int) i; + + this.markDirty(); + + } + } + + public boolean isFuel() + { + return this.storage.getSpeedStored() > 0; + } + + public boolean canWork() + { + if (this.items.getStackInSlot(0) == null) + { + return false; + } + else + { + ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); + FluidStack fluidstack = this.getFluidResult(this.items.getStackInSlot(0)); + if (itemstack == null && fluidstack == null) return false; + return this.checkItem(itemstack) && this.checkFluid(fluidstack) && this.checkContainerItem(this.items.getStackInSlot(0)); + } + } + + private boolean checkItem(ItemStack itemstack) { + + if (this.items.getStackInSlot(2) == null || itemstack == null) return true; + if (!this.items.getStackInSlot(2).isItemEqual(itemstack)) return false; + int result = this.items.getStackInSlot(2).stackSize + itemstack.stackSize; + return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); + } + + private boolean checkContainerItem(ItemStack itemstack) { + + if (!itemstack.getItem().hasContainerItem(itemstack)) return true; + ItemStack itemstackC = itemstack.getItem().getContainerItem(itemstack.copy()); + if (this.items.getStackInSlot(3) == null || itemstackC == null) return true; + if (!this.items.getStackInSlot(3).isItemEqual(itemstackC)) return false; + int result = this.items.getStackInSlot(3).stackSize + itemstackC.stackSize; + return (result <= getInventoryStackLimit() && result <= itemstackC.getMaxStackSize()); + + } + + private boolean checkFluid(FluidStack fluidstack) { + + if (this.getTank().getFluidAmount() == 0 || fluidstack == null) return true; + if (!this.getTank().getFluid().isFluidEqual(fluidstack)) return false; + int result = this.getTank().getFluidAmount() + fluidstack.amount; + return (result <= this.getTank().getCapacity()); + + } + + public void workItem() + { + if (this.canWork()) + { + ItemStack itemstack = this.getResult(this.items.getStackInSlot(0)); + FluidStack fluidstack = this.getFluidResult(this.items.getStackInSlot(0)); + + //item + if (itemstack != null) { + + if (this.items.getStackInSlot(2) == null) + { + this.setInventorySlotContents(2, itemstack.copy()); + } + else if (this.items.getStackInSlot(2).isItemEqual(itemstack)) + { + this.items.getStackInSlot(2).stackSize += itemstack.stackSize; + } + + } + + //CItem + if (this.items.getStackInSlot(0).getItem().hasContainerItem(this.items.getStackInSlot(0))) { + + ItemStack itemC = this.items.getStackInSlot(0).getItem().getContainerItem(this.items.getStackInSlot(0).copy()); + + if (this.items.getStackInSlot(3) == null) + { + this.setInventorySlotContents(3, itemC); + } + else if (this.items.getStackInSlot(3).isItemEqual(itemC)) + { + this.items.getStackInSlot(3).stackSize += itemC.stackSize; + } + } + + //fluid + this.getTank().fill(fluidstack, true); + + this.items.reduceStackSize(0, 1); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + } + + public ItemStack getResult(ItemStack itemstack) { + return ((BlockFluidFGFMachine) this.getBlockType()).getResult(itemstack); + } + + public FluidStack getFluidResult(ItemStack stackInSlot) { + return ((BlockFluidFGFMachine) this.getBlockType()).getFluidResult(stackInSlot); + } + + //GUI + public boolean isWorking() + { + return this.machineWorkProgressTime > 0 && this.storage.getPowerStored() > 0; + } + + public int getWorkProgressScaled(int par1) + { + return this.machineWorkProgressTime / (machineMaxProgressTime / par1); + } + + public int getEnergyProgressScaled(int par1) + { + return this.storage.getSpeedStored() / (this.storage.getMaxSpeed() / par1); + } + + public FluidTank getTank() { + return tank; + } + + public boolean isFluid() { + return this.getTank().getFluidAmount() > 0; + } + + //IInventory関係 + @Override + public int getSizeInventory() { + return items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return items.getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return items.decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return items.getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + items.setInventorySlotContents(i, itemstack); + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return items.getInventoryStackLimit(); + } + + @Override + public void markDirty() { + super.markDirty(); + items.onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer + .getDistanceSq(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D) <= 64.0D; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public String getInventoryName() { + return "gui." + ((BlockFluidFGFMachine) this.blockType).getGUIUnlocalizedName(); + } + + /*入れる*/ + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + if (i == 1) { + return GearForceItem.manager.isGearForceItem(itemstack); + } + + return i == 0 || i == 1 || i == 4; + } + + //ISidedInventory関係 + //0 素材 ,1 燃料 ,2 完成品 ,3 素材のコンテナ ,4 空のボトル , 5 液体の入ったボトル + @Override + public int[] getAccessibleSlotsFromSide(int var1) { + + if (var1 == 0) { + return slots_bottom; + } + + if (var1 == 1) { + return slots_top; + } + + if (var1 == this.getDirection().ordinal()) { + return this.material; + } + + if (var1 == this.getDirection().getOpposite().ordinal()) { + return this.empty_bottle; + } + + return slots_sides; + } + + @Override + public boolean canInsertItem(int i, ItemStack itemstack, int j) { + return this.isItemValidForSlot(i, itemstack); + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) + { + + if (p_102008_1_ == 2 || p_102008_1_ == 3 || p_102008_1_ == 5) { + return true; + } + + if (p_102008_3_ == 0 && p_102008_2_.getItem() == Items.bucket) { + return true; + } + + return false; + } + + //IFluidHandler関係 + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + return 0;//tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(getTank().getFluid())) + { + return null; + } + return getTank().drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return getTank().drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + return false; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { getTank().getInfo() }; + } + + //EnergyStorageの利用 + @Override + public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + + if (!this.canInterface(from)) + return 0; + + int i = storage.addEnergy(power, speed, simulate); + + if (!simulate && i > 0) { + this.inPower = power; + //this.inSpeed+=i; + } + + return i; + + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + + if (!this.canInterface(from)) + return 0; + + return 0;//storage.drawEnergy(power, speed, simulate); + + } + + @Override + public boolean canInterface(ForgeDirection from) { + + return this.direction.ordinal() != from.ordinal(); + + } + + @Override + public int getPowerStored(ForgeDirection from) { + + return storage.getPowerStored(); + + } + + @Override + public int getSpeedStored(ForgeDirection from) { + + return storage.getSpeedStored(); + + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + + return storage.getMaxPower(); + + } + + @Override + public int getMaxSpeedStored(ForgeDirection from) { + + return storage.getMaxSpeed(); + + } + + @Override + public boolean canIn(ForgeDirection from) { + return true; + } + + @Override + public boolean canOut(ForgeDirection from) { + return false; + } + + //NBT関係 + @Override + public void readFromNBT(NBTTagCompound nbt) { + + super.readFromNBT(nbt); + items.readFromNBT(nbt); + storage.readFromNBT(nbt); + getTank().readFromNBT(nbt); + if (nbt.hasKey("Empty") && tank.getFluidAmount() > 0) this.tank.setFluid(null); + this.machineWorkProgressTime = nbt.getShort("WorkTime"); + this.inPower = nbt.getInteger("inPower"); + this.inSpeed = nbt.getInteger("inSpeed"); + this.on = nbt.getBoolean("on"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + + super.writeToNBT(nbt); + items.writeToNBT(nbt); + storage.writeToNBT(nbt); + getTank().writeToNBT(nbt); + nbt.setShort("WorkTime", (short) this.machineWorkProgressTime); + nbt.setInteger("inPower", this.inPower); + nbt.setInteger("inSpeed", this.inSpeed); + nbt.setBoolean("on", this.on); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + this.readFromNBT(pkt.func_148857_g()); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java index 009c231..c8c56bc 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java @@ -7,11 +7,11 @@ import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; import shift.sextiarysector.api.machine.energy.IGearForceGrid; -public class TileEntityGearShaft extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ +public class TileEntityGearShaft extends TileEntityDirection implements IGFEnergyHandler, IGearForceGrid { public float rotateUpStep = 0; public float rotateDownStep = 0; - private EnergyStorage storage = new EnergyStorage("Base", 1, 320, 160); + private final EnergyStorage storage = new EnergyStorage("Base", 1, 320, 160); public TileEntityGearShaft() { @@ -41,7 +41,7 @@ public void updateClientEntity() { private void updateServerEntity() { - if(!(this.getOutTileEntity() instanceof IGFEnergyHandler)){ + if (!(this.getOutTileEntity() instanceof IGFEnergyHandler)) { return; } @@ -49,14 +49,14 @@ private void updateServerEntity() { int i = storage.drawEnergy(storage.getMaxPower(), storage.getMaxSpeed(), true); - if(this.isUP()){ + if (this.isUP()) { - int add = (int)((float)i/4.0f); - int a = out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPower()+1, add, true); - storage.drawEnergy(storage.getMaxPower(), a*4, false); - out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPower()+1, add, false); + int add = (int) (i / 8.0f); + int a = out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPower() + 1, add, true); + storage.drawEnergy(storage.getMaxPower(), a * 8, false); + out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPower() + 1, add, false); - }else{ + } else { int a = out.addEnergy(getDirection().getOpposite(), this.storage.getMaxPower(), i, true); storage.drawEnergy(storage.getMaxPower(), a, false); @@ -66,12 +66,12 @@ private void updateServerEntity() { } - private TileEntity getOutTileEntity(){ - return this.worldObj.getTileEntity(xCoord+this.direction.offsetX, yCoord+this.direction.offsetY, zCoord+this.direction.offsetZ); + private TileEntity getOutTileEntity() { + return this.worldObj.getTileEntity(xCoord + this.direction.offsetX, yCoord + this.direction.offsetY, zCoord + this.direction.offsetZ); } - private boolean isUP(){ - return this.getBlockMetadata()==0; + private boolean isUP() { + return this.getBlockMetadata() == 0; } // NBT関係 @@ -88,15 +88,14 @@ public void writeToNBT(NBTTagCompound par1nbtTagCompound) { } @Override - public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { - - if(!this.canInterface(from))return 0; + public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + if (!this.canInterface(from)) return 0; - if(power==this.storage.getMaxPower() && this.isUP()){ + if (power == this.storage.getMaxPower() && this.isUP()) { return this.storage.addEnergy(power, speed, simulate); - }else if(power==this.storage.getMaxPower()+1 && !this.isUP()){ - return (int)((float)this.storage.addEnergy(power-1, speed*4, simulate)/4.0f); + } else if (power == this.storage.getMaxPower() + 1 && !this.isUP()) { + return (int) (this.storage.addEnergy(power - 1, speed * 4, simulate) / 4.0f); } return 0; @@ -133,7 +132,6 @@ public int getMaxSpeedStored(ForgeDirection from) { return storage.getMaxSpeed(); } - @Override public boolean canIn(ForgeDirection from) { return this.direction.getOpposite().ordinal() == from.ordinal(); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java index c225cf1..d925796 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java @@ -93,7 +93,7 @@ public void updateServerEntity() if (this.canWork()) { if (this.storage.getSpeedStored() >= 1) { - //++this.machineWorkProgressTime; + this.machineWorkProgressTime += this.storage.drawEnergy(this.storage.getMaxPower(), 100, false); if (this.machineWorkProgressTime >= machineMaxProgressTime) @@ -105,7 +105,6 @@ public void updateServerEntity() this.storage.setPowerStored(0); } - //PacketDispatcher.sendPacketToAllPlayers(getDescriptionPacket()); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); this.markDirty(); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java index 4959a35..2474069 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java @@ -1,5 +1,6 @@ package shift.sextiarysector.tileentity; +import net.minecraft.block.BlockFire; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; @@ -12,7 +13,7 @@ import shift.sextiarysector.SSFluids; import shift.sextiarysector.block.BlockBlueFire; -public class TileEntitySquare extends TileEntityDirection implements IFluidHandler{ +public class TileEntitySquare extends TileEntityDirection implements IFluidHandler { protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 16); @@ -36,26 +37,24 @@ public void updateClientEntity() { private void updateServerEntity() { - if((lastFluid)!=(tank.getFluidAmount()/10)){ - this.lastFluid = (tank.getFluidAmount()/10); + if ((lastFluid) != (tank.getFluidAmount() / 10)) { + this.lastFluid = (tank.getFluidAmount() / 10); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } - if(this.direction.ordinal() != ForgeDirection.UP.ordinal() && this.tank.getFluidAmount() > 0)this.chargeFluid(); - if(canChargeSteam())this.chargeSteam(); + if (this.direction.ordinal() != ForgeDirection.UP.ordinal() && this.tank.getFluidAmount() > 0) this.chargeFluid(); + if (canChargeSteam()) this.chargeSteam(); } + private void chargeFluid() { + if (this.worldObj.getTileEntity(xCoord + this.direction.offsetX, yCoord + this.direction.offsetY, zCoord + this.direction.offsetZ) instanceof IFluidHandler) { + IFluidHandler f = (IFluidHandler) this.worldObj.getTileEntity(xCoord + this.direction.offsetX, yCoord + this.direction.offsetY, zCoord + this.direction.offsetZ); - private void chargeFluid(){ - - if(this.worldObj.getTileEntity(xCoord + this.direction.offsetX, yCoord + this.direction.offsetY, zCoord + this.direction.offsetZ) instanceof IFluidHandler){ - IFluidHandler f = (IFluidHandler) this.worldObj.getTileEntity(xCoord + this.direction.offsetX, yCoord + this.direction.offsetY, zCoord + this.direction.offsetZ); - - if(f.canFill(this.getDirection().getOpposite(), this.tank.getFluid().getFluid())){ + if (f.canFill(this.getDirection().getOpposite(), this.tank.getFluid().getFluid())) { FluidStack fs = this.tank.getFluid().copy(); - if(fs.amount> 500)fs.amount=500; + if (fs.amount > 500) fs.amount = 500; int i = f.fill(this.getDirection().getOpposite(), fs, true); this.tank.drain(i, true); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); @@ -65,17 +64,21 @@ private void chargeFluid(){ } - private boolean canChargeSteam(){ - return this.tank.getFluidAmount() >= 10 && this.tank.getFluid().getFluid().getName().equals("water") && this.worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof BlockBlueFire; + private boolean canChargeSteam() { + return this.tank.getFluidAmount() >= 10 && this.tank.getFluid().getFluid().getName().equals("water") && this.worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof BlockFire; } - private void chargeSteam(){ + private void chargeSteam() { + + if (this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord) instanceof IFluidHandler) { + IFluidHandler f = (IFluidHandler) this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); - if(this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord) instanceof IFluidHandler){ - IFluidHandler f = (IFluidHandler) this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); + if (f.canFill(ForgeDirection.DOWN, SSFluids.steam)) { - if(f.canFill(ForgeDirection.DOWN, SSFluids.steam)){ - FluidStack fs = new FluidStack(SSFluids.steam, 10); + int fire = 2; + if (this.worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof BlockBlueFire) fire = 10; + + FluidStack fs = new FluidStack(SSFluids.steam, fire); int i = f.fill(ForgeDirection.DOWN, fs, true); this.tank.drain(i, true); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); @@ -86,78 +89,78 @@ private void chargeSteam(){ } /* IFluidHandler */ - @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill) - { - if(from.ordinal() == this.getDirection().ordinal())return 0; - return tank.fill(resource, doFill); - } - - @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) - { - if (resource == null || !resource.isFluidEqual(tank.getFluid())) - { - return null; - } - return tank.drain(resource.amount, doDrain); - } - - @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) - { - return tank.drain(maxDrain, doDrain); - } - - @Override - public boolean canFill(ForgeDirection from, Fluid fluid) - { - if(from.ordinal() == this.getDirection().ordinal())return false; - return true; - } - - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) - { - return true; - } - - @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from) - { - return new FluidTankInfo[] { tank.getInfo() }; - } - - public boolean hasFluid(){ - return this.tank.getFluidAmount() > 0 ; - } - - public IIcon getFluidIcon(){ - return this.tank.getFluid().getFluid().getIcon(this.tank.getFluid()); - } - - public int getFluidColor(){ - return this.tank.getFluid().getFluid().getColor(this.tank.getFluid()); - } - - public float getFluidHeight(){ - return ((float)this.tank.getFluidAmount()/(float)this.tank.getCapacity())*(11.0f/16.0f); - } - - public int getFluidID(){ - return tank.getFluid().fluidID; - } - - public FluidStack getFluidStack(){ - return this.tank.getFluid(); - } - - /* NBT */ + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + if (from.ordinal() == this.getDirection().ordinal()) return 0; + return tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(tank.getFluid())) + { + return null; + } + return tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return tank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + if (from.ordinal() == this.getDirection().ordinal()) return false; + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { tank.getInfo() }; + } + + public boolean hasFluid() { + return this.tank.getFluidAmount() > 0; + } + + public IIcon getFluidIcon() { + return this.tank.getFluid().getFluid().getIcon(this.tank.getFluid()); + } + + public int getFluidColor() { + return this.tank.getFluid().getFluid().getColor(this.tank.getFluid()); + } + + public float getFluidHeight() { + return ((float) this.tank.getFluidAmount() / (float) this.tank.getCapacity()) * (11.0f / 16.0f); + } + + public int getFluidID() { + return tank.getFluid().fluidID; + } + + public FluidStack getFluidStack() { + return this.tank.getFluid(); + } + + /* NBT */ @Override public void readFromNBT(NBTTagCompound par1nbtTagCompound) { super.readFromNBT(par1nbtTagCompound); tank.readFromNBT(par1nbtTagCompound); - if(par1nbtTagCompound.hasKey("Empty") && tank.getFluidAmount() > 0)this.tank.setFluid(null); + if (par1nbtTagCompound.hasKey("Empty") && tank.getFluidAmount() > 0) this.tank.setFluid(null); } @Override diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 99f795b..84f6b02 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -93,8 +93,10 @@ tile.ss.ninja_orichalcum_gear_shaft.name=Ninja Orichalcum Gear Shaft tile.ss.millstone.name=Millstone tile.ss.loom.name=Loom tile.ss.sawmill.name=Sawmill +tile.ss.spinning_machine.name=Spinning Machine tile.ss.pulverizer.name=Pulverizer tile.ss.rolling_machine.name=Rolling Machine +tile.ss.mana_squeezer.name=Mana Squeezer tile.ss.time_machine.name=Time Machine @@ -206,7 +208,9 @@ item.ss.orichalcum_gem.name=Orichalcum item.ss.ninja_ingot.name=Ninja Ingot -item.ss.blue_stone_slime_ball.name=Blue Stone Slime Ball +item.ss.red_gel.name=Red Stone Gel +item.ss.blue_gel.name=Blue Stone Gel +item.ss.yellow_gel.name=Yellow Stone Gel item.ss.energy_reactor.name=Energy Reactor item.ss.object_reactor.name=Object Reactor @@ -342,6 +346,7 @@ fluid.ss.drinking_water=Drinking Water fluid.ss.spring_water=Spring Water fluid.ss.hot_springs=Hot Springs fluid.ss.steam=Steam +fluid.ss.mana=Mana fluid.ss.sap=Sap fluid.ss.iron=Iron Fluid @@ -370,8 +375,10 @@ gui.ss.steam_motor=Steam Motor gui.ss.millstone=Millstone gui.ss.loom=Loom gui.ss.sawmill=Sawmill +gui.ss.spinning_machine=Spinning Machine gui.ss.pulverizer=Pulverizer gui.ss.rolling_machine=Rolling Machine +gui.ss.mana_squeezer=Mana Squeezer gui.ss.time_machine=Time Machine gui.ss.gf_tank_1=Wood GF Tank @@ -555,9 +562,9 @@ achievement.ss.mithril_ore.desc2=Ring ? achievement.ss.industry=SS2 -Industry- -achievement.ss.bluestone_slime_ball=Mysterious slime -achievement.ss.bluestone_slime_ball.desc=Craft a bluestone slime ball -achievement.ss.bluestone_slime_ball.desc2=How nice +achievement.ss.blue_gel=Mysterious gel +achievement.ss.blue_gel.desc=Craft a blue gel +achievement.ss.blue_gel.desc2=How nice achievement.ss.wood_gear=New power @@ -593,6 +600,10 @@ achievement.ss.sawmill=Blade ? achievement.ss.sawmill.desc=Craft a sawmill achievement.ss.sawmill.desc2=Let dismantling together ! +achievement.ss.spinning_machine=Small industrial +achievement.ss.spinning_machine.desc=Craft a spinning machine +achievement.ss.spinning_machine.desc2=Let the String Figure + achievement.ss.steel_gear=The power of steel achievement.ss.steel_gear.desc=Craft a steel gear @@ -622,6 +633,10 @@ achievement.ss.rolling_machine=Cutting board achievement.ss.rolling_machine.desc=Craft a rolling machine achievement.ss.rolling_machine.desc2=Pretty it's cutting board ! +achievement.ss.mana_squeezer=Blessing of the earth +achievement.ss.mana_squeezer.desc=Craft a mana squeezer +achievement.ss.mana_squeezer.desc2=Automation of agriculture ? + achievement.ss.orichalcum_gear=The power of mystery ! achievement.ss.orichalcum_gear.desc=Craft a orichalcum gear achievement.ss.orichalcum_gear.desc2=End content @@ -661,8 +676,10 @@ nei.ss.ice=fuel=Ice Fuel nei.ss.millstone=Millstone Recipe nei.ss.loom=Loom Recipe nei.ss.sawmill=Sawmill Recipe +nei.ss.spinning_machine=Spinning Machine Recipe nei.ss.pulverizer=Pulverizer Recipe nei.ss.rolling_machine=Rolling Machine Recipe +nei.ss.mana_squeezer=Mana Squeezer Recipe nei.ss.time_machine=Time Machine Recipe nei.ss.fertilizer_farmland=Farmland Mutation Recipe diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/mana_squeezer.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/mana_squeezer.png new file mode 100644 index 0000000000000000000000000000000000000000..16575558a50f0f1a82a5de19221cad0e57878fa8 GIT binary patch literal 511 zcmVcw&F+O`Ft>pI%D#W_dUbpTv07slf;ZQIheEyft? zx+aPunx;VjtX3<0-{+CE)&xOtd*^x1a5w~DyWJwr=QCwlVy$JpUh|PW&ttRMV2q*b zI{HEgq?ETU&)>h2rs;$DOq!;QMk4^MwNzC_|9Z}66$Am+TKZaRwAO!VeR-J8^BjQw zU@*8d>7&7`q?9=4_@b2hHk-|8nua7vs9%0EnM^qUI6sU4)9DoF9H-Oi72_4*a=AoG ziPjp=^KRSTL)`225OrO%+wC4U_`Xk`=SV35Fvi?!N-4^+L7^e2HZ3;`&L0%HtWmJvnKE5_sT_+Q@{;1_m~+wCZcRQCV?002ovPDHLkV1kRM B;vfJ3 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/spinning_machine.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/spinning_machine.png new file mode 100644 index 0000000000000000000000000000000000000000..ff0c468bda858b4f86bad0b24d8c622fb9ab02ab GIT binary patch literal 473 zcmV;~0Ve*5P)M&I{%@A2Mat!18Pnx^4?zas$l`#n-hK7%oa zs;csR7zWC+1mJKuAgXuh%%|n5GGl#NKV+_U^{)%B301!n{yeuho_z7*>5@SRpYtn4Lg|(Kx?;kcwDcS9I z48uU%wishrE|)p^D~lJ41!A6OPN&nS2~x^Tnz|-*UB@_%4;!VF)OC$gDnA1GZmp&3 zI_kOxKx>WG`qf6QHBw5fwP>xgf<%^LKqhj|A&fCE(mqN}$@YQWM_a1VnHjYDToP@2oZr483e&#W!Trqj%1p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+Jtv{#^XaLOjjnl?nb}{o7*Ad|Cvn+Fu+lX=*a2G!Ne5d=5n}!!nGU=c7H&jQ} z2;d1dwY9r7G$JA*L=pRTULt_;&Oiqk0N?;YJ0P3xvP;h4wQzRr$>|g_nTzVtxvFoZ zcJe-WdXHw(%#D7;Wa{;z0(1G6fBzpWJGuQq3}1d8PIo2Mo zQ?A6{wW2u7?@+6hlhH0F2i|?apVWA&`#(TS{2#*9j2#J zj7mfl6Oegm7;aL~gTnPbHqATwdrAN8FRgON1iPdpty1M5&c=K%ioWX5Q-gHIjYY*- z&EMgkBUdy=s@Xl2|3-DTz~fwCJKXCNGH%q;ACLapygwshz-_oXz{tJOnnc|)%D5JI z{!(~vHQODw(_3AR+|x^OaSW!1swQQO7D&lxc7F{lFe5AdGUX!T(Fn ZrbBQN%C1I>uhl1ufycRHt503}`Zt1$XB_|l literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/mana_squeezer_nei.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/mana_squeezer_nei.png new file mode 100644 index 0000000000000000000000000000000000000000..5ac34673891a0445cd29fb4c406ab5119f1689d4 GIT binary patch literal 2235 zcmcH)dpr|r`<*SDDcOl{lEsf=qKy+;tC*sRLh1HVrV_d5I`@t8brB26(PdJxd}5Ki z3`gWtKIMK%^9{Mouv~_*o#{Kj&hPwj{`}te_rA~jKKJMSJb5 zSRDrdB0E9=LS6>W20izX0r?AdWGf(Dn~!T)X)=t$6`Ows1E5sDwjdQLJ^~pM9&-4o zHJl4Y%PXvpFt{HL0K(?5mF0=>KEZ&)WsT9z@Ik7#lSt)mSBGN|)_X(K@YfwZ`H5+y zqX-DROD)m}LU}fr_z{=WgoRn*leMuqNR@*#J8dA`TTag1kOI2_JG^eANlBcVFR$ZG z93kwkz%o-X<$QdbVA9)TGy-QoH`+eYA48k{&+fi})Wup4lJT~2nu&VSqJ&LJbZF&# zSsot0I7)PVkH)p?qCN>j(`_%cTlfYA6_56*VK7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x77NI*{yP-!^5 zqn}>Qur^}NL(1a$V@Ia_i>C=^yDq8$RbV(HIoOrF6nq4NRb3AOP_PCh000A<{%kD) z7W^AZ&F8gZ2kU9ogcpZ)okXD=ZWRBVKW6SxuAfOr?Q|m9~KzUW;W0wa>2i-`l!Bq4^ zic^1uex})fSoBvFf7%WCrmyITZ)NHvzHku{#wkT;=s|cN{Eg;6zs2f~fOnQQvbI^F z#pe=vE}#ID;Php|6-}x331j{1(*IEV1HuB4s=^yv&bxU|YtnUM+e#b%rqcku5B<|Y zw?ahDQ3sIl+lLEp1O)|&Lh}ps6W$60FPxL|y&&c2??_LMzLz~Y>POH1e;J-IDe{@K V77nqq!sZ8ogN>7Qsg>vDe*j^9=~@5) literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gel/blue_gel.png b/src/main/resources/assets/sextiarysector/textures/items/gel/blue_gel.png new file mode 100644 index 0000000000000000000000000000000000000000..2f780ced602eefe94195e88cc05f86cb2946db86 GIT binary patch literal 412 zcmV;N0b~A&P)a zLLf1zT4)>SZ5=?;dz%tBz1z9x{@;J@IS2mwXnBe1;e{0UJFVXVQo=-iD`sPc-F7}; zAx;4H56%FvEd!?)^7?p#n2iCnG^C)oBxxZ)B%oF`2>cU5?}g97U6M9lQ%kokgR9Fr z=cgtB-b5_vMyUosrO_k5VroZ2Lrc@?St5g8EY;-swXimaR9bg$ngX-WxduFG`0{k>3%n(LAR7U|I!J&h@ZcatPtsOEL zR8$aAgg{kLst%Hm7l+W8q=}AtxA*Qn=iYnnfxixsm(Xgh#M?gG&a5lu0qd1^5dZJd z62AMv;Hr~9fmUlpz_mumZRiF1md`=gANgxVL3OlT3oX Date: Tue, 24 Mar 2015 16:26:12 +0900 Subject: [PATCH 75/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E9=8A=85?= =?UTF-8?q?=E9=89=B1=E7=9F=B3=E3=81=AE=E5=A4=A7=E3=81=8D=E3=81=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/shift/sextiarysector/Config.java | 14 ++- .../java/shift/sextiarysector/SSWorld.java | 14 +-- .../event/WorldEventHandler.java | 91 ++++++++++--------- 3 files changed, 67 insertions(+), 52 deletions(-) diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index a9d68a8..cf80e5d 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -12,6 +12,11 @@ public class Config { //Biome public static int magicDesert; + //World + public static boolean generationCopperOre; + public static boolean generationZincOre; + public static boolean generationSilverOre; + //Player public static boolean peacefulMoisture; public static boolean peacefulStamina; @@ -34,6 +39,7 @@ public static void ConfigRead(FMLPreInitializationEvent event) { cfg.load(); configForBiome(cfg); + configForWorld(cfg); configForPotion(cfg); configForPlayer(cfg); @@ -54,7 +60,13 @@ public static void configForPotion(Configuration cfg) { } public static void configForBiome(Configuration cfg) { - magicDesert = cfg.getInt("MagicDesertID", "biome", 120, 0, 255, ""); + //magicDesert = cfg.getInt("MagicDesertID", "biome", 120, 0, 255, ""); + } + + public static void configForWorld(Configuration cfg) { + generationCopperOre = cfg.getBoolean("GenerationCopperOre", "world", true, ""); + generationZincOre = cfg.getBoolean("GenerationZincOre", "world", true, ""); + generationSilverOre = cfg.getBoolean("GenerationSilverOre", "world", true, ""); } public static void configForPlayer(Configuration cfg) { diff --git a/src/main/java/shift/sextiarysector/SSWorld.java b/src/main/java/shift/sextiarysector/SSWorld.java index 47d1aed..bf07483 100644 --- a/src/main/java/shift/sextiarysector/SSWorld.java +++ b/src/main/java/shift/sextiarysector/SSWorld.java @@ -1,22 +1,18 @@ package shift.sextiarysector; -import static net.minecraftforge.common.BiomeDictionary.Type.*; import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.BiomeDictionary; -import shift.sextiarysector.world.biome.BiomeGenMagicDesert; import cpw.mods.fml.common.event.FMLInitializationEvent; public class SSWorld { - public static BiomeGenBase magicDesert; + public static BiomeGenBase magicDesert; - public static void init(FMLInitializationEvent event) { + public static void init(FMLInitializationEvent event) { - magicDesert = (new BiomeGenMagicDesert(Config.magicDesert)).setColor(0xff0000).setBiomeName("MagicDesert"); + //magicDesert = (new BiomeGenMagicDesert(Config.magicDesert)).setColor(0xff0000).setBiomeName("MagicDesert"); + //BiomeDictionary.registerBiomeType(magicDesert, HOT, DRY, SANDY ,MAGICAL ); - BiomeDictionary.registerBiomeType(magicDesert, HOT, DRY, SANDY ,MAGICAL ); - - } + } } diff --git a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java index 180f214..02cc3e7 100644 --- a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java @@ -1,9 +1,8 @@ package shift.sextiarysector.event; -import static net.minecraftforge.common.BiomeDictionary.Type.*; - import java.util.Random; +import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.feature.WorldGenLakes; @@ -13,6 +12,7 @@ import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.event.terraingen.OreGenEvent; import net.minecraftforge.event.terraingen.PopulateChunkEvent; +import shift.sextiarysector.Config; import shift.sextiarysector.SSBlocks; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -35,6 +35,9 @@ public class WorldEventHandler { private WorldGenLakes springWater; private WorldGenLakes hotSprings; + //バニラ + private WorldGenMinable lapisGen; + private int chunk_X; private int chunk_Z; private World currentWorld; @@ -43,7 +46,7 @@ public class WorldEventHandler { public Random randomGenerato; @SubscribeEvent - public void onOreGenEvent(OreGenEvent.Pre event) { + public void onOreGenEvent(OreGenEvent.Pre event) { this.randomGenerato = event.rand; this.chunk_X = event.worldX; @@ -54,7 +57,7 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.bluestoneGen = new WorldGenMinable(SSBlocks.blueStoneOre, 7); this.yellowstoneGen = new WorldGenMinable(SSBlocks.yellowStoneOre, 7); - copperOreGen = new WorldGenMinable(SSBlocks.copperOre, 14); + copperOreGen = new WorldGenMinable(SSBlocks.copperOre, 10); zincOreGen = new WorldGenMinable(SSBlocks.zincOre, 8); silverOreGen = new WorldGenMinable(SSBlocks.silverOre, 8); @@ -65,17 +68,23 @@ public void onOreGenEvent(OreGenEvent.Pre event) { ironLarge = new WorldGenMinable(SSBlocks.ironLargeOre, 8); goldLarge = new WorldGenMinable(SSBlocks.goldLargeOre, 8); + this.lapisGen = new WorldGenMinable(Blocks.lapis_ore, 6); this.genStandardOre1(8, this.bluestoneGen, 0, 16); this.genStandardOre1(8, this.yellowstoneGen, 0, 16); - this.genStandardOre1(20, this.copperOreGen, 0, 64); - this.genStandardOre1(12, this.zincOreGen, 0, 64); - this.genStandardOre1(2, this.silverOreGen, 0, 32); + if (Config.generationCopperOre) this.genStandardOre1(20, this.copperOreGen, 0, 64); + if (Config.generationZincOre) this.genStandardOre1(12, this.zincOreGen, 0, 64); + if (Config.generationSilverOre) this.genStandardOre1(2, this.silverOreGen, 0, 32); + + if (BiomeDictionary.isBiomeOfType(biome, Type.COLD)) { - if(BiomeDictionary.isBiomeOfType(biome, MAGICAL)){ this.genStandardOre1(4, mithrilOreGen, 0, 32); + + } else if (BiomeDictionary.isBiomeOfType(biome, Type.HOT)) { + this.genStandardOre1(1, orichalcumOreGen, 0, 18); + } this.genStandardOre1(10, this.coaLargeGen, 0, 128); @@ -83,70 +92,68 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.genStandardOre1(1, this.goldLarge, 0, 32); //System.out.println("onOreGenEvent"); + this.genStandardOre1(1, this.lapisGen, 16, 24); + } @SubscribeEvent - public void onPopulateChunkEvent(PopulateChunkEvent.Post event) { + public void onPopulateChunkEvent(PopulateChunkEvent.Post event) { - if(event.world.rand.nextInt(48)==0){ + if (event.world.rand.nextInt(48) == 0) { this.randomGenerato = event.rand; - this.chunk_X = event.chunkX *16; - this.chunk_Z = event.chunkZ *16; + this.chunk_X = event.chunkX * 16; + this.chunk_Z = event.chunkZ * 16; this.currentWorld = event.world; - this.biome = event.world.getBiomeGenForCoords(chunk_X +16, chunk_Z +16); + this.biome = event.world.getBiomeGenForCoords(chunk_X + 16, chunk_Z + 16); this.springWater = new WorldGenLakes(SSBlocks.drinkingWater); - if(BiomeDictionary.isBiomeOfType(biome, Type.FOREST)){ + if (BiomeDictionary.isBiomeOfType(biome, Type.FOREST)) { this.genStandard(1, springWater, 60, 126); } } - if(event.world.rand.nextInt(16)==0){ + if (event.world.rand.nextInt(16) == 0) { this.randomGenerato = event.rand; - this.chunk_X = event.chunkX *16; - this.chunk_Z = event.chunkZ *16; + this.chunk_X = event.chunkX * 16; + this.chunk_Z = event.chunkZ * 16; this.currentWorld = event.world; - this.biome = event.world.getBiomeGenForCoords(chunk_X +16, chunk_Z +16); + this.biome = event.world.getBiomeGenForCoords(chunk_X + 16, chunk_Z + 16); this.hotSprings = new WorldGenLakes(SSBlocks.hotSprings); this.genStandard(1, hotSprings, 20, 58); - } - - } - protected void genStandardOre1(int par1, WorldGenerator par2WorldGenerator, int par3, int par4) - { - for (int l = 0; l < par1; ++l) - { - int i1 = this.chunk_X + this.randomGenerato.nextInt(16); - int j1 = this.randomGenerato.nextInt(par4 - par3) + par3; - int k1 = this.chunk_Z + this.randomGenerato.nextInt(16); - par2WorldGenerator.generate(this.currentWorld, this.randomGenerato, i1, j1, k1); - } - } + { + for (int l = 0; l < par1; ++l) + { + int i1 = this.chunk_X + this.randomGenerato.nextInt(16); + int j1 = this.randomGenerato.nextInt(par4 - par3) + par3; + int k1 = this.chunk_Z + this.randomGenerato.nextInt(16); + par2WorldGenerator.generate(this.currentWorld, this.randomGenerato, i1, j1, k1); + } + } protected void genStandard(int par1, WorldGenerator par2WorldGenerator, int par3, int par4) - { + { for (int l = 0; l < par1; ++l) - { - int i1 = this.chunk_X + this.randomGenerato.nextInt(16); - int j1 = this.randomGenerato.nextInt(par4 - par3) + par3; - int k1 = this.chunk_Z + this.randomGenerato.nextInt(16); - //if(par2WorldGenerator == this.hotSprings)System.out.println("AAA"+"x " +i1 +" z"+k1); - if(par2WorldGenerator.generate(this.currentWorld, this.randomGenerato, i1, j1, k1)){ - } - - } - } + { + int i1 = this.chunk_X + this.randomGenerato.nextInt(16); + int j1 = this.randomGenerato.nextInt(par4 - par3) + par3; + int k1 = this.chunk_Z + this.randomGenerato.nextInt(16); + //if(par2WorldGenerator == this.hotSprings)System.out.println("AAA"+"x " +i1 +" z"+k1); + if (par2WorldGenerator.generate(this.currentWorld, this.randomGenerato, i1, j1, k1)) { + } + + } + } } From 224af17127fb854107995d3a6cb5de88e542724d Mon Sep 17 00:00:00 2001 From: shift02 Date: Wed, 1 Apr 2015 17:19:50 +0900 Subject: [PATCH 76/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E5=A4=A7?= =?UTF-8?q?=E3=81=8D=E3=81=AA=E9=A2=A8=E8=BB=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・大きな風車を追加 ・抽出機を追加 ・GFダイナモを追加 ・酸素タンクを追加 ・MPリングを追加 ・XPリングを追加 --- build.gradle | 2 +- .../java/shift/sextiarysector/Config.java | 2 + .../shift/sextiarysector/SSAchievement.java | 8 +- .../java/shift/sextiarysector/SSBlocks.java | 15 + .../java/shift/sextiarysector/SSFluids.java | 2 + .../shift/sextiarysector/SSGuiHandler.java | 4 + .../java/shift/sextiarysector/SSItems.java | 119 ++++-- .../shift/sextiarysector/SSOreDictionary.java | 5 + .../shift/sextiarysector/SSPlayerTabs.java | 2 +- .../java/shift/sextiarysector/SSRecipes.java | 23 +- .../java/shift/sextiarysector/SSShops.java | 1 + .../shift/sextiarysector/SextiarySector.java | 6 +- .../shift/sextiarysector/api/IEquipment.java | 14 - .../sextiarysector/api/SextiarySectorAPI.java | 14 +- .../api/equipment/EquipmentType.java | 79 ++++ .../api/equipment/IEquipment.java | 18 + .../api/gearforce/item/GearForceItemAPI.java | 137 +++++++ .../gearforce/item/IGearForceGridItem.java | 6 + .../item/IGearForceItem.java | 10 +- .../item/IGearForceItemManager.java | 6 +- .../{machine => gearforce}/item/IHammer.java | 2 +- .../item/ItemGearForce.java | 19 +- .../tileentity}/EnergyStorage.java | 2 +- .../gearforce/tileentity/IEnergyHandler.java | 71 ++++ .../tileentity}/IEnergyStorage.java | 2 +- .../tileentity}/IGearForceGrid.java | 2 +- .../tileentity/IGearForceHandler.java | 70 ++++ .../tileentity}/TileEnergyHandler.java | 19 +- .../api/machine/energy/IEnergyHandler.java | 6 +- .../api/machine/energy/IGFEnergyHandler.java | 10 + .../api/machine/energy/package-info.java | 2 + .../api/machine/item/GearForceItem.java | 7 - .../api/machine/item/IGearForceGridItem.java | 5 - .../api/recipe/IFluidRecipe.java | 22 ++ .../api/recipe/INormalRecipe.java | 54 +++ .../sextiarysector/api/recipe/RecipeAPI.java | 34 ++ .../sextiarysector/block/BlockDirection.java | 2 +- .../sextiarysector/block/BlockFigure.java | 11 +- .../block/BlockFluidFurnace.java | 2 +- .../block/BlockFluidMachineBase.java | 2 +- .../block/BlockFoodSmokers.java | 2 +- .../sextiarysector/block/BlockGFDynamo.java | 37 ++ .../sextiarysector/block/BlockGFTank.java | 4 +- .../sextiarysector/block/BlockGearBox.java | 4 +- .../sextiarysector/block/BlockGearShaft.java | 6 + .../block/BlockLargeWindmill.java | 131 +++++++ .../ContainerFluidGFMachineBase.java | 4 +- .../container/ContainerGFTank.java | 4 +- .../container/ContainerPlayerNext.java | 4 +- .../container/ContainerSimpleMachine.java | 4 +- .../container/InventoryPlayerNext.java | 53 +-- .../container/InventoryRucksack.java | 6 +- .../container/SlotEquipment.java | 4 +- .../sextiarysector/container/SlotFluid.java | 16 +- .../sextiarysector/container/SlotGF.java | 2 +- .../event/ClientEventHandler.java | 39 +- .../event/PlayerUnitEventHandler.java | 52 ++- .../java/shift/sextiarysector/fmp/IShaft.java | 6 +- .../shift/sextiarysector/fmp/ShaftPart.java | 4 +- .../sextiarysector/gui/GuiExtractor.java | 19 + .../gui/tab/InventoryTabEquipment.java | 4 +- .../sextiarysector/gui/tab/TabManager.java | 342 +++++++++--------- .../item/GearForceItemManager.java | 4 +- .../sextiarysector/item/ISSEquipment.java | 2 +- .../item/ItemContactLenses.java | 39 ++ .../item/ItemGFContactLenses.java | 26 +- .../sextiarysector/item/ItemGFHammer.java | 4 +- .../sextiarysector/item/ItemGearStorage.java | 8 +- .../sextiarysector/item/ItemGuiUnit.java | 31 +- .../shift/sextiarysector/item/ItemHammer.java | 2 +- .../sextiarysector/item/ItemOxygenTank.java | 235 ++++++++++++ .../item/ItemProtectionRing.java | 14 + .../shift/sextiarysector/item/ItemRing.java | 37 ++ .../sextiarysector/item/ItemRucksack.java | 47 ++- .../sextiarysector/item/ItemShopRing.java | 15 +- .../shift/sextiarysector/item/ItemUnit.java | 16 +- .../nei/ExtractorRecipeHandler.java | 61 ++++ .../nei/NEISextiarySectorConfig.java | 5 + .../player/CustomPlayerData.java | 1 + .../sextiarysector/player/EquipmentStats.java | 22 +- .../sextiarysector/player/EquipmentType.java | 71 ---- .../plugin/PluginComputerCraft.java | 12 +- .../shift/sextiarysector/plugin/PluginRF.java | 67 ++++ .../sextiarysector/plugin/PluginTcon.java | 51 ++- .../sextiarysector/plugin/SSPlugins.java | 32 ++ .../sextiarysector/proxy/ClientProxy.java | 5 + .../sextiarysector/proxy/CommonProxy.java | 1 + .../recipe/RecipeSimpleFluid.java | 9 +- .../recipe/RecipeSimpleMachine.java | 99 ++--- .../sextiarysector/recipe/RecipesCore.java | 26 ++ .../recipe/RecipesExtractor.java | 20 + .../recipe/RecipesFurnaceCraft.java | 28 ++ .../sextiarysector/recipe/RecipesLoom.java | 12 +- .../sextiarysector/recipe/RecipesMachine.java | 20 + .../recipe/RecipesMillstone.java | 19 +- .../recipe/RecipesSpinningMachine.java | 2 + .../sextiarysector/recipe/RecipesVanilla.java | 22 +- .../renderer/block/RendererGFDynamo.java | 120 ++++++ .../renderer/block/RendererLargeWindmill.java | 118 ++++++ .../renderer/item/RenderGF.java | 6 +- .../renderer/model/ModelGFDynamo.java | 86 +++++ .../renderer/model/ModelLargeWindmill.java | 124 +++++++ .../tileentity/TileEntityElectricMotor.java | 10 +- .../tileentity/TileEntityFan.java | 8 +- .../TileEntityFluidFGFMachineBase.java | 49 ++- .../tileentity/TileEntityGFDynamo.java | 171 +++++++++ .../tileentity/TileEntityGFTank.java | 24 +- .../tileentity/TileEntityGearBox.java | 14 +- .../tileentity/TileEntityGearShaft.java | 12 +- .../tileentity/TileEntityLargeWindmill.java | 123 +++++++ .../tileentity/TileEntityMonitor.java | 8 +- .../tileentity/TileEntityPump.java | 8 +- .../tileentity/TileEntitySaw.java | 8 +- .../tileentity/TileEntityShaft.java | 12 +- .../tileentity/TileEntitySimpleMachine.java | 24 +- .../tileentity/TileEntitySmallWaterwheel.java | 10 +- .../tileentity/TileEntitySmallWindmill.java | 10 +- .../tileentity/TileEntitySteamMotor.java | 201 +++++----- .../tileentity/TileEntityTofuMotor.java | 6 +- .../tileentity/TileEntityWindmill.java | 10 +- .../assets/sextiarysector/lang/en_US.lang | 52 ++- .../textures/blocks/machine/extractor.png | Bin 0 -> 495 bytes .../textures/blocks/ore/orichalcum_ore.png | Bin 539 -> 601 bytes .../textures/guis/machine/extractor.png | Bin 0 -> 2051 bytes .../textures/guis/machine/extractor_nei.png | Bin 0 -> 2180 bytes .../guis/machine/mana_squeezer_nei.png | Bin 2235 -> 2174 bytes .../items/face/water_contact_lenses.png | Bin 0 -> 378 bytes .../textures/items/loom/string_mass.png | Bin 0 -> 180 bytes .../textures/items/loom/strong_canvas.png | Bin 0 -> 505 bytes .../textures/items/loom/strong_cloth.png | Bin 0 -> 457 bytes .../{string_strong.png => strong_string.png} | Bin ...ng_bobbin.png => strong_string_bobbin.png} | Bin .../textures/items/oxygen_tank.png | Bin 0 -> 591 bytes .../textures/items/ring/mp_ring.png | Bin 0 -> 344 bytes .../textures/items/ring/xp_ring.png | Bin 0 -> 339 bytes .../textures/models/gf_dynamo.png | Bin 0 -> 3486 bytes .../textures/models/large_windmill.png | Bin 0 -> 5926 bytes 137 files changed, 3040 insertions(+), 803 deletions(-) delete mode 100644 src/main/java/shift/sextiarysector/api/IEquipment.java create mode 100644 src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java create mode 100644 src/main/java/shift/sextiarysector/api/equipment/IEquipment.java create mode 100644 src/main/java/shift/sextiarysector/api/gearforce/item/GearForceItemAPI.java create mode 100644 src/main/java/shift/sextiarysector/api/gearforce/item/IGearForceGridItem.java rename src/main/java/shift/sextiarysector/api/{machine => gearforce}/item/IGearForceItem.java (74%) rename src/main/java/shift/sextiarysector/api/{machine => gearforce}/item/IGearForceItemManager.java (92%) rename src/main/java/shift/sextiarysector/api/{machine => gearforce}/item/IHammer.java (84%) rename src/main/java/shift/sextiarysector/api/{machine => gearforce}/item/ItemGearForce.java (77%) rename src/main/java/shift/sextiarysector/api/{machine/energy => gearforce/tileentity}/EnergyStorage.java (98%) create mode 100644 src/main/java/shift/sextiarysector/api/gearforce/tileentity/IEnergyHandler.java rename src/main/java/shift/sextiarysector/api/{machine/energy => gearforce/tileentity}/IEnergyStorage.java (95%) rename src/main/java/shift/sextiarysector/api/{machine/energy => gearforce/tileentity}/IGearForceGrid.java (75%) create mode 100644 src/main/java/shift/sextiarysector/api/gearforce/tileentity/IGearForceHandler.java rename src/main/java/shift/sextiarysector/api/{machine/energy => gearforce/tileentity}/TileEnergyHandler.java (79%) create mode 100644 src/main/java/shift/sextiarysector/api/machine/energy/package-info.java delete mode 100644 src/main/java/shift/sextiarysector/api/machine/item/GearForceItem.java delete mode 100644 src/main/java/shift/sextiarysector/api/machine/item/IGearForceGridItem.java create mode 100644 src/main/java/shift/sextiarysector/api/recipe/IFluidRecipe.java create mode 100644 src/main/java/shift/sextiarysector/api/recipe/INormalRecipe.java create mode 100644 src/main/java/shift/sextiarysector/api/recipe/RecipeAPI.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockGFDynamo.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockLargeWindmill.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiExtractor.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemContactLenses.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemOxygenTank.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemProtectionRing.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemRing.java create mode 100644 src/main/java/shift/sextiarysector/nei/ExtractorRecipeHandler.java delete mode 100644 src/main/java/shift/sextiarysector/player/EquipmentType.java create mode 100644 src/main/java/shift/sextiarysector/plugin/PluginRF.java create mode 100644 src/main/java/shift/sextiarysector/recipe/RecipesExtractor.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererGFDynamo.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererLargeWindmill.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelGFDynamo.java create mode 100644 src/main/java/shift/sextiarysector/renderer/model/ModelLargeWindmill.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityGFDynamo.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityLargeWindmill.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/extractor.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/extractor.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/machine/extractor_nei.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/face/water_contact_lenses.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/string_mass.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/strong_canvas.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/strong_cloth.png rename src/main/resources/assets/sextiarysector/textures/items/loom/{string_strong.png => strong_string.png} (100%) rename src/main/resources/assets/sextiarysector/textures/items/loom/{string_strong_bobbin.png => strong_string_bobbin.png} (100%) create mode 100644 src/main/resources/assets/sextiarysector/textures/items/oxygen_tank.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ring/mp_ring.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ring/xp_ring.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/gf_dynamo.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/large_windmill.png diff --git a/build.gradle b/build.gradle index 1856c55..ed98a29 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.1.9.a-${project.minecraft.version}" +version = "2.2.0.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index cf80e5d..4975aad 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -30,6 +30,7 @@ public class Config { public static boolean modTcon; public static boolean modCleaver; public static boolean modFMP; + public static boolean modRF; public static void ConfigRead(FMLPreInitializationEvent event) { @@ -84,6 +85,7 @@ public static void configForPlugin(Configuration cfg) { modTcon = cfg.getBoolean("Tcon", "general", true, ""); modCleaver = cfg.getBoolean("Cleaver", "general", true, ""); modFMP = cfg.getBoolean("ForgeMultipart", "general", true, ""); + modRF = cfg.getBoolean("RF", "general", true, ""); } diff --git a/src/main/java/shift/sextiarysector/SSAchievement.java b/src/main/java/shift/sextiarysector/SSAchievement.java index 8620d2d..8ff69ac 100644 --- a/src/main/java/shift/sextiarysector/SSAchievement.java +++ b/src/main/java/shift/sextiarysector/SSAchievement.java @@ -92,7 +92,9 @@ public class SSAchievement { //3 public static Achievement steelGear; public static Achievement steamMotor; + public static Achievement largeWindmill; public static Achievement pulverizer; + public static Achievement extractor; public static Achievement fan; public static Achievement saw; @@ -191,9 +193,11 @@ public static void initAchievements() { steelGear = new AchievementCraft("steel_gear", 4, 0, new ItemStack(SSItems.steelGear), stoneGear, industry).registerStat(); steamMotor = new AchievementCraft("steam_motor", 5, -2, new ItemStack(SSBlocks.steamMotor), steelGear, industry).registerStat(); + largeWindmill = new AchievementCraft("large_windmill", 5, -3, new ItemStack(SSBlocks.largeWindmill), steelGear, industry).registerStat(); pulverizer = new AchievementCraft("pulverizer", 5, 2, new ItemStack(SSBlocks.pulverizer), steelGear, industry).registerStat(); - fan = new AchievementCraft("fan", 5, 4, new ItemStack(SSBlocks.fan), steelGear, industry).registerStat(); - saw = new AchievementCraft("saw", 5, 5, new ItemStack(SSBlocks.saw), steelGear, industry).registerStat(); + extractor = new AchievementCraft("extractor", 5, 3, new ItemStack(SSBlocks.extractor), steelGear, industry).registerStat(); + fan = new AchievementCraft("fan", 5, 5, new ItemStack(SSBlocks.fan), steelGear, industry).registerStat(); + saw = new AchievementCraft("saw", 5, 6, new ItemStack(SSBlocks.saw), steelGear, industry).registerStat(); ninjaGear = new AchievementCraft("ninja_gear", 7, 0, new ItemStack(SSItems.ninjaGear), steelGear, industry).registerStat(); rollingMachine = new AchievementCraft("rolling_machine", 8, 2, new ItemStack(SSBlocks.rollingMachine), ninjaGear, industry).registerStat(); diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 0b85852..60eadef 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -25,6 +25,7 @@ import shift.sextiarysector.block.BlockHotSprings; import shift.sextiarysector.block.BlockLargeFurnace; import shift.sextiarysector.block.BlockLargeOre; +import shift.sextiarysector.block.BlockLargeWindmill; import shift.sextiarysector.block.BlockMagiFurnace; import shift.sextiarysector.block.BlockMonitor; import shift.sextiarysector.block.BlockPaddy; @@ -75,6 +76,7 @@ import shift.sextiarysector.tileentity.TileEntityGearBox; import shift.sextiarysector.tileentity.TileEntityGearShaft; import shift.sextiarysector.tileentity.TileEntityLargeFurnace; +import shift.sextiarysector.tileentity.TileEntityLargeWindmill; import shift.sextiarysector.tileentity.TileEntityMagicFurnace; import shift.sextiarysector.tileentity.TileEntityMonitor; import shift.sextiarysector.tileentity.TileEntityPaddy; @@ -157,16 +159,20 @@ public class SSBlocks { public static Block steelNinjaGearShaft; public static Block ninjaOrichalcumGearShaft; + //発電 public static Block smallWindmill; public static Block windmill; + public static Block largeWindmill; public static Block smallWaterwheel; public static Block steamMotor; + //機械 public static Block millstone; public static Block loom; public static Block sawmill; public static Block spinningMachine; + public static Block extractor; public static Block pump; @@ -454,6 +460,7 @@ public static void initBlicks() { ninjaOrichalcumGearShaft = new BlockGearShaft(4).setBlockName("ss.ninja_orichalcum_gear_shaft").setBlockTextureName("planks_oak").setStepSound(Block.soundTypeWood); GameRegistry.registerBlock(ninjaOrichalcumGearShaft, ItemBlockGearShaft.class, "NinjaOrichalcumGearShaft"); + //発電 smallWindmill = new BlockSmallWindmill().setBlockName("ss.small_windmill").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerTileEntity(TileEntitySmallWindmill.class, "SmallWindmill"); GameRegistry.registerBlock(smallWindmill, "SmallWindmill"); @@ -462,6 +469,10 @@ public static void initBlicks() { GameRegistry.registerTileEntity(TileEntityWindmill.class, "Windmill"); GameRegistry.registerBlock(windmill, "Windmill"); + largeWindmill = new BlockLargeWindmill().setBlockName("ss.large_windmill").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerTileEntity(TileEntityLargeWindmill.class, "LargeWindmill"); + GameRegistry.registerBlock(largeWindmill, "LargeWindmill"); + smallWaterwheel = new BlockSmallWaterwheel().setBlockName("ss.small_waterwheel").setBlockTextureName("planks_oak").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerTileEntity(TileEntitySmallWaterwheel.class, "SmallWaterwheel"); GameRegistry.registerBlock(smallWaterwheel, "SmallWaterwheel"); @@ -470,6 +481,7 @@ public static void initBlicks() { GameRegistry.registerTileEntity(TileEntitySteamMotor.class, "SteamMotor"); GameRegistry.registerBlock(steamMotor, ItemBlockDirection.class, "SteamMotor"); + //機械 GameRegistry.registerTileEntity(TileEntitySimpleMachine.class, "SimpleMachine"); GameRegistry.registerTileEntity(TileEntityFluidFGFMachineBase.class, "FluidFGFMachine"); @@ -492,6 +504,9 @@ public static void initBlicks() { pulverizer = new BlockSimpleMachine("pulverizer", 30, SSRecipes.pulverizer, 3).setBlockName("ss.pulverizer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(pulverizer, "Pulverizer"); + extractor = new BlockFluidFGFMachine("extractor", 31, SSRecipes.extractor, 3).setBlockName("ss.extractor").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerBlock(extractor, "Extractor"); + fan = new BlockFan().setBlockName("ss.fan").setBlockTextureName("stone"); GameRegistry.registerTileEntity(TileEntityFan.class, "Fan"); GameRegistry.registerBlock(fan, ItemBlockDirection.class, "Fan"); diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index 2ff3b54..85e80a2 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -19,6 +19,7 @@ public class SSFluids { public static Fluid steam; public static Fluid mana; + public static Fluid oxygen; public static Fluid season; public static Fluid sap; @@ -35,6 +36,7 @@ public static void initFluids() { steam = new SSFluid("Steam", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("steam").setGaseous(true); mana = new SSFluid("Mana", 1, 0x7CF4E4, 1, 1.0f).setUnlocalizedName("mana").setGaseous(true); + oxygen = new SSFluid("Oxygen", 0, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("oxygen").setGaseous(true); //season = new SSFluid("season", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("season").setDensity(-10).setGaseous(true); sap = new SSFluid("Sap", 2, 0xFF7F50, 1, 1.0f).setUnlocalizedName("sap"); diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index d68929a..b7d927f 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -19,6 +19,7 @@ import shift.sextiarysector.container.ContainerSteamMotor; import shift.sextiarysector.container.ContainerTabWorkbench; import shift.sextiarysector.gui.GuiCraftFurnace; +import shift.sextiarysector.gui.GuiExtractor; import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiFoodSmokers; import shift.sextiarysector.gui.GuiFreezer; @@ -95,6 +96,7 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world, int case 40: return new ContainerSimpleMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 31: case 36: return new ContainerFluidGFMachineBase(player.inventory, (TileEntityFluidFGFMachineBase) world.getTileEntity(x, y, z)); @@ -187,6 +189,8 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int case 30: return new GuiPulverizer(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); + case 31: + return new GuiExtractor(player.inventory, (TileEntityFluidFGFMachineBase) world.getTileEntity(x, y, z)); case 35: return new GuiRollingMachine(player.inventory, (TileEntitySimpleMachine) world.getTileEntity(x, y, z)); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 70d510a..1a8ac2b 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -11,6 +11,7 @@ import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.item.ItemBottle; import shift.sextiarysector.item.ItemCalendar; +import shift.sextiarysector.item.ItemContactLenses; import shift.sextiarysector.item.ItemCrop; import shift.sextiarysector.item.ItemDrink; import shift.sextiarysector.item.ItemFigureBox; @@ -25,6 +26,8 @@ import shift.sextiarysector.item.ItemLavaBottle; import shift.sextiarysector.item.ItemMineboat; import shift.sextiarysector.item.ItemMineboatTank; +import shift.sextiarysector.item.ItemOxygenTank; +import shift.sextiarysector.item.ItemProtectionRing; import shift.sextiarysector.item.ItemRucksack; import shift.sextiarysector.item.ItemSSArmor; import shift.sextiarysector.item.ItemSSAxe; @@ -119,20 +122,6 @@ public class SSItems { public static Item ironFluidBucket; public static Item goldFluidBucket; - //unit - public static Item craftUnit; - - public static Item attackUnit; - public static Item defenseUnit; - public static Item attackRustUnit; - public static Item defenseRustUnit; - - public static Item pickaxeUnit; - - //ring - public static Item ironRing; - public static Item creeperRing; - //魔法 public static Item magicDust; @@ -143,6 +132,11 @@ public class SSItems { public static Item canvas; public static Item dryingFlesh; public static Item fleshBobbin; + public static Item stringMass; + public static Item strongString; + public static Item strongStringBobbin; + public static Item strongCloth; + public static Item strongCanvas; //public static Item bottle; @@ -244,7 +238,25 @@ public class SSItems { public static Item shiftHat; public static Item rucksack; + public static Item oxygenTank; public static Item gfContactLenses; + public static Item waterContactLenses; + + //unit + public static Item craftUnit; + + public static Item attackUnit; + public static Item defenseUnit; + public static Item attackRustUnit; + public static Item defenseRustUnit; + + public static Item pickaxeUnit; + + //リング + public static Item ironRing; + public static Item creeperRing; + public static Item mpRing; + public static Item xpRing; public static void initItems() { @@ -408,32 +420,6 @@ public static void initItems() { goldFluidBucket = new ItemSimpleBucket().setUnlocalizedName("ss.gold_fluid_bucket").setTextureName("sextiarysector:fluid/gold_fluid_bucket"); GameRegistry.registerItem(goldFluidBucket, "GoldFluidBucket"); - //Unit - craftUnit = new ItemGuiUnit(201).setUnlocalizedName("ss.craft_unit").setTextureName("sextiarysector:unit/craft_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); - GameRegistry.registerItem(craftUnit, "CraftUnit"); - - attackUnit = new ItemUnit().setUnlocalizedName("ss.attack_unit").setTextureName("sextiarysector:unit/attack_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); - GameRegistry.registerItem(attackUnit, "AttackUnit"); - - defenseUnit = new ItemUnit().setUnlocalizedName("ss.defense_unit").setTextureName("sextiarysector:unit/defense_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); - GameRegistry.registerItem(defenseUnit, "DefenseUnit"); - - attackRustUnit = new ItemUnit().setUnlocalizedName("ss.attack_rust_unit").setTextureName("sextiarysector:unit/attack_rust_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); - GameRegistry.registerItem(attackRustUnit, "AttackRustUnit"); - - defenseRustUnit = new ItemUnit().setUnlocalizedName("ss.defense_rust_unit").setTextureName("sextiarysector:unit/defense_rust_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); - GameRegistry.registerItem(defenseRustUnit, "DefenseRustUnit"); - - pickaxeUnit = new ItemUnit().setUnlocalizedName("ss.pickaxe_unit").setTextureName("sextiarysector:unit/pickaxe_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); - GameRegistry.registerItem(pickaxeUnit, "PickaxeUnit"); - - //Ring - ironRing = new Item().setUnlocalizedName("ss.iron_ring").setTextureName("sextiarysector:ring/iron_ring").setCreativeTab(SextiarySectorAPI.TabSSPlayer); - GameRegistry.registerItem(ironRing, "IronRing"); - - creeperRing = new ItemShopRing().setUnlocalizedName("ss.creeper_ring").setTextureName("sextiarysector:ring/creeper_ring"); - GameRegistry.registerItem(creeperRing, "CreeperRing"); - //魔法 magicDust = new Item().setUnlocalizedName("ss.magic_dust").setTextureName("sextiarysector:dust/magic_dust").setCreativeTab(SextiarySectorAPI.TabSSMagic); GameRegistry.registerItem(magicDust, "MagicDust"); @@ -457,6 +443,21 @@ public static void initItems() { fleshBobbin = new Item().setUnlocalizedName("ss.flesh_bobbin").setTextureName("sextiarysector:loom/flesh_bobbin").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(fleshBobbin, "FleshBobbin"); + stringMass = new Item().setUnlocalizedName("ss.string_mass").setTextureName("sextiarysector:loom/string_mass").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(stringMass, "StringMass"); + + strongString = new Item().setUnlocalizedName("ss.strong_string").setTextureName("sextiarysector:loom/strong_string").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(strongString, "StrongString"); + + strongStringBobbin = new Item().setUnlocalizedName("ss.strong_string_bobbin").setTextureName("sextiarysector:loom/strong_string_bobbin").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(strongStringBobbin, "StrongStringBobbin"); + + strongCloth = new Item().setUnlocalizedName("ss.strong_cloth").setTextureName("sextiarysector:loom/strong_cloth").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(strongCloth, "StrongCloth"); + + strongCanvas = new Item().setUnlocalizedName("ss.strong_canvas").setTextureName("sextiarysector:loom/strong_canvas").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(strongCanvas, "StrongCanvas"); + //bottle = new ItemBlockBottle().setUnlocalizedName("ss.bottle").setTextureName("sextiarysector:drink/empty_bottle"); //GameRegistry.registerItem(bottle, "Bottle"); @@ -632,9 +633,47 @@ public static void initItems() { rucksack = new ItemRucksack().setUnlocalizedName("ss.rucksack").setTextureName("sextiarysector:rucksack"); GameRegistry.registerItem(rucksack, "Rucksack"); + oxygenTank = new ItemOxygenTank().setUnlocalizedName("ss.oxygen_tank").setTextureName("sextiarysector:oxygen_tank").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(oxygenTank, "OxygenTank"); + gfContactLenses = new ItemGFContactLenses().setUnlocalizedName("ss.gf_contact_lenses").setTextureName("sextiarysector:face/gf_contact_lenses"); GameRegistry.registerItem(gfContactLenses, "GFContactLenses"); + waterContactLenses = new ItemContactLenses().setUnlocalizedName("ss.water_contact_lenses").setTextureName("sextiarysector:face/water_contact_lenses"); + GameRegistry.registerItem(waterContactLenses, "WaterContactLenses"); + + //Unit + craftUnit = new ItemGuiUnit(201).setUnlocalizedName("ss.craft_unit").setTextureName("sextiarysector:unit/craft_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(craftUnit, "CraftUnit"); + + attackUnit = new ItemUnit().setUnlocalizedName("ss.attack_unit").setTextureName("sextiarysector:unit/attack_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(attackUnit, "AttackUnit"); + + defenseUnit = new ItemUnit().setUnlocalizedName("ss.defense_unit").setTextureName("sextiarysector:unit/defense_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(defenseUnit, "DefenseUnit"); + + attackRustUnit = new ItemUnit().setUnlocalizedName("ss.attack_rust_unit").setTextureName("sextiarysector:unit/attack_rust_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(attackRustUnit, "AttackRustUnit"); + + defenseRustUnit = new ItemUnit().setUnlocalizedName("ss.defense_rust_unit").setTextureName("sextiarysector:unit/defense_rust_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(defenseRustUnit, "DefenseRustUnit"); + + pickaxeUnit = new ItemUnit().setUnlocalizedName("ss.pickaxe_unit").setTextureName("sextiarysector:unit/pickaxe_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(pickaxeUnit, "PickaxeUnit"); + + //Ring + ironRing = new Item().setUnlocalizedName("ss.iron_ring").setTextureName("sextiarysector:ring/iron_ring").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(ironRing, "IronRing"); + + creeperRing = new ItemShopRing().setUnlocalizedName("ss.creeper_ring").setTextureName("sextiarysector:ring/creeper_ring"); + GameRegistry.registerItem(creeperRing, "CreeperRing"); + + mpRing = new ItemProtectionRing().setUnlocalizedName("ss.mp_ring").setTextureName("sextiarysector:ring/mp_ring").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(mpRing, "MPRing"); + + xpRing = new ItemProtectionRing().setUnlocalizedName("ss.xp_ring").setTextureName("sextiarysector:ring/xp_ring").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(xpRing, "XPRing"); + } } diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index a9b70b1..3bccc99 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -28,6 +28,9 @@ public static void init() { OreDictionary.registerOre("containerWoodBowl", Items.bowl); OreDictionary.registerOre("containerBucket", Items.bucket); + OreDictionary.registerOre("containerBottle", Items.glass_bottle); + + OreDictionary.registerOre("dustRedstone", Items.redstone); OreDictionary.registerOre("craftingString", new ItemStack(Items.string, 1, 0)); @@ -129,6 +132,8 @@ public static void init() { OreDictionary.registerOre("slimeball", new ItemStack(SSItems.sapBottle)); OreDictionary.registerOre("slimeball", new ItemStack(SSBlocks.fluidCrafter, 1, SSFluids.sap.getID())); + OreDictionary.registerOre("containerBottle", new ItemStack(SSItems.emptyBottle)); + //食べ物 OreDictionary.registerOre("condimentCurryPowder", SSItems.curryPowder); diff --git a/src/main/java/shift/sextiarysector/SSPlayerTabs.java b/src/main/java/shift/sextiarysector/SSPlayerTabs.java index 88549b7..b78006c 100644 --- a/src/main/java/shift/sextiarysector/SSPlayerTabs.java +++ b/src/main/java/shift/sextiarysector/SSPlayerTabs.java @@ -1,12 +1,12 @@ package shift.sextiarysector; import net.minecraft.item.ItemStack; +import shift.sextiarysector.api.equipment.EquipmentType; import shift.sextiarysector.gui.tab.AbstractTab; import shift.sextiarysector.gui.tab.InventoryTabEquipment; import shift.sextiarysector.gui.tab.InventoryTabSS; import shift.sextiarysector.gui.tab.TabManager; import shift.sextiarysector.item.ItemShopRing; -import shift.sextiarysector.player.EquipmentType; public class SSPlayerTabs { diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index e165e96..d0bf12a 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -5,12 +5,14 @@ import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.ShapedRecipes; +import shift.sextiarysector.api.recipe.RecipeAPI; import shift.sextiarysector.recipe.FurnaceCraftingManager; import shift.sextiarysector.recipe.RecipeSimpleFluid; import shift.sextiarysector.recipe.RecipeSimpleFuel; import shift.sextiarysector.recipe.RecipeSimpleMachine; import shift.sextiarysector.recipe.RecipesArmor; import shift.sextiarysector.recipe.RecipesCore; +import shift.sextiarysector.recipe.RecipesExtractor; import shift.sextiarysector.recipe.RecipesFluidFurnace; import shift.sextiarysector.recipe.RecipesFoodSmokers; import shift.sextiarysector.recipe.RecipesFreezer; @@ -46,6 +48,7 @@ public class SSRecipes { public static RecipeSimpleMachine loom; public static RecipeSimpleMachine sawmill; public static RecipeSimpleMachine spinning_machine; + public static RecipeSimpleFluid extractor; public static RecipeSimpleMachine pulverizer; public static RecipeSimpleMachine rollingMachine; public static RecipeSimpleFluid manaSqueezer; @@ -61,14 +64,16 @@ public static void initRecipeLists() { magicFuel = new RecipeSimpleFuel(); iceFuel = new RecipeSimpleFuel(); - millstone = new RecipeSimpleMachine(); - loom = new RecipeSimpleMachine(); - sawmill = new RecipeSimpleMachine(); - spinning_machine = new RecipeSimpleMachine(); - pulverizer = new RecipeSimpleMachine(); - rollingMachine = new RecipeSimpleMachine(); - manaSqueezer = new RecipeSimpleFluid(); - timeMachine = new RecipeSimpleMachine(); + RecipeAPI.millstone = millstone = new RecipeSimpleMachine(); + RecipeAPI.loom = loom = new RecipeSimpleMachine(); + RecipeAPI.sawmill = sawmill = new RecipeSimpleMachine(); + RecipeAPI.spinning_machine = spinning_machine = new RecipeSimpleMachine(); + RecipeAPI.extractor = extractor = new RecipeSimpleFluid(); + RecipeAPI.pulverizer = pulverizer = new RecipeSimpleMachine(); + RecipeAPI.rollingMachine = rollingMachine = new RecipeSimpleMachine(); + RecipeAPI.manaSqueezer = manaSqueezer = new RecipeSimpleFluid(); + RecipeAPI.timeMachine = timeMachine = new RecipeSimpleMachine(); + } public static void initRecipes() { @@ -106,6 +111,8 @@ public static void initRecipes() { RecipesSpinningMachine.addRecipes(spinning_machine); + RecipesExtractor.addRecipes(extractor); + RecipesPulverizer.addRecipes(pulverizer); RecipesRollingMachine.addRecipes(rollingMachine); diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index 30ae6ae..e416098 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -66,6 +66,7 @@ public static void initShops() { creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.corn, 1), 740)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.magicDust, 4), 500)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.waterContactLenses, 1), 700)); } if (i == 2) { diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 72f8d4f..2aa4dbe 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -7,7 +7,7 @@ import shift.mceconomy2.gui.HUDMP; import shift.sextiarysector.api.SextiarySectorAPI; -import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.api.gearforce.item.GearForceItemAPI; import shift.sextiarysector.item.GearForceItemManager; import shift.sextiarysector.module.IModule; import shift.sextiarysector.module.ModuleAgriculture; @@ -36,7 +36,7 @@ public class SextiarySector { public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.1.9"; + public static final String VERSION = "2.2.0"; @Mod.Instance("SextiarySector") public static SextiarySector instance; @@ -64,7 +64,7 @@ public void preInit(FMLPreInitializationEvent event) SSEvents.preInit(event); - GearForceItem.manager = new GearForceItemManager(); + GearForceItemAPI.manager = new GearForceItemManager(); //Module modules.add(ModuleStatistics.getInstance()); diff --git a/src/main/java/shift/sextiarysector/api/IEquipment.java b/src/main/java/shift/sextiarysector/api/IEquipment.java deleted file mode 100644 index f4ae482..0000000 --- a/src/main/java/shift/sextiarysector/api/IEquipment.java +++ /dev/null @@ -1,14 +0,0 @@ -package shift.sextiarysector.api; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import shift.sextiarysector.player.EquipmentType; - -public interface IEquipment { - - boolean canTakeStack(EquipmentType equipment,ItemStack stack, EntityPlayer player); - - boolean isItemValid(EquipmentType equipment, ItemStack stack); - - -} diff --git a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java index 964a6f0..40f76ba 100644 --- a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java +++ b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java @@ -31,10 +31,7 @@ public class SextiarySectorAPI { * IPlayerManager Player関係のインターフェース
* このインスタンスから操作をしてください。 */ - public static IPlayerManager playerManager ; - - - + public static IPlayerManager playerManager; /* * ----------------------- @@ -42,7 +39,7 @@ public class SextiarySectorAPI { *------------------------ */ - //メモ MAX水分 20 , MAXスタミナ 1000 + //メモ MAX水分 20 , MAXスタミナ 100 /** * addMoistureStats プレイヤーの水分ゲージを回復します @@ -59,7 +56,7 @@ public static void addMoistureStats(EntityPlayer entityPlayer, int par1, float p * @param entityPlayer プレイヤー * @param amount 減らす量(4.0fで1) */ - public static void addMoistureExhaustion(EntityPlayer entityPlayer, float amount){ + public static void addMoistureExhaustion(EntityPlayer entityPlayer, float amount) { playerManager.addMoistureExhaustion(entityPlayer, amount); } @@ -69,7 +66,7 @@ public static void addMoistureExhaustion(EntityPlayer entityPlayer, float amount * @param par1 スタミナ * @param par2 隠しスタミナ */ - public static void addStaminaStats(EntityPlayer entityPlayer, int par1, float par2){ + public static void addStaminaStats(EntityPlayer entityPlayer, int par1, float par2) { playerManager.addStaminaStats(entityPlayer, par1, par2); } @@ -78,9 +75,8 @@ public static void addStaminaStats(EntityPlayer entityPlayer, int par1, float pa * @param entityPlayer プレイヤー * @param amount 減らす量(4.0fで1) */ - public static void addStaminaExhaustion(EntityPlayer entityPlayer, float amount){ + public static void addStaminaExhaustion(EntityPlayer entityPlayer, float amount) { playerManager.addStaminaExhaustion(entityPlayer, amount); } - } diff --git a/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java b/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java new file mode 100644 index 0000000..433d1e7 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java @@ -0,0 +1,79 @@ +package shift.sextiarysector.api.equipment; + +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; + +public enum EquipmentType { + + Necklace("necklace", new int[] { 0 }), + Ring("ring", new int[] { 1, 2, 3 }), + Face("face", new int[] { 4 }), + Bag("bag", new int[] { 5 }), + Hand("hand", new int[] { 6 }), + Belt("belt", new int[] { 7 }), + Unit("unit", new int[] { 8, 9, 10, 11, 12, 13, 14, 15 }), + Other("other", new int[] { 16, 17, 18, 19 }); + + private IIcon icon; + private String iconName; + private int[] slot; + + EquipmentType(String name, int[] slot) { + this.iconName = name; + this.slot = slot; + } + + public void registerIcon(TextureMap map) { + this.setIcon(map.registerIcon("sextiarysector:gui/slot_" + this.iconName)); + } + + public IIcon getIcon() { + return icon; + } + + public void setIcon(IIcon icon) { + this.icon = icon; + } + + public int[] getSlots() { + return this.slot; + } + + public int getSlot(int id) { + return this.slot[id]; + } + + public static EquipmentType getEquipmentTypeFromSlot(int slot) { + + switch (slot) { + case 0: + return Necklace; + + case 1: + case 2: + case 3: + return Ring; + + case 4: + return Face; + case 5: + return Bag; + case 6: + return Hand; + case 7: + return Belt; + + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + return Unit; + } + return Other; + } + +} diff --git a/src/main/java/shift/sextiarysector/api/equipment/IEquipment.java b/src/main/java/shift/sextiarysector/api/equipment/IEquipment.java new file mode 100644 index 0000000..7638ada --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/equipment/IEquipment.java @@ -0,0 +1,18 @@ +package shift.sextiarysector.api.equipment; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IEquipment { + + boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player); + + boolean isItemValid(EquipmentType equipment, ItemStack stack); + + void onUpdate(EquipmentType equipment, ItemStack stack, World world, Entity player, int slot); + + boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player); + +} diff --git a/src/main/java/shift/sextiarysector/api/gearforce/item/GearForceItemAPI.java b/src/main/java/shift/sextiarysector/api/gearforce/item/GearForceItemAPI.java new file mode 100644 index 0000000..4e6567e --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/gearforce/item/GearForceItemAPI.java @@ -0,0 +1,137 @@ +package shift.sextiarysector.api.gearforce.item; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + +/** + * IGearForceItemを実装したアイテムのGFを実際に操作するClass + * @version 1.0.0 + * @author Shift02 + * + */ +public class GearForceItemAPI { + + public static IGearForceItemManager manager; + + /** + * + * アイテムにGFを追加する + * + * @param itemStack GFを追加するアイテム + * @param power パワー + * @param speed スピード + * @param simulate シミュレーションかどうか trueだと追加はされません(結果は戻ってきます) + * @return 追加できたスピード + */ + public static int addEnergy(ItemStack itemStack, int power, int speed, boolean simulate) { + return manager.addEnergy(itemStack, power, speed, simulate); + } + + /** + * + * アイテムからGFを減らす + * + * @param itemStack GFを減らすアイテム + * @param power パワー + * @param speed スピード + * @param simulate シミュレーションかどうか trueだと追加はされません(結果は戻ってきます) + * @return 減らせれたスピード + */ + public static int reduceEnergy(ItemStack itemStack, int power, int speed, boolean simulate) { + return manager.reduceEnergy(itemStack, power, speed, simulate); + } + + /** + * + * アイテムのパワーの最大値を取得する + * + * @param itemStack 取得するアイテム + * @return パワー + */ + public static int getMaxPower(ItemStack itemStack) { + return ((IGearForceItem) itemStack.getItem()).getMaxPower(itemStack); + } + + /** + * + * アイテムのスピードの最大値(容量)を取得する + * + * @param itemStack 取得するアイテム + * @return スピード + */ + public static int getMaxSpeed(ItemStack itemStack) { + return ((IGearForceItem) itemStack.getItem()).getMaxSpeed(itemStack); + } + + /** + * + * アイテムの現在のパワーを取得する + * + * @param itemStack 取得するアイテム + * @return パワー + */ + public static int getPower(ItemStack itemStack) { + return manager.getPower(itemStack); + } + + /** + * + * アイテムの現在のスピードを取得する + * + * @param itemStack 取得するアイテム + * @return スピード + */ + public static int getSpeed(ItemStack itemStack) { + return manager.getSpeed(itemStack); + } + + /** + * + * アイテムにパワーとスピードをセットする + * + * @param itemStack + * @param power + * @param speed + * @return セット出来ればtrue + */ + public static boolean setEnergy(ItemStack itemStack, int power, int speed) { + return manager.setEnergy(itemStack, power, speed); + } + + /** + * + * アイテムがspeedを消費出来るか + * + * @param itemStack + * @param speed + * @return speed以上のエネルギーがあればtrue + */ + public static boolean canUse(ItemStack itemStack, int speed) { + return manager.canUse(itemStack, speed); + } + + /** + * + * アイテムを使用する時に呼ぶ + * + * @param itemStack + * @param speed + * @param entity + * @return + */ + public static boolean use(ItemStack itemStack, int speed, EntityLivingBase entity) { + return manager.use(itemStack, speed, entity); + } + + /** + * + * itemStackがGFを扱うことが出来るかどうか + * + * @param itemStack + * @return + */ + public static boolean isGearForceItem(ItemStack itemStack) { + return manager.isGearForceItem(itemStack); + } + +} diff --git a/src/main/java/shift/sextiarysector/api/gearforce/item/IGearForceGridItem.java b/src/main/java/shift/sextiarysector/api/gearforce/item/IGearForceGridItem.java new file mode 100644 index 0000000..981618d --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/gearforce/item/IGearForceGridItem.java @@ -0,0 +1,6 @@ +package shift.sextiarysector.api.gearforce.item; + +//TODO +public interface IGearForceGridItem { + +} diff --git a/src/main/java/shift/sextiarysector/api/machine/item/IGearForceItem.java b/src/main/java/shift/sextiarysector/api/gearforce/item/IGearForceItem.java similarity index 74% rename from src/main/java/shift/sextiarysector/api/machine/item/IGearForceItem.java rename to src/main/java/shift/sextiarysector/api/gearforce/item/IGearForceItem.java index 4b779d7..51e6af9 100644 --- a/src/main/java/shift/sextiarysector/api/machine/item/IGearForceItem.java +++ b/src/main/java/shift/sextiarysector/api/gearforce/item/IGearForceItem.java @@ -1,4 +1,4 @@ -package shift.sextiarysector.api.machine.item; +package shift.sextiarysector.api.gearforce.item; import net.minecraft.item.ItemStack; @@ -19,10 +19,14 @@ public interface IGearForceItem { */ int getMaxPower(ItemStack container); + /** + * アイテムにチャージ出来る最大スピード + * + * @param container アイテム + * @return + */ int getMaxSpeed(ItemStack container); boolean canSetSlot(int power); - boolean isCustomDamage(ItemStack container); - } diff --git a/src/main/java/shift/sextiarysector/api/machine/item/IGearForceItemManager.java b/src/main/java/shift/sextiarysector/api/gearforce/item/IGearForceItemManager.java similarity index 92% rename from src/main/java/shift/sextiarysector/api/machine/item/IGearForceItemManager.java rename to src/main/java/shift/sextiarysector/api/gearforce/item/IGearForceItemManager.java index 8ba2550..9e689ab 100644 --- a/src/main/java/shift/sextiarysector/api/machine/item/IGearForceItemManager.java +++ b/src/main/java/shift/sextiarysector/api/gearforce/item/IGearForceItemManager.java @@ -1,14 +1,14 @@ -package shift.sextiarysector.api.machine.item; +package shift.sextiarysector.api.gearforce.item; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; public interface IGearForceItemManager { - public int reduceEnergy(ItemStack itemStack, int power, int speed, boolean simulate); - public int addEnergy(ItemStack itemStack, int power, int speed, boolean simulate); + public int reduceEnergy(ItemStack itemStack, int power, int speed, boolean simulate); + public int getSpeed(ItemStack theItem); public int getPower(ItemStack theItem); diff --git a/src/main/java/shift/sextiarysector/api/machine/item/IHammer.java b/src/main/java/shift/sextiarysector/api/gearforce/item/IHammer.java similarity index 84% rename from src/main/java/shift/sextiarysector/api/machine/item/IHammer.java rename to src/main/java/shift/sextiarysector/api/gearforce/item/IHammer.java index 62228ec..fb4a964 100644 --- a/src/main/java/shift/sextiarysector/api/machine/item/IHammer.java +++ b/src/main/java/shift/sextiarysector/api/gearforce/item/IHammer.java @@ -1,4 +1,4 @@ -package shift.sextiarysector.api.machine.item; +package shift.sextiarysector.api.gearforce.item; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; diff --git a/src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java b/src/main/java/shift/sextiarysector/api/gearforce/item/ItemGearForce.java similarity index 77% rename from src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java rename to src/main/java/shift/sextiarysector/api/gearforce/item/ItemGearForce.java index 92291c8..17177bb 100644 --- a/src/main/java/shift/sextiarysector/api/machine/item/ItemGearForce.java +++ b/src/main/java/shift/sextiarysector/api/gearforce/item/ItemGearForce.java @@ -1,4 +1,4 @@ -package shift.sextiarysector.api.machine.item; +package shift.sextiarysector.api.gearforce.item; import java.text.NumberFormat; import java.util.List; @@ -47,8 +47,8 @@ public void addInformation(ItemStack itemStack, EntityPlayer par3EntityPlayer, L NumberFormat nf = NumberFormat.getNumberInstance(); - int power = GearForceItem.manager.getPower(itemStack); - int speed = GearForceItem.manager.getSpeed(itemStack); + int power = GearForceItemAPI.manager.getPower(itemStack); + int speed = GearForceItemAPI.manager.getSpeed(itemStack); list.add("" + EnumChatFormatting.RED + "Power " + EnumChatFormatting.GRAY + power + " / " + this.getMaxPower(itemStack) + ""); list.add("" + EnumChatFormatting.BLUE + "Speed " + EnumChatFormatting.GRAY + nf.format(speed) + " / " + nf.format(this.getMaxSpeed(itemStack)) + ""); @@ -59,7 +59,7 @@ public void addInformation(ItemStack itemStack, EntityPlayer par3EntityPlayer, L public boolean showDurabilityBar(ItemStack stack) { - if (GearForceItem.manager.getSpeed(stack) == 0) return false; + if (GearForceItemAPI.manager.getSpeed(stack) == 0) return false; return true;//stack.isItemDamaged(); } @@ -67,7 +67,7 @@ public boolean showDurabilityBar(ItemStack stack) @Override public double getDurabilityForDisplay(ItemStack stack) { - return 1.0D - ((double) GearForceItem.manager.getSpeed(stack) / (double) this.getMaxSpeed(stack)); + return 1.0D - ((double) GearForceItemAPI.manager.getSpeed(stack) / (double) this.getMaxSpeed(stack)); } @Override @@ -76,8 +76,8 @@ public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) ItemStack empty = new ItemStack(this); ItemStack full = new ItemStack(this); - GearForceItem.manager.setEnergy(empty, this.getMaxPower(empty), 0); - GearForceItem.manager.setEnergy(full, this.getMaxPower(empty), this.getMaxSpeed(full)); + GearForceItemAPI.manager.setEnergy(empty, this.getMaxPower(empty), 0); + GearForceItemAPI.manager.setEnergy(full, this.getMaxPower(empty), this.getMaxSpeed(full)); par3List.add(empty); par3List.add(full); @@ -93,11 +93,6 @@ public int getMaxSpeed(ItemStack container) { return this.speed; } - @Override - public boolean isCustomDamage(ItemStack container) { - return true; - } - @Override public boolean canSetSlot(int power) { return slot == power; diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/EnergyStorage.java b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/EnergyStorage.java similarity index 98% rename from src/main/java/shift/sextiarysector/api/machine/energy/EnergyStorage.java rename to src/main/java/shift/sextiarysector/api/gearforce/tileentity/EnergyStorage.java index e23c4a1..cca834d 100644 --- a/src/main/java/shift/sextiarysector/api/machine/energy/EnergyStorage.java +++ b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/EnergyStorage.java @@ -1,4 +1,4 @@ -package shift.sextiarysector.api.machine.energy; +package shift.sextiarysector.api.gearforce.tileentity; import net.minecraft.nbt.NBTTagCompound; diff --git a/src/main/java/shift/sextiarysector/api/gearforce/tileentity/IEnergyHandler.java b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/IEnergyHandler.java new file mode 100644 index 0000000..c55cf82 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/IEnergyHandler.java @@ -0,0 +1,71 @@ +package shift.sextiarysector.api.gearforce.tileentity; + +import net.minecraftforge.common.util.ForgeDirection; + +/** + * + * IGFEnergyHandlerを使ってください + * + * @see IEnergyStorage + * @see EnergyStorage + * @version 1.1.0 + * @author Shift02 + */ +@Deprecated +public interface IEnergyHandler { + + /** + * addEnergy エレルギーの追加 + * @param from エネルギーを加える方角 + * @param power 加える力の量 + * @param speed 加える速度の量 + * @param simulate シミュレーションかどうか + * @return 実際に加えれた速度 + */ + int addEnergy(ForgeDirection from, int power, int speed, boolean simulate); + + /** + * drawEnergy エレルギーの減少 + * @param from エネルギーを減らす方角 + * @param power 減らす力の量 + * @param speed 減らす速度の量 + * @param simulate シミュレーションかどうか + * @return 実際に減らせれた速度 + */ + int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate); + + /** + * canInterface 繋がるか + * @param from 方角 + * @return その方角に動力を入力または出力出来る場合はtrue + */ + boolean canInterface(ForgeDirection from); + + /** + * getPowerStored 力の取得 + * @param from 方角 + * @return その方角の現在の力の量 + */ + int getPowerStored(ForgeDirection from); + + /** + * getSpeedStored 速度の取得 + * @param from 方角 + * @return その方角の現在の速度の量 + */ + long getSpeedStored(ForgeDirection from); + + /** + * getMaxPowerStored 力の最大値(容量)の取得 + * @param from 方角 + * @return 最大値(容量) + */ + int getMaxPowerStored(ForgeDirection from); + + /** + * getMaxSpeedStored 速度の最大値(容量)の取得 + * @param from 方角 + * @return 最大値(容量) + */ + long getMaxSpeedStored(ForgeDirection from); +} diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyStorage.java b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/IEnergyStorage.java similarity index 95% rename from src/main/java/shift/sextiarysector/api/machine/energy/IEnergyStorage.java rename to src/main/java/shift/sextiarysector/api/gearforce/tileentity/IEnergyStorage.java index 387c395..f014bb9 100644 --- a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyStorage.java +++ b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/IEnergyStorage.java @@ -1,4 +1,4 @@ -package shift.sextiarysector.api.machine.energy; +package shift.sextiarysector.api.gearforce.tileentity; /** * IEnergyStorage エネルギー用のインターフェース
diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/IGearForceGrid.java b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/IGearForceGrid.java similarity index 75% rename from src/main/java/shift/sextiarysector/api/machine/energy/IGearForceGrid.java rename to src/main/java/shift/sextiarysector/api/gearforce/tileentity/IGearForceGrid.java index f4abac6..d92a626 100644 --- a/src/main/java/shift/sextiarysector/api/machine/energy/IGearForceGrid.java +++ b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/IGearForceGrid.java @@ -1,4 +1,4 @@ -package shift.sextiarysector.api.machine.energy; +package shift.sextiarysector.api.gearforce.tileentity; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/shift/sextiarysector/api/gearforce/tileentity/IGearForceHandler.java b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/IGearForceHandler.java new file mode 100644 index 0000000..355cc6d --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/IGearForceHandler.java @@ -0,0 +1,70 @@ +package shift.sextiarysector.api.gearforce.tileentity; + +import net.minecraftforge.common.util.ForgeDirection; + +/** + * IGFEnergyHandler TileEntity用のエネルギーインターフェース
+ * TileEntityに実装して使ってください。 + * @see IEnergyStorage + * @see EnergyStorage + * @version 1.1.0 + * @author Shift02 + */ +public interface IGearForceHandler { + + /** + * addEnergy エレルギーの追加 + * @param from エネルギーを加える方角 + * @param power 加える力の量 + * @param speed 加える速度の量 + * @param simulate シミュレーションかどうか + * @return 実際に加えれた速度 + */ + int addEnergy(ForgeDirection from, int power, int speed, boolean simulate); + + /** + * drawEnergy エレルギーの減少 + * @param from エネルギーを減らす方角 + * @param power 減らす力の量 + * @param speed 減らす速度の量 + * @param simulate シミュレーションかどうか + * @return 実際に減らせれた速度 + */ + int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate); + + /** + * canInterface 繋がるか + * @param from 方角 + * @return その方角に動力を入力または出力出来る場合はtrue + */ + boolean canInterface(ForgeDirection from); + + /** + * getPowerStored 力の取得 + * @param from 方角 + * @return その方角の現在の力の量 + */ + int getPowerStored(ForgeDirection from); + + /** + * getSpeedStored 速度の取得 + * @param from 方角 + * @return その方角の現在の速度の量 + */ + int getSpeedStored(ForgeDirection from); + + /** + * getMaxPowerStored 力の最大値(容量)の取得 + * @param from 方角 + * @return 最大値(容量) + */ + int getMaxPowerStored(ForgeDirection from); + + /** + * getMaxSpeedStored 速度の最大値(容量)の取得 + * @param from 方角 + * @return 最大値(容量) + */ + int getMaxSpeedStored(ForgeDirection from); + +} diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/TileEnergyHandler.java b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/TileEnergyHandler.java similarity index 79% rename from src/main/java/shift/sextiarysector/api/machine/energy/TileEnergyHandler.java rename to src/main/java/shift/sextiarysector/api/gearforce/tileentity/TileEnergyHandler.java index 5af6c30..cb5a96c 100644 --- a/src/main/java/shift/sextiarysector/api/machine/energy/TileEnergyHandler.java +++ b/src/main/java/shift/sextiarysector/api/gearforce/tileentity/TileEnergyHandler.java @@ -1,4 +1,4 @@ -package shift.sextiarysector.api.machine.energy; +package shift.sextiarysector.api.gearforce.tileentity; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.NetworkManager; @@ -7,10 +7,14 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -public class TileEnergyHandler extends TileEntity implements IGFEnergyHandler { - - EnergyStorage storage = new EnergyStorage("Base",1,1000); +/** + * IGFEnergyHandlerの実装例 + * @version 1.0.0 + * @author Shift02 + */ +public class TileEnergyHandler extends TileEntity implements IGearForceHandler { + EnergyStorage storage = new EnergyStorage("Base", 1, 1000); //EnergyStorageの利用 @Override @@ -62,7 +66,6 @@ public int getMaxSpeedStored(ForgeDirection from) { } - //NBT関係 @Override public void readFromNBT(NBTTagCompound nbt) { @@ -81,12 +84,12 @@ public void writeToNBT(NBTTagCompound nbt) { @Override public Packet getDescriptionPacket() { NBTTagCompound nbt = new NBTTagCompound(); - this.writeToNBT(nbt); - return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); + this.writeToNBT(nbt); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbt); } @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { this.readFromNBT(pkt.func_148857_g()); } diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java b/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java index ad92b8b..3f6d027 100644 --- a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java +++ b/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java @@ -1,10 +1,12 @@ package shift.sextiarysector.api.machine.energy; import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; /** - * - * IGFEnergyHandlerを使ってください + * 注 竹MOD用に残してあります + * @Deprecated パッケージが変更になりました {@link IGearForceHandler} * * @see IEnergyStorage * @see EnergyStorage diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java b/src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java index 08962e4..db05319 100644 --- a/src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java +++ b/src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java @@ -1,15 +1,25 @@ package shift.sextiarysector.api.machine.energy; import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; /** + * + * パッケージが変更になりました {@link IGearForceHandler}
+ * 注 AMT2とエンチャント交換MOD用に残してあります
+ *
+ * * IGFEnergyHandler TileEntity用のエネルギーインターフェース
* TileEntityに実装して使ってください。 + *
* @see IEnergyStorage * @see EnergyStorage * @version 1.1.0 * @author Shift02 + * @Deprecated パッケージが変更になりました {@link IGearForceHandler} */ +@Deprecated public interface IGFEnergyHandler { /** diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/package-info.java b/src/main/java/shift/sextiarysector/api/machine/energy/package-info.java new file mode 100644 index 0000000..8a8719d --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/machine/energy/package-info.java @@ -0,0 +1,2 @@ +@java.lang.Deprecated +package shift.sextiarysector.api.machine.energy; \ No newline at end of file diff --git a/src/main/java/shift/sextiarysector/api/machine/item/GearForceItem.java b/src/main/java/shift/sextiarysector/api/machine/item/GearForceItem.java deleted file mode 100644 index 48bafb8..0000000 --- a/src/main/java/shift/sextiarysector/api/machine/item/GearForceItem.java +++ /dev/null @@ -1,7 +0,0 @@ -package shift.sextiarysector.api.machine.item; - -public class GearForceItem { - - public static IGearForceItemManager manager; - -} diff --git a/src/main/java/shift/sextiarysector/api/machine/item/IGearForceGridItem.java b/src/main/java/shift/sextiarysector/api/machine/item/IGearForceGridItem.java deleted file mode 100644 index 6b97c14..0000000 --- a/src/main/java/shift/sextiarysector/api/machine/item/IGearForceGridItem.java +++ /dev/null @@ -1,5 +0,0 @@ -package shift.sextiarysector.api.machine.item; - -public interface IGearForceGridItem { - -} diff --git a/src/main/java/shift/sextiarysector/api/recipe/IFluidRecipe.java b/src/main/java/shift/sextiarysector/api/recipe/IFluidRecipe.java new file mode 100644 index 0000000..514468e --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/recipe/IFluidRecipe.java @@ -0,0 +1,22 @@ +package shift.sextiarysector.api.recipe; + +import java.util.Map; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public interface IFluidRecipe { + + public void add(ItemStack par1ItemStack, ItemStack par2ItemStack, FluidStack par3FluidStack); + + public void add(String par1String, ItemStack par2ItemStack, FluidStack par3FluidStack); + + public ItemStack getResult(ItemStack item); + + public FluidStack getFluidResult(ItemStack item); + + public Map getMetaList(); + + public Map getOreList(); + +} diff --git a/src/main/java/shift/sextiarysector/api/recipe/INormalRecipe.java b/src/main/java/shift/sextiarysector/api/recipe/INormalRecipe.java new file mode 100644 index 0000000..6578405 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/recipe/INormalRecipe.java @@ -0,0 +1,54 @@ +package shift.sextiarysector.api.recipe; + +import java.util.Map; + +import net.minecraft.item.ItemStack; + +/** + * + * 通常の加工レシピ用Interface + * + * @author Shift02 + * + */ +public interface INormalRecipe { + + /** + * レシピの追加 + * + * @param material 材料 (ItemStack) + * @param result 完成品 + */ + public void add(ItemStack material, ItemStack result); + + /** + * レシピの追加 + * + * @param oreDictionary 材料 (String) + * @param result 完成品 + */ + public void add(String oreDictionary, ItemStack result); + + /** + * 材料から完成品を取得する + * + * @param material 材料 + * @return 完成品 ない場合はnullが返る + */ + public ItemStack getResult(ItemStack material); + + /** + * レシピの管理リスト + * + * @return ItemStackで管理しているリスト + */ + public Map getMetaList(); + + /** + * レシピの管理リスト + * + * @return OreDictionaryで管理しているリスト + */ + public Map getOreList(); + +} diff --git a/src/main/java/shift/sextiarysector/api/recipe/RecipeAPI.java b/src/main/java/shift/sextiarysector/api/recipe/RecipeAPI.java new file mode 100644 index 0000000..74666f4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/recipe/RecipeAPI.java @@ -0,0 +1,34 @@ +package shift.sextiarysector.api.recipe; + +/** + * レシピを管理しているClass
+ * SextiarySector2の機械にレシピを追加できます。 + * + * @version 1.0.0 + * @author Shift02 + * + */ +public class RecipeAPI { + + public static INormalRecipe millstone;; + public static INormalRecipe loom; + public static INormalRecipe sawmill; + public static INormalRecipe spinning_machine; + public static IFluidRecipe extractor; + public static INormalRecipe pulverizer; + public static INormalRecipe rollingMachine; + public static IFluidRecipe manaSqueezer; + public static INormalRecipe timeMachine; + + /** + * + * INormalRecipeの使い方 + * + * RecipeAPI.millstone.add(new ItemStack(Blocks.stone, 1), new ItemStack(Blocks.cobblestone, 1)); + * + * これで石から丸石を作るレシピが石臼に追加される + * + * + */ + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockDirection.java b/src/main/java/shift/sextiarysector/block/BlockDirection.java index cf132ee..7e2a171 100644 --- a/src/main/java/shift/sextiarysector/block/BlockDirection.java +++ b/src/main/java/shift/sextiarysector/block/BlockDirection.java @@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.item.IHammer; +import shift.sextiarysector.api.gearforce.item.IHammer; import shift.sextiarysector.tileentity.TileEntityDirection; public abstract class BlockDirection extends BlockContainer { diff --git a/src/main/java/shift/sextiarysector/block/BlockFigure.java b/src/main/java/shift/sextiarysector/block/BlockFigure.java index c697baa..2d915f2 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFigure.java +++ b/src/main/java/shift/sextiarysector/block/BlockFigure.java @@ -41,10 +41,12 @@ public BlockFigure() { // this.setBlockUnbreakable(); } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } @@ -69,11 +71,13 @@ public void registerBlockIcons(IIconRegister par1IconRegister) { + "_side"); } + @Override @SideOnly(Side.CLIENT) public String getItemIconName() { return this.getTextureName(); } + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) { ItemStack itemstack = new ItemStack(p_149666_1_, 1, 0); @@ -163,6 +167,7 @@ public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, Entit } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { // ItemInWorldManager a = new ItemInWorldManager(); @@ -175,7 +180,8 @@ public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, p_149749_5_, p_149749_6_); } - public void onBlockHarvested(World p_149681_1_, int p_149681_2_,int p_149681_3_, int p_149681_4_, int p_149681_5_,EntityPlayer p_149681_6_) { + @Override + public void onBlockHarvested(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, EntityPlayer p_149681_6_) { if (!p_149681_6_.capabilities.isCreativeMode) { this.dropBlockAsItem(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 0); } @@ -183,6 +189,7 @@ public void onBlockHarvested(World p_149681_1_, int p_149681_2_,int p_149681_3_, super.onBlockHarvested(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, p_149681_6_); } + @Override public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { ArrayList ret = new ArrayList(); @@ -218,6 +225,8 @@ public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, i public static ItemStack setFigureItem(ItemStack item, ItemStack setItem, String edition) { + if (setItem == null) return item; + NBTTagCompound nbt = item.stackTagCompound; if (nbt == null) { diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java b/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java index 7724adf..5a3468d 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java +++ b/src/main/java/shift/sextiarysector/block/BlockFluidFurnace.java @@ -20,7 +20,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SextiarySector; -import shift.sextiarysector.api.machine.item.IHammer; +import shift.sextiarysector.api.gearforce.item.IHammer; import shift.sextiarysector.tileentity.TileEntityDirection; import shift.sextiarysector.tileentity.TileEntityFluidFurnace; import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; diff --git a/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java b/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java index 286798b..18093a1 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java +++ b/src/main/java/shift/sextiarysector/block/BlockFluidMachineBase.java @@ -19,7 +19,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SextiarySector; -import shift.sextiarysector.api.machine.item.IHammer; +import shift.sextiarysector.api.gearforce.item.IHammer; import shift.sextiarysector.tileentity.TileEntityDirection; import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; import cpw.mods.fml.relauncher.Side; diff --git a/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java b/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java index 2f1f55b..6233deb 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java +++ b/src/main/java/shift/sextiarysector/block/BlockFoodSmokers.java @@ -10,7 +10,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import shift.sextiarysector.SextiarySector; -import shift.sextiarysector.api.machine.item.IHammer; +import shift.sextiarysector.api.gearforce.item.IHammer; import shift.sextiarysector.tileentity.TileEntityFluidMachineBase; import shift.sextiarysector.tileentity.TileEntityFoodSmokers; import cpw.mods.fml.relauncher.Side; diff --git a/src/main/java/shift/sextiarysector/block/BlockGFDynamo.java b/src/main/java/shift/sextiarysector/block/BlockGFDynamo.java new file mode 100644 index 0000000..be5f7ab --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockGFDynamo.java @@ -0,0 +1,37 @@ +package shift.sextiarysector.block; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import shift.sextiarysector.SSMaterials; +import shift.sextiarysector.plugin.PluginRF; +import shift.sextiarysector.tileentity.TileEntityGFDynamo; + +public class BlockGFDynamo extends BlockDirection { + + public BlockGFDynamo() { + super(SSMaterials.machine); + this.setHardness(3.0F); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityGFDynamo(); + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return PluginRF.gfDynamoType; + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockGFTank.java b/src/main/java/shift/sextiarysector/block/BlockGFTank.java index 0659884..0ac10bf 100644 --- a/src/main/java/shift/sextiarysector/block/BlockGFTank.java +++ b/src/main/java/shift/sextiarysector/block/BlockGFTank.java @@ -14,7 +14,7 @@ import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.api.SextiarySectorAPI; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; import shift.sextiarysector.tileentity.TileEntityDirection; import shift.sextiarysector.tileentity.TileEntityGFTank; import cpw.mods.fml.relauncher.Side; @@ -71,7 +71,7 @@ public IIcon getIcon(IBlockAccess par1IBlockAccess, int par2, int par3, int par4 TileEntity t = par1IBlockAccess.getTileEntity(par2 + d.offsetX, par3 + d.offsetY, par4 + d.offsetZ); - if(t instanceof IGFEnergyHandler && ((IGFEnergyHandler) t).canInterface(d.getOpposite()))return in; + if(t instanceof IGearForceHandler && ((IGearForceHandler) t).canInterface(d.getOpposite()))return in; return this.blockIcon; } diff --git a/src/main/java/shift/sextiarysector/block/BlockGearBox.java b/src/main/java/shift/sextiarysector/block/BlockGearBox.java index 3e2afd3..f46a257 100644 --- a/src/main/java/shift/sextiarysector/block/BlockGearBox.java +++ b/src/main/java/shift/sextiarysector/block/BlockGearBox.java @@ -12,7 +12,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.api.SextiarySectorAPI; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; import shift.sextiarysector.tileentity.TileEntityDirection; import shift.sextiarysector.tileentity.TileEntityGearBox; import cpw.mods.fml.relauncher.Side; @@ -47,7 +47,7 @@ public IIcon getIcon(IBlockAccess par1IBlockAccess, int par2, int par3, int par4 TileEntity t = par1IBlockAccess.getTileEntity(par2 + d.offsetX, par3 + d.offsetY, par4 + d.offsetZ); - if(t instanceof IGFEnergyHandler && ((IGFEnergyHandler) t).canInterface(d.getOpposite()))return out; + if(t instanceof IGearForceHandler && ((IGearForceHandler) t).canInterface(d.getOpposite()))return out; return this.blockIcon; } diff --git a/src/main/java/shift/sextiarysector/block/BlockGearShaft.java b/src/main/java/shift/sextiarysector/block/BlockGearShaft.java index 55ea7ab..97e05d5 100644 --- a/src/main/java/shift/sextiarysector/block/BlockGearShaft.java +++ b/src/main/java/shift/sextiarysector/block/BlockGearShaft.java @@ -49,6 +49,12 @@ public int getRenderType() return SextiarySector.proxy.GearShaftRenderType; } + @Override + public int damageDropped(int p_149692_1_) + { + return p_149692_1_; + } + /* public int damageDropped(int p_149692_1_) { diff --git a/src/main/java/shift/sextiarysector/block/BlockLargeWindmill.java b/src/main/java/shift/sextiarysector/block/BlockLargeWindmill.java new file mode 100644 index 0000000..dcf5e01 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockLargeWindmill.java @@ -0,0 +1,131 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntityDirection; +import shift.sextiarysector.tileentity.TileEntityLargeWindmill; + +public class BlockLargeWindmill extends BlockContainer { + + public BlockLargeWindmill() { + super(Material.wood); + this.setHardness(0.8F); + } + + @Override + public void onBlockAdded(World par1World, int par2, int par3, int par4) + { + super.onBlockAdded(par1World, par2, par3, par4); + this.setDefaultDirection(par1World, par2, par3, par4); + } + + private void setDefaultDirection(World par1World, int par2, int par3, int par4) + { + if (!par1World.isRemote) + { + Block block = par1World.getBlock(par2, par3, par4 - 1); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); + + //TileEntityWindmill tileEntity = (TileEntityWindmill)par1World.getTileEntity(par2, par3, par4); + + byte b0 = 3; + + if (block.func_149730_j() && !block1.func_149730_j()) + { + b0 = 3; + } + + if (block1.func_149730_j() && !block.func_149730_j()) + { + b0 = 2; + } + + if (block2.func_149730_j() && !block3.func_149730_j()) + { + b0 = 5; + } + + if (block3.func_149730_j() && !block2.func_149730_j()) + { + b0 = 4; + } + + ((TileEntityDirection) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection + .getOrientation(b0); + + //par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); + } + } + + @Override + public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, + ItemStack par6ItemStack) + { + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + + if (l == 0) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); + ((TileEntityDirection) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection + .getOrientation(2); + } + + if (l == 1) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); + ((TileEntityDirection) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection + .getOrientation(5); + + } + + if (l == 2) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); + ((TileEntityDirection) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection + .getOrientation(3); + + } + + if (l == 3) + { + //par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); + ((TileEntityDirection) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection + .getOrientation(4); + + } + + par1World.markBlockForUpdate(par2, par3, par4); + + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.windMillType; + } + + @Override + public TileEntity createNewTileEntity(World world, int p_149915_2_) { + return new TileEntityLargeWindmill(); + } +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerFluidGFMachineBase.java b/src/main/java/shift/sextiarysector/container/ContainerFluidGFMachineBase.java index 64e1bea..0be6b7e 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerFluidGFMachineBase.java +++ b/src/main/java/shift/sextiarysector/container/ContainerFluidGFMachineBase.java @@ -8,7 +8,7 @@ import net.minecraft.inventory.SlotFurnace; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.api.gearforce.item.GearForceItemAPI; import shift.sextiarysector.tileentity.TileEntityFluidFGFMachineBase; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -173,7 +173,7 @@ else if (p_82846_2_ != 1 && p_82846_2_ != 0) return null; } } - else if (GearForceItem.manager.isGearForceItem(itemstack1)) + else if (GearForceItemAPI.manager.isGearForceItem(itemstack1)) { if (!this.mergeItemStack(itemstack1, 1, 2, false)) { diff --git a/src/main/java/shift/sextiarysector/container/ContainerGFTank.java b/src/main/java/shift/sextiarysector/container/ContainerGFTank.java index a9207c1..f77d86b 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerGFTank.java +++ b/src/main/java/shift/sextiarysector/container/ContainerGFTank.java @@ -6,7 +6,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.api.gearforce.item.GearForceItemAPI; import shift.sextiarysector.tileentity.TileEntityGFTank; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -189,7 +189,7 @@ else if (par2 != 1 && par2 != 0) return null; } } - else */if (GearForceItem.manager.isGearForceItem(itemstack1)) + else */if (GearForceItemAPI.manager.isGearForceItem(itemstack1)) { if (!this.mergeItemStack(itemstack1, 1, 2, false)) { diff --git a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java index 5bbaafc..e2d8349 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java @@ -7,9 +7,9 @@ import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import shift.sextiarysector.api.IEquipment; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; import shift.sextiarysector.player.EntityPlayerManager; -import shift.sextiarysector.player.EquipmentType; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/shift/sextiarysector/container/ContainerSimpleMachine.java b/src/main/java/shift/sextiarysector/container/ContainerSimpleMachine.java index 3b75c57..45098c5 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerSimpleMachine.java +++ b/src/main/java/shift/sextiarysector/container/ContainerSimpleMachine.java @@ -8,7 +8,7 @@ import net.minecraft.inventory.SlotFurnace; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.api.gearforce.item.GearForceItemAPI; import shift.sextiarysector.tileentity.TileEntitySimpleMachine; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -164,7 +164,7 @@ else if (par2 != 1 && par2 != 0) return null; } } - else if (GearForceItem.manager.isGearForceItem(itemstack1)) + else if (GearForceItemAPI.manager.isGearForceItem(itemstack1)) { if (!this.mergeItemStack(itemstack1, 1, 2, false)) { diff --git a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java index 98fec41..977012a 100644 --- a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java @@ -4,12 +4,13 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; - -public class InventoryPlayerNext implements IInventory{ +public class InventoryPlayerNext implements IInventory { ItemBox items = new ItemBox("Base", 20, 1); - private EntityPlayer player; + private final EntityPlayer player; public InventoryPlayerNext(EntityPlayer player) { this.player = player; @@ -56,7 +57,7 @@ public int getInventoryStackLimit() { } @Override - public void markDirty(){ + public void markDirty() { items.onInventoryChanged(); } @@ -82,30 +83,34 @@ public boolean isItemValidForSlot(int i, ItemStack itemstack) { } public void dropAllItems() - { - int i; + { + int i; + + for (i = 0; i < this.items.getSizeInventory(); ++i) + { - for (i = 0; i < this.items.getSizeInventory(); ++i) - { - if (this.items.getStackInSlot(i) != null) - { - this.player.func_146097_a(this.items.getStackInSlot(i), true, false); - this.items.setInventorySlotContents(i, null); - } - } + ItemStack item = this.items.getStackInSlot(i); - } + if (item != null && ((IEquipment) item.getItem()).canDrop(EquipmentType.getEquipmentTypeFromSlot(i), item, player)) + { + this.player.func_146097_a(item, true, false); + this.items.setInventorySlotContents(i, null); + } + } + + } //NBT public NBTTagCompound writeToNBT(NBTTagCompound nbt) - { - this.items.writeToNBT(nbt);; - return nbt; - } - - public void readFromNBT(NBTTagCompound nbt) - { - this.items.readFromNBT(nbt); - } + { + this.items.writeToNBT(nbt); + ; + return nbt; + } + + public void readFromNBT(NBTTagCompound nbt) + { + this.items.readFromNBT(nbt); + } } diff --git a/src/main/java/shift/sextiarysector/container/InventoryRucksack.java b/src/main/java/shift/sextiarysector/container/InventoryRucksack.java index 528ef16..d733909 100644 --- a/src/main/java/shift/sextiarysector/container/InventoryRucksack.java +++ b/src/main/java/shift/sextiarysector/container/InventoryRucksack.java @@ -6,7 +6,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import shift.sextiarysector.player.EquipmentType; +import shift.sextiarysector.api.equipment.EquipmentType; public class InventoryRucksack implements IInventory { @@ -26,7 +26,7 @@ public InventoryRucksack(InventoryPlayer inventory) public InventoryRucksack(InventoryPlayerNext inventory) { inventoryPlayer = inventory; - currentItem = inventoryPlayer.getStackInSlot(EquipmentType.Bag.getSlot()[0]); + currentItem = inventoryPlayer.getStackInSlot(EquipmentType.Bag.getSlots()[0]); //InventorySize items = new ItemStack[27]; @@ -176,7 +176,7 @@ public void closeInventory() if (inventoryPlayer instanceof InventoryPlayer) { ((InventoryPlayer) inventoryPlayer).mainInventory[((InventoryPlayer) inventoryPlayer).currentItem] = result; } else if (inventoryPlayer instanceof InventoryPlayerNext) { - inventoryPlayer.setInventorySlotContents(EquipmentType.Bag.getSlot()[0], result); + inventoryPlayer.setInventorySlotContents(EquipmentType.Bag.getSlots()[0], result); } } diff --git a/src/main/java/shift/sextiarysector/container/SlotEquipment.java b/src/main/java/shift/sextiarysector/container/SlotEquipment.java index 97d7043..2a6a8b6 100644 --- a/src/main/java/shift/sextiarysector/container/SlotEquipment.java +++ b/src/main/java/shift/sextiarysector/container/SlotEquipment.java @@ -5,8 +5,8 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import shift.sextiarysector.api.IEquipment; -import shift.sextiarysector.player.EquipmentType; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/shift/sextiarysector/container/SlotFluid.java b/src/main/java/shift/sextiarysector/container/SlotFluid.java index 89c7181..7af1ef8 100644 --- a/src/main/java/shift/sextiarysector/container/SlotFluid.java +++ b/src/main/java/shift/sextiarysector/container/SlotFluid.java @@ -5,27 +5,29 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.IFluidContainerItem; import shift.sextiarysector.event.ClientEventHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class SlotFluid extends Slot{ +public class SlotFluid extends Slot { - public SlotFluid(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_,int p_i1824_4_) { + public SlotFluid(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_) { super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_); } @Override public boolean isItemValid(ItemStack stack) { - return FluidContainerRegistry.isContainer(stack) ; + return FluidContainerRegistry.isContainer(stack) || (stack != null && stack.getItem() instanceof IFluidContainerItem); } + @Override @SideOnly(Side.CLIENT) - public IIcon getBackgroundIconIndex() - { - return ClientEventHandler.slotFluid; - } + public IIcon getBackgroundIconIndex() + { + return ClientEventHandler.slotFluid; + } } diff --git a/src/main/java/shift/sextiarysector/container/SlotGF.java b/src/main/java/shift/sextiarysector/container/SlotGF.java index 6a3b6b6..f79c17e 100644 --- a/src/main/java/shift/sextiarysector/container/SlotGF.java +++ b/src/main/java/shift/sextiarysector/container/SlotGF.java @@ -4,7 +4,7 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import shift.sextiarysector.api.machine.item.IGearForceItem; +import shift.sextiarysector.api.gearforce.item.IGearForceItem; import shift.sextiarysector.event.ClientEventHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 226a9a5..650e0d1 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -5,6 +5,7 @@ import java.util.List; import net.minecraft.block.BlockLeaves; +import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiIngameMenu; import net.minecraft.client.gui.GuiScreen; @@ -22,6 +23,7 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition.MovingObjectType; import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.common.util.ForgeDirection; @@ -29,17 +31,19 @@ import org.lwjgl.opengl.GL11; +import shift.sextiarysector.SSItems; import shift.sextiarysector.api.agriculture.AgricultureAPI; import shift.sextiarysector.api.agriculture.IFertilizer; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; -import shift.sextiarysector.api.machine.item.IGearForceGridItem; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.gearforce.item.IGearForceGridItem; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; import shift.sextiarysector.gui.GuiAchievementsNext; import shift.sextiarysector.gui.GuiStatsNext; import shift.sextiarysector.item.TextureSeason; import shift.sextiarysector.module.FertilizerManager; import shift.sextiarysector.module.SeasonManager; import shift.sextiarysector.player.EntityPlayerManager; -import shift.sextiarysector.player.EquipmentType; +import shift.sextiarysector.player.EquipmentStats; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.ObfuscationReflectionHelper; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -205,6 +209,31 @@ public void preVanillaTextureStitchEvent(TextureStitchEvent.Pre event) { } + //水の中 + @SubscribeEvent + public void onFogDensity(FogDensity event) { + + if (event.block.getMaterial() == Material.water) { + + if (event.entity instanceof EntityPlayer) { + + EntityPlayer player = (EntityPlayer) event.entity; + + EquipmentStats e = EntityPlayerManager.getEquipmentStats(player); + + if (e.inventory.getStackInSlot(EquipmentType.Face.getSlot(0)) != null) { + + if (e.inventory.getStackInSlot(EquipmentType.Face.getSlot(0)).getItem() == SSItems.waterContactLenses) { + event.density = 0.0F; + event.setCanceled(true); + } + + } + } + + } + } + //車軸の線の描写 @SubscribeEvent public void onDrawBlockHighlight(DrawBlockHighlightEvent event) { @@ -223,11 +252,11 @@ public void onDrawBlockHighlight(DrawBlockHighlightEvent event) { // return; // } - if (EntityPlayerManager.getCustomPlayerData(player).getEquipmentStats().inventory.getStackInSlot(EquipmentType.Face.getSlot()[0]) == null) { + if (EntityPlayerManager.getCustomPlayerData(player).getEquipmentStats().inventory.getStackInSlot(EquipmentType.Face.getSlots()[0]) == null) { return; } - if (!(EntityPlayerManager.getCustomPlayerData(player).getEquipmentStats().inventory.getStackInSlot(EquipmentType.Face.getSlot()[0]).getItem() instanceof IGearForceGridItem)) + if (!(EntityPlayerManager.getCustomPlayerData(player).getEquipmentStats().inventory.getStackInSlot(EquipmentType.Face.getSlots()[0]).getItem() instanceof IGearForceGridItem)) { return; } diff --git a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java index 333d325..9b17a57 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java @@ -6,10 +6,12 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.PlayerEvent; +import shift.mceconomy2.api.MCEconomyAPI; import shift.sextiarysector.SSItems; +import shift.sextiarysector.api.equipment.EquipmentType; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.player.EquipmentStats; -import shift.sextiarysector.player.EquipmentType; +import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class PlayerUnitEventHandler { @@ -60,8 +62,8 @@ public void playerAttackEvent(LivingHurtEvent event) { EquipmentStats e = EntityPlayerManager.getEquipmentStats((EntityPlayer) event.source.getEntity()); - for (int i = 0; i < EquipmentType.Unit.getSlot().length; i++) { - ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlot()[i]); + for (int i = 0; i < EquipmentType.Unit.getSlots().length; i++) { + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlots()[i]); if (item != null && item.getItem() != null && item.getItem() == SSItems.attackUnit) { event.ammount++; @@ -78,8 +80,8 @@ public void playeDefenseEvent(LivingHurtEvent event) { EquipmentStats e = EntityPlayerManager.getEquipmentStats((EntityPlayer) event.entity); - for (int i = 0; i < EquipmentType.Unit.getSlot().length; i++) { - ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlot()[i]); + for (int i = 0; i < EquipmentType.Unit.getSlots().length; i++) { + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlots()[i]); if (item != null && item.getItem() != null && item.getItem() == SSItems.defenseUnit) { event.ammount--; @@ -102,9 +104,9 @@ public void playeHarvestCheckEvent(PlayerEvent.HarvestCheck event) { Block block = event.block; - for (int i = 0; i < EquipmentType.Unit.getSlot().length; i++) { + for (int i = 0; i < EquipmentType.Unit.getSlots().length; i++) { - ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlot()[i]); + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlots()[i]); if (item == null) continue; @@ -128,4 +130,40 @@ public void playeHarvestCheckEvent(PlayerEvent.HarvestCheck event) { } + //リング + @SubscribeEvent(priority = EventPriority.HIGH) + public void onPlayerCloneEvent(net.minecraftforge.event.entity.player.PlayerEvent.Clone event) + { + + if (!event.wasDeath) return; + + if (!(event.original instanceof EntityPlayer)) return; + + EquipmentStats e = EntityPlayerManager.getEquipmentStats(event.original); + + int mp = (int) (MCEconomyAPI.getPlayerMP(event.original) / 4.0f); + int xp = (int) (event.original.experienceLevel / 4.0f); + + for (int i = 0; i < EquipmentType.Ring.getSlots().length; i++) { + + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Ring.getSlots()[i]); + + if (item != null && item.getItem() == SSItems.mpRing) { + + int reduce = MCEconomyAPI.reducePlayerMP(event.original, mp, false); + MCEconomyAPI.addPlayerMP(event.entityPlayer, reduce, false); + e.inventory.setInventorySlotContents(EquipmentType.Ring.getSlots()[i], null); + + } else if (item != null && item.getItem() == SSItems.xpRing) { + + event.entityPlayer.experienceLevel += xp; + event.original.experienceLevel -= xp; + e.inventory.setInventorySlotContents(EquipmentType.Ring.getSlots()[i], null); + + } + + } + + } + } diff --git a/src/main/java/shift/sextiarysector/fmp/IShaft.java b/src/main/java/shift/sextiarysector/fmp/IShaft.java index 5d84647..06dcf70 100644 --- a/src/main/java/shift/sextiarysector/fmp/IShaft.java +++ b/src/main/java/shift/sextiarysector/fmp/IShaft.java @@ -1,10 +1,10 @@ package shift.sextiarysector.fmp; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; -public interface IShaft extends IGFEnergyHandler { +public interface IShaft extends IGearForceHandler { public void setDirection(ForgeDirection d); diff --git a/src/main/java/shift/sextiarysector/fmp/ShaftPart.java b/src/main/java/shift/sextiarysector/fmp/ShaftPart.java index 65724a0..b51f94b 100644 --- a/src/main/java/shift/sextiarysector/fmp/ShaftPart.java +++ b/src/main/java/shift/sextiarysector/fmp/ShaftPart.java @@ -16,8 +16,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SSBlocks; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.item.IHammer; +import shift.sextiarysector.api.gearforce.item.IHammer; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; import shift.sextiarysector.renderer.block.RendererShaft; import shift.sextiarysector.renderer.model.ModelShaft; import shift.sextiarysector.tileentity.TileEntityShaft; diff --git a/src/main/java/shift/sextiarysector/gui/GuiExtractor.java b/src/main/java/shift/sextiarysector/gui/GuiExtractor.java new file mode 100644 index 0000000..3ebe268 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiExtractor.java @@ -0,0 +1,19 @@ +package shift.sextiarysector.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import shift.sextiarysector.tileentity.TileEntityFluidFGFMachineBase; + +public class GuiExtractor extends GuiFluidFGFMachineBase { + + private static final ResourceLocation machineGuiTextures = new ResourceLocation("sextiarysector:textures/guis/machine/extractor.png"); + + public GuiExtractor(InventoryPlayer par1InventoryPlayer, TileEntityFluidFGFMachineBase par2TileEntity) { + super(par1InventoryPlayer, par2TileEntity); + } + + @Override + protected ResourceLocation getBindTexture() { + return machineGuiTextures; + } +} diff --git a/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java b/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java index 7cfe02b..ab75765 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java +++ b/src/main/java/shift/sextiarysector/gui/tab/InventoryTabEquipment.java @@ -2,9 +2,9 @@ import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; +import shift.sextiarysector.api.equipment.EquipmentType; import shift.sextiarysector.item.ISSEquipment; import shift.sextiarysector.player.EntityPlayerManager; -import shift.sextiarysector.player.EquipmentType; import cpw.mods.fml.client.FMLClientHandler; public class InventoryTabEquipment extends AbstractTab { @@ -21,7 +21,7 @@ public InventoryTabEquipment(EquipmentType type,ItemStack item){ private ItemStack getSlotItem(){ - for(int i:type.getSlot()){ + for(int i:type.getSlots()){ ItemStack slot = EntityPlayerManager.getEquipmentStats(mc.thePlayer).inventory.getStackInSlot(i); diff --git a/src/main/java/shift/sextiarysector/gui/tab/TabManager.java b/src/main/java/shift/sextiarysector/gui/tab/TabManager.java index 2189463..1abc630 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/TabManager.java +++ b/src/main/java/shift/sextiarysector/gui/tab/TabManager.java @@ -17,11 +17,12 @@ public class TabManager { - private static HashMap tabMap = new HashMap(); + private static HashMap tabMap = new HashMap(); private static int tabSize = 0; private static Minecraft mc = FMLClientHandler.instance().getClient(); - private static EntityPlayer getPlayer(){ + + private static EntityPlayer getPlayer() { return FMLClientHandler.instance().getClient().thePlayer; } @@ -31,9 +32,9 @@ private static EntityPlayer getPlayer(){ private static boolean init; private static AbstractTab vanilla; - public static void initTabManager(){ + public static void initTabManager() { - if(!init){ + if (!init) { init = true; vanilla = new InventoryTabVanilla(); registerTab(vanilla); @@ -41,180 +42,185 @@ public static void initTabManager(){ } - public static void registerTab (AbstractTab tab) - { - if(!init)initTabManager(); - tabMap.put(tabSize, tab); - tabSize++; - } - - public static int getTabNumber(AbstractTab tab){ - - for(int i = 0;i tabs = getTabListFromPage(pCount); - - TabButton buttonV = new TabButton(tabMap.get(0)); - buttonV.id = 2; - buttonV.xPosition = cornerX ; - buttonV.yPosition = cornerY - 28; - buttonV.enabled = !tabMap.get(0).equals(selectedButton); - buttonList.add(buttonV); - - - for (int i = 0; i < tabs.size(); i++) - { - AbstractTab t = tabs.get(i); - - if (t.shouldAddToList()) - { - TabButton button = new TabButton(t); - button.id = count; - button.xPosition = cornerX + 32 + (count - 3) * 29; - button.yPosition = cornerY - 28; - button.enabled = !t.equals(selectedButton); - buttonList.add(button); - count++; - } - } - - int xSize = 176; - int ySize = 166; - int tabCount = getUpdateTab().size(); - if (tabCount > 5) - { - buttonList.add(new GuiBackButton(8, cornerX -24 , cornerY - 22, 20, 20,cornerX,cornerY,buttonList)); - buttonList.add(new GuiNextButton(9, cornerX + xSize - 20 + 24, cornerY - 22, 20, 20,cornerX,cornerY,buttonList)); - } - - setSelectedButton(selectedButton); - - } - - @SideOnly(Side.CLIENT) - private static void setSelectedButton(AbstractTab selectedButton){ - - for (int i = 0; i < tabMap.size(); i++) - { - if(tabMap.get(i).equals(selectedButton)){ - getPlayer().getEntityData().setInteger(Selected_Button, i); - return; - } - } - - } - - @SideOnly(Side.CLIENT) - public static AbstractTab getSelectedButton(){ - return tabMap.get(getPlayer().getEntityData().getInteger(Selected_Button)); - } - - @SideOnly(Side.CLIENT) - private static ArrayList getTabListFromPage(int i){ - - ArrayList tabs = new ArrayList(); - ArrayList now = getUpdateTab(); - int j = i - 1; - - if(i>getPageSize()){ - setSelectPage(1); - j = 0; - } - - for(int k=j*5; k getUpdateTab() - { - ArrayList tabs = new ArrayList(); + if ((event.gui instanceof GuiInventory)) + { - for (int i = 1; i < tabMap.size(); i++) - { - AbstractTab t = tabMap.get(i); - if (t.shouldAddToList()) - { - tabs.add(t); - } - } + int xSize = 176; + int ySize = 166; + int guiLeft = (event.gui.width - xSize) / 2; + int guiTop = (event.gui.height - ySize) / 2; - return tabs; + if (!this.mc.thePlayer.getActivePotionEffects().isEmpty()) + { + guiLeft = 160 + (event.gui.width - xSize - 200) / 2; + } - } + updateTabValues(guiLeft, guiTop, event.buttonList, vanilla, false); - public static int getPageSize(){ - ArrayList naw = getUpdateTab(); + } + } + + public static void updateTabValues(int cornerX, int cornerY, List buttonList, AbstractTab selectedButton, boolean reset) + { + + if (reset) { - return naw.size()%5==0 ? naw.size()/5 :(naw.size()/5) + 1; - } + GuiButton[] r = (GuiButton[]) buttonList.toArray(new GuiButton[0]); + + buttonList.clear(); + + for (int i = 0; i < r.length; i++) { + if (!(r[i] instanceof TabButton) && !(r[i] instanceof GuiBackButton) && !(r[i] instanceof GuiNextButton)) { + buttonList.add(r[i]); + } + } + } - public static int getSelectPage() - { - int i = getPlayer().getEntityData().getInteger(Select_Page); - if(i==0){ - setSelectPage(1); - return 1; - } + int count = 3; + int pCount = getSelectPage(); + ArrayList tabs = getTabListFromPage(pCount); + + TabButton buttonV = new TabButton(tabMap.get(0)); + buttonV.id = 2; + buttonV.xPosition = cornerX; + buttonV.yPosition = cornerY - 28; + buttonV.enabled = !tabMap.get(0).equals(selectedButton); + buttonList.add(buttonV); + + for (int i = 0; i < tabs.size(); i++) + { + AbstractTab t = tabs.get(i); + + if (t.shouldAddToList()) + { + TabButton button = new TabButton(t); + button.id = count; + button.xPosition = cornerX + 32 + (count - 3) * 29; + button.yPosition = cornerY - 28; + button.enabled = !t.equals(selectedButton); + buttonList.add(button); + count++; + } + } + + int xSize = 176; + int ySize = 166; + int tabCount = getUpdateTab().size(); + if (tabCount > 5) + { + buttonList.add(new GuiBackButton(8, cornerX - 24, cornerY - 22, 20, 20, cornerX, cornerY, buttonList)); + buttonList.add(new GuiNextButton(9, cornerX + xSize - 20 + 24, cornerY - 22, 20, 20, cornerX, cornerY, buttonList)); + } + + setSelectedButton(selectedButton); + + } + + @SideOnly(Side.CLIENT) + private static void setSelectedButton(AbstractTab selectedButton) { + + for (int i = 0; i < tabMap.size(); i++) + { + if (tabMap.get(i).equals(selectedButton)) { + getPlayer().getEntityData().setInteger(Selected_Button, i); + return; + } + } + + } + + @SideOnly(Side.CLIENT) + public static AbstractTab getSelectedButton() { + return tabMap.get(getPlayer().getEntityData().getInteger(Selected_Button)); + } + + @SideOnly(Side.CLIENT) + private static ArrayList getTabListFromPage(int i) { + + ArrayList tabs = new ArrayList(); + ArrayList now = getUpdateTab(); + int j = i - 1; + + if (i > getPageSize()) { + setSelectPage(1); + j = 0; + } + + for (int k = j * 5; k < now.size() && k < (j * 5 + 5); k++) { + tabs.add(now.get(k)); + } + + return tabs; + + } + + @SideOnly(Side.CLIENT) + private static ArrayList getUpdateTab() + { + ArrayList tabs = new ArrayList(); + + for (int i = 1; i < tabMap.size(); i++) + { + AbstractTab t = tabMap.get(i); + if (t.shouldAddToList()) + { + tabs.add(t); + } + } + + return tabs; + + } + + public static int getPageSize() { + ArrayList naw = getUpdateTab(); + + return naw.size() % 5 == 0 ? naw.size() / 5 : (naw.size() / 5) + 1; + } + + public static int getSelectPage() + { + int i = getPlayer().getEntityData().getInteger(Select_Page); + if (i == 0) { + setSelectPage(1); + return 1; + } return i; - } - - public static void setSelectPage(int i){ - getPlayer().getEntityData().setInteger(Select_Page, i); - } - - public static void openInventoryGui () - { - mc.thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow(mc.thePlayer.openContainer.windowId)); - GuiInventory inventory = new GuiInventory(mc.thePlayer); - mc.displayGuiScreen(inventory); - } + } + + public static void setSelectPage(int i) { + getPlayer().getEntityData().setInteger(Select_Page, i); + } + + public static void openInventoryGui() + { + mc.thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow(mc.thePlayer.openContainer.windowId)); + GuiInventory inventory = new GuiInventory(mc.thePlayer); + mc.displayGuiScreen(inventory); + } } diff --git a/src/main/java/shift/sextiarysector/item/GearForceItemManager.java b/src/main/java/shift/sextiarysector/item/GearForceItemManager.java index e1638f3..3fafccd 100644 --- a/src/main/java/shift/sextiarysector/item/GearForceItemManager.java +++ b/src/main/java/shift/sextiarysector/item/GearForceItemManager.java @@ -6,8 +6,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import shift.sextiarysector.api.machine.item.IGearForceItem; -import shift.sextiarysector.api.machine.item.IGearForceItemManager; +import shift.sextiarysector.api.gearforce.item.IGearForceItem; +import shift.sextiarysector.api.gearforce.item.IGearForceItemManager; public class GearForceItemManager implements IGearForceItemManager { diff --git a/src/main/java/shift/sextiarysector/item/ISSEquipment.java b/src/main/java/shift/sextiarysector/item/ISSEquipment.java index e0522a1..a2d57f0 100644 --- a/src/main/java/shift/sextiarysector/item/ISSEquipment.java +++ b/src/main/java/shift/sextiarysector/item/ISSEquipment.java @@ -2,7 +2,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import shift.sextiarysector.player.EquipmentType; +import shift.sextiarysector.api.equipment.EquipmentType; public interface ISSEquipment { diff --git a/src/main/java/shift/sextiarysector/item/ItemContactLenses.java b/src/main/java/shift/sextiarysector/item/ItemContactLenses.java new file mode 100644 index 0000000..445d4b6 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemContactLenses.java @@ -0,0 +1,39 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; + +public class ItemContactLenses extends Item implements IEquipment { + + public ItemContactLenses() { + this.setCreativeTab(SextiarySectorAPI.TabSSPlayer); + } + + @Override + public boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return equipment.ordinal() == EquipmentType.Face.ordinal(); + } + + @Override + public boolean isItemValid(EquipmentType equipment, ItemStack stack) { + return equipment.ordinal() == EquipmentType.Face.ordinal(); + } + + @Override + public void onUpdate(EquipmentType equipment, ItemStack stack, World world, Entity player, int slot) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return true; + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java b/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java index 64c487d..6d45e80 100644 --- a/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java +++ b/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java @@ -1,22 +1,21 @@ package shift.sextiarysector.item; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import shift.sextiarysector.api.IEquipment; +import net.minecraft.world.World; import shift.sextiarysector.api.SextiarySectorAPI; -import shift.sextiarysector.api.machine.item.IGearForceGridItem; -import shift.sextiarysector.player.EquipmentType; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.gearforce.item.IGearForceGridItem; -public class ItemGFContactLenses extends Item implements IEquipment, IGearForceGridItem{ +public class ItemGFContactLenses extends ItemContactLenses implements IGearForceGridItem { - public ItemGFContactLenses(){ + public ItemGFContactLenses() { this.setCreativeTab(SextiarySectorAPI.TabSSPlayer); } - @Override - public boolean canTakeStack(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + public boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player) { return equipment.ordinal() == EquipmentType.Face.ordinal(); } @@ -25,4 +24,15 @@ public boolean isItemValid(EquipmentType equipment, ItemStack stack) { return equipment.ordinal() == EquipmentType.Face.ordinal(); } + @Override + public void onUpdate(EquipmentType equipment, ItemStack stack, World world, Entity player, int slot) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return true; + } + } diff --git a/src/main/java/shift/sextiarysector/item/ItemGFHammer.java b/src/main/java/shift/sextiarysector/item/ItemGFHammer.java index 629ee39..c918843 100644 --- a/src/main/java/shift/sextiarysector/item/ItemGFHammer.java +++ b/src/main/java/shift/sextiarysector/item/ItemGFHammer.java @@ -2,8 +2,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import shift.sextiarysector.api.machine.item.IHammer; -import shift.sextiarysector.api.machine.item.ItemGearForce; +import shift.sextiarysector.api.gearforce.item.IHammer; +import shift.sextiarysector.api.gearforce.item.ItemGearForce; public class ItemGFHammer extends ItemGearForce implements IHammer { diff --git a/src/main/java/shift/sextiarysector/item/ItemGearStorage.java b/src/main/java/shift/sextiarysector/item/ItemGearStorage.java index e22429d..173d85d 100644 --- a/src/main/java/shift/sextiarysector/item/ItemGearStorage.java +++ b/src/main/java/shift/sextiarysector/item/ItemGearStorage.java @@ -3,8 +3,8 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import shift.sextiarysector.api.machine.item.GearForceItem; -import shift.sextiarysector.api.machine.item.ItemGearForce; +import shift.sextiarysector.api.gearforce.item.GearForceItemAPI; +import shift.sextiarysector.api.gearforce.item.ItemGearForce; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -20,7 +20,7 @@ public ItemGearStorage(int power, int maxSpeed, int slot) { public IIcon getIconIndex(ItemStack p_77650_1_) { - if(GearForceItem.manager.getSpeed(p_77650_1_)>0){ + if(GearForceItemAPI.manager.getSpeed(p_77650_1_)>0){ return this.full; } @@ -29,7 +29,7 @@ public IIcon getIconIndex(ItemStack p_77650_1_) public IIcon getIcon(ItemStack stack, int pass) { - if(GearForceItem.manager.getSpeed(stack)>0){ + if(GearForceItemAPI.manager.getSpeed(stack)>0){ return this.full; } diff --git a/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java b/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java index b61d94a..4289110 100644 --- a/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java +++ b/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java @@ -1,24 +1,26 @@ package shift.sextiarysector.item; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import shift.sextiarysector.api.IEquipment; +import net.minecraft.world.World; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; import shift.sextiarysector.packet.PacketGuiId; import shift.sextiarysector.packet.SSPacketHandler; -import shift.sextiarysector.player.EquipmentType; -public class ItemGuiUnit extends Item implements IEquipment , ISSEquipment{ +public class ItemGuiUnit extends Item implements IEquipment, ISSEquipment { public int guiID; - public ItemGuiUnit(int gui){ + public ItemGuiUnit(int gui) { this.guiID = gui; this.setMaxStackSize(1); } @Override - public boolean canTakeStack(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + public boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player) { return equipment.equals(EquipmentType.Unit); } @@ -28,19 +30,30 @@ public boolean isItemValid(EquipmentType equipment, ItemStack stack) { } @Override - public boolean shouldAddToList(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + public boolean shouldAddToList(EquipmentType equipment, ItemStack stack, EntityPlayer player) { return true; } @Override - public void onTabClicked(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + public void onTabClicked(EquipmentType equipment, ItemStack stack, EntityPlayer player) { SSPacketHandler.INSTANCE.sendToServer(new PacketGuiId(guiID)); } @Override - public String getTabName(EquipmentType equipment, ItemStack stack,EntityPlayer player) { - return this.getUnlocalizedName() ; + public String getTabName(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return this.getUnlocalizedName(); + } + + @Override + public void onUpdate(EquipmentType equipment, ItemStack stack, World world, Entity player, int slot) { + + } + + @Override + public boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + // TODO 自動生成されたメソッド・スタブ + return false; } } diff --git a/src/main/java/shift/sextiarysector/item/ItemHammer.java b/src/main/java/shift/sextiarysector/item/ItemHammer.java index b4993cf..0000b19 100644 --- a/src/main/java/shift/sextiarysector/item/ItemHammer.java +++ b/src/main/java/shift/sextiarysector/item/ItemHammer.java @@ -5,7 +5,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.ForgeHooks; -import shift.sextiarysector.api.machine.item.IHammer; +import shift.sextiarysector.api.gearforce.item.IHammer; public class ItemHammer extends Item implements IHammer { diff --git a/src/main/java/shift/sextiarysector/item/ItemOxygenTank.java b/src/main/java/shift/sextiarysector/item/ItemOxygenTank.java new file mode 100644 index 0000000..8d5dbea --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemOxygenTank.java @@ -0,0 +1,235 @@ +package shift.sextiarysector.item; + +import java.text.NumberFormat; +import java.util.List; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; +import shift.sextiarysector.SSFluids; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemOxygenTank extends Item implements IEquipment, IFluidContainerItem { + + protected int capacity; + + public ItemOxygenTank() + { + super(); + this.capacity = FluidContainerRegistry.BUCKET_VOLUME * 32;//capacity; + this.setMaxStackSize(1); + } + + @Override + public boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return equipment.ordinal() == EquipmentType.Bag.ordinal(); + } + + @Override + public boolean isItemValid(EquipmentType equipment, ItemStack stack) { + return equipment.ordinal() == EquipmentType.Bag.ordinal(); + } + + @Override + public void onUpdate(EquipmentType equipment, ItemStack stack, World world, Entity player, int slot) { + + if (this.getFluid(stack) == null) return; + if (this.getFluid(stack).amount < 50) return; + if (!player.isInsideOfMaterial(Material.water)) return; + + if (player.worldObj.getWorldTime() % 50 == 0) { + player.setAir(300); + this.drain(stack, 50, true); + } + + } + + @Override + public boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return true; + } + + @SideOnly(Side.CLIENT) + @Override + public void addInformation(ItemStack itemStack, EntityPlayer par3EntityPlayer, List list, boolean par4) + { + + String f = "None"; + int amount = 0; + + if (this.getFluid(itemStack) != null) + { + f = this.getFluid(itemStack).getFluid().getLocalizedName(this.getFluid(itemStack)); + amount = this.getFluid(itemStack).amount; + } + + NumberFormat nf = NumberFormat.getNumberInstance(); + + list.add("Fluid : " + f); + list.add("Amount : " + nf.format(amount) + " / " + nf.format(this.capacity) + " mB"); + + } + + @Override + public boolean showDurabilityBar(ItemStack stack) + { + + //if (this.getFluidAmount(stack) == 0) return false; + + return true;//stack.isItemDamaged(); + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) + { + return 1.0D - (double) this.getFluidAmount(stack) / (double) this.capacity; + } + + /* IFluidContainerItem */ + @Override + public FluidStack getFluid(ItemStack container) + { + if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) + { + return null; + } + return FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); + } + + @Override + public int getCapacity(ItemStack container) + { + return capacity; + } + + @Override + public int fill(ItemStack container, FluidStack resource, boolean doFill) + { + if (resource == null) + { + return 0; + } + + if (resource.getFluid().getID() != SSFluids.oxygen.getID()) return 0; + + if (!doFill) + { + if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) + { + return Math.min(capacity, resource.amount); + } + + FluidStack stack = FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); + + if (stack == null) + { + return Math.min(capacity, resource.amount); + } + + if (!stack.isFluidEqual(resource)) + { + return 0; + } + + return Math.min(capacity - stack.amount, resource.amount); + } + + if (container.stackTagCompound == null) + { + container.stackTagCompound = new NBTTagCompound(); + } + + if (!container.stackTagCompound.hasKey("Fluid")) + { + NBTTagCompound fluidTag = resource.writeToNBT(new NBTTagCompound()); + + if (capacity < resource.amount) + { + fluidTag.setInteger("Amount", capacity); + container.stackTagCompound.setTag("Fluid", fluidTag); + return capacity; + } + + container.stackTagCompound.setTag("Fluid", fluidTag); + return resource.amount; + } + + NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid"); + FluidStack stack = FluidStack.loadFluidStackFromNBT(fluidTag); + + if (!stack.isFluidEqual(resource)) + { + return 0; + } + + int filled = capacity - stack.amount; + if (resource.amount < filled) + { + stack.amount += resource.amount; + filled = resource.amount; + } + else + { + stack.amount = capacity; + } + + container.stackTagCompound.setTag("Fluid", stack.writeToNBT(fluidTag)); + return filled; + } + + @Override + public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) + { + if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) + { + return null; + } + + FluidStack stack = FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); + if (stack == null) + { + return null; + } + + int currentAmount = stack.amount; + stack.amount = Math.min(stack.amount, maxDrain); + if (doDrain) + { + if (currentAmount == stack.amount) + { + container.stackTagCompound.removeTag("Fluid"); + + if (container.stackTagCompound.hasNoTags()) + { + container.stackTagCompound = null; + } + return stack; + } + + NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid"); + fluidTag.setInteger("Amount", currentAmount - stack.amount); + container.stackTagCompound.setTag("Fluid", fluidTag); + } + return stack; + } + + public int getFluidAmount(ItemStack container) { + + if (this.getFluid(container) == null) { + return 0; + } + return this.getFluid(container).amount; + + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemProtectionRing.java b/src/main/java/shift/sextiarysector/item/ItemProtectionRing.java new file mode 100644 index 0000000..83e543e --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemProtectionRing.java @@ -0,0 +1,14 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.api.equipment.EquipmentType; + +public class ItemProtectionRing extends ItemRing { + + @Override + public boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return false; + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemRing.java b/src/main/java/shift/sextiarysector/item/ItemRing.java new file mode 100644 index 0000000..036b778 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemRing.java @@ -0,0 +1,37 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; + +public class ItemRing extends Item implements IEquipment { + + public ItemRing() { + this.setMaxStackSize(1); + } + + @Override + public boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return equipment.ordinal() == EquipmentType.Ring.ordinal(); + } + + @Override + public boolean isItemValid(EquipmentType equipment, ItemStack stack) { + return equipment.ordinal() == EquipmentType.Ring.ordinal(); + } + + @Override + public void onUpdate(EquipmentType equipment, ItemStack stack, World world, Entity player, int slot) { + + } + + @Override + public boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return true; + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemRucksack.java b/src/main/java/shift/sextiarysector/item/ItemRucksack.java index 11e9c9c..e0e1c45 100644 --- a/src/main/java/shift/sextiarysector/item/ItemRucksack.java +++ b/src/main/java/shift/sextiarysector/item/ItemRucksack.java @@ -1,34 +1,35 @@ package shift.sextiarysector.item; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import shift.sextiarysector.SextiarySector; -import shift.sextiarysector.api.IEquipment; import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; import shift.sextiarysector.packet.PacketGuiId; import shift.sextiarysector.packet.SSPacketHandler; -import shift.sextiarysector.player.EquipmentType; -public class ItemRucksack extends Item implements IEquipment, ISSEquipment{ +public class ItemRucksack extends Item implements IEquipment, ISSEquipment { public ItemRucksack() - { - super(); - this.setMaxStackSize(1); - this.setCreativeTab(SextiarySectorAPI.TabSSPlayer); - } + { + super(); + this.setMaxStackSize(1); + this.setCreativeTab(SextiarySectorAPI.TabSSPlayer); + } @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) - { - player.openGui(SextiarySector.instance, 205, world, (int)player.posX, (int)player.posY, (int)player.posZ); - return itemStack; - } + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) + { + player.openGui(SextiarySector.instance, 205, world, (int) player.posX, (int) player.posY, (int) player.posZ); + return itemStack; + } @Override - public boolean canTakeStack(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + public boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player) { return equipment.ordinal() == EquipmentType.Bag.ordinal(); } @@ -38,19 +39,29 @@ public boolean isItemValid(EquipmentType equipment, ItemStack stack) { } @Override - public boolean shouldAddToList(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + public boolean shouldAddToList(EquipmentType equipment, ItemStack stack, EntityPlayer player) { return true; } @Override - public void onTabClicked(EquipmentType equipment, ItemStack stack,EntityPlayer player) { + public void onTabClicked(EquipmentType equipment, ItemStack stack, EntityPlayer player) { SSPacketHandler.INSTANCE.sendToServer(new PacketGuiId(206)); } @Override - public String getTabName(EquipmentType equipment, ItemStack stack,EntityPlayer player) { - return this.getUnlocalizedName() ; + public String getTabName(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return this.getUnlocalizedName(); + } + + @Override + public void onUpdate(EquipmentType equipment, ItemStack stack, World world, Entity player, int slot) { + + } + + @Override + public boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return true; } } diff --git a/src/main/java/shift/sextiarysector/item/ItemShopRing.java b/src/main/java/shift/sextiarysector/item/ItemShopRing.java index 4b3ac2a..340a8b1 100644 --- a/src/main/java/shift/sextiarysector/item/ItemShopRing.java +++ b/src/main/java/shift/sextiarysector/item/ItemShopRing.java @@ -1,5 +1,6 @@ package shift.sextiarysector.item; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -7,12 +8,12 @@ import net.minecraftforge.common.MinecraftForge; import shift.mceconomy2.api.MCEconomyAPI; import shift.sextiarysector.SSShops.SSProductList; -import shift.sextiarysector.api.IEquipment; import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; import shift.sextiarysector.api.season.SeasonAPI; import shift.sextiarysector.gui.tab.AbstractTab; import shift.sextiarysector.gui.tab.TabManager; -import shift.sextiarysector.player.EquipmentType; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -112,4 +113,14 @@ public boolean isItemValid(EquipmentType equipment, ItemStack stack) { return equipment.equals(EquipmentType.Ring); } + @Override + public void onUpdate(EquipmentType equipment, ItemStack stack, World world, Entity player, int slot) { + + } + + @Override + public boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return true; + } + } diff --git a/src/main/java/shift/sextiarysector/item/ItemUnit.java b/src/main/java/shift/sextiarysector/item/ItemUnit.java index 3fbfaec..c76bee7 100644 --- a/src/main/java/shift/sextiarysector/item/ItemUnit.java +++ b/src/main/java/shift/sextiarysector/item/ItemUnit.java @@ -1,10 +1,12 @@ package shift.sextiarysector.item; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import shift.sextiarysector.api.IEquipment; -import shift.sextiarysector.player.EquipmentType; +import net.minecraft.world.World; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; public class ItemUnit extends Item implements IEquipment { @@ -22,4 +24,14 @@ public boolean isItemValid(EquipmentType equipment, ItemStack stack) { return equipment.equals(EquipmentType.Unit); } + @Override + public void onUpdate(EquipmentType equipment, ItemStack stack, World world, Entity player, int slot) { + + } + + @Override + public boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player) { + return true; + } + } diff --git a/src/main/java/shift/sextiarysector/nei/ExtractorRecipeHandler.java b/src/main/java/shift/sextiarysector/nei/ExtractorRecipeHandler.java new file mode 100644 index 0000000..2fffd91 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/ExtractorRecipeHandler.java @@ -0,0 +1,61 @@ +package shift.sextiarysector.nei; + +import static codechicken.lib.gui.GuiDraw.*; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraftforge.fluids.FluidContainerRegistry; +import shift.sextiarysector.SSRecipes; +import shift.sextiarysector.gui.GuiExtractor; +import shift.sextiarysector.recipe.RecipeSimpleFluid; + +public class ExtractorRecipeHandler extends SimpleFluidRecipeHandler { + + @Override + Class getHandlerClass() { + return ExtractorRecipeHandler.class; + } + + @Override + String getHandlerName() { + return "SS_Extractor"; + } + + @Override + RecipeSimpleFluid getRecipe() { + return SSRecipes.extractor; + } + + @Override + String getGuiRecipeName() { + return "ss.extractor"; + } + + @Override + public Class getGuiClass() { + return GuiExtractor.class; + } + + @Override + int getMaxFluid() { + return FluidContainerRegistry.BUCKET_VOLUME * 10; + } + + @Override + public String getGuiTexture() { + return "sextiarysector:textures/guis/machine/extractor_nei.png"; + } + + @Override + public void drawExtras(int recipe) + { + //drawProgressBar(52, 25, 176, 0, 14, 14, 48, 7); + drawProgressBar(74, 23, 176, 14, 24, 16, 48, 0); + + if (((SimpleFluidPair) this.arecipes.get(recipe)).fluidStack != null) { + this.drawFluidTank(102, 4, ((SimpleFluidPair) this.arecipes.get(recipe)).fluidStack, 34, 36); + } + + changeTexture(getGuiTexture()); + drawTexturedModalRect(103, 6, 176, 31, 32, 36); + + } +} diff --git a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java index e4351bb..684ec75 100644 --- a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java +++ b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java @@ -1,5 +1,6 @@ package shift.sextiarysector.nei; +import shift.sextiarysector.gui.GuiExtractor; import shift.sextiarysector.gui.GuiFluidFurnace; import shift.sextiarysector.gui.GuiFoodSmokers; import shift.sextiarysector.gui.GuiFreezer; @@ -33,6 +34,9 @@ public void loadConfig() { API.registerRecipeHandler(new SpinningMachineRecipeHandler()); API.registerUsageHandler(new SpinningMachineRecipeHandler()); + API.registerRecipeHandler(new ExtractorRecipeHandler()); + API.registerUsageHandler(new ExtractorRecipeHandler()); + API.registerRecipeHandler(new PulverizerRecipeHandler()); API.registerUsageHandler(new PulverizerRecipeHandler()); @@ -102,6 +106,7 @@ public void loadConfig() { API.registerGuiOverlay(GuiLoom.class, "SS_Loom"); API.registerGuiOverlay(GuiSawmill.class, "SS_Sawmill"); API.registerGuiOverlay(GuiSpinningMachine.class, "SS_SpinningMachine"); + API.registerGuiOverlay(GuiExtractor.class, "SS_Extractor"); API.registerGuiOverlay(GuiPulverizer.class, "SS_Pulverizer"); API.registerGuiOverlay(GuiRollingMachine.class, "SS_RollingMachine"); API.registerGuiOverlay(GuiManaSqueezer.class, "SS_ManaSqueezer"); diff --git a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java index fcaf2ef..a3eb361 100644 --- a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java +++ b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java @@ -33,6 +33,7 @@ public void onUpdateEntity(EntityPlayer entityPlayer) this.moisture.onUpdate(entityPlayer); this.stamina.onUpdate(entityPlayer); + this.equipment.onUpdate(entityPlayer); } diff --git a/src/main/java/shift/sextiarysector/player/EquipmentStats.java b/src/main/java/shift/sextiarysector/player/EquipmentStats.java index d6df024..c3c3849 100644 --- a/src/main/java/shift/sextiarysector/player/EquipmentStats.java +++ b/src/main/java/shift/sextiarysector/player/EquipmentStats.java @@ -2,26 +2,36 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.api.equipment.IEquipment; import shift.sextiarysector.container.InventoryPlayerNext; - public class EquipmentStats { public final String NBT_ID = "ssequipment"; public InventoryPlayerNext inventory; - public EquipmentStats(EntityPlayer player){ + public EquipmentStats(EntityPlayer player) { inventory = new InventoryPlayerNext(player); } - public void onUpdateEntity() - { + public void onUpdate(EntityPlayer entityPlayer) { + + for (int i = 0; i < inventory.getSizeInventory(); i++) { + + if (inventory.getStackInSlot(i) == null) continue; + if (!(inventory.getStackInSlot(i).getItem() instanceof IEquipment)) continue; + + IEquipment e = (IEquipment) inventory.getStackInSlot(i).getItem(); - } + e.onUpdate(EquipmentType.getEquipmentTypeFromSlot(i), inventory.getStackInSlot(i), entityPlayer.worldObj, entityPlayer, i); + } + + } public void writeNBT(NBTTagCompound compound) { @@ -35,7 +45,7 @@ public void writeNBT(NBTTagCompound compound) { public void readNBT(NBTTagCompound compound) { - if(compound.hasKey(NBT_ID)){ + if (compound.hasKey(NBT_ID)) { inventory.readFromNBT(compound.getCompoundTag(NBT_ID)); } diff --git a/src/main/java/shift/sextiarysector/player/EquipmentType.java b/src/main/java/shift/sextiarysector/player/EquipmentType.java deleted file mode 100644 index 246cfe8..0000000 --- a/src/main/java/shift/sextiarysector/player/EquipmentType.java +++ /dev/null @@ -1,71 +0,0 @@ -package shift.sextiarysector.player; - -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; - -public enum EquipmentType { - - Necklace("necklace",new int[]{0}), - Ring("ring",new int[]{1,2,3}), - Face("face",new int[]{4}), - Bag("bag", new int[]{5}), - Hand("hand",new int[]{6}), - Belt("belt",new int[]{7}), - Unit("unit",new int[]{8,9,10,11,12,13,14,15}), - Other("other",new int[]{16,17,18,19}) - ; - - private IIcon icon; - private String iconName; - private int[] slot; - - EquipmentType(String name,int[] slot){ - this.iconName = name; - this.slot = slot; - } - - public void registerIcon(TextureMap map){ - this.setIcon(map.registerIcon("sextiarysector:gui/slot_"+this.iconName)); - } - - public IIcon getIcon() { - return icon; - } - - public void setIcon(IIcon icon) { - this.icon = icon; - } - - public int[] getSlot(){ - return this.slot; - } - - public static EquipmentType getEquipmentTypeFromSlot(int slot){ - - switch(slot){ - case 0 : return Necklace; - - case 1 : - case 2 : - case 3 : - return Ring; - - case 4 : return Face; - case 5 : return Bag; - case 6 : return Hand; - case 7 : return Belt; - - case 8 : - case 9 : - case 10 : - case 11 : - case 12 : - case 13 : - case 14 : - case 15 : - return Unit; - } - return Other; - } - -} diff --git a/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java b/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java index 32d7fd8..08d4531 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginComputerCraft.java @@ -8,7 +8,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SSItems; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -106,12 +106,12 @@ public TurtleCommandResult useTool(ITurtleAccess turtle,TurtleSide side, TurtleV } TileEntity t = world.getTileEntity(newX, newY, newZ); - if(t instanceof IGFEnergyHandler){ + if(t instanceof IGearForceHandler){ if(verb==TurtleVerb.Attack){ - return this.addEnergy(turtle, (IGFEnergyHandler) t,ForgeDirection.getOrientation(direction) ); + return this.addEnergy(turtle, (IGearForceHandler) t,ForgeDirection.getOrientation(direction) ); }else{ - return this.getEnergy(turtle, (IGFEnergyHandler) t, ForgeDirection.getOrientation(direction) ); + return this.getEnergy(turtle, (IGearForceHandler) t, ForgeDirection.getOrientation(direction) ); } } @@ -119,7 +119,7 @@ public TurtleCommandResult useTool(ITurtleAccess turtle,TurtleSide side, TurtleV return TurtleCommandResult.failure(); } - private TurtleCommandResult addEnergy(ITurtleAccess turtle,IGFEnergyHandler h,ForgeDirection direction){ + private TurtleCommandResult addEnergy(ITurtleAccess turtle,IGearForceHandler h,ForgeDirection direction){ if(turtle.getFuelLevel()>0){ @@ -136,7 +136,7 @@ private TurtleCommandResult addEnergy(ITurtleAccess turtle,IGFEnergyHandler h,Fo } - private TurtleCommandResult getEnergy(ITurtleAccess turtle,IGFEnergyHandler h,ForgeDirection direction){ + private TurtleCommandResult getEnergy(ITurtleAccess turtle,IGearForceHandler h,ForgeDirection direction){ int i = h.drawEnergy(direction.getOpposite(), 1, 100, true)/10; if(i>0){ diff --git a/src/main/java/shift/sextiarysector/plugin/PluginRF.java b/src/main/java/shift/sextiarysector/plugin/PluginRF.java new file mode 100644 index 0000000..0fae71a --- /dev/null +++ b/src/main/java/shift/sextiarysector/plugin/PluginRF.java @@ -0,0 +1,67 @@ +package shift.sextiarysector.plugin; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraftforge.oredict.ShapedOreRecipe; +import shift.sextiarysector.SSItems; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.block.BlockGFDynamo; +import shift.sextiarysector.item.ItemBlockDirection; +import shift.sextiarysector.renderer.block.RendererGFDynamo; +import shift.sextiarysector.tileentity.TileEntityGFDynamo; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PluginRF implements IPlugin { + + @Override + public String getModName() { + return "RF"; + } + + public static int gfDynamoType; + public static Block gfDynamo; + + @Override + public void prePlugin(FMLPreInitializationEvent event) { + + gfDynamo = new BlockGFDynamo().setBlockName("ss.gf_dynamo").setBlockTextureName("stone").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerBlock(gfDynamo, ItemBlockDirection.class, "GFDynamo"); + GameRegistry.registerTileEntity(TileEntityGFDynamo.class, "GFDynamo"); + + } + + @Override + @SideOnly(Side.CLIENT) + public void preClientPlugin(FMLPreInitializationEvent event) { + + gfDynamoType = cpw.mods.fml.client.registry.RenderingRegistry.getNextAvailableRenderId(); + cpw.mods.fml.client.registry.RenderingRegistry.registerBlockHandler(new RendererGFDynamo()); + cpw.mods.fml.client.registry.ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGFDynamo.class, new RendererGFDynamo()); + + } + + @Override + public void initPlugin(FMLInitializationEvent event) { + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(this.gfDynamo, 1), + new Object[] { " z ", "yxy", "xax", + Character.valueOf('x'), "ingotSteel", + Character.valueOf('y'), SSItems.energyReactor, + Character.valueOf('z'), SSItems.redGel, + Character.valueOf('a'), "gearSteel", + })); + + } + + @Override + public void postPlugin(FMLPostInitializationEvent event) { + + } + +} diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTcon.java b/src/main/java/shift/sextiarysector/plugin/PluginTcon.java index ca4ae84..1479127 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTcon.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTcon.java @@ -3,10 +3,12 @@ import java.lang.reflect.Field; import java.util.ArrayList; +import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraftforge.client.event.GuiScreenEvent; import net.minecraftforge.common.MinecraftForge; import shift.sextiarysector.gui.tab.TabManager; +import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -14,11 +16,14 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class PluginTcon implements IPlugin{ +public class PluginTcon implements IPlugin { @SideOnly(Side.CLIENT) private static TconTab openTab; + @SideOnly(Side.CLIENT) + private static Minecraft mc; + @Override public String getModName() { return "TConstruct"; @@ -35,6 +40,8 @@ public void preClientPlugin(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); + mc = FMLClientHandler.instance().getClient(); + } @Override @@ -44,39 +51,44 @@ public void initPlugin(FMLInitializationEvent event) { } @SideOnly(Side.CLIENT) - @SubscribeEvent - public void guiPostInit (GuiScreenEvent.InitGuiEvent.Post event) - { + @SubscribeEvent + public void guiPostInit(GuiScreenEvent.InitGuiEvent.Post event) + { + + if (openTab != null) + { - if (openTab!=null) - { + int xSize = 176; + int ySize = 166; + int guiLeft = (event.gui.width - xSize) / 2; + int guiTop = (event.gui.height - ySize) / 2; - int xSize = 176; - int ySize = 166; - int guiLeft = (event.gui.width - xSize) / 2; - int guiTop = (event.gui.height - ySize) / 2; + if (!this.mc.thePlayer.getActivePotionEffects().isEmpty()) + { + guiLeft = 160 + (event.gui.width - xSize - 200) / 2; + } - TabManager.updateTabValues(guiLeft, guiTop,event.buttonList, openTab, false); + TabManager.updateTabValues(guiLeft, guiTop, event.buttonList, openTab, false); - openTab = null; + openTab = null; - } + } - } + } @Override public void postPlugin(FMLPostInitializationEvent event) { - if(event.getSide().isClient())clientPost(); + if (event.getSide().isClient()) clientPost(); } @SideOnly(Side.CLIENT) - public void clientPost(){ + public void clientPost() { ArrayList tabs = tconstruct.client.tabs.TabRegistry.getTabList(); - for(int i=1;i clazz; + try { + clazz = Class.forName("cofh.api.energy.IEnergyHandler"); + } catch (ClassNotFoundException e) { + return false; + } catch (Exception e) { + return false; + } + + return true; + + } + } diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 1a519cf..4c3509b 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -25,6 +25,7 @@ import shift.sextiarysector.renderer.block.RendererFunnel; import shift.sextiarysector.renderer.block.RendererGearShaft; import shift.sextiarysector.renderer.block.RendererHole; +import shift.sextiarysector.renderer.block.RendererLargeWindmill; import shift.sextiarysector.renderer.block.RendererMonitor; import shift.sextiarysector.renderer.block.RendererPaddy; import shift.sextiarysector.renderer.block.RendererPipe; @@ -46,6 +47,7 @@ import shift.sextiarysector.tileentity.TileEntityFigure; import shift.sextiarysector.tileentity.TileEntityFluidCrafter; import shift.sextiarysector.tileentity.TileEntityGearShaft; +import shift.sextiarysector.tileentity.TileEntityLargeWindmill; import shift.sextiarysector.tileentity.TileEntityMonitor; import shift.sextiarysector.tileentity.TileEntityPipe; import shift.sextiarysector.tileentity.TileEntitySSChest; @@ -96,6 +98,7 @@ public void setCustomRenderers() { this.smallWindMillType = RenderingRegistry.getNextAvailableRenderId(); this.windMillType = RenderingRegistry.getNextAvailableRenderId(); + this.largeWindMillType = RenderingRegistry.getNextAvailableRenderId(); this.smallWaterwheel = RenderingRegistry.getNextAvailableRenderId(); this.steamMotorType = RenderingRegistry.getNextAvailableRenderId(); @@ -132,6 +135,7 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererSmallWindmill()); RenderingRegistry.registerBlockHandler(new RendererWindmill()); + RenderingRegistry.registerBlockHandler(new RendererLargeWindmill()); RenderingRegistry.registerBlockHandler(new RendererSmallWaterwheel()); RenderingRegistry.registerBlockHandler(new RendererSteamMotor()); @@ -173,6 +177,7 @@ public void setCustomClientRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallWindmill.class, new RendererSmallWindmill()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWindmill.class, new RendererWindmill()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLargeWindmill.class, new RendererLargeWindmill()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallWaterwheel.class, new RendererSmallWaterwheel()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySteamMotor.class, new RendererSteamMotor()); diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index a057ddc..4002bd4 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -25,6 +25,7 @@ public class CommonProxy { public int smallWindMillType; public int windMillType; + public int largeWindMillType; public int smallWaterwheel; public int steamMotorType; diff --git a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java index 8334bd7..74919ef 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleFluid.java @@ -9,22 +9,26 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; +import shift.sextiarysector.api.recipe.IFluidRecipe; -public class RecipeSimpleFluid { +public class RecipeSimpleFluid implements IFluidRecipe { protected final HashMap metaSimpleMachineList = new HashMap(); protected final HashMap oreSimpleMachineList = new HashMap(); + @Override public void add(ItemStack par1ItemStack, ItemStack par2ItemStack, FluidStack par3FluidStack) { metaSimpleMachineList.put(par1ItemStack, new Object[] { par2ItemStack, par3FluidStack }); } + @Override public void add(String par1String, ItemStack par2ItemStack, FluidStack par3FluidStack) { oreSimpleMachineList.put(par1String, new Object[] { par2ItemStack, par3FluidStack }); } + @Override public ItemStack getResult(ItemStack item) { if (item == null) @@ -61,6 +65,7 @@ public ItemStack getResult(ItemStack item) //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); } + @Override public FluidStack getFluidResult(ItemStack item) { if (item == null) @@ -102,11 +107,13 @@ private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == OreDictionary.WILDCARD_VALUE || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); } + @Override public Map getMetaList() { return metaSimpleMachineList; } + @Override public Map getOreList() { return oreSimpleMachineList; diff --git a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleMachine.java index d46de88..1665830 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipeSimpleMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipeSimpleMachine.java @@ -8,69 +8,74 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import shift.sextiarysector.api.recipe.INormalRecipe; -public class RecipeSimpleMachine { +public class RecipeSimpleMachine implements INormalRecipe { protected final HashMap metaSimpleMachineList = new HashMap(); protected final HashMap oreSimpleMachineList = new HashMap(); + @Override public void add(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - metaSimpleMachineList.put(par1ItemStack, par2ItemStack); - } + { + metaSimpleMachineList.put(par1ItemStack, par2ItemStack); + } + @Override public void add(String par1String, ItemStack par2ItemStack) - { + { oreSimpleMachineList.put(par1String, par2ItemStack); - } + } + @Override public ItemStack getResult(ItemStack item) - { - if (item == null) - { - return null; - } - for (String key : oreSimpleMachineList.keySet()) { - ArrayList items = OreDictionary.getOres(key); - for(int i = 0; i< items.size() ; i++){ - if(checkItem(item,items.get(i))){ - return oreSimpleMachineList.get(key).copy(); - } - } - } - - Iterator iterator = this.metaSimpleMachineList.entrySet().iterator(); - Entry entry; - - do - { - if (!iterator.hasNext()) - { - return null; - } - - entry = (Entry)iterator.next(); - } - while (!this.checkItem(item, (ItemStack)entry.getKey())); - - return ((ItemStack) entry.getValue()).copy(); - - //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); - } + { + if (item == null) + { + return null; + } + for (String key : oreSimpleMachineList.keySet()) { + ArrayList items = OreDictionary.getOres(key); + for (int i = 0; i < items.size(); i++) { + if (checkItem(item, items.get(i))) { + return oreSimpleMachineList.get(key).copy(); + } + } + } + + Iterator iterator = this.metaSimpleMachineList.entrySet().iterator(); + Entry entry; + + do + { + if (!iterator.hasNext()) + { + return null; + } + + entry = (Entry) iterator.next(); + } while (!this.checkItem(item, (ItemStack) entry.getKey())); + + return ((ItemStack) entry.getValue()).copy(); + + //return metaSimpleMachineList.get( (Arrays.asList( item.itemID, item.getItemDamage() ) )); + } private boolean checkItem(ItemStack p_151397_1_, ItemStack p_151397_2_) - { - return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); - } + { + return p_151397_2_.getItem() == p_151397_1_.getItem() && (p_151397_2_.getItemDamage() == 32767 || p_151397_2_.getItemDamage() == p_151397_1_.getItemDamage()); + } + @Override public Map getMetaList() - { - return metaSimpleMachineList; - } + { + return metaSimpleMachineList; + } + @Override public Map getOreList() - { - return oreSimpleMachineList; - } + { + return oreSimpleMachineList; + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index 1e94d3b..350d641 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -27,6 +27,12 @@ public static void addRecipes(CraftingManager p_77608_1_) 'x', "paneGlassColorless", })); + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(SSItems.redGel, 1), + new Object[] { + "dustRedstone", + "slimeball" + })); + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(SSItems.blueGel, 1), new Object[] { "dustBluestone", @@ -53,6 +59,19 @@ public static void addRecipes(CraftingManager p_77608_1_) 'y', "stickWood", })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.stringMass, 1), + new Object[] { + "xxx", "xxx", "xxx", + 'x', Items.string, + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.strongStringBobbin, 1), + new Object[] { + "xxx", "xyx", "xxx", + 'x', SSItems.strongString, + 'y', "stickWood", + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.woodHopper, 1), new Object[] { "y y", "yxy", " y ", @@ -93,6 +112,13 @@ public static void addRecipes(CraftingManager p_77608_1_) 'x', SSItems.cloth, })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.oxygenTank, 1), + new Object[] { + "x x", "xyx", "x x", + 'x', SSItems.strongString, + 'y', SSBlocks.tank, + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.mineboatChest, 1), new Object[] { "x", "y", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesExtractor.java b/src/main/java/shift/sextiarysector/recipe/RecipesExtractor.java new file mode 100644 index 0000000..c7c8b31 --- /dev/null +++ b/src/main/java/shift/sextiarysector/recipe/RecipesExtractor.java @@ -0,0 +1,20 @@ +package shift.sextiarysector.recipe; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import shift.sextiarysector.SSFluids; + +public class RecipesExtractor { + + public static void addRecipes(RecipeSimpleFluid recipe) + { + + //recipe.add("logWood", null, new FluidStack(SSFluids.oxygen, 50)); + recipe.add("treeLeaves", null, new FluidStack(SSFluids.oxygen, 200)); + recipe.add(new ItemStack(Blocks.grass), new ItemStack(Items.clay_ball), new FluidStack(SSFluids.oxygen, 50)); + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index 26f278d..60160a9 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -33,6 +33,12 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) "fluidWater", })); + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.slime_ball, 1), + new Object[] { + "dyeGreen", + "fluidSap", + })); + /* p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.slime_ball, 2), new Object[] { @@ -66,6 +72,12 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) "condimentCocoa", })); + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.redGel, 2), + new Object[] { + "dustRedstone", + "slimeball" + })); + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.blueGel, 2), new Object[] { "dustBluestone", @@ -134,6 +146,22 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) BlockMonitor.getMonitor(MonitorType.creeper) })); + //MPRing + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.mpRing, 1), + new Object[] { + "ringIron", + SSItems.magicDust, + "dustGold" + })); + + //XPRing + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.xpRing, 1), + new Object[] { + "ringIron", + SSItems.magicDust, + new ItemStack(Items.dye, 1, 4) + })); + //液体カマド p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.fluidFurnace, 1), new Object[] { "xxx", "xyx", "xxx", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java b/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java index 7b7b0d2..f0ba94a 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java @@ -7,15 +7,15 @@ public class RecipesLoom { public static void addRecipes(RecipeSimpleMachine recipe) - { + { //風車 - recipe.add(new ItemStack(SSItems.stringBobbin,1),new ItemStack(SSItems.cloth, 1)); - recipe.add(new ItemStack(SSItems.fleshBobbin,1),new ItemStack(Items.leather, 1)); - recipe.add(new ItemStack(Items.reeds,1),new ItemStack(Items.paper, 2)); + recipe.add(new ItemStack(SSItems.stringBobbin, 1), new ItemStack(SSItems.cloth, 1)); + recipe.add(new ItemStack(SSItems.strongStringBobbin, 1), new ItemStack(SSItems.strongCloth, 1)); + recipe.add(new ItemStack(SSItems.fleshBobbin, 1), new ItemStack(Items.leather, 1)); + recipe.add(new ItemStack(Items.reeds, 1), new ItemStack(Items.paper, 2)); //recipe.add(new ItemStack(Items,1),new ItemStack(SSItems.cloth, 1)); - - } + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index b71f3dd..daf5fb4 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -80,6 +80,18 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('p'), "ingotSteel" })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.strongCanvas, 1), + new Object[] { "xxy", "xxy", " y", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.strongCloth + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.largeWindmill, 1), + new Object[] { " x ", "xyx", " x ", + Character.valueOf('y'), SSBlocks.steelShaft, + Character.valueOf('x'), SSItems.strongCanvas + })); + for (int i = 0; i < 5; i++) { p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(shaft[i], 4), @@ -174,6 +186,14 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('a'), "gemDiamond" })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.extractor, 1), + new Object[] { "yyy", "aza", "yxy", + Character.valueOf('y'), "plankWood", + Character.valueOf('x'), SSItems.steelGFStorage, + Character.valueOf('z'), SSItems.steelUnitGear, + Character.valueOf('a'), "containerBottle" + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.fan, 1), new Object[] { "yay", "zxz", "zbz", Character.valueOf('y'), "ingotBrass", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMillstone.java b/src/main/java/shift/sextiarysector/recipe/RecipesMillstone.java index c06af10..1f4db41 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMillstone.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMillstone.java @@ -5,24 +5,23 @@ import net.minecraft.item.ItemStack; import shift.sextiarysector.SSItems; - public class RecipesMillstone { public static void addRecipes(RecipeSimpleMachine recipe) - { + { //バニラ - recipe.add(new ItemStack(Blocks.red_flower,1),new ItemStack(Items.dye, 4, 1)); - recipe.add(new ItemStack(Blocks.yellow_flower,1),new ItemStack(Items.dye, 4, 11)); - recipe.add(new ItemStack(Blocks.gravel,1),new ItemStack(Items.flint, 4)); - recipe.add(new ItemStack(Items.reeds,1),new ItemStack(Items.sugar, 4)); - recipe.add(new ItemStack(Items.bone,1),new ItemStack(Items.dye, 4, 15)); + recipe.add(new ItemStack(Blocks.red_flower, 1), new ItemStack(Items.dye, 4, 1)); + recipe.add(new ItemStack(Blocks.yellow_flower, 1), new ItemStack(Items.dye, 4, 11)); + recipe.add(new ItemStack(Blocks.gravel, 1), new ItemStack(Items.flint, 4)); + recipe.add(new ItemStack(Items.reeds, 1), new ItemStack(Items.sugar, 4)); + recipe.add(new ItemStack(Items.bone, 1), new ItemStack(Items.dye, 4, 15)); //Mod - recipe.add(new ItemStack(Blocks.waterlily,1),new ItemStack(SSItems.dustWaterLily, 4)); + recipe.add(new ItemStack(Blocks.waterlily, 1), new ItemStack(SSItems.dustWaterLily, 4)); - recipe.add("cropRice",new ItemStack(SSItems.whiteRice, 2)); + recipe.add("cropRice", new ItemStack(SSItems.whiteRice, 2)); - } + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java index aebc3a4..4ac817f 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java @@ -2,6 +2,7 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import shift.sextiarysector.SSItems; public class RecipesSpinningMachine { @@ -12,6 +13,7 @@ public static void addRecipes(RecipeSimpleMachine recipe) //recipe.add("plankWood", new ItemStack(SSBlocks.woodPlate, 4)); recipe.add("craftingSmallCloth", new ItemStack(Items.string, 4)); + recipe.add(new ItemStack(SSItems.stringMass, 1), new ItemStack(SSItems.strongString, 2)); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java b/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java index f86809b..3722692 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java @@ -8,20 +8,20 @@ public class RecipesVanilla { public static void addRecipes(CraftingManager p_77608_1_) - { + { - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(Items.painting, 1), - new Object[] { "xxx", "xyx","xxx", - Character.valueOf('x'), "stickWood", - Character.valueOf('y'), "craftingSmallCloth" - })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(Items.painting, 1), + new Object[] { "xxx", "xyx", "xxx", + Character.valueOf('x'), "stickWood", + Character.valueOf('y'), "craftingSmallCloth" + })); - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(Items.bed, 1), + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(Items.bed, 1), new Object[] { "yyy", "xxx", - Character.valueOf('x'), "plankWood", - Character.valueOf('y'), "craftingSmallCloth" - })); + Character.valueOf('x'), "plankWood", + Character.valueOf('y'), "craftingSmallCloth" + })); - } + } } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererGFDynamo.java b/src/main/java/shift/sextiarysector/renderer/block/RendererGFDynamo.java new file mode 100644 index 0000000..55eabda --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererGFDynamo.java @@ -0,0 +1,120 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.plugin.PluginRF; +import shift.sextiarysector.renderer.model.ModelGFDynamo; +import shift.sextiarysector.tileentity.TileEntityGFDynamo; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererGFDynamo extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + + if (modelID != this.getRenderId()) { + return; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f; + GL11.glScalef(scale, scale, scale); + + GL11.glRotatef(90, 1, 0, 0); + GL11.glRotatef(180, 0, 1, 0); + + this.bind(gfDynamoTextures); + + modelGFDynamoMotor.render(null, 0, 0, 0, 0, 0, 1.0f); + modelGFDynamoMotor.renderShaft(null, 0, 0, 0, 0, 0, 1.0f); + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, + RenderBlocks renderer) { + return false; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return PluginRF.gfDynamoType; + } + + private static final ResourceLocation gfDynamoTextures = new ResourceLocation("sextiarysector:textures/models/gf_dynamo.png"); + + static public ModelGFDynamo modelGFDynamoMotor = new ModelGFDynamo(); + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + + TileEntityGFDynamo tile = (TileEntityGFDynamo) tileentity; + + GL11.glPushMatrix(); + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); + //float scale = 0.0625f; + float scale = 0.0624f; + GL11.glScalef(scale, scale, scale); + + this.bindTexture(gfDynamoTextures); + + switch (tile.direction) { + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + default: + break; + } + + GL11.glDisable(GL11.GL_CULL_FACE); + + modelGFDynamoMotor.render(null, 0, 0, 0, 0, 0, 1.0f); + + GL11.glEnable(GL11.GL_CULL_FACE); + + //傾きのスピード + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + + modelGFDynamoMotor.renderShaft(null, 0, 0, 0, 0, 0, 1.0f); + + GL11.glPopMatrix(); + + } + + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererLargeWindmill.java b/src/main/java/shift/sextiarysector/renderer/block/RendererLargeWindmill.java new file mode 100644 index 0000000..b59233e --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererLargeWindmill.java @@ -0,0 +1,118 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.renderer.model.ModelLargeWindmill; +import shift.sextiarysector.tileentity.TileEntityLargeWindmill; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererLargeWindmill extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { + + private static final ResourceLocation windmillTextures = new ResourceLocation("sextiarysector:textures/models/large_windmill.png"); + static public ModelBase modelWindmill = new ModelLargeWindmill(); + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + + if (modelID != this.getRenderId()) { + return; + } + + GL11.glPushMatrix(); + + float scale = 0.0625f / 6.0f; + GL11.glScalef(scale, scale, scale); + + //GL11.glRotatef(90, 1, 0, 0); + + GL11.glRotatef(90, 0, -1, 0); + this.bind(windmillTextures); + + ((ModelLargeWindmill) modelWindmill).renderinOut(null, 0, 0, 0, 0, 0, 1.0f); + + GL11.glRotatef(-(FMLClientHandler.instance().getClient().getMinecraft().getSystemTime() / 50) % 360, 0, 0, 1); + + modelWindmill.render(null, 0, 0, 0, 0, 0, 1.0f); + + GL11.glPopMatrix(); + + this.bind(MC_BLOCK_SHEET); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + return false; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.largeWindMillType; + } + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + + TileEntityLargeWindmill tile = (TileEntityLargeWindmill) tileentity; + + //System.out.println("renderTileEntityAt"); + + GL11.glPushMatrix(); + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); + float scale = 0.0625f; + //float scale = 0.125f; + GL11.glScalef(scale, scale, scale); + + switch (tile.direction) { + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + default: + break; + } + + this.bindTexture(windmillTextures); + + ((ModelLargeWindmill) modelWindmill).renderinOut(null, 0, 0, 0, 0, 0, 1.0f); + //傾きのスピード + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + + modelWindmill.render(null, 0, 0, 0, 0, 0, 1.0f); + + GL11.glPopMatrix(); + + } + + private static void bind(ResourceLocation res) + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/item/RenderGF.java b/src/main/java/shift/sextiarysector/renderer/item/RenderGF.java index 49612b9..797c2ab 100644 --- a/src/main/java/shift/sextiarysector/renderer/item/RenderGF.java +++ b/src/main/java/shift/sextiarysector/renderer/item/RenderGF.java @@ -10,8 +10,8 @@ import org.lwjgl.opengl.GL11; -import shift.sextiarysector.api.machine.item.GearForceItem; -import shift.sextiarysector.api.machine.item.IGearForceItem; +import shift.sextiarysector.api.gearforce.item.GearForceItemAPI; +import shift.sextiarysector.api.gearforce.item.IGearForceItem; import shift.sextiarysector.event.ClientEventHandler; import cpw.mods.fml.client.FMLClientHandler; @@ -38,7 +38,7 @@ public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if(item.getItem() instanceof IGearForceItem && type == ItemRenderType.INVENTORY) { - int k = (int)Math.round(GearForceItem.manager.getSpeed(item) * 13.0D / ((IGearForceItem)item.getItem()).getMaxSpeed(item)); + int k = (int)Math.round(GearForceItemAPI.manager.getSpeed(item) * 13.0D / ((IGearForceItem)item.getItem()).getMaxSpeed(item)); GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_ALPHA_TEST); diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelGFDynamo.java b/src/main/java/shift/sextiarysector/renderer/model/ModelGFDynamo.java new file mode 100644 index 0000000..5b094e4 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelGFDynamo.java @@ -0,0 +1,86 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelGFDynamo extends ModelBase +{ + + ModelRenderer Base1; + ModelRenderer Base2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + ModelRenderer Shape6; + + public ModelGFDynamo() + { + + textureWidth = 64; + textureHeight = 64; + + Base1 = new ModelRenderer(this, 0, 0); + Base1.addBox(-8F, -8F, -8F, 16, 16, 10); + Base1.setRotationPoint(0F, 0F, 0F); + Base1.setTextureSize(64, 64); + Base1.mirror = true; + setRotation(Base1, 0F, 0F, 0F); + Base2 = new ModelRenderer(this, 0, 26); + Base2.addBox(-3F, -3F, 2F, 6, 6, 6); + Base2.setRotationPoint(0F, 0F, 0F); + Base2.setTextureSize(64, 64); + Base2.mirror = true; + setRotation(Base2, 0F, 0F, 0F); + Shape3 = new ModelRenderer(this, 0, 38); + Shape3.addBox(-1F, -7F, -7.5F, 2, 14, 9); + Shape3.setRotationPoint(0F, 0F, 0F); + Shape3.setTextureSize(64, 64); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0F, 0F); + Shape4 = new ModelRenderer(this, 0, 38); + Shape4.addBox(-1F, -7F, -7.5F, 2, 14, 9); + Shape4.setRotationPoint(0F, 0F, 0F); + Shape4.setTextureSize(64, 64); + Shape4.mirror = true; + setRotation(Shape4, 0F, 0F, 0.7853982F); + Shape5 = new ModelRenderer(this, 0, 38); + Shape5.addBox(-1F, -7F, -7.5F, 2, 14, 9); + Shape5.setRotationPoint(0F, 0F, 0F); + Shape5.setTextureSize(64, 64); + Shape5.mirror = true; + setRotation(Shape5, 0F, 0F, 1.570796F); + Shape6 = new ModelRenderer(this, 0, 38); + Shape6.addBox(-1F, -7F, -7.5F, 2, 14, 9); + Shape6.setRotationPoint(0F, 0F, 0F); + Shape6.setTextureSize(64, 64); + Shape6.mirror = true; + setRotation(Shape6, 0F, 0F, 2.356194F); + } + + @Override + 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); + Base1.render(f5); + Base2.render(f5); + } + + public void renderShaft(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + { + super.render(entity, f, f1, f2, f3, f4, f5); + Shape3.render(f5); + Shape4.render(f5); + Shape5.render(f5); + Shape6.render(f5); + + } + + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/model/ModelLargeWindmill.java b/src/main/java/shift/sextiarysector/renderer/model/ModelLargeWindmill.java new file mode 100644 index 0000000..112264b --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/model/ModelLargeWindmill.java @@ -0,0 +1,124 @@ +package shift.sextiarysector.renderer.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelLargeWindmill extends ModelBase +{ + + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape41; + ModelRenderer Shape42; + ModelRenderer Shape51; + ModelRenderer Shape52; + ModelRenderer Shape61; + ModelRenderer Shape71; + ModelRenderer Shape62; + ModelRenderer Shape72; + + public ModelLargeWindmill() + { + + this.textureWidth = 128; + this.textureHeight = 128; + + Shape1 = new ModelRenderer(this, 0, 0); + Shape1.addBox(-2F, -2F, -8.1F, 4, 4, 16); + Shape1.setRotationPoint(0F, 0F, 0F); + Shape1.setTextureSize(128, 128); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 0, 20); + Shape2.addBox(-4F, -4F, 4F, 8, 8, 4); + Shape2.setRotationPoint(0F, 0F, 0F); + Shape2.setTextureSize(128, 128); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape3 = new ModelRenderer(this, 42, 1); + Shape3.addBox(-4F, -4F, -7F, 8, 8, 8); + Shape3.setRotationPoint(0F, 0F, 0F); + Shape3.setTextureSize(128, 128); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0F, 0F); + Shape41 = new ModelRenderer(this, 0, 32); + Shape41.addBox(-3F, -54F, -6F, 6, 50, 6); + Shape41.setRotationPoint(0F, 0F, 0F); + Shape41.setTextureSize(128, 128); + Shape41.mirror = true; + setRotation(Shape41, 0F, 0F, 0F); + Shape42 = new ModelRenderer(this, 24, 44); + Shape42.addBox(2F, -50F, -6F, 20, 40, 4); + Shape42.setRotationPoint(0F, 0F, 0F); + Shape42.setTextureSize(128, 128); + Shape42.mirror = true; + setRotation(Shape42, 0F, -0.3490659F, 0F); + Shape51 = new ModelRenderer(this, 0, 32); + Shape51.addBox(-3F, 4F, -6F, 6, 50, 6); + Shape51.setRotationPoint(0F, 0F, 0F); + Shape51.setTextureSize(128, 128); + Shape51.mirror = true; + setRotation(Shape51, 0F, 0F, 0F); + Shape52 = new ModelRenderer(this, 24, 44); + Shape52.addBox(-22F, 10F, -6F, 20, 40, 4); + Shape52.setRotationPoint(0F, 0F, 0F); + Shape52.setTextureSize(128, 128); + Shape52.mirror = true; + setRotation(Shape52, 0F, 0.3490659F, 0F); + Shape61 = new ModelRenderer(this, 0, 88); + Shape61.addBox(4F, -3F, -6F, 50, 6, 6); + Shape61.setRotationPoint(0F, 0F, 0F); + Shape61.setTextureSize(128, 128); + Shape61.mirror = true; + setRotation(Shape61, 0F, 0F, 0F); + Shape71 = new ModelRenderer(this, 0, 88); + Shape71.addBox(-54F, -3F, -6F, 50, 6, 6); + Shape71.setRotationPoint(0F, 0F, 0F); + Shape71.setTextureSize(128, 128); + Shape71.mirror = true; + setRotation(Shape71, 0F, 0F, 0F); + Shape62 = new ModelRenderer(this, 0, 100); + Shape62.addBox(10F, 2F, -6F, 40, 20, 4); + Shape62.setRotationPoint(0F, 0F, 0F); + Shape62.setTextureSize(128, 128); + Shape62.mirror = true; + setRotation(Shape62, 0.3490659F, 0F, 0F); + Shape72 = new ModelRenderer(this, 0, 100); + Shape72.addBox(-50F, -22F, -6F, 40, 20, 4); + Shape72.setRotationPoint(0F, 0F, 0F); + Shape72.setTextureSize(128, 128); + Shape72.mirror = true; + setRotation(Shape72, -0.3490659F, 0F, 0F); + } + + @Override + 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); + Shape3.render(f5); + Shape41.render(f5); + Shape42.render(f5); + Shape51.render(f5); + Shape52.render(f5); + Shape61.render(f5); + Shape71.render(f5); + Shape62.render(f5); + Shape72.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void renderinOut(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + Shape1.render(f5); + Shape2.render(f5); + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java index 23a7659..f2c58c9 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityElectricMotor.java @@ -4,10 +4,10 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; -public class TileEntityElectricMotor extends TileEntityDirection implements IGFEnergyHandler, IGearForceGrid{ +public class TileEntityElectricMotor extends TileEntityDirection implements IGearForceHandler, IGearForceGrid{ private BasicSink ic2EnergySink = new BasicSink(this, 2000, 1){ @@ -89,9 +89,9 @@ private void updateServerEntity() { if(this.ic2EnergySink.canUseEnergy(20)){ TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IGFEnergyHandler){ + if(t!=null && t instanceof IGearForceHandler){ - int i = ((IGFEnergyHandler)t).addEnergy(this.direction, 3, 40, false); + int i = ((IGearForceHandler)t).addEnergy(this.direction, 3, 40, false); this.ic2EnergySink.useEnergy(i); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java index a387790..ea3acc1 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFan.java @@ -9,11 +9,11 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.util.ForgeDirection; import shift.sextiarysector.SSBlocks; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; -public class TileEntityFan extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ +public class TileEntityFan extends TileEntityDirection implements IGearForceHandler ,IGearForceGrid{ public float rotateStep = 360; private int speed = 0; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFGFMachineBase.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFGFMachineBase.java index 48a60d8..23788ac 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFGFMachineBase.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityFluidFGFMachineBase.java @@ -14,15 +14,16 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; -import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.api.gearforce.item.GearForceItemAPI; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; import shift.sextiarysector.block.BlockFluidFGFMachine; import shift.sextiarysector.container.ItemBox; -public class TileEntityFluidFGFMachineBase extends TileEntityDirection implements ISidedInventory, IFluidHandler, IGFEnergyHandler, IGearForceGrid { +public class TileEntityFluidFGFMachineBase extends TileEntityDirection implements ISidedInventory, IFluidHandler, IGearForceHandler, IGearForceGrid { protected static final int[] slots_top = new int[] { 0, 4 }; protected static final int[] slots_bottom = new int[] { 2, 1, 3, 5 }; @@ -131,6 +132,7 @@ public void updateServerEntity() } this.chargeFluid(); + this.chargeFluidContainerItem(); if (this.on && this.tank.getFluidAmount() > 0) this.chargeUPFluid(); } @@ -187,6 +189,31 @@ else if (this.items.getStackInSlot(5).isItemEqual(item)) } + private void chargeFluidContainerItem() { + + if (this.tank.getFluidAmount() == 0) return; + ItemStack container = items.getStackInSlot(4); + if (container == null || !(container.getItem() instanceof IFluidContainerItem) || items.getStackInSlot(5) != null) return; + + IFluidContainerItem f = (IFluidContainerItem) container.getItem(); + + int add = f.fill(container, this.tank.getFluid(), true); + this.tank.drain(add, true); + + if (add != 0) { + + this.items.setInventorySlotContents(5, container); + + this.items.reduceStackSize(4, 1); + + this.markDirty(); + + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + + } + + } + public boolean canChargeFluid() { if (items.getStackInSlot(4) == null) return false; @@ -205,8 +232,8 @@ public boolean isCharging() if (this.items.getStackInSlot(1) == null) return false; f1 = this.storage.getMaxSpeed() > this.storage.getSpeedStored(); - f2 = (this.items.getStackInSlot(1) != null && GearForceItem.manager.isGearForceItem(this.items.getStackInSlot(1))); - f3 = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0; + f2 = (this.items.getStackInSlot(1) != null && GearForceItemAPI.manager.isGearForceItem(this.items.getStackInSlot(1))); + f3 = GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0; //System.out.println(f1+" "+f2+" "+f3); @@ -217,11 +244,11 @@ public void updateChargeEntity() { if (this.items.getStackInSlot(1) == null) return; - if (GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0) { - int s = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 20, true); + if (GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0) { + int s = GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 20, true); int i = this.storage.addEnergy(this.storage.getMaxPower(), s, false); - GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), i, false); + GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), i, false); if (i > 0) this.inPower = this.storage.getMaxPower(); //this.inSpeed += (int) i; @@ -424,7 +451,7 @@ public String getInventoryName() { public boolean isItemValidForSlot(int i, ItemStack itemstack) { if (i == 1) { - return GearForceItem.manager.isGearForceItem(itemstack); + return GearForceItemAPI.manager.isGearForceItem(itemstack); } return i == 0 || i == 1 || i == 4; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGFDynamo.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGFDynamo.java new file mode 100644 index 0000000..e73ee81 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGFDynamo.java @@ -0,0 +1,171 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import cofh.api.energy.IEnergyProvider; +import cofh.api.energy.IEnergyReceiver; + +public class TileEntityGFDynamo extends TileEntityDirection implements IGearForceHandler, IGearForceGrid, IEnergyProvider { + + public float rotateStep = 0; + public EnergyStorage storage = new EnergyStorage("Base", 3, 30000); + public boolean isActivity = false; + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + + if (!isActivity) return; + + if (this.rotateStep > 360) { + this.rotateStep -= 360; + } + + this.rotateStep += 6; + + } + + public void updateServerEntity() + { + + ForgeDirection d = this.getDirection().getOpposite(); + + TileEntity t = this.worldObj.getTileEntity(xCoord + d.offsetX, yCoord + d.offsetY, zCoord + d.offsetZ); + + if (t instanceof IEnergyReceiver && this.canWork()) { + + IEnergyReceiver rf = (IEnergyReceiver) t; + + int add = this.storage.drawEnergy(3, 14, true); + int add2 = rf.receiveEnergy(direction, add, false); + this.storage.drawEnergy(3, add2, false); + + if (isActivity == false && add2 != 0) { + this.isActivity = true; + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } else if (isActivity) { + this.isActivity = false; + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + } + + public boolean canWork() { + return this.worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) && this.storage.getSpeedStored() > 10; + } + + public float getRotateStep() { + return rotateStep; + } + + //GF + @Override + public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + + if (!this.canInterface(from)) return 0; + + int i = storage.addEnergy(power, speed, simulate); + + return i; + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + return 0; + } + + @Override + public boolean canInterface(ForgeDirection from) { + return this.getDirection().ordinal() == from.ordinal(); + } + + @Override + public int getPowerStored(ForgeDirection from) { + return storage.getPowerStored(); + } + + @Override + public int getSpeedStored(ForgeDirection from) { + return storage.getSpeedStored(); + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + return storage.getMaxPower(); + } + + @Override + public int getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeed(); + } + + @Override + public boolean canIn(ForgeDirection from) { + return this.getDirection().ordinal() == from.ordinal(); + } + + @Override + public boolean canOut(ForgeDirection from) { + return false; + } + + //RF + @Override + public boolean canConnectEnergy(ForgeDirection paramForgeDirection) { + return this.getDirection().getOpposite().ordinal() == paramForgeDirection.ordinal(); + } + + @Override + public int extractEnergy(ForgeDirection paramForgeDirection, int paramInt, boolean paramBoolean) { + return 0; + } + + @Override + public int getEnergyStored(ForgeDirection paramForgeDirection) { + return 0; + } + + @Override + public int getMaxEnergyStored(ForgeDirection paramForgeDirection) { + return 10000; + } + + //NBT + @Override + public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + + super.readFromNBT(par1nbtTagCompound); + this.storage.readFromNBT(par1nbtTagCompound); + this.isActivity = par1nbtTagCompound.getBoolean("isActivity"); + + } + + @Override + public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + + super.writeToNBT(par1nbtTagCompound); + this.storage.writeToNBT(par1nbtTagCompound); + par1nbtTagCompound.setBoolean("isActivity", isActivity); + + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java index 922b811..9b7b596 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGFTank.java @@ -6,13 +6,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; -import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.api.gearforce.item.GearForceItemAPI; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; import shift.sextiarysector.container.ItemBox; -public class TileEntityGFTank extends TileEntityDirection implements ISidedInventory, IGFEnergyHandler ,IGearForceGrid{ +public class TileEntityGFTank extends TileEntityDirection implements ISidedInventory, IGearForceHandler ,IGearForceGrid{ protected static final int[] slots_top = new int[] { 0 }; protected static final int[] slots_bottom = new int[] { 1 }; @@ -93,11 +93,11 @@ public void updateChargeEntity() if(this.items.getStackInSlot(1)==null)return; - if(GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true)>0){ - int s = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 20, true); + if(GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true)>0){ + int s = GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 20, true); int i = this.storage.addEnergy(this.storage.getMaxPower(), s, false); - GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), i, false); + GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), i, false); if(i>0)this.inPower = this.storage.getMaxPower(); //this.inSpeed += (int) i; @@ -114,7 +114,7 @@ public void updateChargeItem(){ int i = this.storage.drawEnergy(this.storage.getMaxPower(), 20, true); - int s = GearForceItem.manager.addEnergy(this.items.getStackInSlot(0), this.storage.getMaxPower(), i, false); + int s = GearForceItemAPI.manager.addEnergy(this.items.getStackInSlot(0), this.storage.getMaxPower(), i, false); int j = this.storage.drawEnergy(this.storage.getMaxPower(), s, false); @@ -135,13 +135,13 @@ public void addOutEnergy(){ TileEntity t = this.worldObj.getTileEntity(xCoord + this.getDirection().offsetX, yCoord + this.getDirection().offsetY, zCoord + this.getDirection().offsetZ); - if(t instanceof IGFEnergyHandler && ((IGFEnergyHandler)t).canInterface(getDirection().getOpposite())){ + if(t instanceof IGearForceHandler && ((IGearForceHandler)t).canInterface(getDirection().getOpposite())){ - int i = ((IGFEnergyHandler)t).addEnergy(getDirection().getOpposite(), this.storage.getMaxPower(), Math.min(160, this.storage.getSpeedStored()), true); + int i = ((IGearForceHandler)t).addEnergy(getDirection().getOpposite(), this.storage.getMaxPower(), Math.min(160, this.storage.getSpeedStored()), true); int j = this.storage.drawEnergy(this.storage.getMaxPower(), i, false); - ((IGFEnergyHandler)t).addEnergy(getDirection().getOpposite(), this.storage.getMaxPower(), j, false); + ((IGearForceHandler)t).addEnergy(getDirection().getOpposite(), this.storage.getMaxPower(), j, false); this.outSpeed+=j; if(j>0)this.outPower=this.storage.getMaxPower(); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java index 989dae5..72a830b 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearBox.java @@ -3,11 +3,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; -public class TileEntityGearBox extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ +public class TileEntityGearBox extends TileEntityDirection implements IGearForceHandler ,IGearForceGrid{ public EnergyStorage storage = new EnergyStorage("Base", 1, 960, 160); @@ -51,9 +51,9 @@ public void updateServerEntity() { TileEntity t = this.worldObj.getTileEntity(x, y, z); - if(t instanceof IGFEnergyHandler){ + if(t instanceof IGearForceHandler){ - int j = ((IGFEnergyHandler) t).addEnergy(d.getOpposite(), this.storage.getMaxPower(), i, false); + int j = ((IGearForceHandler) t).addEnergy(d.getOpposite(), this.storage.getMaxPower(), i, false); this.storage.drawEnergy(this.storage.getMaxPower(), j, false); @@ -77,7 +77,7 @@ public int getConnect(){ TileEntity t = this.worldObj.getTileEntity(x, y, z); - if(t instanceof IGFEnergyHandler && ((IGFEnergyHandler) t).addEnergy(d.getOpposite(), this.storage.getMaxPower(), 1, true)>0){ + if(t instanceof IGearForceHandler && ((IGearForceHandler) t).addEnergy(d.getOpposite(), this.storage.getMaxPower(), 1, true)>0){ i++; } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java index c8c56bc..aa0427d 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityGearShaft.java @@ -3,11 +3,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; -public class TileEntityGearShaft extends TileEntityDirection implements IGFEnergyHandler, IGearForceGrid { +public class TileEntityGearShaft extends TileEntityDirection implements IGearForceHandler, IGearForceGrid { public float rotateUpStep = 0; public float rotateDownStep = 0; @@ -41,11 +41,11 @@ public void updateClientEntity() { private void updateServerEntity() { - if (!(this.getOutTileEntity() instanceof IGFEnergyHandler)) { + if (!(this.getOutTileEntity() instanceof IGearForceHandler)) { return; } - IGFEnergyHandler out = (IGFEnergyHandler) this.getOutTileEntity(); + IGearForceHandler out = (IGearForceHandler) this.getOutTileEntity(); int i = storage.drawEnergy(storage.getMaxPower(), storage.getMaxSpeed(), true); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityLargeWindmill.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityLargeWindmill.java new file mode 100644 index 0000000..fbd9b9e --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityLargeWindmill.java @@ -0,0 +1,123 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; + +public class TileEntityLargeWindmill extends TileEntityDirection implements IGearForceHandler, IGearForceGrid { + + public float rotateStep = 0; + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + + this.updateServerEntity(); + + } + + } + + public void updateClientEntity() + { + + if (!this.isWork()) { + return; + } + + if (this.rotateStep > 360) { + this.rotateStep -= 360; + } + + this.rotateStep += 2; + + } + + public void updateServerEntity() + { + TileEntity t = this.worldObj.getTileEntity(xCoord - this.direction.offsetX, yCoord - this.direction.offsetY, zCoord - this.direction.offsetZ); + if (t != null && t instanceof IGearForceHandler && this.isWork()) { + + ((IGearForceHandler) t).addEnergy(this.direction, 3, 20, false); + } + + } + + boolean isWork() { + + ForgeDirection d1 = this.getDirection().getRotation(ForgeDirection.UP); + + int ra1 = 5; + for (int i = ra1 * -1; i <= ra1; i++) { + + int ra2 = 5; + for (int j = ra2 * -1; j <= ra2; j++) { + int x = xCoord + d1.offsetX * j; + int y = yCoord + i; + int z = zCoord + d1.offsetZ * j; + + if (i == 0 && j == 0) continue; + + if (!this.worldObj.isAirBlock(x, y, z)) return false; + + } + + } + + return true; + } + + public float getRotateStep() { + return -rotateStep; + } + + @Override + public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + return 0; + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + return 0; + } + + @Override + public boolean canInterface(ForgeDirection from) { + return this.direction.getOpposite().ordinal() == from.ordinal(); + } + + @Override + public int getPowerStored(ForgeDirection from) { + return 0; + } + + @Override + public int getSpeedStored(ForgeDirection from) { + return 0; + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + return 0; + } + + @Override + public int getMaxSpeedStored(ForgeDirection from) { + return 0; + } + + @Override + public boolean canIn(ForgeDirection direction) { + return false; + } + + @Override + public boolean canOut(ForgeDirection direction) { + return this.direction.getOpposite().ordinal() == direction.ordinal(); + } +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java index f169f69..854f858 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityMonitor.java @@ -2,12 +2,12 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; import shift.sextiarysector.block.BlockMonitor.MonitorType; -public class TileEntityMonitor extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ +public class TileEntityMonitor extends TileEntityDirection implements IGearForceHandler ,IGearForceGrid{ public EnergyStorage storage = new EnergyStorage("Base", 1, 10000); public MonitorType type = MonitorType.unknown; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java index 8905641..9e8a451 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityPump.java @@ -13,11 +13,11 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidHandler; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; -public class TileEntityPump extends TileEntityDirection implements IFluidHandler, IGFEnergyHandler, IGearForceGrid { +public class TileEntityPump extends TileEntityDirection implements IFluidHandler, IGearForceHandler, IGearForceGrid { protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java index 4fa6376..24ad5fa 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySaw.java @@ -9,11 +9,11 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; -public class TileEntitySaw extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ +public class TileEntitySaw extends TileEntityDirection implements IGearForceHandler ,IGearForceGrid{ public float rotateStep = 360; private int speed = 0; diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java index 02cbe8e..2a6dd9b 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityShaft.java @@ -3,12 +3,12 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; import shift.sextiarysector.fmp.IShaft; -public class TileEntityShaft extends TileEntityDirection implements IGFEnergyHandler, IGearForceGrid, IShaft { +public class TileEntityShaft extends TileEntityDirection implements IGearForceHandler, IGearForceGrid, IShaft { public float rotateStep = 360; private final EnergyStorage storage = new EnergyStorage("Base", 1, 320, 160); @@ -219,10 +219,10 @@ public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate if (this.getInDirection().ordinal() != from.ordinal()) return 0; - if (!(this.getOutTileEntity() instanceof IGFEnergyHandler) || power != this.getStorage().getMaxPower()) + if (!(this.getOutTileEntity() instanceof IGearForceHandler) || power != this.getStorage().getMaxPower()) return 0; - int i = ((IGFEnergyHandler) this.getOutTileEntity()).addEnergy(from, power, speed, simulate); + int i = ((IGearForceHandler) this.getOutTileEntity()).addEnergy(from, power, speed, simulate); // storage.addEnergy(power, speed, simulate); if (!simulate) diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java index d925796..4fede7a 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySimpleMachine.java @@ -5,14 +5,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.EnergyStorage; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; -import shift.sextiarysector.api.machine.item.GearForceItem; +import shift.sextiarysector.api.gearforce.item.GearForceItemAPI; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; import shift.sextiarysector.block.BlockSimpleMachine; import shift.sextiarysector.container.ItemBox; -public class TileEntitySimpleMachine extends TileEntityDirection implements ISidedInventory, IGFEnergyHandler, IGearForceGrid { +public class TileEntitySimpleMachine extends TileEntityDirection implements ISidedInventory, IGearForceHandler, IGearForceGrid { protected static final int[] slots_top = new int[] { 0 }; protected static final int[] slots_bottom = new int[] { 2, 1 }; @@ -126,11 +126,11 @@ public void updateChargeEntity() { if (this.items.getStackInSlot(1) == null) return; - if (GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0) { - int s = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 20, true); + if (GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0) { + int s = GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 20, true); int i = this.storage.addEnergy(this.storage.getMaxPower(), s, false); - GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), i, false); + GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), i, false); if (i > 0) this.inPower = this.storage.getMaxPower(); //this.inSpeed += (int) i; @@ -193,8 +193,8 @@ public boolean isCharging() if (this.items.getStackInSlot(1) == null) return false; f1 = this.storage.getMaxSpeed() > this.storage.getSpeedStored(); - f2 = (this.items.getStackInSlot(1) != null && GearForceItem.manager.isGearForceItem(this.items.getStackInSlot(1))); - f3 = GearForceItem.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0; + f2 = (this.items.getStackInSlot(1) != null && GearForceItemAPI.manager.isGearForceItem(this.items.getStackInSlot(1))); + f3 = GearForceItemAPI.manager.reduceEnergy(this.items.getStackInSlot(1), this.storage.getMaxPower(), 1, true) > 0; //System.out.println(f1+" "+f2+" "+f3); @@ -266,7 +266,7 @@ public void closeInventory() { public boolean isItemValidForSlot(int i, ItemStack itemstack) { if (i == 1) { - return GearForceItem.manager.isGearForceItem(itemstack); + return GearForceItemAPI.manager.isGearForceItem(itemstack); } return i != 2; @@ -349,7 +349,7 @@ public boolean canInsertItem(int i, ItemStack itemstack, int j) { @Override public boolean canExtractItem(int i, ItemStack itemstack, int j) { return j != 0 || i != 1 - || (GearForceItem.manager.isGearForceItem(itemstack) && !GearForceItem.manager.canUse(itemstack, 1)); + || (GearForceItemAPI.manager.isGearForceItem(itemstack) && !GearForceItemAPI.manager.canUse(itemstack, 1)); } public int getWorkProgressScaled(int par1) diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java index c5a3d8e..0bdf1f7 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWaterwheel.java @@ -4,10 +4,10 @@ import net.minecraft.block.BlockLiquid; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; -public class TileEntitySmallWaterwheel extends TileEntityDirection implements IGFEnergyHandler,IGearForceGrid{ +public class TileEntitySmallWaterwheel extends TileEntityDirection implements IGearForceHandler,IGearForceGrid{ public float rotateStep = 0; @@ -43,9 +43,9 @@ public void updateClientEntity() public void updateServerEntity() { TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IGFEnergyHandler && this.isWork()){ + if(t!=null && t instanceof IGearForceHandler && this.isWork()){ - ((IGFEnergyHandler)t).addEnergy(this.direction, 2, 40, false); + ((IGearForceHandler)t).addEnergy(this.direction, 2, 40, false); } } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java index f348195..f5c815b 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySmallWindmill.java @@ -2,10 +2,10 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; -public class TileEntitySmallWindmill extends TileEntityDirection implements IGFEnergyHandler,IGearForceGrid { +public class TileEntitySmallWindmill extends TileEntityDirection implements IGearForceHandler,IGearForceGrid { public float rotateStep = 0; @@ -42,9 +42,9 @@ public void updateClientEntity() public void updateServerEntity() { TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IGFEnergyHandler && this.isWork()){ + if(t!=null && t instanceof IGearForceHandler && this.isWork()){ - ((IGFEnergyHandler)t).addEnergy(this.direction, 1, 20, false); + ((IGearForceHandler)t).addEnergy(this.direction, 1, 20, false); } } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java index 802d578..9bbb9e9 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySteamMotor.java @@ -12,11 +12,11 @@ import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; import shift.sextiarysector.container.ItemBox; -public class TileEntitySteamMotor extends TileEntityDirection implements IGFEnergyHandler, IGearForceGrid, ISidedInventory, IFluidHandler{ +public class TileEntitySteamMotor extends TileEntityDirection implements IGearForceHandler, IGearForceGrid, ISidedInventory, IFluidHandler { protected static final int[] slots_top = new int[] { 0 }; protected static final int[] slots_bottom = new int[] { 1 }; @@ -25,13 +25,12 @@ public class TileEntitySteamMotor extends TileEntityDirection implements IGFEne protected ItemBox items = new ItemBox("Base", 2); //液体 - private FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 15); + private final FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 15); - private int lastSteam = 0; + private int lastSteam = 0; private boolean lastWork = false; public float rotateStep = 0; - @Override public void updateEntity() { @@ -48,74 +47,75 @@ public void updateEntity() public void updateClientEntity() { - if(lastWork && this.canWork()){ - rotateStep -=10; + if (lastWork && this.canWork()) { + rotateStep -= 10; } } public void updateServerEntity() { - if(lastSteam != this.tank.getFluidAmount()){ + if (lastSteam != this.tank.getFluidAmount()) { lastSteam = this.tank.getFluidAmount(); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } - if(this.canWork()){ + if (this.canWork()) { this.work(); } - if(this.canCharge()){ + if (this.canCharge()) { this.chargeSteam(); } } - public boolean canWork(){ + public boolean canWork() { return this.worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) && this.tank.getFluidAmount() > 0; } - public void work(){ + public void work() { - int use = this.tank.drain(20, false) == null ? 0 : this.tank.drain(20, true).amount; + int use = this.tank.drain(20, false) == null ? 0 : this.tank.drain(20, true).amount; - if(use == 0){ - if(lastWork){ + if (use == 0) { + if (lastWork) { lastWork = false; this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return; } - if(!lastWork){ - lastWork =true; + if (!lastWork) { + lastWork = true; this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } - TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IGFEnergyHandler && this.canWork()){ + TileEntity t = this.worldObj.getTileEntity(xCoord - this.direction.offsetX, yCoord - this.direction.offsetY, zCoord - this.direction.offsetZ); + if (t != null && t instanceof IGearForceHandler && this.canWork()) { + + ((IGearForceHandler) t).addEnergy(this.direction, 3, (int) (use * 2.2f), false); - ((IGFEnergyHandler)t).addEnergy(this.direction, 3, use, false); } } - public void chargeSteam(){ + public void chargeSteam() { FluidStack f = FluidContainerRegistry.getFluidForFilledItem(items.getStackInSlot(0)); this.fill(ForgeDirection.UP, f, true); ItemStack item = items.getStackInSlot(0).getItem().getContainerItem(items.getStackInSlot(0)); - if(item!=null){ + if (item != null) { if (this.items.getStackInSlot(1) == null) - { - this.setInventorySlotContents(1, item.copy()); - } - else if (this.items.getStackInSlot(1).isItemEqual(item)) - { - this.items.getStackInSlot(1).stackSize += item.stackSize; - } + { + this.setInventorySlotContents(1, item.copy()); + } + else if (this.items.getStackInSlot(1).isItemEqual(item)) + { + this.items.getStackInSlot(1).stackSize += item.stackSize; + } } @@ -123,28 +123,26 @@ else if (this.items.getStackInSlot(1).isItemEqual(item)) this.markDirty(); - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } - public boolean canCharge(){ + public boolean canCharge() { FluidStack f = FluidContainerRegistry.getFluidForFilledItem(items.getStackInSlot(0)); - if(f == null)return false; + if (f == null) return false; int i = this.fill(ForgeDirection.UP, f, false); - if(i != f.amount)return false; - + if (i != f.amount) return false; - if(items.getStackInSlot(0) == null)return false; - if(this.items.getStackInSlot(1) == null)return true; + if (items.getStackInSlot(0) == null) return false; + if (this.items.getStackInSlot(1) == null) return true; ItemStack item = items.getStackInSlot(0).getItem().getContainerItem(items.getStackInSlot(0).copy()); - if(item == null)return true; + if (item == null) return true; int result = this.items.getStackInSlot(1).stackSize + item.stackSize; - return (result <= getInventoryStackLimit() && result <= item.getMaxStackSize()); + return (result <= getInventoryStackLimit() && result <= item.getMaxStackSize()); } @@ -157,11 +155,10 @@ public FluidTank getTank() { return tank; } - public boolean isFluid(){ + public boolean isFluid() { return this.getTank().getFluidAmount() > 0; } - //IInventory関係 @Override public int getSizeInventory() { @@ -199,7 +196,7 @@ public int getInventoryStackLimit() { } @Override - public void markDirty(){ + public void markDirty() { super.markDirty(); items.onInventoryChanged(); } @@ -221,7 +218,7 @@ public void closeInventory() { @Override public boolean isItemValidForSlot(int i, ItemStack itemstack) { - return i == 0 ; + return i == 0; } @@ -230,11 +227,11 @@ public boolean isItemValidForSlot(int i, ItemStack itemstack) { @Override public int[] getAccessibleSlotsFromSide(int var1) { - if(var1 == 0){ + if (var1 == 0) { return slots_bottom; } - if(var1 == 1){ + if (var1 == 1) { return slots_top; } @@ -249,15 +246,14 @@ public boolean canInsertItem(int i, ItemStack itemstack, int j) { @Override public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) - { + { - if(p_102008_1_ == 1){ + if (p_102008_1_ == 1) { return true; } - - return false; - } + return false; + } @Override public String getInventoryName() { @@ -266,12 +262,12 @@ public String getInventoryName() { //GF @Override - public int addEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { return 0; } @Override - public int drawEnergy(ForgeDirection from, int power, int speed,boolean simulate) { + public int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate) { return 0; } @@ -310,61 +306,60 @@ public boolean canOut(ForgeDirection from) { return this.direction.getOpposite().ordinal() == from.ordinal(); } - //IFluidHandler関係 @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill) - { - if(resource == null || resource.getFluid() == null)return 0; - if(!canFill(from, resource.getFluid()))return 0; - - return tank.fill(resource, doFill); - } - - @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) - { - if (resource == null || !resource.isFluidEqual(getTank().getFluid())) - { - return null; - } - return getTank().drain(resource.amount, doDrain); - - } - - @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) - { - return getTank().drain(maxDrain, doDrain); - } - - @Override - public boolean canFill(ForgeDirection from, Fluid fluid) - { - if(!fluid.getName().equals("steam"))return false; - - return true; - } - - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) - { - return true; - } - - @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from) - { - return new FluidTankInfo[] { getTank().getInfo() }; - } - - //NBT - @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + if (resource == null || resource.getFluid() == null) return 0; + if (!canFill(from, resource.getFluid())) return 0; + + return tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(getTank().getFluid())) + { + return null; + } + return getTank().drain(resource.amount, doDrain); + + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return getTank().drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + if (!fluid.getName().equals("steam")) return false; + + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { getTank().getInfo() }; + } + + //NBT + @Override public void readFromNBT(NBTTagCompound par1nbtTagCompound) { super.readFromNBT(par1nbtTagCompound); this.items.readFromNBT(par1nbtTagCompound); this.tank.readFromNBT(par1nbtTagCompound); - if(par1nbtTagCompound.hasKey("Empty") && this.tank.getFluidAmount() > 0)this.tank.setFluid(null); + if (par1nbtTagCompound.hasKey("Empty") && this.tank.getFluidAmount() > 0) this.tank.setFluid(null); this.lastWork = par1nbtTagCompound.getBoolean("lastwork"); } @@ -376,6 +371,4 @@ public void writeToNBT(NBTTagCompound par1nbtTagCompound) { par1nbtTagCompound.setBoolean("lastwork", this.lastWork); } - - } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java index 17a4368..ecebe5c 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityTofuMotor.java @@ -2,7 +2,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; import tsuteto.tofu.api.tileentity.ITfConsumer; @@ -48,9 +48,9 @@ private void updateServerEntity() { TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IGFEnergyHandler){ + if(t!=null && t instanceof IGearForceHandler){ - int i = ((IGFEnergyHandler)t).addEnergy(this.direction, 2, 40, false); + int i = ((IGearForceHandler)t).addEnergy(this.direction, 2, 40, false); this.tofu-=(i/100.0); } diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java index 44f181a..0b8a9ce 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityWindmill.java @@ -2,10 +2,10 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.machine.energy.IGFEnergyHandler; -import shift.sextiarysector.api.machine.energy.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; -public class TileEntityWindmill extends TileEntityDirection implements IGFEnergyHandler ,IGearForceGrid{ +public class TileEntityWindmill extends TileEntityDirection implements IGearForceHandler ,IGearForceGrid{ public float rotateStep = 0; @@ -42,9 +42,9 @@ public void updateClientEntity() public void updateServerEntity() { TileEntity t =this.worldObj.getTileEntity(xCoord-this.direction.offsetX, yCoord-this.direction.offsetY, zCoord-this.direction.offsetZ); - if(t!=null && t instanceof IGFEnergyHandler && this.isWork()){ + if(t!=null && t instanceof IGearForceHandler && this.isWork()){ - ((IGFEnergyHandler)t).addEnergy(this.direction, 2, 20, false); + ((IGearForceHandler)t).addEnergy(this.direction, 2, 20, false); } } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 84f6b02..5b92664 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -64,6 +64,7 @@ tile.ss.gold_large_ore.name=Gold Large Ore tile.ss.small_windmill.name=Small Windmill tile.ss.windmill.name=Windmill +tile.ss.large_windmill.name=Large Windmill tile.ss.small_waterwheel.name=Small Waterwheel tile.ss.steam_motor.name=Steam Motor @@ -95,6 +96,7 @@ tile.ss.loom.name=Loom tile.ss.sawmill.name=Sawmill tile.ss.spinning_machine.name=Spinning Machine tile.ss.pulverizer.name=Pulverizer +tile.ss.extractor.name=Extractor tile.ss.rolling_machine.name=Rolling Machine tile.ss.mana_squeezer.name=Mana Squeezer tile.ss.time_machine.name=Time Machine @@ -142,6 +144,7 @@ monitor.robot=Blue Robot Shop tile.ss.electric_motor.name=Electric Motor tile.ss.tofu_motor.name=Tofu Motor +tile.ss.gf_dynamo.name=GF Dynamo #Item item.ss.unit.name=Unit @@ -226,19 +229,6 @@ item.ss.steam_bucket.name=Steam Bucket item.ss.iron_fluid_bucket.name=Iron Fluid Bucket item.ss.gold_fluid_bucket.name=Gold Fluid Bucket - -item.ss.craft_unit.name=Craft Unit -item.ss.attack_unit.name=Attack Unit -item.ss.defense_unit.name=Defense Unit -item.ss.attack_rust_unit.name=Attack Rust Unit -item.ss.defense_rust_unit.name=Defense Rust Unit -item.ss.pickaxe_unit.name=Pickaxe Unit - - -item.ss.iron_ring.name=Iron Ring -item.ss.creeper_ring.name=Creeper Shop Ring - - item.ss.magic_dust.name=Magic Dust @@ -248,6 +238,12 @@ item.ss.small_cloth.name=Small Cloth item.ss.canvas.name=Canvas item.ss.drying_flesh.name=Drying Flesh item.ss.flesh_bobbin.name=Flesh Bobbin +item.ss.string_mass.name=String Mass +item.ss.strong_string.name=Strong String +item.ss.strong_string_bobbin.name=Strong String Bobbin +item.ss.strong_cloth.name=Strong Cloth +item.ss.strong_canvas.name=Strong Canvas + item.ss.figure_box.name=Figure Box @@ -336,9 +332,28 @@ item.ss.chocolate.name=Chocolate item.ss.drinking_water_bottle.name=Drinking Water Bottle item.ss.takumi_tea_bottle.name=TAKUMI Tea Bottle + + item.ss.shift_hat.name=Shift's Hat item.ss.rucksack.name=Rucksack +item.ss.oxygen_tank.name=Oxygen Tank item.ss.gf_contact_lenses.name=GF Contact Lenses +item.ss.water_contact_lenses.name=Water Contact Lenses + +item.ss.craft_unit.name=Craft Unit +item.ss.attack_unit.name=Attack Unit +item.ss.defense_unit.name=Defense Unit +item.ss.attack_rust_unit.name=Attack Rust Unit +item.ss.defense_rust_unit.name=Defense Rust Unit +item.ss.pickaxe_unit.name=Pickaxe Unit + + +item.ss.iron_ring.name=Iron Ring +item.ss.creeper_ring.name=Creeper Shop Ring +item.ss.mp_ring.name=MP Ring +item.ss.xp_ring.name=XP Ring + + #Fluid fluid.ss.takumi_tea=TAKUMI Tea @@ -347,6 +362,7 @@ fluid.ss.spring_water=Spring Water fluid.ss.hot_springs=Hot Springs fluid.ss.steam=Steam fluid.ss.mana=Mana +fluid.ss.oxygen=Oxygen fluid.ss.sap=Sap fluid.ss.iron=Iron Fluid @@ -376,6 +392,7 @@ gui.ss.millstone=Millstone gui.ss.loom=Loom gui.ss.sawmill=Sawmill gui.ss.spinning_machine=Spinning Machine +gui.ss.extractor=Extractor gui.ss.pulverizer=Pulverizer gui.ss.rolling_machine=Rolling Machine gui.ss.mana_squeezer=Mana Squeezer @@ -613,10 +630,18 @@ achievement.ss.steam_motor=The power of steam achievement.ss.steam_motor.desc=Craft a small steam motor achievement.ss.steam_motor.desc2=Industrial revolution +achievement.ss.large_windmill=Large windmill Small … +achievement.ss.large_windmill.desc=Craft a small large windmill +achievement.ss.large_windmill.desc2=Large force + achievement.ss.pulverizer=Industrial era achievement.ss.pulverizer.desc=Craft a pulverizer achievement.ss.pulverizer.desc2=Double it ! +achievement.ss.extractor=Near future +achievement.ss.extractor.desc=Craft a extractor +achievement.ss.extractor.desc2=Purification equipment ? + achievement.ss.fan=Oh ~ ~ ~ achievement.ss.fan.desc=Craft a fan achievement.ss.fan.desc2=Blue flame ? @@ -677,6 +702,7 @@ nei.ss.millstone=Millstone Recipe nei.ss.loom=Loom Recipe nei.ss.sawmill=Sawmill Recipe nei.ss.spinning_machine=Spinning Machine Recipe +nei.ss.extractor=Extractor Recipe nei.ss.pulverizer=Pulverizer Recipe nei.ss.rolling_machine=Rolling Machine Recipe nei.ss.mana_squeezer=Mana Squeezer Recipe diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/extractor.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/extractor.png new file mode 100644 index 0000000000000000000000000000000000000000..ca45e5d731491d33e019c69a2dc2a2f96ad2184f GIT binary patch literal 495 zcmV869l6ECHnvX0eneB zK~y-)os%)Ht1u8nPrhuhgn$AGmXho%MHY~btzpB3iT7{fX(lC(E)8fs~T2>)tj-{ioB3rfGgj`lcUXx7#7S_gpTQuMJ8m zhGC#-8h{OH+qPJ1-!>|xsHzIBb=m|{?wq4-TdJx8z!-xuW^1D{COr^iOd^QGVhu=x zl8v7Ztn=8suC3Sq@;pzcL|sa$bg^1%wANT_6ICQzmIaYzS;E&^QxwJKgg9s|#W{y_ lj=HYjHeRpS|N5N)egJKK0viqkI;a2u002ovPDHLkV1gRH(pmrj literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/orichalcum_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/orichalcum_ore.png index a587f90a72353c303b7302f8c8db163cc2baf035..51fd0e62f87a890bf74182b0d262e8f053522631 100644 GIT binary patch delta 531 zcmV+u0_^>p1la_TQGee98wd?M<+5nS0005zNklez=5QRTGXN=ebt)+-n zv=~8k?)eE6ky6pn1}yG8jUsr0F&;RXA#(2`1lQ4O<geSZb+azs|Os+1zqT9?ePC(t`!*}j9viskMucVFhA@46=*#uy@NZFPJC zi*x85K-)1~d?2e{>c;w(gb-x~enh9QtC{PId#-P1-A2>TJj*iTI1cmonSB3)_B(bC z`}F($z_Her0z!y;S+v$@t%Jy4$#5QV?9w+PG{R7C`l z;BN2Fq;%spb&d_()_bY%z=wOc!Ek>dKjqY2qe7h^D+n0l6k6%_)_KjY#LSyFZ$^v0 z@84pKOd%pDr2w$j(liYr1pXIS%@Z=5a{$zJ4S-S#r4-g$w13tB#26ES_r9O!g{>BSn*Rb+Ku)W6HSYJcZB7Vhd+D5xP8t!)^zOn z#+s+m-1FO6^nL%93(Q|z_GhYO`YJ^vZQ>NeFqFQ_j?5CL#Qy+ZhS}S?+zs3S0000< KMNUMnLSTZKeds>` diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/extractor.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/extractor.png new file mode 100644 index 0000000000000000000000000000000000000000..e8e15395c961c02bb29efacbff6aaa772f9dd1e7 GIT binary patch literal 2051 zcmcIkc{Cf?8o!BZr@(B;bKeF^iv<uDX9q0YIZwu^^2( zq04e5oa*tF8+=O15TSCYB)3XUuF3YmfBtpU+vN%8AcF-x_;h5S*?NwPYObpv!eFM` z;9Pl|rdQi$z}1?w!M<)hgzi5s&RV+97?lbZE@P3N`g)N$sVu$ZJo`}^E7E38d!TRQRl1I}QdJFZsf=r19>X=t9}Z{3SzjKtn+|7?&R;{MEeZA&WV|0`^^ zhkp=GdN(=gw0fQqEeza?By5vv#~ei&f3viltIRm@GqOk)cPA{H#C(7{o-60`UazTfbxjQtiEJQGc$%7sHa4=TFbai&M22thCvwQbcfV3L zSH#Uao_c`b7_-)eN%y`$B4sUdsyh4n`f@bwV(0qbG2(C{k;uekc2hWSI`yHaz*;yZ zkn!_z0Ofq9j<&q-Ni>t#1-AOl^%RH9pqO->RUxH>kYqQB2? z%ee`elJfHMu}%K1#NuoX|CJReNIe!cNAmN_tf*k_7tG7rC1}&4qN0qH6wEi3czpYd zcUWSonimzJCo~qgwEs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f2ooJ zb}8yoVGDN@*`@y%m;Mt>;TRnpRyG23{b#1x;hxSKC7qcr9p+NI2$;SPJo`8#dQ{M1 z7u{K7nvMNEr2l>|k8(!^@mG~ciM>oP;^xI05c>xVe<)60Ld>ClH=j5{MGjQ5I?P|# zB{f4SCm=i6>u(g;cFTWU`fKw3WO4y_pqju%eN1cA?h!h9=+Za-7M+zWB4j7GA)IZW zbRjZlzsHZFt+?FX*k$lzU~TZRQnlT5wr(M7IM3@f#|r$v#!0$N>42^Ms?|tFp@PH1 Ljfk&w^-uga09JNE literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/extractor_nei.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/extractor_nei.png new file mode 100644 index 0000000000000000000000000000000000000000..c0a08363159ae2e66387936bafac3e018fb0d116 GIT binary patch literal 2180 zcmcIle>f9bA3vLE8ZDxxUBA)~G_rf$GDDm4Gb&1RQ`h<-x>1W5$!xrpWj5j^Ziz=} z$z7Br6{Ab^loramGs*UbWz;e>cR$|gy*=;KegA&XdCrgL^F8NtKIePB=bUq)+X5CL z&XC)V19zVQ0NFNQAotG4 zP3S>*QqWdE_>h6Mk=;VaRbEs8jLd?3eZo^k6N7}q7iHG)k3$2ep9dIQZ-SQ%zjbuK zo8Ps$qN4ce`h1@rORrb=EOKv!?9BWbnRDTipnr#ydR{2nJiKX3r_E1JSA%6QSKni0 zqt|7(iF+%Mvhl)ywWES-t0K|}<*VuOgkrL6mPQv$MG7vq3-OS`6+yb*V~tYJasD}1 zv~4-9?$wd$hsC2KBL&Pc)x*Rlb^lQO{{8#ML?xxA=ZbV0II$gHYxiW17`2_n?+ep~ z1Wr2yaXn!hn-#|#B6*h&P&QmlNK9N(Q&U6Ee#B0Z9;SJt*^jG?Wq;JiZuTB&XlVFJ zH9QX8g(h&i%m`bGkl{6lY(<0UadHZM zN%@=9Svj7rA4XSP*iv=xlsmqW(pgmtyN3WCNb?4+GOYjDn}?;WgLA5gTCIA9pe0>5?Ye64`S-o{!2h>M9&&nmI?daiQXqQ$x~oH) zs=IPZG3a!X=Ird;J~K0OW(C&G%{(qHZs%^>YrsPE5BTDi?_neosi3H+s9LS!zgx{P zO!Cln$*$l96Z9IjtSedNxyUeMtt9xONgo0~w`H(GI z7GCMt;R;F+yDj3(ScFHrfMdME7+BCVS!6(*uPQzp?^Q!V2l=f81uPL;J#V$XE*;xNp4CWkz|oSJu6{PvC*arw#V^Zn7KA zP#Sko5XUoP>X&!NO#Sxa0R=O7q@j{j^Xk5@x8{O1aVf_QMT$WVzoiRVZHK(zB;;ZEJK{(AV@*baKBn-1F{vPI|ELXP|0 z-=mo{Dr8RjC<#L*G?GZBgwUY|I6`daXe;&Tu@NtWo>@;U@+Dcw2nKw zx~9N@#huSwn!^eRxZte)R2oM2)0#m>MUm=r`NA3oPl21)&G&HGY?Aru!PI?F=e%#F{d_KiWYU0I7 z@%a_{w~60!8G&p)V<-_d3D1A!Qq4YS^~vcRa~rqs923{5$g%?Y8pSn22YyWWyHs2Tp znLxx}^2+VwW3Vd`4CO-0vp-YVZgSi*?$&uf|6SRCp|9Kzpx=GrmLs0E-@?>6eephV zSVX^_;B8;9DhNM89cVj~MFl}kd#OK`SS|zgJ#^rSTxdQgG6esp#BlmZn2L*dLULxm Qn_nWxZ=3JUP5ZL`4c?%lm;e9( literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/machine/mana_squeezer_nei.png b/src/main/resources/assets/sextiarysector/textures/guis/machine/mana_squeezer_nei.png index 5ac34673891a0445cd29fb4c406ab5119f1689d4..678493744230a6afae8eafaaf7d21c8e19483ae1 100644 GIT binary patch delta 1890 zcmV-o2c7u45&jU6Q-2)@A1|W!leYi>2n$I>K~#9!?cG6W9M>5K@Na5U=M#J-+wrU&W^vUvGZ${He*d-{s3!r;~_i`?^x8^w{5QY;3IO+87=lj@nl*^)|>a zpG~qpko(i(Z#2|D15*7-(r68VSFf!#;@V_ev5y{`iwF1D;_VMEw1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gG+I-v9sr diff --git a/src/main/resources/assets/sextiarysector/textures/items/face/water_contact_lenses.png b/src/main/resources/assets/sextiarysector/textures/items/face/water_contact_lenses.png new file mode 100644 index 0000000000000000000000000000000000000000..304ea90e599688cdaf4a9992b5ee862c7328f359 GIT binary patch literal 378 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~vox0>+u609t_%!}?4B-;Ar_~T6C^SYba*>Ot!HTc z|K$?PnpY78nNzNIrUy)XoB#qlKEGgR27<%)@5f8T#msNM&3dVdl_x0e=>LzFKR;e{ zb4ziK*r569{G((Z{}t|n(K{DRJh=1A<$A}MxCz&^6D9!7`oaCwe&>z<_S-(OJ^t-q zA87Ky`=+6Rfx&^jhgx(vKN|y$cTTyLJ;KO@)r$0bP?BH!^Evs;{bx!TliLudk>S7dA^Es2#lDyEqn?L(kf!^OQ@gF4T zMf~{vn>$AFre>g%acd(8gx_H@^@*G3z**bmDVZj~vmjf>hJm5^Vc02GxlnCjC^2}t L`njxgN@xNAV)2(1 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/string_mass.png b/src/main/resources/assets/sextiarysector/textures/items/loom/string_mass.png new file mode 100644 index 0000000000000000000000000000000000000000..4d792eed9a76d900849301cb8c334c678b40c931 GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~vkVKXg!I9nB%qL^r;B5V#p&b(3DzyF_xIQTumAn+ z?SBx%f0Ek_wHy=IS)E2L6VjUQExf_X!^6{JA}qSVB|Gg%I)|9yvBVisjBlcMOWk{S RlM!ebgQu&X%Q~loCIHS;IDY^D literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/strong_canvas.png b/src/main/resources/assets/sextiarysector/textures/items/loom/strong_canvas.png new file mode 100644 index 0000000000000000000000000000000000000000..da6988c427b6e3823c08a6f9f324f0b05bcbdef7 GIT binary patch literal 505 zcmVpHe=lOzep;}L)$N^bxcgXwh2WHP}tO{A2>am;eLq*kk8SyshhHkj=As;Z)@D%#N=SV406oq!XO;Hp?QAE97uNa&&ml^oJ&u}=zG);sM zD2hT9MXc9r@;pZfaeoVEYEcyIb~{|x#WYR!`#njLyt{>)@;r|;O<61!c%Fync>sL- v+A4nx-15nODDR%~IduKk>)`bzetf+GGo_!9DuFo_00000NkvXXu0mjfElSaO literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/strong_cloth.png b/src/main/resources/assets/sextiarysector/textures/items/loom/strong_cloth.png new file mode 100644 index 0000000000000000000000000000000000000000..73cb1bb0e20950d749fbc49250306ebe75597088 GIT binary patch literal 457 zcmV;)0XF`LP)QE4czo?afaHC+Ng4u+daRY)I$iyWG4g@n3oZJn#oFGC5;=sRwnFz^E zxIJrHe2=Dk^4=L%alR@z2mX6$t*zGD{%zm*&Yb5t07;VA9|6|uwS7LH^m;wQFr?jX zvs$g*AkLqz0(hQ>wU+&UkL$XOMk74W<8(R^$FcJUST2{gu4`P^r6>yOy2kT7zRn(x z2mO8@;1l9#t*ugu`~A-4a$z_e5=9Ydno?EO3t&7RbG=?sN|9w5aU462h}gwqLATpQ zDMeLPoX=;9q96!@7wF+|Ac`U;lL-LE7{>t+5xd!JI3ABQn@w7+7Ov~k>2zM8K@c#V zPBF$fFDV#foY`!K@B0h}1FEXR_k9|T25Fj-Wf^5zzM0=r5D~lGZprhUvMdS1klXFX zd_Mnt`P=4+h~4dWHc1jIB34A~kL&wu<3G^{?DVS%F4OzK00000NkvXXu0mjf2b{%7 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/string_strong.png b/src/main/resources/assets/sextiarysector/textures/items/loom/strong_string.png similarity index 100% rename from src/main/resources/assets/sextiarysector/textures/items/loom/string_strong.png rename to src/main/resources/assets/sextiarysector/textures/items/loom/strong_string.png diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/string_strong_bobbin.png b/src/main/resources/assets/sextiarysector/textures/items/loom/strong_string_bobbin.png similarity index 100% rename from src/main/resources/assets/sextiarysector/textures/items/loom/string_strong_bobbin.png rename to src/main/resources/assets/sextiarysector/textures/items/loom/strong_string_bobbin.png diff --git a/src/main/resources/assets/sextiarysector/textures/items/oxygen_tank.png b/src/main/resources/assets/sextiarysector/textures/items/oxygen_tank.png new file mode 100644 index 0000000000000000000000000000000000000000..a90173a68e9c9c788a9200576d5181fdec7aab03 GIT binary patch literal 591 zcmV-V0XNQX0KZo)jX~|3P^xexn=R43E z)6_2=#WlXT#urZ;HvE=swtn*P)f=kiT(pHsF^y|{(T!E{w87Jc=cc4QZE%g>GpvE` zP0$hGY$L4zwk~E^_)$>K<#1>5k!RPLW+DgDfw(t7H^(JL}cmq6w`%NSdZ34 z^4X-Eo;)1l2KGwwwBe3p$)VYj+WaTny>Ns|F|AzVi;cDa7@zz(r95rWja5m+W88YS z7KRzv8;X7cFQluE>7XpqPd0cv9_GX7#njWeVSaar6bskXmO z{pB|vTs_v`!rVkh*^b56%3ry6<~RUtf1BaK7$0t|%N1)`_RSz5sg11&!1dI7xtv@U z+p(}6i@Ax8ihRoFCl3NJlQG<1OYG`48b6?BGKTr4#p^HY{r^Hh6p#VTH+M$Z4UQy; dBHIfF_zyBS=XdN<5dHuF002ovPDHLkV1hIH3%URR literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/ring/mp_ring.png b/src/main/resources/assets/sextiarysector/textures/items/ring/mp_ring.png new file mode 100644 index 0000000000000000000000000000000000000000..14d1f758bdeb419378b616b9c0dfa0489a9453d3 GIT binary patch literal 344 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~vn0C~`$k{Qi9n&Jo-U3d7N^fnHsm^FAkwzKLwv$J zzosuDeumw%C(mX-p(ZNRm3+|R8_&E2+XceC4{%Sp6j{*OtZ_|Bbk~n<(?8T#{`~JE zk(?1M8x@xAaD98=(}~sZnlE(BXAG6wnPR)!^tmm=YTqaK9IfIC>)HRxPUG=*+azPM zEQ=v4$-%4hn$!XAkFzwEx@f9S33|lGXd$z|vfy6w+FTuR*Mm!K{?2onwJc+;tb@$) zdlE-qd$0L)LiIG`v^RxD4(nw$-Z)ed<-h2mqkz=LTXQ6g5>K?mS$^u;8_waReC+eC l+wYIa+kW8u_ue>`(Qr@X{nso{dw?Eh@O1TaS?83{1OVhrhCu)T literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/ring/xp_ring.png b/src/main/resources/assets/sextiarysector/textures/items/ring/xp_ring.png new file mode 100644 index 0000000000000000000000000000000000000000..7718d1e3f371187e4a1cd86575d5a10a8e0aac95 GIT binary patch literal 339 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~vm}p*O5CnB^+2Hqo-U3d7N^fnHsm^FAkwzKLtJ3} z16?f+r!$Wj_cY&J((Eiy_+rA=doKPD-l%Xe@+Y+O_3b*ca7E~BrIL@i?_2+S|N9=- zvUQr;#YKrGY+Ib!H=eAu+`f9<4@rU9cfPlCGCY61*z9}ggffpkx5aiA^EG@lS=qAX z)sY~tE!P-wuJy%Dsfpw^3-sy?^3qs(ggHp#+gGu3*RO9rJuy{s`Qx|WHJ4;|UAx6B zk=&FlGJm!N(9A_GXK&f&vq|_^70gVWt{lj%;mqK7+&OTK0K4vu(C{PO7k?{-c4Suz f2>rRAzKi)!c(k?A%(mM=zcP5b`njxgN@xNA6Xl1X literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/gf_dynamo.png b/src/main/resources/assets/sextiarysector/textures/models/gf_dynamo.png new file mode 100644 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7XPg0y8(f->QtDPnhvef_=U3|RHf`Ee3Bxc~Rkv^7K3!4_ z4OY4zQ(eaSl{n-J8#k)UbHo_17PS@uDnr*ke*8F%MgxFGqd^?Un1Uk@(~vqx6vrh` z2k7;BIOllbg%?ii?BF@y=kM;moA%rsRo@@*b?3O}zWaFe;D57UDH{fy?y(D zgjB1faZJ5dQ$fVOsR)erk&7i)Cj|n-t6oN@(U}#0N&K<)vWo(H|RwXjcS!R zN$`Ni0}qrfD1bfrAl{RI{XPeW<@57t%0#P$z2gp?wI|502oT(I$t7y69lW}B4pecf zq**p-e~l2Mk**GYo?}!osyGq+RjU?(AAm_y4!rczX>EyRJ={}IJ*A%Kk!2a4=W*qg zSDrDv-|!J1%QAqqmPVsd9zSvhDB91X$1`OttBu;}bV!n<{QJlmpy;=azK;GF1V2g! z7;a%Hj~_V$G#U*S78c6mnKWe2o;}*@^$-zStrne5XVEH)$f8$H%avUzWXWqZ8f@6G zVKLnu8HWxXT9o_8kzEl6NRs3|o0_AkZyebbVSskKUH<67^E`&{>C1^09H1EE$gT(j zG@DIUuU?HC{`zBSo?rUTZ5-JZlLf{}ZD(2<^hAWwT^Yp~?hT^dZnJjn+VcE3vMa&> z3kwTnT%T;O&C=XIj_issz{JD^YuBzVU3+BP9Gy-FRb^sgqC7W_?1~A2ciUM}xcBHp zmn*v>3@|@GPp{WI;X<+Lpx5gan-@wZxLny4VSrYvMe#!gRbA8w?Q}YXVYrChjU&4v z44|s->DEhQeYvtLh6=y<;)^GMnyQjz86vWX-Hjvr@%VUrJWl)Z|L?)gMtnC&>i_@% M07*qoM6N<$g6DSE`Tzg` literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/large_windmill.png b/src/main/resources/assets/sextiarysector/textures/models/large_windmill.png new file mode 100644 index 0000000000000000000000000000000000000000..8668c46053c7975082ec5c011fb5fec6276573dc GIT binary patch literal 5926 zcma)AcTf}2x86V?^d=C5NDUoDkP;CvAiYKi}l;-I<-U=iYnH_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|mJsfChqKv9={wx#EWUuD4Y8!d|TzQyiwb4rIp!+|OG6 zZJm4j&l7nb@`j_ePh4?#nwd(9Uiv(8xN?U7{r9luE5Z3sZ&o!iqV@J&-*u}p(uv;< z*@FTpnicgS@;tDT(kE7xvA0u6koug%T*mv}cTh66vUGPXcnu9PCqJDHz(6^3h>YDk!}8TX$4rtN%6Pg-IK+ST||Sg{8Y(>eUVrfe!?KYIv; hXeT(GdJNzRr}w@y)b9S_1HWhks)||)rSew6{{yvHF*g7J literal 0 HcmV?d00001 From 7eae56b1e3414f99a2d2b7292af44c22efc4f539 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 26 Apr 2015 15:33:41 +0900 Subject: [PATCH 77/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20Spray?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・スプレーを追加 ・フィギュアの描画方法を変更 ・吸引器を追加 --- build.gradle | 2 +- .../java/shift/sextiarysector/SSBlocks.java | 7 + .../java/shift/sextiarysector/SSFluids.java | 20 ++ .../java/shift/sextiarysector/SSItems.java | 7 + .../shift/sextiarysector/SextiarySector.java | 4 +- .../shift/sextiarysector/api/EnumColor.java | 59 ++++ .../shift/sextiarysector/api/IColorItem.java | 13 + .../shift/sextiarysector/block/BlockPipe.java | 50 ++- .../block/BlockSuctionMachine.java | 75 +++++ .../container/InventoryPlayerNext.java | 11 +- .../event/CommonEventHandler.java | 99 +++--- .../sextiarysector/event/HUDEventHandler.java | 29 ++ .../sextiarysector/fluid/FluidColor.java | 21 ++ .../shift/sextiarysector/item/ItemDrink.java | 5 +- .../sextiarysector/item/ItemFullBottle.java | 1 + .../sextiarysector/item/ItemGuiUnit.java | 3 +- .../sextiarysector/item/ItemLavaBottle.java | 15 +- .../shift/sextiarysector/item/ItemSpray.java | 283 +++++++++++++++++ .../sextiarysector/item/ItemWaterBottle.java | 10 +- .../sextiarysector/module/ModuleColor.java | 28 ++ .../player/CustomPlayerData.java | 6 +- .../player/EntityPlayerManager.java | 19 +- .../sextiarysector/player/EquipmentStats.java | 4 +- .../sextiarysector/proxy/ClientProxy.java | 6 + .../sextiarysector/proxy/CommonProxy.java | 3 + .../recipe/RecipesExtractor.java | 5 + .../sextiarysector/recipe/RecipesMachine.java | 13 + .../renderer/block/RendererFigure.java | 284 ++++++++++++++---- .../renderer/block/RendererPipe.java | 56 +++- .../tileentity/TileEntityPipe.java | 80 +++++ .../tileentity/TileEntitySuctionMachine.java | 237 +++++++++++++++ .../assets/sextiarysector/lang/en_US.lang | 19 ++ .../textures/blocks/machine/pump_up.png | Bin 0 -> 637 bytes .../sextiarysector/textures/guis/progress.png | Bin 0 -> 7218 bytes .../textures/items/fluid/color_spray.png | Bin 0 -> 236 bytes .../textures/models/copper_pipe_color.png | Bin 0 -> 1584 bytes 36 files changed, 1333 insertions(+), 141 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/api/EnumColor.java create mode 100644 src/main/java/shift/sextiarysector/api/IColorItem.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockSuctionMachine.java create mode 100644 src/main/java/shift/sextiarysector/fluid/FluidColor.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemSpray.java create mode 100644 src/main/java/shift/sextiarysector/module/ModuleColor.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntitySuctionMachine.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/machine/pump_up.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/progress.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/color_spray.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/copper_pipe_color.png diff --git a/build.gradle b/build.gradle index ed98a29..dd82a3c 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.2.0.a-${project.minecraft.version}" +version = "2.3.0.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 60eadef..a9d1021 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -50,6 +50,7 @@ import shift.sextiarysector.block.BlockSmallWindmill; import shift.sextiarysector.block.BlockSquare; import shift.sextiarysector.block.BlockSteamMotor; +import shift.sextiarysector.block.BlockSuctionMachine; import shift.sextiarysector.block.BlockTank; import shift.sextiarysector.block.BlockTrap; import shift.sextiarysector.block.BlockWindmill; @@ -92,6 +93,7 @@ import shift.sextiarysector.tileentity.TileEntitySmallWindmill; import shift.sextiarysector.tileentity.TileEntitySquare; import shift.sextiarysector.tileentity.TileEntitySteamMotor; +import shift.sextiarysector.tileentity.TileEntitySuctionMachine; import shift.sextiarysector.tileentity.TileEntityTank; import shift.sextiarysector.tileentity.TileEntityTrap; import shift.sextiarysector.tileentity.TileEntityWindmill; @@ -175,6 +177,7 @@ public class SSBlocks { public static Block extractor; public static Block pump; + public static Block suctionMachine; public static Block pulverizer; @@ -501,6 +504,10 @@ public static void initBlicks() { GameRegistry.registerTileEntity(TileEntityPump.class, "SSPump"); GameRegistry.registerBlock(pump, "pump"); + suctionMachine = new BlockSuctionMachine().setBlockTextureName("sextiarysector:machine/pump").setBlockName("ss.suction_machine"); + GameRegistry.registerTileEntity(TileEntitySuctionMachine.class, "SSSuctionMachine"); + GameRegistry.registerBlock(suctionMachine, "SuctionMachine"); + pulverizer = new BlockSimpleMachine("pulverizer", 30, SSRecipes.pulverizer, 3).setBlockName("ss.pulverizer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(pulverizer, "Pulverizer"); diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index 85e80a2..bee1aee 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -1,12 +1,18 @@ package shift.sextiarysector; +import java.util.Locale; + import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; +import shift.sextiarysector.api.EnumColor; import shift.sextiarysector.event.ClientEventHandler; +import shift.sextiarysector.fluid.FluidColor; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -27,6 +33,8 @@ public class SSFluids { public static Fluid iron; public static Fluid gold; + public static Fluid[] color; + public static void initFluids() { takumiTea = new SSFluid("TakumiTea", 0, 0x006400, 5, 2.0f).setUnlocalizedName("takumi_tea"); @@ -44,6 +52,11 @@ public static void initFluids() { iron = new SSFluid("Iron", 2, 0xFF1493, 1, 1.0f).setUnlocalizedName("iron"); gold = new SSFluid("Gold", 2, 0xFFD700, 1, 1.0f).setUnlocalizedName("gold"); + color = new Fluid[16]; + for (int i = 0; i < color.length; i++) { + color[i] = new FluidColor(EnumColor.getColor(i).name(), EnumColor.getColor(i)).setUnlocalizedName(EnumColor.getColor(i).name().toLowerCase(Locale.ENGLISH)); + } + } public static void postFluids() { @@ -63,6 +76,13 @@ public static void postFluids() { FluidContainerRegistry.registerFluidContainer(iron, new ItemStack(SSItems.ironFluidBucket, 1), new ItemStack(Items.bucket, 1)); FluidContainerRegistry.registerFluidContainer(gold, new ItemStack(SSItems.goldFluidBucket, 1), new ItemStack(Items.bucket, 1)); + for (int i = 0; i < color.length; i++) { + + ItemStack item = new ItemStack(SSItems.colorSpray, 1, i); + ((IFluidContainerItem) item.getItem()).fill(item, new FluidStack(color[i], 1000), true); + FluidContainerRegistry.registerFluidContainer(color[i], item, new ItemStack(SSItems.emptyBottle)); + } + } public static class SSFluid extends Fluid { diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 1a8ac2b..cc93149 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -38,6 +38,7 @@ import shift.sextiarysector.item.ItemShopRing; import shift.sextiarysector.item.ItemSimpleBucket; import shift.sextiarysector.item.ItemSoup; +import shift.sextiarysector.item.ItemSpray; import shift.sextiarysector.item.ItemUnit; import shift.sextiarysector.item.ItemWaterBottle; import shift.sextiarysector.item.ItemWateringCan; @@ -67,7 +68,9 @@ public class SSItems { public static Item ninjaGFStorage; public static Item orichalcumGFStorage; + //hammer public static Item hammer; + public static Item colorSpray; public static Item calendar; public static Item seasonStone; @@ -308,9 +311,13 @@ public static void initItems() { orichalcumGFStorage = new ItemGearStorage(5, 10000, 5).setUnlocalizedName("ss.orichalcum_gf_storage").setTextureName("sextiarysector:gearforce/orichalcum_gear_storage").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(orichalcumGFStorage, "OrichalcumGFStorage"); + //ハンマー hammer = new ItemHammer().setUnlocalizedName("ss.hammer").setTextureName("sextiarysector:machine/hammer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(hammer, "Hammer"); + colorSpray = new ItemSpray().setUnlocalizedName("ss.color_spray").setTextureName("sextiarysector:fluid/color_spray").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(colorSpray, "ColorSpray"); + calendar = new ItemCalendar().setUnlocalizedName("ss.calendar").setTextureName("sextiarysector:calendar").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(calendar, "Calendar"); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 2aa4dbe..298ec69 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -36,7 +36,7 @@ public class SextiarySector { public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.2.0"; + public static final String VERSION = "2.3.0"; @Mod.Instance("SextiarySector") public static SextiarySector instance; @@ -113,6 +113,8 @@ public void preInit(FMLPreInitializationEvent event) SSAchievement.initAchievements(); + SextiarySector.proxy.setItemCustomRenderers(); + } @Mod.EventHandler diff --git a/src/main/java/shift/sextiarysector/api/EnumColor.java b/src/main/java/shift/sextiarysector/api/EnumColor.java new file mode 100644 index 0000000..34b1df1 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/EnumColor.java @@ -0,0 +1,59 @@ +package shift.sextiarysector.api; + +public enum EnumColor { + + Black(0x000000), + Red(0xFF0000), + Green(0x088A29), + Brown(0x8A4B08), + Blue(0x0000FF), + Purple(0xB404AE), + Cyan(0x00FFFF), + LightGray(0x2EFE2E), + Gray(0x848484), + Pink(0xFF00FF), + Lime(0x64FE2E), + Yellow(0xFFFF00), + LightBlue(0x2E9AFE), + Magenta(0xFF00BF), + Orange(0xFF4000), + White(0xFFFFFF), + Unknown(0x000000); + + public static EnumColor[] colors = { + Black, + Red, + Green, + Brown, + Blue, + Purple, + Cyan, + LightGray, + Gray, + Pink, + Lime, + Yellow, + LightBlue, + Magenta, + Orange, + White + }; + + public final int color; + + private EnumColor(int color) { + this.color = color; + } + + public static EnumColor getColor(int i) { + + if (0 > i || i > 15) return Unknown; + + return colors[i]; + + } + + public byte[] getGLColor3ub() { + return new byte[] { (byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF) }; + } +} \ No newline at end of file diff --git a/src/main/java/shift/sextiarysector/api/IColorItem.java b/src/main/java/shift/sextiarysector/api/IColorItem.java new file mode 100644 index 0000000..926f8f5 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/IColorItem.java @@ -0,0 +1,13 @@ +package shift.sextiarysector.api; + +import net.minecraft.item.ItemStack; + +public interface IColorItem { + + public EnumColor getColor(ItemStack item); + + public void useItem(ItemStack item); + + public boolean canUse(ItemStack item); + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockPipe.java b/src/main/java/shift/sextiarysector/block/BlockPipe.java index 484fba0..f232870 100644 --- a/src/main/java/shift/sextiarysector/block/BlockPipe.java +++ b/src/main/java/shift/sextiarysector/block/BlockPipe.java @@ -2,6 +2,8 @@ import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.IBlockAccess; @@ -9,6 +11,8 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidHandler; import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.EnumColor; +import shift.sextiarysector.api.IColorItem; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.tileentity.TileEntityPipe; import cpw.mods.fml.relauncher.Side; @@ -25,6 +29,37 @@ public BlockPipe() { this.setCreativeTab(SextiarySectorAPI.TabSSCore); } + @Override + public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { + + ItemStack item = par5EntityPlayer.getCurrentEquippedItem(); + + if (item == null || !(item.getItem() instanceof IColorItem)) return false; + + if (!((IColorItem) item.getItem()).canUse(item)) return false; + + if (par1World.isRemote) return true; + + return this.changeColor(par1World, x, y, z, par5EntityPlayer, item); + + //return true; + } + + public boolean changeColor(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, ItemStack itemStack) { + + TileEntityPipe t = (TileEntityPipe) par1World.getTileEntity(x, y, z); + + IColorItem item = ((IColorItem) itemStack.getItem()); + + if (t.color.ordinal() == item.getColor(itemStack).ordinal()) return false; + + t.color = item.getColor(itemStack); + item.useItem(itemStack); + + par1World.markBlockForUpdate(x, y, z); + return true; + } + @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityPipe(); @@ -119,11 +154,22 @@ public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, i return AxisAlignedBB.getBoundingBox(par2 + defaultSize[4], par3 + defaultSize[0], par4 + defaultSize[2], par2 + defaultSize[5], par3 + defaultSize[1], par4 + defaultSize[3]); } - public boolean canConnect(IBlockAccess world, int x, int y, int z, ForgeDirection d) { + public static boolean canConnect(IBlockAccess world, int x, int y, int z, ForgeDirection d) { TileEntity t = world.getTileEntity(x + d.offsetX, y + d.offsetY, z + d.offsetZ); - if (t != null && t instanceof IFluidHandler) return true; + if (t != null && t instanceof IFluidHandler) { + + if (!(t instanceof TileEntityPipe)) return true; + + TileEntityPipe tP1 = (TileEntityPipe) world.getTileEntity(x, y, z); + if (tP1 == null) return false; + TileEntityPipe tP2 = (TileEntityPipe) t; + + if (tP1.color.ordinal() == EnumColor.Unknown.ordinal() || tP2.color.ordinal() == EnumColor.Unknown.ordinal()) return true; + if (tP1.color.ordinal() == tP2.color.ordinal()) return true; + + } return false; } diff --git a/src/main/java/shift/sextiarysector/block/BlockSuctionMachine.java b/src/main/java/shift/sextiarysector/block/BlockSuctionMachine.java new file mode 100644 index 0000000..24f1cfc --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockSuctionMachine.java @@ -0,0 +1,75 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import shift.sextiarysector.api.SextiarySectorAPI; +import shift.sextiarysector.tileentity.TileEntityDirection; +import shift.sextiarysector.tileentity.TileEntitySuctionMachine; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockSuctionMachine extends BlockContainer { + + @SideOnly(Side.CLIENT) + private IIcon iconTop; + @SideOnly(Side.CLIENT) + private IIcon iconUnder; + + public BlockSuctionMachine() { + super(Material.wood); + this.setHardness(1.0F); + this.setStepSound(soundTypeStone); + this.setCreativeTab(SextiarySectorAPI.TabSSIndustry); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess p_149673_1_, int x, int y, int z, int side) { + + int d = ((TileEntityDirection) p_149673_1_.getTileEntity(x, y, z)).direction.ordinal(); + + if (side == 1) { + return this.iconTop; + } else if (side == 0) { + return this.iconTop; + } else { + return this.blockIcon; + } + + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(int par1, int par2) { + + if (par1 == 1) { + return this.iconTop; + } else if (par1 == 0) { + return this.iconTop; + } else { + return this.blockIcon; + } + + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) { + this.blockIcon = par1IconRegister.registerIcon(this.getTextureName() + "_up"); + + this.iconTop = par1IconRegister.registerIcon(this.getTextureName() + "_top"); + this.iconUnder = par1IconRegister.registerIcon(this.getTextureName()); + + } + + @Override + public TileEntity createNewTileEntity(World par1World, int p_149915_2_) { + return new TileEntitySuctionMachine(); + } + +} diff --git a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java index 977012a..a75b7aa 100644 --- a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java @@ -10,10 +10,11 @@ public class InventoryPlayerNext implements IInventory { ItemBox items = new ItemBox("Base", 20, 1); - private final EntityPlayer player; - public InventoryPlayerNext(EntityPlayer player) { - this.player = player; + //private final EntityPlayer player; + + public InventoryPlayerNext() { + //this.player = player; } @Override @@ -82,7 +83,7 @@ public boolean isItemValidForSlot(int i, ItemStack itemstack) { return true; } - public void dropAllItems() + public void dropAllItems(EntityPlayer player) { int i; @@ -93,7 +94,7 @@ public void dropAllItems() if (item != null && ((IEquipment) item.getItem()).canDrop(EquipmentType.getEquipmentTypeFromSlot(i), item, player)) { - this.player.func_146097_a(item, true, false); + player.func_146097_a(item, true, false); this.items.setInventorySlotContents(i, null); } } diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index 914f6cd..95cbba3 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -69,7 +69,7 @@ public void useEvent(PlayerInteractEvent event) { } - /* 無理でした(╹◡╹) + /*無理でした(╹◡╹) @SubscribeEvent public void useBottleEvent(PlayerInteractEvent event) { @@ -77,58 +77,63 @@ public void useBottleEvent(PlayerInteractEvent event) { EntityPlayer p = event.entityPlayer; World w = event.world; - if(item == null)return; + if (item == null) return; - if(item.getItem() != Items.glass_bottle)return; + if (item.getItem() != Items.glass_bottle) return; //if(w.isRemote)return; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(w, p, true); - if (movingobjectposition == null) - { - return; - } - else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!w.canMineBlock(p, i, j, k)) - { - return; - } - - if (!p.canPlayerEdit(i, j, k, movingobjectposition.sideHit, item)) - { - return; - } - - if (w.getBlock(i, j, k) == SSBlocks.drinkingWater) - { - --item.stackSize; - event.useItem = Result.DENY; - //event.setCanceled(true); - - if (item.stackSize <= 0) - { - p.inventory.setInventorySlotContents(p.inventory.currentItem, new ItemStack(SSItems.drinkingWaterSmallBottle)); - return; - //return new ItemStack(SSItems.drinkingWaterSmallBottle); - } - - if (!p.inventory.addItemStackToInventory(new ItemStack(SSItems.drinkingWaterSmallBottle))) - { - p.dropPlayerItemWithRandomChoice(new ItemStack(SSItems.drinkingWaterSmallBottle, 1, 0), false); - } - } - } - - return; - } + if (movingobjectposition == null) + { + return; + } + else + { + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!w.canMineBlock(p, i, j, k)) + { + return; + } + + if (!p.canPlayerEdit(i, j, k, movingobjectposition.sideHit, item)) + { + return; + } + + if (w.getBlock(i, j, k) == SSBlocks.drinkingWater) + { + --item.stackSize; + event.useItem = Result.DENY; + if (event.action.equals(Action.RIGHT_CLICK_AIR)) { + event.setCanceled(true); + event.useItem = Result.DEFAULT; + } + + //event.setResult(Result.DENY); + + if (item.stackSize <= 0) + { + p.inventory.setInventorySlotContents(p.inventory.currentItem, new ItemStack(SSItems.drinkingWaterBottle)); + return; + //return new ItemStack(SSItems.drinkingWaterSmallBottle); + } + + if (!p.inventory.addItemStackToInventory(new ItemStack(SSItems.drinkingWaterBottle))) + { + p.dropPlayerItemWithRandomChoice(new ItemStack(SSItems.drinkingWaterBottle, 1, 0), false); + } + } + } + + return; + } }*/ diff --git a/src/main/java/shift/sextiarysector/event/HUDEventHandler.java b/src/main/java/shift/sextiarysector/event/HUDEventHandler.java index eda6836..189a702 100644 --- a/src/main/java/shift/sextiarysector/event/HUDEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/HUDEventHandler.java @@ -9,6 +9,9 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.GuiIngameForge; import net.minecraftforge.client.event.RenderGameOverlayEvent; + +import org.lwjgl.opengl.GL11; + import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.player.MoistureStats; import cpw.mods.fml.client.FMLClientHandler; @@ -18,6 +21,7 @@ public class HUDEventHandler { public static final ResourceLocation icons = new ResourceLocation("sextiarysector:textures/guis/icons.png"); + public static final ResourceLocation progress = new ResourceLocation("sextiarysector:textures/guis/progress.png"); public static int left_height = 39; public static int right_height = 39; @@ -122,6 +126,10 @@ public void onRenderGameOverlayEventPost(RenderGameOverlayEvent.Post event) { } + if (event.type == RenderGameOverlayEvent.ElementType.CROSSHAIRS) { + //renderProgress(width, height); + } + } //アイテムテキストずらし @@ -279,6 +287,27 @@ else if (idx == levelLast) } + protected void renderProgress(int width, int height) { + + mc.mcProfiler.startSection("SSProgress"); + + bind(progress); + + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_BLEND); + //OpenGlHelper.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR, 1, 0); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glTranslatef(-50.0f, -50.0f, 0); + drawTexturedModalRect(width / 2, height / 2, 0, 0, 100, 100); + //OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0); + GL11.glDisable(GL11.GL_BLEND); + GL11.glPopMatrix(); + + mc.mcProfiler.endSection(); + bind(Gui.icons); + + } + private void bind(ResourceLocation res) { FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); diff --git a/src/main/java/shift/sextiarysector/fluid/FluidColor.java b/src/main/java/shift/sextiarysector/fluid/FluidColor.java new file mode 100644 index 0000000..4177cf1 --- /dev/null +++ b/src/main/java/shift/sextiarysector/fluid/FluidColor.java @@ -0,0 +1,21 @@ +package shift.sextiarysector.fluid; + +import shift.sextiarysector.SSFluids.SSFluid; +import shift.sextiarysector.api.EnumColor; + +public class FluidColor extends SSFluid { + + public EnumColor color; + + public FluidColor(String fluidName, EnumColor color) { + super(fluidName, 0, 0, 0, 0); + this.color = color; + } + + @Override + public int getColor() + { + return color.color; + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemDrink.java b/src/main/java/shift/sextiarysector/item/ItemDrink.java index f2fd6ed..c70af7a 100644 --- a/src/main/java/shift/sextiarysector/item/ItemDrink.java +++ b/src/main/java/shift/sextiarysector/item/ItemDrink.java @@ -2,11 +2,12 @@ import shift.sextiarysector.SSItems; -public class ItemDrink extends ItemFoodDrink{ +public class ItemDrink extends ItemFoodDrink { - public ItemDrink(int food, float foodM, int drink, float drinkM,int stamina, float staminaM, boolean p_i45339_3_) { + public ItemDrink(int food, float foodM, int drink, float drinkM, int stamina, float staminaM, boolean p_i45339_3_) { super(food, foodM, drink, drinkM, stamina, staminaM, p_i45339_3_); this.setDrink(); + this.setMaxStackSize(4); this.setContainerItem(SSItems.emptyBottle); } diff --git a/src/main/java/shift/sextiarysector/item/ItemFullBottle.java b/src/main/java/shift/sextiarysector/item/ItemFullBottle.java index 1c27140..87e53c1 100644 --- a/src/main/java/shift/sextiarysector/item/ItemFullBottle.java +++ b/src/main/java/shift/sextiarysector/item/ItemFullBottle.java @@ -9,6 +9,7 @@ public class ItemFullBottle extends Item { public ItemFullBottle() { this.setCreativeTab(SextiarySectorAPI.TabSSCore); this.setContainerItem(SSItems.emptyBottle); + this.setMaxStackSize(4); } } diff --git a/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java b/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java index 4289110..39403fc 100644 --- a/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java +++ b/src/main/java/shift/sextiarysector/item/ItemGuiUnit.java @@ -52,8 +52,7 @@ public void onUpdate(EquipmentType equipment, ItemStack stack, World world, Enti @Override public boolean canDrop(EquipmentType equipment, ItemStack stack, EntityPlayer player) { - // TODO 自動生成されたメソッド・スタブ - return false; + return true; } } diff --git a/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java b/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java index 8f3b2a1..4c9a5b8 100644 --- a/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java +++ b/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java @@ -9,28 +9,29 @@ import shift.sextiarysector.SSPotions; import shift.sextiarysector.api.SextiarySectorAPI; -public class ItemLavaBottle extends ItemFoodDrink{ +public class ItemLavaBottle extends ItemFoodDrink { public ItemLavaBottle() { super(0, 0, 0, 0, 1, 0, false); this.setContainerItem(SSItems.emptyBottle); this.setDrink(); + this.setMaxStackSize(4); this.setAlwaysEdible(); this.setCreativeTab(SextiarySectorAPI.TabSSFluid); } + @Override protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer player) - { + { player.addExhaustion(7.8f); - player.addPotionEffect(new PotionEffect(SSPotions.burn.getId(),360,2)); + player.addPotionEffect(new PotionEffect(SSPotions.burn.getId(), 360, 2)); if (!player.inventory.addItemStackToInventory(new ItemStack(Blocks.obsidian))) - { + { player.dropPlayerItemWithRandomChoice(new ItemStack(Blocks.obsidian, 1, 0), false); - } + } - - } + } } diff --git a/src/main/java/shift/sextiarysector/item/ItemSpray.java b/src/main/java/shift/sextiarysector/item/ItemSpray.java new file mode 100644 index 0000000..932656e --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemSpray.java @@ -0,0 +1,283 @@ +package shift.sextiarysector.item; + +import java.text.NumberFormat; +import java.util.List; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.IIcon; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; +import shift.sextiarysector.SSFluids; +import shift.sextiarysector.SSItems; +import shift.sextiarysector.api.EnumColor; +import shift.sextiarysector.api.IColorItem; +import shift.sextiarysector.fluid.FluidColor; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemSpray extends Item implements IColorItem, IFluidContainerItem { + + protected int capacity; + + public ItemSpray() { + this.setHasSubtypes(true); + this.capacity = FluidContainerRegistry.BUCKET_VOLUME * 1;//capacity; + this.setMaxStackSize(1); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) + { + + //p_150895_3_.add(new ItemStack(this, 1, 0)); + + for (int i = 0; i < SSFluids.color.length; i++) { + + ItemStack item = new ItemStack(this, 1, i); + this.fill(item, new FluidStack(SSFluids.color[i], capacity), true); + + p_150895_3_.add(item); + + } + + } + + @Override + public int getDamage(ItemStack stack) + { + if (this.getFluid(stack) == null) return 16; + + return ((FluidColor) this.getFluid(stack).getFluid()).color.ordinal(); + } + + @SideOnly(Side.CLIENT) + @Override + public void addInformation(ItemStack itemStack, EntityPlayer par3EntityPlayer, List list, boolean par4) + { + + String f = "None"; + int amount = 0; + + if (this.getFluid(itemStack) != null) + { + f = this.getFluid(itemStack).getFluid().getLocalizedName(this.getFluid(itemStack)); + amount = this.getFluid(itemStack).amount; + } + + NumberFormat nf = NumberFormat.getNumberInstance(); + + list.add("Dye : " + f); + list.add("Amount : " + nf.format(amount) + " / " + nf.format(this.capacity) + " mB"); + + } + + @Override + public boolean showDurabilityBar(ItemStack stack) + { + + //if (this.getFluidAmount(stack) == 0) return false; + + return true;//stack.isItemDamaged(); + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) + { + return 1.0D - (double) this.getFluidAmount(stack) / (double) this.capacity; + } + + /* + @Override + public void addInformation(ItemStack itemstack, EntityPlayer par1EntityPlayer, List list, boolean flag) + { + list.add(EnumColor.getColor(itemstack.getItemDamage()).name()); + }*/ + + @Override + public EnumColor getColor(ItemStack itemstack) { + + if (this.getFluid(itemstack) == null) return EnumColor.Unknown; + return ((FluidColor) this.getFluid(itemstack).getFluid()).color; + + } + + @Override + public void useItem(ItemStack item) { + this.drain(item, 10, true); + } + + @Override + public boolean canUse(ItemStack item) { + return this.getFluidAmount(item) >= 10; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() + { + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamageForRenderPass(int p_77618_1_, int p_77618_2_) + { + return p_77618_2_ == 0 ? SSItems.emptyBottle.getIconFromDamage(0) : super.getIconFromDamageForRenderPass(p_77618_1_, p_77618_2_); + } + + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack itemstack, int p_82790_2_) + { + + if (p_82790_2_ == 0) return super.getColorFromItemStack(itemstack, p_82790_2_); + if (this.getFluid(itemstack) == null) return super.getColorFromItemStack(itemstack, p_82790_2_); + + return ((FluidColor) this.getFluid(itemstack).getFluid()).color.color; + + } + + /* IFluidContainerItem */ + @Override + public FluidStack getFluid(ItemStack container) + { + if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) + { + return null; + } + return FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); + } + + @Override + public int getCapacity(ItemStack container) + { + return capacity; + } + + @Override + public int fill(ItemStack container, FluidStack resource, boolean doFill) + { + if (resource == null) + { + return 0; + } + + if (!(resource.getFluid() instanceof FluidColor)) return 0; + + if (!doFill) + { + if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) + { + return Math.min(capacity, resource.amount); + } + + FluidStack stack = FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); + + if (stack == null) + { + return Math.min(capacity, resource.amount); + } + + if (!stack.isFluidEqual(resource)) + { + return 0; + } + + return Math.min(capacity - stack.amount, resource.amount); + } + + if (container.stackTagCompound == null) + { + container.stackTagCompound = new NBTTagCompound(); + } + + if (!container.stackTagCompound.hasKey("Fluid")) + { + NBTTagCompound fluidTag = resource.writeToNBT(new NBTTagCompound()); + + if (capacity < resource.amount) + { + fluidTag.setInteger("Amount", capacity); + container.stackTagCompound.setTag("Fluid", fluidTag); + return capacity; + } + + container.stackTagCompound.setTag("Fluid", fluidTag); + return resource.amount; + } + + NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid"); + FluidStack stack = FluidStack.loadFluidStackFromNBT(fluidTag); + + if (!stack.isFluidEqual(resource)) + { + return 0; + } + + int filled = capacity - stack.amount; + if (resource.amount < filled) + { + stack.amount += resource.amount; + filled = resource.amount; + } + else + { + stack.amount = capacity; + } + + container.stackTagCompound.setTag("Fluid", stack.writeToNBT(fluidTag)); + return filled; + } + + @Override + public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) + { + if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) + { + return null; + } + + FluidStack stack = FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); + if (stack == null) + { + return null; + } + + int currentAmount = stack.amount; + stack.amount = Math.min(stack.amount, maxDrain); + if (doDrain) + { + if (currentAmount == stack.amount) + { + container.stackTagCompound.removeTag("Fluid"); + + if (container.stackTagCompound.hasNoTags()) + { + container.stackTagCompound = null; + } + return stack; + } + + NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid"); + fluidTag.setInteger("Amount", currentAmount - stack.amount); + container.stackTagCompound.setTag("Fluid", fluidTag); + } + return stack; + } + + public int getFluidAmount(ItemStack container) { + + if (this.getFluid(container) == null) { + return 0; + } + return this.getFluid(container).amount; + + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemWaterBottle.java b/src/main/java/shift/sextiarysector/item/ItemWaterBottle.java index 7add2a0..dcc20d6 100644 --- a/src/main/java/shift/sextiarysector/item/ItemWaterBottle.java +++ b/src/main/java/shift/sextiarysector/item/ItemWaterBottle.java @@ -8,20 +8,22 @@ import shift.sextiarysector.SSItems; import shift.sextiarysector.api.SextiarySectorAPI; -public class ItemWaterBottle extends ItemFoodDrink{ +public class ItemWaterBottle extends ItemFoodDrink { public ItemWaterBottle() { super(0, 0, 3, 0, 0, 0, false); this.setContainerItem(SSItems.emptyBottle); this.setDrink(); + this.setMaxStackSize(4); this.setCreativeTab(SextiarySectorAPI.TabSSFluid); } + @Override protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer player) - { + { player.addExhaustion(4.5f); - player.addPotionEffect(new PotionEffect(Potion.hunger.getId(),30,0)); + player.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 30, 0)); - } + } } diff --git a/src/main/java/shift/sextiarysector/module/ModuleColor.java b/src/main/java/shift/sextiarysector/module/ModuleColor.java new file mode 100644 index 0000000..cd9d76a --- /dev/null +++ b/src/main/java/shift/sextiarysector/module/ModuleColor.java @@ -0,0 +1,28 @@ +package shift.sextiarysector.module; + +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class ModuleColor implements IModule { + + @Override + public void preInit(FMLPreInitializationEvent event) { + + } + + @Override + public void load(FMLInitializationEvent event) { + + } + + @Override + public void postInit(FMLPostInitializationEvent event) { + + } + + //public static float[] getGLColor3f(EnumColor color) { + // return EntitySheep.fleeceColorTable[15 - color.ordinal()]; + //} + +} diff --git a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java index a3eb361..ac0ab18 100644 --- a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java +++ b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java @@ -62,11 +62,11 @@ public void loadNBTData(NBTTagCompound compound) { @Override public void init(Entity entity, World world) { - this.moisture = new MoistureStats(); + if (this.moisture == null) this.moisture = new MoistureStats(); - this.stamina = new StaminaStats(); + if (this.stamina == null) this.stamina = new StaminaStats(); - this.equipment = new EquipmentStats((EntityPlayer) entity); + if (this.equipment == null) this.equipment = new EquipmentStats(); //this.tab = new TabStats(); diff --git a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java index a1b35ed..488ccf8 100644 --- a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java +++ b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java @@ -2,6 +2,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.event.entity.EntityEvent; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; @@ -161,7 +162,7 @@ public static void onUpdateEntity(EntityPlayer entityPlayer) public void onPlayerDropsEvent(PlayerDropsEvent event) { if (!event.entityPlayer.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) { - this.getCustomPlayerData(event.entityPlayer).getEquipmentStats().inventory.dropAllItems(); + this.getCustomPlayerData(event.entityPlayer).getEquipmentStats().inventory.dropAllItems(event.entityPlayer); } } @@ -170,7 +171,21 @@ public void onPlayerDropsEvent(PlayerDropsEvent event) public void onPlayerCloneEvent(net.minecraftforge.event.entity.player.PlayerEvent.Clone event) { - if (!event.wasDeath) return; + if (!event.wasDeath) { + + EntityPlayer old = event.original; + + EquipmentStats e = this.getEquipmentStats(old); + NBTTagCompound nbt = new NBTTagCompound(); + e.writeNBT(nbt); + + EquipmentStats eNew = this.getEquipmentStats(event.entityPlayer); + eNew.readNBT(nbt); + + //this.getCustomPlayerData(event.entityPlayer).setEquipmentStats(e); + + return; + } if (event.entityPlayer.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) { diff --git a/src/main/java/shift/sextiarysector/player/EquipmentStats.java b/src/main/java/shift/sextiarysector/player/EquipmentStats.java index c3c3849..beaba43 100644 --- a/src/main/java/shift/sextiarysector/player/EquipmentStats.java +++ b/src/main/java/shift/sextiarysector/player/EquipmentStats.java @@ -12,9 +12,9 @@ public class EquipmentStats { public InventoryPlayerNext inventory; - public EquipmentStats(EntityPlayer player) { + public EquipmentStats() { - inventory = new InventoryPlayerNext(player); + inventory = new InventoryPlayerNext(); } diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index 4c3509b..d540949 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -8,6 +8,7 @@ import org.apache.logging.log4j.Level; import shift.mceconomy2.packet.PacketHandler; +import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SextiarySector; import shift.sextiarysector.entity.EntityMineboat; import shift.sextiarysector.entity.EntityMineboatChest; @@ -154,6 +155,11 @@ public void setCustomRenderers() { } + @Override + public void setItemCustomRenderers() { + MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SSBlocks.figure), new RendererFigure()); + } + @SideOnly(Side.CLIENT) public void setCustomClientRenderers() { diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 4002bd4..6a43694 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -47,6 +47,9 @@ public EntityPlayer getClientPlayer() { public void setCustomRenderers() { } + public void setItemCustomRenderers() { + } + public void registerItemRenderer(Item item) { } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesExtractor.java b/src/main/java/shift/sextiarysector/recipe/RecipesExtractor.java index c7c8b31..b70a1df 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesExtractor.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesExtractor.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import shift.sextiarysector.SSFluids; +import shift.sextiarysector.api.EnumColor; public class RecipesExtractor { @@ -15,6 +16,10 @@ public static void addRecipes(RecipeSimpleFluid recipe) recipe.add("treeLeaves", null, new FluidStack(SSFluids.oxygen, 200)); recipe.add(new ItemStack(Blocks.grass), new ItemStack(Items.clay_ball), new FluidStack(SSFluids.oxygen, 50)); + for (int i = 0; i < SSFluids.color.length; i++) { + recipe.add("dye" + EnumColor.getColor(i).name(), null, new FluidStack(SSFluids.color[i], 200)); + } + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index daf5fb4..29229b8 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -5,6 +5,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; +import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; import shift.sextiarysector.SSBlocks; @@ -36,6 +37,11 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('x'), "ingotYellowstone" })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.emptyBottle, 1), + new Object[] { "x", + Character.valueOf('x'), new ItemStack(SSItems.colorSpray, 1, OreDictionary.WILDCARD_VALUE) + })); + Object[] material = new Object[] { "plankWood", "stone", "ingotSteel", "ingotNinja", "gemOrichalcum" }; Item[] gear = new Item[] { SSItems.woodGear, SSItems.stoneGear, SSItems.steelGear, SSItems.ninjaGear, SSItems.orichalcumGear }; String[] gearOre = new String[] { "gearWood", "gearStone", "gearSteel", "gearNinja", "gearOrichalcum" }; @@ -178,6 +184,13 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('a'), SSBlocks.woodGrate, })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.suctionMachine, 1), + new Object[] { "yyy", "zxz", "yyy", + Character.valueOf('x'), SSItems.stoneUnitGear, + Character.valueOf('y'), "plateWood", + Character.valueOf('z'), SSItems.stoneGear, + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.pulverizer, 1), new Object[] { "yay", "aza", "yxy", Character.valueOf('y'), "plankWood", diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererFigure.java b/src/main/java/shift/sextiarysector/renderer/block/RendererFigure.java index cbd3571..b3d1d88 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererFigure.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererFigure.java @@ -4,6 +4,7 @@ import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -11,14 +12,21 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.MinecraftForgeClient; import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.block.BlockFigure; import shift.sextiarysector.tileentity.TileEntityFigure; +import cpw.mods.fml.client.FMLClientHandler; -public class RendererFigure extends TileEntitySpecialRenderer { +public class RendererFigure extends TileEntitySpecialRenderer implements IItemRenderer { + + public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); private static RenderItem renderer; private static EntityItem entityItem; @@ -30,90 +38,252 @@ public class RendererFigure extends TileEntitySpecialRenderer { } @Override - public void renderTileEntityAt(TileEntity p_147500_1_, double x,double y, double z, float p_147500_8_) { + public void renderTileEntityAt(TileEntity p_147500_1_, double x, double y, double z, float p_147500_8_) { GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 0.3F, (float)z + 0.5F); - //float scale = 0.0625f; - //GL11.glScalef(scale,scale,scale); - - TileEntityFigure t = (TileEntityFigure)p_147500_1_; - - - - if(t.getFigure() != null){ - - GL11.glColor4f(1, 1, 1, 1); - switch(t.direction){ - case WEST: - GL11.glRotatef(90, 0, 1, 0); - break; - case EAST: - GL11.glRotatef(90, 0, -1, 0); - break; - case SOUTH: - GL11.glRotatef(180, 0, 1, 0); - break; - //case NORTH: - //GL11.glRotatef(180, 0, -1, 0); - //break; - default: - break; - } - //EntityItem entityitem = new EntityItem(t.getWorldObj(), t.xCoord, t.yCoord, t.zCoord, t.getFigure()); - this.renderFigure(t.getFigure()); - //renderer.doRender(entityitem, x, y, z, 0, 0); - //RenderManager.instance.renderEntitySimple(entityitem, 1.0f); - //System.out.println("AAAACC"); - } - + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.3F, (float) z + 0.5F); + //float scale = 0.0625f; + //GL11.glScalef(scale,scale,scale); + + TileEntityFigure t = (TileEntityFigure) p_147500_1_; + + if (t.getFigure() != null) { + + GL11.glColor4f(1, 1, 1, 1); + switch (t.direction) { + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; + case NORTH: + GL11.glRotatef(360, 0, -1, 0); + break; + default: + break; + } + //EntityItem entityitem = new EntityItem(t.getWorldObj(), t.xCoord, t.yCoord, t.zCoord, t.getFigure()); + this.renderFigure(t.getFigure()); + //renderer.doRender(entityitem, x, y, z, 0, 0); + //RenderManager.instance.renderEntitySimple(entityitem, 1.0f); + //System.out.println("AAAACC"); + } GL11.glPopMatrix(); } public void renderFigure(ItemStack itemstack) - { + { - entityItem.setEntityItemStack(itemstack); + GL11.glColor4f(1, 1, 1, 1); + entityItem.setEntityItemStack(itemstack); - if(isLarge(itemstack)){ + if (isLarge(itemstack)) { - double d = 2; - if(isLarge(itemstack))GL11.glScaled(d, d, d); + double d = 2; + if (isLarge(itemstack)) GL11.glScaled(d, d, d); - renderer.doRender(entityItem, 0, 0.06, 0, 0, 0); + renderer.doRender(entityItem, 0, 0.06, 0, 0, 0); - }else{ + } else { - renderer.doRender(entityItem, 0, 0.03, 0, 0, 0); + renderer.doRender(entityItem, 0, 0.03, 0, 0, 0); - } + } - } + } - private boolean isLarge(ItemStack itemstack){ + private boolean isLarge(ItemStack itemstack) { IItemRenderer customItemRenderer = MinecraftForgeClient.getItemRenderer(itemstack, ENTITY); - if (itemstack.getItemSpriteNumber() == 0 && itemstack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType())) - { - - int renderType = Block.getBlockFromItem(itemstack.getItem()).getRenderType(); - return !(renderType == 1 || renderType == 19 || renderType == 12 || renderType == 2); + if (itemstack.getItemSpriteNumber() == 0 && itemstack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType())) + { - } + int renderType = Block.getBlockFromItem(itemstack.getItem()).getRenderType(); + return !(renderType == 1 || renderType == 19 || renderType == 12 || renderType == 2); - else if(customItemRenderer != null && customItemRenderer.shouldUseRenderHelper(ENTITY, itemstack, BLOCK_3D)) - { + } - return true; + else if (customItemRenderer != null && customItemRenderer.shouldUseRenderHelper(ENTITY, itemstack, BLOCK_3D)) + { - } + return true; + } return false; } + //Item + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch (type) { + case ENTITY: + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case INVENTORY: + return true; + default: + return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + switch (type) { + case ENTITY: { + return (helper == ItemRendererHelper.ENTITY_BOBBING || + helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.BLOCK_3D); + } + case EQUIPPED: { + return (helper == ItemRendererHelper.BLOCK_3D || helper == ItemRendererHelper.EQUIPPED_BLOCK); + } + case EQUIPPED_FIRST_PERSON: { + return (helper == ItemRendererHelper.EQUIPPED_BLOCK); + } + case INVENTORY: { + return (helper == ItemRendererHelper.INVENTORY_BLOCK); + } + default: { + return false; + } + } + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + + GL11.glPushMatrix(); + + boolean r = true; + + try { + + switch (type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: { + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + break; + } + case ENTITY: + case INVENTORY: { + GL11.glTranslatef(0.0F, -0.2F, 0.0F); + break; + } + default: + break; + } + + GL11.glRotatef(90, 0, 1, 0); + + ItemStack figure = BlockFigure.getFigureItem(item); + + if (figure != null) { + + float scale = 4.0f / 5.0f; + GL11.glScalef(scale, scale, scale); + + this.renderFigure(figure); + //GL11.glColor4f(2.0F, 2.0F, 2.0F, 0.75F); + //GL11.glDisable(GL12.GL_RESCALE_NORMAL); + //GL11.glDisable(GL11.GL_LIGHTING); + //GL11.glDisable(GL11.GL_DEPTH_TEST); + //RenderHelper.disableStandardItemLighting(); + //GL11.glDisable(GL11.GL_LIGHTING); + //GL11.glDisable(GL11.GL_LIGHT0); + //GL11.glDisable(GL11.GL_LIGHT1); + //GL11.glDisable(GL11.GL_COLOR_MATERIAL); + //GL11.glDisable(GL11.GL_BLEND); + //GL11.glEnable(GL11.GL_LIGHTING); + + } + } catch (NullPointerException e) { + SextiarySector.Log.catching(e); + r = false; + float scale = 2.0f; + //GL11.glScalef(scale, scale, scale); + //RenderHelper.disableStandardItemLighting(); + //GL11.glEnable(GL11.GL_BLEND); + } + + GL11.glPopMatrix(); + + if (r) { + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + float scale = 2.0f; + //GL11.glScalef(scale, scale, scale); + //GL11.glEnable(GL11.GL_LIGHTING); + //GL11.glEnable(GL11.GL_DEPTH_TEST); + //RenderHelper.enableStandardItemLighting(); + //RenderHelper.disableStandardItemLighting(); + //RenderHelper.enableGUIStandardItemLighting(); + } + + GL11.glPushMatrix(); + + switch (type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: { + break; + } + case ENTITY: + case INVENTORY: { + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + break; + } + default: + break; + } + + this.bind(MC_BLOCK_SHEET); + + Tessellator tessellator = Tessellator.instance; + RenderBlocks renderer = (RenderBlocks) data[0]; + Block block = Block.getBlockFromItem(item.getItem()); + int metadata = item.getItemDamage(); + float f = 1.0f / 16.0f; + renderer.setRenderBounds(f * 2, 0, f * 2, f * 14, f * 4, f * 14); + + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata)); + tessellator.draw(); + + GL11.glPopMatrix(); + + //RenderHelper.enableGUIStandardItemLighting(); + + } + + private static void bind(ResourceLocation res) { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } + } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java b/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java index 9d98fd2..bfd03bf 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererPipe.java @@ -7,11 +7,12 @@ import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.IFluidHandler; import org.lwjgl.opengl.GL11; import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.EnumColor; +import shift.sextiarysector.block.BlockPipe; import shift.sextiarysector.renderer.model.ModelPipe; import shift.sextiarysector.tileentity.TileEntityPipe; import cpw.mods.fml.client.FMLClientHandler; @@ -35,7 +36,7 @@ public void renderInventoryBlock(Block block, int metadata, int modelId, RenderB GL11.glRotatef(180, 0, 1, 0); - this.bind(this.fanShaftTextures); + this.bind(this.pipeTextures); modelPipe.render(null, 0, 0, 0, 0, 0, 1.0f); modelPipe.renderPipe(null, 0, 0, 0, 0, 0, 1.0f, 0, false); @@ -62,7 +63,8 @@ public int getRenderId() { return SextiarySector.proxy.pipeType; } - private static final ResourceLocation fanShaftTextures = new ResourceLocation("sextiarysector:textures/models/copper_pipe.png"); + private static final ResourceLocation pipeTextures = new ResourceLocation("sextiarysector:textures/models/copper_pipe.png"); + private static final ResourceLocation pipeColorTextures = new ResourceLocation("sextiarysector:textures/models/copper_pipe_color.png"); static public ModelPipe modelPipe = new ModelPipe(); @@ -73,16 +75,21 @@ public void renderTileEntityAt(TileEntity tileentity, double x1, double y1, doub GL11.glPushMatrix(); GL11.glTranslated(x1 + 0.5F, y1 + 0.5F, z1 + 0.5F); - float scale = 0.0624f; + float scale = 0.0623f; GL11.glScalef(scale, scale, scale); GL11.glDisable(GL11.GL_LIGHTING); - this.bindTexture(fanShaftTextures); + this.bindTexture(pipeTextures); modelPipe.render(null, 0, 0, 0, 0, 0, 1.0f); for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + if (BlockPipe.canConnect(tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, d)) { + modelPipe.renderPipe(null, 0, 0, 0, 0, 0, 1.0f, d.ordinal(), false); + } + + /* int x = tile.xCoord + d.offsetX; int y = tile.yCoord + d.offsetY; int z = tile.zCoord + d.offsetZ; @@ -91,13 +98,50 @@ public void renderTileEntityAt(TileEntity tileentity, double x1, double y1, doub if (t instanceof IFluidHandler) { modelPipe.renderPipe(null, 0, 0, 0, 0, 0, 1.0f, d.ordinal(), false); - } + }*/ } GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); + if (tile.color.ordinal() != EnumColor.Unknown.ordinal()) { + + GL11.glPushMatrix(); + GL11.glTranslated(x1 + 0.5F, y1 + 0.5F, z1 + 0.5F); + float scale2 = 0.0624f; + GL11.glScalef(scale2, scale2, scale2); + GL11.glDisable(GL11.GL_LIGHTING); + + this.bindTexture(pipeColorTextures); + byte color[] = tile.color.getGLColor3ub(); + GL11.glColor3ub(color[0], color[1], color[2]); + + modelPipe.render(null, 0, 0, 0, 0, 0, 1.0f); + + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + + if (BlockPipe.canConnect(tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, d)) { + modelPipe.renderPipe(null, 0, 0, 0, 0, 0, 1.0f, d.ordinal(), true); + } + + /* + int x = tile.xCoord + d.offsetX; + int y = tile.yCoord + d.offsetY; + int z = tile.zCoord + d.offsetZ; + + TileEntity t = tileentity.getWorldObj().getTileEntity(x, y, z); + + if (t instanceof IFluidHandler) { + + }*/ + + } + + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + } private static void bind(ResourceLocation res) diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityPipe.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityPipe.java index 109ef03..022863f 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityPipe.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityPipe.java @@ -12,11 +12,14 @@ import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.api.EnumColor; +import shift.sextiarysector.block.BlockPipe; public class TileEntityPipe extends TileEntity implements IFluidHandler { protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 16); private final boolean isIN[] = { false, false, false, false, false, false }; + public EnumColor color = EnumColor.Unknown; @Override public void updateEntity() { @@ -49,6 +52,8 @@ private void addFluid() { for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + if (!BlockPipe.canConnect(getWorldObj(), xCoord, yCoord, zCoord, d)) continue; + TileEntity t = this.worldObj.getTileEntity(xCoord + d.offsetX, yCoord + d.offsetY, zCoord + d.offsetZ); if (!isIN[d.ordinal()] && t instanceof IFluidHandler) { @@ -80,6 +85,9 @@ private int getConnectSize() { int i = 0; for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + + if (!BlockPipe.canConnect(getWorldObj(), xCoord, yCoord, zCoord, d)) continue; + TileEntity t = this.worldObj.getTileEntity(xCoord + d.offsetX, yCoord + d.offsetY, zCoord + d.offsetZ); if (!isIN[d.ordinal()] && t instanceof IFluidHandler && ((IFluidHandler) t).fill(d.getOpposite(), tank.getFluid(), false) > 0) { @@ -104,6 +112,72 @@ private int getIsIN() { } + public void getFluidFromSuctionMachine(ForgeDirection direction) { + + int i = 0; + + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + + if (!BlockPipe.canConnect(getWorldObj(), xCoord, yCoord, zCoord, d)) continue; + + TileEntity t = this.worldObj.getTileEntity(xCoord + d.offsetX, yCoord + d.offsetY, zCoord + d.offsetZ); + + if (t instanceof IFluidHandler) { + i++; + } + + } + + if (i > 2) return; + + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) { + + if (direction.equals(d)) continue; + + int x = this.xCoord + d.offsetX; + int y = this.yCoord + d.offsetY; + int z = this.zCoord + d.offsetZ; + + TileEntity t = this.worldObj.getTileEntity(x, y, z); + + if (t instanceof TileEntityPipe) { + ((TileEntityPipe) t).getFluidFromSuctionMachine(d.getOpposite()); + break; + } else if (t instanceof IFluidHandler) { + this.updateServerInWorkEntity(d); + } + + } + + } + + public void updateServerInWorkEntity(ForgeDirection direction) + { + + int x = this.xCoord + direction.offsetX; + int y = this.yCoord + direction.offsetY; + int z = this.zCoord + direction.offsetZ; + + if (this.worldObj.getTileEntity(x, y, z) instanceof IFluidHandler) { + + IFluidHandler t = (IFluidHandler) this.worldObj.getTileEntity(x, y, z); + + if (this.tank.getFluid() == null) { + + if (t.getTankInfo(direction.getOpposite()) != null && t.getTankInfo(direction.getOpposite())[0].fluid != null && t.canDrain(direction.getOpposite(), t.getTankInfo(direction.getOpposite())[0].fluid.getFluid())) { + FluidStack fs = t.drain(direction.getOpposite(), FluidContainerRegistry.BUCKET_VOLUME, true); + this.fill(direction, fs, true); + } + + } else if (t.canDrain(direction.getOpposite(), this.tank.getFluid().getFluid())) { + FluidStack fs = t.drain(direction.getOpposite(), FluidContainerRegistry.BUCKET_VOLUME - this.tank.getFluidAmount(), true); + this.fill(direction, fs, true); + } + + } + + } + /* IFluidHandler */ @Override public int fill(ForgeDirection from, FluidStack resource, boolean doFill) @@ -154,15 +228,21 @@ public FluidTankInfo[] getTankInfo(ForgeDirection from) /* NBT */ @Override public void readFromNBT(NBTTagCompound par1nbtTagCompound) { + super.readFromNBT(par1nbtTagCompound); tank.readFromNBT(par1nbtTagCompound); if (par1nbtTagCompound.hasKey("Empty") && tank.getFluidAmount() > 0) this.tank.setFluid(null); + color = EnumColor.getColor(par1nbtTagCompound.getInteger("color")); + } @Override public void writeToNBT(NBTTagCompound par1nbtTagCompound) { + super.writeToNBT(par1nbtTagCompound); tank.writeToNBT(par1nbtTagCompound); + par1nbtTagCompound.setInteger("color", color.ordinal()); + } @Override diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySuctionMachine.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySuctionMachine.java new file mode 100644 index 0000000..6d62298 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySuctionMachine.java @@ -0,0 +1,237 @@ +package shift.sextiarysector.tileentity; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fluids.IFluidHandler; +import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceGrid; +import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; + +public class TileEntitySuctionMachine extends TileEntityDirection implements IFluidHandler, IGearForceHandler, IGearForceGrid { + + protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME); + + public EnergyStorage storage = new EnergyStorage("Base", 2, 3000); + + private int cooltime = 0; + + public TileEntitySuctionMachine() { + this.direction = ForgeDirection.DOWN; + } + + @Override + public void updateEntity() + { + super.updateEntity(); + if (this.worldObj.isRemote) { + this.updateClientEntity(); + } else { + this.updateServerEntity(); + } + + } + + public void updateClientEntity() + { + } + + public void updateServerEntity() + { + + cooltime++; + if (cooltime > 10) { + cooltime = 0; + + if (storage.drawEnergy(2, 40, false) >= 34) { + this.updateServerOutWorkEntity(); + this.updateServerInWorkEntity(); + this.getFluidFromSuctionMachine(); + } + + } + + } + + public void updateServerInWorkEntity() + { + + int x = this.xCoord + this.direction.offsetX; + int y = this.yCoord + this.direction.offsetY; + int z = this.zCoord + this.direction.offsetZ; + + Block block = this.getWorldObj().getBlock(x, y, z); + + Fluid f = FluidRegistry.lookupFluidForBlock(block); + + if (block instanceof BlockLiquid || block instanceof IFluidBlock) { + if (this.getWorldObj().getBlockMetadata(x, y, z) != 0) return; + } + + if (f != null && this.tank.getFluid() == null) { + + this.worldObj.removeTileEntity(x, y, z); + this.worldObj.setBlock(x, y, z, Blocks.air, 0, 3); + this.tank.setFluid(new FluidStack(f, FluidContainerRegistry.BUCKET_VOLUME)); + + } else if (this.worldObj.getTileEntity(x, y, z) instanceof IFluidHandler) { + + IFluidHandler t = (IFluidHandler) this.worldObj.getTileEntity(x, y, z); + + if (this.tank.getFluid() == null) { + + if (t.getTankInfo(direction.getOpposite()) != null && t.getTankInfo(direction.getOpposite())[0].fluid != null && t.canDrain(this.direction.getOpposite(), t.getTankInfo(direction.getOpposite())[0].fluid.getFluid())) { + FluidStack fs = t.drain(direction.getOpposite(), FluidContainerRegistry.BUCKET_VOLUME, true); + this.tank.fill(fs, true); + } + + } else if (t.canDrain(this.direction.getOpposite(), this.tank.getFluid().getFluid())) { + FluidStack fs = t.drain(direction.getOpposite(), FluidContainerRegistry.BUCKET_VOLUME - this.tank.getFluidAmount(), true); + this.tank.fill(fs, true); + } + + } + + } + + public void updateServerOutWorkEntity() + { + int x = this.xCoord + ForgeDirection.UP.offsetX; + int y = this.yCoord + ForgeDirection.UP.offsetY; + int z = this.zCoord + ForgeDirection.UP.offsetZ; + + FluidStack f = this.tank.getFluid(); + + if (f != null) { + + if (this.worldObj.isAirBlock(x, y, z) && f.getFluid().canBePlacedInWorld()) { + + this.worldObj.setBlock(x, y, z, this.tank.getFluid().getFluid().getBlock()); + this.tank.setFluid(null); + + } else if (this.worldObj.getTileEntity(x, y, z) instanceof IFluidHandler && ((IFluidHandler) this.worldObj.getTileEntity(x, y, z)).canFill(ForgeDirection.DOWN, f.getFluid())) { + + int i = ((IFluidHandler) this.worldObj.getTileEntity(x, y, z)).fill(ForgeDirection.DOWN, f, true); + this.tank.drain(i, true); + + } + + } + + } + + private void getFluidFromSuctionMachine() { + + if (!(this.getWorldObj().getTileEntity(xCoord, yCoord - 1, zCoord) instanceof TileEntityPipe)) return; + + TileEntityPipe p = (TileEntityPipe) this.getWorldObj().getTileEntity(xCoord, yCoord - 1, zCoord); + + p.getFluidFromSuctionMachine(ForgeDirection.UP); + + } + + @Override + public void readFromNBT(NBTTagCompound tag) + { + super.readFromNBT(tag); + tank.readFromNBT(tag); + storage.readFromNBT(tag); + } + + @Override + public void writeToNBT(NBTTagCompound tag) + { + super.writeToNBT(tag); + tank.writeToNBT(tag); + storage.writeToNBT(tag); + } + + @Override + public int addEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + + if (this.getDirection().ordinal() == from.ordinal()) return 0; + + int i = storage.addEnergy(power, speed, simulate); + return i; + } + + @Override + public int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate) { + return 0; + } + + @Override + public boolean canInterface(ForgeDirection from) { + return true; + } + + @Override + public int getPowerStored(ForgeDirection from) { + return storage.getPowerStored(); + } + + @Override + public int getSpeedStored(ForgeDirection from) { + return storage.getSpeedStored(); + } + + @Override + public int getMaxPowerStored(ForgeDirection from) { + return storage.getMaxPower(); + } + + @Override + public int getMaxSpeedStored(ForgeDirection from) { + return storage.getMaxSpeed(); + } + + @Override + public boolean canIn(ForgeDirection from) { + return this.getDirection().ordinal() != from.ordinal(); + } + + @Override + public boolean canOut(ForgeDirection from) { + return false; + } + + //IFluidHandler + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { + return 0; + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { + return null; + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { + return null; + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return from.ordinal() == ForgeDirection.UP.ordinal(); + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return from.ordinal() == ForgeDirection.UP.ordinal(); + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) { + return new FluidTankInfo[] { tank.getInfo() }; + } +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 5b92664..00e05ba 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -105,6 +105,7 @@ tile.ss.time_machine.name=Time Machine tile.ss.fan.name=Fan tile.ss.saw.name=Saw tile.ss.pump.name=Pump +tile.ss.suction_machine.name=Suction Machine tile.ss.creeper_chest.name=Creeper Monger Chest @@ -168,6 +169,7 @@ item.ss.ninja_gf_storage.name=Ninja GF Storage item.ss.orichalcum_gf_storage.name=Orichalcum GF Storage item.ss.hammer.name=Hammer +item.ss.color_spray.name=Color Spray item.ss.calendar.name=Calendar item.ss.season_stone.name=Season Stone @@ -368,6 +370,23 @@ fluid.ss.sap=Sap fluid.ss.iron=Iron Fluid fluid.ss.gold=Gold Fluid +fluid.ss.black=Black +fluid.ss.red=Red +fluid.ss.green=Green +fluid.ss.brown=Brown +fluid.ss.blue=Blue +fluid.ss.purple=Purple +fluid.ss.cyan=Cyan +fluid.ss.lightgray=LightGray +fluid.ss.gray=Gray +fluid.ss.pink=Pink +fluid.ss.lime=Lime +fluid.ss.yellow=Yellow +fluid.ss.lightblue=LightBlue +fluid.ss.magenta=Magenta +fluid.ss.orange=Orange +fluid.ss.white=White + #Potion ss.potion.burn=Burn ss.potion.hot_springs=Hot Springs diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/machine/pump_up.png b/src/main/resources/assets/sextiarysector/textures/blocks/machine/pump_up.png new file mode 100644 index 0000000000000000000000000000000000000000..e7f1494c0dc53fc82caac9dc97e313a73295fed9 GIT binary patch literal 637 zcmV-@0)qXCP)-CAym{|^-}k;LwA<}eN(n%c zBuFVq)08Ah0GQ9`RI62_lt?KNLJ&m}mSwSAF3|v<-o1_xf|Jt=x~)wByfEPJ<(L(` zFu*Y@7>2>_!5P|QGEoVQnynHYvjV`$=>`2x9RMK&uI;FTNs^#xn#SvQ-vB6;^tFCI z_jX@!tp^9s9x$6lIW(n`&SJ5k&~CTW``b<~=-Li9ZaqT85ypm&h$D^<_Zg0SMG;`< z38bt{d78AjWL_~dIv8I6#vW@-Btx5 zgnGYNEYQm3GDjcIl?T?jc5cV2Gx(R{aU7!sLBODQGe=?Ud$_iPS=vx{jhd~HWGLUB zyv3an}8w=`!}cTz3G=vQ}39pYQw| X2aOk4Eg0pw00000NkvXXu0mjf^qmyp literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/guis/progress.png b/src/main/resources/assets/sextiarysector/textures/guis/progress.png new file mode 100644 index 0000000000000000000000000000000000000000..c70d46e296910ef175afe1292e4444435150cfb8 GIT binary patch literal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9{3}+`&g|&$;@dvcTkil@XV6Yb3^6{&FFR1_Pru={3*&G=GNLqODT!b_R^r9vk zJD%XvWYvIeaUBmRG!q@WS7~#_w%IRMaf|ij|84*K6&O4{bp#s60}pbP0l+XkK{hm@& literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/copper_pipe_color.png b/src/main/resources/assets/sextiarysector/textures/models/copper_pipe_color.png new file mode 100644 index 0000000000000000000000000000000000000000..938ee802856af21abff84f7a40fe0659631d773e GIT binary patch literal 1584 zcmV-02G9A4P)VGd000McNliru-vk5;EIB_vIf?)P1-(f` zK~#9!?OM%m+*A<%y|>OLn?z|zC7MGNA{4|4E-E~3^={VNjAYq< zGxmF)H*e zs&C=5G)1KZ3>`2sPPtI2a(#Phj?Q**M`{pjOHP4AD?kPyBw%D9hUUZj{0jE%Z2_50 zK5wk>xvr5r&PQ8o;TpjE7kFx~^zj7sT_wb9L%nvI+mD_n7&x2CA zx4s|k(-cf>-?$Dxqz<83|kB@QZ zu{b|@eNf=RJ#($w=t`eJES~iNzR^JlMtEvn7jmk_$OexB#A{g1TxJW<5|%{MLG}Ye zIKBSXeRhOGn*KqvR#Ks*Ly3|4?9`D0rX!2D`q{`2Q|*00>{5C8KtAD#Pw zj(xx{cYyX5V1EOD0>_Mm;>JI@|X9Md;L;q zNU$;#H=)IQPxHBN+{qt10bKpZ;`_-(ZV6-z=K%nB*ZENVx1S0w7vf%^GPJ&38oyXM z_g-M>4+5lf*JlrRmydD#ht~))1{kLLQv(8ZjW*n%AnHkh!~x))a|8gQy;}rX0zcmd zUVW0U+nU{cMN01OdSSWX7GM~>rQEvDP*|!}VWyu{@&N)_fJ6qv;mjuQ5J`8U#jQ1K z)8s?j=A$n^!Pj5D>*h}_FyAhh>dP+|IVe1lbly)d0!KRB*SX{+*L%5G1uV{%28C6- z2NVu7Sy~R-btt^s^H}XE( zIRXMexHMP&KETrgMmhs+hsEbBh%yzh0L_-zfOB`KD#j1)0f@E&ye(kq7G?MSZw!;8 z+B`67lG{0q^yfZQ-xY{ZB%(c&!8;tbJnJ7{5=vVUiIL=0NG zMfBBkp!u7`e{ Date: Sun, 3 May 2015 13:10:13 +0900 Subject: [PATCH 78/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=96?= =?UTF-8?q?=E3=83=AD=E3=83=83=E3=82=AF=E3=81=AE=E7=A1=AC=E3=81=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- .../sextiarysector/block/BlockFunnel.java | 1 + .../shift/sextiarysector/block/BlockTank.java | 2 +- .../item/ItemContactLenses.java | 1 + .../item/ItemGFContactLenses.java | 1 + .../assets/sextiarysector/lang/ja_JP.lang | 189 +++++++++++++----- 6 files changed, 148 insertions(+), 48 deletions(-) diff --git a/build.gradle b/build.gradle index dd82a3c..66b2618 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.3.0.a-${project.minecraft.version}" +version = "2.3.0.b-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/block/BlockFunnel.java b/src/main/java/shift/sextiarysector/block/BlockFunnel.java index dbac590..101aad8 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFunnel.java +++ b/src/main/java/shift/sextiarysector/block/BlockFunnel.java @@ -20,6 +20,7 @@ public class BlockFunnel extends BlockContainer { public BlockFunnel() { super(Material.iron); + this.setHardness(0.7f); } @Override diff --git a/src/main/java/shift/sextiarysector/block/BlockTank.java b/src/main/java/shift/sextiarysector/block/BlockTank.java index 2060001..d269d8a 100644 --- a/src/main/java/shift/sextiarysector/block/BlockTank.java +++ b/src/main/java/shift/sextiarysector/block/BlockTank.java @@ -19,7 +19,7 @@ public BlockTank() { super(Material.glass); float b = 1.0f / 16.0f; this.setBlockBounds(b, 0, b, 1.0f - b, 1, 1.0f - b); - this.setHardness(0.3f); + this.setHardness(0.4f); this.setStepSound(soundTypeGlass); } diff --git a/src/main/java/shift/sextiarysector/item/ItemContactLenses.java b/src/main/java/shift/sextiarysector/item/ItemContactLenses.java index 445d4b6..a254ca6 100644 --- a/src/main/java/shift/sextiarysector/item/ItemContactLenses.java +++ b/src/main/java/shift/sextiarysector/item/ItemContactLenses.java @@ -13,6 +13,7 @@ public class ItemContactLenses extends Item implements IEquipment { public ItemContactLenses() { this.setCreativeTab(SextiarySectorAPI.TabSSPlayer); + this.setMaxStackSize(1); } @Override diff --git a/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java b/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java index 6d45e80..595d1bb 100644 --- a/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java +++ b/src/main/java/shift/sextiarysector/item/ItemGFContactLenses.java @@ -12,6 +12,7 @@ public class ItemGFContactLenses extends ItemContactLenses implements IGearForce public ItemGFContactLenses() { this.setCreativeTab(SextiarySectorAPI.TabSSPlayer); + this.setMaxStackSize(1); } @Override diff --git a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang index a843b99..88be0e9 100644 --- a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang +++ b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang @@ -30,7 +30,9 @@ tile.ss.bottle.name=液体ボトル tile.ss.fluid_crafter.name=流体クラフター tile.ss.square.name=枡 -tile.ss.iron_pipe.name=鉄のパイプ +tile.ss.tank.name=タンク +tile.ss.funnel.name=漏斗 +tile.ss.copper_pipe.name=銅のパイプ tile.ss.wood_hopper.name=木のホッパー @@ -39,6 +41,7 @@ tile.ss.chunk_loader.name=タイムローダー tile.ss.figure.name=フィギュア +tile.ss.trap.name=トラップ tile.ss.drinking_water.name=飲料水 tile.ss.hot_springs.name=温泉水 @@ -61,6 +64,7 @@ tile.ss.gold_large_ore.name=大きな金鉱石 tile.ss.small_windmill.name=小さい風車 tile.ss.windmill.name=風車 +tile.ss.large_windmill.name=大きい風車 tile.ss.small_waterwheel.name=小さい水車 tile.ss.steam_motor.name=蒸気モーター @@ -90,8 +94,11 @@ tile.ss.ninja_orichalcum_gear_shaft.name=ニンジャとオリハルコンのギ tile.ss.millstone.name=石臼 tile.ss.loom.name=織機 tile.ss.sawmill.name=製材機 +tile.ss.spinning_machine.name=紡績機 tile.ss.pulverizer.name=粉砕機 +tile.ss.extractor.name=抽出機 tile.ss.rolling_machine.name=圧延機 +tile.ss.mana_squeezer.name=マナ抽出機 tile.ss.time_machine.name=タイムマシン @@ -116,11 +123,13 @@ tile.ss.eggplant.name=ナスの種 tile.ss.sweet_potato.name=サツマイモの種 tile.ss.green_pepper.name=ピーマンの種 -tile.ss.radish.name=ダイコンの種 +tile.ss.radish.name=大根の種 tile.ss.rice.name=種籾 tile.ss.mushroom_red.name=赤キノコの胞子 +tile.ss.shiitake.name=シイタケの胞子 + tile.ss.sandpit.name=砂場 @@ -135,6 +144,7 @@ monitor.robot=ロボさんショップ tile.ss.electric_motor.name=電気モーター tile.ss.tofu_motor.name=豆腐モーター +tile.ss.gf_dynamo.name=GFダイナモ #アイテム item.ss.unit.name=ユニット @@ -161,10 +171,10 @@ item.ss.hammer.name=ハンマー item.ss.calendar.name=カレンダー item.ss.season_stone.name=シーズンストーン -item.ss.season_stone_spring.name=シーズンストーン -春- -item.ss.season_stone_summer.name=シーズンストーン -夏- -item.ss.season_stone_autumn.name=シーズンストーン -秋- -item.ss.season_stone_winter.name=シーズンストーン -冬- +item.ss.season_stone_spring.name=シーズンストーン-春- +item.ss.season_stone_summer.name=シーズンストーン-夏- +item.ss.season_stone_autumn.name=シーズンストーン-秋- +item.ss.season_stone_winter.name=シーズンストーン-冬- @@ -201,7 +211,9 @@ item.ss.orichalcum_gem.name=オリハルコン item.ss.ninja_ingot.name=ニンジャインゴット -item.ss.blue_stone_slime_ball.name=ブルーストーンボール +item.ss.red_gel.name=レッドストーンジェル +item.ss.blue_gel.name=ブルーストーンジェル +item.ss.yellow_gel.name=イエローストーンジェル item.ss.energy_reactor.name=エネルギーリアクター item.ss.object_reactor.name=オブジェクトリアクター @@ -217,16 +229,6 @@ item.ss.steam_bucket.name=蒸気入りバケツ item.ss.iron_fluid_bucket.name=融けた鉄入りバケツ item.ss.gold_fluid_bucket.name=融けた金入りバケツ - -item.ss.craft_unit.name=クラフトユニット -item.ss.attack_unit.name=アタックユニット -item.ss.defense_unit.name=ディフェンスユニット - - -item.ss.iron_ring.name=鉄の指輪 -item.ss.creeper_ring.name=クリーパーショップの指輪 - - item.ss.magic_dust.name=魔法の粉 @@ -236,6 +238,12 @@ item.ss.small_cloth.name=小さな布 item.ss.canvas.name=粗布 item.ss.drying_flesh.name=乾燥肉 item.ss.flesh_bobbin.name=肉のボビン +item.ss.string_mass.name=糸の塊 +item.ss.strong_string.name=丈夫な糸 +item.ss.strong_string_bobbin.name=丈夫な糸のボビン +item.ss.strong_cloth.name=丈夫な布 +item.ss.strong_canvas.name=丈夫な粗布 + item.ss.figure_box.name=フィギュアボックス @@ -252,9 +260,21 @@ item.ss.iron_knife.name=鉄のナイフ item.ss.gold_knife.name=金のナイフ item.ss.diamond_knife.name=ダイヤのナイフ +item.ss.copper_shovel.name=銅のショベル +item.ss.copper_pickaxe.name=銅のツルハシ +item.ss.copper_axe.name=銅の斧 +item.ss.copper_sword.name=銅の剣 +item.ss.copper_hoe.name=銅のクワ + +item.ss.copper_helmet.name=銅のヘルメット +item.ss.copper_chestplate.name=胴のチェストプレート +item.ss.copper_leggings.name=銅のレギンス +item.ss.copper_boots.name=銅のブーツ + item.ss.wood_watering_can.name=木のジョウロ item.ss.mineboat_chest.name=チェスト付きボート +item.ss.mineboat_tank.name=タンク付きボート item.ss.laver.name=海苔 @@ -278,10 +298,12 @@ item.ss.green_pepper.name=ピーマン item.ss.blue_potato.name=青サツマイモ -item.ss.radish.name=ダイコン +item.ss.radish.name=大根 item.ss.rice.name=米 +item.ss.shiitake.name=椎茸 + item.ss.white_rice.name=白米 @@ -310,15 +332,37 @@ item.ss.chocolate.name=チョコレート item.ss.drinking_water_bottle.name=飲料水入りボトル item.ss.takumi_tea_bottle.name=匠茶入りボトル + + item.ss.shift_hat.name=Shiftの帽子 item.ss.rucksack.name=リュックサック +item.ss.oxygen_tank.name=酸素タンク item.ss.gf_contact_lenses.name=GFコンタクトレンズ +item.ss.water_contact_lenses.name=ウォーターコンタクトレンズ + +item.ss.craft_unit.name=クラフトユニット +item.ss.attack_unit.name=アタックユニット +item.ss.defense_unit.name=ディフェンスユニット +item.ss.attack_rust_unit.name=錆びたアタックユニット +item.ss.defense_rust_unit.name=錆びたディフェンスユニット +item.ss.pickaxe_unit.name=ツルハシユニット + + +item.ss.iron_ring.name=鉄の指輪 +item.ss.creeper_ring.name=クリーパーショップリング +item.ss.mp_ring.name=MPリング +item.ss.xp_ring.name=XPリング + + #液体 fluid.ss.takumi_tea=匠茶 fluid.ss.drinking_water=飲料水 +fluid.ss.spring_water=湧水 fluid.ss.hot_springs=温泉水 fluid.ss.steam=蒸気 +fluid.ss.mana=マナ +fluid.ss.oxygen=酸素 fluid.ss.sap=樹液 fluid.ss.iron=融けた鉄 @@ -338,6 +382,7 @@ gui.ss.fluid_furnace=流体かまど gui.ss.food_smokers=燻製器 gui.ss.magic_furnace=魔法かまど gui.ss.freezer=冷凍機 +gui.ss.funnel=漏斗 gui.ss.rucksack=リュックサック @@ -346,8 +391,11 @@ gui.ss.steam_motor=蒸気モーター gui.ss.millstone=石臼 gui.ss.loom=織機 gui.ss.sawmill=製材機 +gui.ss.spinning_machine=紡績機 +gui.ss.extractor=抽出機 gui.ss.pulverizer=粉砕機 gui.ss.rolling_machine=圧延機 +gui.ss.mana_squeezer=マナ抽出機 gui.ss.time_machine=タイムマシン gui.ss.gf_tank_1=木のGFタンク @@ -356,6 +404,7 @@ gui.ss.gf_tank_3=鋼鉄のGFタンク gui.ss.gf_tank_4=ニンジャのGFタンク gui.ss.gf_tank_5=オリハルコンのGFタンク +#Shop shop.ss.creeper=クリーパーショップ shop.ss.robot=ロボショップ @@ -376,7 +425,9 @@ tooltip.edition=エディション #エディション edition.creative=CreativeTab +edition.achievement=Achievement edition.figure_beginner=Figure Beginner +edition.ore_festival=Ore Festival edition.schr0_cleaver=Schr0 Cleaver @@ -423,6 +474,18 @@ achievement.ss.craft_furnace=かまどを作る achievement.ss.craft_furnace.desc=大型かまどを作る achievement.ss.craft_furnace.desc2=複雑なクラフト +achievement.ss.hammer=ハンマー ! +achievement.ss.hammer.desc=大型ハンマーを作る +achievement.ss.hammer.desc2=無敵 ? + +achievement.ss.fluid_furnace=メルト +achievement.ss.fluid_furnace.desc=流体かまどを作る +achievement.ss.fluid_furnace.desc2=触ると溶ける + +achievement.ss.freezer=最新の冷蔵庫 +achievement.ss.freezer.desc=フリーザーを作る +achievement.ss.freezer.desc2=それはね... + achievement.ss.agriculture=SS2 -農業- @@ -438,7 +501,7 @@ achievement.ss.scoop.desc2=優しく触ろう achievement.ss.farmland=農地 achievement.ss.farmland.desc=バニラの農地にスコップを使う -achievement.ss.farmland.desc2=強い! +achievement.ss.farmland.desc2=強い ! achievement.ss.watering_can=ジョウロ achievement.ss.watering_can.desc=ジョウロを作る @@ -446,11 +509,11 @@ achievement.ss.watering_can.desc2=楽しい水やり achievement.ss.hole=穴 achievement.ss.hole.desc=土にスコップを使う -achievement.ss.hole.desc2=誰がここに穴を? +achievement.ss.hole.desc2=誰がここに穴を ? achievement.ss.paddy=水田 achievement.ss.paddy.desc=穴に水バケツを使う -achievement.ss.paddy.desc2=米を育てよう! +achievement.ss.paddy.desc2=米を育てよう ! ## achievement.ss.turnip=カブ @@ -493,22 +556,37 @@ achievement.ss.radish.desc=大根を収穫する achievement.ss.rice=米 achievement.ss.rice.desc=米を収穫する +achievement.ss.shiitake=椎茸 +achievement.ss.shiitake.desc=椎茸を収穫する + achievement.ss.mining=SS2 -鉱業- -achievement.ss.bluestone_dust=色が違う! +achievement.ss.bluestone_dust=色が違う ! achievement.ss.bluestone_dust.desc=ブルーストーンを採掘する -achievement.ss.bluestone_dust.desc2=美しい! +achievement.ss.bluestone_dust.desc2=美しい ! + +achievement.ss.copper_ore=新しい鉱石 +achievement.ss.copper_ore.desc=銅鉱石を採掘する +achievement.ss.copper_ore.desc2=3位 + +achievement.ss.silver_ore=暗殺防止 +achievement.ss.silver_ore.desc=銀鉱石を採掘する +achievement.ss.silver_ore.desc2=写真 ? + +achievement.ss.mithril_ore=魔法の始まり +achievement.ss.mithril_ore.desc=ミスリル鉱石を採掘する +achievement.ss.mithril_ore.desc2=指輪 ? achievement.ss.industry=SS2 -工業- achievement.ss.bluestone_slime_ball=謎のスライム achievement.ss.bluestone_slime_ball.desc=ブルーストーンのボールを作る -achievement.ss.bluestone_slime_ball.desc2=いいね! +achievement.ss.bluestone_slime_ball.desc2=いいね ! achievement.ss.wood_gear=新しい力 achievement.ss.wood_gear.desc=木の歯車を作る -achievement.ss.wood_gear.desc2=その名はGF! +achievement.ss.wood_gear.desc2=その名はGF ! achievement.ss.small_windmill=風の力 achievement.ss.small_windmill.desc=小さい風車を作る @@ -516,84 +594,100 @@ achievement.ss.small_windmill.desc2=これはいい風だ achievement.ss.millstone=機械 achievement.ss.millstone.desc=石臼を作る -achievement.ss.millstone.desc2=私は小麦粉? +achievement.ss.millstone.desc2=私は小麦粉 ? achievement.ss.loom=布! achievement.ss.loom.desc=織機を作ろう -achievement.ss.loom.desc2=裸から解放される! +achievement.ss.loom.desc2=裸から解放される ! achievement.ss.stone_gear=パワーアップ achievement.ss.stone_gear.desc=石の歯車を作る -achievement.ss.stone_gear.desc2=でも石で? +achievement.ss.stone_gear.desc2=でも石で ? achievement.ss.windmill=上昇気流 achievement.ss.windmill.desc=風車を作る achievement.ss.windmill.desc2=でもこの風、少し泣いています achievement.ss.small_waterwheel=水のチカラ -achievement.ss.small_waterwheel.desc=小さな水車を作成する -achievement.ss.small_waterwheel.desc2=溶岩に着せないで! +achievement.ss.small_waterwheel.desc=小さな水車を作る +achievement.ss.small_waterwheel.desc2=溶岩に着せないで ! achievement.ss.sawmill=刃物? achievement.ss.sawmill.desc=製材機を作る -achievement.ss.sawmill.desc2=一緒に解体しよう! +achievement.ss.sawmill.desc2=一緒に解体しよう ! + +achievement.ss.spinning_machine=小さな工業 +achievement.ss.spinning_machine.desc=紡績機を作る +achievement.ss.spinning_machine.desc2=あやとりをしましょう achievement.ss.steel_gear=鋼のチカラ -achievement.ss.steel_gear.desc=鋼鉄の歯車を作成する -achievement.ss.steel_gear.desc2=石炭不足? +achievement.ss.steel_gear.desc=鋼鉄の歯車を作る +achievement.ss.steel_gear.desc2=石炭不足 ? achievement.ss.steam_motor=蒸気のチカラ -achievement.ss.steam_motor.desc=蒸気モーターを作成する +achievement.ss.steam_motor.desc=蒸気モーターを作る achievement.ss.steam_motor.desc2=産業革命 +achievement.ss.large_windmill=風車大小… +achievement.ss.large_windmill.desc=大きい風車を作る +achievement.ss.large_windmill.desc2=大きな力 + achievement.ss.pulverizer=工業の時代 achievement.ss.pulverizer.desc=粉砕機を作る -achievement.ss.pulverizer.desc2=これで2倍! +achievement.ss.pulverizer.desc2=これで2倍 ! + +achievement.ss.extractor=近未来 +achievement.ss.extractor.desc=抽出器を作る +achievement.ss.extractor.desc2=浄化装置 ? achievement.ss.fan=ああ^〜 achievement.ss.fan.desc=ファンを作る -achievement.ss.fan.desc2=青い炎? +achievement.ss.fan.desc2=青い炎 ? achievement.ss.saw=ブロックブレイカー achievement.ss.saw.desc=ノコを作成する achievement.ss.saw.desc2=ただ壊すのみ -achievement.ss.ninja_gear=不思議な力? +achievement.ss.ninja_gear=不思議な力 ? achievement.ss.ninja_gear.desc=ニンジャの歯車を作る -achievement.ss.ninja_gear.desc2=ニッポン! +achievement.ss.ninja_gear.desc2=ニッポン ! achievement.ss.rolling_machine=まな板 achievement.ss.rolling_machine.desc=圧延機を作る -achievement.ss.rolling_machine.desc2=かなりまな板だよこれ! +achievement.ss.rolling_machine.desc2=かなりまな板だよこれ ! + +achievement.ss.mana_squeezer=地球の恵み +achievement.ss.mana_squeezer.desc=マナ抽出器を作る +achievement.ss.mana_squeezer.desc2=農業の自動化 ? -achievement.ss.orichalcum_gear=謎の力! +achievement.ss.orichalcum_gear=謎の力 ! achievement.ss.orichalcum_gear.desc=オリハルコンの歯車を作る achievement.ss.orichalcum_gear.desc2=エンドコンテンツ achievement.ss.time_machine=タイムマシン achievement.ss.time_machine.desc=タイムマシンを作る -achievement.ss.time_machine.desc2=世界線が変わった! +achievement.ss.time_machine.desc2=世界線が変わった ! achievement.ss.economy=SS2 -経済- achievement.ss.creeper_firework=クリーパー商人 achievement.ss.creeper_firework.desc=花火で通信してみよう -achievement.ss.creeper_firework.desc2=爆発! +achievement.ss.creeper_firework.desc2=爆発 ! achievement.ss.creeper_chest=クリーパーチェスト achievement.ss.creeper_chest.desc=さぁ、ベッドへ行こう。 -achievement.ss.creeper_chest.desc2=クリーパーのサンタ? +achievement.ss.creeper_chest.desc2=クリーパーのサンタ ? achievement.ss.shipping=出荷箱 achievement.ss.shipping.desc=出荷してみよう -achievement.ss.shipping.desc=私は億万長者! +achievement.ss.shipping.desc=私は億万長者 ! #NEI nei.recipe=レシピ -nei.ss.furnace.shaped=Furnace Shaped -nei.ss.furnace.shapeless=大型かまど +nei.ss.furnace.shaped=定形 精錬 +nei.ss.furnace.shapeless=不定形 精錬 nei.ss.fluid_furnace=流体かまど nei.ss.food_smokers=燻製器 @@ -607,8 +701,11 @@ nei.ss.ice=fuel=製氷剤 nei.ss.millstone=石臼 nei.ss.loom=織機 nei.ss.sawmill=製材機 +nei.ss.spinning_machine=紡績機 +nei.ss.extractor=抽出機 nei.ss.pulverizer=粉砕機 nei.ss.rolling_machine=圧延機 +nei.ss.mana_squeezer=マナ抽出機 nei.ss.time_machine=タイムマシン nei.ss.fertilizer_farmland=農地 突然変異 From 4e6d45fc0580d65510850c1b7a8d9619e28bdc2d Mon Sep 17 00:00:00 2001 From: shift02 Date: Sun, 14 Jun 2015 18:55:36 +0900 Subject: [PATCH 79/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20:=20=E3=82=88?= =?UTF-8?q?=E3=82=8A=E3=83=9E=E3=82=A4=E3=82=AF=E3=83=A9=E3=82=89=E3=81=97?= =?UTF-8?q?=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・鉱石のブロックを追加 ・ナゲットを追加 ・プレートのデザインを変更 ・リアクターのデザインを変更 ・ツールを追加 ・防具を追加 --- .../java/shift/sextiarysector/SSBlocks.java | 49 ++- .../java/shift/sextiarysector/SSItems.java | 81 +++- .../shift/sextiarysector/SSOreDictionary.java | 12 + .../java/shift/sextiarysector/SSShops.java | 68 +-- .../api/event/VanillaFoodHandler.java | 4 +- .../sextiarysector/block/BlockBottle.java | 46 +- .../block/BlockMachineFrame.java | 44 ++ .../sextiarysector/block/BlockOreBlock.java | 17 + .../container/ContainerFluidMachineBase.java | 394 +++++++++--------- .../container/ContainerFunnel.java | 3 +- .../entity/EntityMineboatTank.java | 2 +- .../event/WorldEventHandler.java | 4 +- .../sextiarysector/gui/GuiInventoryNext.java | 247 +++++------ .../sextiarysector/gui/tab/TabManager.java | 30 +- .../sextiarysector/item/ItemBlockBottle.java | 372 ++++++++--------- .../sextiarysector/item/ItemSSShears.java | 15 + .../sextiarysector/module/ModuleFigure.java | 2 +- .../module/ModuleToolMaterial.java | 8 + .../sextiarysector/plugin/PluginTcon.java | 2 +- .../sextiarysector/recipe/RecipesArmor.java | 8 +- .../sextiarysector/recipe/RecipesCore.java | 40 ++ .../sextiarysector/recipe/RecipesFurnace.java | 28 +- .../recipe/RecipesFurnaceCraft.java | 10 +- .../sextiarysector/recipe/RecipesMachine.java | 81 ++-- .../sextiarysector/recipe/RecipesTool.java | 51 ++- .../tileentity/TileEntityBlockBottle.java | 136 +++--- .../tileentity/TileEntitySquare.java | 2 +- .../assets/sextiarysector/lang/en_US.lang | 34 ++ .../assets/sextiarysector/lang/ja_JP.lang | 24 +- .../textures/blocks/ore/brass_block.png | Bin 0 -> 335 bytes .../textures/blocks/ore/copper_block.png | Bin 0 -> 341 bytes .../textures/blocks/ore/gold_block.png | Bin 0 -> 740 bytes .../textures/blocks/ore/mithril_block.png | Bin 0 -> 1368 bytes .../blocks/ore/mithril_block.png.mcmeta | 5 + .../textures/blocks/ore/ninja_block.png | Bin 0 -> 461 bytes .../textures/blocks/ore/orichalcum_block.png | Bin 0 -> 433 bytes .../textures/blocks/ore/silver_block.png | Bin 0 -> 476 bytes .../textures/blocks/ore/steel_block.png | Bin 0 -> 334 bytes .../textures/blocks/ore/zinc_block.png | Bin 0 -> 349 bytes .../textures/items/armor/ninja_boots.png | Bin 0 -> 284 bytes .../textures/items/armor/ninja_chestplate.png | Bin 0 -> 340 bytes .../textures/items/armor/ninja_helmet.png | Bin 0 -> 268 bytes .../textures/items/armor/ninja_leggings.png | Bin 0 -> 244 bytes .../textures/items/energy_reactor.png | Bin 296 -> 1820 bytes .../textures/items/energy_reactor.png.mcmeta | 5 + .../textures/items/ingot/mithril_ingot.png | Bin 325 -> 1817 bytes .../items/ingot/mithril_ingot.png.mcmeta | 5 + .../textures/items/nugget/copper_nugget.png | Bin 0 -> 263 bytes .../textures/items/nugget/gold_nugget.png | Bin 0 -> 143 bytes .../textures/items/nugget/iron_nugget.png | Bin 0 -> 270 bytes .../textures/items/plate/gold_plate.png | Bin 233 -> 356 bytes .../textures/items/plate/iron_plate.png | Bin 234 -> 345 bytes .../textures/items/ring/iron_ring.png | Bin 294 -> 374 bytes .../textures/items/ring/iron_ring2.png | Bin 0 -> 294 bytes .../textures/items/tool/brass_axe.png | Bin 0 -> 308 bytes .../textures/items/tool/brass_hoe.png | Bin 0 -> 291 bytes .../textures/items/tool/brass_knife.png | Bin 0 -> 307 bytes .../textures/items/tool/brass_pickaxe.png | Bin 0 -> 311 bytes .../textures/items/tool/brass_scoop.png | Bin 0 -> 301 bytes .../textures/items/tool/brass_shears.png | Bin 0 -> 343 bytes .../textures/items/tool/brass_shovel.png | Bin 0 -> 295 bytes .../textures/items/tool/brass_sword.png | Bin 0 -> 332 bytes .../textures/items/tool/shears.png | Bin 0 -> 191 bytes .../textures/items/unit/attack_rust_unit.png | Bin 1152 -> 1207 bytes .../textures/items/unit/attack_unit.png | Bin 1302 -> 1155 bytes .../textures/items/unit/attack_unit2.png | Bin 0 -> 1071 bytes .../textures/items/unit/copper_unit.png | Bin 0 -> 931 bytes .../textures/items/unit/craft_unit.png | Bin 1877 -> 1568 bytes .../textures/items/unit/defense_rust_unit.png | Bin 1115 -> 1167 bytes .../textures/items/unit/defense_unit.png | Bin 1237 -> 1127 bytes .../textures/items/unit/gold_unit.png | Bin 0 -> 934 bytes .../textures/items/unit/pickaxe_unit.png | Bin 1294 -> 1168 bytes .../textures/items/unit/rust_unit.png | Bin 926 -> 974 bytes .../textures/items/unit/silver_unit.png | Bin 0 -> 962 bytes .../textures/models/armor/ninja_layer_1.png | Bin 0 -> 1698 bytes .../textures/models/armor/ninja_layer_2.png | Bin 0 -> 853 bytes 76 files changed, 1107 insertions(+), 722 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockMachineFrame.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockOreBlock.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemSSShears.java create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/brass_block.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/copper_block.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/gold_block.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/mithril_block.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/mithril_block.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/ninja_block.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/orichalcum_block.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_block.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/steel_block.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/zinc_block.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/ninja_boots.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/ninja_chestplate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/ninja_helmet.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/armor/ninja_leggings.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/energy_reactor.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ingot/mithril_ingot.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/items/nugget/copper_nugget.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/nugget/gold_nugget.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/nugget/iron_nugget.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/brass_axe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/brass_hoe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/brass_knife.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/brass_pickaxe.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/brass_scoop.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/brass_shears.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/brass_shovel.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/brass_sword.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/tool/shears.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/attack_unit2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/copper_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/gold_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/silver_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/armor/ninja_layer_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/models/armor/ninja_layer_2.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index a9d1021..e9405df 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -26,8 +26,10 @@ import shift.sextiarysector.block.BlockLargeFurnace; import shift.sextiarysector.block.BlockLargeOre; import shift.sextiarysector.block.BlockLargeWindmill; +import shift.sextiarysector.block.BlockMachineFrame; import shift.sextiarysector.block.BlockMagiFurnace; import shift.sextiarysector.block.BlockMonitor; +import shift.sextiarysector.block.BlockOreBlock; import shift.sextiarysector.block.BlockPaddy; import shift.sextiarysector.block.BlockPipe; import shift.sextiarysector.block.BlockPowerStone; @@ -169,6 +171,8 @@ public class SSBlocks { public static Block steamMotor; //機械 + public static Block machineFrame; + public static Block millstone; public static Block loom; @@ -220,6 +224,18 @@ public class SSBlocks { public static Block ironLargeOre; public static Block goldLargeOre; + //鉱石ブロック + public static Block copperBlock; + public static Block zincBlock; + public static Block silverBlock; + + public static Block steelBlock; + public static Block brassBlock; + public static Block ninjaBlock; + + public static Block mithrilBlock; + public static Block orichalcumBlock; + //経済 public static Block shippingBox; public static Block creeperChest; @@ -339,10 +355,10 @@ public static void initBlicks() { woodBigOakPlate = (new BlockSSPane("planks_big_oak", "planks_big_oak", Material.wood, false, 1)).setHardness(0.5F).setBlockName("ss.big_oak_wood_plate").setBlockTextureName(ID + ":plate/wood_big_oak_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodBigOakPlate, "WoodBigOakPlate"); - ironPlate = (new BlockSSPane("iron_block", ID + ":iron_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.iron_plate").setBlockTextureName(ID + ":plate/iron_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + ironPlate = (new BlockSSPane("iron_block", ID + ":iron_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.iron_plate").setBlockTextureName(ID + ":plate/iron_plate").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(ironPlate, "IronPlate"); - goldPlate = (new BlockSSPane("gold_block", ID + ":gold_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.gold_plate").setBlockTextureName(ID + ":plate/gold_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); + goldPlate = (new BlockSSPane("gold_block", ID + ":gold_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.gold_plate").setBlockTextureName(ID + ":plate/gold_plate").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(goldPlate, "GoldPlate"); chunkLoader = new BlockChunkLoader().setHardness(1.5F).setBlockName("ss.chunk_loader").setBlockTextureName("sextiarysector:time_loader"); @@ -400,6 +416,31 @@ public static void initBlicks() { goldLargeOre = new BlockLargeOre(SSItems.goldDust, Blocks.gold_ore, 2).setBlockName("ss.gold_large_ore").setBlockTextureName("sextiarysector:ore/gold_large_ore"); GameRegistry.registerBlock(goldLargeOre, "GoldLargeOre"); + //鉱石ブロック + copperBlock = new BlockOreBlock().setBlockName("ss.copper_block").setBlockTextureName("sextiarysector:ore/copper_block"); + GameRegistry.registerBlock(copperBlock, "CopperBlock"); + + zincBlock = new BlockOreBlock().setBlockName("ss.zinc_block").setBlockTextureName("sextiarysector:ore/zinc_block"); + GameRegistry.registerBlock(zincBlock, "ZincBlock"); + + silverBlock = new BlockOreBlock().setBlockName("ss.silver_block").setBlockTextureName("sextiarysector:ore/silver_block"); + GameRegistry.registerBlock(silverBlock, "SilverBlock"); + + steelBlock = new BlockOreBlock().setBlockName("ss.steel_block").setBlockTextureName("sextiarysector:ore/steel_block"); + GameRegistry.registerBlock(steelBlock, "SteelBlock"); + + brassBlock = new BlockOreBlock().setBlockName("ss.brass_block").setBlockTextureName("sextiarysector:ore/brass_block"); + GameRegistry.registerBlock(brassBlock, "BrassBlock"); + + ninjaBlock = new BlockOreBlock().setBlockName("ss.ninja_block").setBlockTextureName("sextiarysector:ore/ninja_block"); + GameRegistry.registerBlock(ninjaBlock, "NinjaBlock"); + + mithrilBlock = new BlockOreBlock().setBlockName("ss.mithril_block").setBlockTextureName("sextiarysector:ore/mithril_block"); + GameRegistry.registerBlock(mithrilBlock, "MithrilBlock"); + + orichalcumBlock = new BlockOreBlock().setBlockName("ss.orichalcum_block").setBlockTextureName("sextiarysector:ore/orichalcum_block"); + GameRegistry.registerBlock(orichalcumBlock, "OrichalcumBlock"); + //GF GameRegistry.registerTileEntity(TileEntityShaft.class, "Shaft"); @@ -485,6 +526,9 @@ public static void initBlicks() { GameRegistry.registerBlock(steamMotor, ItemBlockDirection.class, "SteamMotor"); //機械 + machineFrame = new BlockMachineFrame().setBlockName("ss.machine_frame").setBlockTextureName("sextiarysector:machine/machine").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerBlock(machineFrame, "MachineFrame"); + GameRegistry.registerTileEntity(TileEntitySimpleMachine.class, "SimpleMachine"); GameRegistry.registerTileEntity(TileEntityFluidFGFMachineBase.class, "FluidFGFMachine"); @@ -619,5 +663,4 @@ public static void initBlicks() { //initVanillaBlock(); } - } diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index cc93149..af75eda 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -32,6 +32,7 @@ import shift.sextiarysector.item.ItemSSArmor; import shift.sextiarysector.item.ItemSSAxe; import shift.sextiarysector.item.ItemSSPickaxe; +import shift.sextiarysector.item.ItemSSShears; import shift.sextiarysector.item.ItemScoop; import shift.sextiarysector.item.ItemSeasonStone; import shift.sextiarysector.item.ItemShiftHat; @@ -93,6 +94,9 @@ public class SSItems { public static Item mithrilDust; + public static Item ironNugget; + public static Item copperNugget; + public static Item steelIngot; public static Item brassIngot; @@ -159,20 +163,46 @@ public class SSItems { public static Item diamondKnife; //道具 バニラ + + // 銅 public static Item copperShovel; public static Item copperPickaxe; public static Item copperAxe; public static Item copperSword; public static Item copperHoe; + // 黄銅 + public static Item brassShovel; + public static Item brassPickaxe; + public static Item brassAxe; + public static Item brassSword; + public static Item brassHoe; + + // ニンジャ + public static Item ninjaShovel; + public static Item ninjaPickaxe; + public static Item ninjaAxe; + public static Item ninjaSword; + public static Item ninjaHoe; + //防具 + // 銅 public static Item copperHelmet; public static Item copperChestplate; public static Item copperLeggings; public static Item copperBoots; + // ニンジャ + public static Item ninjaHelmet; + public static Item ninjaChestplate; + public static Item ninjaLeggings; + public static Item ninjaBoots; + + //その他 public static Item woodWateringCan; + public static Item brassShears; + //水産 public static Item mineboatChest; public static Item mineboatTank; @@ -358,6 +388,14 @@ public static void initItems() { mithrilDust = new Item().setUnlocalizedName("ss.mithril_dust").setTextureName("sextiarysector:dust/mithril_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(mithrilDust, "MithrilDust"); + //ナゲット + ironNugget = new Item().setUnlocalizedName("ss.iron_nugget").setTextureName("sextiarysector:nugget/iron_nugget").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(ironNugget, "IronNugget"); + + copperNugget = new Item().setUnlocalizedName("ss.copper_nugget").setTextureName("sextiarysector:nugget/copper_nugget").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(copperNugget, "CopperNugget"); + + //インゴット steelIngot = new Item().setUnlocalizedName("ss.steel_ingot").setTextureName("sextiarysector:ingot/steel_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(steelIngot, "SteelIngot"); @@ -495,6 +533,7 @@ public static void initItems() { GameRegistry.registerItem(diamondKnife, "DiamondKnife"); //バニラ + // 銅 copperShovel = new ItemSpade(ModuleToolMaterial.copperTool).setUnlocalizedName("ss.copper_shovel").setTextureName("sextiarysector:tool/copper_shovel").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(copperShovel, "CopperShovel"); copperPickaxe = new ItemSSPickaxe(ModuleToolMaterial.copperTool).setUnlocalizedName("ss.copper_pickaxe").setTextureName("sextiarysector:tool/copper_pickaxe").setCreativeTab(SextiarySectorAPI.TabSSCore); @@ -505,25 +544,61 @@ public static void initItems() { GameRegistry.registerItem(copperSword, "CopperSword"); copperHoe = new ItemHoe(ModuleToolMaterial.copperTool).setUnlocalizedName("ss.copper_hoe").setTextureName("sextiarysector:tool/copper_hoe").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(copperHoe, "CopperHoe"); + + //黄銅 + brassShovel = new ItemSpade(ModuleToolMaterial.brassTool).setUnlocalizedName("ss.brass_shovel").setTextureName("sextiarysector:tool/brass_shovel").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(brassShovel, "BrassShovel"); + brassPickaxe = new ItemSSPickaxe(ModuleToolMaterial.brassTool).setUnlocalizedName("ss.brass_pickaxe").setTextureName("sextiarysector:tool/brass_pickaxe").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(brassPickaxe, "BrassPickaxe"); + brassAxe = new ItemSSAxe(ModuleToolMaterial.brassTool).setUnlocalizedName("ss.brass_axe").setTextureName("sextiarysector:tool/brass_axe").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(brassAxe, "BrassAxe"); + brassSword = new ItemSword(ModuleToolMaterial.brassTool).setUnlocalizedName("ss.brass_sword").setTextureName("sextiarysector:tool/brass_sword").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(brassSword, "BrassSword"); + brassHoe = new ItemHoe(ModuleToolMaterial.brassTool).setUnlocalizedName("ss.brass_hoe").setTextureName("sextiarysector:tool/brass_hoe").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(brassHoe, "BrassHoe"); + + // ニンジャ + ninjaShovel = new ItemSpade(ModuleToolMaterial.ninjaTool).setUnlocalizedName("ss.ninja_shovel").setTextureName("sextiarysector:tool/ninja_shovel").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(ninjaShovel, "NinjaShovel"); + ninjaPickaxe = new ItemSSPickaxe(ModuleToolMaterial.ninjaTool).setUnlocalizedName("ss.ninja_pickaxe").setTextureName("sextiarysector:tool/ninja_pickaxe").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(ninjaPickaxe, "NinjaPickaxe"); + ninjaAxe = new ItemSSAxe(ModuleToolMaterial.ninjaTool).setUnlocalizedName("ss.ninja_axe").setTextureName("sextiarysector:tool/ninja_axe").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(ninjaAxe, "NinjaAxe"); + ninjaSword = new ItemSword(ModuleToolMaterial.ninjaTool).setUnlocalizedName("ss.ninja_sword").setTextureName("sextiarysector:tool/ninja_sword").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(ninjaSword, "NinjaSword"); + ninjaHoe = new ItemHoe(ModuleToolMaterial.ninjaTool).setUnlocalizedName("ss.ninja_hoe").setTextureName("sextiarysector:tool/ninja_hoe").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(ninjaHoe, "NinjaHoe"); + //Item i = Items.iron_axe; //防具 + // 銅 copperHelmet = new ItemSSArmor(ModuleToolMaterial.copperArmor, 0, 0).setUnlocalizedName("ss.copper_helmet").setTextureName("sextiarysector:armor/copper_helmet"); GameRegistry.registerItem(copperHelmet, "CopperHelmet"); - copperChestplate = new ItemSSArmor(ModuleToolMaterial.copperArmor, 0, 1).setUnlocalizedName("ss.copper_chestplate").setTextureName("sextiarysector:armor/copper_chestplate"); GameRegistry.registerItem(copperChestplate, "CopperChestplate"); - copperLeggings = new ItemSSArmor(ModuleToolMaterial.copperArmor, 0, 2).setUnlocalizedName("ss.copper_leggings").setTextureName("sextiarysector:armor/copper_leggings"); GameRegistry.registerItem(copperLeggings, "CopperLeggings"); - copperBoots = new ItemSSArmor(ModuleToolMaterial.copperArmor, 0, 3).setUnlocalizedName("ss.copper_boots").setTextureName("sextiarysector:armor/copper_boots"); GameRegistry.registerItem(copperBoots, "CopperBoots"); + // ニンジャ + ninjaHelmet = new ItemSSArmor(ModuleToolMaterial.ninjaArmor, 0, 0).setUnlocalizedName("ss.ninja_helmet").setTextureName("sextiarysector:armor/ninja_helmet"); + GameRegistry.registerItem(ninjaHelmet, "NinjaHelmet"); + ninjaChestplate = new ItemSSArmor(ModuleToolMaterial.ninjaArmor, 0, 1).setUnlocalizedName("ss.ninja_chestplate").setTextureName("sextiarysector:armor/ninja_chestplate"); + GameRegistry.registerItem(ninjaChestplate, "NinjaChestplate"); + ninjaLeggings = new ItemSSArmor(ModuleToolMaterial.ninjaArmor, 0, 2).setUnlocalizedName("ss.ninja_leggings").setTextureName("sextiarysector:armor/ninja_leggings"); + GameRegistry.registerItem(ninjaLeggings, "NinjaLeggings"); + ninjaBoots = new ItemSSArmor(ModuleToolMaterial.ninjaArmor, 0, 3).setUnlocalizedName("ss.ninja_boots").setTextureName("sextiarysector:armor/ninja_boots"); + GameRegistry.registerItem(ninjaBoots, "NinjaBoots"); + //水やり woodWateringCan = new ItemWateringCan(ToolMaterial.WOOD).setUnlocalizedName("ss.wood_watering_can").setTextureName("wood_watering_can"); GameRegistry.registerItem(woodWateringCan, "WoodWateringCan"); + brassShears = new ItemSSShears(ModuleToolMaterial.brassTool).setUnlocalizedName("ss.brass_shears").setTextureName("sextiarysector:tool/brass_shears"); + GameRegistry.registerItem(brassShears, "BrassShears"); + //水産 mineboatChest = new ItemMineboat().setUnlocalizedName("ss.mineboat_chest").setTextureName("sextiarysector:mineboat_chest"); GameRegistry.registerItem(mineboatChest, "MineboatChest"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index 3bccc99..47a7b7b 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -79,6 +79,9 @@ public static void init() { OreDictionary.registerOre("dustBluestone", SSItems.blueStoneDust); OreDictionary.registerOre("dustYellowstone", SSItems.yellowStoneDust); + OreDictionary.registerOre("nuggetIron", SSItems.ironNugget); + OreDictionary.registerOre("nuggetCopper", SSItems.copperNugget); + OreDictionary.registerOre("ingotSteel", SSItems.steelIngot); OreDictionary.registerOre("ingotBrass", SSItems.brassIngot); OreDictionary.registerOre("ingotBluestone", SSItems.blueStoneIngot); @@ -91,6 +94,15 @@ public static void init() { OreDictionary.registerOre("gemOrichalcum", SSItems.orichalcumGem); + OreDictionary.registerOre("blockCopper", SSBlocks.copperBlock); + OreDictionary.registerOre("blockZinc", SSBlocks.zincBlock); + OreDictionary.registerOre("blockSilver", SSBlocks.silverBlock); + OreDictionary.registerOre("blockSteel", SSBlocks.steelBlock); + OreDictionary.registerOre("blockBrass", SSBlocks.brassBlock); + OreDictionary.registerOre("blockNinja", SSBlocks.ninjaBlock); + OreDictionary.registerOre("blockMithril", SSBlocks.mithrilBlock); + OreDictionary.registerOre("blockOrichalcum", SSBlocks.orichalcumBlock); + OreDictionary.registerOre("oreCopper", SSBlocks.copperOre); OreDictionary.registerOre("oreZinc", SSBlocks.zincOre); OreDictionary.registerOre("oreSilver", SSBlocks.silverOre); diff --git a/src/main/java/shift/sextiarysector/SSShops.java b/src/main/java/shift/sextiarysector/SSShops.java index e416098..8be80d5 100644 --- a/src/main/java/shift/sextiarysector/SSShops.java +++ b/src/main/java/shift/sextiarysector/SSShops.java @@ -29,7 +29,7 @@ public static void initShops() { creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.blueStoneDust, 2), 320)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.yellowStoneDust, 2), 320)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.brassIngot, 2), 230)); + //creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.brassIngot, 2), 230)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.takumiTeaBottle, 2), 216)); @@ -51,35 +51,35 @@ public static void initShops() { creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.wood, 1), 180)); if (i == 0) { - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.turnip, 1), 180)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.cucumber, 1), 360)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.turnip, 8), 180)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.cucumber, 8), 360)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.rice, 1), 280)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.shiitake, 1), 210)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.rice, 8), 280)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.shiitake, 8), 210)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.mithrilIngot, 1), 1400)); } if (i == 1) { - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.onion, 1), 180)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.tomato, 1), 190)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.corn, 1), 740)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.onion, 8), 180)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.tomato, 8), 190)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.corn, 8), 740)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.magicDust, 4), 500)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.waterContactLenses, 1), 700)); } if (i == 2) { - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.eggplant, 1), 290)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.sweetPotato, 1), 110)); - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.greenPepper, 1), 320)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.eggplant, 8), 290)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.sweetPotato, 8), 110)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.greenPepper, 8), 320)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.fluidCrafter, 4, 0), 580)); } if (i == 3) { - creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.radish, 1), 170)); + creepers[i].addItemProduct(new ProductItem(new ItemStack(SSBlocks.radish, 8), 170)); creepers[i].addItemProduct(new ProductItem(new ItemStack(SSItems.stoneDust, 4), 500)); } @@ -152,43 +152,43 @@ public static void initPurchase() { MCEconomyAPI.addPurchaseItem(new ItemStack(Items.skull, 1, OreDictionary.WILDCARD_VALUE), 25); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.turnip), 280); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.cucumber), 350); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.turnip), 30); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.cucumber), 35); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.ironTurnip), 300); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.turnip, 1, 1), 2800); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.cucumber, 1, 1), 3500); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.turnip, 1, 1), 300); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.cucumber, 1, 1), 350); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.ironTurnip, 1, 1), 3000); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.onion), 320); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.tomato), 150); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.corn), 720); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.onion), 38); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.tomato), 16); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.corn), 84); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.goldenCorn), 800); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.onion, 1, 1), 3200); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.tomato, 1, 1), 1500); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.corn, 1, 1), 7200); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.onion, 1, 1), 380); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.tomato, 1, 1), 160); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.corn, 1, 1), 840); MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.goldenCorn, 1, 1), 8000); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.eggplant), 210); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.sweetPotato), 120); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.greenPepper), 200); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.eggplant), 32); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.sweetPotato), 20); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.greenPepper), 22); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.eggplant, 1, 1), 2100); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.sweetPotato, 1, 1), 1200); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.greenPepper, 1, 1), 2000); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.eggplant, 1, 1), 320); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.sweetPotato, 1, 1), 200); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.greenPepper, 1, 1), 220); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.radish), 220); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.radish), 24); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.radish, 1, 1), 2200); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.radish, 1, 1), 240); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.rice), 400); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.rice), 84); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.rice, 1, 1), 4000); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.rice, 1, 1), 840); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.shiitake), 310); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.shiitake), 31); - MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.shiitake, 1, 1), 3100); + MCEconomyAPI.addPurchaseItem(new ItemStack(SSItems.shiitake, 1, 1), 310); } diff --git a/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java b/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java index 58cd595..11981d5 100644 --- a/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java +++ b/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java @@ -126,7 +126,7 @@ public void onPlayerEatenEvent(BlockBottleEvent event) { FluidStack fluid = event.fluid; EntityPlayer player = (EntityPlayer) event.entity; - if (fluid.fluidID == FluidRegistry.WATER.getID()) { + if (fluid.getFluid().getID() == FluidRegistry.WATER.getID()) { SextiarySectorAPI.playerManager.addMoistureStats(player, 3, 0); player.addExhaustion(4.5f); @@ -134,7 +134,7 @@ public void onPlayerEatenEvent(BlockBottleEvent event) { } - if (fluid.fluidID == FluidRegistry.LAVA.getID()) { + if (fluid.getFluid().getID() == FluidRegistry.LAVA.getID()) { SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 12.0f); diff --git a/src/main/java/shift/sextiarysector/block/BlockBottle.java b/src/main/java/shift/sextiarysector/block/BlockBottle.java index 60a72a3..3c63f49 100644 --- a/src/main/java/shift/sextiarysector/block/BlockBottle.java +++ b/src/main/java/shift/sextiarysector/block/BlockBottle.java @@ -15,42 +15,42 @@ import shift.sextiarysector.item.ItemBlockBottle; import shift.sextiarysector.tileentity.TileEntityBlockBottle; -public class BlockBottle extends BlockContainer{ +public class BlockBottle extends BlockContainer { public BlockBottle() { super(Material.glass); this.setHardness(0.4F); this.setStepSound(soundTypeGlass); - this.setBlockBounds(2.0f/16.0f, 0, 2.0f/16.0f, 14.0f/16.0f, 1, 14.0f/16.0f); + this.setBlockBounds(2.0f / 16.0f, 0, 2.0f / 16.0f, 14.0f / 16.0f, 1, 14.0f / 16.0f); this.setCreativeTab(SextiarySectorAPI.TabSSFluid); } @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { - TileEntityBlockBottle tileEntity = (TileEntityBlockBottle)world.getTileEntity(x, y, z); + TileEntityBlockBottle tileEntity = (TileEntityBlockBottle) world.getTileEntity(x, y, z); - if(par5EntityPlayer.isSneaking()){ + if (par5EntityPlayer.isSneaking()) { - if(!world.isRemote){ + if (!world.isRemote) { ItemStack stack; - if(tileEntity.hasFluid()){ - stack = new ItemStack(this,1,tileEntity.getFluidID()); - ((ItemBlockBottle)stack.getItem()).fill(stack, tileEntity.getFluidStack(), true); - }else{ - stack = new ItemStack(this,1); + if (tileEntity.hasFluid()) { + stack = new ItemStack(this, 1, tileEntity.getFluidID()); + ((ItemBlockBottle) stack.getItem()).fill(stack, tileEntity.getFluidStack(), true); + } else { + stack = new ItemStack(this, 1); } - EntityItem item = new EntityItem(world, x+0.5d, y+0.5d, z+0.5d, stack); + EntityItem item = new EntityItem(world, x + 0.5d, y + 0.5d, z + 0.5d, stack); world.spawnEntityInWorld(item); world.setBlockToAir(x, y, z); world.removeTileEntity(x, y, z); - }else{ + } else { return true; } @@ -60,14 +60,13 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p } + public ItemStack getFluidItem(FluidStack resource) { - public ItemStack getFluidItem(FluidStack resource){ - - ItemStack stack = new ItemStack(this,1,resource.fluidID); - ((ItemBlockBottle)stack.getItem()).fill(stack, resource, true); + ItemStack stack = new ItemStack(this, 1, resource.getFluid().getID()); + ((ItemBlockBottle) stack.getItem()).fill(stack, resource, true); return stack; - } + } @Override public boolean renderAsNormalBlock() { @@ -79,16 +78,17 @@ public boolean isOpaqueCube() { return false; } + @Override public int quantityDropped(Random p_149745_1_) - { - return 0; - } + { + return 0; + } @Override public int getRenderType() - { - return SextiarySector.proxy.bottleType; - } + { + return SextiarySector.proxy.bottleType; + } @Override public TileEntity createNewTileEntity(World world, int p_149915_2_) { diff --git a/src/main/java/shift/sextiarysector/block/BlockMachineFrame.java b/src/main/java/shift/sextiarysector/block/BlockMachineFrame.java new file mode 100644 index 0000000..4c56a75 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockMachineFrame.java @@ -0,0 +1,44 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; +import shift.sextiarysector.SSMaterials; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockMachineFrame extends Block { + + @SideOnly(Side.CLIENT) + private IIcon iconTop; + + public BlockMachineFrame() { + super(SSMaterials.machine); + this.setHardness(0.3f); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(int par1, int par2) + { + + if (par1 == 1 || par1 == 0) + { + return this.iconTop; + } else + { + return this.blockIcon; + } + + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon(this.textureName); + this.iconTop = par1IconRegister.registerIcon(this.textureName + "_top"); + + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockOreBlock.java b/src/main/java/shift/sextiarysector/block/BlockOreBlock.java new file mode 100644 index 0000000..542186c --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockOreBlock.java @@ -0,0 +1,17 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class BlockOreBlock extends Block { + + public BlockOreBlock() { + super(Material.iron); + this.setHardness(5.0F); + this.setResistance(10.0F); + this.setStepSound(soundTypeMetal); + this.setCreativeTab(SextiarySectorAPI.TabSSMining); + } + +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java b/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java index f8787f5..d202735 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java +++ b/src/main/java/shift/sextiarysector/container/ContainerFluidMachineBase.java @@ -15,198 +15,204 @@ public class ContainerFluidMachineBase extends Container { - private TileEntityFluidMachineBase tileFurnace; - private int lastFuel; - private int lastFuelMax; - private int workProgress; - //private int lastFluid; - //private int lastFluidID; - - public ContainerFluidMachineBase(InventoryPlayer p_i1812_1_, TileEntityFluidMachineBase p_i1812_2_) - { - this.tileFurnace = p_i1812_2_; - this.addSlotToContainer(new Slot(p_i1812_2_, 0, 56, 17)); - this.addSlotToContainer(new Slot(p_i1812_2_, 1, 56, 53)); - this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 2, 107, 53)); - this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 3, 125, 53)); - this.addSlotToContainer(new SlotFluid(p_i1812_2_, 4, 152, 17)); - this.addSlotToContainer(new SlotFluid(p_i1812_2_, 5, 152, 53)); - int i; - - for (i = 0; i < 3; ++i) - { - for (int j = 0; j < 9; ++j) - { - this.addSlotToContainer(new Slot(p_i1812_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - - for (i = 0; i < 9; ++i) - { - this.addSlotToContainer(new Slot(p_i1812_1_, i, 8 + i * 18, 142)); - } - } - - public void addCraftingToCrafters(ICrafting p_75132_1_) - { - super.addCraftingToCrafters(p_75132_1_); - p_75132_1_.sendProgressBarUpdate(this, 0, this.tileFurnace.fuel); - p_75132_1_.sendProgressBarUpdate(this, 1, this.tileFurnace.fuelMax); - p_75132_1_.sendProgressBarUpdate(this, 2, this.tileFurnace.machineWorkProgressTime); - p_75132_1_.sendProgressBarUpdate(this, 3, this.tileFurnace.getTank().getFluidAmount()); - if(this.tileFurnace.getTank().getFluid()!=null){ - p_75132_1_.sendProgressBarUpdate(this, 4, this.tileFurnace.getTank().getFluid().fluidID); - }else{ - p_75132_1_.sendProgressBarUpdate(this, 4, 0); - } - - } - - /** - * Looks for changes made in the container, sends them to every listener. - */ - public void detectAndSendChanges() - { - super.detectAndSendChanges(); - - for (int i = 0; i < this.crafters.size(); ++i) - { - ICrafting icrafting = (ICrafting)this.crafters.get(i); - - if (this.lastFuel != this.tileFurnace.fuel) - { - icrafting.sendProgressBarUpdate(this, 0, this.tileFurnace.fuel); - } - - if (this.lastFuelMax != this.tileFurnace.fuelMax) - { - icrafting.sendProgressBarUpdate(this, 1, this.tileFurnace.fuelMax); - } - - if (this.workProgress != this.tileFurnace.machineWorkProgressTime) - { - icrafting.sendProgressBarUpdate(this, 2, this.tileFurnace.machineWorkProgressTime); - } - - /*if (this.lastFluid != this.tileFurnace.getTank().getFluidAmount()) - { - icrafting.sendProgressBarUpdate(this, 3, this.tileFurnace.getTank().getFluidAmount()); - - ////if(this.tileFurnace.getTank().getFluidAmount()>0){ - // icrafting.sendProgressBarUpdate(this, 4, this.tileFurnace.getTank().getFluid().fluidID); - // } - - }*/ - } - - this.lastFuel = this.tileFurnace.fuel; - this.lastFuelMax = this.tileFurnace.fuelMax; - this.workProgress = this.tileFurnace.machineWorkProgressTime; - //this.lastFluid = this.tileFurnace.getTank().getFluidAmount(); - } - - @SideOnly(Side.CLIENT) - public void updateProgressBar(int p_75137_1_, int p_75137_2_) - { - if (p_75137_1_ == 0) - { - this.tileFurnace.fuel = p_75137_2_; - } - - if (p_75137_1_ == 1) - { - this.tileFurnace.fuelMax = p_75137_2_; - } - - if (p_75137_1_ == 2) - { - this.tileFurnace.machineWorkProgressTime = p_75137_2_; - } - - /*if (p_75137_1_ == 3) - { - this.tileFurnace.amount = p_75137_2_; - }*/ - - } - - public boolean canInteractWith(EntityPlayer p_75145_1_) - { - return this.tileFurnace.isUseableByPlayer(p_75145_1_); - } - - /** - * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. - */ - public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) - { - ItemStack itemstack = null; - Slot slot = (Slot)this.inventorySlots.get(p_82846_2_); - - if (slot != null && slot.getHasStack()) - { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - if (p_82846_2_ == 2) - { - if (!this.mergeItemStack(itemstack1, 3, 39, true)) - { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } - else if (p_82846_2_ != 1 && p_82846_2_ != 0) - { - if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) - { - if (!this.mergeItemStack(itemstack1, 0, 1, false)) - { - return null; - } - } - else if (TileEntityFurnace.isItemFuel(itemstack1)) - { - if (!this.mergeItemStack(itemstack1, 1, 2, false)) - { - return null; - } - } - else if (p_82846_2_ >= 6 && p_82846_2_ < 33) - { - if (!this.mergeItemStack(itemstack1, 33, 42, false)) - { - return null; - } - } - else if (p_82846_2_ >= 33 && p_82846_2_ < 42 && !this.mergeItemStack(itemstack1, 6, 33, false)) - { - return null; - } - } - else if (!this.mergeItemStack(itemstack1, 6, 42, false)) - { - return null; - } - - if (itemstack1.stackSize == 0) - { - slot.putStack((ItemStack)null); - } - else - { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) - { - return null; - } - - slot.onPickupFromSlot(p_82846_1_, itemstack1); - } - - return itemstack; - } + private final TileEntityFluidMachineBase tileFurnace; + private int lastFuel; + private int lastFuelMax; + private int workProgress; + + //private int lastFluid; + //private int lastFluidID; + + public ContainerFluidMachineBase(InventoryPlayer p_i1812_1_, TileEntityFluidMachineBase p_i1812_2_) + { + this.tileFurnace = p_i1812_2_; + this.addSlotToContainer(new Slot(p_i1812_2_, 0, 56, 17)); + this.addSlotToContainer(new Slot(p_i1812_2_, 1, 56, 53)); + this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 2, 107, 53)); + this.addSlotToContainer(new SlotFurnace(p_i1812_1_.player, p_i1812_2_, 3, 125, 53)); + this.addSlotToContainer(new SlotFluid(p_i1812_2_, 4, 152, 17)); + this.addSlotToContainer(new SlotFluid(p_i1812_2_, 5, 152, 53)); + int i; + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(p_i1812_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(p_i1812_1_, i, 8 + i * 18, 142)); + } + } + + @Override + public void addCraftingToCrafters(ICrafting p_75132_1_) + { + super.addCraftingToCrafters(p_75132_1_); + p_75132_1_.sendProgressBarUpdate(this, 0, this.tileFurnace.fuel); + p_75132_1_.sendProgressBarUpdate(this, 1, this.tileFurnace.fuelMax); + p_75132_1_.sendProgressBarUpdate(this, 2, this.tileFurnace.machineWorkProgressTime); + p_75132_1_.sendProgressBarUpdate(this, 3, this.tileFurnace.getTank().getFluidAmount()); + if (this.tileFurnace.getTank().getFluid() != null) { + p_75132_1_.sendProgressBarUpdate(this, 4, this.tileFurnace.getTank().getFluid().getFluid().getID()); + } else { + p_75132_1_.sendProgressBarUpdate(this, 4, 0); + } + + } + + /** + * Looks for changes made in the container, sends them to every listener. + */ + @Override + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + + for (int i = 0; i < this.crafters.size(); ++i) + { + ICrafting icrafting = (ICrafting) this.crafters.get(i); + + if (this.lastFuel != this.tileFurnace.fuel) + { + icrafting.sendProgressBarUpdate(this, 0, this.tileFurnace.fuel); + } + + if (this.lastFuelMax != this.tileFurnace.fuelMax) + { + icrafting.sendProgressBarUpdate(this, 1, this.tileFurnace.fuelMax); + } + + if (this.workProgress != this.tileFurnace.machineWorkProgressTime) + { + icrafting.sendProgressBarUpdate(this, 2, this.tileFurnace.machineWorkProgressTime); + } + + /*if (this.lastFluid != this.tileFurnace.getTank().getFluidAmount()) + { + icrafting.sendProgressBarUpdate(this, 3, this.tileFurnace.getTank().getFluidAmount()); + + ////if(this.tileFurnace.getTank().getFluidAmount()>0){ + // icrafting.sendProgressBarUpdate(this, 4, this.tileFurnace.getTank().getFluid().fluidID); + // } + + }*/ + } + + this.lastFuel = this.tileFurnace.fuel; + this.lastFuelMax = this.tileFurnace.fuelMax; + this.workProgress = this.tileFurnace.machineWorkProgressTime; + //this.lastFluid = this.tileFurnace.getTank().getFluidAmount(); + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int p_75137_1_, int p_75137_2_) + { + if (p_75137_1_ == 0) + { + this.tileFurnace.fuel = p_75137_2_; + } + + if (p_75137_1_ == 1) + { + this.tileFurnace.fuelMax = p_75137_2_; + } + + if (p_75137_1_ == 2) + { + this.tileFurnace.machineWorkProgressTime = p_75137_2_; + } + + /*if (p_75137_1_ == 3) + { + this.tileFurnace.amount = p_75137_2_; + }*/ + + } + + @Override + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return this.tileFurnace.isUseableByPlayer(p_75145_1_); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ == 2) + { + if (!this.mergeItemStack(itemstack1, 3, 39, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (p_82846_2_ != 1 && p_82846_2_ != 0) + { + if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return null; + } + } + else if (TileEntityFurnace.isItemFuel(itemstack1)) + { + if (!this.mergeItemStack(itemstack1, 1, 2, false)) + { + return null; + } + } + else if (p_82846_2_ >= 6 && p_82846_2_ < 33) + { + if (!this.mergeItemStack(itemstack1, 33, 42, false)) + { + return null; + } + } + else if (p_82846_2_ >= 33 && p_82846_2_ < 42 && !this.mergeItemStack(itemstack1, 6, 33, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 6, 42, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack) null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } } diff --git a/src/main/java/shift/sextiarysector/container/ContainerFunnel.java b/src/main/java/shift/sextiarysector/container/ContainerFunnel.java index 801309e..3296490 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerFunnel.java +++ b/src/main/java/shift/sextiarysector/container/ContainerFunnel.java @@ -118,7 +118,8 @@ public void updateProgressBar(int p_75137_1_, int p_75137_2_) if (p_75137_1_ == 0) { - this.tileFurnace.tank.getFluid().fluidID = p_75137_2_; + //this.tileFurnace.tank.getFluid(). = p_75137_2_; + this.tileFurnace.tank.setFluid(new FluidStack(p_75137_2_, 1)); } else if (p_75137_1_ == 1) { diff --git a/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java b/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java index 2c92d56..8d9deaf 100644 --- a/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java +++ b/src/main/java/shift/sextiarysector/entity/EntityMineboatTank.java @@ -89,7 +89,7 @@ private void updateServerEntity() { if (this.tank.getFluidAmount() == 0) { this.dataWatcher.updateObject(23, 0); } else { - this.dataWatcher.updateObject(23, this.tank.getFluid().fluidID); + this.dataWatcher.updateObject(23, this.tank.getFluid().getFluid().getID()); } this.lastAmount = this.tank.getFluidAmount(); diff --git a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java index 02cc3e7..e4a499c 100644 --- a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java @@ -58,7 +58,7 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.yellowstoneGen = new WorldGenMinable(SSBlocks.yellowStoneOre, 7); copperOreGen = new WorldGenMinable(SSBlocks.copperOre, 10); - zincOreGen = new WorldGenMinable(SSBlocks.zincOre, 8); + //zincOreGen = new WorldGenMinable(SSBlocks.zincOre, 8); silverOreGen = new WorldGenMinable(SSBlocks.silverOre, 8); mithrilOreGen = new WorldGenMinable(SSBlocks.mithrilOre, 8); @@ -74,7 +74,7 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.genStandardOre1(8, this.yellowstoneGen, 0, 16); if (Config.generationCopperOre) this.genStandardOre1(20, this.copperOreGen, 0, 64); - if (Config.generationZincOre) this.genStandardOre1(12, this.zincOreGen, 0, 64); + //if (Config.generationZincOre) this.genStandardOre1(12, this.zincOreGen, 0, 64); if (Config.generationSilverOre) this.genStandardOre1(2, this.silverOreGen, 0, 32); if (BiomeDictionary.isBiomeOfType(biome, Type.COLD)) { diff --git a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java index 26ebde8..01c6d0d 100644 --- a/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java +++ b/src/main/java/shift/sextiarysector/gui/GuiInventoryNext.java @@ -23,121 +23,134 @@ public class GuiInventoryNext extends InventoryEffectRenderer protected static final ResourceLocation field_147001_a = new ResourceLocation("sextiarysector:textures/guis/inventory_next.png"); - /** x size of the inventory window in pixels. Defined as float, passed as int */ - private float xSizeFloat; - /** y size of the inventory window in pixels. Defined as float, passed as int. */ - private float ySizeFloat; - private static final String __OBFID = "CL_00000761"; - - public GuiInventoryNext(EntityPlayer p_i1094_1_) - { - super(new ContainerPlayerNext(p_i1094_1_.inventory, p_i1094_1_)); - this.allowUserInput = true; - } - - /** - * Called from the main game loop to update the screen. - */ - public void updateScreen() - { - if (this.mc.playerController.isInCreativeMode()) - { - //this.mc.displayGuiScreen(new GuiContainerCreative(this.mc.thePlayer)); - } - } - - /** - * Adds the buttons (and other controls) to the screen in question. - */ - public void initGui() - { - this.buttonList.clear(); - - super.initGui(); - - int cornerX = this.guiLeft; - - int cornerY = this.guiTop; - - TabManager.updateTabValues(cornerX, cornerY,this.buttonList, SSPlayerTabs.ss,false); - - } - - /** - * Draw the foreground layer for the GuiContainer (everything in front of the items) - */ - protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) - { - //this.fontRendererObj.drawString(I18n.format("container.crafting", new Object[0]), 86, 16, 4210752); - } - - /** - * Draws the screen and all the components in it. - */ - public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) - { - super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); - this.xSizeFloat = (float)p_73863_1_; - this.ySizeFloat = (float)p_73863_2_; - } - - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(this.field_147001_a); - int k = this.guiLeft; - int l = this.guiTop; - this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); - func_147046_a(k + 51, l + 75, 30, (float)(k + 51) - this.xSizeFloat, (float)(l + 75 - 50) - this.ySizeFloat, this.mc.thePlayer); - } - - public static void func_147046_a(int p_147046_0_, int p_147046_1_, int p_147046_2_, float p_147046_3_, float p_147046_4_, EntityLivingBase p_147046_5_) - { - GL11.glEnable(GL11.GL_COLOR_MATERIAL); - GL11.glPushMatrix(); - GL11.glTranslatef((float)p_147046_0_, (float)p_147046_1_, 50.0F); - GL11.glScalef((float)(-p_147046_2_), (float)p_147046_2_, (float)p_147046_2_); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); - float f2 = p_147046_5_.renderYawOffset; - float f3 = p_147046_5_.rotationYaw; - float f4 = p_147046_5_.rotationPitch; - float f5 = p_147046_5_.prevRotationYawHead; - float f6 = p_147046_5_.rotationYawHead; - GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); - RenderHelper.enableStandardItemLighting(); - GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-((float)Math.atan((double)(p_147046_4_ / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F); - p_147046_5_.renderYawOffset = (float)Math.atan((double)(p_147046_3_ / 40.0F)) * 20.0F; - p_147046_5_.rotationYaw = (float)Math.atan((double)(p_147046_3_ / 40.0F)) * 40.0F; - p_147046_5_.rotationPitch = -((float)Math.atan((double)(p_147046_4_ / 40.0F))) * 20.0F; - p_147046_5_.rotationYawHead = p_147046_5_.rotationYaw; - p_147046_5_.prevRotationYawHead = p_147046_5_.rotationYaw; - GL11.glTranslatef(0.0F, p_147046_5_.yOffset, 0.0F); - RenderManager.instance.playerViewY = 180.0F; - RenderManager.instance.renderEntityWithPosYaw(p_147046_5_, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F); - p_147046_5_.renderYawOffset = f2; - p_147046_5_.rotationYaw = f3; - p_147046_5_.rotationPitch = f4; - p_147046_5_.prevRotationYawHead = f5; - p_147046_5_.rotationYawHead = f6; - GL11.glPopMatrix(); - RenderHelper.disableStandardItemLighting(); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); - GL11.glDisable(GL11.GL_TEXTURE_2D); - OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); - } - - protected void actionPerformed(GuiButton p_146284_1_) - { - if (p_146284_1_.id == 0) - { - this.mc.displayGuiScreen(new GuiAchievements(this, this.mc.thePlayer.getStatFileWriter())); - } - - if (p_146284_1_.id == 1) - { - this.mc.displayGuiScreen(new GuiStats(this, this.mc.thePlayer.getStatFileWriter())); - } - } + /** x size of the inventory window in pixels. Defined as float, passed as int */ + private float xSizeFloat; + /** y size of the inventory window in pixels. Defined as float, passed as int. */ + private float ySizeFloat; + private static final String __OBFID = "CL_00000761"; + + public GuiInventoryNext(EntityPlayer p_i1094_1_) + { + super(new ContainerPlayerNext(p_i1094_1_.inventory, p_i1094_1_)); + this.allowUserInput = true; + } + + /** + * Called from the main game loop to update the screen. + */ + @Override + public void updateScreen() + { + if (this.mc.playerController.isInCreativeMode()) + { + //this.mc.displayGuiScreen(new GuiContainerCreative(this.mc.thePlayer)); + } + } + + /** + * Adds the buttons (and other controls) to the screen in question. + */ + @Override + public void initGui() + { + this.buttonList.clear(); + + super.initGui(); + + int cornerX = this.guiLeft; + + int cornerY = this.guiTop; + + if (TabManager.hasPotion())//!mc.thePlayer.getActivePotionEffects().isEmpty()) + { + cornerX = 160 + (this.width - this.xSize - 200) / 2; + } else { + cornerX = (this.width - this.xSize) / 2; + } + + TabManager.updateTabValues(cornerX, cornerY, this.buttonList, SSPlayerTabs.ss, false); + + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + @Override + protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) + { + //this.fontRendererObj.drawString(I18n.format("container.crafting", new Object[0]), 86, 16, 4210752); + } + + /** + * Draws the screen and all the components in it. + */ + @Override + public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) + { + super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); + this.xSizeFloat = p_73863_1_; + this.ySizeFloat = p_73863_2_; + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(this.field_147001_a); + int k = this.guiLeft; + int l = this.guiTop; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + func_147046_a(k + 51, l + 75, 30, k + 51 - this.xSizeFloat, l + 75 - 50 - this.ySizeFloat, this.mc.thePlayer); + } + + public static void func_147046_a(int p_147046_0_, int p_147046_1_, int p_147046_2_, float p_147046_3_, float p_147046_4_, EntityLivingBase p_147046_5_) + { + GL11.glEnable(GL11.GL_COLOR_MATERIAL); + GL11.glPushMatrix(); + GL11.glTranslatef(p_147046_0_, p_147046_1_, 50.0F); + GL11.glScalef((-p_147046_2_), p_147046_2_, p_147046_2_); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); + float f2 = p_147046_5_.renderYawOffset; + float f3 = p_147046_5_.rotationYaw; + float f4 = p_147046_5_.rotationPitch; + float f5 = p_147046_5_.prevRotationYawHead; + float f6 = p_147046_5_.rotationYawHead; + GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); + RenderHelper.enableStandardItemLighting(); + GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-((float) Math.atan(p_147046_4_ / 40.0F)) * 20.0F, 1.0F, 0.0F, 0.0F); + p_147046_5_.renderYawOffset = (float) Math.atan(p_147046_3_ / 40.0F) * 20.0F; + p_147046_5_.rotationYaw = (float) Math.atan(p_147046_3_ / 40.0F) * 40.0F; + p_147046_5_.rotationPitch = -((float) Math.atan(p_147046_4_ / 40.0F)) * 20.0F; + p_147046_5_.rotationYawHead = p_147046_5_.rotationYaw; + p_147046_5_.prevRotationYawHead = p_147046_5_.rotationYaw; + GL11.glTranslatef(0.0F, p_147046_5_.yOffset, 0.0F); + RenderManager.instance.playerViewY = 180.0F; + RenderManager.instance.renderEntityWithPosYaw(p_147046_5_, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F); + p_147046_5_.renderYawOffset = f2; + p_147046_5_.rotationYaw = f3; + p_147046_5_.rotationPitch = f4; + p_147046_5_.prevRotationYawHead = f5; + p_147046_5_.rotationYawHead = f6; + GL11.glPopMatrix(); + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); + GL11.glDisable(GL11.GL_TEXTURE_2D); + OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); + } + + @Override + protected void actionPerformed(GuiButton p_146284_1_) + { + if (p_146284_1_.id == 0) + { + this.mc.displayGuiScreen(new GuiAchievements(this, this.mc.thePlayer.getStatFileWriter())); + } + + if (p_146284_1_.id == 1) + { + this.mc.displayGuiScreen(new GuiStats(this, this.mc.thePlayer.getStatFileWriter())); + } + } } diff --git a/src/main/java/shift/sextiarysector/gui/tab/TabManager.java b/src/main/java/shift/sextiarysector/gui/tab/TabManager.java index 1abc630..bbd4cd2 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/TabManager.java +++ b/src/main/java/shift/sextiarysector/gui/tab/TabManager.java @@ -11,6 +11,7 @@ import net.minecraft.network.play.client.C0DPacketCloseWindow; import net.minecraftforge.client.event.GuiScreenEvent; import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -73,7 +74,7 @@ public void guiPostInit(GuiScreenEvent.InitGuiEvent.Post event) int guiLeft = (event.gui.width - xSize) / 2; int guiTop = (event.gui.height - ySize) / 2; - if (!this.mc.thePlayer.getActivePotionEffects().isEmpty()) + if (this.hasPotion()) { guiLeft = 160 + (event.gui.width - xSize - 200) / 2; } @@ -83,6 +84,33 @@ public void guiPostInit(GuiScreenEvent.InitGuiEvent.Post event) } } + public static boolean hasPotion() + { + if (mc.thePlayer.getActivePotionEffects().isEmpty()) return false; + if (!Loader.isModLoaded("NotEnoughItems")) return true; + + try + { + Class c = Class.forName("codechicken.nei.NEIClientConfig"); + Object hidden = c.getMethod("isHidden").invoke(null); + Object enabled = c.getMethod("isEnabled").invoke(null); + + if (hidden != null && hidden instanceof Boolean && enabled != null && enabled instanceof Boolean) + { + if ((Boolean) hidden || !((Boolean) enabled)) + { + return true; + } + } + + } catch (Exception e) + { + } + + return false; + + } + public static void updateTabValues(int cornerX, int cornerY, List buttonList, AbstractTab selectedButton, boolean reset) { diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java b/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java index 86880dd..394a801 100644 --- a/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java +++ b/src/main/java/shift/sextiarysector/item/ItemBlockBottle.java @@ -27,11 +27,11 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ItemBlockBottle extends ItemBlock implements IFluidContainerItem{ +public class ItemBlockBottle extends ItemBlock implements IFluidContainerItem { protected int capacity = FluidContainerRegistry.BUCKET_VOLUME; - public ItemBlockBottle(Block block){ + public ItemBlockBottle(Block block) { super(block); this.setHasSubtypes(true); this.setMaxStackSize(1); @@ -40,28 +40,26 @@ public ItemBlockBottle(Block block){ /* Block */ @Override - public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) - { - boolean result = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ,metadata); + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) + { + boolean result = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata); - if(result && world.getTileEntity(x, y, z) instanceof TileEntityBlockBottle){ - TileEntityBlockBottle tile = (TileEntityBlockBottle)world.getTileEntity(x, y, z); + if (result && world.getTileEntity(x, y, z) instanceof TileEntityBlockBottle) { + TileEntityBlockBottle tile = (TileEntityBlockBottle) world.getTileEntity(x, y, z); tile.fill(ForgeDirection.UP, this.getFluid(stack), true); } return result; - } - - + } /* Item */ @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4,int par5, int par6, int par7, float par8, float par9, float par10) + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { if (par2EntityPlayer.isSneaking()) { - return super.onItemUse(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9,par10); + return super.onItemUse(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10); } else { return false; } @@ -70,61 +68,58 @@ public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { + { if (par3EntityPlayer.isSneaking()) { return par1ItemStack; } else { - if(this.getFluid(par1ItemStack)==null){ + if (this.getFluid(par1ItemStack) == null) { return this.onEmptyItemRightClick(par1ItemStack, par2World, par3EntityPlayer); - }else if(this.getFluid(par1ItemStack)!=null && this.getFluid(par1ItemStack).amount>=100 && this.canDrink(par3EntityPlayer, false)){ + } else if (this.getFluid(par1ItemStack) != null && this.getFluid(par1ItemStack).amount >= 100 && this.canDrink(par3EntityPlayer, false)) { par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); } } - return par1ItemStack; - } + } private ItemStack onEmptyItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { + { MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); - if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - int x = movingobjectposition.blockX; - int y = movingobjectposition.blockY; - int z = movingobjectposition.blockZ; - - if (!par3EntityPlayer.canPlayerEdit(x, y, z, movingobjectposition.sideHit, par1ItemStack)) - { - return par1ItemStack; - } - - Block block = par2World.getBlock(x, y, z); + { + int x = movingobjectposition.blockX; + int y = movingobjectposition.blockY; + int z = movingobjectposition.blockZ; + + if (!par3EntityPlayer.canPlayerEdit(x, y, z, movingobjectposition.sideHit, par1ItemStack)) + { + return par1ItemStack; + } - Fluid f = FluidRegistry.lookupFluidForBlock(block); + Block block = par2World.getBlock(x, y, z); - if(f!=null){ - this.fill(par1ItemStack, new FluidStack(f, 1000), true); - par2World.setBlockToAir(x, y, z); - } + Fluid f = FluidRegistry.lookupFluidForBlock(block); - } + if (f != null) { + this.fill(par1ItemStack, new FluidStack(f, 1000), true); + par2World.setBlockToAir(x, y, z); + } + } return par1ItemStack; - } + } @Override - public ItemStack onEaten(ItemStack stack, World par2World,EntityPlayer par3EntityPlayer) { + public ItemStack onEaten(ItemStack stack, World par2World, EntityPlayer par3EntityPlayer) { - if(par2World.isRemote){ + if (par2World.isRemote) { return stack; } @@ -138,183 +133,182 @@ public ItemStack onEaten(ItemStack stack, World par2World,EntityPlayer par3Entit @Override public EnumAction getItemUseAction(ItemStack par1ItemStack) - { + { return EnumAction.drink; - } + } - public boolean canDrink(EntityPlayer par3EntityPlayer,boolean par1) - { - return (par1 || EntityPlayerManager.getMoistureStats(par3EntityPlayer).needMoisture()) && !par3EntityPlayer.capabilities.disableDamage; - } + public boolean canDrink(EntityPlayer par3EntityPlayer, boolean par1) + { + return (par1 || EntityPlayerManager.getMoistureStats(par3EntityPlayer).needMoisture()) && !par3EntityPlayer.capabilities.disableDamage; + } + @Override public int getMaxItemUseDuration(ItemStack p_77626_1_) - { - return 32; - } - - + { + return 32; + } + @Override @SideOnly(Side.CLIENT) - public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) - { + public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) + { p_150895_3_.add(new ItemStack(p_150895_1_, 1, 0)); - for(int i=1;i<=FluidRegistry.getRegisteredFluids().size();i++){ + for (int i = 1; i <= FluidRegistry.getRegisteredFluids().size(); i++) { ItemStack item = new ItemStack(p_150895_1_, 1, i); this.fill(item, new FluidStack(FluidRegistry.getFluid(i), capacity), true); p_150895_3_.add(item); } - } + } @Override - public void addInformation(ItemStack itemstack,EntityPlayer par1EntityPlayer, List list , boolean flag) - { + public void addInformation(ItemStack itemstack, EntityPlayer par1EntityPlayer, List list, boolean flag) + { String name = "None"; int amount = 0; - if(this.getFluid(itemstack)!=null){ + if (this.getFluid(itemstack) != null) { name = this.getFluid(itemstack).getFluid().getLocalizedName(this.getFluid(itemstack)); amount = this.getFluid(itemstack).amount; } NumberFormat nfNum = NumberFormat.getNumberInstance(); - list.add("Name" +" : " + name); - list.add("Amount" +" : " + nfNum.format(amount) + " / " + nfNum.format(this.capacity) + " mB"); - - } + list.add("Name" + " : " + name); + list.add("Amount" + " : " + nfNum.format(amount) + " / " + nfNum.format(this.capacity) + " mB"); + } /* IFluidContainerItem */ - @Override - public FluidStack getFluid(ItemStack container) - { - if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) - { - return null; - } - return FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); - } - - @Override - public int getCapacity(ItemStack container) - { - return capacity; - } - - @Override - public int fill(ItemStack container, FluidStack resource, boolean doFill) - { - if (resource == null) - { - return 0; - } - - if (!doFill) - { - if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) - { - return Math.min(capacity, resource.amount); - } - - FluidStack stack = FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); - - if (stack == null) - { - return Math.min(capacity, resource.amount); - } - - if (!stack.isFluidEqual(resource)) - { - return 0; - } - - return Math.min(capacity - stack.amount, resource.amount); - } - - if (container.stackTagCompound == null) - { - container.stackTagCompound = new NBTTagCompound(); - } - - if (!container.stackTagCompound.hasKey("Fluid")) - { - NBTTagCompound fluidTag = resource.writeToNBT(new NBTTagCompound()); - - container.setItemDamage(resource.fluidID); - - if (capacity < resource.amount) - { - fluidTag.setInteger("Amount", capacity); - container.stackTagCompound.setTag("Fluid", fluidTag); - return capacity; - } - - container.stackTagCompound.setTag("Fluid", fluidTag); - return resource.amount; - } - - NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid"); - FluidStack stack = FluidStack.loadFluidStackFromNBT(fluidTag); - - if (!stack.isFluidEqual(resource)) - { - return 0; - } - - int filled = capacity - stack.amount; - if (resource.amount < filled) - { - stack.amount += resource.amount; - filled = resource.amount; - } - else - { - stack.amount = capacity; - } - - container.stackTagCompound.setTag("Fluid", stack.writeToNBT(fluidTag)); - return filled; - } - - @Override - public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) - { - if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) - { - return null; - } - - FluidStack stack = FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); - if (stack == null) - { - return null; - } - - stack.amount = Math.min(stack.amount, maxDrain); - if (doDrain) - { - if (maxDrain >= capacity) - { - container.stackTagCompound.removeTag("Fluid"); - - if (container.stackTagCompound.hasNoTags()) - { - container.stackTagCompound = null; - } - - container.setItemDamage(0); - - return stack; - } - - NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid"); - fluidTag.setInteger("Amount", fluidTag.getInteger("Amount") - maxDrain); - container.stackTagCompound.setTag("Fluid", fluidTag); - } - return stack; - } + @Override + public FluidStack getFluid(ItemStack container) + { + if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) + { + return null; + } + return FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); + } + + @Override + public int getCapacity(ItemStack container) + { + return capacity; + } + + @Override + public int fill(ItemStack container, FluidStack resource, boolean doFill) + { + if (resource == null) + { + return 0; + } + + if (!doFill) + { + if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) + { + return Math.min(capacity, resource.amount); + } + + FluidStack stack = FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); + + if (stack == null) + { + return Math.min(capacity, resource.amount); + } + + if (!stack.isFluidEqual(resource)) + { + return 0; + } + + return Math.min(capacity - stack.amount, resource.amount); + } + + if (container.stackTagCompound == null) + { + container.stackTagCompound = new NBTTagCompound(); + } + + if (!container.stackTagCompound.hasKey("Fluid")) + { + NBTTagCompound fluidTag = resource.writeToNBT(new NBTTagCompound()); + + container.setItemDamage(resource.getFluid().getID()); + + if (capacity < resource.amount) + { + fluidTag.setInteger("Amount", capacity); + container.stackTagCompound.setTag("Fluid", fluidTag); + return capacity; + } + + container.stackTagCompound.setTag("Fluid", fluidTag); + return resource.amount; + } + + NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid"); + FluidStack stack = FluidStack.loadFluidStackFromNBT(fluidTag); + + if (!stack.isFluidEqual(resource)) + { + return 0; + } + + int filled = capacity - stack.amount; + if (resource.amount < filled) + { + stack.amount += resource.amount; + filled = resource.amount; + } + else + { + stack.amount = capacity; + } + + container.stackTagCompound.setTag("Fluid", stack.writeToNBT(fluidTag)); + return filled; + } + + @Override + public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) + { + if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid")) + { + return null; + } + + FluidStack stack = FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid")); + if (stack == null) + { + return null; + } + + stack.amount = Math.min(stack.amount, maxDrain); + if (doDrain) + { + if (maxDrain >= capacity) + { + container.stackTagCompound.removeTag("Fluid"); + + if (container.stackTagCompound.hasNoTags()) + { + container.stackTagCompound = null; + } + + container.setItemDamage(0); + + return stack; + } + + NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid"); + fluidTag.setInteger("Amount", fluidTag.getInteger("Amount") - maxDrain); + container.stackTagCompound.setTag("Fluid", fluidTag); + } + return stack; + } } diff --git a/src/main/java/shift/sextiarysector/item/ItemSSShears.java b/src/main/java/shift/sextiarysector/item/ItemSSShears.java new file mode 100644 index 0000000..6788f1f --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemSSShears.java @@ -0,0 +1,15 @@ +package shift.sextiarysector.item; + +import net.minecraft.item.ItemShears; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class ItemSSShears extends ItemShears { + + public ItemSSShears(ToolMaterial m) + { + this.setMaxStackSize(1); + this.setMaxDamage(m.getMaxUses() - 12); + this.setCreativeTab(SextiarySectorAPI.TabSSCore); + } + +} diff --git a/src/main/java/shift/sextiarysector/module/ModuleFigure.java b/src/main/java/shift/sextiarysector/module/ModuleFigure.java index da019df..fe79c09 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleFigure.java +++ b/src/main/java/shift/sextiarysector/module/ModuleFigure.java @@ -63,7 +63,7 @@ public void load(FMLInitializationEvent event) { addFigure("ore_festival", new ItemStack(Blocks.diamond_ore), 2); //MOD - addFigure("ore_festival", new ItemStack(SSBlocks.zincOre), 10); + //addFigure("ore_festival", new ItemStack(SSBlocks.zincOre), 10); addFigure("ore_festival", new ItemStack(SSBlocks.copperOre), 20); addFigure("ore_festival", new ItemStack(SSBlocks.silverOre), 14); addFigure("ore_festival", new ItemStack(SSBlocks.blueStoneOre), 8); diff --git a/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java b/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java index d037833..12c2b32 100644 --- a/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java +++ b/src/main/java/shift/sextiarysector/module/ModuleToolMaterial.java @@ -22,15 +22,23 @@ public static ModuleToolMaterial getInstance() { } public static ToolMaterial copperTool; + public static ToolMaterial brassTool; + public static ToolMaterial ninjaTool; public static ArmorMaterial copperArmor; + public static ArmorMaterial ninjaArmor; @Override public void preInit(FMLPreInitializationEvent event) { + //レベル 耐久 スピード Power Enchant copperTool = EnumHelper.addToolMaterial("copper", 2, 200, 4.0F, 1.0F, 10); + brassTool = EnumHelper.addToolMaterial("brass", 2, 660, 7.0F, 3.0F, 8); + ninjaTool = EnumHelper.addToolMaterial("ninja", 4, 1172, 12.5F, 5.0F, 19); + //耐久 それぞれの防御力 Enchant copperArmor = EnumHelper.addArmorMaterial("copper", 13, new int[] { 2, 6, 4, 2 }, 7); + ninjaArmor = EnumHelper.addArmorMaterial("ninja", 29, new int[] { 4, 9, 6, 4 }, 22); } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTcon.java b/src/main/java/shift/sextiarysector/plugin/PluginTcon.java index 1479127..88ead6c 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTcon.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTcon.java @@ -63,7 +63,7 @@ public void guiPostInit(GuiScreenEvent.InitGuiEvent.Post event) int guiLeft = (event.gui.width - xSize) / 2; int guiTop = (event.gui.height - ySize) / 2; - if (!this.mc.thePlayer.getActivePotionEffects().isEmpty()) + if (TabManager.hasPotion()) { guiLeft = 160 + (event.gui.width - xSize - 200) / 2; } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesArmor.java b/src/main/java/shift/sextiarysector/recipe/RecipesArmor.java index 1cc45c2..e70aad7 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesArmor.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesArmor.java @@ -11,9 +11,13 @@ public static void addRecipes(CraftingManager p_77608_1_) { String[][] recipePatterns = new String[][] { { "XXX", "X X" }, { "X X", "XXX", "XXX" }, { "XXX", "X X", "X X" }, { "X X", "X X" } }; - Object[] materialItems = new String[] { "ingotCopper" }; + Object[] materialItems = new String[] { + "ingotCopper", + "ingotNinja" + }; ItemStack[][] recipeItems = new ItemStack[][] { - { new ItemStack(SSItems.copperHelmet), new ItemStack(SSItems.copperChestplate), new ItemStack(SSItems.copperLeggings), new ItemStack(SSItems.copperBoots) } + { new ItemStack(SSItems.copperHelmet), new ItemStack(SSItems.copperChestplate), new ItemStack(SSItems.copperLeggings), new ItemStack(SSItems.copperBoots) }, + { new ItemStack(SSItems.ninjaHelmet), new ItemStack(SSItems.ninjaChestplate), new ItemStack(SSItems.ninjaLeggings), new ItemStack(SSItems.ninjaBoots) } }; for (int i = 0; i < materialItems.length; ++i) diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index 350d641..ef2222b 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -1,7 +1,9 @@ package shift.sextiarysector.recipe; +import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.init.Items; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraftforge.oredict.ShapedOreRecipe; @@ -39,6 +41,44 @@ public static void addRecipes(CraftingManager p_77608_1_) "slimeball" })); + //鉱石 インゴット--ブロック + Object[] oIngot = new Object[] { "ingotCopper", "ingotZinc", "ingotSilver", "ingotSteel", "ingotBrass", "ingotNinja", "ingotMithril", "gemOrichalcum" }; + Block[] block = new Block[] { SSBlocks.copperBlock, SSBlocks.zincBlock, SSBlocks.silverBlock, SSBlocks.steelBlock, SSBlocks.brassBlock, SSBlocks.ninjaBlock, SSBlocks.mithrilBlock, SSBlocks.orichalcumBlock }; + for (int i = 0; i < oIngot.length; i++) { + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(block[i], 1), + new Object[] { "xxx", "xxx", "xxx", + Character.valueOf('x'), oIngot[i], + })); + } + + Object[] oBlock = new Object[] { "blockCopper", "blockZinc", "blockSilver", "blockSteel", "blockBrass", "blockNinja", "blockMithril", "blockOrichalcum" }; + Item[] ingot = new Item[] { SSItems.copperIngot, SSItems.zincIngot, SSItems.silverIngot, SSItems.steelIngot, SSItems.brassIngot, SSItems.ninjaIngot, SSItems.mithrilIngot, SSItems.orichalcumGem }; + for (int i = 0; i < oBlock.length; i++) { + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(ingot[i], 9), + new Object[] { + oBlock[i] + })); + } + + //鉱石 ナゲット--インゴット + Object[] oNugget = new Object[] { "nuggetIron", "nuggetCopper" }; + ingot = new Item[] { Items.iron_ingot, SSItems.copperIngot, }; + for (int i = 0; i < oNugget.length; i++) { + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(ingot[i], 1), + new Object[] { "xxx", "xxx", "xxx", + Character.valueOf('x'), oNugget[i], + })); + } + + oIngot = new Object[] { "ingotIron", "ingotCopper" }; + Item[] nugget = new Item[] { SSItems.ironNugget, SSItems.copperNugget }; + for (int i = 0; i < oIngot.length; i++) { + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(nugget[i], 9), + new Object[] { + oIngot[i] + })); + } + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.smallCloth, 1), new Object[] { "xx", "xx", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java index ce7dc6f..219d42b 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java @@ -9,24 +9,24 @@ public class RecipesFurnace { public static void addRecipes() - { - GameRegistry.addSmelting(new ItemStack(SSItems.ironDust),new ItemStack(Items.iron_ingot),0.1f); - GameRegistry.addSmelting(new ItemStack(SSItems.goldDust),new ItemStack(Items.gold_ingot),0.1f); - GameRegistry.addSmelting(new ItemStack(SSItems.copperDust),new ItemStack(SSItems.copperIngot),0.1f); - GameRegistry.addSmelting(new ItemStack(SSItems.zincDust),new ItemStack(SSItems.zincIngot),0.1f); + { + GameRegistry.addSmelting(new ItemStack(SSItems.ironDust), new ItemStack(Items.iron_ingot), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.goldDust), new ItemStack(Items.gold_ingot), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.copperDust), new ItemStack(SSItems.copperIngot), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.zincDust), new ItemStack(SSItems.zincIngot), 0.1f); - GameRegistry.addSmelting(new ItemStack(SSBlocks.copperOre),new ItemStack(SSItems.copperIngot), 0.1f); - GameRegistry.addSmelting(new ItemStack(SSBlocks.zincOre),new ItemStack(SSItems.zincIngot), 0.1f); - GameRegistry.addSmelting(new ItemStack(SSBlocks.silverOre),new ItemStack(SSItems.silverIngot), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.copperOre), new ItemStack(SSItems.copperIngot), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.zincOre), new ItemStack(SSItems.zincIngot), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.silverOre), new ItemStack(SSItems.silverIngot), 0.1f); - GameRegistry.addSmelting(new ItemStack(SSBlocks.orichalcumOre),new ItemStack(SSItems.orichalcumGem), 0.1f); - GameRegistry.addSmelting(new ItemStack(SSBlocks.blueStoneOre),new ItemStack(SSItems.blueStoneDust), 0.1f); - GameRegistry.addSmelting(new ItemStack(SSBlocks.yellowStoneOre),new ItemStack(SSItems.yellowStoneDust), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.orichalcumOre), new ItemStack(SSItems.orichalcumGem), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.blueStoneOre), new ItemStack(SSItems.blueStoneDust), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.yellowStoneOre), new ItemStack(SSItems.yellowStoneDust), 0.1f); - GameRegistry.addSmelting(new ItemStack(SSItems.laver),new ItemStack(SSItems.laverRoasted),0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.laver), new ItemStack(SSItems.laverRoasted), 0.1f); - GameRegistry.addSmelting(new ItemStack(SSItems.waterBottle),new ItemStack(SSItems.drinkingWaterBottle),0.1f); + GameRegistry.addSmelting(new ItemStack(SSItems.waterBottle), new ItemStack(SSItems.drinkingWaterBottle), 0.1f); - } + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index 60160a9..7c633c9 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -90,7 +90,7 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) "dustIron" })); - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.brassIngot, 1), + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.brassIngot, 2), new Object[] { "dustCopper", "dustCopper", @@ -103,11 +103,19 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) "dustDiamond" })); + /* p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.unit, 1), new Object[] { "xxx", "xyx", "xxx", Character.valueOf('y'), SSItems.blueGel, Character.valueOf('x'), "cobblestone", })); + */ + + p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSBlocks.machineFrame, 1), + new Object[] { "xxx", "xyx", "xxx", + Character.valueOf('y'), "gelBluestone", + Character.valueOf('x'), "cobblestone", + })); p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.emptyBottle, 8), new Object[] { diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index 29229b8..40e4c65 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -25,10 +25,11 @@ public static void addRecipes(CraftingManager p_77608_1_) 'a', Blocks.furnace }); - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.energyReactor, 2), - new Object[] { "xxx", "xyx", "xxx", - Character.valueOf('y'), "ingotBluestone", - Character.valueOf('x'), "ingotYellowstone" + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.energyReactor, 1), + new Object[] { "xyx", "yzy", "xyx", + Character.valueOf('y'), "ingotSilver", + Character.valueOf('x'), "nuggetCopper", + Character.valueOf('z'), "gelBluestone" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.objectReactor, 2), @@ -145,66 +146,69 @@ public static void addRecipes(CraftingManager p_77608_1_) } p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.millstone, 1), - new Object[] { "yyy", "aza", "yxy", - Character.valueOf('y'), "plankWood", + new Object[] { "yay", "aza", "yxy", + Character.valueOf('y'), "gearWood", Character.valueOf('x'), SSItems.woodGFStorage, - Character.valueOf('z'), SSItems.woodUnitGear, + Character.valueOf('z'), SSBlocks.machineFrame, Character.valueOf('a'), "stone" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.loom, 1), - new Object[] { "yyy", "aza", "yxy", - Character.valueOf('y'), "plankWood", + new Object[] { "y y", "aza", "yxy", + Character.valueOf('y'), "gearWood", Character.valueOf('x'), SSItems.woodGFStorage, - Character.valueOf('z'), SSItems.woodUnitGear, + Character.valueOf('z'), SSBlocks.machineFrame, Character.valueOf('a'), "stickWood" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.sawmill, 1), - new Object[] { "yyy", "aza", "yxy", - Character.valueOf('y'), "plankWood", + new Object[] { "y y", "aza", "yxy", + Character.valueOf('y'), "gearStone", Character.valueOf('x'), SSItems.stoneGFStorage, - Character.valueOf('z'), SSItems.stoneUnitGear, - Character.valueOf('a'), "ingotIron" + Character.valueOf('z'), SSBlocks.machineFrame, + Character.valueOf('a'), "ingotCopper" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.spinningMachine, 1), - new Object[] { "yyy", "aza", "yxy", - Character.valueOf('y'), "plankWood", + new Object[] { "yby", "aza", "yxy", + Character.valueOf('y'), "gearStone", Character.valueOf('x'), SSItems.stoneGFStorage, - Character.valueOf('z'), SSItems.stoneUnitGear, - Character.valueOf('a'), "ingotGold" + Character.valueOf('z'), SSBlocks.machineFrame, + Character.valueOf('a'), "ingotSilver", + Character.valueOf('b'), "stickWood" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.pump, 1), - new Object[] { "yyy", "axy", "yzy", - Character.valueOf('x'), SSItems.stoneUnitGear, - Character.valueOf('y'), "plateWood", - Character.valueOf('z'), SSItems.stoneGear, + new Object[] { "yxy", "azx", "yxy", + Character.valueOf('x'), "plateWood", + Character.valueOf('y'), "gearStone", + Character.valueOf('z'), SSBlocks.tank, Character.valueOf('a'), SSBlocks.woodGrate, })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.suctionMachine, 1), - new Object[] { "yyy", "zxz", "yyy", - Character.valueOf('x'), SSItems.stoneUnitGear, - Character.valueOf('y'), "plateWood", - Character.valueOf('z'), SSItems.stoneGear, + new Object[] { "yay", "xzx", "yay", + Character.valueOf('x'), "plateWood", + Character.valueOf('y'), "gearStone", + Character.valueOf('z'), SSBlocks.tank, + Character.valueOf('a'), Blocks.iron_bars })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.pulverizer, 1), new Object[] { "yay", "aza", "yxy", - Character.valueOf('y'), "plankWood", + Character.valueOf('y'), "gearSteel", Character.valueOf('x'), SSItems.steelGFStorage, - Character.valueOf('z'), SSItems.steelUnitGear, + Character.valueOf('z'), SSBlocks.machineFrame, Character.valueOf('a'), "gemDiamond" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.extractor, 1), - new Object[] { "yyy", "aza", "yxy", - Character.valueOf('y'), "plankWood", + new Object[] { "yby", "aza", "yxy", + Character.valueOf('y'), "gearSteel", Character.valueOf('x'), SSItems.steelGFStorage, - Character.valueOf('z'), SSItems.steelUnitGear, - Character.valueOf('a'), "containerBottle" + Character.valueOf('z'), SSBlocks.machineFrame, + Character.valueOf('a'), "containerBottle", + Character.valueOf('b'), SSBlocks.tank })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.fan, 1), @@ -227,18 +231,19 @@ public static void addRecipes(CraftingManager p_77608_1_) p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.rollingMachine, 1), new Object[] { "yay", "aza", "yxy", - Character.valueOf('y'), "plankWood", + Character.valueOf('y'), "gearNinja", Character.valueOf('x'), SSItems.ninjaGFStorage, - Character.valueOf('z'), SSItems.ninjaUnitGear, + Character.valueOf('z'), SSBlocks.machineFrame, Character.valueOf('a'), "ingotIron" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.timeMachine, 1), - new Object[] { "yay", "aza", "yxy", - Character.valueOf('y'), "plankWood", + new Object[] { "yby", "aza", "yxy", + Character.valueOf('y'), "gearOrichalcum", Character.valueOf('x'), SSItems.orichalcumGFStorage, - Character.valueOf('z'), SSItems.orichalcumUnitGear, - Character.valueOf('a'), SSBlocks.chunkLoader + Character.valueOf('z'), SSBlocks.machineFrame, + Character.valueOf('a'), SSBlocks.chunkLoader, + Character.valueOf('b'), "ingotMithril" })); //GF Item diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java index f28c674..6b76f0f 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java @@ -1,7 +1,5 @@ package shift.sextiarysector.recipe; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; @@ -44,13 +42,40 @@ public static void addRecipes(CraftingManager p_77608_1_) })); } + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.brassShears), + new Object[] { "x ", " x", + Character.valueOf('x'), "ingotBrass" + })); + //バニラツール + //銅 addShovel(p_77608_1_, "ingotCopper", new ItemStack(SSItems.copperShovel)); - addPickaxe(p_77608_1_, "ingotCopper", "ingotCopper", new ItemStack(SSItems.copperPickaxe)); - addAxe(p_77608_1_, "ingotCopper", "ingotCopper", new ItemStack(SSItems.copperAxe)); + addPickaxe(p_77608_1_, "ingotCopper", new ItemStack(SSItems.copperPickaxe)); + addAxe(p_77608_1_, "ingotCopper", new ItemStack(SSItems.copperAxe)); addSword(p_77608_1_, "ingotCopper", new ItemStack(SSItems.copperSword)); - addHoe(p_77608_1_, "ingotCopper", "ingotCopper", new ItemStack(SSItems.copperHoe)); + addHoe(p_77608_1_, "ingotCopper", new ItemStack(SSItems.copperHoe)); + + //銀 + + //黄銅 + addShovel(p_77608_1_, "ingotBrass", new ItemStack(SSItems.brassShears)); + addPickaxe(p_77608_1_, "ingotBrass", new ItemStack(SSItems.brassPickaxe)); + addAxe(p_77608_1_, "ingotBrass", new ItemStack(SSItems.brassAxe)); + addSword(p_77608_1_, "ingotBrass", new ItemStack(SSItems.brassSword)); + addHoe(p_77608_1_, "ingotBrass", new ItemStack(SSItems.brassHoe)); + + //ミスリル + + //ニンジャ + addShovel(p_77608_1_, "ingotNinja", new ItemStack(SSItems.ninjaShovel)); + addPickaxe(p_77608_1_, "ingotNinja", new ItemStack(SSItems.ninjaPickaxe)); + addAxe(p_77608_1_, "ingotNinja", new ItemStack(SSItems.ninjaAxe)); + addSword(p_77608_1_, "ingotNinja", new ItemStack(SSItems.ninjaSword)); + addHoe(p_77608_1_, "ingotNinja", new ItemStack(SSItems.ninjaHoe)); + + //オリハルコン + /* //プレート Item[] ironTool = new Item[] { Items.iron_axe, Items.iron_hoe, Items.iron_pickaxe, Items.iron_shovel, Items.iron_sword }; @@ -147,37 +172,35 @@ public static void addRecipes(CraftingManager p_77608_1_) addSword(p_77608_1_, materialGold[i], sword); } + */ } - private static void addAxe(CraftingManager p_77608_1_, String material, String material2, ItemStack item) { + private static void addAxe(CraftingManager p_77608_1_, String material, ItemStack item) { p_77608_1_.getRecipeList().add(new ShapedOreRecipe(item, - new Object[] { "yz", "yx", " x", + new Object[] { "yy", "yx", " x", Character.valueOf('y'), material, - Character.valueOf('z'), material2, Character.valueOf('x'), "stickWood", })); } - private static void addHoe(CraftingManager p_77608_1_, String material, String material2, ItemStack item) { + private static void addHoe(CraftingManager p_77608_1_, String material, ItemStack item) { p_77608_1_.getRecipeList().add(new ShapedOreRecipe(item, - new Object[] { "yz", " x", " x", + new Object[] { "yy", " x", " x", Character.valueOf('y'), material, - Character.valueOf('z'), material2, Character.valueOf('x'), "stickWood", })); } - private static void addPickaxe(CraftingManager p_77608_1_, String material, String material2, ItemStack item) { + private static void addPickaxe(CraftingManager p_77608_1_, String material, ItemStack item) { p_77608_1_.getRecipeList().add(new ShapedOreRecipe(item, - new Object[] { "yzy", " x ", " x ", + new Object[] { "yyy", " x ", " x ", Character.valueOf('y'), material, - Character.valueOf('z'), material2, Character.valueOf('x'), "stickWood", })); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java index 8deed99..8e01b2e 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityBlockBottle.java @@ -14,7 +14,7 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -public class TileEntityBlockBottle extends TileEntity implements IFluidHandler{ +public class TileEntityBlockBottle extends TileEntity implements IFluidHandler { protected FluidTank tank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME); @@ -38,79 +38,79 @@ public void updateClientEntity() { private void updateServerEntity() { - if((lastFluid)!=(tank.getFluidAmount()/100)){ - this.lastFluid = (tank.getFluidAmount()/100); + if ((lastFluid) != (tank.getFluidAmount() / 100)) { + this.lastFluid = (tank.getFluidAmount() / 100); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } /* IFluidHandler */ - @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill) - { - return tank.fill(resource, doFill); - } - - @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) - { - if (resource == null || !resource.isFluidEqual(tank.getFluid())) - { - return null; - } - return tank.drain(resource.amount, doDrain); - } - - @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) - { - return tank.drain(maxDrain, doDrain); - } - - @Override - public boolean canFill(ForgeDirection from, Fluid fluid) - { - return true; - } - - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) - { - return true; - } - - @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from) - { - return new FluidTankInfo[] { tank.getInfo() }; - } - - public boolean hasFluid(){ - return this.tank.getFluidAmount() > 0 ; - } - - public IIcon getFluidIcon(){ - return this.tank.getFluid().getFluid().getIcon(this.tank.getFluid()); - } - - public int getFluidColor(){ - return this.tank.getFluid().getFluid().getColor(this.tank.getFluid()); - } - - public float getFluidHeight(){ - return ((float)this.tank.getFluidAmount()/(float)this.tank.getCapacity())*(10.0f/16.0f); - } - - public int getFluidID(){ - return tank.getFluid().fluidID; - } - - public FluidStack getFluidStack(){ - return this.tank.getFluid(); - } - - /* NBT */ + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + { + return tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + { + if (resource == null || !resource.isFluidEqual(tank.getFluid())) + { + return null; + } + return tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + { + return tank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) + { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) + { + return new FluidTankInfo[] { tank.getInfo() }; + } + + public boolean hasFluid() { + return this.tank.getFluidAmount() > 0; + } + + public IIcon getFluidIcon() { + return this.tank.getFluid().getFluid().getIcon(this.tank.getFluid()); + } + + public int getFluidColor() { + return this.tank.getFluid().getFluid().getColor(this.tank.getFluid()); + } + + public float getFluidHeight() { + return ((float) this.tank.getFluidAmount() / (float) this.tank.getCapacity()) * (10.0f / 16.0f); + } + + public int getFluidID() { + return tank.getFluid().getFluid().getID(); + } + + public FluidStack getFluidStack() { + return this.tank.getFluid(); + } + + /* NBT */ @Override public void readFromNBT(NBTTagCompound par1nbtTagCompound) { super.readFromNBT(par1nbtTagCompound); diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java b/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java index 2474069..7127d03 100644 --- a/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntitySquare.java @@ -148,7 +148,7 @@ public float getFluidHeight() { } public int getFluidID() { - return tank.getFluid().fluidID; + return tank.getFluid().getFluid().getID(); } public FluidStack getFluidStack() { diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 00e05ba..bf74e20 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -61,6 +61,15 @@ tile.ss.coal_large_ore.name=Coal Large Ore tile.ss.iron_large_ore.name=Iron Large Ore tile.ss.gold_large_ore.name=Gold Large Ore +tile.ss.copper_block.name=Copper Block +tile.ss.zinc_block.name=Zinc Block +tile.ss.silver_block.name=Silver Block +tile.ss.steel_block.name=Steel Block +tile.ss.brass_block.name=Brass Block +tile.ss.ninja_block.name=Ninja Block +tile.ss.mithril_block.name=Mithril Block +tile.ss.orichalcum_block.name=Orichalcum Block + tile.ss.small_windmill.name=Small Windmill tile.ss.windmill.name=Windmill @@ -91,6 +100,7 @@ tile.ss.stone_steel_gear_shaft.name=Stone Steel Gear Shaft tile.ss.steel_ninja_gear_shaft.name=Steel Ninja Gear Shaft tile.ss.ninja_orichalcum_gear_shaft.name=Ninja Orichalcum Gear Shaft +tile.ss.machine_frame.name=Machine Frame tile.ss.millstone.name=Millstone tile.ss.loom.name=Loom tile.ss.sawmill.name=Sawmill @@ -198,6 +208,10 @@ item.ss.zinc_dust.name=Zinc Dust item.ss.mithril_dust.name=Mithril Dust +item.ss.iron_nugget.name=Iron Nugget +item.ss.copper_nugget.name=Copper Nugget + + item.ss.steel_ingot.name=Steel Ingot item.ss.brass_ingot.name=Brass Ingot @@ -268,13 +282,33 @@ item.ss.copper_axe.name=Copper Axe item.ss.copper_sword.name=Copper Sword item.ss.copper_hoe.name=Copper Hoe +item.ss.brass_shovel.name=Brass Shovel +item.ss.brass_pickaxe.name=Brass Pickaxe +item.ss.brass_axe.name=Brass Axe +item.ss.brass_sword.name=Brass Sword +item.ss.brass_hoe.name=Brass Hoe + +item.ss.ninja_shovel.name=Ninja Shovel +item.ss.ninja_pickaxe.name=Ninja Pickaxe +item.ss.ninja_axe.name=Ninja Axe +item.ss.ninja_sword.name=Ninja Sword +item.ss.ninja_hoe.name=Ninja Hoe + + item.ss.copper_helmet.name=Copper Helmet item.ss.copper_chestplate.name=Copper Chestplate item.ss.copper_leggings.name=Copper Leggings item.ss.copper_boots.name=Copper Boots +item.ss.ninja_helmet.name=Ninja Helmet +item.ss.ninja_chestplate.name=Ninja Chestplate +item.ss.ninja_leggings.name=Ninja Leggings +item.ss.ninja_boots.name=Ninja Boots + item.ss.wood_watering_can.name=Wood Watering Can +item.ss.brass_shears.name=Brass Shears + item.ss.mineboat_chest.name=Mineboat Chest item.ss.mineboat_tank.name=Mineboat Tank diff --git a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang index 88be0e9..79ce8af 100644 --- a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang +++ b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang @@ -7,7 +7,7 @@ tile.ss.fluid_furnace.name=流体かまど tile.ss.food_smokers.name=燻製器 tile.ss.magic_furnace.name=魔法かまど -tile.ss.freezer.name=冷凍機 +tile.ss.freezer.name=フリーザー tile.ss.wood_grate.name=木の格子 @@ -18,8 +18,8 @@ tile.ss.jungle_wood_plate.name=ジャングルの木版 tile.ss.acacia_wood_plate.name=アカシアの木板 tile.ss.big_oak_wood_plate.name=ダークオークの木版 -tile.ss.iron_plate.name=鉄板 -tile.ss.gold_plate.name=金板 +tile.ss.iron_plate.name=鉄プレート +tile.ss.gold_plate.name=金プレート tile.ss.hole.name=穴 tile.ss.farmland.name=農地 @@ -31,8 +31,8 @@ tile.ss.fluid_crafter.name=流体クラフター tile.ss.square.name=枡 tile.ss.tank.name=タンク -tile.ss.funnel.name=漏斗 -tile.ss.copper_pipe.name=銅のパイプ +tile.ss.funnel.name=ファンネル +tile.ss.copper_pipe.name=銅パイプ tile.ss.wood_hopper.name=木のホッパー @@ -340,15 +340,15 @@ item.ss.oxygen_tank.name=酸素タンク item.ss.gf_contact_lenses.name=GFコンタクトレンズ item.ss.water_contact_lenses.name=ウォーターコンタクトレンズ -item.ss.craft_unit.name=クラフトユニット -item.ss.attack_unit.name=アタックユニット -item.ss.defense_unit.name=ディフェンスユニット -item.ss.attack_rust_unit.name=錆びたアタックユニット -item.ss.defense_rust_unit.name=錆びたディフェンスユニット -item.ss.pickaxe_unit.name=ツルハシユニット +item.ss.craft_unit.name=ユニット「イツデモクラフト」 +item.ss.attack_unit.name=ユニット「ダメージプラス」 +item.ss.defense_unit.name=ユニット「ボウギョプラス」 +item.ss.attack_rust_unit.name=錆びたユニット「ダ・・ジプ・ス」 +item.ss.defense_rust_unit.name=錆びたユニット「ボウ・・・ラ・」 +item.ss.pickaxe_unit.name=ユニット「ツルハシパワー」 -item.ss.iron_ring.name=鉄の指輪 +item.ss.iron_ring.name=鉄リング item.ss.creeper_ring.name=クリーパーショップリング item.ss.mp_ring.name=MPリング item.ss.xp_ring.name=XPリング diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/brass_block.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/brass_block.png new file mode 100644 index 0000000000000000000000000000000000000000..5040e913a1ce271c6a086200081132b5744c8dd1 GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~t2{H4d{CV1S)kAzPZ!4!i_=>tdGj4I;Bh(LDJ}X@ zF!sPC=VArDi>B!bfsBf|hTWGYsWAqsq@`PiJ*)I--z)Z-VJXAmhLa3ROxX)E4LeK& zVp+Njgv7NE<=qxlb5?o%C(9;Qj`dB}1HF~U?|1r7Jz(W!=Dd5IWO5{X!A6xe;`8fY z&TZ}3$@nAuHS?jLQpzT|(>*fozu#P^bSAyU*KtMm%#`|;fVof0TMSt1KiBT*isPu| z+W9f)hR90^=QRa4|2tNcyG)NZSi#(KFK=34OXA%Yku|g14woux^cOzXd)fR+e5J?- Z2E+S#n=(G$4+Q#?!PC{xWt~$(69DO(eDVMQ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/copper_block.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/copper_block.png new file mode 100644 index 0000000000000000000000000000000000000000..9a680b39ac8b70ed98a112680f589b2f67dcb94d GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~s|2H@$fuW&Ie2ZDD#Xu~2l* z?0;{a!z|xy7xoOP*!gZp_hHT>H#&1QfV2(K-`cM=cK&PK`0^t&_w#SO+=X2GCat%N z_)wY5b=!5GHw% jhHv$^2J91E`+!S+QTqK$zk4EqzGd)q^>bP0l+XkK`XE^uBA5q{?o7Mtk<0ce>ZwDkb?-}~`v zxefc-5VU*`%3mU=ZpU!&Z4erN=h<5cLuxZn+5}J;hpMHaj1)BrrH?_Ki~+}KKu=Ml zKy8@k1QlxlikUE=7XFeDNjPE{jxz$s9)mCmv}v^Bght>TUxj_x&V?7P4f_N*wc^|p`sLF)(t2tL2#V94rvcCQIumvplt+M;%12RreWL3Q&W`m zUPe3vv172D2rSvpe)=KJUMTjUt+%qoTqoZ?MRK}f_>0g!k93pp#N8iY~up}691VUtnq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MTnL6=8UXAey<|O;A4}O{lxz#uEAU~0meCbL&Kz{QN z6uA_uJm~v=Gy(r#{CxqLhYrmqFYxma|E^NpPsCP^(RE#Vm`^&_Pn3CYByaujawca) z2!Zt5+Z%cBQ_`SEl=Hz_n;O`o{sF%5GMFbI5l%#%}~*JszCO`HB^r(W`u5 zk}E)0qO>ls1ws2ilXYyY5;Nf6l%r=P{rjGkfAs{&#b=CVQ%zB#ub*%XXYqoLIx(@o zkgjZyPX&w&YYEJo^hORY!3p%Ez7rc0VC}>9PNlG{Q(%AAb-6Hw6B3yz?OF*7p%bi0X|7Y zK~y-)jg#R|!Y~lUf9<+5P!J>}8Zq%7_fJzGhCl=|1%*-C&JPf_%1CyfF3r2%yZ7z{ zukSh5fRGR=fFgI6b4bYF zEwk}k*y&nFYc3%)TF`qy#W78pS9Y`&&-bxlIvH^sIGtmG4fSJsX5cKn;R_ol@TE>F z6g$+%9$>qM^%6y-NLNdc3J%#>3sZ-N(x(yP1aw04u3L+~me7g>v&rb_0@i@D?EWjC z`(m+54(x#MvI~Q!A(;ay2z0pSMz{ySB3&P6-*2lc8?DQ?)5a=H2FWelbdjBYr3=Ob z&XtNI20CYv&Qa(DVh!03Wv2`jj4HNtA!Ok~zujVW5Er0kyHn#9oMrVfzC`7oo%i8& bR@}oMB_NB}ZBt8400000NkvXXu0mjf11_%M literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_block.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_block.png new file mode 100644 index 0000000000000000000000000000000000000000..2b7f6c2344e2569e016b296ec7111a5e5c5513a8 GIT binary patch literal 476 zcmV<20VDp2P)C zAq1kIR!ZUZdI2zw<3Cld)Jc4zdsNj5%sJPjU4ct>JFX(O37Z+)wpBar=^{dmv8wRz z(b+=?Js)eCxgKgp+LB z#G2ysb z`02m-6W%m4mJ13BI%$8+cTZ}R*s$O5&NkoV9tF&?=)T^2eAl|| zEBDGIA1Sx$V>WwUGdon&GX0O+Hyi&YQ{>)?NhZtvzNW6U;ju;1tYz}6J3PKSK9|YK z{oxYk66d&5t1Yo&YyAAldj#ebM@(Z~b&Gf7o7>;yITTyY3*OSaGWFFf)`j2h2G4lD z^LJJE<+QKqETMY^s_t*)UHf%{OV39qjbIJ-Tv5Ts@Bd^MZ2fQ0Iz{MP?fXw(?LvB; agyIkME!cGKZ80a%n+%?=elF{r5}E)p8ibet literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/zinc_block.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/zinc_block.png new file mode 100644 index 0000000000000000000000000000000000000000..e1d1b9fa16db1f473634d8778f2832768e04208a GIT binary patch literal 349 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~t2~o6m%&lF)j*+Fo-U3d7N^%vwhlgQAkgw%j;qbk z)b{`X?@N+3RxC(nGoF}oH!y+qHdm$3rl)gDZux6p{Py;8vQdY?3{FRmLo8|sWU37r zopltH&Md86UQzdofx&T_FN4S8hxU8xcrI*|xKkVTW=F`ct=b-o5Aweejk7v+G$1X; zP;$$AmfGd+{wpQ4Hm$gyD^b<;S>;f<(UCne3GX-#_5NLz#FzNXwc>_>-21OdzqdO_ zEH~Kyv+D7oE$%C}D%8|*U4C)w0~j@sq}{TZnc)^B@?ddFAp5N>a>Z2w^w4*R9|TJsrd1jK;8X7F_Nb6Mw<&;$UGtcn2u literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/armor/ninja_boots.png b/src/main/resources/assets/sextiarysector/textures/items/armor/ninja_boots.png new file mode 100644 index 0000000000000000000000000000000000000000..9f57de08d4640e9af9e359a87ea43d37d672dbdd GIT binary patch literal 284 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~s{o6I%Ipg|&Oo7+o-U3d7N?UFBtA6=#yWJ|eQV$I z_uX?nx0s}eMuFY8|9@Nb{r}vl^Z!0i3H<5rF{cp-IPVJVm(W|&_E_k+LBi!p`4OUz zgwhw82&_zR0O>e<-28Fqn@8tQ223xPQVpAtFw1*$xKU2jr{2W#$KFSnDtAkt(n)AI z%EoQRdR*?7Va@;Ic0tQ`{kB_vpWpCN;9HBzk$2zz|Gr;c;Fxmu1cNQ_gCO%G3=B8U WdvQKJ!Q2gWG=rzBpUXO@geCyAh;jb_ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/armor/ninja_chestplate.png b/src/main/resources/assets/sextiarysector/textures/items/armor/ninja_chestplate.png new file mode 100644 index 0000000000000000000000000000000000000000..a67a128291202e66a4cc96652099b3fec03f273d GIT binary patch literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~s{o4y=RN)cGoa8zPZ!4!i_^&o5+x2Dci-+8*nPV` z>8PQ|7V*9R->><@<7()$XYY%@^@?TN|Ig9UDzFrr(RAs}R1LPe|JD4fU6mvs{nuK`+gxFm@|_)dd; zc|c4fx5DkdB!+zxjz243!}cJk<9xQxk{fNj28*~0Hm&%xeUiP)l>Zy07>rqFTkJ|( b#lR54k$vNqd)#NBXBj+Q{an^LB{Ts5yW@%< literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/armor/ninja_helmet.png b/src/main/resources/assets/sextiarysector/textures/items/armor/ninja_helmet.png new file mode 100644 index 0000000000000000000000000000000000000000..3bef4f58e3d24f74bd5de045ed1b0c2881f10beb GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~s{o6+X3|d|L!i)1PZ!4!i_^&o5}z6bXD<-geY-yA z(fhi0Nh%o)K+gY5Z>CDj`kwRWT)~@#vWLIhmj`??NWA<;{P58S;)h!kJEs0oWb+f7 z`rm@rfo=A*8t09&;t2kM!5CH-G7VQO_+f|y_+lSW8i@U3=Ai@&0|+jE4>bMB!j1`pUXO@ GgeCxh_GeN6 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/armor/ninja_leggings.png b/src/main/resources/assets/sextiarysector/textures/items/armor/ninja_leggings.png new file mode 100644 index 0000000000000000000000000000000000000000..8bb688b25f78efe0c9b39f9484573cb21036f09e GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~s{o5R|AsFo&j5uQJzX3_EKVmUNMs!7&{H__?wkDl zwsQM&!$&3#9e3Z>XMXdVGwXZKpK}Fo8f6cE-(UXV*NhFCU%DSAedvCubc$PNhsr0X z`-?ur{;}M+D*4dzpEsDT+miX;eAv~%Ii2Oq`uqRyCEEN~X)IyxU|r0XV3=_J*n5j$ k#XwHZ@IAs_{3*-~iX56n?3uIH10BQQ>FVdQ&MBb@03I4#rvLx| literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/energy_reactor.png b/src/main/resources/assets/sextiarysector/textures/items/energy_reactor.png index 5c175c293fdc5178f8b2a8bff8d61fdc3cbcb476..e2d87a26a342c10e63ac2998731e62040609ea53 100644 GIT binary patch delta 1773 zcmVLae2m4o4sS1A~z~ zq(X3t^r3-;MsORn)6$2!72K2873S7iP}V|ZWpT2!RQc^8_ne+{Z<6NL%#E=F7m|B_ z&)?tq{XXaS`yEC^c$Tt`|LF8G0)XK;VgL|}#YE3DGc$$adAOFXpf6urKn(LXE^7Z>U z^!4@GI_UH=(Qq;&ErEy-jYcV#%TX?Wmm^Knh`;BLrfFmt1{sE-d>4(0$kurC?q1rw zyO&CJQYBAw!-fswcT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LB6QE=LNst4^b%i#P$)$4czhQRS|QT07PNSKEFK! zwUpcOps}>o_1THS9`p~A$s}Kgz3(3!K71H~Kmd{?HEk$=UGqQ?gr;0D+&^%+To42S zHk%F8)6;ByeO+H4G>%v-#*QC94v)u!ix)4VP$=l@gHHVeo6WYnf3TA@Oidoc{R1OB zc>er3zI^$Ddc6)wl5qX{b$uSFhYTWuBuNlOu{$1!q6nMK21%0mA){0(b;YM1C#G%s41EqNrKg4PoF-8$z%d!thf7x;o)J<0(C<%bicqD;|?}9Hh5pDYaS30 zEEWrQ^5DS(vR-FWKzuY;XF&>2%`s>C>oGD#rD})YKGgHXHA&b)^ql zLrO$2o6V@zYVCQDNF?}H-Wn0c7~Z{m*FKC@uU@^v$jAtWhK5k7RC>Q}6a)d4O2znn zqt$8!V+@Qj-nDGm=BVA?$a!G3S}{F6&2iRhr0GC)qVk}V(SK|F1I}svVg!P8sQ>@~ M07*qoM6N<$g2AX>2mk;8 delta 266 zcmV+l0rmcw4#fhH7Z(r+1^@s6AM^iV00001b5ch_0Itp)>5(BYf87cN1rjJ!kXHZz z006~FL_t(I%hi#w5riNRML#oFfSCmtkk|k{SOR6x0qK@uY8h%wXku=N0Vx-FGQx3k z;oU~N?7TO#eBf`2h&&Pb^!-tS&R$A+wq7a4J_=H(uIp(35(NqS21;w&HuQZDr4(aC z)y~Q|969AxT znp@C02V+c_wbm@8AcQzV_8$AbN0ND-Bj~zg*ZhSLL2w6U1*gPXTZDeAp0)~UH&Udq QM*si-07*qoM6N<$f~m7@Jpcdz diff --git a/src/main/resources/assets/sextiarysector/textures/items/ingot/mithril_ingot.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/items/ingot/mithril_ingot.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/items/ingot/mithril_ingot.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/src/main/resources/assets/sextiarysector/textures/items/nugget/copper_nugget.png b/src/main/resources/assets/sextiarysector/textures/items/nugget/copper_nugget.png new file mode 100644 index 0000000000000000000000000000000000000000..ab50a1d9bdc103b4b5c79e913032a43174b5f03a GIT binary patch literal 263 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~8y}~%l=QOxWk8`Ro-U3d7N?UFBv^ZPs0dBj@&E7* z?sv7RDkrb7sJ{CjzE}0%{@Ecv{=4@5t!Fp<_J79}qlc3wl=P?kD19w+`1EdbNiUP1 z5(ScnTzb0S)%`qs00<7uYoGl4_Ae|?nrx4#`U~6wI+MZE L)z4*}Q$iB}7!YND literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/plate/gold_plate.png b/src/main/resources/assets/sextiarysector/textures/items/plate/gold_plate.png index d5a942a845ceaae09218b6c43b2e0cc2caf31f45..f72d3138ff435999bbb3fc865ac9f6e272124b15 100644 GIT binary patch delta 283 zcmV+$0p$Ma0ptRZQhx;<4iF_yckgrn008kxL_t(I%cYV%$^tPEhTjnjVeLFYz+>ng z%-0KE!oqGFu~@OTw>O6nzDumI2T;Lg!A4(;HEULrb;W@|66SgGGb1GNOSGCKX)V-R zyeGBmAUiiED))?`xOw6};T?)!v@x{K;Y!*ryjlTDS;w-(7JrK=T=8%y-0ccU hJRa+zTEVw*2NbW0jZdbYOz!{y002ovPDHLkV1jB0efR(X delta 159 zcmV;Q0AT;*0_g#eQhxyq0|*voK@(B{004GLL_t(I%VS^|Xut?#99hWlA6eqeRs0$Y zx*&R4kOi$>3K49F7pOYEpJrfSU|{(F=Osf`-)Fcm6ISE@;MR-|m?+VVV!)ZJq-)0Q z1w5Ls-1tm{0YqxXZU70IF%2L>^QW%_TtJFu3kXQ{aR4 zye!M3)^#1Tb<7^&6H1cgWU7=x+qSSx0vnE^2vSM_z%)$Jg4D2$3 zloC}{K?rezvMjsZ&t(Tf2sBM|3vJtWZ(z6W5%HIG000{s|MNUMnLSTabS$0JL delta 160 zcmV;R0AK&v0_p*fQhxyq0|)|qo5wEz004JML_t(I%hi&>3BVu>MZeOOUBVHvnV>W1 z$!mL3)Y#C_L+L+-g!hON;Om%Hc<;|~5MvZUA~FDQj7{fUuS+QtkWvBwEAR z30`C0z)YZpC&Bt@cW?+neu4(x3N$biJb`Pi@&+213A8Y~#2N9z{*wz+&0>wXzTyo4 O0000xsQGeeB9tkKQK6oB$00034Nkla^%5i|?sS5nRnw$zB0RqT{X8DRd(S_ST_v^FQGJ>w@v}ex zACE`eQ%ZRNV~n^I&|3SpZBJb(rF<%q?cr&f0C>OO0Icf@Kz~sbN-5toO>`2Vv_KI5c@mv-o9+Xf>Hs4B3&BMS zrm=^=1k$@}ttU6&(HI{J?1ccvaXfue@$Yy30MF}^A@?me;s5{u07*qoM6N<$g7LzO A#Q*>R delta 221 zcmV<303!eP0;U3xQGebH6b2PK3tzb+00029Nkl@y9+fIaB26T1ZtwFfgx^O~8dS-{Ma z_kOBF2oRA}66spV0HCU?u2up$**OOhnd*{Ab%@S6Ff%bTjaDKtM!epi-&+{lo+HNC zwuQN85lH~h_kDGZlqb>5lByPezFcp3KJK(>A@{sRuI7N5>3BLXrd=X$Cb35Nzhn9W XaSm8S14*mL00000NkvXXu0mjfn2ump diff --git a/src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring2.png b/src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring2.png new file mode 100644 index 0000000000000000000000000000000000000000..27559aca030519b02bed10c9724ac733ad350ea4 GIT binary patch literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqj|iKn6?gnjC7{q|PZ!4!i_>R=4fzfk@Ysac^e7rV zV$JCgeAu~H|HZ5G5tZ!DDo5spx2z1Et)?0zp0|0??jLWAc@H<(zStnVo0V@XyRrA@ zSumdKI;Vst06Xq&!~g&Q literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/brass_axe.png b/src/main/resources/assets/sextiarysector/textures/items/tool/brass_axe.png new file mode 100644 index 0000000000000000000000000000000000000000..a7ee8882aa1f4192faf44809a40e0aa2ed78f0ff GIT binary patch literal 308 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~8#k|#VW;QfO+cZ8o-U3d7N?UF7O-;^C;pIscId9DUss zS}h@AUoVt8Vfup<4$Y@&1_A1ZY&K_I{+BOX{r~!e$N&1Ztt3BYP6J9?6g<>D-0L1+ xxGH&xi*evNH5Li>Gif{%9;&r2_@f`2dH?CIIG|@3JYD@<);T3K0RYZycB%jX literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/brass_hoe.png b/src/main/resources/assets/sextiarysector/textures/items/tool/brass_hoe.png new file mode 100644 index 0000000000000000000000000000000000000000..8f0b1d2e446080b1376aac8bf5506adb39a1c11d GIT binary patch literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~8#k{qo5p+dKR}@ko-U3d7N?UF76=$Tn#@z2_=7)r z{jKI$U2eOx+E$j5>+b&K6aLkIR$x)g0=44@E=)OlQXuf(+=rjl1KBD${n{jF%Naf@ zW!$v+aE!#i_}!o9I{NlCHck)iNc{IreF^)to-U3d7N?UFBr*oh<7zaM$-e|VVDpZ%LAJ+$AHsFL}weA?uqv(IKRUAcUws>kZ*w~#F+kW1jFL0$tkZnnpo1ueq-|R*p_;}!Fxr(ZRTFLGA`+pn* qX*&6H=WZ=FLuP{UW>7(8A5T-G@yGywp2!+lBs literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/brass_pickaxe.png b/src/main/resources/assets/sextiarysector/textures/items/tool/brass_pickaxe.png new file mode 100644 index 0000000000000000000000000000000000000000..17b1f2d9f1e9c4ec04b7213dcf8d66af93b8558c GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~8#k}AoIs%?o-U3d7N?UFBr*~DPWKVO>@&*$y-i4!LN=vpYbp7F#iNeKywe4AfhH98fuI{!_d{vgGo;Gu5Z zSqZj`6NUf7r#whfIF`1i(PLGb2(!tP9U$cr{B!EvgS=9lw*URto!?_FSF3uej136H iB$9uxyv{s%CPQVk_Z5{%3uXa*!QkoY=d#Wzp$P!w0&Ro< literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/brass_shears.png b/src/main/resources/assets/sextiarysector/textures/items/tool/brass_shears.png new file mode 100644 index 0000000000000000000000000000000000000000..16b348223379044f840adf206162eeb82cdf1016 GIT binary patch literal 343 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~t2~bY!Aj3r|pFv zC&+vZ+#*zZ(qdT6&Z{lL;Tqz`6(?9XuhnyQ(N`(R*t)|USpGAdK-;mvO jFr@d_i52}H!mJo4OO#cm&k@)Q^e=;_tDnm{r-UW|y{?J! literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/brass_shovel.png b/src/main/resources/assets/sextiarysector/textures/items/tool/brass_shovel.png new file mode 100644 index 0000000000000000000000000000000000000000..0a5bfcb1a8b128b2a01455465e1e363598b757dc GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~8#k{CUuLN$Cs1gMr;B5V#p&b(iHrjtT}k4`ZT}6v z%?n=gGPS@k`N#kFI?w;tr(6ENu44Gd-K;0$Ya`n#I+ z9UmJS9i1C{8a|l_|J}cA^27gAr>@v0ymqH??BD%uGUlnXE+#i7m{iT`{5O62gA|K` zhq{M*-Qy)azZq{jtD>qBl-s6#VZ!5o>opD@eUPAW#GwAS@S?fA{_IaO(h`86(Qw=R js#}aswSL9KX@si60z{o$!tHa4{)lla}A=Q?_~PA-}Kf9}&i^{J{YZr_e6T+CT~{=l{=2TC$fJ1rrr9r^|H(FrZ33$$(@hR7T9x;zylq+~PtT4khDpV(O(M*Po6`mU zP3+!bYHVO&utA~N=B&&A)7}L}F_k|$938tF9UUh%0>MLjJLiZArq&W%hG*{oYk7D~ znaz!jt?fVmJVOHuiO1$GtYWV|3C#&O8!vfr&cFEyCzRdgS2lElbRLLg+r-GA{IX}d UL9X*}peGqTUHx3vIVCg!03>^XlmGw# literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/tool/shears.png b/src/main/resources/assets/sextiarysector/textures/items/tool/shears.png new file mode 100644 index 0000000000000000000000000000000000000000..f9c6de19463346ff8bc618935e65d1620100b9e8 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`ZJsWUAr-fh6C}PUTsif?o@2LE z=6`kn&AlK0H#If=*A83rqyFowtN%r^)lLc2%yO*RbB{68ugr*5`_MAU6pf2)2aZfI zZH{TX%#bt7u|ebP4xR>AMaQ!W0umBG?w>sQ(!S_VGtZG{T09IzNxE@F?hQAxvX`j3lR*JiZ6QLSIR$iDJ?ukfuqR0<&yNwt7@p;jJmXD5@8%ER+0Ju6d zL^j)o>v}9am}AfL=<4o52tlc|jqmRvghXqN5Q1{KjO)4tL4W`dU<}x{MJAKw^uPe~ zbAQv>nFC;Ra|3|8q=9*g%KX6Kf9^teRN3pu2etZr+Kzw<^Y(TTjtEEmuO2_F<_uHO7F`= zD;>`pV-P}69Z@Me{5O@d@O{O->ABVx*mYe1me;m8d&c6GlRbEz-_U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qZ0p#TtJVYwj1WF#hl!uigD3Ie&`J zvINH&=*>VFhJ=+0`a%N;)0yJd^|gPM@rU;)KYoIHW3<&Z1_yJ!8Hl2gFbauJt@c~0 zTaB-M@G0}Trw#I%{(>-y6e@}^4Q}@W(aHG7*`1^?JWD0iS~t=DY{u)rt9Kn79GtHd zYg0eGuxfv^uxj@-{!wP9>0D#BbPB@G0J<=jotb7~)kd4{#=F*wb2XzXbq)D{dm_eP zUSVW@maqP_+lv3A{BMag0=lJbCa6oAmhhr!C%}x(vXr>k5ExmRHWyUYo?BbUKAI&_^>e#xzwyfRXuG zzWaZ};=P-f+q}DVUDd#J3ua5eu^m#WRBr}s%fhlPpdMWL#ib@W`dL*Ot7pWLw%MU0 zfK)0)I+bR?4iFJ;PsAvlT%=9?(pHT-=C~w4Y%7_TbceyB4ZyW)SMfHs&?aE}u+nxQ z)~0RhiM44iIxP|m*usU(5SC^22H^W80DgbjyF{d7JlDl>oLZBLq7WTx5Rl{}8BT+M zD2kFSs&-ZtQ8@{Cb#xThI|7FLmbcbkZIxFa8_;?*aS=T3t(k&~oCC00000NkvXXu0jG} Ef~BwkcK`qY diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/attack_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/attack_unit.png index 2abc2323dad1ee003e2cdb36fbd7f90a236038ac..3a4033ac23c9135c7e1a5c69da5b71e64ffce8ec 100644 GIT binary patch delta 1089 zcmV-H1it&03WEudDlt+3P5?~4{)(jl000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2z_0u>sY#o{NCTPuG9=Sf6CR9M61m(6b*MHt3^v%7Y@!A@+GSR$6%B?>6!0OF7y zqy7P0kdShqqLoUd0^-&KJ-`8kka9&-h!6qCAkI`mqAEQAau1*!stQVQJ_S}Bx&B() zyWZt6UVHtuPI_o7G15r0J3IS4^S;mf&O5?&T^?ssc+5@n28MrOJTg;Q#T^ccuIM2E zaPh(gbbSKTY_PYRquFRMH9dt8f^xZnWi=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>h}MqOto+c%urxyi1jQ`H`=m1fi;ESODvNCPD~MIGJQE7W;DMt| zjDAf2$S}XZ{x$$Z2VMhRZOVpqA2NqnfR9(GEG}^S_U-m2@ZOX71k*&XxbL|+#33PWC3A#F{hGvGTHADdPj|_ivdUTAz!*61yO<8bo|8R>8nMbk+7&w8T z5Kt@@+XE;#hby?IsF@obYse3GNE_06PHN(E)3yUpEEef5cH@Eq6okEpj$)c-4NuO9 zkloDk4nzQ17p8)Nb4V^`hN`v)uyyMeO4GB1X+mZ8Dh|tQLI%K8>ulE>QB_j)ndyI^ zp+7WIGs*(@l{ev>YY(7OSB}t5?n$ep*vgS03NRlLrqFQD3 z3DuQ|hqi4aER}%G9rT3NDo^ivEPG##2*Xm{dsP+heU@3B&{MvjO`H3fy>^Y8f6w6) zpNDX*v?oL>5!<(K2Vi-5WuyPx`)?WezX$LSCq1%?k3M}000000NkvXXu0mjf5IaMC diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/attack_unit2.png b/src/main/resources/assets/sextiarysector/textures/items/unit/attack_unit2.png new file mode 100644 index 0000000000000000000000000000000000000000..19eaada84dafcf0198ccab278a30af23bdb1ddb7 GIT binary patch literal 1071 zcmV+~1kn45P)WFU8GbZ8()Nlj2>E@cM*00WarL_t(o!|hkkYU4&2 z|IJ9X6(h1`DGl^sawwGEmLB#A`Vgg;y+kIG^A^4AWiJ6qLCOp4Z4dhprMIxR(m=ax zoNd@r*EV)6jpplNGV+WiM_VYlv;)JZ`DQ--zW*8l|MkK2!_z}X4+;F!ufzbrHJLxY z+UW3M3M_Ad&mRMvsdZ5ToC88AI-LWvh2jH>CneDP1n>vIH(vuk|EBh&VcxgTHqZPa ztTn+GOMB046Zro5cbH5jn9XL`-``h)iv^0J0OuT1N)$x_Aq1AoC4>-QOhuE3;JPk6 z&qJ@*gX_BReIKjU3NL?n)4;M6_%Ky;GMQjF9D;KW&N+w(RaJqAY7jj&pD|YR7-Mi8 z2b^;_j)SVIaCv#zu)d*yJ}{k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.png b/src/main/resources/assets/sextiarysector/textures/items/unit/craft_unit.png index d4cb5c591657be95cd7ede1375b32741ab9475a7..49d1defa6f7fe07cc71e22b0a05d2636eeff726e 100644 GIT binary patch delta 1505 zcmV<71s?j<4xkK>Dlt+3P5?~4{)(jl000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2z_0umH6JXzzvq9D{LaJ79#*Va@taW* z&rLEtr$rwCfIGKt#dRHgKjc{LC{Y+vu9Oi%&}_Dd;|L)nX__L0!1FwO-zP~D1b_go z!88p923#&(y_(6RM<|sB0hphk17QCrlYc-7vf=w7e;XUac3q~Yrx_g`#WYQ3W@czK z8rZf?6h(NRhcpO+2GvM@~(*LCrIpFMl_@Z-$X(f|VA2cTA~v0=jo z)~s2B=Xr~lkdzpP(f3X%l|LJXfo1@YVmn&%sEc&zu9Gp`3J8fiX!fL@~vDp+qNMQOB+!f$3#&?qtPIWqI_3UN*;Rg zL$+^PO*4NCsJEIl!+`mAn?wq{IHDN_G{b=Hn=WD7GrJK&^lb*9QYllZlow|pj-zfR z_{4FX)BDgr-{&v$NtjPKe_q zHy3~~Qari&a#WHaq~NA?%h_`A5UEPJef=u#-nf4bfa_OQx#J&~axndz_&c+8a zDRPaKLI{DTlR!g%S=OPyQKMG-fuZv%2*=`NJA#=X(OQ$Lv@c$E;GH;e;+Fw9H3_ql zL&JaeeMcC_3{?l&d#pwD?JNTYmyc_6q(O{ZDj*G+=TC1O)3nYGKu>9O1DM=$^@TLU zfL(uIPILSERRFyF=^<`ezmfrI@ah)}K3^`meVh1I$8piML2KG`9*IhNc(uM@#Tm#-ueS`_L7W?kJ6Hs*DG#{VhDphG z7+g6*b-G1z(t|=Vx801zOajMo&YXm&I#)KvcOB&6YgZ!>ymMq8e_{r=ROFTa9`1k8 zXh_~YJdZv+2fDNC@wdOG-90Z%)1+FhVoSL+fW>;Ur?+k7f#=_4{Kj<{hS7K8DWxzC z6OBen1H+I!@zz0}-L{df<8S0=MY&ui34^6`Kx^Gc8-U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01hnFE$XHNj)#y)USs^K@hx;PHcipN4?wcHVto3Ftr*hT(Vsfl{bI0qsuud`}0h ztptB#yCE;*^<#)A>6;w}0tmy9>2R8}a3pGS#lw?2xl}$@-z+lk_ zU~%zX;{8LMPdGYj^<8K?-#7KNoiB<`PYI?1;ZA8DrPO!;jYboI-%jQ*woM#GXstVs zlrbr;?La`Xk8C(i5{xlf7v-e1hSp`mdrMnOL~#vRm|!MswfN-zhuQb5geZzT>~+pz ztp%Uebf)wc^9yftcyvVdY4xm002ovPDHLkV1nPK^-KT& diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/defense_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/defense_unit.png index cc98c91623e771ebabaf02cad5305f5957087bb2..d0de360178b0f6d40b7ac60bfa9f1fe6ce1c7152 100644 GIT binary patch delta 1060 zcmV+<1l#-73FioqDlt+3P5?~4{)(jl000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2z_0uwKrEP;ZNTPuG9%Sl8*R9M61m(On-MHI(Bv!319!Obs{O2h{YLWmryUUDX= zxpG1DMg>Y$DQEr&E?jc11c~Hws8G0qgp@!IrHDpCs5cHJNt+mwP2~F5+TQUlhw*xM z&{krkk!E*i=lh-azVqH2;rl)>vl+bPCWAq-SbSloa4UcN99Dc0BLMK(ty|=B zV>nKmrw4m<+HEE#ClEqVtJQJc4ni1so`(>EMx%k_I4GqM00Mj;q|A`b=6G*mf&IO| z$mg#B@celNfM0j^UqKfH&2iei|IQa|+wkNRrl&z>px%ULO^;OA@ZV+ctdo0gUIs5a9V5M5%CY$JInSE_j{>^}O(V zc1)8U&uOCH{s7J>3$z?P<JZgbc`J;_tfMaIC*cwjL^e`5g*x{*z81 zo67+(ZR*{0RR`5g29NGG+M@Gi2C`$?Y?cX`j2x{2A;f5c{nKmcspPF&F1UdR0WQ?7sf#(#?g z=Y5{k=2m}h!pcpSZ`|&Krs*PZ;pyq=<&u%=hCiQdYyz-5yU6bBVjuWCcrXvbxDgPM z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lJ3IZS%g)Px!~Z>j{{RJ$UpCUA0|@{C002ovPDHLkV1jO89cKUl diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/gold_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/gold_unit.png new file mode 100644 index 0000000000000000000000000000000000000000..6f9e19ae3c0d3a911fbc551a762b9bb22a803fc9 GIT binary patch literal 934 zcmV;X16lluP) z08GCAilqPm010qNS#tmY3ljhU3ljkVnw%H_000McNliru-v$i=4jHTZcn1Ig03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00Rn1L_t(o!{wLFZqq;% zg}<>K$1Z7_gtijRf`AaBE8YO{0Bl%OiKk)1Gw=kw01^@vYyh!g&!Y5S5H(erKgagO zW-)Q>q)zMz(N^M0ktX(x&zXDgnR`csVaRow#x!*Vo7=p+g$K}a`SL~j_UJI&KFm&h*V9-@#If70P1`hl>1J9pHEDbhm z&^v#RS%3`-PMc8Oda;y(DmtOqftCo?+iYCk$nCR^}D|p6R>O>fNDYQ zW+Xl2C>=bx+oUDu8#-7; z@kf%N^E{Hr*4D~d1XR48VZ7_V0bE*!zOUld>rVs!OAX z`E1f9KOThnh(sRDOu{@CELpPVsb*;cQl^8?x_j#5Mt1&aS2(k*VUZ*qKcLS>_g z^reckh#MSd;81Ve2cX{{+`Oxqh@@Aqh%3FNMprZO-`|e^03rNq%tbpvX8-^I07*qo IM6N<$g8GY==>Px# literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/pickaxe_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/pickaxe_unit.png index ea74e0ed73467ef2bd36005b61b059e71ac11743..b5f6bc21b404a5ddf5f3c9b181b333887991c3c0 100644 GIT binary patch delta 1102 zcmV-U1hM;$3XlnqDlt+3P5?~4{)(jl000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2z_0udMyr$!HvTPuG9^hrcPR9M61mrrjSMHt3^v%CJY+tf+y2ANPPA*f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Yu0{JH1ag0ZA}vHwTn!*ivwTJ-A+@f^ zwEXgq>71LJ8+8CC*{5~*Y1Ye1@JWtgn%Yc^$!zUE<-CX%Z93;Z>ZSQf&{7gCaC&;W z8i2B*-_O2$%<7oQwVSh9E5cRQb<5$y2b5qLt&4)YiU?ZjMJ#p5LkLTQUx&5)SXVM| zaWMekq(6Vej1#Pzp8?k?kMr4{NmAZkj5s?xs|H}LEkv_o%vxshK_#+6CoH$&*}X6q zY?TJ3bv6e?!Fsz%dpc{D0tgiueuxG_2w3M45!PA_qPS)lEmQd_jcHNIWcvR|3vr}r zG#b?aw8&g3v?xNTcW$y|s^)$nj`hM4&j82~HXDC2twuzo1@8st16ow6#i}{uvCyz6 zRb=m6Sg4yB0Qc_Q1)#gu#QDJ9{+q&*6$8tFX;-qcQ#d7(tj!CitR2j1Xg_C<;Od zxY-OJ0L z8FhS+>&L7m@MWy)>+9wU)PN{kfi!_MQa>%NM7Yq)&PgAZV9Q>x@>AB&|EAH^5ohP;TwPuee5iPqWo!4ind9i_2!QEy jwyqtO_x}z5_W=F@#)hV^Q#h5(00000NkvXXu0mjf?(dg0 diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/silver_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/silver_unit.png new file mode 100644 index 0000000000000000000000000000000000000000..c62d05ffab83c3e13ad2c17345fcde237981ef90 GIT binary patch literal 962 zcmV;z13mnSP) z08GCAilqPm010qNS#tmY3ljhU3ljkVnw%H_000McNliru-v$i=4J$|hdPD#K03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00SmTL_t(o!{wLHZX!nz z#(&+@Jur(6*ojuMor8~A`voF#^<%7*XY+&j5Xpy}eDFPqVSz)CvtD4*%uIJr4lrY| zVZgECT`6^%ztvxTRbN-N$n%`9X_BvOs<=2kJ$*AOvWG5%hg_@x0QmXiN1~{PF$te~ zcce)|v(-ch!DKQe%Tk1pc<&KH5XUjb7_7Aj00DUpN(I#G5kG$TK=mUdS!;tIiYi@6E zkv^*iP>&)24h{}*&S8vMiE7z)c`l_a0R=&T6#4cV5JEh2woLtUgxdf~DUni^b%7Pt z0J3aO(Re&2P1Dlx@}ip}-^E(3<~9K7LJ6h>^O^-;EW<3bg%($6|1UwPwOeJDy~=3; zUa7hJqT$`&-|q%sIr67Px6I70Knezx(r@1lx1~?LG@7TjNtT87w*lD5K#@1^{flVd z#6ltKN(RQ`2>@|2Z#LH2a=-t#bUWvWtP;J_V zw=K2{z%UF;IkwwvLMf{O8pT0${1|mUFnNfY$xHt_HN$gkgxx zeKmk!L6O#aMM}kv_M&ln;j5SzwAQ#ZsRmHwY+nX68V!_ED5Y@D5d^_XZ+|*?RMmmj z8t?tuG_C+RK0X5AukjS`JvTQu&ql2zNuCWIMT*wR)q9WDnxms5y1)Nc4PY{P9KS9v zFG-SwcDqfjRx6!Nr_+_1P)cE~Wi%RLj47!Hn9XK5=Quw<=kV}w`$jZN<~gb_7Ifs; z*$mucQxV=#3j%}`?C&-B?)&%j2LopBA|kElQeLPzi|Uxa4O$2$pFfxWzp0~{DCBd} k7H@h=Eskd5e}6ju2Oc}l8C9i$;{X5v07*qoM6N<$f>RQxy8r+H literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/armor/ninja_layer_1.png b/src/main/resources/assets/sextiarysector/textures/models/armor/ninja_layer_1.png new file mode 100644 index 0000000000000000000000000000000000000000..bf074d5c0789e41dba34878ac32e8e0a54adf81c GIT binary patch literal 1698 zcmV;T23`4yP)i9K{tqx2n2(dS++6U<~HN1R-7{1P^&2f`DZ4AwbBma#kxZy8?kgit>Tu*xp%>cjv38tGnvv;ZE0>kYyv;>tRhv z`_NO}TYYbxI``bugl)$BY>Nj2kLekOJY$%M5GRB@V*tSKPwyk_;$gPCAxQ~G=NjSq z(;aoIv;n#uf9oe88+fcP zTCfMa2bdY&193!XPODo#0k`edh!a9tFvtS{Ax;1j5pIRCZ32cFW6CjHDF~>Za*olQ z`2irn=8Ow}AG3Y8<55cqQADsg@A?GLFCV+iwUh$E)u$9}E(~835@2KWn~4EM6iCoS z1n0&{(0Y8`+hi04BZ>&x0BM8ZN$lldBI|sG3pJ%PcJ-gBz`2iexKe&oqlBjoLZdnPN@C)K(7Gs4{P))$fBfjK zE#K<>H?y##TlE2_jxuxMYM9ZRB`pGv-oG zifH1^)Ja{W*&a*dNsfAxu-O)4CcXg)xbFY(;@mom!V`8ctL(d6cG-eNb&A#8RCR+{8{NWK0G}{o-q#1NpJDapE9rqjy@yvZ@e-Le`g;tBA4+bmgoK_W^)s4h>N?Ru^qZoO3cCMbel>(fCZ8 zNUXVD$BVb1<@(}z7x;%1@bzEI8&?Ik8*vTjUS-)~Ck99b@d^DBd~t4_tISv3nRAS*>mJ%j-8B(mYFdTtn`?H(4uSm#2w7it z#O92jJQ9apt=!}a@>NGzO9@FT_q(z>Ivfz7HDQ?TeA!h>iDPr%K@);M^i+!b9xyPP zu+jE7ax#T6z-C*5KXNj~j~+5;POE@`Jp11WAO&1oCabSX!%UuulTit)0kyiw+v>N< zs@qWnY_@&at+HTjw7sx#B0Hpw!e2hf5ho;Y)r8MKDNsuZCKdz?GqKLnxD$?mkD<5SA!4O+ZnUP+3o;4| zC@tvj2cad(GqE zYz?0-S+xG?vF~m@_V79)iz~&ol@xvH?K|nzu@*Zwg1G)}<71NE0L{;~*yapU;?n_Q sXI0+>v>8LPEEvf(-vmfu*BcxE0nrvkx%h5jcmMzZ07*qoM6N<$f?44b8~^|S literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/models/armor/ninja_layer_2.png b/src/main/resources/assets/sextiarysector/textures/models/armor/ninja_layer_2.png new file mode 100644 index 0000000000000000000000000000000000000000..bf84acbb4c6ac4e344f01bba030757f24cd8b9b2 GIT binary patch literal 853 zcmV-b1FHOqP)VGd000McNliru-vtl_3JR;VAIbm#0^&(T zK~!ko?U%8S8$}exe{W`X*BhT5`+OG^X!uu9h(v(|L849%{|OB(9TE*aEkz0tN+J*; zRYZXh0wE{HcRrubx3fDl6wls+q(V_nIVzLx&C>I&|pJp+kob z9XfRQzd@c~_~`v-$z_6dkY&OrUrc0|2{11(V&JWJdyMuCrzdge74QN9y;6AcQ%zn7 zWnXrl0QdYt?O`?z)E+`eyPpAfZ#_-Mz_o!e7#hx231gtH6QKcPAT;2sgx%0pltO>c zP}hl1zdX3oGI4v?h0(sjT46Q~h=I|*1yl*4fy0}Y^L1i*teG&{H^c~w`PEm5Y5Ya_ zh34Ykm0_#XQyI2QvO+SOdm$uNr?G9l-+xmf zqAEyHExFyh)KU1qV(+?2-B+3!W-UCpS5fwba?>SZRBNTEL|6xT&oG|o!1ef{ZwcJy zPnKWKDE`s}oGlaMiI5jCo>)RiZRhy)=Z3rx4qrE&%9b literal 0 HcmV?d00001 From c462149dd3971c73e894b4ab092695e74fd32405 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 18 Jul 2015 22:46:46 +0900 Subject: [PATCH 80/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E3=83=86?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E3=83=81=E3=83=A3=E3=81=A8=E3=81=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- .../java/shift/sextiarysector/SSFluids.java | 38 +- .../shift/sextiarysector/SSGuiHandler.java | 10 + .../java/shift/sextiarysector/SSItems.java | 47 +- .../shift/sextiarysector/SSOreDictionary.java | 22 +- .../java/shift/sextiarysector/SSRecipes.java | 4 +- .../shift/sextiarysector/SextiarySector.java | 6 +- .../api/equipment/EquipmentType.java | 47 +- .../block/BlockShippingBox.java | 30 +- .../container/ContainerPlayerNext.java | 501 +++++++++------- .../container/ContainerShippingBox.java | 95 +++ .../container/InventoryPlayerNext.java | 12 +- .../container/InventoryShippingBox.java | 92 +++ .../event/ClientEventHandler.java | 375 ++++++++++++ .../event/PlayerUnitEventHandler.java | 52 +- .../sextiarysector/fluid/FluidColor.java | 2 + .../sextiarysector/gui/GuiShippingBox.java | 67 +++ .../shift/sextiarysector/item/ItemKnife.java | 22 +- .../sextiarysector/module/ModuleFishing.java | 44 ++ .../module/ModuleVanillaRecipe.java | 556 ++++++++++++++++++ .../player/CustomPlayerData.java | 18 + .../player/EntityPlayerManager.java | 13 + .../player/ShippingBoxStats.java | 70 +++ .../sextiarysector/recipe/RecipesCore.java | 15 +- .../sextiarysector/recipe/RecipesLoom.java | 2 +- .../sextiarysector/recipe/RecipesMachine.java | 26 +- .../recipe/RecipesSpinningMachine.java | 5 +- .../sextiarysector/recipe/RecipesTool.java | 4 +- .../sextiarysector/recipe/RecipesVanilla.java | 4 +- .../renderer/entity/ModelDecoration.java | 73 +++ .../assets/sextiarysector/lang/en_US.lang | 17 +- .../assets/sextiarysector/lang/ja_JP.lang | 13 +- .../textures/guis/shipping_box.png | Bin 1328 -> 1238 bytes .../items/gui/slot_decoration_boots.png | Bin 0 -> 111 bytes .../items/gui/slot_decoration_helmet.png | Bin 0 -> 110 bytes .../items/gui/slot_decoration_legs.png | Bin 0 -> 102 bytes .../items/gui/slot_decoration_plate.png | Bin 0 -> 112 bytes .../textures/items/loom/silk_bobbin.png | Bin 0 -> 273 bytes .../textures/items/loom/silk_cloth.png | Bin 0 -> 337 bytes .../textures/items/nugget/ninja_nugget.png | Bin 0 -> 272 bytes .../textures/items/nugget/silver_nugget.png | Bin 0 -> 272 bytes .../textures/items/nugget/steel_nugget.png | Bin 0 -> 270 bytes .../textures/items/nugget/zinc_nugget.png | Bin 0 -> 272 bytes .../textures/items/object_reactor.png | Bin 296 -> 0 bytes .../textures/items/reactor/craft_reactor.png | Bin 0 -> 973 bytes .../craft_reactor.png.mcmeta} | 0 .../items/{ => reactor}/energy_reactor.png | Bin .../items/reactor/energy_reactor.png.mcmeta | 5 + .../textures/items/reactor/object_reactor.png | Bin 0 -> 1007 bytes .../items/reactor/object_reactor.png.mcmeta | 5 + .../textures/items/unit/debug_unit.png | Bin 0 -> 984 bytes .../textures/items/unit/jump_unit.png | Bin 0 -> 1090 bytes 52 files changed, 2002 insertions(+), 292 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/container/ContainerShippingBox.java create mode 100644 src/main/java/shift/sextiarysector/container/InventoryShippingBox.java create mode 100644 src/main/java/shift/sextiarysector/gui/GuiShippingBox.java create mode 100644 src/main/java/shift/sextiarysector/module/ModuleFishing.java create mode 100644 src/main/java/shift/sextiarysector/module/ModuleVanillaRecipe.java create mode 100644 src/main/java/shift/sextiarysector/player/ShippingBoxStats.java create mode 100644 src/main/java/shift/sextiarysector/renderer/entity/ModelDecoration.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_decoration_boots.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_decoration_helmet.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_decoration_legs.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gui/slot_decoration_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/silk_bobbin.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/loom/silk_cloth.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/nugget/ninja_nugget.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/nugget/silver_nugget.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/nugget/steel_nugget.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/nugget/zinc_nugget.png delete mode 100644 src/main/resources/assets/sextiarysector/textures/items/object_reactor.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/reactor/craft_reactor.png rename src/main/resources/assets/sextiarysector/textures/items/{energy_reactor.png.mcmeta => reactor/craft_reactor.png.mcmeta} (100%) rename src/main/resources/assets/sextiarysector/textures/items/{ => reactor}/energy_reactor.png (100%) create mode 100644 src/main/resources/assets/sextiarysector/textures/items/reactor/energy_reactor.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/items/reactor/object_reactor.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/reactor/object_reactor.png.mcmeta create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/debug_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/jump_unit.png diff --git a/build.gradle b/build.gradle index 66b2618..8b24c66 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.3.0.b-${project.minecraft.version}" +version = "2.4.0.d-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index bee1aee..f0a3fce 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -37,24 +37,24 @@ public class SSFluids { public static void initFluids() { - takumiTea = new SSFluid("TakumiTea", 0, 0x006400, 5, 2.0f).setUnlocalizedName("takumi_tea"); - drinkingWater = new SSFluid("DrinkingWater", 0, 0x87CEFA, 4, 1.0f).setUnlocalizedName("drinking_water"); - springWater = new SSFluid("SpringWater", 0, 0x87CEFA, 4, 1.0f).setUnlocalizedName("spring_water"); - hotSprings = new SSFluid("HotSprings", 0, 0xFFFFFF, 4, 1.0f).setUnlocalizedName("hot_springs"); - - steam = new SSFluid("Steam", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("steam").setGaseous(true); - mana = new SSFluid("Mana", 1, 0x7CF4E4, 1, 1.0f).setUnlocalizedName("mana").setGaseous(true); - oxygen = new SSFluid("Oxygen", 0, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("oxygen").setGaseous(true); + takumiTea = registerFluid("TakumiTea", 0, 0x006400, 5, 2.0f).setUnlocalizedName("takumi_tea"); + drinkingWater = registerFluid("DrinkingWater", 0, 0x87CEFA, 4, 1.0f).setUnlocalizedName("drinking_water"); + springWater = registerFluid("SpringWater", 0, 0x87CEFA, 4, 1.0f).setUnlocalizedName("spring_water"); + hotSprings = registerFluid("HotSprings", 0, 0xFFFFFF, 4, 1.0f).setUnlocalizedName("hot_springs"); + + steam = registerFluid("Steam", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("steam").setGaseous(true); + mana = registerFluid("Mana", 1, 0x7CF4E4, 1, 1.0f).setUnlocalizedName("mana").setGaseous(true); + oxygen = registerFluid("Oxygen", 0, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("oxygen").setGaseous(true); //season = new SSFluid("season", 1, 0xFFFFFF, 1, 1.0f).setUnlocalizedName("season").setDensity(-10).setGaseous(true); - sap = new SSFluid("Sap", 2, 0xFF7F50, 1, 1.0f).setUnlocalizedName("sap"); + sap = registerFluid("Sap", 2, 0xFF7F50, 1, 1.0f).setUnlocalizedName("sap"); - iron = new SSFluid("Iron", 2, 0xFF1493, 1, 1.0f).setUnlocalizedName("iron"); - gold = new SSFluid("Gold", 2, 0xFFD700, 1, 1.0f).setUnlocalizedName("gold"); + iron = registerFluid("Iron", 2, 0xFF1493, 1, 1.0f).setUnlocalizedName("iron"); + gold = registerFluid("Gold", 2, 0xFFD700, 1, 1.0f).setUnlocalizedName("gold"); color = new Fluid[16]; for (int i = 0; i < color.length; i++) { - color[i] = new FluidColor(EnumColor.getColor(i).name(), EnumColor.getColor(i)).setUnlocalizedName(EnumColor.getColor(i).name().toLowerCase(Locale.ENGLISH)); + color[i] = new FluidColor("ss_" + EnumColor.getColor(i).name(), EnumColor.getColor(i)).setUnlocalizedName(EnumColor.getColor(i).name().toLowerCase(Locale.ENGLISH)); } } @@ -85,6 +85,19 @@ public static void postFluids() { } + public static Fluid registerFluid(String fluidName, int type, int color, int moisture, float moistureSaturation) { + + Fluid f = new SSFluid(fluidName, type, color, moisture, moistureSaturation); + boolean t = FluidRegistry.registerFluid(f); + + if (!t) { + f = FluidRegistry.getFluid(fluidName); + } + + return f; + + } + public static class SSFluid extends Fluid { private final int type; @@ -99,7 +112,6 @@ public SSFluid(String fluidName, int type, int color, int moisture, float moistu this.color = color; this.moisture = moisture; this.moistureSaturation = moistureSaturation; - FluidRegistry.registerFluid(this); } @Override diff --git a/src/main/java/shift/sextiarysector/SSGuiHandler.java b/src/main/java/shift/sextiarysector/SSGuiHandler.java index b7d927f..dbc610a 100644 --- a/src/main/java/shift/sextiarysector/SSGuiHandler.java +++ b/src/main/java/shift/sextiarysector/SSGuiHandler.java @@ -15,6 +15,7 @@ import shift.sextiarysector.container.ContainerMagicFurnace; import shift.sextiarysector.container.ContainerPlayerNext; import shift.sextiarysector.container.ContainerRucksack; +import shift.sextiarysector.container.ContainerShippingBox; import shift.sextiarysector.container.ContainerSimpleMachine; import shift.sextiarysector.container.ContainerSteamMotor; import shift.sextiarysector.container.ContainerTabWorkbench; @@ -36,6 +37,7 @@ import shift.sextiarysector.gui.GuiRollingMachine; import shift.sextiarysector.gui.GuiRucksack; import shift.sextiarysector.gui.GuiSawmill; +import shift.sextiarysector.gui.GuiShippingBox; import shift.sextiarysector.gui.GuiSpinningMachine; import shift.sextiarysector.gui.GuiSteamMotor; import shift.sextiarysector.gui.GuiTabCrafting; @@ -123,6 +125,11 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world, int case 206: return new ContainerRucksack(player.inventory, EntityPlayerManager.getEquipmentStats(player).inventory); + case 210: + return new ContainerShippingBox(player.inventory, player); + case 211: + return new ContainerRucksack(player.inventory, EntityPlayerManager.getEquipmentStats(player).inventory); + } /* @@ -228,6 +235,9 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int case 206: return new GuiRucksack(player.inventory, EntityPlayerManager.getEquipmentStats(player).inventory); + case 210: + return new GuiShippingBox(player); + } /* diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index af75eda..c7ee7ba 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -96,6 +96,11 @@ public class SSItems { public static Item ironNugget; public static Item copperNugget; + public static Item zincNugget; + public static Item silverNugget; + + public static Item steelNugget; + public static Item ninjaNugget; public static Item steelIngot; public static Item brassIngot; @@ -116,6 +121,7 @@ public class SSItems { public static Item blueGel; public static Item yellowGel; + public static Item craftReactor; public static Item energyReactor; public static Item objectReactor; @@ -133,9 +139,9 @@ public class SSItems { public static Item magicDust; //布 - public static Item stringBobbin; + public static Item silkBobbin; public static Item smallCloth; - public static Item cloth; + public static Item silkCloth; public static Item canvas; public static Item dryingFlesh; public static Item fleshBobbin; @@ -283,8 +289,12 @@ public class SSItems { public static Item attackRustUnit; public static Item defenseRustUnit; + public static Item jumpUnit; + public static Item pickaxeUnit; + public static Item debugUnit; + //リング public static Item ironRing; public static Item creeperRing; @@ -395,6 +405,18 @@ public static void initItems() { copperNugget = new Item().setUnlocalizedName("ss.copper_nugget").setTextureName("sextiarysector:nugget/copper_nugget").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(copperNugget, "CopperNugget"); + zincNugget = new Item().setUnlocalizedName("ss.zinc_nugget").setTextureName("sextiarysector:nugget/zinc_nugget").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(zincNugget, "ZincNugget"); + + silverNugget = new Item().setUnlocalizedName("ss.silver_nugget").setTextureName("sextiarysector:nugget/silver_nugget").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(silverNugget, "SilverNugget"); + + steelNugget = new Item().setUnlocalizedName("ss.steel_nugget").setTextureName("sextiarysector:nugget/steel_nugget").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(steelNugget, "SteelNugget"); + + ninjaNugget = new Item().setUnlocalizedName("ss.ninja_nugget").setTextureName("sextiarysector:nugget/ninja_nugget").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(ninjaNugget, "NinjaNugget"); + //インゴット steelIngot = new Item().setUnlocalizedName("ss.steel_ingot").setTextureName("sextiarysector:ingot/steel_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(steelIngot, "SteelIngot"); @@ -435,10 +457,13 @@ public static void initItems() { yellowGel = new Item().setUnlocalizedName("ss.yellow_gel").setTextureName("sextiarysector:gel/yellow_gel").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(yellowGel, "YellowGel"); - energyReactor = new Item().setUnlocalizedName("ss.energy_reactor").setTextureName("sextiarysector:energy_reactor").setCreativeTab(SextiarySectorAPI.TabSSCore); + craftReactor = new Item().setUnlocalizedName("ss.craft_reactor").setTextureName("sextiarysector:reactor/craft_reactor").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(craftReactor, "CraftReactor"); + + energyReactor = new Item().setUnlocalizedName("ss.energy_reactor").setTextureName("sextiarysector:reactor/energy_reactor").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(energyReactor, "EnergyReactor"); - objectReactor = new Item().setUnlocalizedName("ss.object_reactor").setTextureName("sextiarysector:object_reactor").setCreativeTab(SextiarySectorAPI.TabSSCore); + objectReactor = new Item().setUnlocalizedName("ss.object_reactor").setTextureName("sextiarysector:reactor/object_reactor").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(objectReactor, "ObjectReactor"); //液体 @@ -470,14 +495,14 @@ public static void initItems() { GameRegistry.registerItem(magicDust, "MagicDust"); //布 - stringBobbin = new Item().setUnlocalizedName("ss.string_bobbin").setTextureName("sextiarysector:loom/string_bobbin").setCreativeTab(SextiarySectorAPI.TabSSCore); - GameRegistry.registerItem(stringBobbin, "StringBobbin"); + silkBobbin = new Item().setUnlocalizedName("ss.silk_bobbin").setTextureName("sextiarysector:loom/silk_bobbin").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(silkBobbin, "SilkBobbin"); smallCloth = new Item().setUnlocalizedName("ss.small_cloth").setTextureName("sextiarysector:loom/small_cloth").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(smallCloth, "SmallCloth"); - cloth = new Item().setUnlocalizedName("ss.cloth").setTextureName("sextiarysector:loom/cloth").setCreativeTab(SextiarySectorAPI.TabSSCore); - GameRegistry.registerItem(cloth, "Cloth"); + silkCloth = new Item().setUnlocalizedName("ss.silk_cloth").setTextureName("sextiarysector:loom/silk_cloth").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(silkCloth, "silkCloth"); canvas = new Item().setUnlocalizedName("ss.canvas").setTextureName("sextiarysector:loom/canvas").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(canvas, "Canvas"); @@ -740,9 +765,15 @@ public static void initItems() { defenseRustUnit = new ItemUnit().setUnlocalizedName("ss.defense_rust_unit").setTextureName("sextiarysector:unit/defense_rust_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(defenseRustUnit, "DefenseRustUnit"); + jumpUnit = new ItemUnit().setUnlocalizedName("ss.jump_unit").setTextureName("sextiarysector:unit/jump_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(jumpUnit, "JumpUnit"); + pickaxeUnit = new ItemUnit().setUnlocalizedName("ss.pickaxe_unit").setTextureName("sextiarysector:unit/pickaxe_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(pickaxeUnit, "PickaxeUnit"); + debugUnit = new ItemUnit().setUnlocalizedName("ss.debug_unit").setTextureName("sextiarysector:unit/debug_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + GameRegistry.registerItem(debugUnit, "DebugUnit"); + //Ring ironRing = new Item().setUnlocalizedName("ss.iron_ring").setTextureName("sextiarysector:ring/iron_ring").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(ironRing, "IronRing"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index 47a7b7b..b3cd4b3 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -35,7 +35,7 @@ public static void init() { OreDictionary.registerOre("craftingString", new ItemStack(Items.string, 1, 0)); for (int i = 0; i < 16; i++) { - OreDictionary.registerOre("craftingSmallCloth", new ItemStack(Blocks.wool, 1, i)); + OreDictionary.registerOre("blockWool", new ItemStack(Blocks.wool, 1, i)); } OreDictionary.registerOre("fluidWater", Items.water_bucket); @@ -81,6 +81,11 @@ public static void init() { OreDictionary.registerOre("nuggetIron", SSItems.ironNugget); OreDictionary.registerOre("nuggetCopper", SSItems.copperNugget); + OreDictionary.registerOre("nuggetZinc", SSItems.zincNugget); + OreDictionary.registerOre("nuggetSilver", SSItems.silverNugget); + + OreDictionary.registerOre("nuggetSteel", SSItems.steelNugget); + OreDictionary.registerOre("nuggetNinja", SSItems.ninjaNugget); OreDictionary.registerOre("ingotSteel", SSItems.steelIngot); OreDictionary.registerOre("ingotBrass", SSItems.brassIngot); @@ -118,12 +123,17 @@ public static void init() { OreDictionary.registerOre("ringIron", SSItems.ironRing); - OreDictionary.registerOre("craftingSmallCloth", SSItems.cloth); - OreDictionary.registerOre("craftingCloth", SSItems.cloth); - OreDictionary.registerOre("craftingFilterCloth", SSItems.cloth); + //布 + OreDictionary.registerOre("massString", SSItems.stringMass); + OreDictionary.registerOre("blockWool", SSItems.stringMass); + + OreDictionary.registerOre("clothSilk", SSItems.silkCloth); + OreDictionary.registerOre("itemCloth", SSItems.silkCloth); + OreDictionary.registerOre("blockWool", SSItems.silkCloth); + //OreDictionary.registerOre("craftingFilterCloth", SSItems.silkCloth); - OreDictionary.registerOre("craftingSmallCloth", SSItems.smallCloth); - OreDictionary.registerOre("craftingFilterCloth", SSItems.smallCloth); + //OreDictionary.registerOre("craftingSmallCloth", SSItems.smallCloth); + //OreDictionary.registerOre("craftingFilterCloth", SSItems.smallCloth); //液体 OreDictionary.registerOre("fluidIron", new ItemStack(SSBlocks.fluidCrafter, 1, SSFluids.iron.getID())); diff --git a/src/main/java/shift/sextiarysector/SSRecipes.java b/src/main/java/shift/sextiarysector/SSRecipes.java index d0bf12a..7c3dd99 100644 --- a/src/main/java/shift/sextiarysector/SSRecipes.java +++ b/src/main/java/shift/sextiarysector/SSRecipes.java @@ -5,6 +5,7 @@ import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.ShapedRecipes; +import net.minecraft.item.crafting.ShapelessRecipes; import shift.sextiarysector.api.recipe.RecipeAPI; import shift.sextiarysector.recipe.FurnaceCraftingManager; import shift.sextiarysector.recipe.RecipeSimpleFluid; @@ -131,7 +132,7 @@ public static void deleteVanillaRecipe() { for (int i = 0; i < m.getRecipeList().size(); i++) { IRecipe re = (IRecipe) m.getRecipeList().get(i); - if (re != null && re.getRecipeOutput() != null && re.getRecipeOutput().isItemEqual(wool) && re instanceof ShapedRecipes) { + if (re != null && re.getRecipeOutput() != null && re.getRecipeOutput().isItemEqual(wool) && re instanceof ShapedRecipes && !(re instanceof ShapelessRecipes)) { m.getRecipeList().remove(i); return; } @@ -139,5 +140,4 @@ public static void deleteVanillaRecipe() { } } - } diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 298ec69..0c90277 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -14,12 +14,14 @@ import shift.sextiarysector.module.ModuleChest; import shift.sextiarysector.module.ModuleChunkLoader; import shift.sextiarysector.module.ModuleFigure; +import shift.sextiarysector.module.ModuleFishing; import shift.sextiarysector.module.ModuleHotSprings; import shift.sextiarysector.module.ModuleSandpit; import shift.sextiarysector.module.ModuleSeason; import shift.sextiarysector.module.ModuleStatistics; import shift.sextiarysector.module.ModuleToolMaterial; import shift.sextiarysector.module.ModuleTrap; +import shift.sextiarysector.module.ModuleVanillaRecipe; import shift.sextiarysector.packet.SSPacketHandler; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.plugin.SSPlugins; @@ -36,7 +38,7 @@ public class SextiarySector { public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.3.0"; + public static final String VERSION = "2.4.0"; @Mod.Instance("SextiarySector") public static SextiarySector instance; @@ -77,6 +79,8 @@ public void preInit(FMLPreInitializationEvent event) modules.add(ModuleHotSprings.getInstance()); modules.add(ModuleFigure.getInstance()); modules.add(ModuleToolMaterial.getInstance()); + modules.add(ModuleVanillaRecipe.getInstance()); + modules.add(ModuleFishing.getInstance()); for (IModule m : modules) { m.preInit(event); diff --git a/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java b/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java index 433d1e7..65e1827 100644 --- a/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java +++ b/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java @@ -5,14 +5,18 @@ public enum EquipmentType { - Necklace("necklace", new int[] { 0 }), - Ring("ring", new int[] { 1, 2, 3 }), - Face("face", new int[] { 4 }), - Bag("bag", new int[] { 5 }), - Hand("hand", new int[] { 6 }), - Belt("belt", new int[] { 7 }), - Unit("unit", new int[] { 8, 9, 10, 11, 12, 13, 14, 15 }), - Other("other", new int[] { 16, 17, 18, 19 }); + DecorationHelmet("decoration_helmet", new int[] { 0 }), + DecorationPlate("decoration_plate", new int[] { 1 }), + DecorationLegs("decoration_legs", new int[] { 2 }), + DecorationBoots("decoration_boots", new int[] { 3 }), + Necklace("necklace", new int[] { 4 }), + Ring("ring", new int[] { 5, 6, 7 }), + Face("face", new int[] { 8 }), + Bag("bag", new int[] { 9 }), + Hand("hand", new int[] { 10 }), + Belt("belt", new int[] { 11 }), + Unit("unit", new int[] { 12, 13, 14, 15, 16, 17, 18, 19 }); + //Other("other", new int[] { 16, 17, 18, 19 }); private IIcon icon; private String iconName; @@ -46,34 +50,47 @@ public int getSlot(int id) { public static EquipmentType getEquipmentTypeFromSlot(int slot) { switch (slot) { + case 0: - return Necklace; + return DecorationHelmet; case 1: + return DecorationPlate; + case 2: + return DecorationLegs; + case 3: - return Ring; + return DecorationBoots; case 4: - return Face; + return Necklace; + case 5: - return Bag; case 6: - return Hand; case 7: - return Belt; + return Ring; case 8: + return Face; case 9: + return Bag; case 10: + return Hand; case 11: + return Belt; + case 12: case 13: case 14: case 15: + case 16: + case 17: + case 18: + case 19: return Unit; } - return Other; + return Unit; } } diff --git a/src/main/java/shift/sextiarysector/block/BlockShippingBox.java b/src/main/java/shift/sextiarysector/block/BlockShippingBox.java index 04b20a6..da26c8f 100644 --- a/src/main/java/shift/sextiarysector/block/BlockShippingBox.java +++ b/src/main/java/shift/sextiarysector/block/BlockShippingBox.java @@ -1,22 +1,16 @@ package shift.sextiarysector.block; -import net.minecraft.block.BlockContainer; +import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChatComponentText; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import shift.mceconomy2.api.MCEconomyAPI; -import shift.sextiarysector.SSItems; -import shift.sextiarysector.tileentity.TileEntityShippingBox; +import shift.sextiarysector.SextiarySector; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockShippingBox extends BlockContainer { +public class BlockShippingBox extends Block {//extends BlockContainer { private IIcon top; @@ -29,6 +23,18 @@ public BlockShippingBox() { public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { + if (world.isRemote) + { + return true; + } + else + { + par5EntityPlayer.openGui(SextiarySector.instance, 210, world, x, y, z); + + return true; + } + + /* TileEntityShippingBox s = (TileEntityShippingBox) world.getTileEntity(x, y, z); ItemStack pItem = par5EntityPlayer.getCurrentEquippedItem(); @@ -89,6 +95,7 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p if (i == -1) { return false; } + */ /* MCEconomyAPI.addPlayerMP(par5EntityPlayer, i, false); @@ -96,11 +103,13 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p par5EntityPlayer.addStat(SSAchievement.shipping, 1); */ + /* s.setInventorySlotContents(0, pItem.copy()); pItem.stackSize = 0; //item.stackSize--; world.playSoundAtEntity(par5EntityPlayer, "game.neutral.hurt.fall.small", 1.0F, 1.0F); return true; + */ } @@ -122,9 +131,10 @@ public IIcon getIcon(int par1, int par2) return this.blockIcon; } + /* @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityShippingBox(); - } + }*/ } diff --git a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java index e2d8349..3129c2c 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java @@ -13,15 +13,14 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -public class ContainerPlayerNext extends Container { +public class ContainerPlayerNext extends Container { public InventoryPlayerNext equipment; private EntityPlayer player; - public ContainerPlayerNext(InventoryPlayer par1InventoryPlayer,EntityPlayer p_i1819_3_) - { - //this.equipment = par2TileEntityFurnace; + public ContainerPlayerNext(InventoryPlayer par1InventoryPlayer, EntityPlayer p_i1819_3_) + { + //this.equipment = par2TileEntityFurnace; this.player = p_i1819_3_; this.equipment = EntityPlayerManager.getEquipmentStats(p_i1819_3_).inventory; @@ -36,92 +35,181 @@ public ContainerPlayerNext(InventoryPlayer par1InventoryPlayer,EntityPlayer p_i1 }*/ - //バニラ - int i; + int i; - //0 + //0 for (i = 0; i < 4; ++i) - { - final int k = i; - this.addSlotToContainer(new Slot(par1InventoryPlayer, par1InventoryPlayer.getSizeInventory() - 1 - i, 8, 8 + i * 18) - { - private static final String __OBFID = "CL_00001755"; - /** - * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 - * in the case of armor slots) - */ - public int getSlotStackLimit() - { - return 1; - } - /** - * Check if the stack is a valid item for this slot. Always true beside for the armor slots. - */ - public boolean isItemValid(ItemStack p_75214_1_) - { - if (p_75214_1_ == null) return false; - return p_75214_1_.getItem().isValidArmor(p_75214_1_, k, player); - } - /** - * Returns the icon index on items.png that is used as background image of the slot. - */ - @SideOnly(Side.CLIENT) - public IIcon getBackgroundIconIndex() - { - return ItemArmor.func_94602_b(k); - } - }); - } + { + final int k = i; + this.addSlotToContainer(new Slot(par1InventoryPlayer, par1InventoryPlayer.getSizeInventory() - 1 - i, 8, 8 + i * 18) + { + private static final String __OBFID = "CL_00001755"; + + /** + * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 + * in the case of armor slots) + */ + @Override + public int getSlotStackLimit() + { + return 1; + } + + /** + * Check if the stack is a valid item for this slot. Always true beside for the armor slots. + */ + @Override + public boolean isItemValid(ItemStack p_75214_1_) + { + if (p_75214_1_ == null) return false; + return p_75214_1_.getItem().isValidArmor(p_75214_1_, k, player); + } + + /** + * Returns the icon index on items.png that is used as background image of the slot. + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getBackgroundIconIndex() + { + return ItemArmor.func_94602_b(k); + } + }); + } //4 for (i = 0; i < 9; ++i) - { - this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142)); - } + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142)); + } //13 - for (i = 0; i < 3; ++i) - { - for (int j = 0; j < 9; ++j) - { - this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + //40 + + this.addSlotToContainer(new SlotEquipment(EquipmentType.DecorationHelmet, this.equipment, 0, 80 + 0 * 18, 8 + 0 * 18) { + + @Override + public int getSlotStackLimit() + { + return 1; + } + + @Override + public boolean isItemValid(ItemStack p_75214_1_) + { + if (p_75214_1_ == null) return false; + return p_75214_1_.getItem().isValidArmor(p_75214_1_, 0, player); + } + + @Override + public boolean canTakeStack(EntityPlayer player) { + return true; + } + + }); + + this.addSlotToContainer(new SlotEquipment(EquipmentType.DecorationPlate, this.equipment, 1, 80 + 0 * 18, 8 + 1 * 18) { + + @Override + public int getSlotStackLimit() + { + return 1; + } + + @Override + public boolean isItemValid(ItemStack p_75214_1_) + { + if (p_75214_1_ == null) return false; + return p_75214_1_.getItem().isValidArmor(p_75214_1_, 1, player); + } + @Override + public boolean canTakeStack(EntityPlayer player) { + return true; + } - //40 + }); + this.addSlotToContainer(new SlotEquipment(EquipmentType.DecorationLegs, this.equipment, 2, 80 + 0 * 18, 8 + 2 * 18) { - this.addSlotToContainer(new SlotEquipment(EquipmentType.Necklace, this.equipment, 0, 80 + 0 * 18, 8 + 0 * 18)); - //this.addSlotToContainer(new Slot(this.equipment,0, 80 + 0 * 18, 8 + 0 * 18)); + @Override + public int getSlotStackLimit() + { + return 1; + } - this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 1, 80 + 0 * 18, 8 + 1 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 2, 80 + 0 * 18, 8 + 2 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 3, 80 + 0 * 18, 8 + 3 * 18)); + @Override + public boolean isItemValid(ItemStack p_75214_1_) + { + if (p_75214_1_ == null) return false; + return p_75214_1_.getItem().isValidArmor(p_75214_1_, 2, player); + } - this.addSlotToContainer(new SlotEquipment(EquipmentType.Face, this.equipment, 4, 80 + 1 * 18, 8 + 0 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Bag, this.equipment, 5, 80 + 1 * 18, 8 + 1 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Hand, this.equipment, 6, 80 + 1 * 18, 8 + 2 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Belt, this.equipment, 7, 80 + 1 * 18, 8 + 3 * 18)); + @Override + public boolean canTakeStack(EntityPlayer player) { + return true; + } - this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 8, 80 + 2 * 18, 8 + 0 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 9, 80 + 2 * 18, 8 + 1 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 10, 80 + 2 * 18, 8 + 2 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 11, 80 + 2 * 18, 8 + 3 * 18)); + }); + this.addSlotToContainer(new SlotEquipment(EquipmentType.DecorationBoots, this.equipment, 3, 80 + 0 * 18, 8 + 3 * 18) { + + @Override + public int getSlotStackLimit() + { + return 1; + } + + @Override + public boolean isItemValid(ItemStack p_75214_1_) + { + if (p_75214_1_ == null) return false; + return p_75214_1_.getItem().isValidArmor(p_75214_1_, 3, player); + } + + @Override + public boolean canTakeStack(EntityPlayer player) { + return true; + } + + }); + + this.addSlotToContainer(new SlotEquipment(EquipmentType.Necklace, this.equipment, 4, 80 + 1 * 18, 8 + 0 * 18)); + //this.addSlotToContainer(new Slot(this.equipment,0, 80 + 0 * 18, 8 + 0 * 18)); + + this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 5, 80 + 1 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 6, 80 + 1 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 7, 80 + 1 * 18, 8 + 3 * 18)); + + this.addSlotToContainer(new SlotEquipment(EquipmentType.Face, this.equipment, 8, 80 + 2 * 18, 8 + 0 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Bag, this.equipment, 9, 80 + 2 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Hand, this.equipment, 10, 80 + 2 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Belt, this.equipment, 11, 80 + 2 * 18, 8 + 3 * 18)); this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 12, 80 + 3 * 18, 8 + 0 * 18)); this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 13, 80 + 3 * 18, 8 + 1 * 18)); this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 14, 80 + 3 * 18, 8 + 2 * 18)); this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 15, 80 + 3 * 18, 8 + 3 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 16, 80 + 4 * 18, 8 + 0 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 17, 80 + 4 * 18, 8 + 1 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 18, 80 + 4 * 18, 8 + 2 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 19, 80 + 4 * 18, 8 + 3 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 16, 80 + 4 * 18, 8 + 0 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 17, 80 + 4 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 18, 80 + 4 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 19, 80 + 4 * 18, 8 + 3 * 18)); + //this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 16, 80 + 4 * 18, 8 + 0 * 18)); + //this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 17, 80 + 4 * 18, 8 + 1 * 18)); + //this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 18, 80 + 4 * 18, 8 + 2 * 18)); + //this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 19, 80 + 4 * 18, 8 + 3 * 18)); - } + } @Override public boolean canInteractWith(EntityPlayer p_75145_1_) { @@ -130,138 +218,155 @@ public boolean canInteractWith(EntityPlayer p_75145_1_) { /* public ItemStack slotClick(int p_75144_1_, int p_75144_2_, int p_75144_3_, EntityPlayer p_75144_4_) - { + { return super.slotClick(p_75144_1_, p_75144_2_, p_75144_3_, p_75144_4_); - }*/ + }*/ + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) - { - ItemStack itemstack = null; - Slot slot = (Slot)this.inventorySlots.get(p_82846_2_); - - if (slot != null && slot.getHasStack()) - { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - if (itemstack.getItem() instanceof ItemArmor && !((Slot)this.inventorySlots.get(5 + ((ItemArmor)itemstack.getItem()).armorType)).getHasStack()) - { - int j = 0 + ((ItemArmor)itemstack.getItem()).armorType; - - if (!this.mergeItemStack(itemstack1, j, j + 1, false)) - { - return null; - } - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Necklace, itemstack)) - { - - if (!this.mergeItemStack(itemstack1,40,41, false)) - { - return null; - } - - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Ring, itemstack)) - { - - if (!this.mergeItemStack(itemstack1,41,44, false)) - { - return null; - } - - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Face, itemstack)) - { - - if (!this.mergeItemStack(itemstack1,44,45, false)) - { - return null; - } - - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Bag, itemstack)) - { - - if (!this.mergeItemStack(itemstack1,45,46, false)) - { - return null; - } - - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Hand, itemstack)) - { - - if (!this.mergeItemStack(itemstack1,46,47, false)) - { - return null; - } - - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Belt, itemstack)) - { - - if (!this.mergeItemStack(itemstack1,47,48, false)) - { - return null; - } - - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Unit, itemstack)) - { - - if (!this.mergeItemStack(itemstack1,48,56, false)) - { - return null; - } - - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment)itemstack.getItem()).isItemValid(EquipmentType.Other, itemstack)) - { - - if (!this.mergeItemStack(itemstack1,56,60, false)) - { - return null; - } - - } - else if (p_82846_2_ >= 4 && p_82846_2_ < 13) - { - if (!this.mergeItemStack(itemstack1, 13, 40, false)) - { - return null; - } - } - else if (p_82846_2_ >= 13 && p_82846_2_ < 40) - { - if (!this.mergeItemStack(itemstack1, 4, 13, false)) - { - return null; - } - } - else if (!this.mergeItemStack(itemstack1, 13, 40, false)) - { - return null; - } - - if (itemstack1.stackSize == 0) - { - slot.putStack((ItemStack)null); - } - else - { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) - { - return null; - } - - slot.onPickupFromSlot(p_82846_1_, itemstack1); - } - - return itemstack; - } + { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (itemstack.getItem() instanceof ItemArmor && !((Slot) this.inventorySlots.get(5 + ((ItemArmor) itemstack.getItem()).armorType)).getHasStack()) + { + int j = 0 + ((ItemArmor) itemstack.getItem()).armorType; + + if (!this.mergeItemStack(itemstack1, j, j + 1, false)) + { + return null; + } + } + else if (itemstack.getItem() instanceof ItemArmor && !((Slot) this.inventorySlots.get(45 + ((ItemArmor) itemstack.getItem()).armorType)).getHasStack()) + { + int j = 40 + ((ItemArmor) itemstack.getItem()).armorType; + + if (!this.mergeItemStack(itemstack1, j, j + 1, false)) + { + return null; + } + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Necklace, itemstack)) + { + + if (!this.mergeItemStack(itemstack1, 44, 45, false)) + { + return null; + } + + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Ring, itemstack)) + { + + if (!this.mergeItemStack(itemstack1, 45, 48, false)) + { + return null; + } + + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Face, itemstack)) + { + + if (!this.mergeItemStack(itemstack1, 48, 49, false)) + { + return null; + } + + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Bag, itemstack)) + { + + if (!this.mergeItemStack(itemstack1, 49, 50, false)) + { + return null; + } + + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Hand, itemstack)) + { + + if (!this.mergeItemStack(itemstack1, 50, 51, false)) + { + return null; + } + + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Belt, itemstack)) + { + + if (!this.mergeItemStack(itemstack1, 51, 52, false)) + { + return null; + } + + } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Unit, itemstack)) + { + + if (!this.mergeItemStack(itemstack1, 52, 60, false)) + { + return null; + } + + } + /*else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Other, itemstack)) + { + + if (!this.mergeItemStack(itemstack1, 56, 60, false)) + { + return null; + } + + }*/ + else if (p_82846_2_ >= 4 && p_82846_2_ < 13) + { + if (!this.mergeItemStack(itemstack1, 13, 40, false)) + { + return null; + } + } + else if (p_82846_2_ >= 13 && p_82846_2_ < 40) + { + if (!this.mergeItemStack(itemstack1, 4, 13, false)) + { + return null; + } + } + else if (p_82846_2_ >= 40 && p_82846_2_ < 60) + { + if (!this.mergeItemStack(itemstack1, 4, 13, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 13, 40, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack) null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(p_82846_1_, itemstack1); + } + + return itemstack; + } } diff --git a/src/main/java/shift/sextiarysector/container/ContainerShippingBox.java b/src/main/java/shift/sextiarysector/container/ContainerShippingBox.java new file mode 100644 index 0000000..5d24ead --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/ContainerShippingBox.java @@ -0,0 +1,95 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.player.EntityPlayerManager; + +public class ContainerShippingBox extends Container { + + public InventoryShippingBox shippingBox; + private final EntityPlayer player; + private final int numRows; + private static final String __OBFID = "CL_00001742"; + + public ContainerShippingBox(InventoryPlayer par1InventoryPlayer, EntityPlayer p_i1819_3_) + { + this.player = p_i1819_3_; + this.shippingBox = EntityPlayerManager.getShippingBoxStats(p_i1819_3_).inventory; + this.numRows = 3; + + int i = 0; + + for (int j = 0; j < 3; ++j) + { + for (int k = 0; k < 9; ++k) + { + this.addSlotToContainer(new Slot(shippingBox, k + j * 9, 8 + k * 18, 17 + j * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new SlotRucksack(par1InventoryPlayer, i, 8 + i * 18, 142)); + } + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new SlotRucksack(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + } + + @Override + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return true;//this.lowerChestInventory.isUseableByPlayer(p_75145_1_); + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(p_82846_2_); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (p_82846_2_ < this.numRows * 9) + { + if (!this.mergeItemStack(itemstack1, this.numRows * 9, this.inventorySlots.size(), true)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 0, this.numRows * 9, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack) null); + } + else + { + slot.onSlotChanged(); + } + } + + return itemstack; + } + + @Override + public void onContainerClosed(EntityPlayer p_75134_1_) + { + super.onContainerClosed(p_75134_1_); + } + +} diff --git a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java index a75b7aa..f28fa33 100644 --- a/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/InventoryPlayerNext.java @@ -92,11 +92,19 @@ public void dropAllItems(EntityPlayer player) ItemStack item = this.items.getStackInSlot(i); - if (item != null && ((IEquipment) item.getItem()).canDrop(EquipmentType.getEquipmentTypeFromSlot(i), item, player)) - { + if (item == null) continue; + + if (item.getItem() instanceof IEquipment) { + + if (!((IEquipment) item.getItem()).canDrop(EquipmentType.getEquipmentTypeFromSlot(i), item, player)) continue; + player.func_146097_a(item, true, false); + this.items.setInventorySlotContents(i, null); + + } else { player.func_146097_a(item, true, false); this.items.setInventorySlotContents(i, null); } + } } diff --git a/src/main/java/shift/sextiarysector/container/InventoryShippingBox.java b/src/main/java/shift/sextiarysector/container/InventoryShippingBox.java new file mode 100644 index 0000000..772e529 --- /dev/null +++ b/src/main/java/shift/sextiarysector/container/InventoryShippingBox.java @@ -0,0 +1,92 @@ +package shift.sextiarysector.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class InventoryShippingBox implements IInventory { + + ItemBox items = new ItemBox("Base", 27); + + public InventoryShippingBox() { + } + + @Override + public int getSizeInventory() { + return items.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int i) { + return items.getStackInSlot(i); + } + + @Override + public ItemStack decrStackSize(int i, int j) { + return items.decrStackSize(i, j); + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + return items.getStackInSlotOnClosing(i); + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + items.setInventorySlotContents(i, itemstack); + } + + @Override + public String getInventoryName() { + return "gui"; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return items.getInventoryStackLimit(); + } + + @Override + public void markDirty() { + items.onInventoryChanged(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return true; + } + + @Override + public void openInventory() { + this.markDirty(); + } + + @Override + public void closeInventory() { + this.markDirty(); + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + + return true; + } + + //NBT + public NBTTagCompound writeToNBT(NBTTagCompound nbt) + { + this.items.writeToNBT(nbt); + return nbt; + } + + public void readFromNBT(NBTTagCompound nbt) + { + this.items.readFromNBT(nbt); + } +} diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 650e0d1..47aea40 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -7,24 +7,36 @@ import net.minecraft.block.BlockLeaves; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.gui.GuiIngameMenu; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.IProgressMeter; import net.minecraft.client.gui.achievement.GuiAchievements; import net.minecraft.client.gui.achievement.GuiStats; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.RenderBiped; +import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition.MovingObjectType; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.DrawBlockHighlightEvent; import net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity; import net.minecraftforge.client.event.GuiOpenEvent; +import net.minecraftforge.client.event.RenderPlayerEvent.SetArmorModel; import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.entity.player.ItemTooltipEvent; @@ -44,6 +56,7 @@ import shift.sextiarysector.module.SeasonManager; import shift.sextiarysector.player.EntityPlayerManager; import shift.sextiarysector.player.EquipmentStats; +import shift.sextiarysector.renderer.entity.ModelDecoration; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.ObfuscationReflectionHelper; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -234,6 +247,368 @@ public void onFogDensity(FogDensity event) { } } + public static ModelDecoration decoration; + + private static final ResourceLocation RES_ITEM_GLINT = new ResourceLocation("textures/misc/enchanted_item_glint.png"); + + @SubscribeEvent + public void setArmorModel(SetArmorModel event) { + + ModelBase renderPassModel = this.setArmorModel2(event); + int i = 3 - event.slot; + + int j = event.result; + + if (j > 0) + { + + EntityPlayer p_77032_1_ = event.entityPlayer; + float p_76986_9_ = event.partialRenderTick; + + float f2 = this.interpolateRotation(p_77032_1_.prevRenderYawOffset, p_77032_1_.renderYawOffset, p_76986_9_); + float f3 = this.interpolateRotation(p_77032_1_.prevRotationYawHead, p_77032_1_.rotationYawHead, p_76986_9_); + float f4; + + if (p_77032_1_.isRiding() && p_77032_1_.ridingEntity instanceof EntityLivingBase) + { + EntityLivingBase entitylivingbase1 = (EntityLivingBase) p_77032_1_.ridingEntity; + f2 = this.interpolateRotation(entitylivingbase1.prevRenderYawOffset, entitylivingbase1.renderYawOffset, p_76986_9_); + f4 = MathHelper.wrapAngleTo180_float(f3 - f2); + + if (f4 < -85.0F) + { + f4 = -85.0F; + } + + if (f4 >= 85.0F) + { + f4 = 85.0F; + } + + f2 = f3 - f4; + + if (f4 * f4 > 2500.0F) + { + f2 += f4 * 0.2F; + } + } + + float f13 = p_77032_1_.prevRotationPitch + (p_77032_1_.rotationPitch - p_77032_1_.prevRotationPitch) * p_76986_9_; + f4 = this.handleRotationFloat(p_77032_1_, p_76986_9_); + float f5 = 0.0625F; + float f6 = p_77032_1_.prevLimbSwingAmount + (p_77032_1_.limbSwingAmount - p_77032_1_.prevLimbSwingAmount) * p_76986_9_; + float f7 = p_77032_1_.limbSwing - p_77032_1_.limbSwingAmount * (1.0F - p_76986_9_); + + if (p_77032_1_.isChild()) + { + f7 *= 3.0F; + } + + if (f6 > 1.0F) + { + f6 = 1.0F; + } + + renderPassModel.setLivingAnimations(p_77032_1_, f7, f6, p_76986_9_); + renderPassModel.render(p_77032_1_, f7, f6, f4, f3 - f2, f13, f5); + + //int j; + float f8; + float f9; + float f10; + + if ((j & 240) == 16) + { + this.func_82408_c(p_77032_1_, i, p_76986_9_); + renderPassModel.render(p_77032_1_, f7, f6, f4, f3 - f2, f13, f5); + } + + if ((j & 15) == 15) + { + f8 = p_77032_1_.ticksExisted + p_76986_9_; + RenderManager.instance.renderEngine.bindTexture(this.RES_ITEM_GLINT); + GL11.glEnable(GL11.GL_BLEND); + f9 = 0.5F; + GL11.glColor4f(f9, f9, f9, 1.0F); + GL11.glDepthFunc(GL11.GL_EQUAL); + GL11.glDepthMask(false); + + for (int k = 0; k < 2; ++k) + { + GL11.glDisable(GL11.GL_LIGHTING); + f10 = 0.76F; + GL11.glColor4f(0.5F * f10, 0.25F * f10, 0.8F * f10, 1.0F); + GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE); + GL11.glMatrixMode(GL11.GL_TEXTURE); + GL11.glLoadIdentity(); + float f11 = f8 * (0.001F + k * 0.003F) * 20.0F; + float f12 = 0.33333334F; + GL11.glScalef(f12, f12, f12); + GL11.glRotatef(30.0F - k * 60.0F, 0.0F, 0.0F, 1.0F); + GL11.glTranslatef(0.0F, f11, 0.0F); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + renderPassModel.render(p_77032_1_, f7, f6, f4, f3 - f2, f13, f5); + } + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glMatrixMode(GL11.GL_TEXTURE); + GL11.glDepthMask(true); + GL11.glLoadIdentity(); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_BLEND); + GL11.glDepthFunc(GL11.GL_LEQUAL); + } + + GL11.glDisable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_ALPHA_TEST); + } + + if (event.result != -1) event.result = -2; + + } + + //shiftの帽子 + public ModelBase setArmorModel2(SetArmorModel event) { + + if (decoration == null) decoration = new ModelDecoration(); + + EquipmentStats e = EntityPlayerManager.getEquipmentStats(event.entityPlayer); + int p_77032_2_ = 3 - event.slot; + float p_76986_9_ = event.partialRenderTick; + + //Item item = SSItems.shiftHat; + EntityPlayer p_77032_1_ = event.entityPlayer; + ItemStack itemstack = e.inventory.getStackInSlot(p_77032_2_); + if (itemstack == null) return null; + Item item = itemstack.getItem(); + + if (item instanceof ItemArmor) + { + ItemArmor itemarmor = (ItemArmor) item; + //event.renderer.bindTexture(RenderBiped.getArmorResource(p_77032_1_, itemstack, p_77032_2_, null)); + ResourceLocation resource = RenderBiped.getArmorResource(p_77032_1_, itemstack, p_77032_2_, null); + + RenderManager.instance.renderEngine.bindTexture(resource); + ModelBiped modelbiped = p_77032_2_ == 2 ? event.renderer.modelArmor : event.renderer.modelArmorChestplate; + modelbiped.bipedHead.showModel = p_77032_2_ == 0; + modelbiped.bipedHeadwear.showModel = p_77032_2_ == 0; + modelbiped.bipedBody.showModel = p_77032_2_ == 1 || p_77032_2_ == 2; + modelbiped.bipedRightArm.showModel = p_77032_2_ == 1; + modelbiped.bipedLeftArm.showModel = p_77032_2_ == 1; + modelbiped.bipedRightLeg.showModel = p_77032_2_ == 2 || p_77032_2_ == 3; + modelbiped.bipedLeftLeg.showModel = p_77032_2_ == 2 || p_77032_2_ == 3; + modelbiped = net.minecraftforge.client.ForgeHooksClient.getArmorModel(p_77032_1_, itemstack, p_77032_2_, modelbiped); + event.renderer.setRenderPassModel(modelbiped); + modelbiped.onGround = event.renderer.modelBipedMain.onGround; + modelbiped.isRiding = event.renderer.modelBipedMain.isRiding; + modelbiped.isChild = event.renderer.modelBipedMain.isChild; + + //Move outside if to allow for more then just CLOTH + int j = itemarmor.getColor(itemstack); + if (j != -1) + { + + float f1 = (j >> 16 & 255) / 255.0F; + float f2 = (j >> 8 & 255) / 255.0F; + float f3 = (j & 255) / 255.0F; + GL11.glColor3f(f1, f2, f3); + + if (itemstack.isItemEnchanted()) + { + event.result = 31; + return modelbiped; + } + + event.result = 16; + return modelbiped; + + /* + GL11.glColor3f(1.0F, 1.0F, 1.0F); + + float f2 = this.interpolateRotation(p_77032_1_.prevRenderYawOffset, p_77032_1_.renderYawOffset, p_76986_9_); + float f3 = this.interpolateRotation(p_77032_1_.prevRotationYawHead, p_77032_1_.rotationYawHead, p_76986_9_); + float f4; + + if (p_77032_1_.isRiding() && p_77032_1_.ridingEntity instanceof EntityLivingBase) + { + EntityLivingBase entitylivingbase1 = (EntityLivingBase) p_77032_1_.ridingEntity; + f2 = this.interpolateRotation(entitylivingbase1.prevRenderYawOffset, entitylivingbase1.renderYawOffset, p_76986_9_); + f4 = MathHelper.wrapAngleTo180_float(f3 - f2); + + if (f4 < -85.0F) + { + f4 = -85.0F; + } + + if (f4 >= 85.0F) + { + f4 = 85.0F; + } + + f2 = f3 - f4; + + if (f4 * f4 > 2500.0F) + { + f2 += f4 * 0.2F; + } + } + + float f13 = p_77032_1_.prevRotationPitch + (p_77032_1_.rotationPitch - p_77032_1_.prevRotationPitch) * p_76986_9_; + f4 = this.handleRotationFloat(p_77032_1_, p_76986_9_); + //this.rotateCorpse((AbstractClientPlayer) p_77032_1_, f4, f2, p_76986_9_); + float f5 = 0.0625F; + //GL11.glEnable(GL12.GL_RESCALE_NORMAL); + //GL11.glScalef(-1.0F, -1.0F, 1.0F); + //this.preRenderCallback(p_77032_1_, p_76986_9_); + //GL11.glTranslatef(0.0F, -24.0F * f5 - 0.0078125F, 0.0F); + float f6 = p_77032_1_.prevLimbSwingAmount + (p_77032_1_.limbSwingAmount - p_77032_1_.prevLimbSwingAmount) * p_76986_9_; + float f7 = p_77032_1_.limbSwing - p_77032_1_.limbSwingAmount * (1.0F - p_76986_9_); + + if (p_77032_1_.isChild()) + { + f7 *= 3.0F; + } + + if (f6 > 1.0F) + { + f6 = 1.0F; + } + + this.func_82408_c(p_77032_1_, p_77032_2_, itemstack); + + modelbiped.render(p_77032_1_, f7, f6, f4, f3 - f2, f13, f5); + + RenderManager.instance.renderEngine.bindTexture(resource); + //this.func_82408_c(p_77032_1_, p_77032_2_, itemstack); + //event.renderer.setRenderPassModel(modelbiped); + + float c1 = (j >> 16 & 255) / 255.0F; + float c2 = (j >> 8 & 255) / 255.0F; + float c3 = (j & 255) / 255.0F; + GL11.glColor3f(c1, c2, c3); + + //GL11.glColor3f(1.0F, 1.0F, 1.0F); + + if (itemstack.isItemEnchanted()) + { + event.result = 15; + return modelbiped; + } + + //return 1; + event.result = 1; + return modelbiped; + */ + + } + + GL11.glColor3f(1.0F, 1.0F, 1.0F); + + if (itemstack.isItemEnchanted()) + { + event.result = 15; + return modelbiped; + } + + //return 1; + event.result = 1; + + return modelbiped; + } + + return null; + + } + + protected void func_82408_c(EntityLivingBase p_82408_1_, int p_82408_2_, float p_82408_3_) + { + //ItemStack itemstack = p_82408_1_.inventory.armorItemInSlot(3 - p_82408_2_); + EquipmentStats e = EntityPlayerManager.getEquipmentStats((EntityPlayer) p_82408_1_); + //ItemStack itemstack = e.inventory.getStackInSlot(3 - p_82408_2_); + ItemStack itemstack = e.inventory.getStackInSlot(p_82408_2_); + + if (itemstack != null) + { + Item item = itemstack.getItem(); + + if (item instanceof ItemArmor) + { + RenderManager.instance.renderEngine.bindTexture(RenderBiped.getArmorResource(p_82408_1_, itemstack, p_82408_2_, "overlay")); + GL11.glColor3f(1.0F, 1.0F, 1.0F); + } + } + } + + private float interpolateRotation(float p_77034_1_, float p_77034_2_, float p_77034_3_) + { + float f3; + + for (f3 = p_77034_2_ - p_77034_1_; f3 < -180.0F; f3 += 360.0F) + { + ; + } + + while (f3 >= 180.0F) + { + f3 -= 360.0F; + } + + return p_77034_1_ + p_77034_3_ * f3; + } + + protected float handleRotationFloat(EntityLivingBase p_77044_1_, float p_77044_2_) + { + return p_77044_1_.ticksExisted + p_77044_2_; + } + + protected void rotateCorpse(AbstractClientPlayer p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) + { + if (p_77043_1_.isEntityAlive() && p_77043_1_.isPlayerSleeping()) + { + GL11.glRotatef(p_77043_1_.getBedOrientationInDegrees(), 0.0F, 1.0F, 0.0F); + GL11.glRotatef(this.getDeathMaxRotation(p_77043_1_), 0.0F, 0.0F, 1.0F); + GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F); + } + else + { + this.rotateCorpse2(p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_); + } + } + + protected void rotateCorpse2(EntityLivingBase p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) + { + GL11.glRotatef(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F); + + if (p_77043_1_.deathTime > 0) + { + float f3 = (p_77043_1_.deathTime + p_77043_4_ - 1.0F) / 20.0F * 1.6F; + f3 = MathHelper.sqrt_float(f3); + + if (f3 > 1.0F) + { + f3 = 1.0F; + } + + GL11.glRotatef(f3 * this.getDeathMaxRotation(p_77043_1_), 0.0F, 0.0F, 1.0F); + } + else + { + String s = EnumChatFormatting.getTextWithoutFormattingCodes(p_77043_1_.getCommandSenderName()); + + if ((s.equals("Dinnerbone") || s.equals("Grumm")) && (!(p_77043_1_ instanceof EntityPlayer) || !((EntityPlayer) p_77043_1_).getHideCape())) + { + GL11.glTranslatef(0.0F, p_77043_1_.height + 0.1F, 0.0F); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); + } + } + } + + protected float getDeathMaxRotation(EntityLivingBase p_77037_1_) + { + return 90.0F; + } + //車軸の線の描写 @SubscribeEvent public void onDrawBlockHighlight(DrawBlockHighlightEvent event) { diff --git a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java index 9b17a57..2efdd7a 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java @@ -3,6 +3,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.PlayerEvent; @@ -31,17 +32,21 @@ public void livingDashEvent(LivingUpdateEvent event) { if (player.capabilities.isCreativeMode) return; + if (!player.onGround) return; + if (EntityPlayerManager.getStaminaStats(player).getStaminaLevel() < 5) { - player.motionX *= 0.8; + player.motionX *= 0.7; //player.motionY *= 0.5; - player.motionZ *= 0.8; + player.motionZ *= 0.7; + //player.capabilities.setPlayerWalkSpeed(0.08f); - } else if (EntityPlayerManager.getStaminaStats(player).getStaminaLevel() >= 30 && player.isSprinting() && player.motionY == 0 && Math.abs(player.motionX) <= getMaxMove() && Math.abs(player.motionY) <= getMaxMove()) { + } else if (EntityPlayerManager.getStaminaStats(player).getStaminaLevel() >= 30 && player.isSprinting() && Math.abs(player.motionX) <= getMaxMove() && Math.abs(player.motionZ) <= getMaxMove()) { - player.motionX *= 1.6; + player.motionX *= 1.1; //player.motionY *= 1.4; - player.motionZ *= 1.6; + player.motionZ *= 1.1; + //player.capabilities.setPlayerWalkSpeed(0.16f); } @@ -130,6 +135,43 @@ public void playeHarvestCheckEvent(PlayerEvent.HarvestCheck event) { } + //ダッシュユニット + @SubscribeEvent + public void onLivingJump(LivingJumpEvent event) { + + if (!(event.entityLiving instanceof EntityPlayer)) { + return; + } + + //if (event.entityLiving.worldObj.isRemote) { + // return; + //} + + EntityPlayer player = (EntityPlayer) event.entityLiving; + + EquipmentStats e = EntityPlayerManager.getEquipmentStats((EntityPlayer) event.entity); + + double size = 0; + + for (int i = 0; i < EquipmentType.Unit.getSlots().length; i++) { + + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlots()[i]); + + if (item == null) continue; + + if (item.getItem() == null) continue; + + if (item.getItem() == SSItems.jumpUnit) { + size += 0.1; + } + + } + + //System.out.println(size); + player.motionY += size; + + } + //リング @SubscribeEvent(priority = EventPriority.HIGH) public void onPlayerCloneEvent(net.minecraftforge.event.entity.player.PlayerEvent.Clone event) diff --git a/src/main/java/shift/sextiarysector/fluid/FluidColor.java b/src/main/java/shift/sextiarysector/fluid/FluidColor.java index 4177cf1..b0f1e80 100644 --- a/src/main/java/shift/sextiarysector/fluid/FluidColor.java +++ b/src/main/java/shift/sextiarysector/fluid/FluidColor.java @@ -1,5 +1,6 @@ package shift.sextiarysector.fluid; +import net.minecraftforge.fluids.FluidRegistry; import shift.sextiarysector.SSFluids.SSFluid; import shift.sextiarysector.api.EnumColor; @@ -10,6 +11,7 @@ public class FluidColor extends SSFluid { public FluidColor(String fluidName, EnumColor color) { super(fluidName, 0, 0, 0, 0); this.color = color; + FluidRegistry.registerFluid(this); } @Override diff --git a/src/main/java/shift/sextiarysector/gui/GuiShippingBox.java b/src/main/java/shift/sextiarysector/gui/GuiShippingBox.java new file mode 100644 index 0000000..c979818 --- /dev/null +++ b/src/main/java/shift/sextiarysector/gui/GuiShippingBox.java @@ -0,0 +1,67 @@ +package shift.sextiarysector.gui; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SSPlayerTabs; +import shift.sextiarysector.container.ContainerShippingBox; +import shift.sextiarysector.gui.tab.TabManager; + +public class GuiShippingBox extends GuiContainer { + + private static final ResourceLocation texture = new ResourceLocation("sextiarysector:textures/guis/shipping_box.png"); + private final boolean tab = false; + + public GuiShippingBox(EntityPlayer inventoryPlayer) + { + super(new ContainerShippingBox(inventoryPlayer.inventory, inventoryPlayer)); + //this.ySize = 222; + } + + @Override + public void initGui() + { + + this.buttonList.clear(); + + super.initGui(); + + if (!tab) return; + + int cornerX = this.guiLeft; + + int cornerY = this.guiTop; + + TabManager.updateTabValues(cornerX, cornerY, this.buttonList, SSPlayerTabs.rucksack, false); + + } + + /* + ChestとかInventoryとか文字を描画する + */ + @Override + protected void drawGuiContainerForegroundLayer(int x, int p_146979_2_) + { + //描画する文字, X, Y, 色 + this.fontRendererObj.drawString(I18n.format("gui.ss.shipping_box"), this.xSize / 2 - this.fontRendererObj.getStringWidth(I18n.format("gui.ss.shipping_box")) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + /* + 背景の描画 + */ + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(texture); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemKnife.java b/src/main/java/shift/sextiarysector/item/ItemKnife.java index fe93d3e..182bb0b 100644 --- a/src/main/java/shift/sextiarysector/item/ItemKnife.java +++ b/src/main/java/shift/sextiarysector/item/ItemKnife.java @@ -23,6 +23,7 @@ public class ItemKnife extends ItemTool private static final Set field_150916_c = Sets.newHashSet(new Block[] { Blocks.crafting_table }); private boolean repair = false; + private boolean furnace = false; public ItemKnife(ToolMaterial p_i45343_1_) { @@ -51,7 +52,7 @@ public boolean doesContainerItemLeaveCraftingGrid(ItemStack par1ItemStack) @Override public boolean hasContainerItem() { - return !repair; + return !repair && !furnace; } //修理かどうかを判定する @@ -60,12 +61,19 @@ public void onCrafting(ItemCraftedEvent event) { //IDが無くなったので、アイテムインスタンスで比較。 repair = this == event.crafting.getItem(); + furnace = false; } //クラフト後のアイテムを、ダメージを与えて返す @Override public ItemStack getContainerItem(ItemStack itemStack) { + + if (!hasContainerItem(itemStack)) + { + return null; + } + if (itemStack != null && itemStack.getItem() == this) { itemStack.setItemDamage(itemStack.getItemDamage() + 1); @@ -73,6 +81,18 @@ public ItemStack getContainerItem(ItemStack itemStack) return itemStack; } + //カマド用 + @Override + public String getToolMaterialName() + { + + if (this.toolMaterial.toString().equals("WOOD")) { + furnace = true; + } + + return this.toolMaterial.toString(); + } + @Override @SideOnly(Side.CLIENT) public boolean isFull3D() diff --git a/src/main/java/shift/sextiarysector/module/ModuleFishing.java b/src/main/java/shift/sextiarysector/module/ModuleFishing.java new file mode 100644 index 0000000..b0aac50 --- /dev/null +++ b/src/main/java/shift/sextiarysector/module/ModuleFishing.java @@ -0,0 +1,44 @@ +package shift.sextiarysector.module; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomFishable; +import net.minecraftforge.common.FishingHooks; +import shift.sextiarysector.SSItems; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class ModuleFishing implements IModule { + + private static ModuleFishing instance; + + private ModuleFishing() { + } + + public static ModuleFishing getInstance() { + if (instance == null) { + instance = new ModuleFishing(); + } + return instance; + } + + @Override + public void preInit(FMLPreInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void load(FMLInitializationEvent event) { + + FishingHooks.addTreasure(new WeightedRandomFishable(new ItemStack(SSItems.jumpUnit), 1)); + + } + + @Override + public void postInit(FMLPostInitializationEvent event) { + // TODO 自動生成されたメソッド・スタブ + + } + +} diff --git a/src/main/java/shift/sextiarysector/module/ModuleVanillaRecipe.java b/src/main/java/shift/sextiarysector/module/ModuleVanillaRecipe.java new file mode 100644 index 0000000..08e3abf --- /dev/null +++ b/src/main/java/shift/sextiarysector/module/ModuleVanillaRecipe.java @@ -0,0 +1,556 @@ +package shift.sextiarysector.module; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.ShapedRecipes; +import net.minecraft.item.crafting.ShapelessRecipes; +import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; +import shift.sextiarysector.SextiarySector; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.registry.GameRegistry; + +/** + * This code was referenced to OreDictionary.class. + * This code was referenced to CustomizeVanillaRecipe.class. by FluidityFoodstuffs + * */ +public class ModuleVanillaRecipe implements IModule { + + private static ModuleVanillaRecipe instance; + + private ModuleVanillaRecipe() { + } + + public static ModuleVanillaRecipe getInstance() { + if (instance == null) { + instance = new ModuleVanillaRecipe(); + } + return instance; + } + + private static Map replaceTable = new HashMap(); + + private static ArrayList exclusions = new ArrayList(); + + @Override + public void preInit(FMLPreInitializationEvent event) { + + replaceTable.put(new ItemStack(Blocks.wool), "blockWool"); + + for (int i = 0; i < 16; i++) { + exclusions.add(new ItemStack(Blocks.wool, 1, i)); + } + + } + + @Override + public void load(FMLInitializationEvent event) { + + } + + @Override + public void postInit(FMLPostInitializationEvent event) { + + List targetRecipes = CraftingManager.getInstance().getRecipeList(); + List addRecipes = new ArrayList(); + List addOreRecipes = new ArrayList(); + List addShapelessRecipes = new ArrayList(); + List addShapelessOreRecipes = new ArrayList(); + + ItemStack[] replaces = replaceTable.keySet().toArray(new ItemStack[replaceTable.keySet().size()]); + + int count = 0; + + for (Object obj : targetRecipes) + { + if (obj instanceof ShapedRecipes) + { + ShapedRecipes recipe = (ShapedRecipes) obj; + ItemStack output = recipe.getRecipeOutput(); + if (output != null && containsMatch(false, exclusions.toArray(new ItemStack[exclusions.size()]), output)) + { + continue; + } + + if (containsMatch(true, recipe.recipeItems, replaces)) + { + addRecipes.add(recipe); + } + } + else if (obj instanceof ShapelessRecipes) + { + ShapelessRecipes recipe = (ShapelessRecipes) obj; + ItemStack output = recipe.getRecipeOutput(); + if (output != null && containsMatch(false, exclusions.toArray(new ItemStack[exclusions.size()]), output)) + { + continue; + } + + if (containsMatch(true, (ItemStack[]) recipe.recipeItems.toArray(new ItemStack[recipe.recipeItems.size()]), replaces)) + { + addShapelessRecipes.add(recipe); + } + } + if (obj instanceof ShapedOreRecipe) + { + ShapedOreRecipe recipe = (ShapedOreRecipe) obj; + ItemStack output = recipe.getRecipeOutput(); + if (output != null && containsMatch(false, exclusions.toArray(new ItemStack[exclusions.size()]), output)) + { + continue; + } + + ArrayList check = new ArrayList(); + for (Object object : recipe.getInput()) + { + ItemStack item = null; + + if (object instanceof ItemStack) + { + item = (ItemStack) object; + } + else if (object instanceof Item) + { + item = new ItemStack((Item) object); + } + else if (object instanceof Block) + { + item = new ItemStack((Block) object, 1, OreDictionary.WILDCARD_VALUE); + } + + if (item != null) + { + check.add(item); + } + } + + if (!check.isEmpty() && containsMatch(true, check.toArray((new ItemStack[check.size()])), replaces)) + { + addOreRecipes.add(recipe); + } + } + else if (obj instanceof ShapelessOreRecipe) + { + ShapelessOreRecipe recipe = (ShapelessOreRecipe) obj; + ItemStack output = recipe.getRecipeOutput(); + if (output != null && containsMatch(false, exclusions.toArray(new ItemStack[exclusions.size()]), output)) + { + continue; + } + + ArrayList check = new ArrayList(); + for (Object object : recipe.getInput()) + { + ItemStack item = null; + + if (object instanceof ItemStack) + { + item = (ItemStack) object; + } + else if (object instanceof Item) + { + item = new ItemStack((Item) object); + } + else if (object instanceof Block) + { + item = new ItemStack((Block) object, 1, OreDictionary.WILDCARD_VALUE); + } + + if (item != null) + { + check.add(item); + } + } + + if (!check.isEmpty() && containsMatch(true, check.toArray((new ItemStack[check.size()])), replaces)) + { + addShapelessOreRecipes.add(recipe); + } + } + } + + for (Object obj : addRecipes) + { + if (obj instanceof ShapedRecipes) + { + registerCustomShapedRecipe((ShapedRecipes) obj); + count++; + } + } + + for (Object obj : addShapelessRecipes) + { + if (obj instanceof ShapelessRecipes) + { + registerCustomShapelessRecipe((ShapelessRecipes) obj); + count++; + } + } + + for (Object obj : addOreRecipes) + { + if (obj instanceof ShapedOreRecipe) + { + registerCustomShapedOreRecipe((ShapedOreRecipe) obj); + count++; + } + } + + for (Object obj : addShapelessOreRecipes) + { + if (obj instanceof ShapelessOreRecipe) + { + registerCustomShapelessOreRecipe((ShapelessOreRecipe) obj); + count++; + } + } + + SextiarySector.Log.info("Replaced " + count + " recipes."); + + } + + //Shaped + private static void registerCustomShapedRecipe(ShapedRecipes recipe) + { + ItemStack output = recipe.getRecipeOutput(); + int x = recipe.recipeWidth; + int y = recipe.recipeHeight; + ItemStack[] items = recipe.recipeItems; + + if (x * y > 9) return; + + ArrayList inputArray = new ArrayList(); + + //3x3より大きなレシピには全く対応していない + String[] s = { "A", "B", "C", "D", "E", "F", "G", "H", "I" }; + Character[] c = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I' }; + + String[] returnArray = new String[y]; + + //クラフト欄指定用のString[]の生成 + for (int i = 1; i < y + 1; i++) + { + String f = ""; + for (int k = 1; k < x + 1; k++) + { + f += items[k + ((i - 1) * x) - 1] == null ? " " : s[k + ((i - 1) * x) - 1]; + } + returnArray[i - 1] = f; + } + + for (int i = 0; i < returnArray.length; i++) + { + inputArray.add(returnArray[i]); + } + + //ItemStack配列部分の追加 + //Character、ItemStack/String の順に追加していけば良い。空欄はnullのまま。 + for (int i = 0; i < x * y; i++) + { + if (items[i] != null) + { + String sign = s[i]; + ItemStack item = items[i]; + boolean b = false; + + for (Entry entry : replaceTable.entrySet()) + { + if (itemMatches(entry.getKey(), item, true)) + { + String oreName = entry.getValue(); + + inputArray.add(c[i]); + inputArray.add(entry.getValue()); + b = true; + } + } + + if (!b) + { + inputArray.add(c[i]); + inputArray.add(item); + } + } + } + + Object[] newInputs = inputArray.toArray(); + GameRegistry.addRecipe(new ShapedOreRecipe(output, newInputs)); + SextiarySector.Log.info("Customized ShapdRecipe : " + inputArray.toString()); + } + + //Shapeless + private static void registerCustomShapelessRecipe(ShapelessRecipes recipe) + { + ItemStack output = recipe.getRecipeOutput(); + List items = recipe.recipeItems; + ArrayList inputs = new ArrayList(); + + for (ItemStack item : items) + { + boolean b = false; + if (item != null) + { + for (Entry entry : replaceTable.entrySet()) + { + if (itemMatches(entry.getKey(), item, true)) + { + String oreName = entry.getValue(); + inputs.add(oreName); + b = true; + } + } + + if (!b) + { + inputs.add(item); + } + } + } + + Object[] newInputs = inputs.toArray(); + GameRegistry.addRecipe(new ShapelessOreRecipe(output, newInputs)); + SextiarySector.Log.info("Customized ShapelessRecipe : " + inputs.toString()); + + } + + //Shaped-Ore + private static void registerCustomShapedOreRecipe(ShapedOreRecipe recipe) + { + ItemStack output = recipe.getRecipeOutput(); + Object[] objects = recipe.getInput(); + ArrayList inputs = new ArrayList(); + + int x = 0; + int y = 0; + + try + { + Field fieldW = recipe.getClass().getDeclaredField("width"); + fieldW.setAccessible(true); + x = fieldW.getInt(recipe); + + Field fieldH = recipe.getClass().getDeclaredField("height"); + fieldH.setAccessible(true); + y = fieldH.getInt(recipe); + } catch (Exception e) + { + return; + } + + if (x * y == 0 || x * y > 9) return; + + //3x3より大きなレシピには全く対応していない + String[] s = { "A", "B", "C", "D", "E", "F", "G", "H", "I" }; + Character[] c = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I' }; + + String[] returnArray = new String[y]; + + //クラフト欄指定用のString[]の生成 + for (int i = 1; i < y + 1; i++) + { + String f = ""; + for (int k = 1; k < x + 1; k++) + { + f += objects[k + ((i - 1) * x) - 1] == null ? " " : s[k + ((i - 1) * x) - 1]; + } + returnArray[i - 1] = f; + } + + for (int i = 0; i < returnArray.length; i++) + { + inputs.add(returnArray[i]); + } + + //item + for (int i = 0; i < x * y; i++) + { + boolean b = false; + ItemStack item = null; + Object obj = objects[i]; + if (obj == null) continue; + + if (obj instanceof ItemStack) + { + item = (ItemStack) obj; + } + else if (obj instanceof Item) + { + item = new ItemStack((Item) obj); + } + else if (obj instanceof Block) + { + item = new ItemStack((Block) obj, 1, OreDictionary.WILDCARD_VALUE); + } + else if (obj instanceof ArrayList) + { + if ((ArrayList) obj != null && !((ArrayList) obj).isEmpty()) + { + ArrayList list = (ArrayList) obj; + for (ItemStack oreItem : list) { + if (oreItem == null || OreDictionary.getOreIDs(oreItem).length == 0) continue; + int[] id = OreDictionary.getOreIDs(oreItem); + for (int j = 0; j < id.length; j++) + { + String str = OreDictionary.getOreName(OreDictionary.getOreIDs(oreItem)[j]); + if (str != null) { + inputs.add(c[i]); + inputs.add(str); + b = true; + break; + } + } + if (b) break; + } + } + + if (!b) + { + inputs.add(c[i]); + inputs.add("Unknown"); + b = true; + } + } + + if (item != null) + { + for (Entry entry : replaceTable.entrySet()) + { + if (itemMatches(entry.getKey(), item, true)) + { + String oreName = entry.getValue(); + inputs.add(c[i]); + inputs.add(oreName); + b = true; + } + } + + if (!b) + { + inputs.add(c[i]); + inputs.add(obj); + } + } + } + + Object[] newInputs = inputs.toArray(); + GameRegistry.addRecipe(new ShapedOreRecipe(output, newInputs)); + SextiarySector.Log.info("Customized ShapedOreRecipe : " + inputs.toString()); + + } + + //Shapeless-Ore + private static void registerCustomShapelessOreRecipe(ShapelessOreRecipe recipe) + { + ItemStack output = recipe.getRecipeOutput(); + ArrayList objects = recipe.getInput(); + ArrayList inputs = new ArrayList(); + + for (Object obj : objects) + { + boolean b = false; + ItemStack item = null; + + if (obj instanceof ItemStack) + { + item = (ItemStack) obj; + } + else if (obj instanceof Item) + { + item = new ItemStack((Item) obj); + } + else if (obj instanceof Block) + { + item = new ItemStack((Block) obj, 1, OreDictionary.WILDCARD_VALUE); + } + else if (obj instanceof ArrayList) + { + if ((ArrayList) obj != null && !((ArrayList) obj).isEmpty()) + { + ArrayList list = (ArrayList) obj; + for (ItemStack oreItem : list) { + if (oreItem == null || OreDictionary.getOreIDs(oreItem).length == 0) continue; + int[] id = OreDictionary.getOreIDs(oreItem); + for (int j = 0; j < id.length; j++) + { + String str = OreDictionary.getOreName(OreDictionary.getOreIDs(oreItem)[j]); + if (str != null) { + inputs.add(str); + b = true; + break; + } + } + if (b) break; + } + } + + if (!b) + { + inputs.add("Unknown"); + b = true; + } + } + + if (item != null) + { + for (Entry entry : replaceTable.entrySet()) + { + if (itemMatches(entry.getKey(), item, true)) + { + String oreName = entry.getValue(); + inputs.add(oreName); + b = true; + } + } + } + + if (!b) + { + inputs.add(obj); + } + } + + Object[] newInputs = inputs.toArray(); + GameRegistry.addRecipe(new ShapelessOreRecipe(output, newInputs)); + SextiarySector.Log.info("Customized ShapelessOreRecipe : " + inputs.toString()); + + } + + private static boolean containsMatch(boolean strict, ItemStack[] inputs, ItemStack... targets) + { + for (ItemStack input : inputs) + { + for (ItemStack target : targets) + { + if (itemMatches(target, input, strict)) + { + return true; + } + } + } + return false; + } + + public static boolean itemMatches(ItemStack target, ItemStack input, boolean strict) + { + if (input == null && target != null || input != null && target == null) + { + return false; + } + return (target.getItem() == input.getItem() && ((target.getItemDamage() == OreDictionary.WILDCARD_VALUE && !strict) || target.getItemDamage() == input.getItemDamage())); + } + +} diff --git a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java index ac0ab18..63d356a 100644 --- a/src/main/java/shift/sextiarysector/player/CustomPlayerData.java +++ b/src/main/java/shift/sextiarysector/player/CustomPlayerData.java @@ -20,6 +20,9 @@ public class CustomPlayerData implements IExtendedEntityProperties { /**装備**/ private EquipmentStats equipment; + /**出荷箱 */ + private ShippingBoxStats shippingBox; + //@SideOnly(Side.CLIENT) //private TabStats tab; @@ -34,6 +37,7 @@ public void onUpdateEntity(EntityPlayer entityPlayer) this.moisture.onUpdate(entityPlayer); this.stamina.onUpdate(entityPlayer); this.equipment.onUpdate(entityPlayer); + this.shippingBox.onUpdate(entityPlayer); } @@ -46,6 +50,8 @@ public void saveNBTData(NBTTagCompound compound) { this.equipment.writeNBT(compound); + this.shippingBox.writeNBT(compound); + } @Override @@ -57,6 +63,8 @@ public void loadNBTData(NBTTagCompound compound) { this.equipment.readNBT(compound); + this.shippingBox.readNBT(compound); + } @Override @@ -68,6 +76,8 @@ public void init(Entity entity, World world) { if (this.equipment == null) this.equipment = new EquipmentStats(); + if (this.shippingBox == null) this.shippingBox = new ShippingBoxStats(); + //this.tab = new TabStats(); } @@ -96,6 +106,14 @@ public void setEquipmentStats(EquipmentStats e) { this.equipment = e; } + public ShippingBoxStats getShippingBoxStats() { + return shippingBox; + } + + public void setShippingBoxStats(ShippingBoxStats s) { + this.shippingBox = s; + } + //@SideOnly(Side.CLIENT) //public void setTabList(ArrayList tabList){ // tab.setTabList(tabList); diff --git a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java index 488ccf8..011d145 100644 --- a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java +++ b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java @@ -184,6 +184,13 @@ public void onPlayerCloneEvent(net.minecraftforge.event.entity.player.PlayerEven //this.getCustomPlayerData(event.entityPlayer).setEquipmentStats(e); + ShippingBoxStats s = this.getShippingBoxStats(old); + NBTTagCompound nbtS = new NBTTagCompound(); + s.writeNBT(nbtS); + + ShippingBoxStats sNew = this.getShippingBoxStats(event.entityPlayer); + sNew.readNBT(nbtS); + return; } @@ -193,6 +200,8 @@ public void onPlayerCloneEvent(net.minecraftforge.event.entity.player.PlayerEven } + this.getCustomPlayerData(event.entityPlayer).setShippingBoxStats(this.getShippingBoxStats(event.original)); + } private void oneton() { @@ -254,6 +263,10 @@ public static EquipmentStats getEquipmentStats(EntityPlayer entityPlayer) { return getCustomPlayerData(entityPlayer).getEquipmentStats(); } + public static ShippingBoxStats getShippingBoxStats(EntityPlayer entityPlayer) { + return getCustomPlayerData(entityPlayer).getShippingBoxStats(); + } + //パケット用 /* public void onPacketData(INetworkManager manager,Packet250CustomPayload packet, Player player) { diff --git a/src/main/java/shift/sextiarysector/player/ShippingBoxStats.java b/src/main/java/shift/sextiarysector/player/ShippingBoxStats.java new file mode 100644 index 0000000..4590e55 --- /dev/null +++ b/src/main/java/shift/sextiarysector/player/ShippingBoxStats.java @@ -0,0 +1,70 @@ +package shift.sextiarysector.player; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import shift.mceconomy2.api.MCEconomyAPI; +import shift.sextiarysector.api.season.SeasonAPI; +import shift.sextiarysector.container.InventoryShippingBox; +import shift.sextiarysector.module.ModuleStatistics; + +public class ShippingBoxStats { + + public final String NBT_ID = "ssshippingbox"; + + public InventoryShippingBox inventory; + + public ShippingBoxStats() { + + inventory = new InventoryShippingBox(); + + } + + public void onUpdate(EntityPlayer entityPlayer) { + + if (SeasonAPI.getHour(entityPlayer.worldObj, 1) != 7 || SeasonAPI.getMinute(entityPlayer.worldObj) != 0) return; + + for (int i = 0; i < inventory.getSizeInventory(); i++) { + + ItemStack item = inventory.getStackInSlot(i); + + if (item == null) continue; + + if (MCEconomyAPI.getPurchase(item) < 0) continue; + + int mp = MCEconomyAPI.getPurchase(item) * item.stackSize; + + int addmp = MCEconomyAPI.addPlayerMP(entityPlayer, mp, true); + + if (addmp != mp) continue; + + MCEconomyAPI.addPlayerMP(entityPlayer, addmp, false); + entityPlayer.addStat(ModuleStatistics.objectSellStats[Item.getIdFromItem(item.getItem())], item.stackSize); + + inventory.setInventorySlotContents(i, null); + inventory.markDirty(); + + } + + } + + public void writeNBT(NBTTagCompound compound) { + + NBTTagCompound nbt = new NBTTagCompound(); + + inventory.writeToNBT(nbt); + + compound.setTag(NBT_ID, nbt); + + } + + public void readNBT(NBTTagCompound compound) { + + if (compound.hasKey(NBT_ID)) { + inventory.readFromNBT(compound.getCompoundTag(NBT_ID)); + } + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index ef2222b..9d1cd5e 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -61,8 +61,8 @@ public static void addRecipes(CraftingManager p_77608_1_) } //鉱石 ナゲット--インゴット - Object[] oNugget = new Object[] { "nuggetIron", "nuggetCopper" }; - ingot = new Item[] { Items.iron_ingot, SSItems.copperIngot, }; + Object[] oNugget = new Object[] { "nuggetIron", "nuggetCopper", "nuggetZinc", "nuggetSilver", "nuggetSteel", "nuggetNinja" }; + ingot = new Item[] { Items.iron_ingot, SSItems.copperIngot, SSItems.zincIngot, SSItems.silverIngot, SSItems.steelIngot, SSItems.ninjaIngot }; for (int i = 0; i < oNugget.length; i++) { p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(ingot[i], 1), new Object[] { "xxx", "xxx", "xxx", @@ -70,8 +70,8 @@ public static void addRecipes(CraftingManager p_77608_1_) })); } - oIngot = new Object[] { "ingotIron", "ingotCopper" }; - Item[] nugget = new Item[] { SSItems.ironNugget, SSItems.copperNugget }; + oIngot = new Object[] { "ingotIron", "ingotCopper", "ingotZinc", "ingotSilver", "ingotSteel", "ingotNinja" }; + Item[] nugget = new Item[] { SSItems.ironNugget, SSItems.copperNugget, SSItems.zincNugget, SSItems.silverNugget, SSItems.steelNugget, SSItems.ninjaNugget }; for (int i = 0; i < oIngot.length; i++) { p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(nugget[i], 9), new Object[] { @@ -79,13 +79,14 @@ public static void addRecipes(CraftingManager p_77608_1_) })); } + /* p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.smallCloth, 1), new Object[] { "xx", "xx", 'x', "craftingString", - })); + }));*/ - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.stringBobbin, 1), + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.silkBobbin, 1), new Object[] { "xxx", "xyx", "xxx", 'x', Items.string, @@ -149,7 +150,7 @@ public static void addRecipes(CraftingManager p_77608_1_) p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.rucksack, 1), new Object[] { "xxx", "x x", "xxx", - 'x', SSItems.cloth, + 'x', SSItems.silkCloth, })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.oxygenTank, 1), diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java b/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java index f0ba94a..99c0197 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesLoom.java @@ -10,7 +10,7 @@ public static void addRecipes(RecipeSimpleMachine recipe) { //風車 - recipe.add(new ItemStack(SSItems.stringBobbin, 1), new ItemStack(SSItems.cloth, 1)); + recipe.add(new ItemStack(SSItems.silkBobbin, 1), new ItemStack(SSItems.silkCloth, 1)); recipe.add(new ItemStack(SSItems.strongStringBobbin, 1), new ItemStack(SSItems.strongCloth, 1)); recipe.add(new ItemStack(SSItems.fleshBobbin, 1), new ItemStack(Items.leather, 1)); recipe.add(new ItemStack(Items.reeds, 1), new ItemStack(Items.paper, 2)); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index 40e4c65..0a58852 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -25,6 +25,13 @@ public static void addRecipes(CraftingManager p_77608_1_) 'a', Blocks.furnace }); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.craftReactor, 1), + new Object[] { "xyx", "yzy", "xyx", + Character.valueOf('y'), "ingotSilver", + Character.valueOf('x'), "nuggetGold", + Character.valueOf('z'), "gelRedstone" + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.energyReactor, 1), new Object[] { "xyx", "yzy", "xyx", Character.valueOf('y'), "ingotSilver", @@ -32,10 +39,11 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('z'), "gelBluestone" })); - p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.objectReactor, 2), - new Object[] { "xxx", "xyx", "xxx", - Character.valueOf('y'), "ingotNinja", - Character.valueOf('x'), "ingotYellowstone" + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.objectReactor, 1), + new Object[] { "xyx", "yzy", "xyx", + Character.valueOf('y'), "ingotSilver", + Character.valueOf('x'), "nuggetNinja", + Character.valueOf('z'), "gelYellowstone" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.emptyBottle, 1), @@ -57,13 +65,13 @@ public static void addRecipes(CraftingManager p_77608_1_) new Object[] { "xzx", "zyz", "xzx", Character.valueOf('y'), SSBlocks.woodShaft, Character.valueOf('x'), "plankWood", - Character.valueOf('z'), Blocks.wool + Character.valueOf('z'), "blockWool" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.canvas, 1), new Object[] { "xxy", "xxy", " y", Character.valueOf('y'), Blocks.fence, - Character.valueOf('x'), SSItems.cloth + Character.valueOf('x'), "itemCloth" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.windmill, 1), @@ -112,7 +120,7 @@ public static void addRecipes(CraftingManager p_77608_1_) new Object[] { "yay", "xzx", "yxy", Character.valueOf('y'), material[i], Character.valueOf('x'), storage[i], - Character.valueOf('z'), unit[i], + Character.valueOf('z'), "gelBluestone",//unit[i], Character.valueOf('a'), gearOre[i] })); @@ -120,7 +128,7 @@ public static void addRecipes(CraftingManager p_77608_1_) new Object[] { "yxy", "xzx", "yxy", Character.valueOf('y'), material[i], Character.valueOf('x'), gearOre[i], - Character.valueOf('z'), unit[i] + Character.valueOf('z'), "gelBluestone",//unit[i] })); } @@ -166,7 +174,7 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('y'), "gearStone", Character.valueOf('x'), SSItems.stoneGFStorage, Character.valueOf('z'), SSBlocks.machineFrame, - Character.valueOf('a'), "ingotCopper" + Character.valueOf('a'), "ingotBrass" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.spinningMachine, 1), diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java index 4ac817f..61c0a2b 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesSpinningMachine.java @@ -1,7 +1,9 @@ package shift.sextiarysector.recipe; +import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; import shift.sextiarysector.SSItems; public class RecipesSpinningMachine { @@ -12,7 +14,8 @@ public static void addRecipes(RecipeSimpleMachine recipe) // //recipe.add("plankWood", new ItemStack(SSBlocks.woodPlate, 4)); - recipe.add("craftingSmallCloth", new ItemStack(Items.string, 4)); + recipe.add("clothSilk", new ItemStack(Items.string, 4)); + recipe.add(new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.string, 4)); recipe.add(new ItemStack(SSItems.stringMass, 1), new ItemStack(SSItems.strongString, 2)); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java index 6b76f0f..17c26df 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java @@ -38,7 +38,7 @@ public static void addRecipes(CraftingManager p_77608_1_) p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(wateringCan[i], 1, (wateringCan[i].getMaxDamage() - 1)), new Object[] { "yxy", " yy", Character.valueOf('y'), material[i], - Character.valueOf('x'), "craftingFilterCloth", + Character.valueOf('x'), "massString", })); } @@ -58,7 +58,7 @@ public static void addRecipes(CraftingManager p_77608_1_) //銀 //黄銅 - addShovel(p_77608_1_, "ingotBrass", new ItemStack(SSItems.brassShears)); + addShovel(p_77608_1_, "ingotBrass", new ItemStack(SSItems.brassShovel)); addPickaxe(p_77608_1_, "ingotBrass", new ItemStack(SSItems.brassPickaxe)); addAxe(p_77608_1_, "ingotBrass", new ItemStack(SSItems.brassAxe)); addSword(p_77608_1_, "ingotBrass", new ItemStack(SSItems.brassSword)); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java b/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java index 3722692..aaa33fa 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesVanilla.java @@ -13,13 +13,13 @@ public static void addRecipes(CraftingManager p_77608_1_) p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(Items.painting, 1), new Object[] { "xxx", "xyx", "xxx", Character.valueOf('x'), "stickWood", - Character.valueOf('y'), "craftingSmallCloth" + Character.valueOf('y'), "massString" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(Items.bed, 1), new Object[] { "yyy", "xxx", Character.valueOf('x'), "plankWood", - Character.valueOf('y'), "craftingSmallCloth" + Character.valueOf('y'), "massString" })); } diff --git a/src/main/java/shift/sextiarysector/renderer/entity/ModelDecoration.java b/src/main/java/shift/sextiarysector/renderer/entity/ModelDecoration.java new file mode 100644 index 0000000..814f753 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/entity/ModelDecoration.java @@ -0,0 +1,73 @@ +package shift.sextiarysector.renderer.entity; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.model.TextureOffset; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; + +public class ModelDecoration extends ModelBase { + + public float onGround; + public boolean isRiding; + public List boxList = new ArrayList(); + public boolean isChild = true; + private final Map modelTextureMap = new HashMap(); + public int textureWidth = 64; + public int textureHeight = 32; + + public ModelBase base; + + public void setModel(ModelBase base) { + + this.base = base; + this.onGround = base.onGround; + this.isRiding = base.isRiding; + this.boxList = base.boxList; + this.isChild = base.isChild; + this.textureWidth = base.textureWidth; + this.textureHeight = base.textureHeight; + //this.modelTextureMap = base.modelTextureMap; + + } + + @Override + public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) { + this.base.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_); + } + + @Override + public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) { + this.base.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, p_78087_7_); + } + + @Override + public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_) { + this.setLivingAnimations(p_78086_1_, p_78086_2_, p_78086_3_, p_78086_4_); + } + + @Override + public ModelRenderer getRandomModelBox(Random p_85181_1_) + { + return (ModelRenderer) this.boxList.get(p_85181_1_.nextInt(this.boxList.size())); + } + + @Override + protected void setTextureOffset(String p_78085_1_, int p_78085_2_, int p_78085_3_) + { + this.modelTextureMap.put(p_78085_1_, new TextureOffset(p_78085_2_, p_78085_3_)); + } + + @Override + public TextureOffset getTextureOffset(String p_78084_1_) + { + return (TextureOffset) this.modelTextureMap.get(p_78084_1_); + } + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index bf74e20..ac63260 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -210,6 +210,11 @@ item.ss.mithril_dust.name=Mithril Dust item.ss.iron_nugget.name=Iron Nugget item.ss.copper_nugget.name=Copper Nugget +item.ss.zinc_nugget.name=Zinc Nugget +item.ss.silver_nugget.name=Silver Nugget + +item.ss.steel_nugget.name=Steel Nugget +item.ss.ninja_nugget.name=Ninja Nugget item.ss.steel_ingot.name=Steel Ingot @@ -231,6 +236,8 @@ item.ss.red_gel.name=Red Stone Gel item.ss.blue_gel.name=Blue Stone Gel item.ss.yellow_gel.name=Yellow Stone Gel + +item.ss.craft_reactor.name=Craft Reactor item.ss.energy_reactor.name=Energy Reactor item.ss.object_reactor.name=Object Reactor @@ -248,8 +255,8 @@ item.ss.gold_fluid_bucket.name=Gold Fluid Bucket item.ss.magic_dust.name=Magic Dust -item.ss.string_bobbin.name=String Bobbin -item.ss.cloth.name=Cloth +item.ss.silk_bobbin.name=Silk Bobbin +item.ss.silk_cloth.name=Silk Cloth item.ss.small_cloth.name=Small Cloth item.ss.canvas.name=Canvas item.ss.drying_flesh.name=Drying Flesh @@ -381,8 +388,11 @@ item.ss.attack_unit.name=Attack Unit item.ss.defense_unit.name=Defense Unit item.ss.attack_rust_unit.name=Attack Rust Unit item.ss.defense_rust_unit.name=Defense Rust Unit +item.ss.jump_unit.name=Jump Unit item.ss.pickaxe_unit.name=Pickaxe Unit +item.ss.debug_unit.name=Debug Unit + item.ss.iron_ring.name=Iron Ring item.ss.creeper_ring.name=Creeper Shop Ring @@ -437,6 +447,9 @@ gui.ss.magic_furnace=Magic Furnace gui.ss.freezer=Freezer gui.ss.funnel=Fluid Funnel +gui.ss.shipping_box=Shipping Box + + gui.ss.rucksack=Rucksack gui.ss.steam_motor=Steam Motor diff --git a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang index 79ce8af..87ce4e0 100644 --- a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang +++ b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang @@ -340,12 +340,13 @@ item.ss.oxygen_tank.name=酸素タンク item.ss.gf_contact_lenses.name=GFコンタクトレンズ item.ss.water_contact_lenses.name=ウォーターコンタクトレンズ -item.ss.craft_unit.name=ユニット「イツデモクラフト」 -item.ss.attack_unit.name=ユニット「ダメージプラス」 -item.ss.defense_unit.name=ユニット「ボウギョプラス」 -item.ss.attack_rust_unit.name=錆びたユニット「ダ・・ジプ・ス」 -item.ss.defense_rust_unit.name=錆びたユニット「ボウ・・・ラ・」 -item.ss.pickaxe_unit.name=ユニット「ツルハシパワー」 +item.ss.craft_unit.name=ユニット 「イツデモクラフト」 +item.ss.attack_unit.name=ユニット 「ダメージプラス」 +item.ss.defense_unit.name=ユニット 「ボウギョプラス」 +item.ss.attack_rust_unit.name=錆びたユニット 「ダ・・ジプ・ス」 +item.ss.defense_rust_unit.name=錆びたユニット 「ボウ・・・ラ・」 +item.ss.jump_unit.name=ユニット 「スーパージャンプ」 +item.ss.pickaxe_unit.name=ユニット 「ツルハシパワー」 item.ss.iron_ring.name=鉄リング diff --git a/src/main/resources/assets/sextiarysector/textures/guis/shipping_box.png b/src/main/resources/assets/sextiarysector/textures/guis/shipping_box.png index b5439f412c936320ab2041780805b197dc45c871..e961ae1d8ae7c002f27133384673bb89a4ac6eda 100644 GIT binary patch literal 1238 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5C#Tjh5(-sS0EP%%+1Y1Lqof} zyN?|^_W%EXh~OwW8Un*U1d^tF&INjsu_VYZn8D%MjWiG^$=lt9p@UV{1IXbl@Q5sC zVBk9l!i+m6X1@grvX^-Jy0YJA((&L0GbB}7Ge)d^WT&$ zkxIA|wObaHXHkF+uR)!h>-(}JN>7APBtV>q79A%&3@r_=FZdbW^D-eRKcH@6BWK=$ zBm!p2^;ahzQhFkXE)FtROz}Iq@ByVK!czC7Sr`t?UL2PAA5^fQfYlp9Z>VuF9B6(X w&mi#g?_D!d1{b-yfAWoXtty_A@T0!Byt_s2c7@Kkkq0u<)78&qol`;+06lYle*gdg literal 1328 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6|H(?D8gCb z5n0T@z;_UY8Fx&~ehU<2FY)wsWxvnN%cNx8?|s*nfq`YOr;B4q#jUq@4fAe$h%`Jr ze!ye%(|L*w8*3S&^Dap<#++DNy51h6llrzzCR&f=eGgcOyp^9fZ{DQ&+rRe<&abNue^R07f9vRdlWX?Mk$+t; z+Vnd_PV?;k{^gU_ZT0`w-SaoDe0{6$>jCSA`Eqh{F`{g_n{OWZ`n5D?`|WcaI@3?9 zm6lI9%y-~XdXdh*a25ugI>v^JzkVEjB+jrY_RszOQGb{mrU3;RSQrEt96%xSZO#rB zfxzouyYsc@olTqk?`)GS!wtqgIU6HX{x|%rkqZr-dHL|1?(Xh;^DNTS(@z?|lUKg? z|3{iA-%qgwyZP#W8?I)FLKN+@KNC7F_0oO&y?eUuvu_eOcmDk5KL&H687jmW85slx z7z7~HiPLZ2u4Qmo*Zu$5GdG3I%j5GeKksx%`6SgK zTye};{j1CDyLswLGe1f({O@95YT!^{=zvj|AI)tLds{#2`F7?qh7K+!hrTxqcbE)5 z9{siY|5M#MYlb5!LDNpBKE5c*U=;f&HBwA2krCw56Nw+||0Dq&c~kG-`*__tMupu+ zGAikEi)KysfTf?|NLSObjSk3UG+T{d-r^@{+rCoaObxF zbaBRohp*f>)L^)<@yGIi`xqG;{_p&;e2caK!;Q;d`wp&r%f-U*P3-^rxQIEAqB~g` z=Dm#i6a1&QnZe=EItK=Y%dw3N3``6?leaS&XDy!|p8uOaVm&Lvy;INa?RIeFF#=iCXd{`vKRAB#~sNAWj*7NDT*TZUWg3a!HVXFTUVc2QW*i0lryArM9b z!wwb&28Xse94Y4>JTI^Tne(A|4#yWa>xOTP9uJR57Y9AJ5Im8M<{cDc6d3dvIT$7= zsx!?r{$VNO4@@xzE`BUU5KkOfU9ykkMMy$%n?d^jkc28Ohu;iK3SO9m5;@F*Id66;xm{p$%9FVdQ I&MBb@0Ang4{r~^~ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gui/slot_decoration_legs.png b/src/main/resources/assets/sextiarysector/textures/items/gui/slot_decoration_legs.png new file mode 100644 index 0000000000000000000000000000000000000000..28b2c494acbc3bbb8ae23b4632be9b436a7839bf GIT binary patch literal 102 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`x}GkMAr-fh6C_F;f*fDk+xY|- z8;bELGH>`fJA=6+v0us{gZIF+cb=#CmoPCjsd)TV^sRRWYGm+q^>bP0l+XkK%)A@y literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gui/slot_decoration_plate.png b/src/main/resources/assets/sextiarysector/textures/items/gui/slot_decoration_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..6e632b9daca85ced819c24cd97953f84aa98ca3f GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`=AJH&Ar-fh6C_F;f*fDk+xY}2 zZxl=5nDqFPV+zB{wuDgcjf_X6oD8(ucQCey2*_SgdCu&`z+mWU9P77xGRRB@Pgg&e IbxsLQ01-hR{Qv*} literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/silk_bobbin.png b/src/main/resources/assets/sextiarysector/textures/items/loom/silk_bobbin.png new file mode 100644 index 0000000000000000000000000000000000000000..5edba703e1f49e9c02701dde0a57797e10760adb GIT binary patch literal 273 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~n*^@{n`7P_KcLV&PZ!4!i_=FZEAkz35OIlLJ?nwT zhKLOkCSq5U3#MhgYfyP9xP!HCNf-Bl6yN1p(g(KOZuzoX&{*GoX5&tMZ&R7?+RQfd z^531+K7Cy3_O`9L@%g;%ca3_rPEL|>R;k<_XVLjbI_SD7!%qRrmWJG}MGOkBPNsO; z+P-|gg8l60iHvHKlMk!-Dj#onwdE(5Wb(W1A8xLBRdbTz)TTfGrL27lczy15pVt7o Ol)=;0&t;ucLK6VlUJr(YDw@PEh|BH1P zY6+%R$A(KJ=P4cKe#GC9uk=eukl{d}hl`)m(T$I`3S@3(`^Xccxzf`_A4c+&) zVdmD?yQW)5Ok;g)u}H_;;`zMw2hQBuraNod$$k6Y7q2UR_t)KPF2ey6-~J=^2hVJe cv=`s+@^60CwMT5o7-b~n&&aIA3n`qFJX6n_xJy&rmu|PO+1upw}FXt#^lldQT=EhZ%_J=Rm+Vj}&|C?;_XF+eG^EEEFNwFV3-?rcJ zcIR|S$!+=d&hx}iuuWsy`@a-u&V5bcW3TELIi#vG|D4qh^xwt}mZzPnmfQe3l)=;0 K&t;ucLK6V2ie}LO literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/nugget/silver_nugget.png b/src/main/resources/assets/sextiarysector/textures/items/nugget/silver_nugget.png new file mode 100644 index 0000000000000000000000000000000000000000..65e25b8644a03ed607076de756e474f0cb00d105 GIT binary patch literal 272 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~n=}s_)3jA`tAIjtJzX3_EKVmUNU-+oP}#J3^Z&y) zf|vWHs+_#?=FOY`;(9SZ{)2#i+@2ruA|hYpr$?#92>tr?i$_0xUrNQVFPhGYiHgj6 z&NDg+FFrp%Us3`HY;0XUJ|DZeIsL!9UCodBfPf4Cty2$0@E&;Glz)HU!QAtE&z#s$ z`&;_co(BF64<LYFx5XCgsfDGamDJr%qL2yLW+^;p-a*6@`2yklz_RUHx3v IIVCg!0Klni>i_@% literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/nugget/steel_nugget.png b/src/main/resources/assets/sextiarysector/textures/items/nugget/steel_nugget.png new file mode 100644 index 0000000000000000000000000000000000000000..3ccf41e9ae2314197bd381a443d4dba51a3202f1 GIT binary patch literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~n=}uL@mHrBA)wG~PZ!4!i_>rW4Y>{*@VM^x)=#)~ z)BVG$v(i&+_KUk4c% z7r(o~B`nxu$f2n4JSMqk^(5!hds_B>S5VSe`bzJhxuz<^0fRZ)IcG#hWIx>NuE~1N z@{WG~#@|grr_z6aRW$HjzfXME#i(%2)Y^M~tN-UG$y}8G$D1Z3VQD)-?eAltGZ{Qx L{an^LB{Ts5YPVx( literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/nugget/zinc_nugget.png b/src/main/resources/assets/sextiarysector/textures/items/nugget/zinc_nugget.png new file mode 100644 index 0000000000000000000000000000000000000000..b67c767bac55a6a9b529bf711a6811fe2b047c98 GIT binary patch literal 272 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~n=}sxbG;t(CZNzW@b!2e5STYlX-Q@B{iVzQo6oQMa9`Ep;s3ctiEG#%lpee;zyIO3=W%H% zH}?JIt&BUs9#P=wu=w5o>FL`g(lqkZ&g?zoF^_lZR28;+7nm8A8#qsc;~w!#x?20;gSv$G%)j1hn`8KAm+i*s-Dwu)csNb8ppVVs%)xWgg z*7SUTAxC1C@1GFWM(g0<^sGr9BB|5-Ot0;In*3?k_L`Xw#0|6(rMxe88ZJ(i?)+=; mH~HxWZJA{svu0SBpOc@K(iHx+*}?$m0R~T3KbLh*2~7ZbEpw~@ diff --git a/src/main/resources/assets/sextiarysector/textures/items/reactor/craft_reactor.png b/src/main/resources/assets/sextiarysector/textures/items/reactor/craft_reactor.png new file mode 100644 index 0000000000000000000000000000000000000000..70b65b58d699108ebafd8e212bd5c8190c852599 GIT binary patch literal 973 zcmV;;12X)HP)xP!KQu8@iA}k@nCZB)CNq$i+iJ@Zcq3MH0bN zKqxsZtp7kuPZdNcG{H+1K~bdm2W-e{UJsku%>GE+-6*wn2SRja-t2pC-hA@*4KQYt z_#c%b2ms0(cAutc#K(@0k5RAJrJ#8-?|l9Yn0X3VT~PXohGMbkeHdj~9ef@DDsMoV z;G_Lc06?KoK&R7jN!MyM*F39h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-`=#&gZL}3cc0GYfyEC*WSe9Of3_$2{OL8R&}| z4xx^D00b>CG5A1|B$8(jEQr@z$OS_qhen@xJZO&x%&x$&R=AB!CgVImF!R7oe&F$- zh5CUl58Tuf%{=g(R!`LL4ZGyRRsEnD4;M-!)DBUDM9%2bbi$;N=G%4?G@t z^+eY^2zM_Lf6nB=@6(y{`voWYL9_b>$2{mA+(N#xiqAh%hOO+92bb%9!Mks~RQHV@ d4=w@^egS|80<-r`SQ-ET002ovPDHLkV1hES!s-A3 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/reactor/object_reactor.png.mcmeta b/src/main/resources/assets/sextiarysector/textures/items/reactor/object_reactor.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/src/main/resources/assets/sextiarysector/textures/items/reactor/object_reactor.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/src/main/resources/assets/sextiarysector/textures/items/unit/debug_unit.png b/src/main/resources/assets/sextiarysector/textures/items/unit/debug_unit.png new file mode 100644 index 0000000000000000000000000000000000000000..a9730139ee482bf284ad278f3e308c0ece2c3bba GIT binary patch literal 984 zcmV;}11J26P)WFU8GbZ8()Nlj2>E@cM*00TTpL_t(o!{wLFZrer> z$A3#wH0da|X14*A$DdERGp8o6Rrgis<5y zlZ#kn002DL*}?ah2!b)Mk6MJ|F)OPp2qEb8`b1HP5Ee=)gb)k{1A-txN{Ijv5Xay+ zHlFA6)Alxpt$(RjuLAJy-30*8pB#RJAutjIV}8E*8;{T6RR`*IaBS!gVc64SIe~5; zh5@`egD{#QmIa$@&_DkRw*ng;oVKC9b-x(E>!TI`kI&%VFR<)`B|ybmiImCQFw#K6 z2$a%Fl}i45OB(F5uYvyY2!b*Xi~>F7Wm_-2z3mc(;rtY`z_zpBCX-~W|2Z5ylRSL^ zjq7iV0eHR-K)s@^naB`1$yc7XHZAG-jt$ z{Xtf75s1%z4$Q{ybf8){DbM`p9_S**6ZEM^l{x{0QR(WS*hf7 zobp^Y%4T~7v)(i)c^=CEFbJ#5uu@HsOQ|<9>6jj;mE`fqThfot2vrPVYwMa$$Brh| z-~S{%;APh|eqZ@$JT2RCJ`daqG#hX(tzrPZ-r#cl@ORzIt=DyXX86$U>qEt4hvR6D zoVMo|p<6d}lj^ON^@L;Hg*2MK>i1EA=lPfHRZ8KnNr*vMf~(al{II^s@yQ9bjW#lp zI?f_#aDrh#qxmBMgTe6IyP64;dX1X+qPJ9YH51?c?f5@bE_$8A;6ic$0000WFU8GbZ8()Nlj2>E@cM*00X8;L_t(o!{wJxiyTE5 z#(&k_GuypRc6ZiIz@0!wStLt@5I?}6pessHJiFir2zblYn-@QWha7T=x5Qw`qVXRj zqM~>ZMV57UlU;P#874h{dZxRk+e39v_ssNk4~j{^f`;n1tLu5*dY`xIEfE9(kF#k! z=4M2lYPI^vmcnc9anKCJ2mye1H#f1YIUJ|Y{rz3sexHTK1%wc^T5UYfMF2z=$2Pq{2KtK?HVd$8q#o6_B_ICfER5}5`!-q`(zWr+N2@FBh9H&oh?E~%{!%iK_ zWiWJTccI%-eK`QT4P6KRJODwO||`_t=RJIFh0|AX20J4YMfNkbwSRvWjOTT-y}3D` zYnL*72BW&E*Xz{l^=uK23u|0-H?DS5i6-rS5EDs;F-?U3`BpqFYi3%3k=2m1+asG{ z|IZJzq|xSA?GkktB|G4-k37eO;`UH3*l2NW)slEqf1Lj(=eFH zd-Ta#A^JZmP|`v?LLg#Tnumo_%v{Par<3_DM@gopm{7px9AQTI*#uTspHb;pSL*%p zySN4%R!#j$@LoSWwuAK06bn$TKtpQT1X``mu>avls+Lp}lqepa1{>07*qo IM6N<$f`vTvMgRZ+ literal 0 HcmV?d00001 From 08ec7716e771398cf6c9fde26ba9157a2578ef72 Mon Sep 17 00:00:00 2001 From: TunkShif Date: Mon, 20 Jul 2015 09:31:29 +0800 Subject: [PATCH 81/96] Create zh_CN.lang --- .../assets/sextiarysector/lang/zh_CN.lang | 779 ++++++++++++++++++ 1 file changed, 779 insertions(+) create mode 100644 src/main/resources/assets/sextiarysector/lang/zh_CN.lang diff --git a/src/main/resources/assets/sextiarysector/lang/zh_CN.lang b/src/main/resources/assets/sextiarysector/lang/zh_CN.lang new file mode 100644 index 0000000..07557ce --- /dev/null +++ b/src/main/resources/assets/sextiarysector/lang/zh_CN.lang @@ -0,0 +1,779 @@ +#简体中文 zh_CN + +#方块 +tile.ss.large_furnace.name=大型熔炉 +tile.ss.fluid_furnace.name=流体熔炉 + +tile.ss.food_smokers.name=熏制机 + +tile.ss.magic_furnace.name=魔力熔炉 +tile.ss.freezer.name=冷冻机 + +tile.ss.wood_grate.name=木栏杆 + +tile.ss.oak_wood_plate.name=橡树木板 +tile.ss.birch_wood_plate.name=白桦木板 +tile.ss.spruce_wood_plate.name=云杉木板 +tile.ss.jungle_wood_plate.name=丛林木板 +tile.ss.acacia_wood_plate.name=金合欢木板 +tile.ss.big_oak_wood_plate.name=深色橡树木板 + +tile.ss.iron_plate.name=铁板 +tile.ss.gold_plate.name=金板 + +tile.ss.hole.name=坑田 +tile.ss.farmland.name=农田 +tile.ss.paddy.name=稻田 +tile.ss.wood.name=原木 + +tile.ss.bottle.name=流体瓶 +tile.ss.fluid_crafter.name=流体气泡 +tile.ss.square.name=木槽 + +tile.ss.tank.name=储罐 +tile.ss.funnel.name=流体漏斗 +tile.ss.copper_pipe.name=铜质管道 + + +tile.ss.wood_hopper.name=木质漏斗 + +tile.ss.chunk_loader.name=时空载入器 + +tile.ss.figure.name=成就台 + +tile.ss.trap.name=陷阱 + +tile.ss.drinking_water.name=饮用水 +tile.ss.hot_springs.name=温泉水 + + +tile.ss.blue_stone.name=蓝石矿石 +tile.ss.yellow_stone.name=黄石矿石 + +tile.ss.copper_ore.name=铜矿石 +tile.ss.zinc_ore.name=锌矿石 +tile.ss.silver_ore.name=银矿石 + +tile.ss.mithril_ore.name=秘银矿石 +tile.ss.orichalcum_ore.name=山铜矿石 + +tile.ss.coal_large_ore.name=大型煤矿石 +tile.ss.iron_large_ore.name=大型铁矿石 +tile.ss.gold_large_ore.name=大型金矿石 + +tile.ss.copper_block.name=铜方块 +tile.ss.zinc_block.name=锌方块 +tile.ss.silver_block.name=银方块 +tile.ss.steel_block.name=钢方块 +tile.ss.brass_block.name=黄铜方块 +tile.ss.ninja_block.name=忍者方块 +tile.ss.mithril_block.name=秘银方块 +tile.ss.orichalcum_block.name=山铜方块 + + +tile.ss.small_windmill.name=小型风车 +tile.ss.windmill.name=风车 +tile.ss.large_windmill.name=大型风车 +tile.ss.small_waterwheel.name=小型水车 +tile.ss.steam_motor.name=蒸汽引擎 + +tile.ss.wood_shaft.name=木轴 +tile.ss.stone_shaft.name=石轴 +tile.ss.steel_shaft.name=钢轴 +tile.ss.ninja_shaft.name=忍者轴 +tile.ss.orichalcum_shaft.name=山铜轴 + +tile.ss.wood_gear_box.name=木质变速箱 +tile.ss.stone_gear_box.name=石质变速箱 +tile.ss.steel_gear_box.name=钢质变速箱 +tile.ss.ninja_gear_box.name=忍者变速箱 +tile.ss.orichalcum_gear_box.name=山铜变速箱 + +tile.ss.wood_gf_tank.name=木质GF罐 +tile.ss.stone_gf_tank.name=石质GF罐 +tile.ss.steel_gf_tank.name=钢质GF罐 +tile.ss.ninja_gf_tank.name=忍者GF罐 +tile.ss.orichalcum_gf_tank.name=山铜GF罐 + +tile.ss.wood_stone_gear_shaft.name=木石齿轮轴 +tile.ss.stone_steel_gear_shaft.name=石钢齿轮轴 +tile.ss.steel_ninja_gear_shaft.name=忍钢齿轮轴 +tile.ss.ninja_orichalcum_gear_shaft.name=忍铜齿轮轴 + +tile.ss.machine_frame.name=机械框架 +tile.ss.millstone.name=磨石 +tile.ss.loom.name=织布机 +tile.ss.sawmill.name=锯木机 +tile.ss.spinning_machine.name=纺纱机 +tile.ss.pulverizer.name=磨粉机 +tile.ss.extractor.name=提取机 +tile.ss.rolling_machine.name=辊压机 +tile.ss.mana_squeezer.name=魔力压榨机 +tile.ss.time_machine.name=时光机 + + +tile.ss.fan.name=风扇 +tile.ss.saw.name=锯子 +tile.ss.pump.name=水泵 +tile.ss.suction_machine.name=抽吸机 + + +tile.ss.creeper_chest.name=爬行者商人箱子 +tile.ss.shipping_box.name=船舶箱子 + +tile.ss.turnip.name=萝卜种子 +tile.ss.cucumber.name=黄瓜种子 +tile.ss.iron_turnip.name=铁萝卜种子 + +tile.ss.onion.name=洋葱种子 +tile.ss.tomato.name=番茄种子 +tile.ss.corn.name=玉米种子 +tile.ss.golden_corn.name=金玉米种子 + +tile.ss.eggplant.name=茄子种子 +tile.ss.sweet_potato.name=番薯种子 +tile.ss.green_pepper.name=青椒种子 + +tile.ss.radish.name=白萝卜种子 + +tile.ss.rice.name=稻米种子 + +tile.ss.mushroom_red.name=红蘑菇种子 +tile.ss.shiitake.name=香菇种子 + + +tile.ss.sandpit.name=沙坑 + +tile.ss.boarding_buoy.name=上船浮标 +tile.ss.powered_buoy.name=充能浮标 +tile.ss.detector_buoy.name=探测浮标 + +tile.ss.monitor.name=监视器 +monitor.type=类型 +monitor.creeper=简单爬行者商店 +monitor.robot=蓝色机器人商店 + +tile.ss.electric_motor.name=电力引擎 +tile.ss.tofu_motor.name=豆腐引擎 +tile.ss.gf_dynamo.name=GF发电机 + +#Item +item.ss.unit.name=单元 + +item.ss.wood_gear.name=木质齿轮 +item.ss.stone_gear.name=石质齿轮 +item.ss.steel_gear.name=钢质齿轮 +item.ss.ninja_gear.name=忍者齿轮 +item.ss.orichalcum_gear.name=山铜齿轮 + +item.ss.wood_unit_gear.name=木质齿轮单元 +item.ss.stone_unit_gear.name=石质齿轮单元 +item.ss.steel_unit_gear.name=钢质齿轮单元 +item.ss.ninja_unit_gear.name=忍者齿轮单元 +item.ss.orichalcum_unit_gear.name=山铜齿轮单元 + +item.ss.wood_gf_storage.name=木质GF存储器 +item.ss.stone_gf_storage.name=石质GF存储器 +item.ss.steel_gf_storage.name=钢质GF存储器 +item.ss.ninja_gf_storage.name=忍者GF存储器 +item.ss.orichalcum_gf_storage.name=山铜GF存储器 + +item.ss.hammer.name=锤子 +item.ss.color_spray.name=彩色喷雾 + +item.ss.calendar.name=日历 +item.ss.season_stone.name=季节之石 +item.ss.season_stone_spring.name=季节之石 -春季- +item.ss.season_stone_summer.name=季节之石 -夏季- +item.ss.season_stone_autumn.name=季节之石 -秋季- +item.ss.season_stone_winter.name=季节之石 -冬季- + + + +item.ss.dust_waterlily.name=睡莲粉末 + +item.ss.stone_dust.name=石头粉 + +item.ss.dust_blue_stone.name=蓝石粉 +item.ss.dust_yellow_stone.name=黄石粉 + +item.ss.coal_dust.name=煤粉 +item.ss.iron_dust.name=铁粉 +item.ss.gold_dust.name=金粉 +item.ss.diamond_dust.name=钻石粉 + +item.ss.copper_dust.name=铜粉 +item.ss.zinc_dust.name=锌粉 + +item.ss.mithril_dust.name=秘银粉 + + +item.ss.iron_nugget.name=铁粒 +item.ss.copper_nugget.name=铜粒 +item.ss.zinc_nugget.name=锌粒 +item.ss.silver_nugget.name=银粒 + +item.ss.steel_nugget.name=钢粒 +item.ss.ninja_nugget.name=忍者粒 + + +item.ss.steel_ingot.name=钢锭 +item.ss.brass_ingot.name=黄铜锭 + +item.ss.bluestone_ingot.name=蓝石锭 +item.ss.yellowstone_ingot.name=黄石锭 + +item.ss.copper_ingot.name=铜锭 +item.ss.zinc_ingot.name=锌锭 +item.ss.silver_ingot.name=银锭 + +item.ss.mithril_ingot.name=秘银锭 +item.ss.orichalcum_gem.name=山铜锭 + +item.ss.ninja_ingot.name=忍者锭 + +item.ss.red_gel.name=红石凝胶 +item.ss.blue_gel.name=蓝石凝胶 +item.ss.yellow_gel.name=黄石凝胶 + + +item.ss.craft_reactor.name=合成反应器 +item.ss.energy_reactor.name=能源反应器 +item.ss.object_reactor.name=目标反应器 + + + +item.ss.empty_bottle.name=空瓶 +item.ss.water_bottle.name=水瓶 +item.ss.lava_bottle.name=岩浆瓶 +item.ss.sap_bottle.name=树汁瓶 + +item.ss.steam_bucket.name=蒸汽桶 +item.ss.iron_fluid_bucket.name=液态铁桶 +item.ss.gold_fluid_bucket.name=液态金桶 + +item.ss.magic_dust.name=魔力粉 + + +item.ss.silk_bobbin.name=丝绸卷 +item.ss.silk_cloth.name=丝绸布匹 +item.ss.small_cloth.name=小型布匹 +item.ss.canvas.name=帆布 +item.ss.drying_flesh.name=干燥腐肉 +item.ss.flesh_bobbin.name=辣条 +item.ss.string_mass.name=线团 +item.ss.strong_string.name=厚实线 +item.ss.strong_string_bobbin.name=厚实线筒 +item.ss.strong_cloth.name=厚实布匹 +item.ss.strong_canvas.name=厚实帆布 + + +item.ss.figure_box.name=奖励台箱 + + +item.ss.wood_scoop.name=木铲 +item.ss.stone_scoop.name=石铲 +item.ss.iron_scoop.name=铁铲 +item.ss.gold_scoop.name=金铲 +item.ss.diamond_scoop.name=钻石铲 + +item.ss.wood_knife.name=木质小刀 +item.ss.stone_knife.name=石质小刀 +item.ss.iron_knife.name=铁质小刀 +item.ss.gold_knife.name=金质小刀 +item.ss.diamond_knife.name=钻石小刀 + +item.ss.copper_shovel.name=铜锹 +item.ss.copper_pickaxe.name=铜镐 +item.ss.copper_axe.name=铜铲 +item.ss.copper_sword.name=铜剑 +item.ss.copper_hoe.name=铜锄 + +item.ss.brass_shovel.name=黄铜锹 +item.ss.brass_pickaxe.name=黄铜镐 +item.ss.brass_axe.name=黄铜斧 +item.ss.brass_sword.name=黄铜剑 +item.ss.brass_hoe.name=黄铜锄 + +item.ss.ninja_shovel.name=忍者锹 +item.ss.ninja_pickaxe.name=忍者镐 +item.ss.ninja_axe.name=忍者斧 +item.ss.ninja_sword.name=忍者剑 +item.ss.ninja_hoe.name=忍者锄 + + +item.ss.copper_helmet.name=铜头盔 +item.ss.copper_chestplate.name=铜胸甲 +item.ss.copper_leggings.name=铜护腿 +item.ss.copper_boots.name=铜靴子 + +item.ss.ninja_helmet.name=忍者头盔 +item.ss.ninja_chestplate.name=忍者胸甲 +item.ss.ninja_leggings.name=忍者护腿 +item.ss.ninja_boots.name=忍者靴子 + +item.ss.wood_watering_can.name=木质洒水壶 + +item.ss.brass_shears.name=黄铜剪刀 + +item.ss.mineboat_chest.name=箱子小船 +item.ss.mineboat_tank.name=储罐小船 + +item.ss.laver.name=紫菜 + + +item.ss.crop.big=大型 + +item.ss.turnip.name=萝卜 +item.ss.cucumber.name=黄瓜 + +item.ss.iron_turnip.name=铁萝卜 + +item.ss.onion.name=洋葱 +item.ss.tomato.name=番茄 +item.ss.corn.name=玉米 + +item.ss.golden_corn.name=金玉米 + +item.ss.eggplant.name=茄子 +item.ss.sweet_potato.name=甘薯 +item.ss.green_pepper.name=青椒 + +item.ss.blue_potato.name=蓝土豆 + +item.ss.radish.name=白萝卜 + +item.ss.rice.name=稻米 + +item.ss.shiitake.name=香菇 + + +item.ss.white_rice.name=大米 + +item.ss.salt.name=盐 +item.ss.curry_powder.name=咖喱饭 + +item.ss.laver_roasted.name=烤紫菜 + +item.ss.chicken_smoked.name=烟熏鸡肉 +item.ss.porkchop_smoked.name=烟熏猪排 +item.ss.beef_smoked.name=烟熏牛肉 + +item.ss.rice_ball.name=饭团子 +item.ss.curry_rice.name=咖喱饭 + +item.ss.carrot_soup.name=胡萝卜汤 +item.ss.corn_soup.name=玉米汤 +item.ss.egg_soup.name=蛋花汤 +item.ss.mushroom_stew.name=蘑菇煲 +item.ss.onion_soup.name=洋葱汤 +item.ss.ender_soup.name=末影汤 +item.ss.tomato_soup.name=番茄汤 + +item.ss.chocolate.name=巧克力 + +item.ss.drinking_water_bottle.name=饮用水瓶 +item.ss.takumi_tea_bottle.name=TAKUMI茶瓶 + + + +item.ss.shift_hat.name=Shift的帽子 +item.ss.rucksack.name=帆布包 +item.ss.oxygen_tank.name=氧气储罐 +item.ss.gf_contact_lenses.name=GF隐形眼镜 +item.ss.water_contact_lenses.name=水灵隐形眼镜 + +item.ss.craft_unit.name=合成单元 +item.ss.attack_unit.name=攻击单元 +item.ss.defense_unit.name=防御单元 +item.ss.attack_rust_unit.name=生锈攻击单元 +item.ss.defense_rust_unit.name=生锈防御单元 +item.ss.jump_unit.name=跳跃单元 +item.ss.pickaxe_unit.name=采掘单元 + +item.ss.debug_unit.name=调试单元 + + +item.ss.iron_ring.name=铁指环 +item.ss.creeper_ring.name=爬行者商店指环 +item.ss.mp_ring.name=钱币指环 +item.ss.xp_ring.name=经验指环 + + + +#Fluid +fluid.ss.takumi_tea=TAKUMI 茶 +fluid.ss.drinking_water=饮用水 +fluid.ss.spring_water=泉水 +fluid.ss.hot_springs=温泉水 +fluid.ss.steam=蒸汽 +fluid.ss.mana=魔力 +fluid.ss.oxygen=氧气 +fluid.ss.sap=树汁 + +fluid.ss.iron=液态铁 +fluid.ss.gold=液态金 + +fluid.ss.black=黑色 +fluid.ss.red=红色 +fluid.ss.green=绿色 +fluid.ss.brown=棕色 +fluid.ss.blue=蓝色 +fluid.ss.purple=紫色 +fluid.ss.cyan=青色 +fluid.ss.lightgray=淡灰色 +fluid.ss.gray=灰色 +fluid.ss.pink=粉色 +fluid.ss.lime=黄绿色 +fluid.ss.yellow=黄色 +fluid.ss.lightblue=淡蓝色 +fluid.ss.magenta=品红色 +fluid.ss.orange=橙色 +fluid.ss.white=白色 + +#Potion +ss.potion.burn=燃烧 +ss.potion.hot_springs=温泉 + +#GUI +container.large_furnace=大型熔炉 +container.sub.inventory=缓存箱 + +container.mineboat_chest=箱子小船 + +gui.ss.fluid_furnace=流体熔炉 +gui.ss.food_smokers=熏制机 +gui.ss.magic_furnace=魔力熔炉 +gui.ss.freezer=冷冻机 +gui.ss.funnel=流体漏斗 + +gui.ss.shipping_box=船舶箱子 + + +gui.ss.rucksack=帆布包 + +gui.ss.steam_motor=蒸汽引擎 + +gui.ss.millstone=磨石 +gui.ss.loom=织布机 +gui.ss.sawmill=锯木机 +gui.ss.spinning_machine=纺纱机 +gui.ss.extractor=提取机 +gui.ss.pulverizer=磨粉机 +gui.ss.rolling_machine=辊压机 +gui.ss.mana_squeezer=魔力压榨机 +gui.ss.time_machine=时光机 + +gui.ss.gf_tank_1=木质GF罐 +gui.ss.gf_tank_2=石质GF罐 +gui.ss.gf_tank_3=钢质GF罐 +gui.ss.gf_tank_4=忍者GF罐 +gui.ss.gf_tank_5=山铜GF罐 + +#Shop +shop.ss.creeper=爬行者商店 +shop.ss.robot=红色机器人商店 + +#ToolTip +tooltip.season.pm=下午 +tooltip.season.am=上午 +tooltip.season.day=天数 + +tooltip.season=季节 +tooltip.season.seed=季节 +tooltip.season.spring=春季 +tooltip.season.summer=夏季 +tooltip.season.autumn=秋季 +tooltip.season.winter=冬季 + +tooltip.name=名字 +tooltip.edition=版本 + +#Edition +edition.creative=创造模式栏 +edition.achievement=成就 +edition.figure_beginner=初学者 +edition.ore_festival=矿物节日 + +edition.schr0_cleaver=Schr0切肉刀 + +#Tab +itemGroup.ss.core=SextiarySector -核心- +itemGroup.ss.fluid=SextiarySector -流体- +itemGroup.ss.player=SextiarySector -玩家- +itemGroup.ss.agriculture=SextiarySector -农业- +itemGroup.ss.fishery=SextiarySector -渔业- +itemGroup.ss.mining=SextiarySector -矿业- +itemGroup.ss.industry=SextiarySector -工业- +itemGroup.ss.cooking=SextiarySector -烹饪- +itemGroup.ss.transport=SextiarySector -交通- +itemGroup.ss.economy=SextiarySector -经济- +itemGroup.ss.magic=SextiarySector -魔法- + +#Player Tab +player.tab.vanilla=原版 +player.tab.equipment=设备 +player.tab.item.ss.craft_unit=合成 + +player.tab.item.ss.rucksack=帆布包 + +player.tab.item.ss.creeper_ring=爬行者商店 + +#Achievement +stat.sell=贩卖 + +achievement.ss.core=SS2 -核心- + +achievement.ss.moisture=湿度 +achievement.ss.moisture.desc=让整个世界水化吧 +achievement.ss.moisture.desc2=光滑的皮肤 + +achievement.ss.bottle=瓶子 +achievement.ss.bottle.desc=合成一个瓶子 +achievement.ss.bottle.desc2=强化的瓶子 + +achievement.ss.drinking_water=饮用水 +achievement.ss.drinking_water.desc=冶炼水瓶 +achievement.ss.drinking_water.desc2=美味! + +achievement.ss.craft_furnace=合成熔炉 +achievement.ss.craft_furnace.desc=合成一个大型熔炉 +achievement.ss.craft_furnace.desc2=更复杂的合成 + +achievement.ss.hammer=锤子! +achievement.ss.hammer.desc=合成一个大型锤子 +achievement.ss.hammer.desc2=无敌了? + +achievement.ss.fluid_furnace=融解 +achievement.ss.fluid_furnace.desc=合成一个流体熔炉 +achievement.ss.fluid_furnace.desc2=它能够接触熔液 + +achievement.ss.freezer=最新的冷冻机 +achievement.ss.freezer.desc=合成一个冷冻机 +achievement.ss.freezer.desc2=它... + + +achievement.ss.agriculture=SS2 -农业- + +achievement.ss.data=作物数据 + +achievement.ss.seed=第一颗种子 +achievement.ss.seed.desc=购买一粒种子 +achievement.ss.seed.desc2=提高 + +achievement.ss.scoop=铲子 +achievement.ss.scoop.desc=合成一把铲子 +achievement.ss.scoop.desc2=友好的接触 + +achievement.ss.farmland=农田 +achievement.ss.farmland.desc=对原版耕地使用铲子 +achievement.ss.farmland.desc2=坚固有力! + +achievement.ss.watering_can=洒水壶 +achievement.ss.watering_can.desc=合成一个洒水壶 +achievement.ss.watering_can.desc2=飞溅的水花 + +achievement.ss.hole=坑田 +achievement.ss.hole.desc=对泥土使用铲子 +achievement.ss.hole.desc2=有谁是一个洞嘛? + +achievement.ss.paddy=稻田 +achievement.ss.paddy.desc=对坑田使用水桶 +achievement.ss.paddy.desc2=种植稻米吧! + +## +achievement.ss.turnip=萝卜 +achievement.ss.turnip.desc=采摘一个萝卜 + +achievement.ss.iron_turnip=铁萝卜 +achievement.ss.iron_turnip.desc=采摘一个铁萝卜 + +achievement.ss.cucumber=黄瓜 +achievement.ss.cucumber.desc=采摘一个黄瓜 + + +achievement.ss.onion=洋葱 +achievement.ss.onion.desc=采摘一个洋葱 + +achievement.ss.tomato=番茄 +achievement.ss.tomato.desc=采摘一个番茄 + +achievement.ss.corn=玉米 +achievement.ss.corn.desc=采摘一个玉米 + +achievement.ss.golden_corn=金玉米 +achievement.ss.golden_corn.desc=采摘一个金玉米 + + +achievement.ss.eggplant=茄子 +achievement.ss.eggplant.desc=采摘一个茄子 + +achievement.ss.sweet_potato=甘薯 +achievement.ss.sweet_potato.desc=采摘一个甘薯 + +achievement.ss.green_pepper=青椒 +achievement.ss.green_pepper.desc=采摘一个青椒 + + +achievement.ss.radish=白萝卜 +achievement.ss.radish.desc=采摘一个白萝卜 + + +achievement.ss.rice=稻米 +achievement.ss.rice.desc=采摘一个稻米 + +achievement.ss.shiitake=香菇 +achievement.ss.shiitake.desc=采摘一个香菇 + +achievement.ss.mining=SS2 -矿业- + +achievement.ss.bluestone_dust=不同的颜色! +achievement.ss.bluestone_dust.desc=采掘一个蓝石 +achievement.ss.bluestone_dust.desc2=多美啊! + +achievement.ss.copper_ore=新兴矿产 +achievement.ss.copper_ore.desc=采掘一个铜矿石 +achievement.ss.copper_ore.desc2=三个 + +achievement.ss.silver_ore=预防暗杀 +achievement.ss.silver_ore.desc=采掘一个银矿石 +achievement.ss.silver_ore.desc2=显象了? + +achievement.ss.mithril_ore=魔法的开始 +achievement.ss.mithril_ore.desc=采掘一个秘银矿 +achievement.ss.mithril_ore.desc2=指环呢? + +achievement.ss.industry=SS2 -工业- + +achievement.ss.blue_gel=不思议凝胶 +achievement.ss.blue_gel.desc=合成一个蓝色凝胶 +achievement.ss.blue_gel.desc2=多么棒啊 + + +achievement.ss.wood_gear=新兴能源 +achievement.ss.wood_gear.desc=合成一个木质齿轮 +achievement.ss.wood_gear.desc2=它的名字叫GF ! + +achievement.ss.small_windmill=来自清风的力量 +achievement.ss.small_windmill.desc=合成一个小型风车 +achievement.ss.small_windmill.desc2=风是极好的 + +achievement.ss.millstone=机器 +achievement.ss.millstone.desc=合成一个磨石 +achievement.ss.millstone.desc2=磨粉面粉 + +achievement.ss.loom=布匹! +achievement.ss.loom.desc=合成一个织布机 +achievement.ss.loom.desc2=去掉表面! + + +achievement.ss.stone_gear=能源升级 +achievement.ss.stone_gear.desc=合成一个石头齿轮 +achievement.ss.stone_gear.desc2=和石头相比? + +achievement.ss.windmill=气流上升 +achievement.ss.windmill.desc=合成一个风车 +achievement.ss.windmill.desc2=哭泣的风 + +achievement.ss.small_waterwheel=水的力量 +achievement.ss.small_waterwheel.desc=合成一个小型水车 +achievement.ss.small_waterwheel.desc2=请勿靠近岩浆! + +achievement.ss.sawmill=刀锋战士? +achievement.ss.sawmill.desc=合成一个锯子 +achievement.ss.sawmill.desc2=让我们一起粉身碎骨! + +achievement.ss.spinning_machine=轻量级工业 +achievement.ss.spinning_machine.desc=合成一个纺织机 +achievement.ss.spinning_machine.desc2=让我们来玩翻绳游戏 + + +achievement.ss.steel_gear=钢的力量 +achievement.ss.steel_gear.desc=合成一个钢质齿轮 +achievement.ss.steel_gear.desc2=缺煤不? + +achievement.ss.steam_motor=蒸汽动力 +achievement.ss.steam_motor.desc=合成一个蒸汽引擎 +achievement.ss.steam_motor.desc2=工业革新 + +achievement.ss.large_windmill=大型风车… +achievement.ss.large_windmill.desc=合成一个大型风车 +achievement.ss.large_windmill.desc2=强大的力量 + +achievement.ss.pulverizer=工业纪元 +achievement.ss.pulverizer.desc=合成一个磨粉机 +achievement.ss.pulverizer.desc2=老板来两份! + +achievement.ss.extractor=未来 +achievement.ss.extractor.desc=合成一个提取机 +achievement.ss.extractor.desc2=提纯设备? + +achievement.ss.fan=Oh~~~ +achievement.ss.fan.desc=合成一个风扇 +achievement.ss.fan.desc2=蓝色火焰? + +achievement.ss.saw=方块破坏机 +achievement.ss.saw.desc=合成一个锯子 +achievement.ss.saw.desc2=仅仅破坏掉而已 + +achievement.ss.ninja_gear=神秘之力 ? +achievement.ss.ninja_gear.desc=合成一个忍者齿轮 +achievement.ss.ninja_gear.desc2=来自霓虹国! + +achievement.ss.rolling_machine=切板 +achievement.ss.rolling_machine.desc=合成一个辊压机 +achievement.ss.rolling_machine.desc2=这可是一个极好的切板! + +achievement.ss.mana_squeezer=大地之祝福 +achievement.ss.mana_squeezer.desc=合成一个魔力压榨机 +achievement.ss.mana_squeezer.desc2=农业自动化? + +achievement.ss.orichalcum_gear=神秘之力! +achievement.ss.orichalcum_gear.desc=合成一个山铜齿轮 +achievement.ss.orichalcum_gear.desc2=最终的内容 + +achievement.ss.time_machine=时光机 +achievement.ss.time_machine.desc=合成一个时光机 +achievement.ss.time_machine.desc2=世界线都不一样了呢! + +achievement.ss.economy=SS2 -经济- + +achievement.ss.creeper_firework=爬行者商人 +achievement.ss.creeper_firework.desc=企图通过烟火来传达讯号 +achievement.ss.creeper_firework.desc2=爆炸! + +achievement.ss.creeper_chest=爬行者箱子 +achievement.ss.creeper_chest.desc=让我们单独在床上 +achievement.ss.creeper_chest.desc2=圣诞苦力怕? + +achievement.ss.shipping=船舶方块 +achievement.ss.shipping.desc=试试来装载货物 +achievement.ss.shipping.desc2=我可是百万富翁! + + +#NEI +nei.recipe=合成配方 +nei.ss.furnace.shaped=熔炉有序配方 +nei.ss.furnace.shapeless=熔炉无序配方 + +nei.ss.fluid_furnace=流体熔炉配方 +nei.ss.food_smokers=熏制机配方 + +nei.ss.magic_furnace=魔力熔炉配方 +nei.ss.magic_fuel=魔力燃料 + +nei.ss.freezer=冷冻机配方 +nei.ss.ice=fuel=冷冻燃料 + +nei.ss.millstone=磨石配方 +nei.ss.loom=织布机配方 +nei.ss.sawmill=锯木机配方 +nei.ss.spinning_machine=纺纱机配方 +nei.ss.extractor=提取机配方 +nei.ss.pulverizer=磨粉机配方 +nei.ss.rolling_machine=辊压机配方 +nei.ss.mana_squeezer=魔力压榨机配方 +nei.ss.time_machine=时光机配方 + +nei.ss.fertilizer_farmland=农田作物突变 +nei.ss.fertilizer_paddy=稻田作物突变 From c533348e3f8f28418e03b985a7ce84d178d60338 Mon Sep 17 00:00:00 2001 From: shift02 Date: Sat, 25 Jul 2015 20:19:08 +0900 Subject: [PATCH 82/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20:=20=E5=87=BA?= =?UTF-8?q?=E8=8D=B7=E7=AE=B1=E3=82=92=E7=A0=B4=E5=A3=8A=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・bronzeのナイフとスコップを追加 --- build.gradle | 2 +- .../java/shift/sextiarysector/SSFluids.java | 6 +- .../java/shift/sextiarysector/SSItems.java | 11 ++++ .../shift/sextiarysector/SextiarySector.java | 2 +- .../block/BlockShippingBox.java | 8 ++- .../shift/sextiarysector/plugin/PluginTC.java | 53 ++++++++++++++++++ .../sextiarysector/recipe/RecipesTool.java | 6 +- .../assets/sextiarysector/lang/en_US.lang | 7 +++ .../textures/guis/ender_stele.png | Bin 0 -> 1409 bytes 9 files changed, 86 insertions(+), 9 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/plugin/PluginTC.java create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/ender_stele.png diff --git a/build.gradle b/build.gradle index 8b24c66..997b9dd 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.4.0.d-${project.minecraft.version}" +version = "2.4.1.a-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index f0a3fce..dc99d7e 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -91,7 +91,11 @@ public static Fluid registerFluid(String fluidName, int type, int color, int moi boolean t = FluidRegistry.registerFluid(f); if (!t) { - f = FluidRegistry.getFluid(fluidName); + + if (FluidRegistry.getFluid(fluidName) != null) { + f = FluidRegistry.getFluid(fluidName); + } + } return f; diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index c7ee7ba..c073e84 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -162,12 +162,17 @@ public class SSItems { public static Item goldScoop; public static Item diamondScoop; + public static Item brassScoop; + //public static Item diamondScoop; + public static Item woodKnife; public static Item stoneKnife; public static Item ironKnife; public static Item goldKnife; public static Item diamondKnife; + public static Item brassKnife; + //道具 バニラ // 銅 @@ -546,6 +551,9 @@ public static void initItems() { GameRegistry.registerItem(goldScoop, "GoldScoop"); GameRegistry.registerItem(diamondScoop, "DiamondScoop"); + brassScoop = new ItemScoop(ModuleToolMaterial.brassTool).setUnlocalizedName("ss.brass_scoop").setTextureName("brass_scoop"); + GameRegistry.registerItem(brassScoop, "BrassScoop"); + woodKnife = new ItemKnife(ToolMaterial.WOOD).setUnlocalizedName("ss.wood_knife").setTextureName("wood_knife"); stoneKnife = new ItemKnife(ToolMaterial.STONE).setUnlocalizedName("ss.stone_knife").setTextureName("stone_knife"); ironKnife = new ItemKnife(ToolMaterial.IRON).setUnlocalizedName("ss.iron_knife").setTextureName("iron_knife"); @@ -557,6 +565,9 @@ public static void initItems() { GameRegistry.registerItem(goldKnife, "GoldKnife"); GameRegistry.registerItem(diamondKnife, "DiamondKnife"); + brassKnife = new ItemKnife(ModuleToolMaterial.brassTool).setUnlocalizedName("ss.brass_knife").setTextureName("brass_knife"); + GameRegistry.registerItem(brassKnife, "BrassKnife"); + //バニラ // 銅 copperShovel = new ItemSpade(ModuleToolMaterial.copperTool).setUnlocalizedName("ss.copper_shovel").setTextureName("sextiarysector:tool/copper_shovel").setCreativeTab(SextiarySectorAPI.TabSSCore); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 0c90277..42e4c18 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -38,7 +38,7 @@ public class SextiarySector { public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.4.0"; + public static final String VERSION = "2.4.1"; @Mod.Instance("SextiarySector") public static SextiarySector instance; diff --git a/src/main/java/shift/sextiarysector/block/BlockShippingBox.java b/src/main/java/shift/sextiarysector/block/BlockShippingBox.java index da26c8f..81acb1a 100644 --- a/src/main/java/shift/sextiarysector/block/BlockShippingBox.java +++ b/src/main/java/shift/sextiarysector/block/BlockShippingBox.java @@ -1,11 +1,11 @@ package shift.sextiarysector.block; import net.minecraft.block.Block; -import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import shift.sextiarysector.SSMaterials; import shift.sextiarysector.SextiarySector; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -15,8 +15,10 @@ public class BlockShippingBox extends Block {//extends BlockContainer { private IIcon top; public BlockShippingBox() { - super(Material.wood); - this.setBlockUnbreakable(); + super(SSMaterials.machine); + this.setHardness(0.9f); + this.setHarvestLevel("hammer", 1); + //this.setBlockUnbreakable(); } @Override diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTC.java b/src/main/java/shift/sextiarysector/plugin/PluginTC.java new file mode 100644 index 0000000..e9324f8 --- /dev/null +++ b/src/main/java/shift/sextiarysector/plugin/PluginTC.java @@ -0,0 +1,53 @@ +package shift.sextiarysector.plugin; + +import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PluginTC implements IPlugin { + + @Override + public String getModName() { + return null; + } + + @Override + public void prePlugin(FMLPreInitializationEvent event) { + + } + + @Override + public void preClientPlugin(FMLPreInitializationEvent event) { + + } + + @Override + public void initPlugin(FMLInitializationEvent event) { + + } + + @Override + public void postPlugin(FMLPostInitializationEvent event) { + + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void blockHighlight(DrawBlockHighlightEvent event) + { + + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent(priority = EventPriority.LOWEST) + public void blockHighlightPost(DrawBlockHighlightEvent event) + { + + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java index 17c26df..9e7e5cc 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java @@ -12,8 +12,8 @@ public static void addRecipes(CraftingManager p_77608_1_) { //Scoop - Object[] material = new Object[] { "plankWood", "cobblestone", "ingotIron", "ingotGold", "gemDiamond" }; - Item[] scoop = new Item[] { SSItems.woodScoop, SSItems.stoneScoop, SSItems.ironScoop, SSItems.goldScoop, SSItems.diamondScoop }; + Object[] material = new Object[] { "plankWood", "cobblestone", "ingotIron", "ingotGold", "gemDiamond", "ingotBrass" }; + Item[] scoop = new Item[] { SSItems.woodScoop, SSItems.stoneScoop, SSItems.ironScoop, SSItems.goldScoop, SSItems.diamondScoop, SSItems.brassScoop }; for (int i = 0; i < material.length; i++) { p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(scoop[i], 1), new Object[] { "y", "x", @@ -23,7 +23,7 @@ public static void addRecipes(CraftingManager p_77608_1_) } //Knife - Item[] knife = new Item[] { SSItems.woodKnife, SSItems.stoneKnife, SSItems.ironKnife, SSItems.goldKnife, SSItems.diamondKnife }; + Item[] knife = new Item[] { SSItems.woodKnife, SSItems.stoneKnife, SSItems.ironKnife, SSItems.goldKnife, SSItems.diamondKnife, SSItems.brassKnife }; for (int i = 0; i < material.length; i++) { p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(knife[i], 1), new Object[] { " y", "x ", diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index ac63260..520c1b9 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -277,12 +277,19 @@ item.ss.iron_scoop.name=Iron Scoop item.ss.gold_scoop.name=Gold Scoop item.ss.diamond_scoop.name=Diamond Scoop +item.ss.brass_scoop.name=Brass Scoop + + + item.ss.wood_knife.name=Wood Knife item.ss.stone_knife.name=Stone Knife item.ss.iron_knife.name=Iron Knife item.ss.gold_knife.name=Gold Knife item.ss.diamond_knife.name=Diamond Knife +item.ss.brass_knife.name=Brass Knife + + item.ss.copper_shovel.name=Copper Shovel item.ss.copper_pickaxe.name=Copper Pickaxe item.ss.copper_axe.name=Copper Axe diff --git a/src/main/resources/assets/sextiarysector/textures/guis/ender_stele.png b/src/main/resources/assets/sextiarysector/textures/guis/ender_stele.png new file mode 100644 index 0000000000000000000000000000000000000000..d6f49f6db09115642bde08afab4f9bb8365ff706 GIT binary patch literal 1409 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6|H(?D8gCb z5n0T@z;_UY8Fx&~ehU<2FY)wsWxvlZ%)u-EJg$qAfq|9J)5S5Q;?~={8?&XuWe$9t z-^HyaXQMiMdm7gaCw0#U^$M>mIYg%GFUEdD17XuvO(Uva&NpvvMtDj(z)9*5kI=NXhCr z``wCtb%OE!Y8T&sS5`_YuGQsRzU|M;vj0ne&MxIl_;@+u>iutmg8OTJJ)XOpNsF;T z?N&^D_jUbq>2_=r*8Pm%Z_$7Dt7$(Y2g7L<-7oj|?W+6#*xLOgX-;n?k;oes!P8zJOH}X=4YNRpT1md?VZch z-OU#@FkC2D9-Y7Lul>)5o29?c2dXRmyA%jqcyr@1m}Pck{lVtN**}&HwBRstjwdy)Cn4 zV^C6HP+($$P~PV^Gem4LK9+s@rbHRTg-3H67!L64-o0CoF=3|o>wo|LSs%ZB^QIs} zMpJvtn%t;AdW;K>cE>Xyhz&oY_xxaG=-z*{+kVlr^GrN!&8_u)I;a1A6%5=r@9Cv) zN8^7pERjFpdg}8Z`@ft0z8(7?dJ#K6IzfM6&vEMs6{5MXcsC3S3!6+5H$ z>p4tIo%np``sIr8{AVwBc5Ko)-O&-XpMgc?@IwP7CAYTA{z^~h$(>!r?DtD zHc0LGx|NZ=`QV-T3a2+o^dCQFcy90Um*0Pfz531J@Qdw?^7+p&(T}sH>M`PQE67j> z1|MK@y5O{Z9{YsU$S0L{-_;HK3Rf)mbD5GF>E?3BqT*nu!?BfzEv^bTwjEA%aRDaf zFUDt-${1cs8}O^&lSsc;IEUkjA?^?n00vhuFdVl`5N_-V{#_U$qs}C`{M%y-!56k~ z87`S8$ocItJhunPKaq?GXk0;`p$O5v!D9P74wlj;u;s1 z<(FShaSfailkt*o!R6Oq&#?7AWIWIwIQPJ%DHkrxk7b}0h+wK`-euSFv{>kV9moz( LS3j3^P6 Date: Sun, 26 Jul 2015 11:48:08 +0900 Subject: [PATCH 83/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E3=83=86?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E3=83=81=E3=83=A3=E3=81=AE=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E3=83=9F=E3=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・テクスチャが無くてエラーが出ていた箇所を修正 --- .../block/BlockBoardingBuoy.java | 2 +- .../block/BlockPoweredBuoy.java | 2 +- .../sextiarysector/block/BlockSSFluid.java | 33 ++++++++++++------ .../sextiarysector/plugin/PluginIC2.java | 20 +++++------ .../sextiarysector/plugin/PluginTofu.java | 4 +-- .../textures/blocks/buoy/boarding_buoy.png | Bin 0 -> 268 bytes 6 files changed, 35 insertions(+), 26 deletions(-) create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy.png diff --git a/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java b/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java index 4249c46..7e446eb 100644 --- a/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java +++ b/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java @@ -275,7 +275,7 @@ public void registerBlockIcons(IIconRegister par1IconRegister) } - this.blockIcon = par1IconRegister.registerIcon(this.getTextureName()); + this.blockIcon = blockIcons[0];//par1IconRegister.registerIcon(this.getTextureName()); } diff --git a/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java b/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java index eaefac2..fe873b6 100644 --- a/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java +++ b/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java @@ -181,7 +181,7 @@ public void registerBlockIcons(IIconRegister par1IconRegister) } - this.blockIcon = par1IconRegister.registerIcon(this.getTextureName()); + this.blockIcon = blockIcons[0];//par1IconRegister.registerIcon(this.getTextureName()); } diff --git a/src/main/java/shift/sextiarysector/block/BlockSSFluid.java b/src/main/java/shift/sextiarysector/block/BlockSSFluid.java index 48d7e49..5bd6e6d 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSSFluid.java +++ b/src/main/java/shift/sextiarysector/block/BlockSSFluid.java @@ -3,6 +3,7 @@ import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; import net.minecraft.block.material.MaterialLiquid; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraftforge.fluids.BlockFluidClassic; @@ -10,30 +11,40 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockSSFluid extends BlockFluidClassic{ +public class BlockSSFluid extends BlockFluidClassic { public static final Material water = new SSMaterial(); + public BlockSSFluid(Fluid fluid) { super(fluid, Material.water); } + @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(int p_149691_1_, int p_149691_2_) - { - if(p_149691_2_ == 0){ + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + if (p_149691_2_ == 0) { return this.getFluid().getStillIcon(); - }else{ + } else { return this.getFluid().getFlowingIcon(); } - } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) + { + //this.blockIcon = p_149651_1_.registerIcon(this.getTextureName()); + } + @Override @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) - { - return this.getFluid().getColor(); - } + public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) + { + return this.getFluid().getColor(); + } - public static class SSMaterial extends MaterialLiquid{ + public static class SSMaterial extends MaterialLiquid { public SSMaterial() { super(MapColor.waterColor); diff --git a/src/main/java/shift/sextiarysector/plugin/PluginIC2.java b/src/main/java/shift/sextiarysector/plugin/PluginIC2.java index 6284530..8d0381d 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginIC2.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginIC2.java @@ -22,7 +22,6 @@ public class PluginIC2 implements IPlugin { - //1EU -> 3Power 2Speed @Override @@ -39,7 +38,7 @@ public String getModName() { @Override public void prePlugin(FMLPreInitializationEvent event) { - electricMotor = new BlockElectricMotor().setBlockName("ss.electric_motor").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + electricMotor = new BlockElectricMotor().setBlockName("ss.electric_motor").setBlockTextureName("glass").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(electricMotor, ItemBlockDirection.class, "ElectricMotor"); GameRegistry.registerTileEntity(TileEntityElectricMotor.class, "ElectricMotor"); @@ -61,19 +60,18 @@ public void initPlugin(FMLInitializationEvent event) { ic2Dust = GameRegistry.findItem("IC2", "itemDust"); cable = GameRegistry.findItem("IC2", "itemCable"); - SSRecipes.pulverizer.add("oreCopper", new ItemStack(ic2Dust,2,3)); - SSRecipes.pulverizer.add("oreTin", new ItemStack(ic2Dust,2,7)); + SSRecipes.pulverizer.add("oreCopper", new ItemStack(ic2Dust, 2, 3)); + SSRecipes.pulverizer.add("oreTin", new ItemStack(ic2Dust, 2, 7)); CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(this.electricMotor, 1), - new Object[] { "xzx", "xyx","pbp", - Character.valueOf('x'), "paneGlassColorless", - Character.valueOf('y'), SSItems.energyReactor, - Character.valueOf('z'), SSBlocks.steelShaft, - Character.valueOf('b'), new ItemStack(cable,1,0), - Character.valueOf('p'), "plateDenseTin" + new Object[] { "xzx", "xyx", "pbp", + Character.valueOf('x'), "paneGlassColorless", + Character.valueOf('y'), SSItems.energyReactor, + Character.valueOf('z'), SSBlocks.steelShaft, + Character.valueOf('b'), new ItemStack(cable, 1, 0), + Character.valueOf('p'), "plateDenseTin" })); - } @Override diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java index 7668101..a4bc87c 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java @@ -15,7 +15,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class PluginTofu implements IPlugin{ +public class PluginTofu implements IPlugin { @Override public String getModName() { @@ -29,7 +29,7 @@ public String getModName() { @Override public void prePlugin(FMLPreInitializationEvent event) { - tofuMotor = new BlockTofuMotor().setBlockName("ss.tofu_motor").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + tofuMotor = new BlockTofuMotor().setBlockName("ss.tofu_motor").setBlockTextureName("glass").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerBlock(tofuMotor, ItemBlockDirection.class, "TofuMotor"); GameRegistry.registerTileEntity(TileEntityTofuMotor.class, "TofuMotor"); diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy.png b/src/main/resources/assets/sextiarysector/textures/blocks/buoy/boarding_buoy.png new file mode 100644 index 0000000000000000000000000000000000000000..9bada97f1667fa117611d1a4bc9188a65814801a GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*=5*_mEOyq1d1@oW`;zRIOpf) zrskD^_zccPsfi`2DGKG8B^e6tp1uJoda3L{@nlaI#}JFt$$$R;w`W#u;GBMB`{t_u zy0KUONAFtkfB*Ji@$I_*|NlSUr90>9zwZVH|M-&ti40KeSV{ ze_-_UwdCFZJZu8D{rx5!f5~+0qJzwtMvE+lj|>byH=dd-w Date: Wed, 29 Jul 2015 11:06:21 +0800 Subject: [PATCH 84/96] Update zh_CN.lang --- src/main/resources/assets/sextiarysector/lang/zh_CN.lang | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/resources/assets/sextiarysector/lang/zh_CN.lang b/src/main/resources/assets/sextiarysector/lang/zh_CN.lang index 07557ce..ad9a819 100644 --- a/src/main/resources/assets/sextiarysector/lang/zh_CN.lang +++ b/src/main/resources/assets/sextiarysector/lang/zh_CN.lang @@ -277,12 +277,19 @@ item.ss.iron_scoop.name=铁铲 item.ss.gold_scoop.name=金铲 item.ss.diamond_scoop.name=钻石铲 +item.ss.brass_scoop.name=黄铜铲 + + + item.ss.wood_knife.name=木质小刀 item.ss.stone_knife.name=石质小刀 item.ss.iron_knife.name=铁质小刀 item.ss.gold_knife.name=金质小刀 item.ss.diamond_knife.name=钻石小刀 +item.ss.brass_knife.name=黄铜小 + + item.ss.copper_shovel.name=铜锹 item.ss.copper_pickaxe.name=铜镐 item.ss.copper_axe.name=铜铲 From 2094d10f103b96fb580f61c92208557b6af849ca Mon Sep 17 00:00:00 2001 From: shift02 Date: Wed, 29 Jul 2015 14:15:39 +0900 Subject: [PATCH 85/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=EF=BC=9A=E9=8A=80?= =?UTF-8?q?=E3=81=AE=E7=B2=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/shift/sextiarysector/SSBlocks.java | 21 ++++ .../java/shift/sextiarysector/SSItems.java | 4 + .../shift/sextiarysector/SSOreDictionary.java | 5 + .../block/BlockSmallWindmill.java | 54 ++++---- .../event/ClientEventHandler.java | 5 + .../recipe/RecipesPulverizer.java | 2 + .../recipe/RecipesRollingMachine.java | 12 +- .../renderer/block/RendererSmallWindmill.java | 116 ++++++++++-------- .../assets/sextiarysector/lang/en_US.lang | 7 ++ .../sextiarysector/textures/blocks/break.png | Bin 0 -> 512 bytes .../blocks/crop/copper_onion_stage_0.png | Bin 0 -> 634 bytes .../blocks/crop/copper_onion_stage_1.png | Bin 0 -> 698 bytes .../blocks/crop/copper_onion_stage_2.png | Bin 0 -> 744 bytes .../blocks/crop/copper_onion_stage_3.png | Bin 0 -> 749 bytes .../textures/blocks/ore/silver_large_ore.png | Bin 0 -> 596 bytes .../textures/items/dust/silver_dust.png | Bin 0 -> 253 bytes .../textures/items/loom/silk_cloth.png | Bin 337 -> 312 bytes .../textures/items/plate/copper_plate.png | Bin 0 -> 335 bytes .../textures/items/plate/silver_plate.png | Bin 0 -> 321 bytes .../textures/items/plate/zinc_plate.png | Bin 0 -> 335 bytes .../textures/items/ring/iron_ring.png | Bin 374 -> 338 bytes .../textures/items/ring/iron_ring3.png | Bin 0 -> 374 bytes 22 files changed, 141 insertions(+), 85 deletions(-) create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/break.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/copper_onion_stage_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/copper_onion_stage_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/copper_onion_stage_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/crop/copper_onion_stage_3.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_large_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/dust/silver_dust.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/copper_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/silver_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/plate/zinc_plate.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring3.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index e9405df..028a713 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -204,9 +204,14 @@ public class SSBlocks { public static Block woodAcaciaPlate; public static Block woodBigOakPlate; + //プレート public static Block ironPlate; public static Block goldPlate; + public static Block copperPlate; + public static Block zincPlate; + public static Block silverPlate; + public static Block chunkLoader; //鉱石 @@ -224,6 +229,8 @@ public class SSBlocks { public static Block ironLargeOre; public static Block goldLargeOre; + public static Block silverLargeOre; + //鉱石ブロック public static Block copperBlock; public static Block zincBlock; @@ -355,12 +362,22 @@ public static void initBlicks() { woodBigOakPlate = (new BlockSSPane("planks_big_oak", "planks_big_oak", Material.wood, false, 1)).setHardness(0.5F).setBlockName("ss.big_oak_wood_plate").setBlockTextureName(ID + ":plate/wood_big_oak_plate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(woodBigOakPlate, "WoodBigOakPlate"); + //プレート ironPlate = (new BlockSSPane("iron_block", ID + ":iron_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.iron_plate").setBlockTextureName(ID + ":plate/iron_plate").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(ironPlate, "IronPlate"); goldPlate = (new BlockSSPane("gold_block", ID + ":gold_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.gold_plate").setBlockTextureName(ID + ":plate/gold_plate").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(goldPlate, "GoldPlate"); + copperPlate = (new BlockSSPane(ID + ":ore/copper_block", ID + ":ore/copper_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.copper_plate").setBlockTextureName(ID + ":plate/copper_plate") + .setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerBlock(copperPlate, "CopperPlate"); + zincPlate = (new BlockSSPane(ID + ":ore/zinc_block", ID + ":ore/zinc_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.zinc_plate").setBlockTextureName(ID + ":plate/zinc_plate").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerBlock(zincPlate, "ZincPlate"); + silverPlate = (new BlockSSPane(ID + ":ore/silver_block", ID + ":ore/silver_block_top", Material.iron, true, 1)).setHardness(0.5F).setBlockName("ss.silver_plate").setBlockTextureName(ID + ":plate/silver_plate") + .setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerBlock(silverPlate, "SilverPlate"); + chunkLoader = new BlockChunkLoader().setHardness(1.5F).setBlockName("ss.chunk_loader").setBlockTextureName("sextiarysector:time_loader"); GameRegistry.registerBlock(chunkLoader, "ChunkLoader"); @@ -441,6 +458,10 @@ public static void initBlicks() { orichalcumBlock = new BlockOreBlock().setBlockName("ss.orichalcum_block").setBlockTextureName("sextiarysector:ore/orichalcum_block"); GameRegistry.registerBlock(orichalcumBlock, "OrichalcumBlock"); + //large + silverLargeOre = new BlockLargeOre(SSItems.silverDust, SSBlocks.silverOre, 2).setBlockName("ss.silver_large_ore").setBlockTextureName("sextiarysector:ore/silver_large_ore"); + GameRegistry.registerBlock(silverLargeOre, "SilverLargeOre"); + //GF GameRegistry.registerTileEntity(TileEntityShaft.class, "Shaft"); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index c073e84..055c6cd 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -91,6 +91,7 @@ public class SSItems { public static Item copperDust; public static Item zincDust; + public static Item silverDust; public static Item mithrilDust; @@ -400,6 +401,9 @@ public static void initItems() { zincDust = new Item().setUnlocalizedName("ss.zinc_dust").setTextureName("sextiarysector:dust/zinc_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(zincDust, "ZincDust"); + silverDust = new Item().setUnlocalizedName("ss.silver_dust").setTextureName("sextiarysector:dust/silver_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(silverDust, "SilverDust"); + mithrilDust = new Item().setUnlocalizedName("ss.mithril_dust").setTextureName("sextiarysector:dust/mithril_dust").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(mithrilDust, "MithrilDust"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index b3cd4b3..d951a7d 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -54,6 +54,10 @@ public static void init() { OreDictionary.registerOre("plateIron", SSBlocks.ironPlate); OreDictionary.registerOre("plateGold", SSBlocks.goldPlate); + OreDictionary.registerOre("plateCopper", SSBlocks.copperPlate); + OreDictionary.registerOre("plateZinc", SSBlocks.zincPlate); + OreDictionary.registerOre("plateSilver", SSBlocks.silverPlate); + /* OreDictionary.registerOre("plankWood", SSBlocks.woodOakPlate); OreDictionary.registerOre("plankWood", SSBlocks.woodBirchPlate); @@ -75,6 +79,7 @@ public static void init() { OreDictionary.registerOre("dustDiamond", SSItems.diamondDust); OreDictionary.registerOre("dustCopper", SSItems.copperDust); OreDictionary.registerOre("dustZinc", SSItems.zincDust); + OreDictionary.registerOre("dustSilver", SSItems.silverDust); OreDictionary.registerOre("dustMithril", SSItems.mithrilDust); OreDictionary.registerOre("dustBluestone", SSItems.blueStoneDust); OreDictionary.registerOre("dustYellowstone", SSItems.yellowStoneDust); diff --git a/src/main/java/shift/sextiarysector/block/BlockSmallWindmill.java b/src/main/java/shift/sextiarysector/block/BlockSmallWindmill.java index e9c941a..655791f 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSmallWindmill.java +++ b/src/main/java/shift/sextiarysector/block/BlockSmallWindmill.java @@ -12,7 +12,7 @@ import shift.sextiarysector.SextiarySector; import shift.sextiarysector.tileentity.TileEntitySmallWindmill; -public class BlockSmallWindmill extends BlockContainer{ +public class BlockSmallWindmill extends BlockContainer { public BlockSmallWindmill() { super(Material.wood); @@ -31,38 +31,39 @@ private void setDefaultDirection(World par1World, int par2, int par3, int par4) if (!par1World.isRemote) { Block block = par1World.getBlock(par2, par3, par4 - 1); - Block block1 = par1World.getBlock(par2, par3, par4 + 1); - Block block2 = par1World.getBlock(par2 - 1, par3, par4); - Block block3 = par1World.getBlock(par2 + 1, par3, par4); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); - TileEntitySmallWindmill tileEntity = (TileEntitySmallWindmill)par1World.getTileEntity(par2, par3, par4); + TileEntitySmallWindmill tileEntity = (TileEntitySmallWindmill) par1World.getTileEntity(par2, par3, par4); + byte b0 = 3; - byte b0 = 3; + if (block.func_149730_j() && !block1.func_149730_j()) + { + b0 = 3; + } - if (block.func_149730_j() && !block1.func_149730_j()) - { - b0 = 3; - } + if (block1.func_149730_j() && !block.func_149730_j()) + { + b0 = 2; + } - if (block1.func_149730_j() && !block.func_149730_j()) - { - b0 = 2; - } + if (block2.func_149730_j() && !block3.func_149730_j()) + { + b0 = 5; + } - if (block2.func_149730_j() && !block3.func_149730_j()) - { - b0 = 5; - } - - if (block3.func_149730_j() && !block2.func_149730_j()) - { - b0 = 4; - } + if (block3.func_149730_j() && !block2.func_149730_j()) + { + b0 = 4; + } ((TileEntitySmallWindmill) par1World.getTileEntity(par2, par3, par4)).direction = ForgeDirection .getOrientation(b0); + par1World.markBlockForUpdate(par2, par3, par4); + //par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); } } @@ -120,14 +121,13 @@ public boolean isOpaqueCube() { @Override public int getRenderType() - { - return SextiarySector.proxy.smallWindMillType; - } + { + return SextiarySector.proxy.smallWindMillType; + } @Override public TileEntity createNewTileEntity(World world, int p_149915_2_) { return new TileEntitySmallWindmill(); } - } diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 47aea40..6f3ca46 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -137,6 +137,8 @@ public void onItemTooltipEvent(ItemTooltipEvent event) { public static IIcon lavaFlow; public static IIcon lavaStill; + public static IIcon breakIcon; + @SubscribeEvent public void PreTextureStitchEvent(TextureStitchEvent.Pre event) { @@ -160,6 +162,9 @@ public void PreTextureStitchEvent(TextureStitchEvent.Pre event) { portal = event.map.registerIcon("sextiarysector:fluid/portal"); lavaFlow = event.map.registerIcon("sextiarysector:fluid/lava_flow"); lavaStill = event.map.registerIcon("sextiarysector:fluid/lava_still"); + + breakIcon = event.map.registerIcon("sextiarysector:break"); + } } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java b/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java index 82a6bbe..7e37411 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesPulverizer.java @@ -16,6 +16,7 @@ public static void addRecipes(RecipeSimpleMachine recipe) recipe.add("oreGold", new ItemStack(SSItems.goldDust, 2)); recipe.add("oreCopper", new ItemStack(SSItems.copperDust, 2)); recipe.add("oreZinc", new ItemStack(SSItems.zincDust, 2)); + recipe.add("oreSilver", new ItemStack(SSItems.silverDust, 2)); recipe.add("gemDiamond", new ItemStack(SSItems.diamondDust, 1)); recipe.add("oreMithril", new ItemStack(SSItems.mithrilDust, 2)); @@ -25,6 +26,7 @@ public static void addRecipes(RecipeSimpleMachine recipe) recipe.add("ingotGold", new ItemStack(SSItems.goldDust, 1)); recipe.add("ingotCopper", new ItemStack(SSItems.copperDust, 1)); recipe.add("ingotZinc", new ItemStack(SSItems.zincDust, 1)); + recipe.add("ingotSilver", new ItemStack(SSItems.silverDust, 1)); recipe.add("ingotMithril", new ItemStack(SSItems.mithrilDust, 1)); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesRollingMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesRollingMachine.java index 0e26d4d..b8d25be 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesRollingMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesRollingMachine.java @@ -6,11 +6,15 @@ public class RecipesRollingMachine { public static void addRecipes(RecipeSimpleMachine recipe) - { + { - recipe.add("ingotIron",new ItemStack(SSBlocks.ironPlate, 1)); - recipe.add("ingotGold",new ItemStack(SSBlocks.goldPlate, 1)); + recipe.add("ingotIron", new ItemStack(SSBlocks.ironPlate, 1)); + recipe.add("ingotGold", new ItemStack(SSBlocks.goldPlate, 1)); - } + recipe.add("ingotCopper", new ItemStack(SSBlocks.copperPlate, 1)); + recipe.add("ingotZinc", new ItemStack(SSBlocks.zincPlate, 1)); + recipe.add("ingotSilver", new ItemStack(SSBlocks.silverPlate, 1)); + + } } diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWindmill.java b/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWindmill.java index 908abdc..5c6848f 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWindmill.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererSmallWindmill.java @@ -16,108 +16,116 @@ import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -public class RendererSmallWindmill extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler{ +public class RendererSmallWindmill extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { private static final ResourceLocation windmillTextures = new ResourceLocation("sextiarysector:textures/models/smallWindMill.png"); static public ModelBase modelWindmill = new ModelsmallWindMill(); public static final ResourceLocation MC_BLOCK_SHEET = new ResourceLocation("textures/atlas/blocks.png"); - @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { - if(modelID!=this.getRenderId()){ - return ; + if (modelID != this.getRenderId()) { + return; } GL11.glPushMatrix(); - float scale = 0.0625f/2.0f; - GL11.glScalef(scale,scale,scale); - - //GL11.glRotatef(90, 1, 0, 0); + float scale = 0.0625f / 2.0f; + GL11.glScalef(scale, scale, scale); - GL11.glRotatef(90, 0, -1, 0); - this.bind(windmillTextures); + //GL11.glRotatef(90, 1, 0, 0); - ((ModelsmallWindMill) modelWindmill).renderinOut(null, 0,0,0, 0,0, 1.0f); + GL11.glRotatef(90, 0, -1, 0); + this.bind(windmillTextures); - GL11.glRotatef(-(FMLClientHandler.instance().getClient().getMinecraft().getSystemTime()/50)%360, 0, 0, 1); + ((ModelsmallWindMill) modelWindmill).renderinOut(null, 0, 0, 0, 0, 0, 1.0f); - modelWindmill.render(null, 0,0,0, 0,0, 1.0f); + GL11.glRotatef(-(FMLClientHandler.instance().getClient().getMinecraft().getSystemTime() / 50) % 360, 0, 0, 1); + modelWindmill.render(null, 0, 0, 0, 0, 0, 1.0f); - GL11.glPopMatrix(); + GL11.glPopMatrix(); - this.bind(MC_BLOCK_SHEET); + this.bind(MC_BLOCK_SHEET); } + @Override - public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, - RenderBlocks renderer) { - // TODO 自動生成されたメソッド・スタブ + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + return false; + + //if (this.getRenderId() != modelId) return false; + + //renderer.setRenderBounds(2.0D / 16.0D, 0.0D, 2.0D / 16.0D, 14.0D / 16.0D, 15.0D / 16.0D, 14.0D / 16.0D); + //renderer.setOverrideBlockTexture(ClientEventHandler.breakIcon); + + //renderer.renderStandardBlock(block, x, y, z); + + //renderer.clearOverrideBlockTexture(); + + //return true; } + @Override public boolean shouldRender3DInInventory(int modelId) { return true; } + @Override public int getRenderId() { return SextiarySector.proxy.smallWindMillType; } + @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { - TileEntitySmallWindmill tile = (TileEntitySmallWindmill)tileentity; + TileEntitySmallWindmill tile = (TileEntitySmallWindmill) tileentity; //System.out.println("renderTileEntityAt"); GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); - float scale = 0.0625f; - //float scale = 0.125f; - GL11.glScalef(scale,scale,scale); - - switch(tile.direction){ - case UP: - GL11.glRotatef(90, 1, 0, 0); - break; - case DOWN: - GL11.glRotatef(90, -1, 0, 0); - break; - case WEST: - GL11.glRotatef(90, 0, 1, 0); - break; - case EAST: - GL11.glRotatef(90, 0, -1, 0); - break; - case SOUTH: - GL11.glRotatef(180, 0, 1, 0); - break; + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); + float scale = 0.0625f; + //float scale = 0.125f; + GL11.glScalef(scale, scale, scale); + + switch (tile.direction) { + case UP: + GL11.glRotatef(90, 1, 0, 0); + break; + case DOWN: + GL11.glRotatef(90, -1, 0, 0); + break; + case WEST: + GL11.glRotatef(90, 0, 1, 0); + break; + case EAST: + GL11.glRotatef(90, 0, -1, 0); + break; + case SOUTH: + GL11.glRotatef(180, 0, 1, 0); + break; default: break; - } - - this.bindTexture(windmillTextures); - - - ((ModelsmallWindMill) modelWindmill).renderinOut(null, 0,0,0, 0,0, 1.0f); - //傾きのスピード - GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); - + } + this.bindTexture(windmillTextures); - modelWindmill.render(null, 0,0,0, 0,0, 1.0f); + ((ModelsmallWindMill) modelWindmill).renderinOut(null, 0, 0, 0, 0, 0, 1.0f); + //傾きのスピード + GL11.glRotatef(tile.getRotateStep(), 0, 0, 1); + modelWindmill.render(null, 0, 0, 0, 0, 0, 1.0f); - GL11.glPopMatrix(); + GL11.glPopMatrix(); } private static void bind(ResourceLocation res) - { - FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); - } + { + FMLClientHandler.instance().getClient().getTextureManager().bindTexture(res); + } } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 520c1b9..9b2e559 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -21,6 +21,10 @@ tile.ss.big_oak_wood_plate.name=Big Oak Wood Plate tile.ss.iron_plate.name=Iron Plate tile.ss.gold_plate.name=Gold Plate +tile.ss.copper_plate.name=Copper Plate +tile.ss.zinc_plate.name=Zinc Plate +tile.ss.silver_plate.name=Silver Plate + tile.ss.hole.name=Hole tile.ss.farmland.name=Farm Land tile.ss.paddy.name=Paddy @@ -61,6 +65,8 @@ tile.ss.coal_large_ore.name=Coal Large Ore tile.ss.iron_large_ore.name=Iron Large Ore tile.ss.gold_large_ore.name=Gold Large Ore +tile.ss.silver_large_ore.name=Silver Large Ore + tile.ss.copper_block.name=Copper Block tile.ss.zinc_block.name=Zinc Block tile.ss.silver_block.name=Silver Block @@ -204,6 +210,7 @@ item.ss.diamond_dust.name=Diamond Dust item.ss.copper_dust.name=Copper Dust item.ss.zinc_dust.name=Zinc Dust +item.ss.silver_dust.name=Silver Dust item.ss.mithril_dust.name=Mithril Dust diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/break.png b/src/main/resources/assets/sextiarysector/textures/blocks/break.png new file mode 100644 index 0000000000000000000000000000000000000000..438b0172999e191281ded22cf88be52f83b09047 GIT binary patch literal 512 zcmV+b0{{JqP)29sqO zo6QFAefaufu|QS%`uf5-M;ylh;e9E~G7Lc1b^NbP+qNGDs*1Iiwr%PA9_JjxFucu0 zgu1RV)>^LD>nuiVEh57GexJpdBnd`DLN-+mrKu{*<&tq6iJ}Nq#TY~1_wRSm_dWal zJ~V5LdE-1y6J=S32+!v;6nZ|NF?pV|-EPCzR5cjndCueUAWc)!H2t`X^?Lm$Len&} z4ZpDdc2KH{sj6xgqqUZ*szN6}vwQD}qKK~RFhxUDDQ+JL40000WFU8GbZ8()Nlj2>E@cM*00G`fL_t(I%cYP{YZE~j z#($IDbrMKgMK&Zhm4KuKK}1kcKSIBR#~ykxmlE+1QL2|j=t0op$wPC}o1a0?wjh$K zpiSwrn_x{s&Fr6!hmfVQ34*>b%rMWqzj>ZlXs!95GXM5q@$Lc|jb&McLCC=~hcJp_ zUCeTDd;KPRM|(&iQKmu$lFv`Rj(#^0yq_q#qcWc@9Yvt73b8RF&gO8 z%l!H|#C>;2tM0P%pdG(Sj1TR@j{t-Ov5RvT=DD-GUCKE61eu>5ivt@YGZtYyfrre^BZw^b6`?)FT3ful*vb%7 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/copper_onion_stage_1.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/copper_onion_stage_1.png new file mode 100644 index 0000000000000000000000000000000000000000..213d31cc85a3f9ef5fd9e58dc744ffed44dcff85 GIT binary patch literal 698 zcmV;r0!96aP)WFU8GbZ8()Nlj2>E@cM*00JIKL_t(I%cYV*YZE~j zhM(EZI;|wFB3r7aQjnG+ND&lN@E7#t$)k8Gp3J2*^xzV$UQ$CTq83ERp%g*?h8}}0 zh)p%1X=&JGv8Ewrv%47&u|q>Gg3f8+{l4dW-)}}JrTCu{`&+@ty|XA3mSqtJAv;ei zgi)k*ag>AW^H(W1%Sa*dV?HvFe12T&PBl#p5&s%t9})w&mLH?B>9aonjp0R`N~%iL zo8Z#iHo}hh`oP8eewiyTnk2#wexuFA{nNb;4nhEu(+L2!miMT76S|qe!1r4K6tgY{ z!0@6?tx_XCCK;a@>XPjUVRv)dr#>;LAU@iU@3)ZgV-&M4Ko?L+RT&89kT zs+!$}KDofpA1&N>yA-o7>&}+0G4?N8yB`4v3ABroX9hVxZBuX5iRy|k%hf~66iO*B zW|G85`>9oGh?+%ISC|6=g+fY6+iz>je*_#n<1<5;mPy+S>DX;7Umn@4BRGzu0CKsU zDrQ}xAi^9F+zRiiy0?epIBN9KIdZvN&$M(pt&FLcQvl@id9|^zp`YibaYwzD&xCPY z0FX&O)H=ZI?5yGj!dP?H$Ye62R4S23Bv@Kn(o=$pqEGf6(v#_a09HP%V3g;|n%ZnO z@jQ>!)m2p}6zEtHt>2&Kpq`z4r3!@t<+*b25>u&^ip65Qwcd#Ko{tC`gh7ZYPq6)b gN9zj<3u3?L7yGdp5H_5uc>n+a07*qoM6N<$f)Rc%8UO$Q literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/crop/copper_onion_stage_2.png b/src/main/resources/assets/sextiarysector/textures/blocks/crop/copper_onion_stage_2.png new file mode 100644 index 0000000000000000000000000000000000000000..28638df1f362d0f965f1c73ffe110c81b1c489ac GIT binary patch literal 744 zcmVP)WFU8GbZ8()Nlj2>E@cM*00K-&L_t(I%cYY|XcJKs zg}*oXc~u%3Xd)F`ltQIQLHq+P6a>Ldz*Sc+4A_OsWK$?vI3VJt2&ITxaO0vDQeC=f zH$p&HCE7xfRs)(2jY)$|G971{nLZaoqNNr=@Aka=y>rifPbj7Mp9=o%Kws(v3PmUs z!fm>2J}TjQURxK3IT*fwnW9xh3W*bRkWI;_2L=DuK%fl~|2jeo5(K#Nd;oLZVdef; zdZyx((iJMzLC$3iMBL-cy)xDB7rFG*BI54hn7a(#J-*+;?+}3AI}rdjW*StggY9OT z8jfQFur^sn1L&EGvsK!nb3k%>{FqOUdx*F{XT19(T?#r+9l>#IWM`PQ$ua<%uIs9l zuF&V6}3IJW#m8NNa29{-Uy>PQ_J>2cTFT*g{b#}2V3tiU_?AtI5A22^Z zFLJpYrfIS^S;lL6*tShEkr(x9W1rqC+qTJOvqDQeO8_u3GD0L0VS0L6wGu8BzM&lz z2lN(X;`IdDa(Nkm{{DU}%c5GXGB-D;^7%Z?lA=R)9IDTLm?c=u6agp{3WUR9c6N3E zSUsN;d#1p4yg%v-3k%}FUr49ZDi{p%D)dt9HXKCL#BI6+WEA7cCZnUHs#dG9xVR`< aJwE~O)ih=|-DdLu0000WFU8GbZ8()Nlj2>E@cM*00L1-L_t(I%casmNYh~$ z$MNs`y6vxPGsDe{aKvaTf}x{80}q7|WQd38PzNcfLrLoridciNJaiH9(4tGXZh;Wq z3NI!S{A(f%4V~F)>84EQAGZCsx5H=|DnY&1&-?t|_u+YjQi}gMmcL!73miwGuv)E{ zIg{_>am;+a+ooE>gs)mTLn8W~FlEvNDM$x`vvva(W$_}3PGg;)UEU;0QdW|$lP zLhY!V_`P-3lZ~_v#t`m2E05MlZl31MGXtktAd}A0`0yA2G8hc1_q~fad>YL|9-1ba z6+r7?j7#F0@=dp?-No*ydIgY8XNv)vrcpcUCJ|5Io<6BuE?2QPcOFgC==swa27 z}#94NU^N^$=AId~rrA3ioVR+{_DMidD!+xG#l*Nb5oB$G+5SZ^s^*Ab3QwvyX>JQxfrUDuhpGmGqc z(FMTd f^~Y~hbOS#DX`DE0OA0qU00000NkvXXu0mjfv}{fj literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_large_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_large_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..37f9f9f618801f37afed33fad91de1a57b282c56 GIT binary patch literal 596 zcmV-a0;~OrP)0pUqR zK~y-)b(68G@-P^NAJ6~mk|NnMxZBlB(3|iQis0&Gh6;kKlL%gdmtY6?POf!ui&(mJ zFrXCdKS-kg@thAjBz*buym{X?;yA9YwY--Q0x2Z`S(XuoA!S+eQ{UhB1LN@+fYoZ{ zn}Q$!KuU>}k}S(mN&#T4eGbU;+)poxf^N6Ve!mBx)9GN0K?s4?+V^ZW8-x%v;yA9Q zl$2%ZZ_V=@r4(9gk|ZHb(+_+{-iYJ4j-rU|c8f8F->TE;eC%aeMq@IW)NUGp)|zIs zNmW%$r&ELwGsw#@20N`*qkfte76#2EQ zFr4-g$|1B1a|JLL2m}ax-6WHtZycDI>D~ZM!7K?>%JRA-_&V#`K zfc<{&>DI-xJGoI!^38 z;kS*!INtvF=~cUOHr#&l)cJWO6GKwZY1O^oQ_WbTvZF6@DAxRUh`yZgEc4m_2Ok8j tClt?nwp4_{VeQu)JU=EpJbM2jFYBQLY!b)zXaZfu;OXk;vd$@?2>?(zTM+;N literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/loom/silk_cloth.png b/src/main/resources/assets/sextiarysector/textures/items/loom/silk_cloth.png index 08e0b710529bca495efc72394ec79d46f7afcfde..0c8d33fb4eb969d58966e796b25d2d2043d6d19e 100644 GIT binary patch delta 279 zcmV+y0qFkG0=NQ@Du4d~{{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2%A4FnDhUrRjz006~FL_t(I%f*wi4TLZZMZZr-ZlGi-I`2V8lLaDW0A}$n%mKZx zA)JAOoJ4V!A|+1Vw`DuT%y?oiJhaCG)zQ&)-R`Waw*usAkbmKnk^w*nfl5M~z!9G3 zd3zLNq^qomnQ!5yX|{b`*XaA6yhsHAZQEiPh9V3A<2c%~EC4{N`YECZJ)FT}8)J+= z!E5x(F4$U&6YRkd0#ubwbC8_?Ec;SQJ0TAP0GRo9iHM1aP19r|V#oWcG^#$UUF2^y d_{(Q{17$B&))1k#$ejQH002ovPDHLkV1m1ha@GI< delta 304 zcmV-00nh%p0?`7HDt`a~0002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2!54I3{%ZtEHV007=eL_t(I%gs`|iiI!`J!Wyxg;ZMk3HkqT8L+bui(nD9FghT! zRf3P}-YxHe6!SP|UI9KHF-DCs>QlUUM?TthT^Iirh%qV=Wq*5JR~Tb%BE<{h4}fnX z`VtWUz)?sW1yuzzD*%{z zo^SJ~e(m(F+edG9qTUadw%#qJwC6;e!}TRcjyEU0*y|rJv8n%0s)JbzYh>{{ z9_8lga`J82N!x0Z9L#Qn^?dyQFkHYnV9$f4$B%D#dr6&5-_}mV*Vk-EGnX>Yo-aQn zqQ2LrWHkMnt+la%KVip%d&~7BMDJC6=-H9xTn*ZEfPDu^;L Yh{wg%{#37f0`wmdKI;Vst054>Q#Q*>R literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/plate/silver_plate.png b/src/main/resources/assets/sextiarysector/textures/items/plate/silver_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..a16a500618b9c05559e0171633f569559e0963c9 GIT binary patch literal 321 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~yA+d&sgG(8H&E!Dr;B5V#p$J!H}bX^@VL$ucHY3} z6e6N0(WE5T+SH^gz$%==#if?ea^df4Ayx~fi?t^wiT=E~@v#QOmwvnaCKnc^Pn(0p zn&;dvoog@M<|xa=SaCV(@XW1Z>5iwNf27HeI^8T6GkwxzxJf@8@~pwAdQ MUHx3vIVCg!0P7WZM*si- literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/plate/zinc_plate.png b/src/main/resources/assets/sextiarysector/textures/items/plate/zinc_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..37572e0494386a475dc06d3ccb19122a87e36e3b GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~yA+eT^zM6?*nvWKJY5_^EKVo?`TyUZS+${4!nLvT z?SJOaw>I87(&R7Pvv<#G0ljT?L8{7|tlU!c7i2$r@W8?F%kh4Bo{6b{c{JL98s|U! z|NlP^pyG>mwSAL{q%FJ3fNqg&Cb5B7x=)m zN%4k>z+9n=rg_m@8P46?n`WncZi>Xq)YBUt-_vJ{6-=8mt3WMvhGP7@yN6bDu4i1r a#2~bLV)^Q(=P^KkGI+ZBxvXpE|(4I<*00TKD8X`r%KR42w$n=Ial6KKU4PF(3BGbs6#@hR9srb5mn{~9G|zLmQ%aQuoO4n7&I5j} zHe?_YFvbWX@+y7b2O%kC8lnh}l6bbh?|T-?3Vd5nbsT9ap1JU300000NkvXXu0mjf D%`1E{ delta 341 zcmV-b0jmDe0`>xsDu4d~{{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2xA2`C^wcphs2009F@L_t(I%cYYs4uc>RhCdod@6nZsxEuDSH*j?JDkhE&?q0wf zut>V~5+o+>bb_E&)1+@AJih<^JRZV(&p(k}CAHR3eVQimvwuJUACE`eQ%ZRNV~n^I z&|3SpZBJb(rF<%q?cr&f0C>OO0Icf@Kv5LrdCu$g+K6OFFu?tOr|Y^e2U1GrdH%k_ zvMjM`fa|&zsr9lfan4ayRdjI+$zd3x>K?v|TUc0YPY*qxPhXbh^&B|ou+}1_j8NK- za7Ic=-}h{qXikg~N-5toO>`2Vv_KI5c@mv-o9+Xf>Hs4B3&BMSrm=^=1k$@}tvBG& n7#|Akg#gBJJbhB}?|1$H&+C#Q_boT#00000NkvXXu0mjf0$G*% diff --git a/src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring3.png b/src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring3.png new file mode 100644 index 0000000000000000000000000000000000000000..7c8cf4e70d3c4406a142fb60a5fcbc7d4b032ff5 GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~yA(5*_3K#|+!z=bnLS+`Lo7}&oovY0tRT{6FXjIJ z;?&L^(%+Vue_&IKJ96;u!MofQ%wnF~L8C2Q6f-7>T=D*=`li)O zu34?}zpPRx#_{0s$Bt?*P5y))!Rbs<+4oEDuGC&S#ou+4t&OiR!~5^j4W+S+8eL5` z=PUQdNl$#k!M5Z6`z^V@pE`J*v^jr2JYt$^7;i!Bb)~Iw(^St{u3FWlm#1jS;~aAL zaCjj%clO(t3!i^}d3w{HdCbpcu0<`GBIxy7@SKO{%ir^Sg?kO1G@s61*6GJIMU3N- zz5k-(yvwx-!LklZ>J@i*95ng%VY)+A`P#2+Hd2qB8}|wvu;^Rvul4WmIr-^AlX&!{ SOpX9Uh{4m<&t;ucLK6TV5SGXQ literal 0 HcmV?d00001 From 5bdfbb4cd9c51cf2559a6115087eb692fff26897 Mon Sep 17 00:00:00 2001 From: shift02 Date: Thu, 13 Aug 2015 22:21:36 +0900 Subject: [PATCH 86/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=EF=BC=9A=E9=87=91?= =?UTF-8?q?=E5=B1=9E=E3=83=97=E3=83=AC=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・金属プレートの種類を増やした ・ハンマーをスパナに変更 ・大きな銀鉱石を追加 ・スタミナの表示を細かく ・水田に硬さを設定 ・鉱石の描画方法を変更 ・ポーションのアイコンの設定を変更 --- build.gradle | 13 +- .../shift/sextiarysector/SSAchievement.java | 2 +- .../java/shift/sextiarysector/SSBlocks.java | 11 +- .../java/shift/sextiarysector/SSItems.java | 11 +- .../shift/sextiarysector/SSPlayerTabs.java | 4 +- .../java/shift/sextiarysector/SSPotions.java | 8 +- .../shift/sextiarysector/SextiarySector.java | 2 +- .../agriculture/FarmlandRegistry.java | 18 + .../sextiarysector/api/IPlayerManager.java | 4 + .../sextiarysector/api/SextiarySectorAPI.java | 27 +- .../api/agriculture/AgricultureAPI.java | 13 +- .../api/agriculture/BlockCropBase.java | 56 + .../api/agriculture/CropRendererType.java | 14 + .../api/agriculture/CropStatus.java | 42 + .../api/agriculture/IFarmlandRegistry.java | 11 + .../api/equipment/EquipmentType.java | 41 +- .../api/machine/energy/IEnergyHandler.java | 73 - .../api/machine/energy/IGFEnergyHandler.java | 80 -- .../api/machine/energy/package-info.java | 2 - .../sextiarysector/api/potion/PotionBase.java | 27 + .../sextiarysector/api/potion/PotionBurn.java | 37 + .../api/potion/PotionHotSprings.java | 42 + .../shift/sextiarysector/asm/DepLoader.java | 1188 +++++++++-------- .../block/BlockBoardingBuoy.java | 2 +- .../sextiarysector/block/BlockFigure.java | 11 +- .../sextiarysector/block/BlockLargeOre.java | 76 +- .../sextiarysector/block/BlockLeafBed.java | 66 + .../sextiarysector/block/BlockMonitor.java | 100 +- .../sextiarysector/block/BlockPaddy.java | 126 +- .../sextiarysector/block/BlockPowerStone.java | 261 ++-- .../block/BlockPoweredBuoy.java | 2 +- .../sextiarysector/block/BlockSSOre.java | 20 +- .../block/BlockWoodenGutter.java | 114 ++ .../container/ContainerPlayerNext.java | 173 +-- .../event/ClientEventHandler.java | 73 + .../sextiarysector/event/HUDEventHandler.java | 12 +- .../event/PlayerUnitEventHandler.java | 186 ++- .../event/WorldEventHandler.java | 10 +- .../shift/sextiarysector/item/ItemRing.java | 4 +- .../sextiarysector/item/ItemShopRing.java | 4 +- .../player/EntityPlayerManager.java | 10 + .../sextiarysector/proxy/ClientProxy.java | 13 + .../sextiarysector/proxy/CommonProxy.java | 5 + .../sextiarysector/recipe/RecipesCore.java | 6 + .../recipe/RecipesFurnaceCraft.java | 16 +- .../sextiarysector/recipe/RecipesTool.java | 7 +- .../renderer/block/RendererLeafBed.java | 100 ++ .../renderer/block/RendererOreStone.java | 118 ++ .../renderer/block/RendererWoodenGutter.java | 31 + .../tileentity/TileEntityWoodenGutter.java | 5 + .../assets/sextiarysector/lang/en_US.lang | 8 + .../assets/sextiarysector/lang/ja_JP.lang | 10 + .../textures/blocks/bluestone_ore.png | Bin 534 -> 0 bytes .../textures/blocks/leaf_bed_0.png | Bin 0 -> 1021 bytes .../textures/blocks/leaf_bed_1.png | Bin 0 -> 1003 bytes .../textures/blocks/leaf_bed_2.png | Bin 0 -> 989 bytes .../textures/blocks/ore/bluestone_ore.png | Bin 0 -> 562 bytes .../textures/blocks/ore/coal_large_ore.png | Bin 562 -> 314 bytes .../textures/blocks/ore/copper_block_top.png | Bin 0 -> 498 bytes .../textures/blocks/ore/copper_ore.png | Bin 539 -> 285 bytes .../textures/blocks/ore/diamond_large_ore.png | Bin 633 -> 336 bytes .../textures/blocks/ore/gold_large_ore.png | Bin 588 -> 603 bytes .../textures/blocks/ore/gold_ore.png | Bin 263 -> 545 bytes .../textures/blocks/ore/iron_block_top.png | Bin 0 -> 516 bytes .../textures/blocks/ore/iron_large_ore.png | Bin 688 -> 665 bytes .../textures/blocks/ore/mithril_ore.png | Bin 549 -> 551 bytes .../textures/blocks/ore/orichalcum_ore.png | Bin 601 -> 347 bytes .../textures/blocks/ore/silver_block_top.png | Bin 0 -> 516 bytes .../textures/blocks/ore/silver_large_ore.png | Bin 596 -> 607 bytes .../textures/blocks/ore/silver_ore.png | Bin 537 -> 533 bytes .../textures/blocks/ore/yellowstone_ore.png | Bin 0 -> 559 bytes .../textures/blocks/ore/zinc_block_top.png | Bin 0 -> 508 bytes .../textures/blocks/ore/zinc_ore.png | Bin 540 -> 553 bytes .../textures/blocks/yellowstone_ore.png | Bin 569 -> 0 bytes .../sextiarysector/textures/guis/icons.png | Bin 11565 -> 11622 bytes .../textures/guis/inventory_ss_potion.png | Bin 0 -> 10487 bytes .../textures/items/gearforce/iron_spanner.png | Bin 0 -> 286 bytes .../textures/items/memory/mp_memory.png | Bin 0 -> 287 bytes .../textures/items/memory/xp_memory.png | Bin 0 -> 287 bytes .../textures/items/unit/bed_day_unit.png | Bin 0 -> 1283 bytes .../textures/items/unit/bed_monster_unit.png | Bin 0 -> 1292 bytes src/main/resources/dependencies.info | 7 - src/main/resources/ss_dependencies.info | 7 + 83 files changed, 2130 insertions(+), 1179 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/agriculture/FarmlandRegistry.java create mode 100644 src/main/java/shift/sextiarysector/api/agriculture/BlockCropBase.java create mode 100644 src/main/java/shift/sextiarysector/api/agriculture/CropRendererType.java create mode 100644 src/main/java/shift/sextiarysector/api/agriculture/CropStatus.java create mode 100644 src/main/java/shift/sextiarysector/api/agriculture/IFarmlandRegistry.java delete mode 100644 src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java delete mode 100644 src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java delete mode 100644 src/main/java/shift/sextiarysector/api/machine/energy/package-info.java create mode 100644 src/main/java/shift/sextiarysector/api/potion/PotionBase.java create mode 100644 src/main/java/shift/sextiarysector/api/potion/PotionBurn.java create mode 100644 src/main/java/shift/sextiarysector/api/potion/PotionHotSprings.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockLeafBed.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockWoodenGutter.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererLeafBed.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererOreStone.java create mode 100644 src/main/java/shift/sextiarysector/renderer/block/RendererWoodenGutter.java create mode 100644 src/main/java/shift/sextiarysector/tileentity/TileEntityWoodenGutter.java delete mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/bluestone_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/leaf_bed_0.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/leaf_bed_1.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/leaf_bed_2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/bluestone_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/copper_block_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/iron_block_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_block_top.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/yellowstone_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/ore/zinc_block_top.png delete mode 100644 src/main/resources/assets/sextiarysector/textures/blocks/yellowstone_ore.png create mode 100644 src/main/resources/assets/sextiarysector/textures/guis/inventory_ss_potion.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/gearforce/iron_spanner.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/memory/mp_memory.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/memory/xp_memory.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/bed_day_unit.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/unit/bed_monster_unit.png delete mode 100644 src/main/resources/dependencies.info create mode 100644 src/main/resources/ss_dependencies.info diff --git a/build.gradle b/build.gradle index 997b9dd..39d16ed 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.4.1.a-${project.minecraft.version}" +version = "2.4.2.b-${project.minecraft.version}" minecraft { // replacing stuff in the source @@ -54,14 +54,19 @@ jar { into('src/shift/sextiarysector/api') { from 'src/main/java/shift/sextiarysector/api' } -} -jar { - manifest { + manifest { attributes 'FMLCorePlugin' : 'shift.sextiarysector.asm.DepLoader','FMLCorePluginContainsFMLMod':'true' } + } +//jar { +// manifest { +// attributes 'FMLCorePlugin' : 'shift.sextiarysector.asm.DepLoader','FMLCorePluginContainsFMLMod':'true' +// } +//} + task devJar(type: Jar) { from sourceSets.main.output from sourceSets.main.allSource diff --git a/src/main/java/shift/sextiarysector/SSAchievement.java b/src/main/java/shift/sextiarysector/SSAchievement.java index 8ff69ac..b2c166a 100644 --- a/src/main/java/shift/sextiarysector/SSAchievement.java +++ b/src/main/java/shift/sextiarysector/SSAchievement.java @@ -118,7 +118,7 @@ public static void initAchievements() { bottle = new AchievementCraft("bottle", 1, 1, new ItemStack(SSItems.emptyBottle), AchievementList.buildWorkBench, core).registerStat(); drinkingWater = new AchievementFurnace("drinking_water", 3, 1, new ItemStack(SSItems.drinkingWaterBottle), bottle, core).registerStat(); craftFurnace = new AchievementCraft("craft_furnace", -2, -1, new ItemStack(SSBlocks.LargeFurnace), AchievementList.buildWorkBench, core).registerStat(); - hammer = new AchievementFurnace("hammer", -4, -1, new ItemStack(SSItems.hammer), craftFurnace, core).registerStat(); + hammer = new AchievementFurnace("hammer", -4, -1, new ItemStack(SSItems.ironSpanner), craftFurnace, core).registerStat(); fluidFurnace = new AchievementFurnace("fluid_furnace", -2, 1, new ItemStack(SSBlocks.fluidFurnace), craftFurnace, core).registerStat(); freezer = new AchievementFurnace("freezer", 0, -3, new ItemStack(SSBlocks.freezer), craftFurnace, core).registerStat(); diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 028a713..e16995f 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -26,6 +26,7 @@ import shift.sextiarysector.block.BlockLargeFurnace; import shift.sextiarysector.block.BlockLargeOre; import shift.sextiarysector.block.BlockLargeWindmill; +import shift.sextiarysector.block.BlockLeafBed; import shift.sextiarysector.block.BlockMachineFrame; import shift.sextiarysector.block.BlockMagiFurnace; import shift.sextiarysector.block.BlockMonitor; @@ -133,6 +134,9 @@ public class SSBlocks { public static Block trap; + //Bed + public static Block leafBed; + //液体 public static Block drinkingWater; public static Block hotSprings; @@ -392,6 +396,9 @@ public static void initBlicks() { GameRegistry.registerBlock(trap, ItemBlockMeta.class, "Trap"); GameRegistry.registerTileEntity(TileEntityTrap.class, "SSTrap"); + leafBed = new BlockLeafBed().setBlockName("ss.leaf_bed").setBlockTextureName("sextiarysector:leaf_bed").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(leafBed, "LeafBed"); + //液体 drinkingWater = new BlockSSFluid(SSFluids.springWater).setBlockName("ss.drinking_water").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(drinkingWater, "DrinkingWater"); @@ -403,10 +410,10 @@ public static void initBlicks() { //GameRegistry.registerBlock(season, "Season"); //鉱石 - blueStoneOre = new BlockPowerStone().setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); + blueStoneOre = new BlockPowerStone().setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:ore/bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(blueStoneOre, "BlueStoneOre"); - yellowStoneOre = new BlockPowerStone().setBlockName("ss.yellow_stone").setBlockTextureName("sextiarysector:yellowstone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); + yellowStoneOre = new BlockPowerStone().setBlockName("ss.yellow_stone").setBlockTextureName("sextiarysector:ore/yellowstone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(yellowStoneOre, "YellowStoneOre"); copperOre = new BlockSSOre(null, 1).setBlockName("ss.copper_ore").setBlockTextureName("sextiarysector:ore/copper_ore"); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 055c6cd..94a3467 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -70,7 +70,7 @@ public class SSItems { public static Item orichalcumGFStorage; //hammer - public static Item hammer; + public static Item ironSpanner; public static Item colorSpray; public static Item calendar; @@ -297,6 +297,8 @@ public class SSItems { public static Item jumpUnit; + public static Item bedMonsterUnit; + public static Item pickaxeUnit; public static Item debugUnit; @@ -358,8 +360,8 @@ public static void initItems() { GameRegistry.registerItem(orichalcumGFStorage, "OrichalcumGFStorage"); //ハンマー - hammer = new ItemHammer().setUnlocalizedName("ss.hammer").setTextureName("sextiarysector:machine/hammer").setCreativeTab(SextiarySectorAPI.TabSSIndustry); - GameRegistry.registerItem(hammer, "Hammer"); + ironSpanner = new ItemHammer().setUnlocalizedName("ss.iron_spanner").setTextureName("sextiarysector:gearforce/iron_spanner").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + GameRegistry.registerItem(ironSpanner, "IronSpanner"); colorSpray = new ItemSpray().setUnlocalizedName("ss.color_spray").setTextureName("sextiarysector:fluid/color_spray").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(colorSpray, "ColorSpray"); @@ -783,6 +785,9 @@ public static void initItems() { jumpUnit = new ItemUnit().setUnlocalizedName("ss.jump_unit").setTextureName("sextiarysector:unit/jump_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(jumpUnit, "JumpUnit"); + //bedMonsterUnit = new ItemUnit().setUnlocalizedName("ss.bed_monster_unit").setTextureName("sextiarysector:unit/bed_monster_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); + //GameRegistry.registerItem(bedMonsterUnit, "BedMonsterUnit"); + pickaxeUnit = new ItemUnit().setUnlocalizedName("ss.pickaxe_unit").setTextureName("sextiarysector:unit/pickaxe_unit").setCreativeTab(SextiarySectorAPI.TabSSPlayer); GameRegistry.registerItem(pickaxeUnit, "PickaxeUnit"); diff --git a/src/main/java/shift/sextiarysector/SSPlayerTabs.java b/src/main/java/shift/sextiarysector/SSPlayerTabs.java index b78006c..60aca78 100644 --- a/src/main/java/shift/sextiarysector/SSPlayerTabs.java +++ b/src/main/java/shift/sextiarysector/SSPlayerTabs.java @@ -18,7 +18,7 @@ public class SSPlayerTabs { public static AbstractTab creeperShop; - public static void initRecipes(){ + public static void initRecipes() { ss = new InventoryTabSS(); TabManager.registerTab(ss); @@ -29,7 +29,7 @@ public static void initRecipes(){ rucksack = new InventoryTabEquipment(EquipmentType.Bag, new ItemStack(SSItems.rucksack)); TabManager.registerTab(rucksack); - creeperShop = new InventoryTabEquipment(EquipmentType.Ring, new ItemStack(SSItems.creeperRing)); + creeperShop = new InventoryTabEquipment(EquipmentType.Other, new ItemStack(SSItems.creeperRing)); TabManager.registerTab(creeperShop); ((ItemShopRing) SSItems.creeperRing).setTab(creeperShop); diff --git a/src/main/java/shift/sextiarysector/SSPotions.java b/src/main/java/shift/sextiarysector/SSPotions.java index 32570ae..ece4e35 100644 --- a/src/main/java/shift/sextiarysector/SSPotions.java +++ b/src/main/java/shift/sextiarysector/SSPotions.java @@ -1,8 +1,8 @@ package shift.sextiarysector; import net.minecraft.potion.Potion; -import shift.sextiarysector.potion.PotionBurn; -import shift.sextiarysector.potion.PotionHotSprings; +import shift.sextiarysector.api.potion.PotionBurn; +import shift.sextiarysector.api.potion.PotionHotSprings; public class SSPotions { @@ -10,8 +10,8 @@ public class SSPotions { public static Potion hotSprings; public static void initPotions() { - burn = new PotionBurn(Config.burn, true, 0, 0).setPotionName("ss.potion.burn"); - hotSprings = new PotionHotSprings(Config.hotSprings, false, 0, 3).setPotionName("ss.potion.hot_springs"); + burn = new PotionBurn(Config.burn, true, 0xd60330, 0).setPotionName("ss.potion.burn"); + hotSprings = new PotionHotSprings(Config.hotSprings, false, 0x0349d6, 3).setPotionName("ss.potion.hot_springs"); } } diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 42e4c18..b26f4ee 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -38,7 +38,7 @@ public class SextiarySector { public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.4.1"; + public static final String VERSION = "2.4.2"; @Mod.Instance("SextiarySector") public static SextiarySector instance; diff --git a/src/main/java/shift/sextiarysector/agriculture/FarmlandRegistry.java b/src/main/java/shift/sextiarysector/agriculture/FarmlandRegistry.java new file mode 100644 index 0000000..f98a307 --- /dev/null +++ b/src/main/java/shift/sextiarysector/agriculture/FarmlandRegistry.java @@ -0,0 +1,18 @@ +package shift.sextiarysector.agriculture; + +import net.minecraft.block.Block; +import shift.sextiarysector.api.agriculture.IFarmlandRegistry; + +public class FarmlandRegistry implements IFarmlandRegistry { + + @Override + public void registerFarmland(String name, Block block) { + + } + + @Override + public Block getFarmland(String name) { + return null; + } + +} diff --git a/src/main/java/shift/sextiarysector/api/IPlayerManager.java b/src/main/java/shift/sextiarysector/api/IPlayerManager.java index fe27779..0c67d11 100644 --- a/src/main/java/shift/sextiarysector/api/IPlayerManager.java +++ b/src/main/java/shift/sextiarysector/api/IPlayerManager.java @@ -6,10 +6,14 @@ public interface IPlayerManager { public void addMoistureStats(EntityPlayer entityPlayer, int par1, float par2); + public int getMoistureLevel(EntityPlayer entityPlayer); + public void addMoistureExhaustion(EntityPlayer entityPlayer, float par1); public void addStaminaStats(EntityPlayer entityPlayer, int par1, float par2); + public int getStaminaLevel(EntityPlayer entityPlayer); + public void addStaminaExhaustion(EntityPlayer entityPlayer, float par1); } diff --git a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java index 40f76ba..82d699d 100644 --- a/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java +++ b/src/main/java/shift/sextiarysector/api/SextiarySectorAPI.java @@ -14,7 +14,12 @@ public class SextiarySectorAPI { /** ModID */ public static final String MODID = "SextiarySector"; - //CreativeTabs + /* + * ------------------------------------------- + * CreativeTabs クリエイティブタブ + * ------------------------------------------- + */ + public static CreativeTabs TabSSCore; public static CreativeTabs TabSSFluid; public static CreativeTabs TabSSPlayer; @@ -27,18 +32,14 @@ public class SextiarySectorAPI { public static CreativeTabs TabSSEconomy; public static CreativeTabs TabSSMagic; - /** - * IPlayerManager Player関係のインターフェース
- * このインスタンスから操作をしてください。 - */ - public static IPlayerManager playerManager; - /* - * ----------------------- + * ------------------------------------------- * Player プレイヤー - *------------------------ + * ------------------------------------------- */ + public static IPlayerManager playerManager; + //メモ MAX水分 20 , MAXスタミナ 100 /** @@ -51,6 +52,10 @@ public static void addMoistureStats(EntityPlayer entityPlayer, int par1, float p playerManager.addMoistureStats(entityPlayer, par1, par2); } + public static int getMoistureLevel(EntityPlayer entityPlayer) { + return playerManager.getMoistureLevel(entityPlayer); + } + /** * addMoistureExhaustion プレイヤーの水分ゲージを減らします * @param entityPlayer プレイヤー @@ -70,6 +75,10 @@ public static void addStaminaStats(EntityPlayer entityPlayer, int par1, float pa playerManager.addStaminaStats(entityPlayer, par1, par2); } + public static int getStaminaLevel(EntityPlayer entityPlayer) { + return playerManager.getStaminaLevel(entityPlayer); + } + /** * addMoistureExhaustion プレイヤーのスタミナゲージを減らします * @param entityPlayer プレイヤー diff --git a/src/main/java/shift/sextiarysector/api/agriculture/AgricultureAPI.java b/src/main/java/shift/sextiarysector/api/agriculture/AgricultureAPI.java index 322d84d..7fcd01d 100644 --- a/src/main/java/shift/sextiarysector/api/agriculture/AgricultureAPI.java +++ b/src/main/java/shift/sextiarysector/api/agriculture/AgricultureAPI.java @@ -1,7 +1,18 @@ package shift.sextiarysector.api.agriculture; +import net.minecraft.block.Block; + public class AgricultureAPI { - public static IFertilizerManager fertilizerManager ; + public static IFertilizerManager fertilizerManager; + public static IFarmlandRegistry farmlandRegistry; + + public static void registerFarmland(String name, Block block) { + farmlandRegistry.registerFarmland(name, block); + } + + public Block getFarmland(String name) { + return farmlandRegistry.getFarmland(name); + } } diff --git a/src/main/java/shift/sextiarysector/api/agriculture/BlockCropBase.java b/src/main/java/shift/sextiarysector/api/agriculture/BlockCropBase.java new file mode 100644 index 0000000..29d2fb3 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/agriculture/BlockCropBase.java @@ -0,0 +1,56 @@ +package shift.sextiarysector.api.agriculture; + +import java.util.Random; + +import net.minecraft.block.BlockBush; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.item.Item; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockCropBase extends BlockBush implements ITileEntityProvider { + + @SideOnly(Side.CLIENT) + private IIcon[] icons; + private CropRendererType rendererID; + private CropStatus status; + + private Item drop; + + private static Random random = new Random(); + + /* + public BlockCropBase(CropStatus status, CropRendererType rendererID, Item drop) + { + this.setTickRandomly(true); + this.type = type; + this.drop = drop; + this.status = status; + this.farmland = farmland; + this.re_harvest = re_harvest; + + if (type.equals(CropType.Normal)) { + float f = 0.5F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f); + } else { + float f = 0.2F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3.0F, 0.5F + f); + } + + //this.setCreativeTab((CreativeTabs)null); + this.setHardness(0.2F); + this.setStepSound(soundTypeGrass); + this.disableStats(); + this.isBlockContainer = true; + this.setCreativeTab(SextiarySectorAPI.TabSSAgriculture); + }*/ + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return null; + } + +} diff --git a/src/main/java/shift/sextiarysector/api/agriculture/CropRendererType.java b/src/main/java/shift/sextiarysector/api/agriculture/CropRendererType.java new file mode 100644 index 0000000..f14a3a1 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/agriculture/CropRendererType.java @@ -0,0 +1,14 @@ +package shift.sextiarysector.api.agriculture; + +public enum CropRendererType { + + Normal(6), + Close(1); + + public int id; + + CropRendererType(int renderID) { + this.id = renderID; + } + +} diff --git a/src/main/java/shift/sextiarysector/api/agriculture/CropStatus.java b/src/main/java/shift/sextiarysector/api/agriculture/CropStatus.java new file mode 100644 index 0000000..eddf364 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/agriculture/CropStatus.java @@ -0,0 +1,42 @@ +package shift.sextiarysector.api.agriculture; + +import shift.sextiarysector.api.season.Season; + +public class CropStatus { + + private boolean reHarvest; + + private int days[]; + + public Season[] seasons; + + public CropStatus(String farmland, boolean reHarvest, int[] days, Season... seasons) { + + this.days = days; + this.seasons = seasons; + + if (reHarvest) { + if (days.length != 4) throw new IllegalArgumentException("Size of days is less days.length = 4"); + } else { + if (days.length != 3) throw new IllegalArgumentException("Size of days is less days.length = 3"); + } + + } + + public int[] getDays() { + return days; + } + + private void setDay(int[] day) { + this.days = day; + } + + public Season[] getSeason() { + return seasons; + } + + public boolean isReHarvest() { + return this.reHarvest; + } + +} diff --git a/src/main/java/shift/sextiarysector/api/agriculture/IFarmlandRegistry.java b/src/main/java/shift/sextiarysector/api/agriculture/IFarmlandRegistry.java new file mode 100644 index 0000000..b83d1d0 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/agriculture/IFarmlandRegistry.java @@ -0,0 +1,11 @@ +package shift.sextiarysector.api.agriculture; + +import net.minecraft.block.Block; + +public interface IFarmlandRegistry { + + public void registerFarmland(String name, Block block); + + public Block getFarmland(String name); + +} diff --git a/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java b/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java index 65e1827..eb18ecc 100644 --- a/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java +++ b/src/main/java/shift/sextiarysector/api/equipment/EquipmentType.java @@ -9,14 +9,14 @@ public enum EquipmentType { DecorationPlate("decoration_plate", new int[] { 1 }), DecorationLegs("decoration_legs", new int[] { 2 }), DecorationBoots("decoration_boots", new int[] { 3 }), - Necklace("necklace", new int[] { 4 }), - Ring("ring", new int[] { 5, 6, 7 }), - Face("face", new int[] { 8 }), - Bag("bag", new int[] { 9 }), - Hand("hand", new int[] { 10 }), - Belt("belt", new int[] { 11 }), - Unit("unit", new int[] { 12, 13, 14, 15, 16, 17, 18, 19 }); - //Other("other", new int[] { 16, 17, 18, 19 }); + //Necklace("necklace", new int[] { 4 }), + //Ring("ring", new int[] { 5, 6, 7 }), + Face("face", new int[] { 4 }), + Bag("bag", new int[] { 5 }), + Hand("hand", new int[] { 6 }), + Belt("belt", new int[] { 7 }), + Unit("unit", new int[] { 8, 9, 10, 11, 12, 13, 14, 15 }), + Other("other", new int[] { 16, 17, 18, 19 }); private IIcon icon; private String iconName; @@ -63,27 +63,36 @@ public static EquipmentType getEquipmentTypeFromSlot(int slot) { case 3: return DecorationBoots; - case 4: - return Necklace; + //case 4: + // return Necklace; + + //case 5: + //case 6: + //case 7: + // return Ring; + case 4: + return Face; case 5: + return Bag; case 6: + return Hand; case 7: - return Ring; + return Belt; case 8: - return Face; case 9: - return Bag; case 10: - return Hand; case 11: - return Belt; - case 12: case 13: case 14: case 15: + //case 16: + //case 17: + //case 18: + //case 19: + return Unit; case 16: case 17: case 18: diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java b/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java deleted file mode 100644 index 3f6d027..0000000 --- a/src/main/java/shift/sextiarysector/api/machine/energy/IEnergyHandler.java +++ /dev/null @@ -1,73 +0,0 @@ -package shift.sextiarysector.api.machine.energy; - -import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; -import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; - -/** - * 注 竹MOD用に残してあります - * @Deprecated パッケージが変更になりました {@link IGearForceHandler} - * - * @see IEnergyStorage - * @see EnergyStorage - * @version 1.1.0 - * @author Shift02 - */ -@Deprecated -public interface IEnergyHandler { - - /** - * addEnergy エレルギーの追加 - * @param from エネルギーを加える方角 - * @param power 加える力の量 - * @param speed 加える速度の量 - * @param simulate シミュレーションかどうか - * @return 実際に加えれた速度 - */ - int addEnergy(ForgeDirection from, int power, int speed, boolean simulate); - - /** - * drawEnergy エレルギーの減少 - * @param from エネルギーを減らす方角 - * @param power 減らす力の量 - * @param speed 減らす速度の量 - * @param simulate シミュレーションかどうか - * @return 実際に減らせれた速度 - */ - int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate); - - /** - * canInterface 繋がるか - * @param from 方角 - * @return その方角に動力を入力または出力出来る場合はtrue - */ - boolean canInterface(ForgeDirection from); - - /** - * getPowerStored 力の取得 - * @param from 方角 - * @return その方角の現在の力の量 - */ - int getPowerStored(ForgeDirection from); - - /** - * getSpeedStored 速度の取得 - * @param from 方角 - * @return その方角の現在の速度の量 - */ - long getSpeedStored(ForgeDirection from); - - /** - * getMaxPowerStored 力の最大値(容量)の取得 - * @param from 方角 - * @return 最大値(容量) - */ - int getMaxPowerStored(ForgeDirection from); - - /** - * getMaxSpeedStored 速度の最大値(容量)の取得 - * @param from 方角 - * @return 最大値(容量) - */ - long getMaxSpeedStored(ForgeDirection from); -} diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java b/src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java deleted file mode 100644 index db05319..0000000 --- a/src/main/java/shift/sextiarysector/api/machine/energy/IGFEnergyHandler.java +++ /dev/null @@ -1,80 +0,0 @@ -package shift.sextiarysector.api.machine.energy; - -import net.minecraftforge.common.util.ForgeDirection; -import shift.sextiarysector.api.gearforce.tileentity.EnergyStorage; -import shift.sextiarysector.api.gearforce.tileentity.IGearForceHandler; - -/** - * - * パッケージが変更になりました {@link IGearForceHandler}
- * 注 AMT2とエンチャント交換MOD用に残してあります
- *
- * - * IGFEnergyHandler TileEntity用のエネルギーインターフェース
- * TileEntityに実装して使ってください。 - *
- * @see IEnergyStorage - * @see EnergyStorage - * @version 1.1.0 - * @author Shift02 - * @Deprecated パッケージが変更になりました {@link IGearForceHandler} - */ -@Deprecated -public interface IGFEnergyHandler { - - /** - * addEnergy エレルギーの追加 - * @param from エネルギーを加える方角 - * @param power 加える力の量 - * @param speed 加える速度の量 - * @param simulate シミュレーションかどうか - * @return 実際に加えれた速度 - */ - int addEnergy(ForgeDirection from, int power, int speed, boolean simulate); - - /** - * drawEnergy エレルギーの減少 - * @param from エネルギーを減らす方角 - * @param power 減らす力の量 - * @param speed 減らす速度の量 - * @param simulate シミュレーションかどうか - * @return 実際に減らせれた速度 - */ - int drawEnergy(ForgeDirection from, int power, int speed, boolean simulate); - - /** - * canInterface 繋がるか - * @param from 方角 - * @return その方角に動力を入力または出力出来る場合はtrue - */ - boolean canInterface(ForgeDirection from); - - /** - * getPowerStored 力の取得 - * @param from 方角 - * @return その方角の現在の力の量 - */ - int getPowerStored(ForgeDirection from); - - /** - * getSpeedStored 速度の取得 - * @param from 方角 - * @return その方角の現在の速度の量 - */ - int getSpeedStored(ForgeDirection from); - - /** - * getMaxPowerStored 力の最大値(容量)の取得 - * @param from 方角 - * @return 最大値(容量) - */ - int getMaxPowerStored(ForgeDirection from); - - /** - * getMaxSpeedStored 速度の最大値(容量)の取得 - * @param from 方角 - * @return 最大値(容量) - */ - int getMaxSpeedStored(ForgeDirection from); - -} diff --git a/src/main/java/shift/sextiarysector/api/machine/energy/package-info.java b/src/main/java/shift/sextiarysector/api/machine/energy/package-info.java deleted file mode 100644 index 8a8719d..0000000 --- a/src/main/java/shift/sextiarysector/api/machine/energy/package-info.java +++ /dev/null @@ -1,2 +0,0 @@ -@java.lang.Deprecated -package shift.sextiarysector.api.machine.energy; \ No newline at end of file diff --git a/src/main/java/shift/sextiarysector/api/potion/PotionBase.java b/src/main/java/shift/sextiarysector/api/potion/PotionBase.java new file mode 100644 index 0000000..93cfed3 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/potion/PotionBase.java @@ -0,0 +1,27 @@ +package shift.sextiarysector.api.potion; + +import net.minecraft.client.Minecraft; +import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public abstract class PotionBase extends Potion { + + protected static final ResourceLocation field_147001_a = new ResourceLocation("sextiarysector:textures/guis/potion.png"); + + public PotionBase(int id, boolean isBadEffect, int liquidColor, int icon) { + super(id, isBadEffect, liquidColor); + this.setIconIndex(icon % 8, icon / 8); + } + + @Override + @SideOnly(Side.CLIENT) + public int getStatusIconIndex() { + Minecraft.getMinecraft().renderEngine.bindTexture(this.getPotionResource()); + return super.getStatusIconIndex(); + } + + abstract protected ResourceLocation getPotionResource(); + +} diff --git a/src/main/java/shift/sextiarysector/api/potion/PotionBurn.java b/src/main/java/shift/sextiarysector/api/potion/PotionBurn.java new file mode 100644 index 0000000..d6539fb --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/potion/PotionBurn.java @@ -0,0 +1,37 @@ +package shift.sextiarysector.api.potion; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.DamageSource; +import net.minecraft.util.ResourceLocation; + +public class PotionBurn extends PotionBase { + + public PotionBurn(int id, boolean isBadEffect, int liquidColor, int icon) { + super(id, isBadEffect, liquidColor, icon); + } + + public static final ResourceLocation rl = new ResourceLocation("sextiarysector", "textures/guis/inventory_ss_potion.png"); + + @Override + protected ResourceLocation getPotionResource() { + return rl; + } + + @Override + public void performEffect(EntityLivingBase p_76394_1_, int p_76394_2_) + { + + if (p_76394_1_.getHealth() > 1.0F) + { + p_76394_1_.attackEntityFrom(DamageSource.onFire, 1.0F); + } + + } + + @Override + public boolean isReady(int par1, int par2) + { + int k = 30 >> par2; + return k > 0 ? par1 % k == 0 : true; + } +} diff --git a/src/main/java/shift/sextiarysector/api/potion/PotionHotSprings.java b/src/main/java/shift/sextiarysector/api/potion/PotionHotSprings.java new file mode 100644 index 0000000..b95cd63 --- /dev/null +++ b/src/main/java/shift/sextiarysector/api/potion/PotionHotSprings.java @@ -0,0 +1,42 @@ +package shift.sextiarysector.api.potion; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ResourceLocation; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class PotionHotSprings extends PotionBase { + + public PotionHotSprings(int id, boolean isBadEffect, int liquidColor, int icon) { + super(id, isBadEffect, liquidColor, icon); + } + + public static final ResourceLocation rl = new ResourceLocation("sextiarysector", "textures/guis/inventory_ss_potion.png"); + + @Override + protected ResourceLocation getPotionResource() { + return rl; + } + + @Override + public void performEffect(EntityLivingBase p_76394_1_, int p_76394_2_) + { + + if (!(p_76394_1_ instanceof EntityPlayer)) return; + + EntityPlayer player = (EntityPlayer) p_76394_1_; + + if (SextiarySectorAPI.getMoistureLevel(player) < 3) return; + + SextiarySectorAPI.addStaminaStats(player, 3, 0.7f); + SextiarySectorAPI.addMoistureExhaustion(player, 1.9f); + } + + @Override + public boolean isReady(int par1, int par2) + { + int k = 70 >> par2; + return k > 0 ? par1 % k == 0 : true; + } + +} diff --git a/src/main/java/shift/sextiarysector/asm/DepLoader.java b/src/main/java/shift/sextiarysector/asm/DepLoader.java index 0570fc9..e53306a 100644 --- a/src/main/java/shift/sextiarysector/asm/DepLoader.java +++ b/src/main/java/shift/sextiarysector/asm/DepLoader.java @@ -27,6 +27,7 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -57,584 +58,619 @@ import cpw.mods.fml.relauncher.FMLLaunchHandler; import cpw.mods.fml.relauncher.IFMLCallHook; import cpw.mods.fml.relauncher.IFMLLoadingPlugin; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; /** - * For autodownloading stuff. - * This is really unoriginal, mostly ripped off FML, credits to cpw. + * The majority of this source code was created by FML staff and chickenbone. + * My work is not nearly. */ public class DepLoader implements IFMLLoadingPlugin, IFMLCallHook { - private static ByteBuffer downloadBuffer = ByteBuffer.allocateDirect(1 << 23); - private static final String owner = "CB's DepLoader"; - private static DepLoadInst inst; - - public interface IDownloadDisplay { - void resetProgress(int sizeGuess); - - void setPokeThread(Thread currentThread); - - void updateProgress(int fullLength); - - boolean shouldStopIt(); - - void updateProgressString(String string, Object... data); - - Object makeDialog(); - - void showErrorDialog(String name, String url); - } - - @SuppressWarnings("serial") - public static class Downloader extends JOptionPane implements IDownloadDisplay { - private JDialog container; - private JLabel currentActivity; - private JProgressBar progress; - boolean stopIt; - Thread pokeThread; - - private Box makeProgressPanel() { - Box box = Box.createVerticalBox(); - box.add(Box.createRigidArea(new Dimension(0, 10))); - JLabel welcomeLabel = new JLabel("" + owner + " is setting up your minecraft environment"); - box.add(welcomeLabel); - welcomeLabel.setAlignmentY(LEFT_ALIGNMENT); - welcomeLabel = new JLabel("Please wait, " + owner + " has some tasks to do before you can play"); - welcomeLabel.setAlignmentY(LEFT_ALIGNMENT); - box.add(welcomeLabel); - box.add(Box.createRigidArea(new Dimension(0, 10))); - currentActivity = new JLabel("Currently doing ..."); - box.add(currentActivity); - box.add(Box.createRigidArea(new Dimension(0, 10))); - progress = new JProgressBar(0, 100); - progress.setStringPainted(true); - box.add(progress); - box.add(Box.createRigidArea(new Dimension(0, 30))); - return box; - } - - @Override - public JDialog makeDialog() { - if (container != null) - return container; - - setMessageType(JOptionPane.INFORMATION_MESSAGE); - setMessage(makeProgressPanel()); - setOptions(new Object[]{"Stop"}); - addPropertyChangeListener(new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - if (evt.getSource() == Downloader.this && evt.getPropertyName() == VALUE_PROPERTY) { - requestClose("This will stop minecraft from launching\nAre you sure you want to do this?"); - } - } - }); - container = new JDialog(null, "Hello", ModalityType.MODELESS); - container.setResizable(false); - container.setLocationRelativeTo(null); - container.add(this); - this.updateUI(); - container.pack(); - container.setMinimumSize(container.getPreferredSize()); - container.setVisible(true); - container.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); - container.addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - requestClose("Closing this window will stop minecraft from launching\nAre you sure you wish to do this?"); - } - }); - return container; - } - - protected void requestClose(String message) { - int shouldClose = JOptionPane.showConfirmDialog(container, message, "Are you sure you want to stop?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); - if (shouldClose == JOptionPane.YES_OPTION) - container.dispose(); - - stopIt = true; - if (pokeThread != null) - pokeThread.interrupt(); - } - - @Override - public void updateProgressString(String progressUpdate, Object... data) { - //FMLLog.finest(progressUpdate, data); - if (currentActivity != null) - currentActivity.setText(String.format(progressUpdate, data)); - } - - @Override - public void resetProgress(int sizeGuess) { - if (progress != null) - progress.getModel().setRangeProperties(0, 0, 0, sizeGuess, false); - } - - @Override - public void updateProgress(int fullLength) { - if (progress != null) - progress.getModel().setValue(fullLength); - } - - @Override - public void setPokeThread(Thread currentThread) { - this.pokeThread = currentThread; - } - - @Override - public boolean shouldStopIt() { - return stopIt; - } - - @Override - public void showErrorDialog(String name, String url) { - JEditorPane ep = new JEditorPane("text/html", - "" + - owner + " was unable to download required library " + name + - "
Check your internet connection and try restarting or download it manually from" + - "
" + url + " and put it in your mods folder" + - ""); - - ep.setEditable(false); - ep.setOpaque(false); - ep.addHyperlinkListener(new HyperlinkListener() { - @Override - public void hyperlinkUpdate(HyperlinkEvent event) { - try { - if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) - Desktop.getDesktop().browse(event.getURL().toURI()); - } catch (Exception e) { - } - } - }); - - JOptionPane.showMessageDialog(null, ep, "A download error has occured", JOptionPane.ERROR_MESSAGE); - } - } - - public static class DummyDownloader implements IDownloadDisplay { - @Override - public void resetProgress(int sizeGuess) { - } - - @Override - public void setPokeThread(Thread currentThread) { - } - - @Override - public void updateProgress(int fullLength) { - } - - @Override - public boolean shouldStopIt() { - return false; - } - - @Override - public void updateProgressString(String string, Object... data) { - } - - @Override - public Object makeDialog() { - return null; - } - - @Override - public void showErrorDialog(String name, String url) { - } - } - - public static class VersionedFile - { - public final Pattern pattern; - public final String filename; - public final ComparableVersion version; - public final String name; - - public VersionedFile(String filename, Pattern pattern) { - this.pattern = pattern; - this.filename = filename; - Matcher m = pattern.matcher(filename); - if(m.matches()) { - name = m.group(1); - version = new ComparableVersion(m.group(2)); - } - else { - name = null; - version = null; - } - } - - public boolean matches() { - return name != null; - } - } - - public static class Dependency - { - public String url; - public VersionedFile file; - - public String existing; - /** - * Flag set to add this dep to the classpath immediately because it is required for a coremod. - */ - public boolean coreLib; - - public Dependency(String url, VersionedFile file, boolean coreLib) { - this.url = url; - this.file = file; - this.coreLib = coreLib; - } - } - - public static class DepLoadInst { - private File modsDir; - private File v_modsDir; - private IDownloadDisplay downloadMonitor; - private JDialog popupWindow; - - private Map depMap = new HashMap(); - private HashSet depSet = new HashSet(); - - public DepLoadInst() { - String mcVer = (String) FMLInjectionData.data()[4]; - File mcDir = (File) FMLInjectionData.data()[6]; - - modsDir = new File(mcDir, "mods"); - v_modsDir = new File(mcDir, "mods/" + mcVer); - if (!v_modsDir.exists()) - v_modsDir.mkdirs(); - } - - private void addClasspath(String name) { - try { - ((LaunchClassLoader) DepLoader.class.getClassLoader()).addURL(new File(v_modsDir, name).toURI().toURL()); - } catch (MalformedURLException e) { - throw new RuntimeException(e); - } - } - - private void deleteMod(File mod) { - if (mod.delete()) - return; - - try { - ClassLoader cl = DepLoader.class.getClassLoader(); - URL url = mod.toURI().toURL(); - Field f_ucp = URLClassLoader.class.getDeclaredField("ucp"); - Field f_loaders = URLClassPath.class.getDeclaredField("loaders"); - Field f_lmap = URLClassPath.class.getDeclaredField("lmap"); - f_ucp.setAccessible(true); - f_loaders.setAccessible(true); - f_lmap.setAccessible(true); - - URLClassPath ucp = (URLClassPath) f_ucp.get(cl); - Closeable loader = ((Map) f_lmap.get(ucp)).remove(URLUtil.urlNoFragString(url)); - if (loader != null) { - loader.close(); - ((List) f_loaders.get(ucp)).remove(loader); - } - } catch (Exception e) { - e.printStackTrace(); - } - - if (!mod.delete()) { - mod.deleteOnExit(); - String msg = owner + " was unable to delete file " + mod.getPath() + " the game will now try to delete it on exit. If this dialog appears again, delete it manually."; - System.err.println(msg); - if (!GraphicsEnvironment.isHeadless()) - JOptionPane.showMessageDialog(null, msg, "An update error has occured", JOptionPane.ERROR_MESSAGE); - - System.exit(1); - } - } - - private void download(Dependency dep) { - popupWindow = (JDialog) downloadMonitor.makeDialog(); - File libFile = new File(v_modsDir, dep.file.filename); - try { - URL libDownload = new URL(dep.url + '/' + dep.file.filename); - downloadMonitor.updateProgressString("Downloading file %s", libDownload.toString()); - System.out.format("Downloading file %s\n", libDownload.toString()); - URLConnection connection = libDownload.openConnection(); - connection.setConnectTimeout(5000); - connection.setReadTimeout(5000); - connection.setRequestProperty("User-Agent", "" + owner + " Downloader"); - int sizeGuess = connection.getContentLength(); - download(connection.getInputStream(), sizeGuess, libFile); - downloadMonitor.updateProgressString("Download complete"); - System.out.println("Download complete"); - - scanDepInfo(libFile); - } catch (Exception e) { - libFile.delete(); - if (downloadMonitor.shouldStopIt()) { - System.err.println("You have stopped the downloading operation before it could complete"); - System.exit(1); - return; - } - downloadMonitor.showErrorDialog(dep.file.filename, dep.url + '/' + dep.file.filename); - throw new RuntimeException("A download error occured", e); - } - } - - private void download(InputStream is, int sizeGuess, File target) throws Exception { - if (sizeGuess > downloadBuffer.capacity()) - throw new Exception(String.format("The file %s is too large to be downloaded by " + owner + " - the download is invalid", target.getName())); - - downloadBuffer.clear(); - - int bytesRead, fullLength = 0; - - downloadMonitor.resetProgress(sizeGuess); - try { - downloadMonitor.setPokeThread(Thread.currentThread()); - byte[] smallBuffer = new byte[1024]; - while ((bytesRead = is.read(smallBuffer)) >= 0) { - downloadBuffer.put(smallBuffer, 0, bytesRead); - fullLength += bytesRead; - if (downloadMonitor.shouldStopIt()) { - break; - } - downloadMonitor.updateProgress(fullLength); - } - is.close(); - downloadMonitor.setPokeThread(null); - downloadBuffer.limit(fullLength); - downloadBuffer.position(0); - } catch (InterruptedIOException e) { - // We were interrupted by the stop button. We're stopping now.. clear interruption flag. - Thread.interrupted(); - throw new Exception("Stop"); - } catch (IOException e) { - throw e; - } - - try { - /*String cksum = generateChecksum(downloadBuffer); - if (cksum.equals(validationHash)) - {*/ - if (!target.exists()) - target.createNewFile(); - - - downloadBuffer.position(0); - FileOutputStream fos = new FileOutputStream(target); - fos.getChannel().write(downloadBuffer); - fos.close(); - /*} - else - { - throw new RuntimeException(String.format("The downloaded file %s has an invalid checksum %s (expecting %s). The download did not succeed correctly and the file has been deleted. Please try launching again.", target.getName(), cksum, validationHash)); - }*/ - } catch (Exception e) { - throw e; - } - } - - private String checkExisting(Dependency dep) { - for (File f : modsDir.listFiles()) { - VersionedFile vfile = new VersionedFile(f.getName(), dep.file.pattern); - if (!vfile.matches() || !vfile.name.equals(dep.file.name)) - continue; - - if (f.renameTo(new File(v_modsDir, f.getName()))) - continue; - - deleteMod(f); - } - - for (File f : v_modsDir.listFiles()) { - VersionedFile vfile = new VersionedFile(f.getName(), dep.file.pattern); - if (!vfile.matches() || !vfile.name.equals(dep.file.name)) - continue; - - int cmp = vfile.version.compareTo(dep.file.version); - if (cmp < 0) { - System.out.println("Deleted old version " + f.getName()); - deleteMod(f); - return null; - } - if (cmp > 0) { - System.err.println("Warning: version of " + dep.file.name + ", " + vfile.version + " is newer than request " + dep.file.version); - return f.getName(); - } - return f.getName();//found dependency - } - return null; - } - - public void load() { - scanDepInfos(); - if (depMap.isEmpty()) - return; - - loadDeps(); - activateDeps(); - } - - private void activateDeps() { - for (Dependency dep : depMap.values()) - if (dep.coreLib) - addClasspath(dep.existing); - } - - private void loadDeps() { - downloadMonitor = FMLLaunchHandler.side().isClient() ? new Downloader() : new DummyDownloader(); - try { - while (!depSet.isEmpty()) { - Iterator it = depSet.iterator(); - Dependency dep = depMap.get(it.next()); - it.remove(); - load(dep); - } - } finally { - if (popupWindow != null) { - popupWindow.setVisible(false); - popupWindow.dispose(); - } - } - } - - private void load(Dependency dep) { - dep.existing = checkExisting(dep); - if (dep.existing == null)//download dep - { - download(dep); - dep.existing = dep.file.filename; - } - } - - private List modFiles() { - List list = new LinkedList(); - list.addAll(Arrays.asList(modsDir.listFiles())); - list.addAll(Arrays.asList(v_modsDir.listFiles())); - return list; - } - - private void scanDepInfos() { - for (File file : modFiles()) { - if (!file.getName().endsWith(".jar") && !file.getName().endsWith(".zip")) - continue; - - scanDepInfo(file); - } - } - - private void scanDepInfo(File file) { - try { - ZipFile zip = new ZipFile(file); - ZipEntry e = zip.getEntry("dependancies.info"); - if (e == null) e = zip.getEntry("dependencies.info"); - if (e != null) - loadJSon(zip.getInputStream(e)); - zip.close(); - } catch (Exception e) { - System.err.println("Failed to load dependencies.info from " + file.getName() + " as JSON"); - e.printStackTrace(); - } - } - - private void loadJSon(InputStream input) throws IOException { - InputStreamReader reader = new InputStreamReader(input); - JsonElement root = new JsonParser().parse(reader); - if (root.isJsonArray()) - loadJSonArr(root); - else - loadJson(root.getAsJsonObject()); - reader.close(); - } - - private void loadJSonArr(JsonElement root) throws IOException { - for (JsonElement node : root.getAsJsonArray()) - loadJson(node.getAsJsonObject()); - } - - private void loadJson(JsonObject node) throws IOException { - boolean obfuscated = ((LaunchClassLoader) DepLoader.class.getClassLoader()) - .getClassBytes("net.minecraft.world.World") == null; - - String testClass = node.get("class").getAsString(); - if (DepLoader.class.getResource("/" + testClass.replace('.', '/') + ".class") != null) - return; - - String repo = node.get("repo").getAsString(); - String filename = node.get("file").getAsString(); - if (!obfuscated && node.has("dev")) - filename = node.get("dev").getAsString(); - - boolean coreLib = node.has("coreLib") && node.get("coreLib").getAsBoolean(); - - Pattern pattern = null; - try { - if(node.has("pattern")) - pattern = Pattern.compile(node.get("pattern").getAsString()); - } catch (PatternSyntaxException e) { - System.err.println("Invalid filename pattern: "+node.get("pattern")); - e.printStackTrace(); - } - if(pattern == null) - pattern = Pattern.compile("(\\w+).*?([\\d\\.]+)[-\\w]*\\.[^\\d]+"); - - VersionedFile file = new VersionedFile(filename, pattern); - if (!file.matches()) - throw new RuntimeException("Invalid filename format for dependency: " + filename); - - addDep(new Dependency(repo, file, coreLib)); - } - - private void addDep(Dependency newDep) { - if (mergeNew(depMap.get(newDep.file.name), newDep)) { - depMap.put(newDep.file.name, newDep); - depSet.add(newDep.file.name); - } - } - - private boolean mergeNew(Dependency oldDep, Dependency newDep) { - if (oldDep == null) - return true; - - Dependency newest = newDep.file.version.compareTo(oldDep.file.version) > 0 ? newDep : oldDep; - newest.coreLib = newDep.coreLib || oldDep.coreLib; - - return newest == newDep; - } - } - - public static void load() { - if (inst == null) { - inst = new DepLoadInst(); - inst.load(); - } - } - - @Override - public String[] getASMTransformerClass() { - return null; - } - - @Override - public String getModContainerClass() { - return null; - } - - @Override - public String getSetupClass() { - return getClass().getName(); - } - - @Override - public void injectData(Map data) { - } - - @Override - public Void call() { - load(); - - return null; - } - - @Override - public String getAccessTransformerClass() { - return null; - } + private static ByteBuffer downloadBuffer = ByteBuffer.allocateDirect(1 << 23); + private static final String owner = "SS2's DepLoader";//"CB's DepLoader"; + private static DepLoadInst inst; + + private static final String DEPENDENCIES_INFO = "ss_dependencies.info"; + + public interface IDownloadDisplay { + void resetProgress(int sizeGuess); + + void setPokeThread(Thread currentThread); + + void updateProgress(int fullLength); + + boolean shouldStopIt(); + + void updateProgressString(String string, Object... data); + + Object makeDialog(); + + void showErrorDialog(String name, String url); + } + + @SuppressWarnings("serial") + public static class Downloader extends JOptionPane implements IDownloadDisplay { + private JDialog container; + private JLabel currentActivity; + private JProgressBar progress; + boolean stopIt; + Thread pokeThread; + + private Box makeProgressPanel() { + Box box = Box.createVerticalBox(); + box.add(Box.createRigidArea(new Dimension(0, 10))); + JLabel welcomeLabel = new JLabel("" + owner + " is setting up your minecraft environment"); + box.add(welcomeLabel); + welcomeLabel.setAlignmentY(LEFT_ALIGNMENT); + welcomeLabel = new JLabel("Please wait, " + owner + " has some tasks to do before you can play"); + welcomeLabel.setAlignmentY(LEFT_ALIGNMENT); + box.add(welcomeLabel); + box.add(Box.createRigidArea(new Dimension(0, 10))); + currentActivity = new JLabel("Currently doing ..."); + box.add(currentActivity); + box.add(Box.createRigidArea(new Dimension(0, 10))); + progress = new JProgressBar(0, 100); + progress.setStringPainted(true); + box.add(progress); + box.add(Box.createRigidArea(new Dimension(0, 30))); + return box; + } + + @Override + public JDialog makeDialog() { + if (container != null) + return container; + + setMessageType(JOptionPane.INFORMATION_MESSAGE); + setMessage(makeProgressPanel()); + setOptions(new Object[] { "Stop" }); + addPropertyChangeListener(new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + if (evt.getSource() == Downloader.this && evt.getPropertyName() == VALUE_PROPERTY) { + requestClose("This will stop minecraft from launching\nAre you sure you want to do this?"); + } + } + }); + container = new JDialog(null, "Hello", ModalityType.MODELESS); + container.setResizable(false); + container.setLocationRelativeTo(null); + container.add(this); + this.updateUI(); + container.pack(); + container.setMinimumSize(container.getPreferredSize()); + container.setVisible(true); + container.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); + container.addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + requestClose("Closing this window will stop minecraft from launching\nAre you sure you wish to do this?"); + } + }); + return container; + } + + protected void requestClose(String message) { + int shouldClose = JOptionPane.showConfirmDialog(container, message, "Are you sure you want to stop?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); + if (shouldClose == JOptionPane.YES_OPTION) + container.dispose(); + + stopIt = true; + if (pokeThread != null) + pokeThread.interrupt(); + } + + @Override + public void updateProgressString(String progressUpdate, Object... data) { + //FMLLog.finest(progressUpdate, data); + if (currentActivity != null) + currentActivity.setText(String.format(progressUpdate, data)); + } + + @Override + public void resetProgress(int sizeGuess) { + if (progress != null) + progress.getModel().setRangeProperties(0, 0, 0, sizeGuess, false); + } + + @Override + public void updateProgress(int fullLength) { + if (progress != null) + progress.getModel().setValue(fullLength); + } + + @Override + public void setPokeThread(Thread currentThread) { + this.pokeThread = currentThread; + } + + @Override + public boolean shouldStopIt() { + return stopIt; + } + + @Override + public void showErrorDialog(String name, String url) { + JEditorPane ep = new JEditorPane("text/html", + // "" + + // owner + " was unable to download required library " + name + + // "
Check your internet connection and try restarting or download it manually from" + + // "
" + url + " and put it in your mods folder" + + // ""); + //"" + + // owner + getI18n("dep.ss.error1") + name + getI18n("dep.ss.error2") + + // "
" + getI18n("dep.ss.error3") + + // "
" + url + "" + getI18n("dep.ss.error4") + + // ""); + getErrorI18n(name, url)); + + ep.setEditable(false); + ep.setOpaque(false); + ep.addHyperlinkListener(new HyperlinkListener() { + @Override + public void hyperlinkUpdate(HyperlinkEvent event) { + try { + if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) + Desktop.getDesktop().browse(event.getURL().toURI()); + } catch (Exception e) { + } + } + }); + + JOptionPane.showMessageDialog(null, ep, "A download error has occured", JOptionPane.ERROR_MESSAGE); + } + + @SideOnly(Side.CLIENT) + public String getErrorI18n(String name, String url) { + //return net.minecraft.client.resources.I18n.format(s); + + if (Locale.getDefault().equals(Locale.JAPANESE) || Locale.getDefault().equals(Locale.JAPAN)) { + + return "" + + owner + " は必要なライブラリ " + name + " をダウンロードすることができませんでした。" + + "
インターネットの接続を確認して再起動するか、" + + "
手動で " + url + " からダウンロードしてmodsフォルダに入れてください。" + + ""; + + } + + return "" + + owner + " was unable to download required library " + name + + "
Check your internet connection and try restarting or download it manually from" + + "
" + url + " and put it in your mods folder" + + ""; + } + + } + + public static class DummyDownloader implements IDownloadDisplay { + @Override + public void resetProgress(int sizeGuess) { + } + + @Override + public void setPokeThread(Thread currentThread) { + } + + @Override + public void updateProgress(int fullLength) { + } + + @Override + public boolean shouldStopIt() { + return false; + } + + @Override + public void updateProgressString(String string, Object... data) { + } + + @Override + public Object makeDialog() { + return null; + } + + @Override + public void showErrorDialog(String name, String url) { + } + } + + public static class VersionedFile + { + public final Pattern pattern; + public final String filename; + public final ComparableVersion version; + public final String name; + + public VersionedFile(String filename, Pattern pattern) { + this.pattern = pattern; + this.filename = filename; + Matcher m = pattern.matcher(filename); + if (m.matches()) { + name = m.group(1); + version = new ComparableVersion(m.group(2)); + } + else { + name = null; + version = null; + } + } + + public boolean matches() { + return name != null; + } + } + + public static class Dependency + { + public String url; + public VersionedFile file; + + public String existing; + /** + * Flag set to add this dep to the classpath immediately because it is required for a coremod. + */ + public boolean coreLib; + + public Dependency(String url, VersionedFile file, boolean coreLib) { + this.url = url; + this.file = file; + this.coreLib = coreLib; + } + } + + public static class DepLoadInst { + private final File modsDir; + private final File v_modsDir; + private final File eclipse_modDir; + private IDownloadDisplay downloadMonitor; + private JDialog popupWindow; + + private final Map depMap = new HashMap(); + private final HashSet depSet = new HashSet(); + + public DepLoadInst() { + String mcVer = (String) FMLInjectionData.data()[4]; + File mcDir = (File) FMLInjectionData.data()[6]; + + modsDir = new File(mcDir, "mods"); + v_modsDir = new File(mcDir, "mods/" + mcVer); + eclipse_modDir = new File(mcDir, "../bin"); + if (!v_modsDir.exists()) + v_modsDir.mkdirs(); + + } + + private void addClasspath(String name) { + try { + ((LaunchClassLoader) DepLoader.class.getClassLoader()).addURL(new File(v_modsDir, name).toURI().toURL()); + } catch (MalformedURLException e) { + throw new RuntimeException(e); + } + } + + private void deleteMod(File mod) { + if (mod.delete()) + return; + + try { + ClassLoader cl = DepLoader.class.getClassLoader(); + URL url = mod.toURI().toURL(); + Field f_ucp = URLClassLoader.class.getDeclaredField("ucp"); + Field f_loaders = URLClassPath.class.getDeclaredField("loaders"); + Field f_lmap = URLClassPath.class.getDeclaredField("lmap"); + f_ucp.setAccessible(true); + f_loaders.setAccessible(true); + f_lmap.setAccessible(true); + + URLClassPath ucp = (URLClassPath) f_ucp.get(cl); + Closeable loader = ((Map) f_lmap.get(ucp)).remove(URLUtil.urlNoFragString(url)); + if (loader != null) { + loader.close(); + ((List) f_loaders.get(ucp)).remove(loader); + } + } catch (Exception e) { + e.printStackTrace(); + } + + if (!mod.delete()) { + mod.deleteOnExit(); + String msg = owner + " was unable to delete file " + mod.getPath() + " the game will now try to delete it on exit. If this dialog appears again, delete it manually."; + System.err.println(msg); + if (!GraphicsEnvironment.isHeadless()) + JOptionPane.showMessageDialog(null, msg, "An update error has occured", JOptionPane.ERROR_MESSAGE); + + System.exit(1); + } + } + + private void download(Dependency dep) { + popupWindow = (JDialog) downloadMonitor.makeDialog(); + File libFile = new File(v_modsDir, dep.file.filename); + try { + URL libDownload = new URL(dep.url + '/' + dep.file.filename); + downloadMonitor.updateProgressString("Downloading file %s", libDownload.toString()); + System.out.format("Downloading file %s\n", libDownload.toString()); + URLConnection connection = libDownload.openConnection(); + connection.setConnectTimeout(5000); + connection.setReadTimeout(5000); + connection.setRequestProperty("User-Agent", "" + owner + " Downloader"); + int sizeGuess = connection.getContentLength(); + download(connection.getInputStream(), sizeGuess, libFile); + downloadMonitor.updateProgressString("Download complete"); + System.out.println("Download complete"); + + scanDepInfo(libFile); + } catch (Exception e) { + libFile.delete(); + if (downloadMonitor.shouldStopIt()) { + System.err.println("You have stopped the downloading operation before it could complete"); + System.exit(1); + return; + } + downloadMonitor.showErrorDialog(dep.file.filename, dep.url + '/' + dep.file.filename); + throw new RuntimeException("A download error occured", e); + } + } + + private void download(InputStream is, int sizeGuess, File target) throws Exception { + if (sizeGuess > downloadBuffer.capacity()) + throw new Exception(String.format("The file %s is too large to be downloaded by " + owner + " - the download is invalid", target.getName())); + + downloadBuffer.clear(); + + int bytesRead, fullLength = 0; + + downloadMonitor.resetProgress(sizeGuess); + try { + downloadMonitor.setPokeThread(Thread.currentThread()); + byte[] smallBuffer = new byte[1024]; + while ((bytesRead = is.read(smallBuffer)) >= 0) { + downloadBuffer.put(smallBuffer, 0, bytesRead); + fullLength += bytesRead; + if (downloadMonitor.shouldStopIt()) { + break; + } + downloadMonitor.updateProgress(fullLength); + } + is.close(); + downloadMonitor.setPokeThread(null); + downloadBuffer.limit(fullLength); + downloadBuffer.position(0); + } catch (InterruptedIOException e) { + // We were interrupted by the stop button. We're stopping now.. clear interruption flag. + Thread.interrupted(); + throw new Exception("Stop"); + } catch (IOException e) { + throw e; + } + + try { + /*String cksum = generateChecksum(downloadBuffer); + if (cksum.equals(validationHash)) + {*/ + if (!target.exists()) + target.createNewFile(); + + downloadBuffer.position(0); + FileOutputStream fos = new FileOutputStream(target); + fos.getChannel().write(downloadBuffer); + fos.close(); + /*} + else + { + throw new RuntimeException(String.format("The downloaded file %s has an invalid checksum %s (expecting %s). The download did not succeed correctly and the file has been deleted. Please try launching again.", target.getName(), cksum, validationHash)); + }*/ + } catch (Exception e) { + throw e; + } + } + + private String checkExisting(Dependency dep) { + for (File f : modsDir.listFiles()) { + VersionedFile vfile = new VersionedFile(f.getName(), dep.file.pattern); + if (!vfile.matches() || !vfile.name.equals(dep.file.name)) + continue; + + if (f.renameTo(new File(v_modsDir, f.getName()))) + continue; + + deleteMod(f); + } + + for (File f : v_modsDir.listFiles()) { + VersionedFile vfile = new VersionedFile(f.getName(), dep.file.pattern); + if (!vfile.matches() || !vfile.name.equals(dep.file.name)) + continue; + + int cmp = vfile.version.compareTo(dep.file.version); + if (cmp < 0) { + System.out.println("Deleted old version " + f.getName()); + deleteMod(f); + return null; + } + if (cmp > 0) { + System.err.println("Warning: version of " + dep.file.name + ", " + vfile.version + " is newer than request " + dep.file.version); + return f.getName(); + } + return f.getName();//found dependency + } + return null; + } + + public void load() { + scanDepInfos(); + if (depMap.isEmpty()) + return; + + loadDeps(); + activateDeps(); + } + + private void activateDeps() { + for (Dependency dep : depMap.values()) + if (dep.coreLib) + addClasspath(dep.existing); + } + + private void loadDeps() { + downloadMonitor = FMLLaunchHandler.side().isClient() ? new Downloader() : new DummyDownloader(); + try { + while (!depSet.isEmpty()) { + Iterator it = depSet.iterator(); + Dependency dep = depMap.get(it.next()); + it.remove(); + load(dep); + } + } finally { + if (popupWindow != null) { + popupWindow.setVisible(false); + popupWindow.dispose(); + } + } + } + + private void load(Dependency dep) { + dep.existing = checkExisting(dep); + if (dep.existing == null)//download dep + { + download(dep); + dep.existing = dep.file.filename; + } + } + + private List modFiles() { + List list = new LinkedList(); + list.addAll(Arrays.asList(modsDir.listFiles())); + list.add(new File(eclipse_modDir, "ss.zip"));//SS2用の処理 + list.addAll(Arrays.asList(v_modsDir.listFiles())); + return list; + } + + private void scanDepInfos() { + for (File file : modFiles()) { + if (!file.getName().endsWith(".jar") && !file.getName().endsWith(".zip")) + continue; + + scanDepInfo(file); + } + } + + private void scanDepInfo(File file) { + try { + ZipFile zip = new ZipFile(file); + ZipEntry e = zip.getEntry("ss_dependencies.info"); + if (e == null) e = zip.getEntry("ss_dependencies.info"); + if (e != null) + loadJSon(zip.getInputStream(e)); + zip.close(); + } catch (Exception e) { + System.err.println("Failed to load dependencies.info from " + file.getName() + " as JSON"); + e.printStackTrace(); + } + } + + private void loadJSon(InputStream input) throws IOException { + InputStreamReader reader = new InputStreamReader(input); + JsonElement root = new JsonParser().parse(reader); + if (root.isJsonArray()) + loadJSonArr(root); + else + loadJson(root.getAsJsonObject()); + reader.close(); + } + + private void loadJSonArr(JsonElement root) throws IOException { + for (JsonElement node : root.getAsJsonArray()) + loadJson(node.getAsJsonObject()); + } + + private void loadJson(JsonObject node) throws IOException { + boolean obfuscated = ((LaunchClassLoader) DepLoader.class.getClassLoader()) + .getClassBytes("net.minecraft.world.World") == null; + + String testClass = node.get("class").getAsString(); + if (DepLoader.class.getResource("/" + testClass.replace('.', '/') + ".class") != null) + return; + + String repo = node.get("repo").getAsString(); + String filename = node.get("file").getAsString(); + if (!obfuscated && node.has("dev")) + filename = node.get("dev").getAsString(); + + boolean coreLib = node.has("coreLib") && node.get("coreLib").getAsBoolean(); + + Pattern pattern = null; + try { + if (node.has("pattern")) + pattern = Pattern.compile(node.get("pattern").getAsString()); + } catch (PatternSyntaxException e) { + System.err.println("Invalid filename pattern: " + node.get("pattern")); + e.printStackTrace(); + } + if (pattern == null) + pattern = Pattern.compile("(\\w+).*?([\\d\\.]+)[-\\w]*\\.[^\\d]+"); + + VersionedFile file = new VersionedFile(filename, pattern); + if (!file.matches()) + throw new RuntimeException("Invalid filename format for dependency: " + filename); + + addDep(new Dependency(repo, file, coreLib)); + } + + private void addDep(Dependency newDep) { + if (mergeNew(depMap.get(newDep.file.name), newDep)) { + depMap.put(newDep.file.name, newDep); + depSet.add(newDep.file.name); + } + } + + private boolean mergeNew(Dependency oldDep, Dependency newDep) { + if (oldDep == null) + return true; + + Dependency newest = newDep.file.version.compareTo(oldDep.file.version) > 0 ? newDep : oldDep; + newest.coreLib = newDep.coreLib || oldDep.coreLib; + + return newest == newDep; + } + } + + public static void load() { + if (inst == null) { + inst = new DepLoadInst(); + inst.load(); + } + } + + @Override + public String[] getASMTransformerClass() { + return null; + } + + @Override + public String getModContainerClass() { + return null; + } + + @Override + public String getSetupClass() { + return getClass().getName(); + } + + @Override + public void injectData(Map data) { + } + + @Override + public Void call() { + load(); + + return null; + } + + @Override + public String getAccessTransformerClass() { + return null; + } } \ No newline at end of file diff --git a/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java b/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java index 7e446eb..126ae11 100644 --- a/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java +++ b/src/main/java/shift/sextiarysector/block/BlockBoardingBuoy.java @@ -41,7 +41,7 @@ public int getLightValue(IBlockAccess world, int x, int y, int z) public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { - if (par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() == SSItems.hammer) { + if (par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() == SSItems.ironSpanner) { int i = par1World.getBlockMetadata(par2, par3, par4); if (this.ispowered(par1World, par2, par3, par4)) { diff --git a/src/main/java/shift/sextiarysector/block/BlockFigure.java b/src/main/java/shift/sextiarysector/block/BlockFigure.java index 2d915f2..5721839 100644 --- a/src/main/java/shift/sextiarysector/block/BlockFigure.java +++ b/src/main/java/shift/sextiarysector/block/BlockFigure.java @@ -88,9 +88,18 @@ public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_1496 ItemStack itemstack2 = new ItemStack(p_149666_1_, 1, 0); - setFigureItem(itemstack2, new ItemStack(SSItems.hammer, 1, 0), "creative"); + setFigureItem(itemstack2, new ItemStack(SSItems.ironSpanner, 1, 0), "creative"); p_149666_3_.add(itemstack2); + + ItemStack itemstack3 = new ItemStack(p_149666_1_, 1, 0); + ItemStack itemstack4 = new ItemStack(p_149666_1_, 1, 0); + + setFigureItem(itemstack3, new ItemStack(SSItems.ironSpanner, 1, 0), "creative"); + setFigureItem(itemstack4, itemstack3, "creative"); + + p_149666_3_.add(itemstack4); + } @Override diff --git a/src/main/java/shift/sextiarysector/block/BlockLargeOre.java b/src/main/java/shift/sextiarysector/block/BlockLargeOre.java index 12bceeb..d873ed2 100644 --- a/src/main/java/shift/sextiarysector/block/BlockLargeOre.java +++ b/src/main/java/shift/sextiarysector/block/BlockLargeOre.java @@ -10,14 +10,15 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import shift.sextiarysector.SextiarySector; import shift.sextiarysector.api.SextiarySectorAPI; -public class BlockLargeOre extends Block{ +public class BlockLargeOre extends Block { - private Item oreItem; - private Block oreBlock; + private final Item oreItem; + private final Block oreBlock; - public BlockLargeOre(Item item,Block block, int level) { + public BlockLargeOre(Item item, Block block, int level) { super(Material.rock); this.oreItem = item; this.oreBlock = block; @@ -28,36 +29,38 @@ public BlockLargeOre(Item item,Block block, int level) { this.setCreativeTab(SextiarySectorAPI.TabSSMining); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) - { + { return oreItem; - } + } + @Override public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) - { - ArrayList ret = new ArrayList(); - - int count = quantityDropped(metadata, fortune, world.rand); - for(int i = 0; i < count; i++) - { - Item item = getItemDropped(metadata, world.rand, fortune); - if (item != null) - { - ret.add(new ItemStack(item, 1, damageDropped(metadata))); - if(oreBlock==Blocks.coal_ore){ - ret.add(new ItemStack(Items.coal, 2)); - }else{ - ret.add(new ItemStack(oreBlock, 1, damageDropped(metadata))); - } - - } - } - return ret; - } + { + ArrayList ret = new ArrayList(); + + int count = quantityDropped(metadata, fortune, world.rand); + for (int i = 0; i < count; i++) + { + Item item = getItemDropped(metadata, world.rand, fortune); + if (item != null) + { + ret.add(new ItemStack(item, 1, damageDropped(metadata))); + if (oreBlock == Blocks.coal_ore) { + ret.add(new ItemStack(Items.coal, 2)); + } else { + ret.add(new ItemStack(oreBlock, 1, damageDropped(metadata))); + } + + } + } + return ret; + } /* public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) - { + { if(!willHarvest){ return super.removedByPlayer(world, player, x, y, z, willHarvest); }else if(world.getBlockMetadata(x, y, z)==0){ @@ -66,19 +69,26 @@ public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, i return world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)-1, 4); - } + } @SideOnly(Side.CLIENT) - public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) - { + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) + { for(int i=0;i<4;i++){ p_149666_3_.add(new ItemStack(p_149666_1_,1,i)); } - }*/ + }*/ + @Override protected boolean canSilkHarvest() - { + { return false; - } + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.oreStoneType; + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockLeafBed.java b/src/main/java/shift/sextiarysector/block/BlockLeafBed.java new file mode 100644 index 0000000..b6271cd --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockLeafBed.java @@ -0,0 +1,66 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; +import shift.sextiarysector.SextiarySector; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockLeafBed extends Block { + + @SideOnly(Side.CLIENT) + protected IIcon[] blockIcons; + + public BlockLeafBed() { + super(Material.wood); + //this.setLightOpacity(255); + this.setLightOpacity(1); + this.setStepSound(soundTypeGrass); + this.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 4.0f / 16.0f, 1.0f); + this.setHardness(1.2f); + this.setStepSound(soundTypeWood); + this.useNeighborBrightness = true; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(this.getTextureName() + "_0"); + + blockIcons = new IIcon[3]; + + for (int i = 0; i < blockIcons.length; i++) { + blockIcons[i] = p_149651_1_.registerIcon(this.getTextureName() + "_" + i); + } + + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + return this.blockIcons[p_149691_2_]; + } + + @Override + public boolean isOpaqueCube() + { + return false; + } + + @Override + public boolean renderAsNormalBlock() + { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.leafBedType; + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockMonitor.java b/src/main/java/shift/sextiarysector/block/BlockMonitor.java index fd4df15..576f0f7 100644 --- a/src/main/java/shift/sextiarysector/block/BlockMonitor.java +++ b/src/main/java/shift/sextiarysector/block/BlockMonitor.java @@ -29,7 +29,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockMonitor extends BlockContainer{ +public class BlockMonitor extends BlockContainer { public BlockMonitor() { super(Material.iron); @@ -41,18 +41,18 @@ public BlockMonitor() { @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { - TileEntityMonitor tileEntity = (TileEntityMonitor)world.getTileEntity(x, y, z); + TileEntityMonitor tileEntity = (TileEntityMonitor) world.getTileEntity(x, y, z); - if(par5EntityPlayer.getCurrentEquippedItem()==null){ + if (par5EntityPlayer.getCurrentEquippedItem() == null) { - if(par5EntityPlayer.isSneaking()){ + if (par5EntityPlayer.isSneaking()) { tileEntity.changeON(); world.markBlockRangeForRenderUpdate(x, y, z, x, y, z); return true; - }else if(tileEntity.on){ + } else if (tileEntity.on) { MCEconomyAPI.openShopGui(tileEntity.type.getList(world).id, par5EntityPlayer, world, x, y, z); @@ -61,10 +61,9 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p return true; } + if (!world.isRemote && par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() == SSItems.ironSpanner) { - if(!world.isRemote && par5EntityPlayer.getCurrentEquippedItem()!=null && par5EntityPlayer.getCurrentEquippedItem().getItem()==SSItems.hammer){ - - EntityItem item = new EntityItem(world, x+0.5d, y+0.5d, z+0.5d, new ItemStack(this,1,tileEntity.type.ordinal())); + EntityItem item = new EntityItem(world, x + 0.5d, y + 0.5d, z + 0.5d, new ItemStack(this, 1, tileEntity.type.ordinal())); world.spawnEntityInWorld(item); @@ -76,26 +75,27 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p } + @Override public int getLightValue(IBlockAccess world, int x, int y, int z) - { - if(world.getBlockMetadata(x, y, z)==1)return 15; + { + if (world.getBlockMetadata(x, y, z) == 1) return 15; return 0; - } + } - public enum MonitorType{ + public enum MonitorType { - creeper("creeper","creeper"), - robot("robot","robot"), - unknown("",""); + creeper("creeper", "creeper"), + robot("robot", "robot"), + unknown("", ""); public String name; private ResourceLocation resource; private SSProductList list; private SSProductList[] sList; - MonitorType(String name,String resource){ + MonitorType(String name, String resource) { this.name = name; - this.setResource(new ResourceLocation("sextiarysector:textures/models/monitor_"+resource + ".png")); + this.setResource(new ResourceLocation("sextiarysector:textures/models/monitor_" + resource + ".png")); } public ResourceLocation getResource() { @@ -108,7 +108,7 @@ private void setResource(ResourceLocation resource) { public SSProductList getList(World world) { - if(world==null||sList==null)return this.getList(); + if (world == null || sList == null) return this.getList(); return sList[SeasonAPI.getSeason(world).ordinal()]; } @@ -128,17 +128,18 @@ public void setList(SSProductList[] list) { } - public static ItemStack getMonitor(MonitorType t){ - return new ItemStack(SSBlocks.monitor,1,t.ordinal()); + public static ItemStack getMonitor(MonitorType t) { + return new ItemStack(SSBlocks.monitor, 1, t.ordinal()); } + @Override @SideOnly(Side.CLIENT) - public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) - { - for(int i=0;i getDrops(World world, int x, int y, int z, int metadata, int fortune) - { - ArrayList ret = new ArrayList(); + { + ArrayList ret = new ArrayList(); - ret.add(new ItemStack(Blocks.dirt, 1)); + ret.add(new ItemStack(Blocks.dirt, 1)); - return ret; - } + return ret; + } //ブロックの線 + @Override public void setBlockBoundsForItemRender() - { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } + { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + @Override public boolean isOpaqueCube() - { - return false; - } + { + return false; + } + @Override public boolean renderAsNormalBlock() - { - return false; - } + { + return false; + } + @Override public int getRenderType() - { - return SextiarySector.proxy.paddyType; - } + { + return SextiarySector.proxy.paddyType; + } @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { diff --git a/src/main/java/shift/sextiarysector/block/BlockPowerStone.java b/src/main/java/shift/sextiarysector/block/BlockPowerStone.java index 105016e..32c5269 100644 --- a/src/main/java/shift/sextiarysector/block/BlockPowerStone.java +++ b/src/main/java/shift/sextiarysector/block/BlockPowerStone.java @@ -11,10 +11,11 @@ import net.minecraft.world.World; import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SSItems; +import shift.sextiarysector.SextiarySector; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockPowerStone extends Block{ +public class BlockPowerStone extends Block { public BlockPowerStone() { super(Material.rock); @@ -26,156 +27,162 @@ public BlockPowerStone() { @Override public int getLightValue(IBlockAccess world, int x, int y, int z) - { - if(this.isGlowing(world, x, y, z)){ - return (int)(15.0F * 0.725F); + { + if (this.isGlowing(world, x, y, z)) { + return (int) (15.0F * 0.725F); } return 0; - } + } public boolean isGlowing(IBlockAccess world, int par2, int par3, int par4) - { - return world.getBlockMetadata(par2, par3, par4)!=0; - } + { + return world.getBlockMetadata(par2, par3, par4) != 0; + } - @Override + @Override public int tickRate(World par1World) - { - return 30; - } + { + return 30; + } - @Override + @Override public void onBlockClicked(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer) - { - this.glow(par1World, par2, par3, par4); - super.onBlockClicked(par1World, par2, par3, par4, par5EntityPlayer); - } + { + this.glow(par1World, par2, par3, par4); + super.onBlockClicked(par1World, par2, par3, par4, par5EntityPlayer); + } - @Override + @Override public void onEntityWalking(World par1World, int par2, int par3, int par4, Entity par5Entity) - { - this.glow(par1World, par2, par3, par4); - super.onEntityWalking(par1World, par2, par3, par4, par5Entity); - } + { + this.glow(par1World, par2, par3, par4); + super.onEntityWalking(par1World, par2, par3, par4, par5Entity); + } - @Override + @Override public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) - { - this.glow(par1World, par2, par3, par4); - return super.onBlockActivated(par1World, par2, par3, par4, par5EntityPlayer, par6, par7, par8, par9); - } - - private void glow(World par1World, int par2, int par3, int par4) - { - this.sparkle(par1World, par2, par3, par4); - - if (0 == par1World.getBlockMetadata(par2, par3, par4)) - { - par1World.setBlock(par2, par3, par4, this,1,1); - } - } - - @Override + { + this.glow(par1World, par2, par3, par4); + return super.onBlockActivated(par1World, par2, par3, par4, par5EntityPlayer, par6, par7, par8, par9); + } + + private void glow(World par1World, int par2, int par3, int par4) + { + this.sparkle(par1World, par2, par3, par4); + + if (0 == par1World.getBlockMetadata(par2, par3, par4)) + { + par1World.setBlock(par2, par3, par4, this, 1, 1); + } + } + + @Override public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) - { - if (this.isGlowing(par1World, par2, par3, par4)) - { - par1World.setBlock(par2, par3, par4, this,0,2); - } - } - - @Override + { + if (this.isGlowing(par1World, par2, par3, par4)) + { + par1World.setBlock(par2, par3, par4, this, 0, 2); + } + } + + @Override public Item getItemDropped(int par1, Random par2Random, int par3) - { - if(this==SSBlocks.blueStoneOre){ - return SSItems.blueStoneDust; - }else{ - return SSItems.yellowStoneDust; - } + { + if (this == SSBlocks.blueStoneOre) { + return SSItems.blueStoneDust; + } else { + return SSItems.yellowStoneDust; + } - } + } - @Override + @Override public int quantityDroppedWithBonus(int par1, Random par2Random) - { - return this.quantityDropped(par2Random) + par2Random.nextInt(par1 + 1); - } + { + return this.quantityDropped(par2Random) + par2Random.nextInt(par1 + 1); + } - @Override + @Override public int quantityDropped(Random par1Random) - { - return 4 + par1Random.nextInt(2); - } + { + return 4 + par1Random.nextInt(2); + } - @Override + @Override public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) - { - super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7); + { + super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7); - } + } - @Override + @Override @SideOnly(Side.CLIENT) - public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) - { - if (this.isGlowing(par1World, par2, par3, par4)) - { - this.sparkle(par1World, par2, par3, par4); - } - } - - private void sparkle(World par1World, int par2, int par3, int par4) - { - Random random = par1World.rand; - double d0 = 0.0625D; - - for (int l = 0; l < 6; ++l) - { - double d1 = (double)((float)par2 + random.nextFloat()); - double d2 = (double)((float)par3 + random.nextFloat()); - double d3 = (double)((float)par4 + random.nextFloat()); - - if (l == 0 && !par1World.getBlock(par2, par3 + 1, par4).isOpaqueCube()) - { - d2 = (double)(par3 + 1) + d0; - } - - if (l == 1 && !par1World.getBlock(par2, par3 - 1, par4).isOpaqueCube()) - { - d2 = (double)(par3 + 0) - d0; - } - - if (l == 2 && !par1World.getBlock(par2, par3, par4 + 1).isOpaqueCube()) - { - d3 = (double)(par4 + 1) + d0; - } - - if (l == 3 && !par1World.getBlock(par2, par3, par4 - 1).isOpaqueCube()) - { - d3 = (double)(par4 + 0) - d0; - } - - if (l == 4 && !par1World.getBlock(par2 + 1, par3, par4).isOpaqueCube()) - { - d1 = (double)(par2 + 1) + d0; - } - - if (l == 5 && !par1World.getBlock(par2 - 1, par3, par4).isOpaqueCube()) - { - d1 = (double)(par2 + 0) - d0; - } - - if (d1 < (double)par2 || d1 > (double)(par2 + 1) || d2 < 0.0D || d2 > (double)(par3 + 1) || d3 < (double)par4 || d3 > (double)(par4 + 1)) - { - if(this==SSBlocks.blueStoneOre){ - par1World.spawnParticle("reddust", d1, d2, d3, -0.3D, 0.0D, 1.0D); - }else{ - par1World.spawnParticle("reddust", d1, d2, d3, 0.0D, 0.8D, 0.0D); - } - } - - } - } + public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) + { + if (this.isGlowing(par1World, par2, par3, par4)) + { + this.sparkle(par1World, par2, par3, par4); + } + } + + private void sparkle(World par1World, int par2, int par3, int par4) + { + Random random = par1World.rand; + double d0 = 0.0625D; + + for (int l = 0; l < 6; ++l) + { + double d1 = par2 + random.nextFloat(); + double d2 = par3 + random.nextFloat(); + double d3 = par4 + random.nextFloat(); + + if (l == 0 && !par1World.getBlock(par2, par3 + 1, par4).isOpaqueCube()) + { + d2 = par3 + 1 + d0; + } + + if (l == 1 && !par1World.getBlock(par2, par3 - 1, par4).isOpaqueCube()) + { + d2 = par3 + 0 - d0; + } + + if (l == 2 && !par1World.getBlock(par2, par3, par4 + 1).isOpaqueCube()) + { + d3 = par4 + 1 + d0; + } + + if (l == 3 && !par1World.getBlock(par2, par3, par4 - 1).isOpaqueCube()) + { + d3 = par4 + 0 - d0; + } + + if (l == 4 && !par1World.getBlock(par2 + 1, par3, par4).isOpaqueCube()) + { + d1 = par2 + 1 + d0; + } + + if (l == 5 && !par1World.getBlock(par2 - 1, par3, par4).isOpaqueCube()) + { + d1 = par2 + 0 - d0; + } + + if (d1 < par2 || d1 > par2 + 1 || d2 < 0.0D || d2 > par3 + 1 || d3 < par4 || d3 > par4 + 1) + { + if (this == SSBlocks.blueStoneOre) { + par1World.spawnParticle("reddust", d1, d2, d3, -0.3D, 0.0D, 1.0D); + } else { + par1World.spawnParticle("reddust", d1, d2, d3, 0.0D, 0.8D, 0.0D); + } + } + + } + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.oreStoneType; + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java b/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java index fe873b6..4df63b1 100644 --- a/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java +++ b/src/main/java/shift/sextiarysector/block/BlockPoweredBuoy.java @@ -25,7 +25,7 @@ public BlockPoweredBuoy() { public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { - if (par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() == SSItems.hammer) { + if (par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() == SSItems.ironSpanner) { int i = par1World.getBlockMetadata(par2, par3, par4); if (i < 7) { i += 1; diff --git a/src/main/java/shift/sextiarysector/block/BlockSSOre.java b/src/main/java/shift/sextiarysector/block/BlockSSOre.java index d412225..53a5cc4 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSSOre.java +++ b/src/main/java/shift/sextiarysector/block/BlockSSOre.java @@ -5,13 +5,14 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.Item; +import shift.sextiarysector.SextiarySector; import shift.sextiarysector.api.SextiarySectorAPI; -public class BlockSSOre extends Block{ +public class BlockSSOre extends Block { - private Item oreItem; + private final Item oreItem; - public BlockSSOre(Item item,int level) { + public BlockSSOre(Item item, int level) { super(Material.rock); this.oreItem = item; this.setHarvestLevel("pickaxe", level); @@ -21,9 +22,16 @@ public BlockSSOre(Item item,int level) { this.setCreativeTab(SextiarySectorAPI.TabSSMining); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) - { - return oreItem !=null ? this.oreItem : super.getItemDropped(p_149650_1_, p_149650_2_, p_149650_3_); - } + { + return oreItem != null ? this.oreItem : super.getItemDropped(p_149650_1_, p_149650_2_, p_149650_3_); + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.oreStoneType; + } } diff --git a/src/main/java/shift/sextiarysector/block/BlockWoodenGutter.java b/src/main/java/shift/sextiarysector/block/BlockWoodenGutter.java new file mode 100644 index 0000000..f9b41d6 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockWoodenGutter.java @@ -0,0 +1,114 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.tileentity.TileEntityDirection; +import shift.sextiarysector.tileentity.TileEntityWoodenGutter; + +public class BlockWoodenGutter extends BlockContainer { + + protected BlockWoodenGutter() { + super(Material.wood); + this.setLightOpacity(255); + this.setStepSound(this.soundTypeWood); + this.useNeighborBrightness = true; + } + + @Override + public void onBlockAdded(World par1World, int par2, int par3, int par4) { + super.onBlockAdded(par1World, par2, par3, par4); + + } + + private void setDefaultDirection(World par1World, int par2, int par3, int par4) { + + if (!par1World.isRemote) { + + Block block = par1World.getBlock(par2, par3, par4 - 1); + Block block1 = par1World.getBlock(par2, par3, par4 + 1); + Block block2 = par1World.getBlock(par2 - 1, par3, par4); + Block block3 = par1World.getBlock(par2 + 1, par3, par4); + + TileEntityDirection tileEntity = (TileEntityDirection) par1World.getTileEntity(par2, par3, par4); + + byte b0 = 3; + + if (block.func_149730_j() && !block1.func_149730_j()) { + b0 = 3; + } + + if (block1.func_149730_j() && !block.func_149730_j()) { + b0 = 2; + } + + if (block2.func_149730_j() && !block3.func_149730_j()) { + b0 = 5; + } + + if (block3.func_149730_j() && !block2.func_149730_j()) { + b0 = 4; + } + + par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); + tileEntity.direction = ForgeDirection.getOrientation(b0); + + } + + } + + @Override + public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) { + + int l = MathHelper.floor_double(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + + TileEntityDirection tileEntity = (TileEntityDirection) par1World.getTileEntity(par2, par3, par4); + + if (l == 0) { + tileEntity.direction = ForgeDirection.getOrientation(2); + } + + if (l == 1) { + tileEntity.direction = ForgeDirection.getOrientation(5); + } + + if (l == 2) { + tileEntity.direction = ForgeDirection.getOrientation(3); + } + + if (l == 3) { + tileEntity.direction = ForgeDirection.getOrientation(4); + } + + } + + @Override + public TileEntity createNewTileEntity(World par1World, int p_149915_2_) + { + return new TileEntityWoodenGutter(); + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.woodenGutterType; + } + +} diff --git a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java index 3129c2c..bc34789 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java +++ b/src/main/java/shift/sextiarysector/container/ContainerPlayerNext.java @@ -182,32 +182,34 @@ public boolean canTakeStack(EntityPlayer player) { }); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Necklace, this.equipment, 4, 80 + 1 * 18, 8 + 0 * 18)); + //this.addSlotToContainer(new SlotEquipment(EquipmentType.Necklace, this.equipment, 4, 80 + 1 * 18, 8 + 0 * 18)); //this.addSlotToContainer(new Slot(this.equipment,0, 80 + 0 * 18, 8 + 0 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 5, 80 + 1 * 18, 8 + 1 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 6, 80 + 1 * 18, 8 + 2 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 7, 80 + 1 * 18, 8 + 3 * 18)); + //this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 5, 80 + 1 * 18, 8 + 1 * 18)); + //this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 6, 80 + 1 * 18, 8 + 2 * 18)); + //this.addSlotToContainer(new SlotEquipment(EquipmentType.Ring, this.equipment, 7, 80 + 1 * 18, 8 + 3 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Face, this.equipment, 8, 80 + 2 * 18, 8 + 0 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Bag, this.equipment, 9, 80 + 2 * 18, 8 + 1 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Hand, this.equipment, 10, 80 + 2 * 18, 8 + 2 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Belt, this.equipment, 11, 80 + 2 * 18, 8 + 3 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Face, this.equipment, 4, 80 + 1 * 18, 8 + 0 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Bag, this.equipment, 5, 80 + 1 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Hand, this.equipment, 6, 80 + 1 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Belt, this.equipment, 7, 80 + 1 * 18, 8 + 3 * 18)); + + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 8, 80 + 2 * 18, 8 + 0 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 9, 80 + 2 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 10, 80 + 2 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 11, 80 + 2 * 18, 8 + 3 * 18)); this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 12, 80 + 3 * 18, 8 + 0 * 18)); this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 13, 80 + 3 * 18, 8 + 1 * 18)); this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 14, 80 + 3 * 18, 8 + 2 * 18)); this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 15, 80 + 3 * 18, 8 + 3 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 16, 80 + 4 * 18, 8 + 0 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 17, 80 + 4 * 18, 8 + 1 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 18, 80 + 4 * 18, 8 + 2 * 18)); - this.addSlotToContainer(new SlotEquipment(EquipmentType.Unit, this.equipment, 19, 80 + 4 * 18, 8 + 3 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 16, 80 + 4 * 18, 8 + 0 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 17, 80 + 4 * 18, 8 + 1 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 18, 80 + 4 * 18, 8 + 2 * 18)); + this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 19, 80 + 4 * 18, 8 + 3 * 18)); - //this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 16, 80 + 4 * 18, 8 + 0 * 18)); - //this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 17, 80 + 4 * 18, 8 + 1 * 18)); - //this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 18, 80 + 4 * 18, 8 + 2 * 18)); - //this.addSlotToContainer(new SlotEquipment(EquipmentType.Other, this.equipment, 19, 80 + 4 * 18, 8 + 3 * 18)); + //60 } @@ -233,118 +235,91 @@ public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); - if (itemstack.getItem() instanceof ItemArmor && !((Slot) this.inventorySlots.get(5 + ((ItemArmor) itemstack.getItem()).armorType)).getHasStack()) - { - int j = 0 + ((ItemArmor) itemstack.getItem()).armorType; + if (!((0 <= p_82846_2_ && p_82846_2_ <= 3) || (40 <= p_82846_2_ && p_82846_2_ <= 60))) { - if (!this.mergeItemStack(itemstack1, j, j + 1, false)) + if (itemstack.getItem() instanceof ItemArmor && !((Slot) this.inventorySlots.get(0 + ((ItemArmor) itemstack.getItem()).armorType)).getHasStack()) { - return null; - } - } - else if (itemstack.getItem() instanceof ItemArmor && !((Slot) this.inventorySlots.get(45 + ((ItemArmor) itemstack.getItem()).armorType)).getHasStack()) - { - int j = 40 + ((ItemArmor) itemstack.getItem()).armorType; + int j = 0 + ((ItemArmor) itemstack.getItem()).armorType; - if (!this.mergeItemStack(itemstack1, j, j + 1, false)) - { - return null; + if (!this.mergeItemStack(itemstack1, j, j + 1, false)) + { + return null; + } } - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Necklace, itemstack)) - { - - if (!this.mergeItemStack(itemstack1, 44, 45, false)) + else if (itemstack.getItem() instanceof ItemArmor && !((Slot) this.inventorySlots.get(40 + ((ItemArmor) itemstack.getItem()).armorType)).getHasStack()) { - return null; - } - - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Ring, itemstack)) - { + int j = 40 + ((ItemArmor) itemstack.getItem()).armorType; - if (!this.mergeItemStack(itemstack1, 45, 48, false)) - { - return null; + if (!this.mergeItemStack(itemstack1, j, j + 1, false)) + { + return null; + } } - - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Face, itemstack)) - { - - if (!this.mergeItemStack(itemstack1, 48, 49, false)) + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Face, itemstack)) { - return null; - } - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Bag, itemstack)) - { + if (!this.mergeItemStack(itemstack1, 44, 45, false)) + { + return null; + } - if (!this.mergeItemStack(itemstack1, 49, 50, false)) + } else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Bag, itemstack)) { - return null; - } - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Hand, itemstack)) - { + if (!this.mergeItemStack(itemstack1, 45, 46, false)) + { + return null; + } - if (!this.mergeItemStack(itemstack1, 50, 51, false)) - { - return null; } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Hand, itemstack)) + { - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Belt, itemstack)) - { + if (!this.mergeItemStack(itemstack1, 46, 47, false)) + { + return null; + } - if (!this.mergeItemStack(itemstack1, 51, 52, false)) - { - return null; } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Belt, itemstack)) + { - } - else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Unit, itemstack)) - { + if (!this.mergeItemStack(itemstack1, 47, 48, false)) + { + return null; + } - if (!this.mergeItemStack(itemstack1, 52, 60, false)) - { - return null; } + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Unit, itemstack)) + { - } - /*else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Other, itemstack)) - { + if (!this.mergeItemStack(itemstack1, 48, 56, false)) + { + return null; + } - if (!this.mergeItemStack(itemstack1, 56, 60, false)) - { - return null; } - - }*/ - else if (p_82846_2_ >= 4 && p_82846_2_ < 13) - { - if (!this.mergeItemStack(itemstack1, 13, 40, false)) + else if (itemstack.getItem() instanceof IEquipment && ((IEquipment) itemstack.getItem()).isItemValid(EquipmentType.Other, itemstack)) { - return null; - } - } - else if (p_82846_2_ >= 13 && p_82846_2_ < 40) - { - if (!this.mergeItemStack(itemstack1, 4, 13, false)) + + if (!this.mergeItemStack(itemstack1, 56, 60, false)) + { + return null; + } + + } else if (p_82846_2_ >= 4 && p_82846_2_ < 13) { - return null; + if (!this.mergeItemStack(itemstack1, 13, 40, false)) + { + return null; + } } - } - else if (p_82846_2_ >= 40 && p_82846_2_ < 60) - { - if (!this.mergeItemStack(itemstack1, 4, 13, false)) + else if (p_82846_2_ >= 13 && p_82846_2_ < 40 && !this.mergeItemStack(itemstack1, 4, 13, false)) { return null; } - } - else if (!this.mergeItemStack(itemstack1, 13, 40, false)) + + } else if (!this.mergeItemStack(itemstack1, 4, 40, false)) { return null; } diff --git a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java index 6f3ca46..819a196 100644 --- a/src/main/java/shift/sextiarysector/event/ClientEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/ClientEventHandler.java @@ -26,6 +26,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; @@ -34,8 +35,10 @@ import net.minecraft.util.MovingObjectPosition.MovingObjectType; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import net.minecraftforge.client.event.EntityViewRenderEvent.FogColors; import net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity; import net.minecraftforge.client.event.GuiOpenEvent; +import net.minecraftforge.client.event.RenderBlockOverlayEvent; import net.minecraftforge.client.event.RenderPlayerEvent.SetArmorModel; import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.common.util.ForgeDirection; @@ -252,6 +255,76 @@ public void onFogDensity(FogDensity event) { } } + //水の中2 + @SubscribeEvent + public void onRenderBlockOverlay(RenderBlockOverlayEvent event) { + + if (event.overlayType == RenderBlockOverlayEvent.OverlayType.WATER) { + + if (event.player instanceof EntityPlayer) { + + EntityPlayer player = event.player; + + EquipmentStats e = EntityPlayerManager.getEquipmentStats(player); + + if (e.inventory.getStackInSlot(EquipmentType.Face.getSlot(0)) != null) { + + if (e.inventory.getStackInSlot(EquipmentType.Face.getSlot(0)).getItem() == SSItems.waterContactLenses) { + event.setCanceled(true); + } + + } + } + + } + + } + + //水の中3 + @SubscribeEvent + public void onFogColors(FogColors event) { + + if (!(event.entity instanceof EntityPlayer)) return; + + if (event.block.getMaterial() != Material.water) return; + + EntityPlayer player = (EntityPlayer) event.entity; + + EquipmentStats e = EntityPlayerManager.getEquipmentStats(player); + + if (e.inventory.getStackInSlot(EquipmentType.Face.getSlot(0)) != null) { + + if (e.inventory.getStackInSlot(EquipmentType.Face.getSlot(0)).getItem() == SSItems.waterContactLenses) { + + if (!player.isPotionActive(Potion.nightVision)) + { + float f11; + float f6; + + f11 = 200;//event.renderer.getNightVisionBrightness(this.mc.thePlayer, (float) event.renderPartialTicks); + f6 = 1.0F / event.red; + + if (f6 > 1.0F / event.green) + { + f6 = 1.0F / event.green; + } + + if (f6 > 1.0F / event.blue) + { + f6 = 1.0F / event.blue; + } + + event.red = event.red * (1.0F - f11) + event.red * f6 * f11; + event.green = event.green * (1.0F - f11) + event.green * f6 * f11; + event.blue = event.blue * (1.0F - f11) + event.blue * f6 * f11; + } + + } + + } + + } + public static ModelDecoration decoration; private static final ResourceLocation RES_ITEM_GLINT = new ResourceLocation("textures/misc/enchanted_item_glint.png"); diff --git a/src/main/java/shift/sextiarysector/event/HUDEventHandler.java b/src/main/java/shift/sextiarysector/event/HUDEventHandler.java index 189a702..c15a228 100644 --- a/src/main/java/shift/sextiarysector/event/HUDEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/HUDEventHandler.java @@ -236,11 +236,13 @@ protected void renderStamina(int width, int height) //right_height += 10; boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic - int level = EntityPlayerManager.getPrevStaminaLevel(mc.thePlayer); + int level = EntityPlayerManager.instance.getStaminaLevel(mc.thePlayer);//getPrevStaminaLevel(mc.thePlayer); for (int i = 0; i < 10; ++i) { - int idx = i * 2 + 1; + //int idx = i * 2 + 1; + int idx = (i + 1) * 10; + int idx2 = level % 10; int x = left + i * 8 - 9; int y = top; int icon = 0; @@ -275,10 +277,10 @@ else if (idx == levelLast) drawTexturedModalRect(x, y, icon + 9, iconY, 9, 9); }*/ - if (idx < level) { + if (idx <= level) { drawTexturedModalRect(x, y, icon + 9, iconY, 9, 9); - } else if (idx == level) { - drawTexturedModalRect(x, y, icon + 18, iconY, 9, 9); + } else if (idx - level < 10 && idx2 != 0) { + drawTexturedModalRect(x, y, icon + 9 * (idx2 + 1), iconY, 9, 9); } } diff --git a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java index 2efdd7a..09c93e7 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java @@ -1,8 +1,10 @@ package shift.sextiarysector.event; import net.minecraft.block.Block; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.world.World; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; @@ -135,7 +137,7 @@ public void playeHarvestCheckEvent(PlayerEvent.HarvestCheck event) { } - //ダッシュユニット + //jumpユニット @SubscribeEvent public void onLivingJump(LivingJumpEvent event) { @@ -172,6 +174,180 @@ public void onLivingJump(LivingJumpEvent event) { } + //どこでも睡眠 + /* + @SubscribeEvent + public void onSleep(PlayerInteractEvent event) { + + if (event.action != Action.RIGHT_CLICK_BLOCK) return; + + System.out.println("aaa"); + if (!event.entityPlayer.isSneaking()) return; + + System.out.println("baaa"); + + if (event.entityPlayer.getCurrentEquippedItem() != null) return; + + System.out.println("caaa"); + + if (event.world.isRemote) return; + + EquipmentStats e = EntityPlayerManager.getEquipmentStats(event.entityPlayer); + + for (int i = 0; i < EquipmentType.Unit.getSlots().length; i++) { + + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlots()[i]); + + if (item == null) continue; + + if (item.getItem() == null) continue; + + if (item.getItem() == SSItems.bedMonsterUnit) { + System.out.println("daaa"); + event.entityPlayer.sleepInBedAt(event.x, event.y + 1, event.z); + return; + + } + + } + + //double y = event.world.getBlock(event.x, event.y, event.z).getBlockBoundsMaxY(); + + }*/ + + public boolean checkBed(World w, int x, int y, int z) { + + return false; + } + + //睡眠ユニット + /* + @SubscribeEvent + public void onSleep(PlayerSleepInBedEvent event) { + + EntityPlayer player = (EntityPlayer) event.entityLiving; + + NBTTagCompound nbt = player.getEntityData(); + NBTTagCompound ssnbt; + if (!nbt.hasKey("ss2")) { + + ssnbt = new NBTTagCompound(); + nbt.setTag("ss2", ssnbt); + + } else { + ssnbt = nbt.getCompoundTag("ss2"); + } + + if (ssnbt.hasKey("bed")) { + ssnbt.removeTag("bed"); + player.worldObj.isRemote = false; + return; + } + + EquipmentStats e = EntityPlayerManager.getEquipmentStats((EntityPlayer) event.entity); + + for (int i = 0; i < EquipmentType.Unit.getSlots().length; i++) { + + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Unit.getSlots()[i]); + + if (item == null) continue; + + if (item.getItem() == null) continue; + + if (item.getItem() == SSItems.bedMonsterUnit) { + + if (!player.worldObj.isRemote) + { + if (player.isPlayerSleeping() || !player.isEntityAlive()) + { + return; + } + + if (!player.worldObj.provider.isSurfaceWorld()) + { + return; + } + + if (player.worldObj.isDaytime()) + { + return; + } + + if (Math.abs(player.posX - event.x) > 3.0D || Math.abs(player.posY - event.y) > 2.0D || Math.abs(player.posZ - event.z) > 3.0D) + { + return; + } + + event.result = EntityPlayer.EnumStatus.OK; + + if (player.isRiding()) + { + player.mountEntity((Entity) null); + } + + player.sleepInBedAt(event.x, event.y, event.z); + + player.worldObj.updateAllPlayersSleepingFlag(); + + return; + + } else { + return; + } + + } + + } + + }*/ + + protected void setSize(EntityPlayer p, float p_70105_1_, float p_70105_2_) + { + float f2; + + if (p_70105_1_ != p.width || p_70105_2_ != p.height) + { + f2 = p.width; + p.width = p_70105_1_; + p.height = p_70105_2_; + p.boundingBox.maxX = p.boundingBox.minX + p.width; + p.boundingBox.maxZ = p.boundingBox.minZ + p.width; + p.boundingBox.maxY = p.boundingBox.minY + p.height; + + if (p.width > f2 && !p.worldObj.isRemote) + { + p.moveEntity(f2 - p.width, 0.0D, f2 - p.width); + } + } + + f2 = p_70105_1_ % 2.0F; + + if (f2 < 0.375D) + { + p.myEntitySize = Entity.EnumEntitySize.SIZE_1; + } + else if (f2 < 0.75D) + { + p.myEntitySize = Entity.EnumEntitySize.SIZE_2; + } + else if (f2 < 1.0D) + { + p.myEntitySize = Entity.EnumEntitySize.SIZE_3; + } + else if (f2 < 1.375D) + { + p.myEntitySize = Entity.EnumEntitySize.SIZE_4; + } + else if (f2 < 1.75D) + { + p.myEntitySize = Entity.EnumEntitySize.SIZE_5; + } + else + { + p.myEntitySize = Entity.EnumEntitySize.SIZE_6; + } + } + //リング @SubscribeEvent(priority = EventPriority.HIGH) public void onPlayerCloneEvent(net.minecraftforge.event.entity.player.PlayerEvent.Clone event) @@ -186,21 +362,21 @@ public void onPlayerCloneEvent(net.minecraftforge.event.entity.player.PlayerEven int mp = (int) (MCEconomyAPI.getPlayerMP(event.original) / 4.0f); int xp = (int) (event.original.experienceLevel / 4.0f); - for (int i = 0; i < EquipmentType.Ring.getSlots().length; i++) { + for (int i = 0; i < EquipmentType.Other.getSlots().length; i++) { - ItemStack item = e.inventory.getStackInSlot(EquipmentType.Ring.getSlots()[i]); + ItemStack item = e.inventory.getStackInSlot(EquipmentType.Other.getSlots()[i]); if (item != null && item.getItem() == SSItems.mpRing) { int reduce = MCEconomyAPI.reducePlayerMP(event.original, mp, false); MCEconomyAPI.addPlayerMP(event.entityPlayer, reduce, false); - e.inventory.setInventorySlotContents(EquipmentType.Ring.getSlots()[i], null); + e.inventory.setInventorySlotContents(EquipmentType.Other.getSlots()[i], null); } else if (item != null && item.getItem() == SSItems.xpRing) { event.entityPlayer.experienceLevel += xp; event.original.experienceLevel -= xp; - e.inventory.setInventorySlotContents(EquipmentType.Ring.getSlots()[i], null); + e.inventory.setInventorySlotContents(EquipmentType.Other.getSlots()[i], null); } diff --git a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java index e4a499c..036f8a7 100644 --- a/src/main/java/shift/sextiarysector/event/WorldEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/WorldEventHandler.java @@ -32,6 +32,8 @@ public class WorldEventHandler { private WorldGenMinable ironLarge; private WorldGenMinable goldLarge; + private WorldGenMinable silverLarge; + private WorldGenLakes springWater; private WorldGenLakes hotSprings; @@ -58,7 +60,7 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.yellowstoneGen = new WorldGenMinable(SSBlocks.yellowStoneOre, 7); copperOreGen = new WorldGenMinable(SSBlocks.copperOre, 10); - //zincOreGen = new WorldGenMinable(SSBlocks.zincOre, 8); + zincOreGen = new WorldGenMinable(SSBlocks.zincOre, 8); silverOreGen = new WorldGenMinable(SSBlocks.silverOre, 8); mithrilOreGen = new WorldGenMinable(SSBlocks.mithrilOre, 8); @@ -68,13 +70,15 @@ public void onOreGenEvent(OreGenEvent.Pre event) { ironLarge = new WorldGenMinable(SSBlocks.ironLargeOre, 8); goldLarge = new WorldGenMinable(SSBlocks.goldLargeOre, 8); + silverLarge = new WorldGenMinable(SSBlocks.silverLargeOre, 8); + this.lapisGen = new WorldGenMinable(Blocks.lapis_ore, 6); this.genStandardOre1(8, this.bluestoneGen, 0, 16); this.genStandardOre1(8, this.yellowstoneGen, 0, 16); if (Config.generationCopperOre) this.genStandardOre1(20, this.copperOreGen, 0, 64); - //if (Config.generationZincOre) this.genStandardOre1(12, this.zincOreGen, 0, 64); + if (Config.generationZincOre) this.genStandardOre1(12, this.zincOreGen, 0, 64); if (Config.generationSilverOre) this.genStandardOre1(2, this.silverOreGen, 0, 32); if (BiomeDictionary.isBiomeOfType(biome, Type.COLD)) { @@ -90,6 +94,8 @@ public void onOreGenEvent(OreGenEvent.Pre event) { this.genStandardOre1(10, this.coaLargeGen, 0, 128); this.genStandardOre1(10, this.ironLarge, 0, 64); this.genStandardOre1(1, this.goldLarge, 0, 32); + + this.genStandardOre1(1, this.silverLarge, 0, 32); //System.out.println("onOreGenEvent"); this.genStandardOre1(1, this.lapisGen, 16, 24); diff --git a/src/main/java/shift/sextiarysector/item/ItemRing.java b/src/main/java/shift/sextiarysector/item/ItemRing.java index 036b778..b1499bd 100644 --- a/src/main/java/shift/sextiarysector/item/ItemRing.java +++ b/src/main/java/shift/sextiarysector/item/ItemRing.java @@ -16,12 +16,12 @@ public ItemRing() { @Override public boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player) { - return equipment.ordinal() == EquipmentType.Ring.ordinal(); + return equipment.ordinal() == EquipmentType.Other.ordinal(); } @Override public boolean isItemValid(EquipmentType equipment, ItemStack stack) { - return equipment.ordinal() == EquipmentType.Ring.ordinal(); + return equipment.ordinal() == EquipmentType.Other.ordinal(); } @Override diff --git a/src/main/java/shift/sextiarysector/item/ItemShopRing.java b/src/main/java/shift/sextiarysector/item/ItemShopRing.java index 340a8b1..ce94ed6 100644 --- a/src/main/java/shift/sextiarysector/item/ItemShopRing.java +++ b/src/main/java/shift/sextiarysector/item/ItemShopRing.java @@ -105,12 +105,12 @@ public void onTabClicked(EquipmentType equipment, ItemStack stack, EntityPlayer @Override public boolean canTakeStack(EquipmentType equipment, ItemStack stack, EntityPlayer player) { - return equipment.equals(EquipmentType.Ring); + return equipment.equals(EquipmentType.Other); } @Override public boolean isItemValid(EquipmentType equipment, ItemStack stack) { - return equipment.equals(EquipmentType.Ring); + return equipment.equals(EquipmentType.Other); } @Override diff --git a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java index 011d145..0301e3e 100644 --- a/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java +++ b/src/main/java/shift/sextiarysector/player/EntityPlayerManager.java @@ -81,6 +81,16 @@ public void addStaminaExhaustion(EntityPlayer entityPlayer, float par1) } } + @Override + public int getMoistureLevel(EntityPlayer entityPlayer) { + return getMoistureStats(entityPlayer).getMoistureLevel(); + } + + @Override + public int getStaminaLevel(EntityPlayer entityPlayer) { + return getStaminaStats(entityPlayer).getStaminaLevel(); + } + //触らない //tick diff --git a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java index d540949..ed92603 100644 --- a/src/main/java/shift/sextiarysector/proxy/ClientProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/ClientProxy.java @@ -27,7 +27,9 @@ import shift.sextiarysector.renderer.block.RendererGearShaft; import shift.sextiarysector.renderer.block.RendererHole; import shift.sextiarysector.renderer.block.RendererLargeWindmill; +import shift.sextiarysector.renderer.block.RendererLeafBed; import shift.sextiarysector.renderer.block.RendererMonitor; +import shift.sextiarysector.renderer.block.RendererOreStone; import shift.sextiarysector.renderer.block.RendererPaddy; import shift.sextiarysector.renderer.block.RendererPipe; import shift.sextiarysector.renderer.block.RendererSaw; @@ -40,6 +42,7 @@ import shift.sextiarysector.renderer.block.RendererWindmill; import shift.sextiarysector.renderer.block.RendererWood; import shift.sextiarysector.renderer.block.RendererWoodHopper; +import shift.sextiarysector.renderer.block.RendererWoodenGutter; import shift.sextiarysector.renderer.entity.RenderMineboat; import shift.sextiarysector.renderer.entity.RenderMineboatTank; import shift.sextiarysector.renderer.item.RenderGF; @@ -89,9 +92,12 @@ public void setCustomRenderers() { this.woodHopperType = RenderingRegistry.getNextAvailableRenderId(); + this.leafBedType = RenderingRegistry.getNextAvailableRenderId(); + this.tankType = RenderingRegistry.getNextAvailableRenderId(); this.funnelType = RenderingRegistry.getNextAvailableRenderId(); this.pipeType = RenderingRegistry.getNextAvailableRenderId(); + this.woodenGutterType = RenderingRegistry.getNextAvailableRenderId(); this.ShaftRenderType = RenderingRegistry.getNextAvailableRenderId(); @@ -108,6 +114,8 @@ public void setCustomRenderers() { this.chestType = RenderingRegistry.getNextAvailableRenderId(); + this.oreStoneType = RenderingRegistry.getNextAvailableRenderId(); + this.monitorType = RenderingRegistry.getNextAvailableRenderId(); this.farmlandType = RenderingRegistry.getNextAvailableRenderId(); @@ -126,9 +134,12 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererWoodHopper()); + RenderingRegistry.registerBlockHandler(new RendererLeafBed()); + RenderingRegistry.registerBlockHandler(new RendererTank()); RenderingRegistry.registerBlockHandler(new RendererFunnel()); RenderingRegistry.registerBlockHandler(new RendererPipe()); + RenderingRegistry.registerBlockHandler(new RendererWoodenGutter()); RenderingRegistry.registerBlockHandler(new RendererShaft()); @@ -145,6 +156,8 @@ public void setCustomRenderers() { RenderingRegistry.registerBlockHandler(new RendererChest()); + RenderingRegistry.registerBlockHandler(new RendererOreStone()); + RenderingRegistry.registerBlockHandler(new RendererMonitor()); RenderingRegistry.registerBlockHandler(new RendererFarmland()); diff --git a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java index 6a43694..86fb7c8 100644 --- a/src/main/java/shift/sextiarysector/proxy/CommonProxy.java +++ b/src/main/java/shift/sextiarysector/proxy/CommonProxy.java @@ -6,6 +6,8 @@ public class CommonProxy { + public int leafBedType; + public int holeType; public int bottleType; @@ -18,6 +20,7 @@ public class CommonProxy { public int pipeType; public int tankType; public int funnelType; + public int woodenGutterType; public int ShaftRenderType; @@ -32,6 +35,8 @@ public class CommonProxy { public int fanType; public int sawType; + public int oreStoneType; + public int monitorType; public int chestType; diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index 9d1cd5e..ebf0876 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -36,6 +36,12 @@ public static void addRecipes(CraftingManager p_77608_1_) })); p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(SSItems.blueGel, 1), + new Object[] { + "dustYellowstone", + "slimeball" + })); + + p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(SSItems.yellowGel, 1), new Object[] { "dustBluestone", "slimeball" diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index 7c633c9..a955916 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -84,6 +84,12 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) "slimeball" })); + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.yellowGel, 2), + new Object[] { + "dustYellowstone", + "slimeball" + })); + p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.steelIngot, 1), new Object[] { "dustCoal", @@ -134,11 +140,11 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) })); //Hammer - p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.hammer, 1), - new Object[] { "xxx", " y ", " y ", - Character.valueOf('x'), "ingotIron", - Character.valueOf('y'), "stickWood", - })); + //p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.ironSpanner, 1), + // new Object[] { "xxx", " y ", " y ", + // Character.valueOf('x'), "ingotIron", + // Character.valueOf('y'), "stickWood", + // })); //鉄のリング p_77608_1_.addRecipe(new ShapedOreRecipe(new ItemStack(SSItems.ironRing, 1), diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java index 9e7e5cc..cf106c8 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesTool.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesTool.java @@ -43,10 +43,15 @@ public static void addRecipes(CraftingManager p_77608_1_) } p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.brassShears), - new Object[] { "x ", " x", + new Object[] { " x", "x ", Character.valueOf('x'), "ingotBrass" })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.ironSpanner), + new Object[] { " x ", " xx", "x ", + Character.valueOf('x'), "nuggetIron" + })); + //バニラツール //銅 addShovel(p_77608_1_, "ingotCopper", new ItemStack(SSItems.copperShovel)); diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererLeafBed.java b/src/main/java/shift/sextiarysector/renderer/block/RendererLeafBed.java new file mode 100644 index 0000000..dbeb5a7 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererLeafBed.java @@ -0,0 +1,100 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.init.Blocks; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.SextiarySector; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererLeafBed implements ISimpleBlockRenderingHandler { + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + + if (this.getRenderId() != modelId) return false; + + float f = 0.125F; + + float minx = 0; + float minz = 0; + float maxx = 1; + float maxz = 1; + + renderer.setOverrideBlockTexture(Blocks.planks.getIcon(0, 0)); + + //右 + if (!this.isSame(world, x, y, z, block, ForgeDirection.getOrientation(5))) { + maxx = 1 - f; + renderer.setRenderBounds(14.0D / 16.0D, 0.0D, 0.0D, 1.0D, 2.0D / 16.0D, 1.0D); + renderer.renderStandardBlock(block, x, y, z); + } + + //左 + if (!this.isSame(world, x, y, z, block, ForgeDirection.getOrientation(4))) { + minx = f; + renderer.setRenderBounds(0.0D, 0.0D, 0.0D, 2.0D / 16.0D, 2.0D / 16.0D, 1.0D); + renderer.renderStandardBlock(block, x, y, z); + } + + renderer.clearOverrideBlockTexture(); + + renderer.setOverrideBlockTexture(Blocks.planks.getIcon(0, 1)); + + //上 + if (!this.isSame(world, x, y, z, block, ForgeDirection.getOrientation(2))) { + minz = f; + renderer.setRenderBounds(0.0D, 2.0D / 16.0D, 0.0D, 1.0D, 4.0D / 16.0D, 2.0D / 16.0D); + renderer.renderStandardBlock(block, x, y, z); + } + + //下 + if (!this.isSame(world, x, y, z, block, ForgeDirection.getOrientation(3))) { + maxz = 1 - f; + renderer.setRenderBounds(0.0D, 2.0D / 16.0D, 14.0D / 16.0D, 1.0D, 4.0D / 16.0D, 1.0D); + renderer.renderStandardBlock(block, x, y, z); + } + + //葉っぱ + renderer.setOverrideBlockTexture(SSBlocks.leafBed.getIcon(0, 0)); + renderer.setRenderBounds(minx, 0.0D, minz, maxx, 1.0D / 16.0D, maxz); + renderer.renderStandardBlock(block, x, y, z); + + renderer.setOverrideBlockTexture(SSBlocks.leafBed.getIcon(0, 1)); + renderer.setRenderBounds(minx, 1.0D / 16.0D, minz, maxx, 2.0D / 16.0D, maxz); + renderer.renderStandardBlock(block, x, y, z); + + renderer.setOverrideBlockTexture(SSBlocks.leafBed.getIcon(0, 2)); + renderer.setRenderBounds(minx, 2.0D / 16.0D, minz, maxx, 3.0D / 16.0D, maxz); + renderer.renderStandardBlock(block, x, y, z); + + renderer.clearOverrideBlockTexture(); + + return true; + } + + protected boolean isSame(IBlockAccess p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_, Block b, ForgeDirection d) { + + if (p_149743_1_.getBlock(p_149743_2_ + d.offsetX, p_149743_3_ + d.offsetY, p_149743_4_ + d.offsetZ) == b) return true; + + return false; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return false; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.leafBedType; + } + +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererOreStone.java b/src/main/java/shift/sextiarysector/renderer/block/RendererOreStone.java new file mode 100644 index 0000000..e6c2641 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererOreStone.java @@ -0,0 +1,118 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.init.Blocks; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import shift.sextiarysector.SextiarySector; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererOreStone implements ISimpleBlockRenderingHandler { + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { + + GL11.glPushMatrix(); + + Tessellator tessellator = Tessellator.instance; + renderer.setOverrideBlockTexture(Blocks.stone.getIcon(0, 0)); + renderer.setRenderBounds(0.0001D, 0.0001D, 0.0001D, 0.9999D, 0.9999D, 0.9999D); + + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata)); + tessellator.draw(); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + + GL11.glPopMatrix(); + + GL11.glPushMatrix(); + + renderer.clearOverrideBlockTexture(); + renderer.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); + + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, -1.0F, 0.0F); + renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata)); + tessellator.draw(); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + + GL11.glPopMatrix(); + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + + if (this.getRenderId() != modelId) return false; + + renderer.setOverrideBlockTexture(Blocks.stone.getIcon(0, 0)); + //renderer.setRenderBounds(0.0001D, 0.0001D, 0.0001D, 0.9999D, 0.9999D, 0.9999D); + renderer.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); + renderer.renderStandardBlock(block, x, y, z); + + renderer.clearOverrideBlockTexture(); + + //renderer.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); + renderer.setRenderBounds(-0.0001D, -0.0001D, -0.0001D, 1.0001D, 1.0001D, 1.0001D); + renderer.renderStandardBlock(block, x, y, z); + + return true; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.oreStoneType; + } +} diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererWoodenGutter.java b/src/main/java/shift/sextiarysector/renderer/block/RendererWoodenGutter.java new file mode 100644 index 0000000..441a913 --- /dev/null +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererWoodenGutter.java @@ -0,0 +1,31 @@ +package shift.sextiarysector.renderer.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.world.IBlockAccess; +import shift.sextiarysector.SextiarySector; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RendererWoodenGutter implements ISimpleBlockRenderingHandler { + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { + + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + return false; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return false; + } + + @Override + public int getRenderId() { + return SextiarySector.proxy.woodenGutterType; + } + +} diff --git a/src/main/java/shift/sextiarysector/tileentity/TileEntityWoodenGutter.java b/src/main/java/shift/sextiarysector/tileentity/TileEntityWoodenGutter.java new file mode 100644 index 0000000..66e7387 --- /dev/null +++ b/src/main/java/shift/sextiarysector/tileentity/TileEntityWoodenGutter.java @@ -0,0 +1,5 @@ +package shift.sextiarysector.tileentity; + +public class TileEntityWoodenGutter extends TileEntityDirection { + +} diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 9b2e559..083266a 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -185,6 +185,7 @@ item.ss.ninja_gf_storage.name=Ninja GF Storage item.ss.orichalcum_gf_storage.name=Orichalcum GF Storage item.ss.hammer.name=Hammer +item.ss.iron_spanner.name=Iron Spanner item.ss.color_spray.name=Color Spray item.ss.calendar.name=Calendar @@ -403,6 +404,7 @@ item.ss.defense_unit.name=Defense Unit item.ss.attack_rust_unit.name=Attack Rust Unit item.ss.defense_rust_unit.name=Defense Rust Unit item.ss.jump_unit.name=Jump Unit +item.ss.bed_monster_unit.name=Bed Monster Unit item.ss.pickaxe_unit.name=Pickaxe Unit item.ss.debug_unit.name=Debug Unit @@ -764,6 +766,12 @@ achievement.ss.shipping=Shipping Block achievement.ss.shipping.desc=Trying to shipment achievement.ss.shipping.desc2=I'm millionaire ! +#Dep +dep.ss.error1= was unable to download required library +dep.ss.error2= . +dep.ss.error3=Check your internet connection and try restarting or download it manually from +dep.ss.error4= and put it in your mods folder + #NEI nei.recipe=Recipes nei.ss.furnace.shaped=Furnace Shaped diff --git a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang index 87ce4e0..94f9423 100644 --- a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang +++ b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang @@ -346,6 +346,7 @@ item.ss.defense_unit.name=ユニット 「ボウギョプラス」 item.ss.attack_rust_unit.name=錆びたユニット 「ダ・・ジプ・ス」 item.ss.defense_rust_unit.name=錆びたユニット 「ボウ・・・ラ・」 item.ss.jump_unit.name=ユニット 「スーパージャンプ」 +item.ss.bed_monster_unit.name=ユニット 「しずかなココロ」 item.ss.pickaxe_unit.name=ユニット 「ツルハシパワー」 @@ -685,6 +686,15 @@ achievement.ss.shipping=出荷箱 achievement.ss.shipping.desc=出荷してみよう achievement.ss.shipping.desc=私は億万長者 ! + + +#Dep +dep.ss.error1=は必要なライブラリ +dep.ss.error2=をダウンロードすることができませんでした。 +dep.ss.error2=インターネットの接続を確認して再起動するか、手動で +dep.ss.error3=からダウンロードしてmodsのフォルダに入れてください。 + + #NEI nei.recipe=レシピ nei.ss.furnace.shaped=定形 精錬 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/bluestone_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/bluestone_ore.png deleted file mode 100644 index a819513ed7b24e2407e994b6660cda4329a4312b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 534 zcmV+x0_pvUP)~zxRFL6xP~(jFDl92udjcoO2js2qAE6 zZgRMASY=rPpp-%>g>w$AH2^Wj9-wX8jNV*#)UV47P*oM)dqf0)Pn$Pzxx&8HhzNzX zcCVBogpilownb~rVm*bg7ufTs_vk0)834e0&qGyJ)xDl`j!BG>7$YK*X)e}NxV@pC z?GO>#w&mlu=eY;absbu3CJ8x&z~b`+b{p8NdOfbT*mLPcyIjHDmZ~}(F(|CH`_wpg zXZl-mV|YK%yRcYK;rojD3oyovR8QwD-#s}BUK|Tjs^-fh`28b)*JmdqQ9}shAbIa; zt~-|RO}{YnblqdhvK+Y(Lddok^Z9(Al9hBw^iu+}$bWOO{BSxJ@u3s)8P8tA?G0>x z_0792_1Ve4w~*r6{Ct&@m)O*^9nIB6)*!J<%>HZR;ll7$ib$WtL(h#dd3Y$?a5e$| Y0cFzJ))gyw4FCWD07*qoM6N<$f?EIV^Z)<= diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/leaf_bed_0.png b/src/main/resources/assets/sextiarysector/textures/blocks/leaf_bed_0.png new file mode 100644 index 0000000000000000000000000000000000000000..a4f1a034aea58288812605dff4f834be54a61c83 GIT binary patch literal 1021 zcmVQxO#Kk*nNVYGS&?VzWrR z3MA%ZlbX%idY4)zQTUv5HTqK}+2|@+kO*<^x#ymH?z!jQUw`%a$od1dx@zJY`DyeA zO(YWBxNwuUtp`LzP*vK_?$aHM8$?8~EDI5#@z^fi^GZa{44qV;9ZOPPUQReKOeUS7 zv!hGuTVK=C(o!Z(n#5q=5SyD{)d>?OaDKE)&yD=3p6gLoR>m(Ud+^mS*df_$mRq-O z5vgvIXV%Zt+0`>>_-4DNQYp$7JkG3|=~TVGLcOfV(9jTPKkSm$^Lw?Taw@)fJdWcy zG*v~!wr#$C|D{t>2H<`vT47{v|Wm*J6p%9VoCRJ5hS05Br z#r0hN=!sIerI2_mjuTJOdAv&iwtciki;9XEyEjJ4cJToe`-B~lEI4U+M) zjNTjNf9Ag?#<0Pej!pqswC*_?Pw&)JB84y7ALYiSo7lF^@0a^XJ09O2Iwih)**+WFC+hp;^g<7$48oqx9?qb_EL4T0pkzs7xCeq!c?H5}#oldiT zPJ`HnjcJ+~BL+F+f*6KDHlui+hc7ojhmw*KuAcrCFO{LBqy*P<8HoN#QBe`$aG3s{ zDB*AzfZoe}bo_QiXVpxn>XBOU-MRKRmSu73(09_`6Xn^L=j+J8C%X66}n~4ZI0XBv*(_B?w;q@3+em*^X4o2 zPA$}B;a<6GZqxa!&(OI%dyuU*DixRt$)UU|AL-!jV&(wCnADxf5zrBRlJ} zeED+1QG;SZ>HYkk95}X4>+0&LudgSaa@qUkT1_MpOgxd)@o2lc1*M^(f%C^LWN2uJ zL?XdgKQ-w4Yi>$g_afcg8OF-^ytDLo=^I|6m8QYZr{`JMYVzQ2iS4UWa_;X&^-5sm zaycBwA^GxEv2B~L_ou`w!SsC(*LA6i7-VOCva>$EDtX%{lgZ$fU~b082#3R*8Ew)Z zZoQ-n7AznZi%~2nBZCgr)zxICJ*m-2+?Sinfo4dk30+jGioq-&m*7D zvt`%QIyK=@X&U77c?SD!%%}lCM^CNpe(k30-21$4UzL)Q3$kWwm9A{5ptb3W?EGZ0 zmWPBRAO9w2Z?Dv{knm>hH38UjxIy>t8Ww=gPa8E3>V~9=sy}?|xWK-|!N(EgxfS#O3nEJhp9f`A3^VUO9H)PYIR@$>wX) z(Nn9*=3xm0gj_C1M^CNhGCuQj%8rdEC3x%C0%yOS6cOS3Ba@=4tZ#oxtEz<^uT-t3V)eTUK#EEA?C zJPx1SsB-XPTo;#}5CByLU^v&R%gjFc;=9edVY^8n2xpGw_-NaJIF7@WnRXo+bXebE Z@*m{Lw(CZI#kl|g002ovPDHLkV1gm@;>Q30 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/leaf_bed_2.png b/src/main/resources/assets/sextiarysector/textures/blocks/leaf_bed_2.png new file mode 100644 index 0000000000000000000000000000000000000000..79c85430f9562e85cb614e87dce9d0614f2f3506 GIT binary patch literal 989 zcmV<310wv1P)CNuTWEIS) z5}zYoD`8Kh8lJ`w9Y4F96VoeH=T~@V-HT)u%+R$G6h(n&@82AJsfn$E8K%=Shxl~l zI^BO5=h# zCT7N+bd;@v8IQVpX-$c;EUEBz*kKjS7#~g$0Gv915;|^haw>u?U+JbrK)=nbf7dG|0JVL2f?d&&d6eX)x@jUmb? zQ{2`k!sYHKU%-jTTSEWX53-gS@Q)P=n)ODf($ zH#@~<`t$Y=JU5X=m1`SJyL<;JpU>myM@@Y2jn~SMu6+600000 LNkvXXu0mjfBe&Bg literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/bluestone_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/bluestone_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..f06ee8c733a698a89fa2384122bed78338d2aac1 GIT binary patch literal 562 zcmV-20?qx2P) zS6CdD3O3HdL8=AU#zA%hAqQ&_-;%63eBD0gefz!d`<`;n5o2V(wAL77a)7F;e3oT- z2*DqFHyREMD@hUnj4`<}hN`N(wHAOF;|`!{8e)tdpuB0j;&q|~AWhS}u4}Kg2H@lR zO~=&|_tq+{HOe`MF(wZoco}M%25T+z)uiLgCGPyG8qyc$Jpe#m*PaI|P1Ao?tg6b7 zVvNKXz1A9`IbTgW?rtfjTcx$8X&OF!eg0i~0Bzf1tz{(0Ap}4FH0s!{VZ8*Pyxw%~ zTq|oWTrJ^#Lz_Bx{XYuaI_!zi4 z79^?i^P`U6Kl<VSLchkdmvDCr>tDO({f6S~MD@2IaV>wo>XRpIis@FB*O#4W zAnb(Me{CEN>|dqUn$d8mZCkP|>mN&hc+LX+2XNB%-y3M^OaK4?07*qoM6N<$f_eM- Av;Y7A literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/coal_large_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/coal_large_ore.png index e30926ff9fbbc0bf650205b6baf4af9ab6d6d79e..e0f8eae88d845f0fc6e1379a434ae7af3636ddaa 100644 GIT binary patch delta 281 zcmV+!0p|X)1iAu{Dt`a~0002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2(`1}F=g82hsT0075HL_t(I%dJwo3dArBQ|i(`DtPpi@9tRW$8;)~K=4gD^16`Y zE>jGWZAo@!hF{*27tCzTJnSeU1!l>~J@CHo!-i}6oagCgR)0Q@qrkaY54`slLI40f z&jSFsuFI`GAOM6AnrSt;*dQmWDgYqH_y#hw#TX0nR}zLMiioLdW2A`KwrwBfbW=!i zrux2b06>Z}U%!!%-@_T0062AB0@@|*+4|Bo{+~!M2)m%bf(D* fBI=U=atALJvJ#nsDYa3A00000NkvXXu0mjf%mj1k delta 531 zcmV+u0_^>|0y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2i^)44G}qYFE`x)00F;AL_t(I%Waaes`5Y(g+Fh^W>Ta}u@A7dprw#9kj7HT3-|!` zc^bj;R$>_l*lZz|d4LqD+`@$r2>yj+|0s8=9d^!{v*+xrD1VBVbB<|=2vHOPP}enD zYpk{WHTN?flu}exMO9TE3=oDP08td7l)@N8RaJ-x&N=1)ZQF9WTs)|08UTzjIOj-` z1QFr8MC47NwI+^Zf6=z>M?Y=@Sg+RrIOqNoj1tGqVHo0^`xw68@AQ4|dw|ty#oRgP z*+hiv^$I}W_kXO{Yea;$ZM~W)IF4iHN+|%&=d%ZPT?ar}mSkB*9LL;lH-=#VAkTB3 z(5xtm*EjojJ)cjX#?%+!?Lk?VbX~`CxkPJC(=><(Wm&RVEa>~5?RNVoxi@jM*#K}l zoj&@<;{m|&cmyCx5&)D^SZm(|Ns0qSY2GnT+ zf`BwlKa~B9ZxRvz^QKbMG$jZEf*@eG+xfeuX|UEZI~)$L@65H<-mGa&pEmmR4`XKQ V$?lja{tN&B002ovPDHLkV1gFe^8x?> diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/copper_block_top.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/copper_block_top.png new file mode 100644 index 0000000000000000000000000000000000000000..b36f76ac658760ef80b17a5cec87c375f0937ffb GIT binary patch literal 498 zcmV!;R=beWx)Xm zc3QS^x>#6lCuCqGcv7q7uIiG%uc~Fc-4a4TMDX6@y~jC+i16*>YXx}m;fsg}RaGG( z42TFW&vQ1L4FJX%thI;;s>=7QPh79pJjLN~z_o2lj1hnsBVE^}gf8+dt}ILHx=uwd z`O)-y+qM8SO@peY+^VW@MNzO=EQm3tUpK~}s?6^C0$G+_?E^(o-~d7h{44HsI^7gd zRlN6vpQD7PX|CcTLRpr`!&|iOzz8@qE;DwEsQq`0D`Z-uxCQaKmY&$07*qoM6N<$f-@Z0k^lez literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/copper_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/copper_ore.png index 17219f92ab56f18dba32d1d49b67f39d0abe6a81..650da44f9583cfe7e69f8c391edb643e17d5e16e 100644 GIT binary patch delta 251 zcmbQuGM8zBRy_j<{B+(8VsI9CL>4nJa0`PlBg3pY5H=O_WK+>Z0g$T?~ZQ) z3a#>VaSX9Io&4wje|u)thR#N(hQtHw{nGdN{jxQGY2P*L|NsAwkL-V@^6&qoBmd;* zOS#QzIryGc@_+q#-(UV7Jck)(Ec&mXZ~UkJbIF8<*+%R!hyPFCE?FlV-Igd>x~D;K zlZ(Y%4e>woW`B{tdGk(jy+M+OQ~$L2vVIkdd1Z|!ERu-cr6AF<|GC=V^n|qJgde}V zAO4@+F0e7$UGScw+S6Lkq~kM{B-w4unHZi-7Lh-D_x3ZOvl%>H{an^LB{Ts5#yx5G delta 507 zcmVy{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2l50R_dY#r+#LYphba>optYuP zmpt8GVUE78G04iYY~sZ>o$+fijjn#6O<`2r)6DPq;tsIZuDKprUHrCN!Lw~eigR}O zi{bd*NarwHK+SGe1H29fZ+@lJD)B7dGbI+pg6{? xnEf}#D5onW?ukg-#LdjDwP~4-aoybr{15Zy=SQiUbkzU=002ovPDHLkV1ktY@2da+ diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/diamond_large_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/diamond_large_ore.png index 7660da5ca86a6c097e887cd0e252596b5d5d289b..87a817bd4d0bc7cad3c0c7b1b43c2a10a1aa795d 100644 GIT binary patch delta 303 zcmV+~0nq;W1keJIDt`a~0002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2(`4J0CYO2aY$007-dL_t(I%e_;}5rQxfeL=$vwl1JqyxG++aC zp{EqVfq1|pGD8N}gF_4-!BNJ&?Itg~``!!i?}&sVGhdoXkbf8Cr8Y9Z!g0M~UGPcX zpJ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rGL=rbSyA|bFi5e80a>saL&Ow|7ZUdK^S3MUSnHkc)0v!0ia&5V_RNh zJ?xxp!AMS1c zA#N{(@Yy<@5B9e4V$-x~8DsEGe6Ivo2Jjij2=C@s#Qz1(Ilg}RZ9U(ES&!o>dARKP z8L74!sJ0s51>aN9S|bRfT|_H`nVbJ`4Hj+Urd2Q8uiTL$-EQ}Uxe(%{S;uqY`t=uI XVf!tkJr1Pt00000NkvXXu0mjf&Q$+C delta 517 zcmV+g0{Z>i1k41GQGebF6b%(61wyWt0005mNklHBV6o)^$xIxS+#2D0V z&Nr9}a*XPp@y3N5r~E}mkG_q|sL!*FYiVc&!hNGSoB&*ylaht`@?amB+2hksTol>m@ZBBkV}@E`=@gp z*JnMB5kla&KC3~CZhM9?h9DTRS@dmofI=9C+f06vBz$B_sUzQfKBs7mIg;Da%pMoBLsF7qNvJd(Pur5d5*71lEel?Q3MR>_1;c?UN|*KnLR#! zVKr#k``zU7T~oEzc?nWVk|eS0d%ZW3B(d`MDQK zE~3`QOw2o6ooU@Jo1SJ{xg%9*Hk;c+=AP#rHS2IrvVQ#op!Dx16xme@00000NkvXX Hu0mjfiJSPE diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/gold_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/gold_ore.png index b1a7a55b1c6937517066f0f6d6052d29b133e569..15763e6bbcbdd6d9b7958fe87f5d49badc9c63dc 100644 GIT binary patch delta 520 zcmV+j0{8ug0-*$uB!32COGiWi{{a60|De66lK=n!32;bRa{vGf6951U69E94oEQKA z00(qQO+^Ra2n-D)IlOM182|tQu1Q2eR5;6plRs-4F&M^w0&nu5O~X;>c62XZGL%4< zlyvh)$lyW;FA2p2PLNOsvZNI3rAxm-rgkhHvU>~a8@0#eFM(-;%s2j}O%gp`uHt{IQVxd*UbuhCl5OUT~) zJh)k%0&sn_jMK$XXsy|-PI>;lq$tjI7>KH>a^sNB^jb=ztsiJoFlG=ps~I0BFGN|E zJFX{IcXxlpA#ibMky72>9>=Hqi+sL(IN6EUd%u;Slz+lG$Iaw1e*OMdq*N09b_(st z#b`9jo0WV>^b_#b0&6_K-Wh1oy1%FzG-002ov KPDHLkU;%=OSN7Kc delta 235 zcmVMk!_f?&=I5ZHR$FePbYd@ZTJOB&WWgcZb3uY#QU3HGCV< znczSczaF=gzFR@*?jl0~4LUKl9yj=qW<8Jj9g z&%Np=tDVhug-jP1QPky-cn9hV=_{(PZF*T`qi-+r;e`B(c;!EuGIy3k(w(C#szGG- l*T!rWcgmUPnOG5kxeqK0mtF5+vUUIf002ovPDHLkV1k>dZNdNm diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/iron_block_top.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/iron_block_top.png new file mode 100644 index 0000000000000000000000000000000000000000..ae17cc9698926d1fd05bb1fcd9f31e8c9a71d00b GIT binary patch literal 516 zcmV+f0{i`mP)9N?S-5kYGWtu>e#M1&B6Ow)v-D2Rw)tpyR`B_aZsWr_WM4*lMZrv~7zyozG`*2mvuh06>fp(=?@p5CZ-sHpakvpG@9mj6nz?84be#5lOq&T5wfW zSg+TJF{ZC)Sq2fo{eDLX0ePMSKzd)QstODM&N=+AxbOQf0}+AN8hzixdyfzThGF=a z6A_FtV6C-WE|*!1T5AvyZnvAvVJwOQOhhT0h@{d)1dGK2<2XVo1rY%=!+ZaE2i|+y z?RKeIW`5@^(=?%NTY5!!KA)-3)9D1R>l&NQCVfprl0jY9csw2`%MxW-e%-}twfY^w zT07hD3+qn@B_iOi>t-=(tf}9pj1fvHIOo7k(_p*ZBE|?2fl?|hHcbO-E%H47 zI-*2DM1G7QA|IX1&FOeNVjRb>0{>tX=Ny*HCB0^UWBdgUeglk~%xM1r0000)C%H|3lCEAGEiE-aM3C3RXdCSaV2(-QWg7CYXsmDAU7s zwn5u>+Ij5z&inot)oeB~#xPqVg75nP#Bod%MQE-6`JeZ6;D2eA%Vhw3-^cfTYWCJ% zj9)4MV@wW^Wf^;0>lWZTz5?K+Gf@BsJDc{?*Y8S109dP6sSJkpTi+@X;RQexMI4>} zRMSyLb!mY+bB~Cy-&nC{KhD^1tXN}AL7}>|P<*RqvstX4rYZlcFbtpd;yA{0$RdJ> z6jY|8jKkKA5`Piu^S|u-jj-qeOePb8Ai#6TA2-5cFc}O1XuO%T7h_aKN?gZR+?jh0 zb~Y`*m-AG`ag3+62H@yatEV>QW%ztPQO=EuTv-6EZN34(Zhg@vgCTcjj-FapX`13x z-`iTZ(^1B8??C}vPEon7IlKpO*t${Mt7Th}67Lw>6n~U4rf>nE2Da6IRI{RLt#cbi zgv;r?a^8nwNEn8NV6Fb6>ZxVr`XYj({vyjVa!wi%;iNNBTI=HM2DR3FsCl+#Z|!b< z(fYnmmSuQB5IoEH?0L7oXkWb!n2tP>!H|lSXm=CR{v$yU{0&l?rtCLXY`dGV_O^=C z#@XorD@;-<(sQGebF6b%z8TCPPq0006#NklAO3Tm2(KjFR^h5>+SnwX}^ z%;189_G19TFpLT`8Vyz#=Kwf%j{w*{2>@7MUf{#$Z-@v0`NAaG%O+pz14M*J0FL9Z zwey{BtHES$j81rkh_F_iW_NFwwc<2k80rxwb7Oj+D3{BFxP9OE`JdUg{UGMLE~&V( zh#(?*ly0lRW`CuIh)@{q@n+uEF@PWluq=yIT>1UHtrNY=CIH3fNef#*T zR)a5R*8m)Lxy2f-DS*vNjip(GtYmme8~>JZOaWj9sDIS^e~GG;iZF@@huu-l-nMOQ z+tz|r>V3`<6FM#;#G@zk`TT}q81#BQ(&;qSi;$a}8}0Wp3xn%coyGhF zUN23pRwHFu)&ueG`YVNTo;&;D`Fjuiw`Ur-v9$4^hfL!|SCZ5tULb%^FlsJpihwo)%0* zIB26ko2uX9J_(}V7`MB9f_`C+<6zrpq2f#KjuvD716s-!74#rF82|tP07*qoM6N<$ Ef=g^F00000 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/mithril_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/mithril_ore.png index 0de4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FcU01FcV0GgZ_00007bV*G` z2j2r52n{>svS`Hs00HJnL_t(I%Wab}ZxcZfg+DuIjMxLMrHECu7(sRJ`3V$}Qqj=l z2hb7OkzJo%f~~}&r=>|l71HoOyj_quqLU(dC2k`{Rxrigu759v*X{0`H#2W`8fluY zopaP7gg{COfH8(7NwC)PKVGyQ;E`n+0C5}xAf-e~i7^JH6adb-QXtRspk5S32m;Vr zlVuq~2mq8)NGY+_ZYuC4PP$`WK7he~8T|e!jK^by5IEgeFg4v zL{_z`lp@kvm&~sx&^ut+zJte#0o5M>2^M5nK-nd^&tu5V}EM$^wc%QE6P4)gb!e1HFg_B(bC`}F($z_Her0z!y; zS+v$@t%Jyqq#Nd7cv~ zr9!6J-W1M&hcK+}q?9aIH&EQb^))Qc$$D2|I*l|<*M1KM-~YgyV@`k1|5={dVvk|( zDwykI8Z&8{u03gc+q^&ZfV!{{qWp<<6h%RjB!TR)U6B|53(WNI8@~0#v;Y7A07*qo IM6N<$g7O^;_y7O^ diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_block_top.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_block_top.png new file mode 100644 index 0000000000000000000000000000000000000000..9d2cab454a1b484a2c98937230379240b47ea521 GIT binary patch literal 516 zcmV+f0{i`mP)9N?S-5kYGWtu>e#M1&B6Ow)v-D2Rw)tpyR`B_aZsWr_WM4*lMZrv~7zyozG`*2mvuh06>fp(=?@p5CZ-sHpakvpG@9mj6nz?84be#5lOq&T5wfW zSg+TJF{ZC)Sq2fo{eDLX0ePMSKzd)QstODM&N=+AxbOQf0}+AN8hzixdyfzThGF=a z6A_FtV6C-WE|*!1T5AvyZnvAvVJwOQOhhT0h@{d)1dGK2<2XVo1rY%=!+ZaE2i|+y z?RKeIW`5@^(=?%NTY5!!KA)-3)9D1R>l&NQCVfprl0jY9csw2`%MxW-e%-}twfY^w zT07hD3+qn@B_iOi>t-=(tf}9pj1fvHIOo7k(_p*ZBE|?2fl?|hHcbO-E%H47 zI-*2DM1G7QA|IX1&FOeNVjRb>0{>tX=Ny*HCB0^UWBdgUeglk~%xM1r0000 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_large_ore.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/silver_large_ore.png index 37f9f9f618801f37afed33fad91de1a57b282c56..f894a027a85281fca7a809f39fabf09975193841 100644 GIT binary patch delta 536 zcmV+z0_XkI1m6UZQhx{x4I>2P2G9rq00HbtL_t(I%XO2XZtE}5`euYIq}1N;3x0DOLairBPXuWJCM6n{!7`o7P!)-{0l{xM(} zhRl0k1B~OyX0r*G%S8YrNrJT&DJ9035PQDAzlD?%Q4|GADV%dN+As{6*19&vgr;d| z+g3c|M{-dV1$mx_^Z6{SwfwJ=B>88r@B2&~4u^RffH5YlRx74y;&?m?DJ8=&WM5xj zKhrb;a6BHx{eOPXwAQt#stN$-9H-MMOw+_TjsSFBN87d{&+`!1v98yv==(ksMN!O~ zzv%?H-|ty;W2ql_xL}M4<2ds1@$n~3(>mTdFjGC-8|x)%s;Ww?*XufF!F!J}Cfsf} z#&M)+8aA6vu-0O&WxL%5=Nz*Hr4-xkHUON@X8~ZXoqzF{E-Wn zK+`l_uU8Rme9>Ch-h1L#mStG3_xpWVtyaVYzP-K8Qnc3foJ4CaWm(Qq?YfQ_=lA#b z0C2fnM5K$4?KNtWQqnZdj2;h5DQVkQD5Xe}1m_%io`J?A8n a`~|ucDG`6w{DI5>00001Q$3JXT#h800H4iL_t(I%XO2ns`4-xh9A%W>yjebGPv8- zOVFF}5{lsJWQGcYtCI*`f|pLaEn;FbTFV4>_14N|M8p;IwXAg^1ON9HsUz0 zt+l+D5CSPB09lq1h9PBH@>Ad6_XFec7=YDk<(q;a06A!q1)|ZjKLVga5$ta z%a;TxCBxwmfbDh*fHB77zq{~md1Evh)h=1?W{2+vJAW#GBuO|PkKV>Fr4-g$|1B1a z|JLL2m}ax-6WHtZycDI>D~ZM!7K?>%JRA-_&V#`Kfc<{&>Dbiyy0?xVAbr=RMr8HGlg{EoHbsbyE{~!PWBEr9_ zD2k6eYpq^+@8P`%=Nz1K0KnyP3G+PTd_FVIIfh}-$K&xQ-T}ZgO-D!%$`H|q zoyX(BzLB$Uixlg2yM?A{(z$J0mJiiAhh#wr0V2ZbbPCVslf_h`{5*v`a&|Zz(q_du zMEQ|8g5qAh-*1*;lv0|dh5TGqRamdrnCBVeIAXiq0!Bb++m=ZwOwY- zmLbj{s*B408{-m?ze>(IR!h({O;=SchqS2h!H?y0Ck00000NkvXXu0mjf DfwI

1mSKzmz<)W%AAq7L5D`R#$z;;J zMFijX5fQAlSZmpCw@jzgrh`r#$KP6OthG(mq9`!N5JeG5l8~n9Tl;SS03yQw%=i7b zSe9jUopU(nP)ebc0${aTQB@VoX_=m&cX{grP9|~G)M1=W#&VIjdRH@r zK~y-)g;ODqQ$Y~^HmRG6bu0D<>_ZX^>ICW#NC>)^nkFRGuuX7>tiV0p5L^==Bqa@J zI8jbiuq#kx#on2{`D8u^&VPDP;u!-g{?^sZvVr zSlyuC(2wD82mp{$R#HlM@10T#0FZNT0b-2EIXeJ2J*msbFC)PKTI(u=;D`tS@aF7o zS*?Nd%|s9pgtZn@$||MgxGBa6r4(ke6wcg_Jo(=<>@VZg{KCHMH@y!`qNtk&&>2lwl8 zv7HE|6jp0sw>xCwy?4S|+fh2Elc(`D_Voj3uP~d=%W4h0d;dfjV-B{?a?ZcKxN{6# z95WKf(?@l=y8iqA{Ppm>DJ6Gcq!5BTJ*ms~M>}n?90{hcwXU>Aw=X`s7>~zbXYn4G zK0A<`*cbk1JD^+QZ4y|E`ub(vIgi;amLqX>T^HT~v(vg| x_TMvd!@d-*BO(m?O-<9l7}FJVzW<#W_z$er0q$cWI^O^Q002ovPDHLkV1nD$_bC7X literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/blocks/ore/zinc_block_top.png b/src/main/resources/assets/sextiarysector/textures/blocks/ore/zinc_block_top.png new file m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8n)a zx%=`2o1r2Ze7tWOoF2zX0VH{JvsWdl-%J8qvjc*x5AY(m;-zKmsPndx61=-9X-`*T z-AeUrs5fGVM^!l)db-!v;*OhNkb#9pmqJNI@+>hjO$7zC`j`q&m+TY zJ8$0w@D3kSVwQ~Y5-?XOj)>CgIvT=pi{QfOuf0MpGi=pVMsAYFqwsSA&;7ygk&(+e z*^*^7Zo+N$IPE)GZLW4b(45iH%dcxCtN)|BlP$7aI*$)a&qTd3dyw|TK(|1jNv4r%||GRLWSo>EK*{#cEHIusHS0hwMz zmk-Bb`;7j$UZC75Q0~r?;B%+G$3O}S;X=raAt?GvKt19DCLc0rAtcl8KB2zTeTkOx`n( zUR9EMd&4vd7@|d(1@C$~`kGqQ>_bn(17@x}<%k2=R|w)>QV3w_17Eb%6@G^SlG@-4 zzK>`7Fy48Zs;du%GF7=EuiZT1euDFyLAnt%Ul8D-xEpwy%hmD5PFzIK-Z NMOihO3MsRo{{?gWW!eA$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/gearforce/iron_spanner.png b/src/main/resources/assets/sextiarysector/textures/items/gearforce/iron_spanner.png new file mode 100644 index 0000000000000000000000000000000000000000..d34f1f1a53eba97cb66e2a5b48e6d840fb34b3bd GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~2RomzVDl|&51`O$PZ!4!i_=Rd9ppWtz{4_K`2H1U z)*EXtFs!}6c=p4&ZmEo<_pVc7{5Vy#e=^JIT+8-&)N8l6ca>MDt-o?*w9=s{?d-KB z=L+k;ONa^j*?!>uZfyO^u}AP;wchC_0j6uEtPC?&>#ooW_KGeJ&*rsEpAys~+iHC! z)XR_|A^ibg?6U+myUGQtcohHqeVr>b|G;ea>K$9z7@R*GJi>Pl$h-I3S;Fn%ZH3+! Z-1E=NqE literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/memory/mp_memory.png b/src/main/resources/assets/sextiarysector/textures/items/memory/mp_memory.png new file mode 100644 index 0000000000000000000000000000000000000000..36c849661019f7aafba93ca217bd146c6018b59e GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~2PcP!_Pe9?dw@b~JY5_^EKVo?`TyUZS+$|F(dj^w z-h+n^8?Sp>m%T|ilFh)(%ALVrO+ zF%Qr4NIxS3jmd%?ZB@?%eyy|2Y~)~mu0OZsgqAapb^S|~PQ4$=eG9Hne#|s&GKZAE zgu$ZaE>B86JUJ=M!yCRXMsW^bQnH`HjM*Cv=h%GZZsp?;TI?K@mXMH;@qU8hErw%^ b=X)76cuk87&i~N^x|_k%)z4*}Q$iB}ddg+6 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/memory/xp_memory.png b/src/main/resources/assets/sextiarysector/textures/items/memory/xp_memory.png new file mode 100644 index 0000000000000000000000000000000000000000..52c1f97a9f8c628a9de2c89e68453af17479e753 GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~2PcQ1{*?Rv4}d~zJY5_^EKVo?`TyUZS+$|F(dj^w z-h+n^8?Sp>m%T|ilFh)(%WFU8GbZ8()Nlj2>E@cM*00d`AL_t(o!{wJvY*bYg z$A9;IO&|T5f+3cIEjmV_D`SkBCael3y44-Tjk2f^6T=2$OpJ-_G!kSXqJfoe6x2XM zg3*SB7=r>DFb3(gGu1c_w9`J`ym|ND=VIo)&P>Z2Z~-Kq)tx&p_x$cT=YQ_KB8npJ zrWxF2v*N+X$jBWFML3tII2VZ)0Du>_Z^v~r_?^w zEEX9W8p5(HW@l%qR4O=*L#dCmym>R8=iOXFhJk6CEptk#WNexyj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8JBfx1gg~<0IuH}HenbN zh9Q$XM-W9QHvXp6hRB2wQb+7Hh7l2b^x4^@T8@8yCTUtqDO}g3R4P#z%%%gxqS;u6 zZ@zaLfFrLxN3C%aBZ`<7BLEyfd1gzkIg`os2(SmBvkh-%AAWj%yTdo+bHDMTH7zVjqj?i!P0q783=kVzi(C@{y zRMGa7tx`xSv27b8(&+$ZJ48~-u9%YYU>)T@6YsKdUDJ81urvt<}8!}9?*({c2 zVObVRDNNJsn(Z489%(v|QYICW3NSuC2Ebaij@Fus7ccf4wS3?2IdsG++U%^LwMI(G z*w`3LfBl&bP^+zXyHlr5;rl*?LV-*slPp%R*Sj=fSr%a!va+&*=Xpu!0UC`4N-3tN zrx_U;>EDPNek(@jOsO#JU}$NvKA16-mLI%*F90000 Date: Sat, 15 Aug 2015 13:09:57 +0900 Subject: [PATCH 87/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=EF=BC=9A=E8=91=89?= =?UTF-8?q?=E3=81=A3=E3=81=B1=E3=83=99=E3=83=83=E3=83=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/shift/sextiarysector/SSBlocks.java | 8 +- .../java/shift/sextiarysector/SSItems.java | 12 + .../shift/sextiarysector/SSOreDictionary.java | 2 + .../shift/sextiarysector/block/BlockLeaf.java | 21 ++ .../sextiarysector/block/BlockLeafBed.java | 284 +++++++++++++++++- .../event/CommonEventHandler.java | 20 ++ .../sextiarysector/item/ItemLeafBed.java | 79 +++++ .../sextiarysector/recipe/RecipesCore.java | 13 + .../sextiarysector/recipe/RecipesFurnace.java | 2 + .../assets/sextiarysector/lang/en_US.lang | 9 + .../sextiarysector/textures/items/leaf.png | Bin 0 -> 378 bytes .../textures/items/leaf_bed.png | Bin 0 -> 392 bytes .../textures/items/ring/iron_ring.png | Bin 338 -> 294 bytes .../textures/items/ring/iron_ring2.png | Bin 294 -> 0 bytes .../textures/items/ring/iron_ring4.png | Bin 0 -> 338 bytes 15 files changed, 448 insertions(+), 2 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/block/BlockLeaf.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemLeafBed.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/leaf.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/leaf_bed.png delete mode 100644 src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring2.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring4.png diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index e16995f..6b5bce9 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -26,6 +26,7 @@ import shift.sextiarysector.block.BlockLargeFurnace; import shift.sextiarysector.block.BlockLargeOre; import shift.sextiarysector.block.BlockLargeWindmill; +import shift.sextiarysector.block.BlockLeaf; import shift.sextiarysector.block.BlockLeafBed; import shift.sextiarysector.block.BlockMachineFrame; import shift.sextiarysector.block.BlockMagiFurnace; @@ -132,6 +133,8 @@ public class SSBlocks { public static Block figure; + public static Block leafBlock; + public static Block trap; //Bed @@ -392,11 +395,14 @@ public static void initBlicks() { GameRegistry.registerBlock(figure, ItemBlockFigure.class, "Figure"); GameRegistry.registerTileEntity(TileEntityFigure.class, "SSFigure"); + leafBlock = new BlockLeaf().setBlockName("ss.leaf_block").setBlockTextureName("sextiarysector:leaf_bed_2").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(leafBlock, "LeafBlock"); + trap = new BlockTrap().setBlockName("ss.trap").setBlockTextureName("sextiarysector:wood_grate").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(trap, ItemBlockMeta.class, "Trap"); GameRegistry.registerTileEntity(TileEntityTrap.class, "SSTrap"); - leafBed = new BlockLeafBed().setBlockName("ss.leaf_bed").setBlockTextureName("sextiarysector:leaf_bed").setCreativeTab(SextiarySectorAPI.TabSSCore); + leafBed = new BlockLeafBed().setBlockName("ss.leaf_bed").setBlockTextureName("sextiarysector:leaf_bed");//.setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerBlock(leafBed, "LeafBed"); //液体 diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 94a3467..b8141b9 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -24,6 +24,7 @@ import shift.sextiarysector.item.ItemHammer; import shift.sextiarysector.item.ItemKnife; import shift.sextiarysector.item.ItemLavaBottle; +import shift.sextiarysector.item.ItemLeafBed; import shift.sextiarysector.item.ItemMineboat; import shift.sextiarysector.item.ItemMineboatTank; import shift.sextiarysector.item.ItemOxygenTank; @@ -76,7 +77,12 @@ public class SSItems { public static Item calendar; public static Item seasonStone; + //ベッド + public static Item leafBed; + //素材 + public static Item leaf; + public static Item dustWaterLily; public static Item stoneDust; @@ -372,7 +378,13 @@ public static void initItems() { seasonStone = new ItemSeasonStone().setUnlocalizedName("ss.season_stone").setTextureName("sextiarysector:season_stone").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(seasonStone, "SeasonStone"); + leafBed = new ItemLeafBed().setUnlocalizedName("ss.leaf_bed").setTextureName("sextiarysector:leaf_bed").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(leafBed, "ItemLeafBed"); + //素材 + leaf = new Item().setUnlocalizedName("ss.leaf").setTextureName("sextiarysector:leaf").setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerItem(leaf, "Leaf"); + dustWaterLily = new Item().setUnlocalizedName("ss.dust_waterlily").setTextureName("sextiarysector:dust/waterlily_dust").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(dustWaterLily, "DustWaterLily"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index d951a7d..dbbd181 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -128,6 +128,8 @@ public static void init() { OreDictionary.registerOre("ringIron", SSItems.ironRing); + OreDictionary.registerOre("treeLeaves", SSBlocks.leafBlock); + //布 OreDictionary.registerOre("massString", SSItems.stringMass); OreDictionary.registerOre("blockWool", SSItems.stringMass); diff --git a/src/main/java/shift/sextiarysector/block/BlockLeaf.java b/src/main/java/shift/sextiarysector/block/BlockLeaf.java new file mode 100644 index 0000000..bf01474 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockLeaf.java @@ -0,0 +1,21 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; + +public class BlockLeaf extends Block { + + public BlockLeaf() { + super(Material.leaves); + this.setHardness(0.2F); + this.setLightOpacity(1); + this.setStepSound(soundTypeGrass); + } + + @Override + public boolean isOpaqueCube() + { + return false; + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockLeafBed.java b/src/main/java/shift/sextiarysector/block/BlockLeafBed.java index b6271cd..751be0f 100644 --- a/src/main/java/shift/sextiarysector/block/BlockLeafBed.java +++ b/src/main/java/shift/sextiarysector/block/BlockLeafBed.java @@ -1,14 +1,30 @@ package shift.sextiarysector.block; +import java.util.Iterator; +import java.util.Random; + import net.minecraft.block.Block; +import net.minecraft.block.BlockDirectional; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.util.ChatComponentTranslation; +import net.minecraft.util.ChunkCoordinates; import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import shift.sextiarysector.SSItems; import shift.sextiarysector.SextiarySector; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockLeafBed extends Block { +public class BlockLeafBed extends BlockDirectional +{ + public static final int[][] field_149981_a = new int[][] { { 0, 1 }, { -1, 0 }, { 0, -1 }, { 1, 0 } }; @SideOnly(Side.CLIENT) protected IIcon[] blockIcons; @@ -24,6 +40,271 @@ public BlockLeafBed() { this.useNeighborBrightness = true; } + @Override + public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) + { + if (p_149727_1_.isRemote) + { + return true; + } + else + { + int i1 = p_149727_1_.getBlockMetadata(p_149727_2_, p_149727_3_, p_149727_4_); + + if (!isBlockHeadOfBed(i1)) + { + int j1 = getDirection(i1); + p_149727_2_ += field_149981_a[j1][0]; + p_149727_4_ += field_149981_a[j1][1]; + + if (p_149727_1_.getBlock(p_149727_2_, p_149727_3_, p_149727_4_) != this) + { + return true; + } + + i1 = p_149727_1_.getBlockMetadata(p_149727_2_, p_149727_3_, p_149727_4_); + } + + if (p_149727_1_.provider.canRespawnHere() && p_149727_1_.getBiomeGenForCoords(p_149727_2_, p_149727_4_) != BiomeGenBase.hell) + { + if (func_149976_c(i1)) + { + EntityPlayer entityplayer1 = null; + Iterator iterator = p_149727_1_.playerEntities.iterator(); + + while (iterator.hasNext()) + { + EntityPlayer entityplayer2 = (EntityPlayer) iterator.next(); + + if (entityplayer2.isPlayerSleeping()) + { + ChunkCoordinates chunkcoordinates = entityplayer2.playerLocation; + + if (chunkcoordinates.posX == p_149727_2_ && chunkcoordinates.posY == p_149727_3_ && chunkcoordinates.posZ == p_149727_4_) + { + entityplayer1 = entityplayer2; + } + } + } + + if (entityplayer1 != null) + { + p_149727_5_.addChatComponentMessage(new ChatComponentTranslation("tile.bed.occupied", new Object[0])); + return true; + } + + func_149979_a(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, false); + } + + EntityPlayer.EnumStatus enumstatus = p_149727_5_.sleepInBedAt(p_149727_2_, p_149727_3_, p_149727_4_); + + if (enumstatus == EntityPlayer.EnumStatus.OK) + { + func_149979_a(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, true); + return true; + } + else + { + if (enumstatus == EntityPlayer.EnumStatus.NOT_POSSIBLE_NOW) + { + p_149727_5_.addChatComponentMessage(new ChatComponentTranslation("tile.bed.noSleep", new Object[0])); + } + else if (enumstatus == EntityPlayer.EnumStatus.NOT_SAFE) + { + p_149727_5_.addChatComponentMessage(new ChatComponentTranslation("tile.bed.notSafe", new Object[0])); + } + + return true; + } + } + else + { + double d2 = p_149727_2_ + 0.5D; + double d0 = p_149727_3_ + 0.5D; + double d1 = p_149727_4_ + 0.5D; + p_149727_1_.setBlockToAir(p_149727_2_, p_149727_3_, p_149727_4_); + int k1 = getDirection(i1); + p_149727_2_ += field_149981_a[k1][0]; + p_149727_4_ += field_149981_a[k1][1]; + + if (p_149727_1_.getBlock(p_149727_2_, p_149727_3_, p_149727_4_) == this) + { + p_149727_1_.setBlockToAir(p_149727_2_, p_149727_3_, p_149727_4_); + d2 = (d2 + p_149727_2_ + 0.5D) / 2.0D; + d0 = (d0 + p_149727_3_ + 0.5D) / 2.0D; + d1 = (d1 + p_149727_4_ + 0.5D) / 2.0D; + } + + p_149727_1_.newExplosion((Entity) null, p_149727_2_ + 0.5F, p_149727_3_ + 0.5F, p_149727_4_ + 0.5F, 5.0F, true, true); + return true; + } + } + } + + @Override + public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) + { + int l = p_149695_1_.getBlockMetadata(p_149695_2_, p_149695_3_, p_149695_4_); + int i1 = getDirection(l); + + if (isBlockHeadOfBed(l)) + { + if (p_149695_1_.getBlock(p_149695_2_ - field_149981_a[i1][0], p_149695_3_, p_149695_4_ - field_149981_a[i1][1]) != this) + { + p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_, p_149695_4_); + } + } + else if (p_149695_1_.getBlock(p_149695_2_ + field_149981_a[i1][0], p_149695_3_, p_149695_4_ + field_149981_a[i1][1]) != this) + { + p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_, p_149695_4_); + + if (!p_149695_1_.isRemote) + { + this.dropBlockAsItem(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, l, 0); + } + } + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + { + /** + * Returns whether or not this bed block is the head of the bed. + */ + return isBlockHeadOfBed(p_149650_1_) ? Item.getItemById(0) : SSItems.leafBed; + } + + public static boolean isBlockHeadOfBed(int p_149975_0_) + { + return (p_149975_0_ & 8) != 0; + } + + public static boolean func_149976_c(int p_149976_0_) + { + return (p_149976_0_ & 4) != 0; + } + + public static void func_149979_a(World p_149979_0_, int p_149979_1_, int p_149979_2_, int p_149979_3_, boolean p_149979_4_) + { + int l = p_149979_0_.getBlockMetadata(p_149979_1_, p_149979_2_, p_149979_3_); + + if (p_149979_4_) + { + l |= 4; + } + else + { + l &= -5; + } + + p_149979_0_.setBlockMetadataWithNotify(p_149979_1_, p_149979_2_, p_149979_3_, l, 4); + } + + public static ChunkCoordinates func_149977_a(World p_149977_0_, int p_149977_1_, int p_149977_2_, int p_149977_3_, int p_149977_4_) + { + int i1 = p_149977_0_.getBlockMetadata(p_149977_1_, p_149977_2_, p_149977_3_); + int j1 = BlockDirectional.getDirection(i1); + + for (int k1 = 0; k1 <= 1; ++k1) + { + int l1 = p_149977_1_ - field_149981_a[j1][0] * k1 - 1; + int i2 = p_149977_3_ - field_149981_a[j1][1] * k1 - 1; + int j2 = l1 + 2; + int k2 = i2 + 2; + + for (int l2 = l1; l2 <= j2; ++l2) + { + for (int i3 = i2; i3 <= k2; ++i3) + { + if (World.doesBlockHaveSolidTopSurface(p_149977_0_, l2, p_149977_2_ - 1, i3) && !p_149977_0_.getBlock(l2, p_149977_2_, i3).getMaterial().isOpaque() && !p_149977_0_.getBlock(l2, p_149977_2_ + 1, i3).getMaterial().isOpaque()) + { + if (p_149977_4_ <= 0) + { + return new ChunkCoordinates(l2, p_149977_2_, i3); + } + + --p_149977_4_; + } + } + } + } + + return null; + } + + @Override + public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_) + { + if (!isBlockHeadOfBed(p_149690_5_)) + { + super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 0); + } + } + + @Override + public int getMobilityFlag() + { + return 1; + } + + @Override + @SideOnly(Side.CLIENT) + public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) + { + return SSItems.leafBed; + } + + @Override + public void onBlockHarvested(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, EntityPlayer p_149681_6_) + { + if (p_149681_6_.capabilities.isCreativeMode && isBlockHeadOfBed(p_149681_5_)) + { + int i1 = getDirection(p_149681_5_); + p_149681_2_ -= field_149981_a[i1][0]; + p_149681_4_ -= field_149981_a[i1][1]; + + if (p_149681_1_.getBlock(p_149681_2_, p_149681_3_, p_149681_4_) == this) + { + p_149681_1_.setBlockToAir(p_149681_2_, p_149681_3_, p_149681_4_); + } + } + } + + //Forge + + @Override + public boolean isBed(IBlockAccess world, int x, int y, int z, EntityLivingBase player) + { + return true; + } + + @Override + public ChunkCoordinates getBedSpawnPosition(IBlockAccess world, int x, int y, int z, EntityPlayer player) + { + if (world instanceof World) + return this.func_149977_a((World) world, x, y, z, 0); + return null; + } + + @Override + public void setBedOccupied(IBlockAccess world, int x, int y, int z, EntityPlayer player, boolean occupied) + { + if (world instanceof World) + this.func_149979_a((World) world, x, y, z, occupied); + } + + @Override + public int getBedDirection(IBlockAccess world, int x, int y, int z) + { + return this.getDirection(world.getBlockMetadata(x, y, z)); + } + + @Override + public boolean isBedFoot(IBlockAccess world, int x, int y, int z) + { + return this.isBlockHeadOfBed(world.getBlockMetadata(x, y, z)); + } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister p_149651_1_) @@ -42,6 +323,7 @@ public void registerBlockIcons(IIconRegister p_149651_1_) @SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) { + if (p_149691_2_ > 2) return this.blockIcon; return this.blockIcons[p_149691_2_]; } diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index 95cbba3..32f5758 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -1,5 +1,6 @@ package shift.sextiarysector.event; +import net.minecraft.block.BlockLeavesBase; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; @@ -9,6 +10,7 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.init.Items; +import net.minecraft.item.ItemShears; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -23,11 +25,13 @@ import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.entity.player.PlayerWakeUpEvent; +import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fluids.FluidStack; import shift.sextiarysector.SSAchievement; import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SSFluids.SSFluid; +import shift.sextiarysector.SSItems; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.event.BlockBottleEvent; import shift.sextiarysector.block.BlockMonitor; @@ -367,6 +371,22 @@ public void onLivingDrops(LivingDropsEvent event) } + //葉っぱ + @SubscribeEvent + public void DecayEvent(BlockEvent.HarvestDropsEvent event) + { + + if (event.isSilkTouching) return; + + if (!(event.block instanceof BlockLeavesBase)) return; + + if (event.harvester != null && event.harvester.getCurrentEquippedItem() != null && event.harvester.getCurrentEquippedItem().getItem() instanceof ItemShears) return; + + if (event.world.rand.nextBoolean()) event.drops.add(new ItemStack(Items.stick, event.world.rand.nextInt(1) + 1)); + if (event.world.rand.nextBoolean()) event.drops.add(new ItemStack(SSItems.leaf, event.world.rand.nextInt(2) + 1)); + + } + /* @SubscribeEvent public void onFluidRegisterEvent(FluidRegisterEvent event) { diff --git a/src/main/java/shift/sextiarysector/item/ItemLeafBed.java b/src/main/java/shift/sextiarysector/item/ItemLeafBed.java new file mode 100644 index 0000000..5f5cf46 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemLeafBed.java @@ -0,0 +1,79 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.block.BlockLeafBed; + +public class ItemLeafBed extends Item { + + @Override + public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) + { + if (p_77648_3_.isRemote) + { + return true; + } + else if (p_77648_7_ != 1) + { + return false; + } + else + { + ++p_77648_5_; + BlockLeafBed blockbed = (BlockLeafBed) SSBlocks.leafBed; + int i1 = MathHelper.floor_double(p_77648_2_.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + byte b0 = 0; + byte b1 = 0; + + if (i1 == 0) + { + b1 = 1; + } + + if (i1 == 1) + { + b0 = -1; + } + + if (i1 == 2) + { + b1 = -1; + } + + if (i1 == 3) + { + b0 = 1; + } + + if (p_77648_2_.canPlayerEdit(p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_1_) && p_77648_2_.canPlayerEdit(p_77648_4_ + b0, p_77648_5_, p_77648_6_ + b1, p_77648_7_, p_77648_1_)) + { + if (p_77648_3_.isAirBlock(p_77648_4_, p_77648_5_, p_77648_6_) && p_77648_3_.isAirBlock(p_77648_4_ + b0, p_77648_5_, p_77648_6_ + b1) && World.doesBlockHaveSolidTopSurface(p_77648_3_, p_77648_4_, p_77648_5_ - 1, p_77648_6_) + && World.doesBlockHaveSolidTopSurface(p_77648_3_, p_77648_4_ + b0, p_77648_5_ - 1, p_77648_6_ + b1)) + { + p_77648_3_.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, blockbed, i1, 3); + + if (p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_) == blockbed) + { + p_77648_3_.setBlock(p_77648_4_ + b0, p_77648_5_, p_77648_6_ + b1, blockbed, i1 + 8, 3); + } + + --p_77648_1_.stackSize; + return true; + } + else + { + return false; + } + } + else + { + return false; + } + } + } + +} diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index ebf0876..18da264 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -92,6 +92,19 @@ public static void addRecipes(CraftingManager p_77608_1_) 'x', "craftingString", }));*/ + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.leafBlock, 1), + new Object[] { + "xxx", "xxx", "xxx", + 'x', SSItems.leaf + })); + + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.leafBed, 1), + new Object[] { + "xxx", "yyy", + 'x', SSBlocks.leafBlock, + 'y', "plankWood", + })); + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.silkBobbin, 1), new Object[] { "xxx", "xyx", "xxx", diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java index 219d42b..e1b7551 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java @@ -27,6 +27,8 @@ public static void addRecipes() GameRegistry.addSmelting(new ItemStack(SSItems.waterBottle), new ItemStack(SSItems.drinkingWaterBottle), 0.1f); + GameRegistry.addSmelting(new ItemStack(SSBlocks.leafBlock), new ItemStack(Items.dye, 1, 2), 0.1f); + } } diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index 083266a..a206fde 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -45,8 +45,14 @@ tile.ss.chunk_loader.name=Time Loader tile.ss.figure.name=Figure + + +tile.ss.leaf_block.name=Leaf Block + tile.ss.trap.name=Trap +tile.ss.leaf_bed.name=Leaf Bed + tile.ss.drinking_water.name=Drinking Water tile.ss.hot_springs.name=Hot Springs @@ -195,7 +201,10 @@ item.ss.season_stone_summer.name=Season Stone -Summer- item.ss.season_stone_autumn.name=Season Stone -Autumn- item.ss.season_stone_winter.name=Season Stone -Winter- +item.ss.leaf_bed.name=Leaf Bed + +item.ss.leaf.name=Leaf item.ss.dust_waterlily.name=WaterLily Dust diff --git a/src/main/resources/assets/sextiarysector/textures/items/leaf.png b/src/main/resources/assets/sextiarysector/textures/items/leaf.png new file mode 100644 index 0000000000000000000000000000000000000000..a171f8f22618d33fc5e12111130185f0d7ba35c3 GIT binary patch literal 378 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~2OmGLrQDOw3k(d5?4B-;Ar_~XPB!#A>>%KJf59AP zrHcVKWOq7n`8`N_!W~e+QRQ-+b%Mh+F*`=_1qF_RQA@V0oDk&xOT=@|n!Veaj4pXt z-}?Le|CxWLo^yo7=SWW8=zCgM_579#ffF+pvffjFaNhb(P$uiN+20)YmoOYEKk$6_ zR~?7uoUCO_lYpY9mQQ-Mx=ZitPT_lpw?#0Xb#%?|xa!}U-j^=d`1joL_8VUD`KsS% z_*WkLv`Z$1Pd-z0^17O9%xAQ3{K;GN&%O7G(SFvhNJic({iQ5y4nmU@ocAdFFZtM@ z5%4jpL;Ks!dA8@avFfHwo4v!@)?6xEIf*j2LiyXHb<*t3lmH5DOcdFpZ9#5&qub1Ds*T1Eg z$?{`idH>bt%-)+%`rMRxxxU0_{=csQt78@`Ms;^#)giNYoYI*-sS0~#@ers jYV=JJTv@+l{{wc*zH1F-ra0;U3xDu4d~{{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2i^=61{FFBU%4Ux006T|L_t(I%gs|U4#F@DJXd^-Au{3xY={xziM=oA>d#nt2SX&p zo>zpaRhuRyQWtKsqPzI)GY!LlJ?O9#y9Exl2Qy3anwhCtz$csehpT_SHLu}1j6WBLMd4p>A3Nvp>I0000< KMNUMnLSTY6uxdL1 delta 305 zcmV-10nYxW0@4DIDt|-(L;yrm66Iq6000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2%81uH3#G00y4007@fL_t(I%cYXN5riNRg&#NO_Fw?1k)hd^VYV~o)?z{(hIBw= zDqUCsmz<1n3iq=S!|*-c?mpqY$3OM>pE|(4I<*00TKD8X`r%KR42w$n=Ial6KKU4PF(3BGbs6#@hR9srb5mn{~9G|zLmQ%aQuoO4n7&I5j} zHe?_YFvbWX@+y7b2O%kC8lnh}l6bbh?|T-?3Vd5nbsT9ap1JU300000NkvXXu0mjf DZQFa{ diff --git a/src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring2.png b/src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring2.png deleted file mode 100644 index 27559aca030519b02bed10c9724ac733ad350ea4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqj|iKn6?gnjC7{q|PZ!4!i_>R=4fzfk@Ysac^e7rV zV$JCgeAu~H|HZ5G5tZ!DDo5spx2z1Et)?0zp0|0??jLWAc@H<(zStnVo0V@XyRrA@ zSumdKI;Vst06Xq&!~g&Q diff --git a/src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring4.png b/src/main/resources/assets/sextiarysector/textures/items/ring/iron_ring4.png new file mode 100644 index 0000000000000000000000000000000000000000..b14ea48f9da04cbf910a9fda396165ffaaf107de GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE(~B8B=j^HD8gCb5n0T@ zz%2~Ij105pNB{-dOFVsD+3&MUv1)5hFgy_t6uR%};uvCadg-LSf-MRHt@7s2z9lfM zoVf7jw8U-3&#omo$+nd^q-e!PFixM-Q^56ov*6(mw)fuIJ=}ZT{_Bq?f`XMwyZ)>^ z<#>GN%)@gH-R^KL3Anv&qK5I}*H-y!d6gc`U=;khEOWtDHin$rVh0i>f|?IS{eI_= z-CHPQ=o`#(wUjrlt(fohrYGqI2hwM|X9u17BX(}vWv}OjyN{K|)}MFe+*cGR%EZDT z$1o*mx~^EW$@$_P!Cq5Y=M)G2I>%hM)+|Lq$lw@<(x=+{?24MHQj0kHCRJ?P_r6-} d6jx2Of2mBS=DeLBQh;7%@O1TaS?83{1OS;Ce?9;J literal 0 HcmV?d00001 From 4fed041c44069a1fc22d4f438b0514b3a1fc312e Mon Sep 17 00:00:00 2001 From: shift02 Date: Tue, 25 Aug 2015 16:22:09 +0900 Subject: [PATCH 88/96] =?UTF-8?q?=E5=A4=89=E6=9B=B4=EF=BC=9A=E3=83=90?= =?UTF-8?q?=E3=83=8B=E3=83=A9=E3=81=AE=E3=83=9C=E3=83=88=E3=83=AB=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E3=81=86=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・ひび割れが表示されるように修正 --- build.gradle | 4 +- .../net/minecraft/block/BlockCauldron.java | 292 ++++++++++++++ .../java/shift/sextiarysector/Config.java | 2 + .../shift/sextiarysector/SSAchievement.java | 2 +- .../java/shift/sextiarysector/SSBlocks.java | 13 +- .../shift/sextiarysector/SSCreativeTabs.java | 125 +++--- .../java/shift/sextiarysector/SSFluids.java | 14 +- .../java/shift/sextiarysector/SSItems.java | 13 + .../shift/sextiarysector/SSOreDictionary.java | 2 + .../shift/sextiarysector/SextiarySector.java | 9 +- .../api/event/VanillaFoodHandler.java | 14 +- .../asm/CauldronTransformer.java | 134 +++++++ .../shift/sextiarysector/asm/DepLoader.java | 28 +- .../shift/sextiarysector/asm/SSBottle.java | 5 + .../java/shift/sextiarysector/asm/SSCore.java | 56 +++ .../sextiarysector/asm/TransformerBottle.java | 124 ++++++ .../asm/vanilla/BottleMethod.java | 131 +++++++ .../sextiarysector/block/BlockLargeOre.java | 16 +- .../sextiarysector/block/BlockPowerStone.java | 15 +- .../sextiarysector/block/BlockSSFluid.java | 2 + .../sextiarysector/block/BlockSSOre.java | 20 +- .../sextiarysector/block/BlockSSOreBase.java | 61 +++ .../event/PlayerStatusEventHandler.java | 28 +- .../sextiarysector/gui/tab/TabManager.java | 44 +++ .../sextiarysector/item/ItemBlockSSFluid.java | 25 ++ .../shift/sextiarysector/item/ItemDrink.java | 6 +- .../sextiarysector/item/ItemFullBottle.java | 6 +- .../sextiarysector/item/ItemLavaBottle.java | 10 +- .../item/ItemMagicContactLenses.java | 14 + .../sextiarysector/nei/NEIGuiTabsHandler.java | 73 ++++ .../nei/NEISextiarySectorConfig.java | 2 + .../sextiarysector/player/MoistureStats.java | 349 +++++++++-------- .../sextiarysector/player/StaminaStats.java | 358 +++++++++--------- .../shift/sextiarysector/plugin/PluginTC.java | 55 ++- .../sextiarysector/plugin/SSPlugins.java | 17 + .../sextiarysector/recipe/RecipesCore.java | 14 +- .../sextiarysector/recipe/RecipesFurnace.java | 2 +- .../recipe/RecipesFurnaceCraft.java | 12 +- .../renderer/block/RendererOreStone.java | 77 +++- .../assets/sextiarysector/lang/en_US.lang | 2 + .../items/face/magic_contact_lenses.png | Bin 0 -> 386 bytes .../items/fluid/drinking_water_bottle.png | Bin 379 -> 419 bytes .../items/fluid/drinking_water_bottle2.png | Bin 0 -> 379 bytes .../fluid/drinking_water_small_bottle.png | Bin 419 -> 0 bytes .../textures/items/fluid/lava_bottle.png | Bin 388 -> 377 bytes .../textures/items/fluid/sap_bottle.png | Bin 375 -> 372 bytes .../items/fluid/takumi_tea_bottle.png | Bin 358 -> 333 bytes .../textures/items/nugget/obsidian_nugget.png | Bin 0 -> 263 bytes 48 files changed, 1635 insertions(+), 541 deletions(-) create mode 100644 src/main/java/net/minecraft/block/BlockCauldron.java create mode 100644 src/main/java/shift/sextiarysector/asm/CauldronTransformer.java create mode 100644 src/main/java/shift/sextiarysector/asm/SSBottle.java create mode 100644 src/main/java/shift/sextiarysector/asm/SSCore.java create mode 100644 src/main/java/shift/sextiarysector/asm/TransformerBottle.java create mode 100644 src/main/java/shift/sextiarysector/asm/vanilla/BottleMethod.java create mode 100644 src/main/java/shift/sextiarysector/block/BlockSSOreBase.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemBlockSSFluid.java create mode 100644 src/main/java/shift/sextiarysector/item/ItemMagicContactLenses.java create mode 100644 src/main/java/shift/sextiarysector/nei/NEIGuiTabsHandler.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/face/magic_contact_lenses.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/drinking_water_bottle2.png delete mode 100644 src/main/resources/assets/sextiarysector/textures/items/fluid/drinking_water_small_bottle.png create mode 100644 src/main/resources/assets/sextiarysector/textures/items/nugget/obsidian_nugget.png diff --git a/build.gradle b/build.gradle index 39d16ed..ad86c36 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.4.2.b-${project.minecraft.version}" +version = "2.4.3.a-${project.minecraft.version}" minecraft { // replacing stuff in the source @@ -56,7 +56,7 @@ jar { } manifest { - attributes 'FMLCorePlugin' : 'shift.sextiarysector.asm.DepLoader','FMLCorePluginContainsFMLMod':'true' + attributes 'FMLCorePlugin' : 'shift.sextiarysector.asm.SSCore','FMLCorePluginContainsFMLMod':'true' } } diff --git a/src/main/java/net/minecraft/block/BlockCauldron.java b/src/main/java/net/minecraft/block/BlockCauldron.java new file mode 100644 index 0000000..91d0e4d --- /dev/null +++ b/src/main/java/net/minecraft/block/BlockCauldron.java @@ -0,0 +1,292 @@ +package net.minecraft.block; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockCauldron extends Block +{ + @SideOnly(Side.CLIENT) + private static IIcon field_150029_a; + @SideOnly(Side.CLIENT) + private IIcon field_150028_b; + @SideOnly(Side.CLIENT) + private static IIcon field_150030_M; + private static final String __OBFID = "CL_00000213"; + + public BlockCauldron() + { + super(Material.iron); + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + return p_149691_1_ == 1 ? this.field_150028_b : (p_149691_1_ == 0 ? this.field_150030_M : this.blockIcon); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) + { + this.field_150029_a = p_149651_1_.registerIcon(this.getTextureName() + "_" + "inner"); + this.field_150028_b = p_149651_1_.registerIcon(this.getTextureName() + "_top"); + this.field_150030_M = p_149651_1_.registerIcon(this.getTextureName() + "_" + "bottom"); + this.blockIcon = p_149651_1_.registerIcon(this.getTextureName() + "_side"); + } + + /** + * Adds all intersecting collision boxes to a list. (Be sure to only add boxes to the list if they intersect the + * mask.) Parameters: World, X, Y, Z, mask, list, colliding entity + */ + @Override + public void addCollisionBoxesToList(World p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_) + { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3125F, 1.0F); + super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); + float f = 0.125F; + this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); + super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); + super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); + this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); + this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); + super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); + this.setBlockBoundsForItemRender(); + } + + @SideOnly(Side.CLIENT) + public static IIcon getCauldronIcon(String p_150026_0_) + { + return p_150026_0_.equals("inner") ? field_150029_a : (p_150026_0_.equals("bottom") ? field_150030_M : null); + } + + /** + * Sets the block's bounds for rendering it as an item + */ + @Override + public void setBlockBoundsForItemRender() + { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + + /** + * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two + * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. + */ + @Override + public boolean isOpaqueCube() + { + return false; + } + + /** + * The type of render function that is called for this block + */ + @Override + public int getRenderType() + { + return 24; + } + + /** + * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) + */ + @Override + public boolean renderAsNormalBlock() + { + return false; + } + + /** + * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity + */ + @Override + public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_) + { + int l = func_150027_b(p_149670_1_.getBlockMetadata(p_149670_2_, p_149670_3_, p_149670_4_)); + float f = p_149670_3_ + (6.0F + 3 * l) / 16.0F; + + if (!p_149670_1_.isRemote && p_149670_5_.isBurning() && l > 0 && p_149670_5_.boundingBox.minY <= f) + { + p_149670_5_.extinguish(); + this.func_150024_a(p_149670_1_, p_149670_2_, p_149670_3_, p_149670_4_, l - 1); + } + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) + { + + if (p_149727_1_.isRemote) + { + return true; + } + else + { + ItemStack itemstack = p_149727_5_.inventory.getCurrentItem(); + + if (itemstack == null) + { + return true; + } + else + { + int i1 = p_149727_1_.getBlockMetadata(p_149727_2_, p_149727_3_, p_149727_4_); + int j1 = func_150027_b(i1); + + if (itemstack.getItem() == Items.water_bucket) + { + if (j1 < 3) + { + if (!p_149727_5_.capabilities.isCreativeMode) + { + p_149727_5_.inventory.setInventorySlotContents(p_149727_5_.inventory.currentItem, new ItemStack(Items.bucket)); + } + + this.func_150024_a(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, 3); + } + + return true; + } + else + { + if (itemstack.getItem() == Items.glass_bottle) + { + if (j1 > 0) + { + if (!p_149727_5_.capabilities.isCreativeMode) + { + ItemStack itemstack1 = new ItemStack(Items.potionitem, 1, 0); + + if (!p_149727_5_.inventory.addItemStackToInventory(itemstack1)) + { + p_149727_1_.spawnEntityInWorld(new EntityItem(p_149727_1_, p_149727_2_ + 0.5D, p_149727_3_ + 1.5D, p_149727_4_ + 0.5D, itemstack1)); + } + else if (p_149727_5_ instanceof EntityPlayerMP) + { + ((EntityPlayerMP) p_149727_5_).sendContainerToPlayer(p_149727_5_.inventoryContainer); + } + + --itemstack.stackSize; + + if (itemstack.stackSize <= 0) + { + p_149727_5_.inventory.setInventorySlotContents(p_149727_5_.inventory.currentItem, (ItemStack) null); + } + } + + this.func_150024_a(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, j1 - 1); + } + } + else if (j1 > 0 && itemstack.getItem() instanceof ItemArmor && ((ItemArmor) itemstack.getItem()).getArmorMaterial() == ItemArmor.ArmorMaterial.CLOTH) + { + ItemArmor itemarmor = (ItemArmor) itemstack.getItem(); + itemarmor.removeColor(itemstack); + this.func_150024_a(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, j1 - 1); + return true; + } + + return false; + } + } + } + } + + public void func_150024_a(World p_150024_1_, int p_150024_2_, int p_150024_3_, int p_150024_4_, int p_150024_5_) + { + p_150024_1_.setBlockMetadataWithNotify(p_150024_2_, p_150024_3_, p_150024_4_, MathHelper.clamp_int(p_150024_5_, 0, 3), 2); + p_150024_1_.func_147453_f(p_150024_2_, p_150024_3_, p_150024_4_, this); + } + + /** + * currently only used by BlockCauldron to incrament meta-data during rain + */ + @Override + public void fillWithRain(World p_149639_1_, int p_149639_2_, int p_149639_3_, int p_149639_4_) + { + if (p_149639_1_.rand.nextInt(20) == 1) + { + int l = p_149639_1_.getBlockMetadata(p_149639_2_, p_149639_3_, p_149639_4_); + + if (l < 3) + { + p_149639_1_.setBlockMetadataWithNotify(p_149639_2_, p_149639_3_, p_149639_4_, l + 1, 2); + } + } + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + { + return Items.cauldron; + } + + /** + * Gets an item for the block being called on. Args: world, x, y, z + */ + @Override + @SideOnly(Side.CLIENT) + public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) + { + return Items.cauldron; + } + + /** + * If this returns true, then comparators facing away from this block will use the value from + * getComparatorInputOverride instead of the actual redstone signal strength. + */ + @Override + public boolean hasComparatorInputOverride() + { + return true; + } + + /** + * If hasComparatorInputOverride returns true, the return value from this is used instead of the redstone signal + * strength when this block inputs to a comparator. + */ + @Override + public int getComparatorInputOverride(World p_149736_1_, int p_149736_2_, int p_149736_3_, int p_149736_4_, int p_149736_5_) + { + int i1 = p_149736_1_.getBlockMetadata(p_149736_2_, p_149736_3_, p_149736_4_); + return func_150027_b(i1); + } + + public static int func_150027_b(int p_150027_0_) + { + return p_150027_0_; + } + + @SideOnly(Side.CLIENT) + public static float getRenderLiquidLevel(int p_150025_0_) + { + int j = MathHelper.clamp_int(p_150025_0_, 0, 3); + return (6 + 3 * j) / 16.0F; + } + +} diff --git a/src/main/java/shift/sextiarysector/Config.java b/src/main/java/shift/sextiarysector/Config.java index 4975aad..63c2df2 100644 --- a/src/main/java/shift/sextiarysector/Config.java +++ b/src/main/java/shift/sextiarysector/Config.java @@ -31,6 +31,7 @@ public class Config { public static boolean modCleaver; public static boolean modFMP; public static boolean modRF; + public static boolean modTC; public static void ConfigRead(FMLPreInitializationEvent event) { @@ -86,6 +87,7 @@ public static void configForPlugin(Configuration cfg) { modCleaver = cfg.getBoolean("Cleaver", "general", true, ""); modFMP = cfg.getBoolean("ForgeMultipart", "general", true, ""); modRF = cfg.getBoolean("RF", "general", true, ""); + modTC = cfg.getBoolean("Thaumcraft", "general", true, ""); } diff --git a/src/main/java/shift/sextiarysector/SSAchievement.java b/src/main/java/shift/sextiarysector/SSAchievement.java index b2c166a..430cba9 100644 --- a/src/main/java/shift/sextiarysector/SSAchievement.java +++ b/src/main/java/shift/sextiarysector/SSAchievement.java @@ -115,7 +115,7 @@ public class SSAchievement { public static void initAchievements() { moisture = new AchievementBase("moisture", 3, -1, new ItemStack(Items.water_bucket), (Achievement) null, core).initIndependentStat().registerStat(); - bottle = new AchievementCraft("bottle", 1, 1, new ItemStack(SSItems.emptyBottle), AchievementList.buildWorkBench, core).registerStat(); + bottle = new AchievementCraft("bottle", 1, 1, new ItemStack(Items.glass_bottle), AchievementList.buildWorkBench, core).registerStat(); drinkingWater = new AchievementFurnace("drinking_water", 3, 1, new ItemStack(SSItems.drinkingWaterBottle), bottle, core).registerStat(); craftFurnace = new AchievementCraft("craft_furnace", -2, -1, new ItemStack(SSBlocks.LargeFurnace), AchievementList.buildWorkBench, core).registerStat(); hammer = new AchievementFurnace("hammer", -4, -1, new ItemStack(SSItems.ironSpanner), craftFurnace, core).registerStat(); diff --git a/src/main/java/shift/sextiarysector/SSBlocks.java b/src/main/java/shift/sextiarysector/SSBlocks.java index 6b5bce9..76ad9c9 100644 --- a/src/main/java/shift/sextiarysector/SSBlocks.java +++ b/src/main/java/shift/sextiarysector/SSBlocks.java @@ -68,6 +68,7 @@ import shift.sextiarysector.item.ItemBlockGearShaft; import shift.sextiarysector.item.ItemBlockMeta; import shift.sextiarysector.item.ItemBlockMonitor; +import shift.sextiarysector.item.ItemBlockSSFluid; import shift.sextiarysector.tileentity.TileEntityFan; import shift.sextiarysector.tileentity.TileEntityFarmland; import shift.sextiarysector.tileentity.TileEntityFigure; @@ -406,20 +407,20 @@ public static void initBlicks() { GameRegistry.registerBlock(leafBed, "LeafBed"); //液体 - drinkingWater = new BlockSSFluid(SSFluids.springWater).setBlockName("ss.drinking_water").setCreativeTab(SextiarySectorAPI.TabSSCore); - GameRegistry.registerBlock(drinkingWater, "DrinkingWater"); + drinkingWater = new BlockSSFluid(SSFluids.springWater).setBlockName("ss.drinking_water");//.setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(drinkingWater, ItemBlockSSFluid.class, "DrinkingWater"); - hotSprings = new BlockHotSprings(SSFluids.hotSprings).setBlockName("ss.hot_springs").setCreativeTab(SextiarySectorAPI.TabSSCore); - GameRegistry.registerBlock(hotSprings, "HotSprings"); + hotSprings = new BlockHotSprings(SSFluids.hotSprings).setBlockName("ss.hot_springs");//.setCreativeTab(SextiarySectorAPI.TabSSCore); + GameRegistry.registerBlock(hotSprings, ItemBlockSSFluid.class, "HotSprings"); //season = new BlockSeasonFluid(SSFluids.season).setBlockName("ss.season").setCreativeTab(SextiarySectorAPI.TabSSCore); //GameRegistry.registerBlock(season, "Season"); //鉱石 - blueStoneOre = new BlockPowerStone().setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:ore/bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); + blueStoneOre = new BlockPowerStone(2).setBlockName("ss.blue_stone").setBlockTextureName("sextiarysector:ore/bluestone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(blueStoneOre, "BlueStoneOre"); - yellowStoneOre = new BlockPowerStone().setBlockName("ss.yellow_stone").setBlockTextureName("sextiarysector:ore/yellowstone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); + yellowStoneOre = new BlockPowerStone(2).setBlockName("ss.yellow_stone").setBlockTextureName("sextiarysector:ore/yellowstone_ore").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerBlock(yellowStoneOre, "YellowStoneOre"); copperOre = new BlockSSOre(null, 1).setBlockName("ss.copper_ore").setBlockTextureName("sextiarysector:ore/copper_ore"); diff --git a/src/main/java/shift/sextiarysector/SSCreativeTabs.java b/src/main/java/shift/sextiarysector/SSCreativeTabs.java index 5fca74b..9e2d361 100644 --- a/src/main/java/shift/sextiarysector/SSCreativeTabs.java +++ b/src/main/java/shift/sextiarysector/SSCreativeTabs.java @@ -9,7 +9,7 @@ public class SSCreativeTabs { - public static void initCreativeTabs(){ + public static void initCreativeTabs() { SextiarySectorAPI.TabSSCore = new CreativeTabSSCore(); SextiarySectorAPI.TabSSFluid = new CreativeTabSSFluid(); @@ -25,7 +25,7 @@ public static void initCreativeTabs(){ } - private static class CreativeTabSSCore extends CreativeTabs{ + private static class CreativeTabSSCore extends CreativeTabs { public CreativeTabSSCore() { super("ss.core"); @@ -36,15 +36,16 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSBlocks.LargeFurnace,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSBlocks.LargeFurnace, 1); + } } - private static class CreativeTabSSFluid extends CreativeTabs{ + private static class CreativeTabSSFluid extends CreativeTabs { public CreativeTabSSFluid() { super("ss.fluid"); @@ -55,15 +56,16 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSItems.emptyBottle,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.lavaBottle, 1); + } } - private static class CreativeTabSSPlayer extends CreativeTabs{ + private static class CreativeTabSSPlayer extends CreativeTabs { public CreativeTabSSPlayer() { super("ss.player"); @@ -74,15 +76,16 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSItems.ironRing,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.ironRing, 1); + } } - private static class CreativeTabSSAgriculture extends CreativeTabs{ + private static class CreativeTabSSAgriculture extends CreativeTabs { public CreativeTabSSAgriculture() { super("ss.agriculture"); @@ -93,15 +96,16 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSBlocks.turnip,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSBlocks.turnip, 1); + } } - private static class CreativeTabSSFishery extends CreativeTabs{ + private static class CreativeTabSSFishery extends CreativeTabs { public CreativeTabSSFishery() { super("ss.fishery"); @@ -112,15 +116,16 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSItems.laver,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.laver, 1); + } } - private static class CreativeTabSSMining extends CreativeTabs{ + private static class CreativeTabSSMining extends CreativeTabs { public CreativeTabSSMining() { super("ss.mining"); @@ -131,15 +136,16 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSBlocks.ironLargeOre,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSBlocks.ironLargeOre, 1); + } } - private static class CreativeTabSSIndustry extends CreativeTabs{ + private static class CreativeTabSSIndustry extends CreativeTabs { public CreativeTabSSIndustry() { super("ss.industry"); @@ -150,16 +156,16 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSBlocks.woodShaft,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSBlocks.woodShaft, 1); + } } - - private static class CreativeTabSSCooking extends CreativeTabs{ + private static class CreativeTabSSCooking extends CreativeTabs { public CreativeTabSSCooking() { super("ss.cooking"); @@ -170,15 +176,16 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSItems.ironKnife,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.ironKnife, 1); + } } - private static class CreativeTabSSTransport extends CreativeTabs{ + private static class CreativeTabSSTransport extends CreativeTabs { public CreativeTabSSTransport() { super("ss.transport"); @@ -189,16 +196,16 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSItems.mineboatChest,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.mineboatChest, 1); + } } - - private static class CreativeTabSSEconomy extends CreativeTabs{ + private static class CreativeTabSSEconomy extends CreativeTabs { public CreativeTabSSEconomy() { super("ss.economy"); @@ -209,15 +216,16 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSBlocks.creeperChest,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSBlocks.creeperChest, 1); + } } - private static class CreativeTabSSMagic extends CreativeTabs{ + private static class CreativeTabSSMagic extends CreativeTabs { public CreativeTabSSMagic() { super("ss.magic"); @@ -228,11 +236,12 @@ public Item getTabIconItem() { return null;//SSBlocks.LargeFurnace.g; } + @Override @SideOnly(Side.CLIENT) - public ItemStack getIconItemStack() - { - return new ItemStack(SSItems.magicDust,1); - } + public ItemStack getIconItemStack() + { + return new ItemStack(SSItems.magicDust, 1); + } } diff --git a/src/main/java/shift/sextiarysector/SSFluids.java b/src/main/java/shift/sextiarysector/SSFluids.java index dc99d7e..075b087 100644 --- a/src/main/java/shift/sextiarysector/SSFluids.java +++ b/src/main/java/shift/sextiarysector/SSFluids.java @@ -65,12 +65,16 @@ public static void postFluids() { FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(i), new ItemStack(SSBlocks.fluidCrafter, 1, i), new ItemStack(SSBlocks.fluidCrafter, 1, 0)); } - FluidContainerRegistry.registerFluidContainer(FluidRegistry.WATER, new ItemStack(SSItems.waterBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); - FluidContainerRegistry.registerFluidContainer(FluidRegistry.LAVA, new ItemStack(SSItems.lavaBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); + FluidContainerRegistry.registerFluidContainer(FluidRegistry.WATER, new ItemStack(SSItems.waterBottle, 1), FluidContainerRegistry.EMPTY_BOTTLE); + FluidContainerRegistry.registerFluidContainer(FluidRegistry.LAVA, new ItemStack(SSItems.lavaBottle, 1), FluidContainerRegistry.EMPTY_BOTTLE); - FluidContainerRegistry.registerFluidContainer(takumiTea, new ItemStack(SSItems.takumiTeaBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); - FluidContainerRegistry.registerFluidContainer(drinkingWater, new ItemStack(SSItems.drinkingWaterBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); - FluidContainerRegistry.registerFluidContainer(sap, new ItemStack(SSItems.sapBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); + //FluidContainerRegistry.registerFluidContainer(takumiTea, new ItemStack(SSItems.takumiTeaBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); + //FluidContainerRegistry.registerFluidContainer(drinkingWater, new ItemStack(SSItems.drinkingWaterBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); + //FluidContainerRegistry.registerFluidContainer(sap, new ItemStack(SSItems.sapBottle, 1), new ItemStack(SSItems.emptyBottle, 1)); + + FluidContainerRegistry.registerFluidContainer(takumiTea, new ItemStack(SSItems.takumiTeaBottle, 1), FluidContainerRegistry.EMPTY_BOTTLE); + FluidContainerRegistry.registerFluidContainer(drinkingWater, new ItemStack(SSItems.drinkingWaterBottle, 1), FluidContainerRegistry.EMPTY_BOTTLE); + FluidContainerRegistry.registerFluidContainer(sap, new ItemStack(SSItems.sapBottle, 1), FluidContainerRegistry.EMPTY_BOTTLE); FluidContainerRegistry.registerFluidContainer(steam, new ItemStack(SSItems.steamBucket, 1), new ItemStack(Items.bucket, 1)); FluidContainerRegistry.registerFluidContainer(iron, new ItemStack(SSItems.ironFluidBucket, 1), new ItemStack(Items.bucket, 1)); diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index b8141b9..720a71e 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -71,6 +71,8 @@ public class SSItems { public static Item orichalcumGFStorage; //hammer + public static Item hammer; + public static Item ironSpanner; public static Item colorSpray; @@ -109,6 +111,8 @@ public class SSItems { public static Item steelNugget; public static Item ninjaNugget; + public static Item obsidianNugget; + public static Item steelIngot; public static Item brassIngot; @@ -366,9 +370,13 @@ public static void initItems() { GameRegistry.registerItem(orichalcumGFStorage, "OrichalcumGFStorage"); //ハンマー + //hammer = new ItemHammer().setUnlocalizedName("ss.iron_spanner").setTextureName("sextiarysector:gearforce/iron_spanner").setCreativeTab(SextiarySectorAPI.TabSSIndustry); + ironSpanner = new ItemHammer().setUnlocalizedName("ss.iron_spanner").setTextureName("sextiarysector:gearforce/iron_spanner").setCreativeTab(SextiarySectorAPI.TabSSIndustry); GameRegistry.registerItem(ironSpanner, "IronSpanner"); + hammer = ironSpanner; + colorSpray = new ItemSpray().setUnlocalizedName("ss.color_spray").setTextureName("sextiarysector:fluid/color_spray").setCreativeTab(SextiarySectorAPI.TabSSCore); GameRegistry.registerItem(colorSpray, "ColorSpray"); @@ -440,6 +448,11 @@ public static void initItems() { ninjaNugget = new Item().setUnlocalizedName("ss.ninja_nugget").setTextureName("sextiarysector:nugget/ninja_nugget").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(ninjaNugget, "NinjaNugget"); + obsidianNugget = new Item().setUnlocalizedName("ss.obsidian_nugget").setTextureName("sextiarysector:nugget/obsidian_nugget").setCreativeTab(SextiarySectorAPI.TabSSMining); + GameRegistry.registerItem(obsidianNugget, "ObsidianNugget"); + + //ナゲット 特殊 + //インゴット steelIngot = new Item().setUnlocalizedName("ss.steel_ingot").setTextureName("sextiarysector:ingot/steel_ingot").setCreativeTab(SextiarySectorAPI.TabSSMining); GameRegistry.registerItem(steelIngot, "SteelIngot"); diff --git a/src/main/java/shift/sextiarysector/SSOreDictionary.java b/src/main/java/shift/sextiarysector/SSOreDictionary.java index dbbd181..b8b7b01 100644 --- a/src/main/java/shift/sextiarysector/SSOreDictionary.java +++ b/src/main/java/shift/sextiarysector/SSOreDictionary.java @@ -92,6 +92,8 @@ public static void init() { OreDictionary.registerOre("nuggetSteel", SSItems.steelNugget); OreDictionary.registerOre("nuggetNinja", SSItems.ninjaNugget); + OreDictionary.registerOre("nuggetObsidian", SSItems.obsidianNugget); + OreDictionary.registerOre("ingotSteel", SSItems.steelIngot); OreDictionary.registerOre("ingotBrass", SSItems.brassIngot); OreDictionary.registerOre("ingotBluestone", SSItems.blueStoneIngot); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index b26f4ee..9e0c4af 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -5,7 +5,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import shift.mceconomy2.gui.HUDMP; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.api.gearforce.item.GearForceItemAPI; import shift.sextiarysector.item.GearForceItemManager; @@ -38,7 +37,7 @@ public class SextiarySector { public static final String MODID = "SextiarySector"; - public static final String VERSION = "2.4.2"; + public static final String VERSION = "2.4.3"; @Mod.Instance("SextiarySector") public static SextiarySector instance; @@ -127,9 +126,9 @@ public void init(FMLInitializationEvent event) SSWorld.init(event); - if (event.getSide().isClient()) { - HUDMP.left_height += 10; - } + //if (event.getSide().isClient()) { + // HUDMP.left_height += 10; + //} SSRecipes.initRecipes(); diff --git a/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java b/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java index 11981d5..75b6a87 100644 --- a/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java +++ b/src/main/java/shift/sextiarysector/api/event/VanillaFoodHandler.java @@ -43,7 +43,7 @@ public void onPlayerEatenEvent(PlayerEatenEvent event) { if (food.getItem() == Items.cooked_chicken) { - SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 9.2f); + SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 7.2f); SextiarySectorAPI.playerManager.addStaminaStats(player, 4, 2); } @@ -55,7 +55,7 @@ public void onPlayerEatenEvent(PlayerEatenEvent event) { if (food.getItem() == Items.cooked_porkchop) { - SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 12.2f); + SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 8.2f); SextiarySectorAPI.playerManager.addStaminaStats(player, 5, 1); } @@ -67,7 +67,7 @@ public void onPlayerEatenEvent(PlayerEatenEvent event) { if (food.getItem() == Items.cooked_beef) { - SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 16.2f); + SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 10.2f); SextiarySectorAPI.playerManager.addStaminaStats(player, 7, 4); } @@ -81,28 +81,28 @@ public void onPlayerEatenEvent(PlayerEatenEvent event) { if (food.getItem() == Items.cooked_fished) { - SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 6.2f); + SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 5.2f); SextiarySectorAPI.playerManager.addStaminaStats(player, 6, 2); } //リンゴ if (food.getItem() == Items.apple) { - SextiarySectorAPI.playerManager.addMoistureStats(player, 1, 1.0f); + SextiarySectorAPI.playerManager.addMoistureStats(player, 1, 0.3f); } //スイカ if (food.getItem() == Items.melon) { - SextiarySectorAPI.playerManager.addMoistureStats(player, 3, 1.0f); + SextiarySectorAPI.playerManager.addMoistureStats(player, 1, 1.0f); } //パン if (food.getItem() == Items.bread) { - SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 6.8f); + SextiarySectorAPI.playerManager.addMoistureExhaustion(player, 5.2f); SextiarySectorAPI.playerManager.addStaminaStats(player, 4, 4); } diff --git a/src/main/java/shift/sextiarysector/asm/CauldronTransformer.java b/src/main/java/shift/sextiarysector/asm/CauldronTransformer.java new file mode 100644 index 0000000..cea9cee --- /dev/null +++ b/src/main/java/shift/sextiarysector/asm/CauldronTransformer.java @@ -0,0 +1,134 @@ +package shift.sextiarysector.asm; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; + +import net.minecraft.launchwrapper.IClassTransformer; + +import org.objectweb.asm.Opcodes; + +public class CauldronTransformer implements IClassTransformer, Opcodes +{ + // 改変対象のクラスの完全修飾名です。 + // 後述でMinecraft.jar内の難読化されるファイルを対象とする場合の簡易な取得方法を紹介します。 + private static final String TARGET_CLASS_NAME = "net.minecraft.block.BlockCauldron"; + + // クラスがロードされる際に呼び出されるメソッドです。 + @Override + public byte[] transform(String name, String transformedName, byte[] basicClass) + { + // FMLRelauncher.side() : Client/Server どちらか一方のを対象とする場合や、 + // 一つのMODで Client/Sever 両方に対応したMODで、この値を判定して処理を変える事ができます。 + // 今回は"CLIENT"と比較し、Client側のファイルを対象としている例です。 + // Client側専用のMODとして公開するのであれば、判定は必須ではありません。 + + // name : 現在ロードされようとしているクラス名が格納されています。 + if (!transformedName.equals(TARGET_CLASS_NAME)) + { + // 処理対象外なので何もしない + return basicClass; + } + + try + { + // -------------------------------------------------------------- + // クラスファイル丸ごと差し替える場合 + // -------------------------------------------------------------- + return replaceClass(basicClass); + + // -------------------------------------------------------------- + // ASMを使用し、既存のクラスファイルに改変を施す場合。 + // -------------------------------------------------------------- + // return hookDoRenderLivingMethod(bytes); + + } catch (Exception e) + { + throw new RuntimeException("failed : TutorialTransformer loading", e); + } + } + + // 下記の想定で実装されています。 + // 対象クラスの bytes を ModifiedTargetClass.class ファイルに置き換える + private byte[] replaceClass(byte[] bytes) throws IOException + { + ZipFile zf = null; + InputStream zi = null; + + File f = null; + + try + { + + if (SSCore.location.isDirectory()) { + + f = new File(SSCore.location, "./net/minecraft/block/BlockCauldron.class"); + + if (f != null) + { + + zi = new FileInputStream(f); + int len = (int) f.length(); + bytes = new byte[len]; + + // ヒープサイズを超えないように、ストリームからファイルを1024ずつ読み込んで bytes に格納する + int MAX_READ = 1024; + int readed = 0, readsize, ret; + while (readed < len) { + readsize = MAX_READ; + if (len - readed < MAX_READ) { + readsize = len - readed; + } + ret = zi.read(bytes, readed, readsize); + if (ret == -1) break; + readed += ret; + } + } + + } else { + + zf = new ZipFile(SSCore.location); + + // 差し替え後のファイルです。coremodのjar内のパスを指定します。 + ZipEntry ze = zf.getEntry("BlockSSCauldron.class"); + + if (ze != null) + { + zi = zf.getInputStream(ze); + int len = (int) ze.getSize(); + bytes = new byte[len]; + + // ヒープサイズを超えないように、ストリームからファイルを1024ずつ読み込んで bytes に格納する + int MAX_READ = 1024; + int readed = 0, readsize, ret; + while (readed < len) { + readsize = MAX_READ; + if (len - readed < MAX_READ) { + readsize = len - readed; + } + ret = zi.read(bytes, readed, readsize); + if (ret == -1) break; + readed += ret; + } + } + + } + + return bytes; + } finally + { + if (zi != null) + { + zi.close(); + } + + if (zf != null) + { + zf.close(); + } + } + } +} diff --git a/src/main/java/shift/sextiarysector/asm/DepLoader.java b/src/main/java/shift/sextiarysector/asm/DepLoader.java index e53306a..412bcd6 100644 --- a/src/main/java/shift/sextiarysector/asm/DepLoader.java +++ b/src/main/java/shift/sextiarysector/asm/DepLoader.java @@ -57,7 +57,6 @@ import cpw.mods.fml.relauncher.FMLInjectionData; import cpw.mods.fml.relauncher.FMLLaunchHandler; import cpw.mods.fml.relauncher.IFMLCallHook; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -65,7 +64,7 @@ * The majority of this source code was created by FML staff and chickenbone. * My work is not nearly. */ -public class DepLoader implements IFMLLoadingPlugin, IFMLCallHook { +public class DepLoader implements IFMLCallHook { private static ByteBuffer downloadBuffer = ByteBuffer.allocateDirect(1 << 23); private static final String owner = "SS2's DepLoader";//"CB's DepLoader"; private static DepLoadInst inst; @@ -542,7 +541,7 @@ private void load(Dependency dep) { private List modFiles() { List list = new LinkedList(); list.addAll(Arrays.asList(modsDir.listFiles())); - list.add(new File(eclipse_modDir, "ss.zip"));//SS2用の処理 + //list.add(new File(eclipse_modDir, "ss.zip"));//SS2用の処理 list.addAll(Arrays.asList(v_modsDir.listFiles())); return list; } @@ -644,33 +643,14 @@ public static void load() { } @Override - public String[] getASMTransformerClass() { - return null; - } - - @Override - public String getModContainerClass() { + public Void call() throws Exception { + load(); return null; } - @Override - public String getSetupClass() { - return getClass().getName(); - } - @Override public void injectData(Map data) { - } - - @Override - public Void call() { - load(); - return null; } - @Override - public String getAccessTransformerClass() { - return null; - } } \ No newline at end of file diff --git a/src/main/java/shift/sextiarysector/asm/SSBottle.java b/src/main/java/shift/sextiarysector/asm/SSBottle.java new file mode 100644 index 0000000..6f25cc2 --- /dev/null +++ b/src/main/java/shift/sextiarysector/asm/SSBottle.java @@ -0,0 +1,5 @@ +package shift.sextiarysector.asm; + +public class SSBottle { + +} diff --git a/src/main/java/shift/sextiarysector/asm/SSCore.java b/src/main/java/shift/sextiarysector/asm/SSCore.java new file mode 100644 index 0000000..cf3a864 --- /dev/null +++ b/src/main/java/shift/sextiarysector/asm/SSCore.java @@ -0,0 +1,56 @@ +package shift.sextiarysector.asm; + +import java.io.File; +import java.util.Map; + +import cpw.mods.fml.relauncher.IFMLCallHook; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin; + +public class SSCore implements IFMLLoadingPlugin, IFMLCallHook { + + static File location; + + @Override + public String[] getASMTransformerClass() { + return new String[] { "shift.sextiarysector.asm.TransformerBottle" }; + } + + @Override + public String getModContainerClass() { + return null; + } + + @Override + public String getSetupClass() { + return DepLoader.class.getName(); + } + + @Override + public void injectData(Map data) { + if (data.containsKey("coremodLocation")) + { + location = (File) data.get("coremodLocation"); + } + + if (location == null) { + + location = new File((File) data.get("mcLocation"), "../bin"); + + location.mkdir(); + + } + } + + @Override + public Void call() { + //DepLoader.load(); + + return null; + } + + @Override + public String getAccessTransformerClass() { + return null; + } + +} diff --git a/src/main/java/shift/sextiarysector/asm/TransformerBottle.java b/src/main/java/shift/sextiarysector/asm/TransformerBottle.java new file mode 100644 index 0000000..2e686b9 --- /dev/null +++ b/src/main/java/shift/sextiarysector/asm/TransformerBottle.java @@ -0,0 +1,124 @@ +package shift.sextiarysector.asm; + +import net.minecraft.launchwrapper.IClassTransformer; + +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Opcodes; +import org.objectweb.asm.tree.ClassNode; +import org.objectweb.asm.tree.InsnList; +import org.objectweb.asm.tree.InsnNode; +import org.objectweb.asm.tree.MethodInsnNode; +import org.objectweb.asm.tree.MethodNode; +import org.objectweb.asm.tree.VarInsnNode; + +import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; + +public class TransformerBottle implements IClassTransformer, Opcodes +{ + // 改変対象のクラスの完全修飾名です。 + // 後述でMinecraft.jar内の難読化されるファイルを対象とする場合の簡易な取得方法を紹介します。 + private static final String TARGET_CLASS_NAME = "net.minecraft.item.ItemGlassBottle"; + + // クラスがロードされる際に呼び出されるメソッドです。 + @Override + public byte[] transform(String name, String transformedName, byte[] basicClass) + { + // FMLRelauncher.side() : Client/Server どちらか一方のを対象とする場合や、 + // 一つのMODで Client/Sever 両方に対応したMODで、この値を判定して処理を変える事ができます。 + // 今回は"CLIENT"と比較し、Client側のファイルを対象としている例です。 + // Client側専用のMODとして公開するのであれば、判定は必須ではありません。 + + // name : 現在ロードされようとしているクラス名が格納されています。 + if (!transformedName.equals(TARGET_CLASS_NAME)) + { + + // 処理対象外なので何もしない + return basicClass; + } + + try + { + // -------------------------------------------------------------- + // ASMを使用し、既存のクラスファイルに改変を施す場合。 + // -------------------------------------------------------------- + return hookOnItemRightClick(name, basicClass); + + } catch (Exception e) + { + throw new RuntimeException("failed : TransformerBottle loading", e); + } + } + + // 下記の想定で実装されています。 + // EntityLiving.class の doRenderLiving の先頭に + // tutorial/test.class の passTestRender(EntityLiving, double, double, double)メソッドの呼び出しを追加する。 + private byte[] hookOnItemRightClick(String className, byte[] bytes) + { + // ASMで、bytesに格納されたクラスファイルを解析します。 + ClassNode cnode = new ClassNode(); + ClassReader reader = new ClassReader(bytes); + reader.accept(cnode, 0); + + // 改変対象のメソッド名です + String targetMethodName = "onItemRightClick"; + String targetMethodNameSRG = "func_77659_a"; + + // 改変対象メソッドの戻り値型および、引数型をあらわします ※1 + String targetMethoddesc = "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/EntityPlayer;)Lnet/minecraft/item/ItemStack;"; + String targetMethoddescSRG = "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/EntityPlayer;)Lnet/minecraft/item/ItemStack;"; + + // 対象のメソッドを検索取得します。 + MethodNode mnode = null; + + String mdesc = null; + + for (MethodNode curMnode : cnode.methods) + { + + String mName = FMLDeobfuscatingRemapper.INSTANCE.mapMethodName(className, curMnode.name, curMnode.desc); + String mdName = FMLDeobfuscatingRemapper.INSTANCE.mapMethodDesc(curMnode.desc); + System.out.println("[ " + mName + " : " + curMnode.name + " ] [ " + mdName + " : " + curMnode.desc); + if ((targetMethodName.equals(curMnode.name) && targetMethoddesc.equals(curMnode.desc)) || (targetMethodNameSRG.equals(mName) && targetMethoddescSRG.equals(mdName))) + { + mnode = curMnode; + mdesc = curMnode.desc; + break; + } + } + + if (mnode != null) + { + + InsnList overrideList = new InsnList(); + + // メソッドコールを、バイトコードであらわした例です。 + + overrideList.add(new VarInsnNode(ALOAD, 1)); + overrideList.add(new VarInsnNode(ALOAD, 2)); + overrideList.add(new VarInsnNode(ALOAD, 3)); + overrideList.add(new MethodInsnNode(INVOKESTATIC, + "shift/sextiarysector/asm/vanilla/BottleMethod", + "onBottleRightClick", + mdesc + , false)); + overrideList.add(new InsnNode(ARETURN)); + + // mnode.instructions.get(1)で、対象のメソッドの先頭を取得 + // mnode.instructions.insertで、指定した位置にバイトコードを挿入します。 + mnode.instructions.insert(mnode.instructions.get(1), overrideList); + + //mnode.maxLocals = 4; + + // 改変したクラスファイルをバイト列に書き出します + ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS); + cnode.accept(cw); + bytes = cw.toByteArray(); + + System.out.println("bbbb"); + } + + return bytes; + } + +} diff --git a/src/main/java/shift/sextiarysector/asm/vanilla/BottleMethod.java b/src/main/java/shift/sextiarysector/asm/vanilla/BottleMethod.java new file mode 100644 index 0000000..50461af --- /dev/null +++ b/src/main/java/shift/sextiarysector/asm/vanilla/BottleMethod.java @@ -0,0 +1,131 @@ +package shift.sextiarysector.asm.vanilla; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.SSItems; + +public class BottleMethod { + + public static ItemStack onBottleRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) + { + + MovingObjectPosition movingobjectposition = getMovingObjectPositionFromPlayer(p_77659_2_, p_77659_3_, true); + + if (movingobjectposition == null) + { + return p_77659_1_; + } + else + { + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!p_77659_2_.canMineBlock(p_77659_3_, i, j, k)) + { + return p_77659_1_; + } + + if (!p_77659_3_.canPlayerEdit(i, j, k, movingobjectposition.sideHit, p_77659_1_)) + { + return p_77659_1_; + } + + Block block = p_77659_2_.getBlock(i, j, k); + + if (block == Blocks.water) + { + + --p_77659_1_.stackSize; + + if (p_77659_1_.stackSize <= 0) + { + return new ItemStack(Items.potionitem); + } + + if (!p_77659_3_.inventory.addItemStackToInventory(new ItemStack(Items.potionitem))) + { + p_77659_3_.dropPlayerItemWithRandomChoice(new ItemStack(Items.potionitem, 1, 0), false); + } + + } + + if (block == Blocks.lava) { + + --p_77659_1_.stackSize; + + p_77659_2_.setBlockToAir(i, j, k); + + if (p_77659_1_.stackSize <= 0) + { + return new ItemStack(SSItems.lavaBottle); + } + + if (!p_77659_3_.inventory.addItemStackToInventory(new ItemStack(SSItems.lavaBottle))) + { + p_77659_3_.dropPlayerItemWithRandomChoice(new ItemStack(SSItems.lavaBottle, 1, 0), false); + } + + } + + if (block == SSBlocks.drinkingWater) { + + --p_77659_1_.stackSize; + + //p_77659_2_.setBlockToAir(i, j, k); + + if (p_77659_1_.stackSize <= 0) + { + return new ItemStack(SSItems.drinkingWaterBottle); + } + + if (!p_77659_3_.inventory.addItemStackToInventory(new ItemStack(SSItems.drinkingWaterBottle))) + { + p_77659_3_.dropPlayerItemWithRandomChoice(new ItemStack(SSItems.drinkingWaterBottle, 1, 0), false); + } + + } + + } + + return p_77659_1_; + } + + } + + protected static MovingObjectPosition getMovingObjectPositionFromPlayer(World p_77621_1_, EntityPlayer p_77621_2_, boolean p_77621_3_) + { + float f = 1.0F; + float f1 = p_77621_2_.prevRotationPitch + (p_77621_2_.rotationPitch - p_77621_2_.prevRotationPitch) * f; + float f2 = p_77621_2_.prevRotationYaw + (p_77621_2_.rotationYaw - p_77621_2_.prevRotationYaw) * f; + double d0 = p_77621_2_.prevPosX + (p_77621_2_.posX - p_77621_2_.prevPosX) * f; + double d1 = p_77621_2_.prevPosY + (p_77621_2_.posY - p_77621_2_.prevPosY) * f + (p_77621_1_.isRemote ? p_77621_2_.getEyeHeight() - p_77621_2_.getDefaultEyeHeight() : p_77621_2_.getEyeHeight()); // isRemote check to revert changes to ray trace position due to adding the eye height clientside and player yOffset differences + double d2 = p_77621_2_.prevPosZ + (p_77621_2_.posZ - p_77621_2_.prevPosZ) * f; + Vec3 vec3 = Vec3.createVectorHelper(d0, d1, d2); + float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI); + float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI); + float f5 = -MathHelper.cos(-f1 * 0.017453292F); + float f6 = MathHelper.sin(-f1 * 0.017453292F); + float f7 = f4 * f5; + float f8 = f3 * f5; + double d3 = 5.0D; + if (p_77621_2_ instanceof EntityPlayerMP) + { + d3 = ((EntityPlayerMP) p_77621_2_).theItemInWorldManager.getBlockReachDistance(); + } + Vec3 vec31 = vec3.addVector(f7 * d3, f6 * d3, f8 * d3); + return p_77621_1_.func_147447_a(vec3, vec31, p_77621_3_, !p_77621_3_, false); + } + +} diff --git a/src/main/java/shift/sextiarysector/block/BlockLargeOre.java b/src/main/java/shift/sextiarysector/block/BlockLargeOre.java index d873ed2..1f96fce 100644 --- a/src/main/java/shift/sextiarysector/block/BlockLargeOre.java +++ b/src/main/java/shift/sextiarysector/block/BlockLargeOre.java @@ -4,29 +4,23 @@ import java.util.Random; import net.minecraft.block.Block; -import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import shift.sextiarysector.SextiarySector; -import shift.sextiarysector.api.SextiarySectorAPI; -public class BlockLargeOre extends Block { +public class BlockLargeOre extends BlockSSOreBase { private final Item oreItem; private final Block oreBlock; public BlockLargeOre(Item item, Block block, int level) { - super(Material.rock); + super(level); this.oreItem = item; this.oreBlock = block; - this.setHarvestLevel("pickaxe", level); this.setResistance(5.0F); - this.setStepSound(Block.soundTypeStone); this.setHardness(3.0F); - this.setCreativeTab(SextiarySectorAPI.TabSSMining); } @Override @@ -85,10 +79,4 @@ protected boolean canSilkHarvest() return false; } - @Override - public int getRenderType() - { - return SextiarySector.proxy.oreStoneType; - } - } diff --git a/src/main/java/shift/sextiarysector/block/BlockPowerStone.java b/src/main/java/shift/sextiarysector/block/BlockPowerStone.java index 32c5269..53a9d4c 100644 --- a/src/main/java/shift/sextiarysector/block/BlockPowerStone.java +++ b/src/main/java/shift/sextiarysector/block/BlockPowerStone.java @@ -2,8 +2,6 @@ import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -11,17 +9,15 @@ import net.minecraft.world.World; import shift.sextiarysector.SSBlocks; import shift.sextiarysector.SSItems; -import shift.sextiarysector.SextiarySector; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockPowerStone extends Block { +public class BlockPowerStone extends BlockSSOreBase { - public BlockPowerStone() { - super(Material.rock); + public BlockPowerStone(int level) { + super(level); this.setTickRandomly(true); this.setResistance(5.0F); - this.setStepSound(Block.soundTypeStone); this.setHardness(3.0F); } @@ -180,9 +176,10 @@ private void sparkle(World par1World, int par2, int par3, int par4) } @Override - public int getRenderType() + public boolean isToolEffective(String type, int metadata) { - return SextiarySector.proxy.oreStoneType; + if ("pickaxe".equals(type)) return false; + return super.isToolEffective(type, metadata); } } diff --git a/src/main/java/shift/sextiarysector/block/BlockSSFluid.java b/src/main/java/shift/sextiarysector/block/BlockSSFluid.java index 5bd6e6d..d66e4c9 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSSFluid.java +++ b/src/main/java/shift/sextiarysector/block/BlockSSFluid.java @@ -8,6 +8,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; +import shift.sextiarysector.api.SextiarySectorAPI; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -17,6 +18,7 @@ public class BlockSSFluid extends BlockFluidClassic { public BlockSSFluid(Fluid fluid) { super(fluid, Material.water); + this.setCreativeTab(SextiarySectorAPI.TabSSFluid); } @Override diff --git a/src/main/java/shift/sextiarysector/block/BlockSSOre.java b/src/main/java/shift/sextiarysector/block/BlockSSOre.java index 53a5cc4..b6fa40d 100644 --- a/src/main/java/shift/sextiarysector/block/BlockSSOre.java +++ b/src/main/java/shift/sextiarysector/block/BlockSSOre.java @@ -2,24 +2,20 @@ import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; import net.minecraft.item.Item; -import shift.sextiarysector.SextiarySector; -import shift.sextiarysector.api.SextiarySectorAPI; +import net.minecraft.util.IIcon; -public class BlockSSOre extends Block { +public class BlockSSOre extends BlockSSOreBase { private final Item oreItem; + public IIcon stone; + public BlockSSOre(Item item, int level) { - super(Material.rock); + super(level); this.oreItem = item; - this.setHarvestLevel("pickaxe", level); this.setResistance(5.0F); - this.setStepSound(Block.soundTypeStone); this.setHardness(3.0F); - this.setCreativeTab(SextiarySectorAPI.TabSSMining); } @Override @@ -28,10 +24,4 @@ public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) return oreItem != null ? this.oreItem : super.getItemDropped(p_149650_1_, p_149650_2_, p_149650_3_); } - @Override - public int getRenderType() - { - return SextiarySector.proxy.oreStoneType; - } - } diff --git a/src/main/java/shift/sextiarysector/block/BlockSSOreBase.java b/src/main/java/shift/sextiarysector/block/BlockSSOreBase.java new file mode 100644 index 0000000..b203307 --- /dev/null +++ b/src/main/java/shift/sextiarysector/block/BlockSSOreBase.java @@ -0,0 +1,61 @@ +package shift.sextiarysector.block; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.api.SextiarySectorAPI; + +public class BlockSSOreBase extends Block { + + public IIcon stone; + + public BlockSSOreBase(int level) { + super(Material.rock); + this.setHarvestLevel("pickaxe", level); + this.setStepSound(Block.soundTypeStone); + this.setCreativeTab(SextiarySectorAPI.TabSSMining); + this.useNeighborBrightness = true; + this.setLightOpacity(255); + } + + @Override + public int getRenderType() + { + return SextiarySector.proxy.oreStoneType; + } + + @Override + public boolean renderAsNormalBlock() + { + return false; + } + + @Override + public boolean isNormalCube(IBlockAccess world, int x, int y, int z) + { + return true;//getMaterial().isOpaque() && renderAsNormalBlock() && !canProvidePower(); + } + + /* + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) + { + if (p_149691_2_ == 8) { + return this.blockIcon; + } + + return this.stone; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(this.getTextureName()); + this.stone = p_149651_1_.registerIcon("stone"); + }*/ + +} diff --git a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java index 42a9333..9603722 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java @@ -226,6 +226,8 @@ public void LivingSleepingEvent(PlayerWakeUpEvent event) { return; } + if (event.updateWorld) return; + if (!event.entityLiving.worldObj.isRemote) { EntityPlayer player = event.entityPlayer; @@ -235,8 +237,8 @@ public void LivingSleepingEvent(PlayerWakeUpEvent event) { } else { EntityPlayerManager.getStaminaStats(player).addStats(40, 0.0f); } - player.getFoodStats().addExhaustion(21.0f); - SextiarySectorAPI.addMoistureExhaustion(player, 21.0f); + player.getFoodStats().addExhaustion(16.3f); + SextiarySectorAPI.addMoistureExhaustion(player, 17.3f); } @@ -254,7 +256,9 @@ private void playerNoMoveEvent(EntityPlayer player) { if (player.worldObj.getTotalWorldTime() % 120 != 0) return; - if (!player.isSneaking()) return; + if (player.worldObj.rand.nextBoolean()) return; + + if (player.isSneaking()) return; StaminaStats stats = EntityPlayerManager.getStaminaStats(player); if (stats == null) return; @@ -264,20 +268,22 @@ private void playerNoMoveEvent(EntityPlayer player) { MoistureStats moistStats = EntityPlayerManager.getMoistureStats(player); if (moistStats == null) return; - if (moistStats.getMoistureLevel() < 10) - return; + if (moistStats.getMoistureLevel() < 1) return; - if (player.lastTickPosX == player.posX - && player.lastTickPosY == player.posY - && player.lastTickPosZ == player.posZ + if ((int) player.lastTickPosX == (int) player.posX + && (int) player.lastTickPosY == (int) player.posY + && (int) player.lastTickPosZ == (int) player.posZ && player.motionX == 0 && player.motionY == 0 && player.motionZ == 0) { - stats.addStats(1, 0.1f); - moistStats.addExhaustion(0.8f); - player.addExhaustion(0.8f); + if (!player.worldObj.isRemote) { + stats.addStats(1, 0.1f); + moistStats.addExhaustion(0.05f); + player.addExhaustion(0.1f); + } generateRandomParticles(player, "happyVillager"); + } } diff --git a/src/main/java/shift/sextiarysector/gui/tab/TabManager.java b/src/main/java/shift/sextiarysector/gui/tab/TabManager.java index bbd4cd2..dbc7626 100644 --- a/src/main/java/shift/sextiarysector/gui/tab/TabManager.java +++ b/src/main/java/shift/sextiarysector/gui/tab/TabManager.java @@ -1,5 +1,6 @@ package shift.sextiarysector.gui.tab; +import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -33,6 +34,8 @@ private static EntityPlayer getPlayer() { private static boolean init; private static AbstractTab vanilla; + public static WeakReference buttons; + public static void initTabManager() { if (!init) { @@ -61,6 +64,15 @@ public static int getTabNumber(AbstractTab tab) { } + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void guiPreInit(GuiScreenEvent.InitGuiEvent.Pre event) + { + + buttons = null;//event.buttonList; + + } + @SideOnly(Side.CLIENT) @SubscribeEvent public void guiPostInit(GuiScreenEvent.InitGuiEvent.Post event) @@ -87,6 +99,34 @@ public void guiPostInit(GuiScreenEvent.InitGuiEvent.Post event) public static boolean hasPotion() { if (mc.thePlayer.getActivePotionEffects().isEmpty()) return false; + + return isNotNEI(); + + //if (!Loader.isModLoaded("NotEnoughItems")) return true; + + //try + //{ + // Class c = Class.forName("codechicken.nei.NEIClientConfig"); + // Object hidden = c.getMethod("isHidden").invoke(null); + // Object enabled = c.getMethod("isEnabled").invoke(null); + // + // if (hidden != null && hidden instanceof Boolean && enabled != null && enabled instanceof Boolean) + // { + // if ((Boolean) hidden || !((Boolean) enabled)) + // { + // return true; + // } + // } + + ////} catch (Exception e) + //} + + //return false; + + } + + private static boolean isNotNEI() { + if (!Loader.isModLoaded("NotEnoughItems")) return true; try @@ -127,6 +167,10 @@ public static void updateTabValues(int cornerX, int cornerY, List buttonList, Ab } } + if (!reset) { + buttons = new WeakReference(buttonList); + } + int count = 3; int pCount = getSelectPage(); ArrayList tabs = getTabListFromPage(pCount); diff --git a/src/main/java/shift/sextiarysector/item/ItemBlockSSFluid.java b/src/main/java/shift/sextiarysector/item/ItemBlockSSFluid.java new file mode 100644 index 0000000..514b38a --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemBlockSSFluid.java @@ -0,0 +1,25 @@ +package shift.sextiarysector.item; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.block.BlockSSFluid; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemBlockSSFluid extends ItemBlock { + + public ItemBlockSSFluid(Block p_i45328_1_) { + super(p_i45328_1_); + } + + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack itemstack, int p_82790_2_) + { + + return ((BlockSSFluid) this.field_150939_a).getFluid().getColor(); + + } + +} diff --git a/src/main/java/shift/sextiarysector/item/ItemDrink.java b/src/main/java/shift/sextiarysector/item/ItemDrink.java index c70af7a..c4e34e9 100644 --- a/src/main/java/shift/sextiarysector/item/ItemDrink.java +++ b/src/main/java/shift/sextiarysector/item/ItemDrink.java @@ -1,14 +1,14 @@ package shift.sextiarysector.item; -import shift.sextiarysector.SSItems; +import net.minecraft.init.Items; public class ItemDrink extends ItemFoodDrink { public ItemDrink(int food, float foodM, int drink, float drinkM, int stamina, float staminaM, boolean p_i45339_3_) { super(food, foodM, drink, drinkM, stamina, staminaM, p_i45339_3_); this.setDrink(); - this.setMaxStackSize(4); - this.setContainerItem(SSItems.emptyBottle); + this.setMaxStackSize(1); + this.setContainerItem(Items.glass_bottle); } } diff --git a/src/main/java/shift/sextiarysector/item/ItemFullBottle.java b/src/main/java/shift/sextiarysector/item/ItemFullBottle.java index 87e53c1..d1a2064 100644 --- a/src/main/java/shift/sextiarysector/item/ItemFullBottle.java +++ b/src/main/java/shift/sextiarysector/item/ItemFullBottle.java @@ -1,15 +1,15 @@ package shift.sextiarysector.item; +import net.minecraft.init.Items; import net.minecraft.item.Item; -import shift.sextiarysector.SSItems; import shift.sextiarysector.api.SextiarySectorAPI; public class ItemFullBottle extends Item { public ItemFullBottle() { this.setCreativeTab(SextiarySectorAPI.TabSSCore); - this.setContainerItem(SSItems.emptyBottle); - this.setMaxStackSize(4); + this.setContainerItem(Items.glass_bottle); + this.setMaxStackSize(1); } } diff --git a/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java b/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java index 4c9a5b8..930f185 100644 --- a/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java +++ b/src/main/java/shift/sextiarysector/item/ItemLavaBottle.java @@ -1,7 +1,7 @@ package shift.sextiarysector.item; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; @@ -13,9 +13,9 @@ public class ItemLavaBottle extends ItemFoodDrink { public ItemLavaBottle() { super(0, 0, 0, 0, 1, 0, false); - this.setContainerItem(SSItems.emptyBottle); + this.setContainerItem(Items.glass_bottle); this.setDrink(); - this.setMaxStackSize(4); + this.setMaxStackSize(1); this.setAlwaysEdible(); this.setCreativeTab(SextiarySectorAPI.TabSSFluid); @@ -28,9 +28,9 @@ protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer player.addExhaustion(7.8f); player.addPotionEffect(new PotionEffect(SSPotions.burn.getId(), 360, 2)); - if (!player.inventory.addItemStackToInventory(new ItemStack(Blocks.obsidian))) + if (!player.inventory.addItemStackToInventory(new ItemStack(SSItems.obsidianNugget))) { - player.dropPlayerItemWithRandomChoice(new ItemStack(Blocks.obsidian, 1, 0), false); + player.dropPlayerItemWithRandomChoice(new ItemStack(SSItems.obsidianNugget, 1, 0), false); } } diff --git a/src/main/java/shift/sextiarysector/item/ItemMagicContactLenses.java b/src/main/java/shift/sextiarysector/item/ItemMagicContactLenses.java new file mode 100644 index 0000000..fcd0502 --- /dev/null +++ b/src/main/java/shift/sextiarysector/item/ItemMagicContactLenses.java @@ -0,0 +1,14 @@ +package shift.sextiarysector.item; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import thaumcraft.api.IGoggles; + +public class ItemMagicContactLenses extends ItemContactLenses implements IGoggles { + + @Override + public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) { + return true; + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/NEIGuiTabsHandler.java b/src/main/java/shift/sextiarysector/nei/NEIGuiTabsHandler.java new file mode 100644 index 0000000..fd2a135 --- /dev/null +++ b/src/main/java/shift/sextiarysector/nei/NEIGuiTabsHandler.java @@ -0,0 +1,73 @@ +package shift.sextiarysector.nei; + +import java.util.List; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.ItemStack; +import shift.sextiarysector.gui.tab.GuiNextButton; +import shift.sextiarysector.gui.tab.TabManager; +import codechicken.nei.VisiblityData; +import codechicken.nei.api.INEIGuiHandler; +import codechicken.nei.api.TaggedInventoryArea; + +public class NEIGuiTabsHandler implements INEIGuiHandler { + + @Override + public VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility) + { + return currentVisibility; + } + + @Override + public Iterable getItemSpawnSlots(GuiContainer gui, ItemStack item) { + return null; + } + + @Override + public List getInventoryAreas(GuiContainer gui) + { + return null; + } + + @Override + public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) + { + return false; + } + + @Override + public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) + { + + if (TabManager.buttons == null) return false; + + List list = TabManager.buttons.get(); + + if (list == null) return false; + + GuiButton next = null; + + for (GuiButton button : list) { + if (button instanceof GuiNextButton) next = button; + } + + if (next == null) return false; + + int xw = x + w; + int yh = y + h; + + if (this.mousePressed(next, x, y)) return true; + if (this.mousePressed(next, xw, y)) return true; + if (this.mousePressed(next, x, yh)) return true; + if (this.mousePressed(next, xw, yh)) return true; + + return false; + } + + public boolean mousePressed(GuiButton p_146116_1_, int p_146116_2_, int p_146116_3_) + { + return p_146116_1_.enabled && p_146116_1_.visible && p_146116_2_ >= p_146116_1_.xPosition && p_146116_3_ >= p_146116_1_.yPosition && p_146116_2_ < p_146116_1_.xPosition + p_146116_1_.width && p_146116_3_ < p_146116_1_.yPosition + p_146116_1_.height; + } + +} diff --git a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java index 684ec75..8c85b42 100644 --- a/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java +++ b/src/main/java/shift/sextiarysector/nei/NEISextiarySectorConfig.java @@ -113,6 +113,8 @@ public void loadConfig() { API.registerGuiOverlay(GuiTimeMachine.class, "SS_TimeMachine"); //API.registerGuiOverlay(GuiBrewingStand.class, "SextiarySectorBrewing"); + API.registerNEIGuiHandler(new NEIGuiTabsHandler()); + } @Override diff --git a/src/main/java/shift/sextiarysector/player/MoistureStats.java b/src/main/java/shift/sextiarysector/player/MoistureStats.java index 514d1db..e77aede 100644 --- a/src/main/java/shift/sextiarysector/player/MoistureStats.java +++ b/src/main/java/shift/sextiarysector/player/MoistureStats.java @@ -12,198 +12,197 @@ public class MoistureStats { //水分 /** 水分 */ - private int moistureLevel = 20; - private final static int MAX_STAMINA_LEVEL = 20; + private int moistureLevel = 20; + private final static int MAX_STAMINA_LEVEL = 20; private final static int MAX_PREV_STAMINA_LEVEL = 20; - /** 隠し水分ゲージ */ - private float moistureSaturationLevel = 5.0F; - - //Packet用 - private int lastMoistureLevel = 20 ; - private float lastSaturationLevel = 0; - - /** 喉の渇きレベル これが増えると水分ゲージが減る */ - private float moistureExhaustionLevel; - - /** The player's food timer value. */ - private int moistureTimer; - private int prevMoistureLevel = 20; - - /** - * Args: int foodLevel, float foodSaturationModifier - */ - public void addStats(int par1, float par2) - { - this.moistureLevel = Math.min(par1 + this.moistureLevel, 20); - this.moistureSaturationLevel = Math.min(Math.min(this.moistureSaturationLevel + par2, this.moistureLevel),MAX_PREV_STAMINA_LEVEL); - } - - /** - * Handles the food game logic. - */ - public void onUpdate(EntityPlayer par1EntityPlayer) - { - EnumDifficulty i = par1EntityPlayer.worldObj.difficultySetting; - this.prevMoistureLevel = this.moistureLevel; - - if (this.moistureExhaustionLevel > 4.0F) - { - this.moistureExhaustionLevel -= 4.0F; - - if (this.moistureSaturationLevel > 0.0F) - { - this.moistureSaturationLevel = Math.max(this.moistureSaturationLevel - 1.0F, 0.0F); - } - else if (i.getDifficultyId() > 0 || Config.peacefulMoisture) - { - this.moistureLevel = Math.max(this.moistureLevel - 1, 0); - } - } - - if (par1EntityPlayer.worldObj.getGameRules().getGameRuleBooleanValue("naturalRegeneration") && this.moistureLevel >= 18 && par1EntityPlayer.shouldHeal()) - { - ++this.moistureTimer; - - if (this.moistureTimer >= 80) - { - par1EntityPlayer.heal(1.0F); - this.addExhaustion(3.0F); - this.moistureTimer = 0; - } - } - else if (this.moistureLevel <= 0) - { - ++this.moistureTimer; - - if (this.moistureTimer >= 80) - { - if (par1EntityPlayer.getHealth() > 10.0F || i.getDifficultyId() >= 3 || par1EntityPlayer.getHealth() > 1.0F && i.getDifficultyId() >= 2) - { - par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); - } - - this.moistureTimer = 0; - } - } - else - { - this.moistureTimer = 0; - } - } - - /** - * Reads food stats from an NBT object. - */ - public void readNBT(NBTTagCompound par1NBTTagCompound) - { - if (par1NBTTagCompound.hasKey("moisturelevel")) - { - this.moistureLevel = par1NBTTagCompound.getInteger("moisturelevel"); - this.moistureTimer = par1NBTTagCompound.getInteger("moistureticktimer"); - this.moistureSaturationLevel = par1NBTTagCompound.getFloat("moisturesaturationlevel"); - this.moistureExhaustionLevel = par1NBTTagCompound.getFloat("moistureexhaustionlevel"); - } - } - - /** - * Writes food stats to an NBT object. - */ - public void writeNBT(NBTTagCompound par1NBTTagCompound) - { - par1NBTTagCompound.setInteger("moisturelevel", this.moistureLevel); - par1NBTTagCompound.setInteger("moistureticktimer", this.moistureTimer); - par1NBTTagCompound.setFloat("moisturesaturationlevel", this.moistureSaturationLevel); - par1NBTTagCompound.setFloat("moistureexhaustionlevel", this.moistureExhaustionLevel); - } - - public boolean isPacket(){ - - boolean flag = false; - - if(this.moistureLevel!=this.lastMoistureLevel){ - flag= true; - this.lastMoistureLevel=this.moistureLevel; - } - - if(this.moistureSaturationLevel!=this.lastSaturationLevel){ - - flag=true; - this.lastSaturationLevel=this.moistureSaturationLevel; - - } + /** 隠し水分ゲージ */ + private float moistureSaturationLevel = 5.0F; + + //Packet用 + private int lastMoistureLevel = 20; + private float lastSaturationLevel = 0; + + /** 喉の渇きレベル これが増えると水分ゲージが減る */ + private float moistureExhaustionLevel; + + /** The player's food timer value. */ + private int moistureTimer; + private int prevMoistureLevel = 20; + + /** + * Args: int foodLevel, float foodSaturationModifier + */ + public void addStats(int par1, float par2) + { + this.moistureLevel = Math.min(par1 + this.moistureLevel, 20); + this.moistureSaturationLevel = Math.min(Math.min(this.moistureSaturationLevel + par2, this.moistureLevel), MAX_PREV_STAMINA_LEVEL); + } + + /** + * Handles the food game logic. + */ + public void onUpdate(EntityPlayer par1EntityPlayer) + { + EnumDifficulty i = par1EntityPlayer.worldObj.difficultySetting; + this.prevMoistureLevel = this.moistureLevel; + + if (this.moistureExhaustionLevel > 4.0F) + { + this.moistureExhaustionLevel -= 4.0F; + + if (this.moistureSaturationLevel > 0.0F) + { + this.moistureSaturationLevel = Math.max(this.moistureSaturationLevel - 1.0F, 0.0F); + } + else if (i.getDifficultyId() > 0 || Config.peacefulMoisture) + { + this.moistureLevel = Math.max(this.moistureLevel - 1, 0); + } + } + + if (par1EntityPlayer.worldObj.getGameRules().getGameRuleBooleanValue("naturalRegeneration") && this.moistureLevel >= 18 && par1EntityPlayer.shouldHeal()) + { + ++this.moistureTimer; + + if (this.moistureTimer >= 80) + { + par1EntityPlayer.heal(1.0F); + this.addExhaustion(3.0F); + this.moistureTimer = 0; + } + } + else if (this.moistureLevel <= 0) + { + ++this.moistureTimer; + + if (this.moistureTimer >= 80) + { + if (par1EntityPlayer.getHealth() > 10.0F || i.getDifficultyId() >= 3 || par1EntityPlayer.getHealth() > 1.0F && i.getDifficultyId() >= 2) + { + par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); + } + + this.moistureTimer = 0; + } + } + else + { + this.moistureTimer = 0; + } + } + + /** + * Reads food stats from an NBT object. + */ + public void readNBT(NBTTagCompound par1NBTTagCompound) + { + if (par1NBTTagCompound.hasKey("moisturelevel")) + { + this.moistureLevel = par1NBTTagCompound.getInteger("moisturelevel"); + this.moistureTimer = par1NBTTagCompound.getInteger("moistureticktimer"); + this.moistureSaturationLevel = par1NBTTagCompound.getFloat("moisturesaturationlevel"); + this.moistureExhaustionLevel = par1NBTTagCompound.getFloat("moistureexhaustionlevel"); + } + } + + /** + * Writes food stats to an NBT object. + */ + public void writeNBT(NBTTagCompound par1NBTTagCompound) + { + par1NBTTagCompound.setInteger("moisturelevel", this.moistureLevel); + par1NBTTagCompound.setInteger("moistureticktimer", this.moistureTimer); + par1NBTTagCompound.setFloat("moisturesaturationlevel", this.moistureSaturationLevel); + par1NBTTagCompound.setFloat("moistureexhaustionlevel", this.moistureExhaustionLevel); + } + + public boolean isPacket() { + + boolean flag = false; + + if (this.moistureLevel != this.lastMoistureLevel) { + flag = true; + this.lastMoistureLevel = this.moistureLevel; + } + + if (this.moistureSaturationLevel != this.lastSaturationLevel) { + + flag = true; + this.lastSaturationLevel = this.moistureSaturationLevel; + + } return flag; - } - - - /** - * Get the player's food level. - */ - public int getMoistureLevel() - { - return this.moistureLevel; - } - - @SideOnly(Side.CLIENT) - public int getPrevMoistureLevel() - { - return this.prevMoistureLevel; - } - - /** - * If foodLevel is not max. - */ - public boolean needMoisture() - { - return this.moistureLevel < MAX_STAMINA_LEVEL; - } - - /** - * adds input to foodExhaustionLevel to a max of 40 - */ - public void addExhaustion(float par1) - { - this.moistureExhaustionLevel = Math.min(this.moistureExhaustionLevel + par1, 40.0F); - } - - /** - * Get the player's food saturation level. - */ - public float getSaturationLevel() - { - return this.moistureSaturationLevel; - } - - @SideOnly(Side.CLIENT) - public void setMoistureLevel(int par1) - { - this.moistureLevel = par1; - } - - @SideOnly(Side.CLIENT) - public void setMoistureSaturationLevel(float par1) - { - this.moistureSaturationLevel = par1; - } - - @SideOnly(Side.SERVER) + } + + /** + * Get the player's moisture level. + */ + public int getMoistureLevel() + { + return this.moistureLevel; + } + + @SideOnly(Side.CLIENT) + public int getPrevMoistureLevel() + { + return this.prevMoistureLevel; + } + + /** + * If foodLevel is not max. + */ + public boolean needMoisture() + { + return this.moistureLevel < MAX_STAMINA_LEVEL; + } + + /** + * adds input to foodExhaustionLevel to a max of 40 + */ + public void addExhaustion(float par1) + { + this.moistureExhaustionLevel = Math.min(this.moistureExhaustionLevel + par1, 40.0F); + } + + /** + * Get the player's food saturation level. + */ + public float getSaturationLevel() + { + return this.moistureSaturationLevel; + } + + @SideOnly(Side.CLIENT) + public void setMoistureLevel(int par1) + { + this.moistureLevel = par1; + } + + @SideOnly(Side.CLIENT) + public void setMoistureSaturationLevel(float par1) + { + this.moistureSaturationLevel = par1; + } + + @SideOnly(Side.SERVER) public int getLastMoistureLevel() { return lastMoistureLevel; } - @SideOnly(Side.SERVER) + @SideOnly(Side.SERVER) public void setLastMoistureLevel(int lastMoistureLevel) { this.lastMoistureLevel = lastMoistureLevel; } - @SideOnly(Side.SERVER) + @SideOnly(Side.SERVER) public float getLastExhaustionLevel() { return lastSaturationLevel; } - @SideOnly(Side.SERVER) + @SideOnly(Side.SERVER) public void setLastExhaustionLevel(float lastExhaustionLevel) { this.lastSaturationLevel = lastExhaustionLevel; } diff --git a/src/main/java/shift/sextiarysector/player/StaminaStats.java b/src/main/java/shift/sextiarysector/player/StaminaStats.java index 0eb8d9a..6a90395 100644 --- a/src/main/java/shift/sextiarysector/player/StaminaStats.java +++ b/src/main/java/shift/sextiarysector/player/StaminaStats.java @@ -10,189 +10,189 @@ public class StaminaStats { /** The player's stamina level. */ - private int staminaLevel = 100; - private final static int MAX_STAMINA_LEVEL = 100; + private int staminaLevel = 100; + private final static int MAX_STAMINA_LEVEL = 100; private final static int MAX_PREV_STAMINA_LEVEL = 20; - /** The player's food saturation. */ - private float staminaSaturationLevel = 5.0F; - - //Packet用 - private int lastStaminaLevel = 100 ; - private float lastSaturationLevel = 0; - - /** The player's food exhaustion. */ - private float staminaExhaustionLevel; - - /** The player's food timer value. */ - private int staminaTimer; - private int prevStaminaLevel = 20; - - /** - * Args: int staminaLevel, float staminaSaturationModifier - */ - public void addStats(int par1, float par2) - { - this.staminaLevel = Math.min(par1 + this.staminaLevel, MAX_STAMINA_LEVEL); - this.staminaSaturationLevel = Math.min(this.staminaSaturationLevel + par1 * par2 * 2.0F, this.staminaLevel); - } - - /* - public void addStats(IStaminaFood par1ItemStaminaFood) - { - this.addStats(par1ItemStaminaFood.getHealAmount(), par1ItemStaminaFood.getSaturationModifier()); - }*/ - - /** - * Handles the food game logic. - */ - public void onUpdate(EntityPlayer par1EntityPlayer) - { - EnumDifficulty i = par1EntityPlayer.worldObj.difficultySetting; - this.prevStaminaLevel = this.staminaLevel; - - if (this.staminaExhaustionLevel > 4.0F) - { - this.staminaExhaustionLevel -= 4.0F; - - if (this.staminaSaturationLevel > 0.0F) - { - this.staminaSaturationLevel = Math.max(this.staminaSaturationLevel - 1.0F, 0.0F); - } - else if (i.getDifficultyId() > 0 || Config.peacefulStamina) - { - this.staminaLevel = Math.max(this.staminaLevel - 1, 0); - } - } - - if (par1EntityPlayer.worldObj.getGameRules().getGameRuleBooleanValue("naturalRegeneration") && this.staminaLevel >= 18 && par1EntityPlayer.shouldHeal()) - { - ++this.staminaTimer; - - if (this.staminaTimer >= 160) - { - par1EntityPlayer.heal(1.0F); - this.addExhaustion(3.0F); - this.staminaTimer = 0; - } - } - else if (this.staminaLevel <= 0) - { - ++this.staminaTimer; - - if (this.staminaTimer >= 80) - { - if (par1EntityPlayer.getHealth() > 10.0F || i.getDifficultyId() >= 3 || par1EntityPlayer.getHealth() > 1.0F && i.getDifficultyId() >= 2) - { - //if(!par1EntityPlayer.isPlayerSleeping()){ - // par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); - //} - //par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); - } - - this.staminaTimer = 0; - } - } - else - { - this.staminaTimer = 0; - } - } - - /** - * Reads food stats from an NBT object. - */ - public void readNBT(NBTTagCompound par1NBTTagCompound) - { - if (par1NBTTagCompound.hasKey("staminalevel")) - { - this.staminaLevel = par1NBTTagCompound.getInteger("staminalevel"); - this.staminaTimer = par1NBTTagCompound.getInteger("staminaticktimer"); - this.staminaSaturationLevel = par1NBTTagCompound.getFloat("staminasaturationlevel"); - this.staminaExhaustionLevel = par1NBTTagCompound.getFloat("staminaexhaustionlevel"); - } - } - - /** - * Writes food stats to an NBT object. - */ - public void writeNBT(NBTTagCompound par1NBTTagCompound) - { - par1NBTTagCompound.setInteger("staminalevel", this.staminaLevel); - par1NBTTagCompound.setInteger("staminaticktimer", this.staminaTimer); - par1NBTTagCompound.setFloat("staminasaturationlevel", this.staminaSaturationLevel); - par1NBTTagCompound.setFloat("staminaexhaustionlevel", this.staminaExhaustionLevel); - } - - /**Packetを飛ばす必要があるかどうか*/ - public boolean isPacket(){ - - boolean flag = false; - - if(this.staminaLevel!=this.lastStaminaLevel){ - flag= true; - this.lastStaminaLevel=this.staminaLevel; - } - - if(this.staminaSaturationLevel!=this.lastSaturationLevel){ - - flag=true; - this.lastSaturationLevel=this.staminaSaturationLevel; - - } + /** The player's food saturation. */ + private float staminaSaturationLevel = 5.0F; + + //Packet用 + private int lastStaminaLevel = 100; + private float lastSaturationLevel = 0; + + /** The player's food exhaustion. */ + private float staminaExhaustionLevel; + + /** The player's food timer value. */ + private int staminaTimer; + private int prevStaminaLevel = 20; + + /** + * Args: int staminaLevel, float staminaSaturationModifier + */ + public void addStats(int par1, float par2) + { + this.staminaLevel = Math.min(par1 + this.staminaLevel, MAX_STAMINA_LEVEL); + this.staminaSaturationLevel = Math.min(Math.min(this.staminaSaturationLevel + par1 * par2 * 2.0F, this.staminaLevel), MAX_STAMINA_LEVEL / 2); + } + + /* + public void addStats(IStaminaFood par1ItemStaminaFood) + { + this.addStats(par1ItemStaminaFood.getHealAmount(), par1ItemStaminaFood.getSaturationModifier()); + }*/ + + /** + * Handles the food game logic. + */ + public void onUpdate(EntityPlayer par1EntityPlayer) + { + EnumDifficulty i = par1EntityPlayer.worldObj.difficultySetting; + this.prevStaminaLevel = this.staminaLevel; + + if (this.staminaExhaustionLevel > 4.0F) + { + this.staminaExhaustionLevel -= 4.0F; + + if (this.staminaSaturationLevel > 0.0F) + { + this.staminaSaturationLevel = Math.max(this.staminaSaturationLevel - 1.0F, 0.0F); + } + else if (i.getDifficultyId() > 0 || Config.peacefulStamina) + { + this.staminaLevel = Math.max(this.staminaLevel - 1, 0); + } + } + + if (par1EntityPlayer.worldObj.getGameRules().getGameRuleBooleanValue("naturalRegeneration") && this.staminaLevel >= 18 && par1EntityPlayer.shouldHeal()) + { + ++this.staminaTimer; + + if (this.staminaTimer >= 160) + { + par1EntityPlayer.heal(1.0F); + this.addExhaustion(3.0F); + this.staminaTimer = 0; + } + } + else if (this.staminaLevel <= 0) + { + ++this.staminaTimer; + + if (this.staminaTimer >= 80) + { + if (par1EntityPlayer.getHealth() > 10.0F || i.getDifficultyId() >= 3 || par1EntityPlayer.getHealth() > 1.0F && i.getDifficultyId() >= 2) + { + //if(!par1EntityPlayer.isPlayerSleeping()){ + // par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); + //} + //par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); + } + + this.staminaTimer = 0; + } + } + else + { + this.staminaTimer = 0; + } + } + + /** + * Reads food stats from an NBT object. + */ + public void readNBT(NBTTagCompound par1NBTTagCompound) + { + if (par1NBTTagCompound.hasKey("staminalevel")) + { + this.staminaLevel = par1NBTTagCompound.getInteger("staminalevel"); + this.staminaTimer = par1NBTTagCompound.getInteger("staminaticktimer"); + this.staminaSaturationLevel = par1NBTTagCompound.getFloat("staminasaturationlevel"); + this.staminaExhaustionLevel = par1NBTTagCompound.getFloat("staminaexhaustionlevel"); + } + } + + /** + * Writes food stats to an NBT object. + */ + public void writeNBT(NBTTagCompound par1NBTTagCompound) + { + par1NBTTagCompound.setInteger("staminalevel", this.staminaLevel); + par1NBTTagCompound.setInteger("staminaticktimer", this.staminaTimer); + par1NBTTagCompound.setFloat("staminasaturationlevel", this.staminaSaturationLevel); + par1NBTTagCompound.setFloat("staminaexhaustionlevel", this.staminaExhaustionLevel); + } + + /**Packetを飛ばす必要があるかどうか*/ + public boolean isPacket() { + + boolean flag = false; + + if (this.staminaLevel != this.lastStaminaLevel) { + flag = true; + this.lastStaminaLevel = this.staminaLevel; + } + + if (this.staminaSaturationLevel != this.lastSaturationLevel) { + + flag = true; + this.lastSaturationLevel = this.staminaSaturationLevel; + + } return flag; - } - - /** - * Get the player's food level. - */ - public int getStaminaLevel() - { - return this.staminaLevel; - } - - @SideOnly(Side.CLIENT) - public int getPrevStaminaLevel() - { - return this.prevStaminaLevel; - } - - /** - * If foodLevel is not max. - */ - public boolean needStamina() - { - return this.staminaLevel < MAX_STAMINA_LEVEL; - } - - /** - * adds input to foodExhaustionLevel to a max of 400 - */ - public void addExhaustion(float par1) - { - this.staminaExhaustionLevel = Math.min(this.staminaExhaustionLevel + par1, 400.0F); - } - - /** - * Get the player's food saturation level. - */ - public float getSaturationLevel() - { - return this.staminaSaturationLevel; - } - - @SideOnly(Side.CLIENT) - public void setStaminaLevel(int par1) - { - this.staminaLevel = par1; - } - - @SideOnly(Side.CLIENT) - public void setStaminaSaturationLevel(float par1) - { - this.staminaSaturationLevel = par1; - } + } + + /** + * Get the player's food level. + */ + public int getStaminaLevel() + { + return this.staminaLevel; + } + + @SideOnly(Side.CLIENT) + public int getPrevStaminaLevel() + { + return this.prevStaminaLevel; + } + + /** + * If foodLevel is not max. + */ + public boolean needStamina() + { + return this.staminaLevel < MAX_STAMINA_LEVEL; + } + + /** + * adds input to foodExhaustionLevel to a max of 400 + */ + public void addExhaustion(float par1) + { + this.staminaExhaustionLevel = Math.min(this.staminaExhaustionLevel + par1, 400.0F); + } + + /** + * Get the player's food saturation level. + */ + public float getSaturationLevel() + { + return this.staminaSaturationLevel; + } + + @SideOnly(Side.CLIENT) + public void setStaminaLevel(int par1) + { + this.staminaLevel = par1; + } + + @SideOnly(Side.CLIENT) + public void setStaminaSaturationLevel(float par1) + { + this.staminaSaturationLevel = par1; + } } diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTC.java b/src/main/java/shift/sextiarysector/plugin/PluginTC.java index e9324f8..452e6c2 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTC.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTC.java @@ -1,29 +1,50 @@ package shift.sextiarysector.plugin; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.ForgeHooksClient; import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import net.minecraftforge.common.MinecraftForge; +import shift.sextiarysector.api.equipment.EquipmentType; +import shift.sextiarysector.item.ItemMagicContactLenses; +import shift.sextiarysector.player.EntityPlayerManager; +import shift.sextiarysector.player.EquipmentStats; +import thaumcraft.api.IGoggles; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class PluginTC implements IPlugin { + private boolean eventDraw = false; + + public static Item magicContactLenses; + @Override public String getModName() { - return null; + return "Thaumcraft"; } @Override public void prePlugin(FMLPreInitializationEvent event) { + magicContactLenses = new ItemMagicContactLenses().setUnlocalizedName("ss.magic_contact_lenses").setTextureName("sextiarysector:face/magic_contact_lenses"); + GameRegistry.registerItem(magicContactLenses, "MagicContactLenses"); + } @Override public void preClientPlugin(FMLPreInitializationEvent event) { + if (event.getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(this); + } + } @Override @@ -37,17 +58,43 @@ public void postPlugin(FMLPostInitializationEvent event) { } @SideOnly(Side.CLIENT) - @SubscribeEvent(priority = EventPriority.HIGHEST) + @SubscribeEvent + //(priority = EventPriority.HIGHEST) public void blockHighlight(DrawBlockHighlightEvent event) { + if (eventDraw) return; + + EntityPlayer player = event.player; + + EquipmentStats e = EntityPlayerManager.getEquipmentStats(player); + + ItemStack contactLenses = e.inventory.getStackInSlot(EquipmentType.Face.getSlot(0)); + + if (contactLenses == null) return; + + if (contactLenses.getItem() != this.magicContactLenses) return; + + ItemStack item = player.getEquipmentInSlot(4); + + if (item != null && item.getItem() instanceof IGoggles) return; + + eventDraw = true; + + player.setCurrentItemOrArmor(4, contactLenses); + ForgeHooksClient.onDrawBlockHighlight(event.context, player, event.target, event.subID, event.currentItem, event.partialTicks); + player.setCurrentItemOrArmor(4, item); + + eventDraw = false; + } + /* @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.LOWEST) public void blockHighlightPost(DrawBlockHighlightEvent event) { - } + }*/ } diff --git a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java index 138943b..8f1b191 100644 --- a/src/main/java/shift/sextiarysector/plugin/SSPlugins.java +++ b/src/main/java/shift/sextiarysector/plugin/SSPlugins.java @@ -24,6 +24,7 @@ public class SSPlugins { public static boolean modCleaver; public static boolean modFMP; public static boolean modRF; + public static boolean modTC; public static void initModHelper() { @@ -36,6 +37,7 @@ public static void initModHelper() { modCleaver = Loader.isModLoaded("schr0.cleaver") && Config.modCleaver; modFMP = Loader.isModLoaded("ForgeMultipart") && Config.modFMP; modRF = isRF() && Config.modRF; + modTC = Loader.isModLoaded("Thaumcraft") && Config.modTC; if (modDCsAppleMilk) { @@ -172,6 +174,21 @@ public static void initModHelper() { } } + if (modTC) { + + try { + + SextiarySector.Log.info("Thaumcraft Plugin is loaded"); + plugins.add(new PluginTC()); + + } catch (Exception e) { + + SextiarySector.Log.log(Level.WARN, "Thaumcraft integration was unsuccessful - please contact the author of this mod to let them know that the API may have changed."); + SextiarySector.Log.catching(e); + + } + } + } public static void prePlugins(FMLPreInitializationEvent event) { diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java index 18da264..5de3d78 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesCore.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesCore.java @@ -37,13 +37,13 @@ public static void addRecipes(CraftingManager p_77608_1_) p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(SSItems.blueGel, 1), new Object[] { - "dustYellowstone", + "dustBluestone", "slimeball" })); p_77608_1_.getRecipeList().add(new ShapelessOreRecipe(new ItemStack(SSItems.yellowGel, 1), new Object[] { - "dustBluestone", + "dustYellowstone", "slimeball" })); @@ -85,6 +85,16 @@ public static void addRecipes(CraftingManager p_77608_1_) })); } + //その他 + oNugget = new Object[] { "nuggetObsidian" }; + Block[] other = new Block[] { Blocks.obsidian }; + for (int i = 0; i < oNugget.length; i++) { + p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(other[i], 1), + new Object[] { "xxx", "xxx", "xxx", + Character.valueOf('x'), oNugget[i], + })); + } + /* p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSItems.smallCloth, 1), new Object[] { diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java index e1b7551..a8e31a9 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnace.java @@ -25,7 +25,7 @@ public static void addRecipes() GameRegistry.addSmelting(new ItemStack(SSItems.laver), new ItemStack(SSItems.laverRoasted), 0.1f); - GameRegistry.addSmelting(new ItemStack(SSItems.waterBottle), new ItemStack(SSItems.drinkingWaterBottle), 0.1f); + GameRegistry.addSmelting(new ItemStack(Items.potionitem, 1, 0), new ItemStack(SSItems.drinkingWaterBottle), 0.1f); GameRegistry.addSmelting(new ItemStack(SSBlocks.leafBlock), new ItemStack(Items.dye, 1, 2), 0.1f); diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java index a955916..6488b93 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesFurnaceCraft.java @@ -57,12 +57,12 @@ public static void addRecipes(FurnaceCraftingManager p_77608_1_) })); */ - p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.drinkingWaterBottle, 2), - new Object[] { - SSItems.emptyBottle, - SSItems.emptyBottle, - SSItems.waterBottle, - })); + //p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.drinkingWaterBottle, 2), + // new Object[] { + // SSItems.emptyBottle, + // SSItems.emptyBottle, + // SSItems.waterBottle, + // })); p_77608_1_.addRecipe(new ShapelessOreRecipe(new ItemStack(SSItems.chocolate, 1), new Object[] { diff --git a/src/main/java/shift/sextiarysector/renderer/block/RendererOreStone.java b/src/main/java/shift/sextiarysector/renderer/block/RendererOreStone.java index e6c2641..ef2b6aa 100644 --- a/src/main/java/shift/sextiarysector/renderer/block/RendererOreStone.java +++ b/src/main/java/shift/sextiarysector/renderer/block/RendererOreStone.java @@ -56,6 +56,8 @@ public void renderInventoryBlock(Block block, int metadata, int modelId, RenderB renderer.clearOverrideBlockTexture(); renderer.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); + metadata = 8; + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, -1.0F, 0.0F); @@ -92,18 +94,81 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block b if (this.getRenderId() != modelId) return false; - renderer.setOverrideBlockTexture(Blocks.stone.getIcon(0, 0)); - //renderer.setRenderBounds(0.0001D, 0.0001D, 0.0001D, 0.9999D, 0.9999D, 0.9999D); - renderer.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); - renderer.renderStandardBlock(block, x, y, z); + double s = 0.0001D; - renderer.clearOverrideBlockTexture(); + //renderer.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); + //renderer.setRenderBounds(-0.0001D, -0.0001D, -0.0001D, 1.0001D, 1.0001D, 1.0001D); + //renderer.renderStandardBlock(block, x, y, z); + //renderer.renderAllFaces = true; + + //renderer.setOverrideBlockTexture(Blocks.stone.getIcon(0, 0)); + //renderer.setRenderBounds(0.0001D, 0.0001D, 0.0001D, 0.9999D, 0.9999D, 0.9999D); //renderer.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); - renderer.setRenderBounds(-0.0001D, -0.0001D, -0.0001D, 1.0001D, 1.0001D, 1.0001D); + ////renderer.renderStandardBlock(block, x, y, z); + //renderer.renderAllFaces = false; + + //renderer.clearOverrideBlockTexture(); + + ////int metadata = 8;//world.getBlockMetadata(x, y, z); + + //int mixedBrightness = block.getMixedBrightnessForBlock(world, x, y, z); + + ////Tessellator tesselator = Tessellator.instance; + + //tesselator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + //tesselator.setColorOpaque_F(0.6F, 0.6F, 0.6F); + //tesselator.setColorOpaque_F(1.0F, 1.0F, 1.0F); + + /* + if (block.shouldSideBeRendered(world, x, y - 1, z, 0)) { + tesselator.setBrightness(block.getMixedBrightnessForBlock(world, x, y - 1, z)); + tesselator.setColorOpaque_F(0.45F, 0.45F, 0.45F); + renderer.renderFaceYNeg(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata)); + } + + if (block.shouldSideBeRendered(world, x, y + 1, z, 1)) { + tesselator.setBrightness(block.getMixedBrightnessForBlock(world, x, y + 1, z)); + tesselator.setColorOpaque_F(0.88F, 0.88F, 0.88F); + renderer.renderFaceYPos(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata)); + } + + if (block.shouldSideBeRendered(world, x, y, z - 1, 2)) { + tesselator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z - 1)); + tesselator.setColorOpaque_F(0.7F, 0.7F, 0.7F); + renderer.renderFaceZNeg(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata)); + } + + if (block.shouldSideBeRendered(world, x, y, z + 1, 3)) { + tesselator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z + 1)); + tesselator.setColorOpaque_F(0.7F, 0.7F, 0.7F); + renderer.renderFaceZPos(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata)); + } + + if (block.shouldSideBeRendered(world, x - 1, y, z, 4)) { + tesselator.setBrightness(block.getMixedBrightnessForBlock(world, x - 1, y, z)); + tesselator.setColorOpaque_F(0.6F, 0.6F, 0.6F); + renderer.renderFaceXNeg(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata)); + } + + if (block.shouldSideBeRendered(world, x + 1, y, z, 5)) { + tesselator.setBrightness(block.getMixedBrightnessForBlock(world, x + 1, y, z)); + tesselator.setColorOpaque_F(0.6F, 0.6F, 0.6F); + renderer.renderFaceXPos(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata)); + } + + */ + + GL11.glPushMatrix(); + renderer.renderStandardBlock(Blocks.stone, x, y, z); + GL11.glPopMatrix(); + + GL11.glPushMatrix(); renderer.renderStandardBlock(block, x, y, z); + GL11.glPopMatrix(); return true; + } @Override diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index a206fde..a9b9eaf 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -426,6 +426,8 @@ item.ss.xp_ring.name=XP Ring +item.ss.magic_contact_lenses.name=Magic Contact Lenses + #Fluid fluid.ss.takumi_tea=TAKUMI Tea fluid.ss.drinking_water=Drinking Water diff --git a/src/main/resources/assets/sextiarysector/textures/items/face/magic_contact_lenses.png b/src/main/resources/assets/sextiarysector/textures/items/face/magic_contact_lenses.png new file mode 100644 index 0000000000000000000000000000000000000000..5ae55530c43153a5b96063381de81e1fb92aaa6f GIT binary patch literal 386 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~hX5~+oZ$AK77PrG{GKk3Ar_~T6C^SYba*>Ot!HTc z|K$?PnpY78nNzNIrUy)XoB#qlKEGgR27<%)@5f8T#msNM&3dVdl_yw4_y6PKqGxOG z_MB+jkPxgA_5Ps5ynueCZAFgChhHDa{V%zrpu#a~eS>3|`n<-6uXWjgpiN!;_y6Nz z_Y!LUztrzytJAawiS7uWF+nx4E)8f~htBSUJ9flAu21dKX;zRo_R}|fIO)fqulk2C zex5HODIp>8@2_*m|KGp4w=-_Iz~{dreTC1&*6wsy55oh8S~_R;7U*$7oo~|C?G(RDzO_GKAg%mqK1B1+h@LwnD SXS@Z57K5j&pUXO@geCyt$e5S_ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sextiarysector/textures/items/fluid/drinking_water_bottle.png b/src/main/resources/assets/sextiarysector/textures/items/fluid/drinking_water_bottle.png index 47c21c3b3ce5f29a308429ea53ff536bd582044d..bb0b42518827675cd9cb7d83f97c410871bd6884 100644 GIT binary patch delta 346 zcmV-g0j2)?0;2_ z=lgtrz<-xEYxsDyr%cntkpm7cp0v3Dgb>QSyZq{xH+Lx(i+@x5`YZ;+vpSY#;>aOe z$LI6w>vTE_pxth(pLSw@W}*;6Ra!aX{VuMa<#eYRFnG!#H1x1~AT-Nb3-|l9VqA+|SQryBiJQWbFnoQy{H_ smnqOR91gFRXc|uR7{eS7i}Ba>0WOPveJBqlTL1t607*qoM6N<$f{^i|RsaA1 delta 306 zcmV-20nPrS1N#DyQhx#q05&EPFc%g8009U|L_t(I%e9cLPQ*YIg}+(KCJ2yaMH2)T zM+kHUV0i&}0h+AA@CtYoe+dLdaCj&N)Cvru3dEXTv0 zO{*#1^zI>mn%}#qrES&W0|KylI{?5KBVibdO$1eOmR}L1Y0COZBChMo-2RIMkuTei zi(=KmU2m4|<k?5;yZkIgZfCG^_FkHtF7#^&YD=7$=^#bU$J?-sVP){W z{k%IMhV!Z07*qoM6N<$ Ef+T8+wg3PC diff --git a/src/main/resources/assets/sextiarysector/textures/items/fluid/drinking_water_bottle2.png b/src/main/resources/assets/sextiarysector/textures/items/fluid/drinking_water_bottle2.png new file mode 100644 index 0000000000000000000000000000000000000000..47c21c3b3ce5f29a308429ea53ff536bd582044d GIT binary patch literal 379 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPq6E}mInvj9G7y|<%ho_5Uh{frx6W012aS&bhX?W|Vz*^IrFQ%@Yot~O1aD3y7_TQiGMMfR|yhpxjd1pdR zsl%jt>m#f4jds>FUAQ{Aur=Ub%it$=x#dwNRkn?ms%NdFdO9zQxU&q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|s0 zjF9mV0IfA;S&|o0QBqNmWf^(#MdUtft?71DyAb#Hc5(h)Js({B=oK zr7@MHOzjJ(kje+Ju{E8hilyQUD5TL^&&pElf}mhw;T3zwhLB(ouNfgjNhg7C!)2U_qB>DN3eLg13;RlJg)6KMZBUX`>P0F>WyKK zmF1=41lC&O$tMR|Yno4er+V%dOsk9eKJ!oY3CEjVCFMVqBLDyZ07*qoM6N<$f`}uK Al>h($ diff --git a/src/main/resources/assets/sextiarysector/textures/items/fluid/takumi_tea_bottle.png b/src/main/resources/assets/sextiarysector/textures/items/fluid/takumi_tea_bottle.png index 3ae2e53eff1d81f38d0c3c7152f8b62898c3db4c..fe02cd1e4c7b8a0f66727c830bc3831db0aa8045 100644 GIT binary patch delta 300 zcmV+{0n`5G0?h)DDu4d~{{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2j2)44K*$fG_)K5007!aL_t(I%VS^|Xuyb1@=C7f{}(S_FueWrg&}%z@PyWj+Re^hQm+mG8H#av%qFeye{3QAgMBontgWF|4tX^Tls(Gd|!;|Pc z3^Geq7#RK_u2WA&xB?DFy(M*IT=|41Ui50000C!KL)ea6jM&sL z;&Q>$r%(TXxPBha7tl0hkd~HaB*_JD7q&6HeEEXm?WeB{PJfFIV^{S5|9_nL=FOY` z|NsBbuxr<@|G3n!;Br2?*zVoC|1&T!Fu1z9G7@yblP6EG+KA01OxRrT_3Kv##u|?Q zPoF;h&)CNa!CjnKLz@X#06xjQ%OJB<1;Y7*JGhw$rjkEMG${ti%v6ROvP*XpP8Z-# z2Lg-`Tfh8Acs_$1FYL12%;0v}kF+p&`0ybE!#jx0ZkPQaw*Mi~3%l$$6O|hoDb3CR X`W3QQr5*(900000NkvXXu0mjf?CzF4 diff --git a/src/main/resources/assets/sextiarysector/textures/items/nugget/obsidian_nugget.png b/src/main/resources/assets/sextiarysector/textures/items/nugget/obsidian_nugget.png new file mode 100644 index 0000000000000000000000000000000000000000..6d1d409023817fb0042bf3059e6006a3f8462034 GIT binary patch literal 263 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~hbS+XR$zOSB~WOJr;B5V#p&b(3D%w+OJn{k-`HKa zD*52jo3qZ(cf8v)_u<*e`*~)sv;B4cK!NaTMV}o$ZJBkI|M{C0llhpLn}5|$;&EV$ z|NlQZ0SG>P5mCI>aJT1k+1jKEprXU;<^N0O8Tuse2>#YKF-82(uaEM1)$dZ>+TPy2 zKjAqmSHtUiHny+-%TKjz{54-AAo8TczGn*=8H8>bB~3r3x&-Jx22WQ%mvv4FO#s3s BX0QMN literal 0 HcmV?d00001 From 4c8760fde64e19c2a9bee690cad51f71277960bd Mon Sep 17 00:00:00 2001 From: shift02 Date: Wed, 26 Aug 2015 00:17:23 +0900 Subject: [PATCH 89/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=EF=BC=9A=E7=A9=BA?= =?UTF-8?q?=E8=85=B9=E5=80=A4=E3=81=AE=E5=8B=95=E4=BD=9C=E3=82=92=E5=88=86?= =?UTF-8?q?=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・空腹値の要素をスタミナに変更 --- build.gradle | 2 +- .../java/shift/sextiarysector/SSFuels.java | 29 +++ .../java/shift/sextiarysector/SSItems.java | 7 + .../shift/sextiarysector/SextiarySector.java | 2 + .../java/shift/sextiarysector/asm/SSCore.java | 2 +- .../sextiarysector/asm/TransformerBottle.java | 2 +- .../asm/TransformerEntityPlayerSP.java | 223 ++++++++++++++++++ .../asm/vanilla/EntityPlayerSPMethod.java | 48 ++++ .../event/CommonEventHandler.java | 24 ++ .../event/PlayerStatusEventHandler.java | 23 ++ .../event/PlayerUnitEventHandler.java | 3 +- .../sextiarysector/player/MoistureStats.java | 5 +- .../sextiarysector/player/StaminaStats.java | 7 +- .../sextiarysector/recipe/RecipesMachine.java | 2 +- .../assets/sextiarysector/lang/en_US.lang | 2 + .../items/food/fish/squid_sashimi.png | Bin 0 -> 341 bytes 16 files changed, 370 insertions(+), 11 deletions(-) create mode 100644 src/main/java/shift/sextiarysector/SSFuels.java create mode 100644 src/main/java/shift/sextiarysector/asm/TransformerEntityPlayerSP.java create mode 100644 src/main/java/shift/sextiarysector/asm/vanilla/EntityPlayerSPMethod.java create mode 100644 src/main/resources/assets/sextiarysector/textures/items/food/fish/squid_sashimi.png diff --git a/build.gradle b/build.gradle index ad86c36..a41b1f6 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.4.3.a-${project.minecraft.version}" +version = "2.4.3.b-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSFuels.java b/src/main/java/shift/sextiarysector/SSFuels.java new file mode 100644 index 0000000..1288eb8 --- /dev/null +++ b/src/main/java/shift/sextiarysector/SSFuels.java @@ -0,0 +1,29 @@ +package shift.sextiarysector; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.IFuelHandler; + +public class SSFuels implements IFuelHandler { + + @Override + public int getBurnTime(ItemStack fuel) { + + if (fuel == null) return 0; + + Item item = fuel.getItem(); + + if (item == null) return 0; + + if (item == SSItems.leaf) return 50; + if (item == Item.getItemFromBlock(SSBlocks.leafBlock)) return 450; + if (item == SSItems.leafBed) return 1600; + if (item == SSItems.woodWateringCan) return 200; + + if (item == SSItems.lavaBottle) return 20000; + + return 0; + + } + +} diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 720a71e..2bf3bc0 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -259,6 +259,9 @@ public class SSItems { public static Item shiitake; + //魚 + public static Item squidSashimi; + //料理 public static Item whiteRice; @@ -719,6 +722,10 @@ public static void initItems() { shiitake = new ItemFoodCrop(woodCrops, 2, 1, 0, 0, 2, 0, false).setUnlocalizedName("ss.shiitake").setTextureName("sextiarysector:food/mushroom/shiitake"); GameRegistry.registerItem(shiitake, "Shiitake"); + //さかな + squidSashimi = new ItemFoodDrink(2, 1.2f, 0, 0.4f, 0, 0, false).setUnlocalizedName("ss.squid_sashimi").setTextureName("sextiarysector:food/fish/squid_sashimi").setCreativeTab(SextiarySectorAPI.TabSSCooking); + GameRegistry.registerItem(squidSashimi, "SquidSashimi"); + //料理 whiteRice = new Item().setUnlocalizedName("ss.white_rice").setTextureName("sextiarysector:food/grain/white_rice").setCreativeTab(SextiarySectorAPI.TabSSCooking); GameRegistry.registerItem(whiteRice, "WhiteRice"); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 9e0c4af..9d119b6 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -32,6 +32,7 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = SextiarySector.MODID, version = SextiarySector.VERSION, dependencies = SextiarySector.DEPENDENCY) public class SextiarySector { @@ -97,6 +98,7 @@ public void preInit(FMLPreInitializationEvent event) SSItems.initItems(); SSBlocks.initBlicks(); SSEntitys.initEntity(); + GameRegistry.registerFuelHandler(new SSFuels()); NetworkRegistry.INSTANCE.registerGuiHandler(this, new SSGuiHandler()); diff --git a/src/main/java/shift/sextiarysector/asm/SSCore.java b/src/main/java/shift/sextiarysector/asm/SSCore.java index cf3a864..5b6063a 100644 --- a/src/main/java/shift/sextiarysector/asm/SSCore.java +++ b/src/main/java/shift/sextiarysector/asm/SSCore.java @@ -12,7 +12,7 @@ public class SSCore implements IFMLLoadingPlugin, IFMLCallHook { @Override public String[] getASMTransformerClass() { - return new String[] { "shift.sextiarysector.asm.TransformerBottle" }; + return new String[] { "shift.sextiarysector.asm.TransformerBottle", "shift.sextiarysector.asm.TransformerEntityPlayerSP" }; } @Override diff --git a/src/main/java/shift/sextiarysector/asm/TransformerBottle.java b/src/main/java/shift/sextiarysector/asm/TransformerBottle.java index 2e686b9..9404624 100644 --- a/src/main/java/shift/sextiarysector/asm/TransformerBottle.java +++ b/src/main/java/shift/sextiarysector/asm/TransformerBottle.java @@ -78,7 +78,7 @@ private byte[] hookOnItemRightClick(String className, byte[] bytes) String mName = FMLDeobfuscatingRemapper.INSTANCE.mapMethodName(className, curMnode.name, curMnode.desc); String mdName = FMLDeobfuscatingRemapper.INSTANCE.mapMethodDesc(curMnode.desc); - System.out.println("[ " + mName + " : " + curMnode.name + " ] [ " + mdName + " : " + curMnode.desc); + //System.out.println("[ " + mName + " : " + curMnode.name + " ] [ " + mdName + " : " + curMnode.desc); if ((targetMethodName.equals(curMnode.name) && targetMethoddesc.equals(curMnode.desc)) || (targetMethodNameSRG.equals(mName) && targetMethoddescSRG.equals(mdName))) { mnode = curMnode; diff --git a/src/main/java/shift/sextiarysector/asm/TransformerEntityPlayerSP.java b/src/main/java/shift/sextiarysector/asm/TransformerEntityPlayerSP.java new file mode 100644 index 0000000..634bb77 --- /dev/null +++ b/src/main/java/shift/sextiarysector/asm/TransformerEntityPlayerSP.java @@ -0,0 +1,223 @@ +package shift.sextiarysector.asm; + +import java.util.Set; + +import net.minecraft.launchwrapper.IClassTransformer; + +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.MethodVisitor; +import org.objectweb.asm.Opcodes; +import org.objectweb.asm.commons.AnalyzerAdapter; + +import com.google.common.collect.Sets; + +import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; + +public class TransformerEntityPlayerSP implements IClassTransformer, Opcodes +{ + // 改変対象のクラスの完全修飾名です。 + // 後述でMinecraft.jar内の難読化されるファイルを対象とする場合の簡易な取得方法を紹介します。 + private static final String TARGET_CLASS_NAME = "net.minecraft.client.entity.EntityPlayerSP"; + + @Override + public byte[] transform(String name, String transformedName, byte[] bytes) + { + try + { + final String targetClassName = "net.minecraft.client.entity.EntityPlayerSP"; + if (targetClassName.equals(transformedName)) { + System.out.println("start transform > EntityPlayerSP"); + ClassReader classReader = new ClassReader(bytes); + ClassWriter classWriter = new ClassWriter(0); + classReader.accept(new addHooksVisitor(name, classWriter), ClassReader.EXPAND_FRAMES); + return classWriter.toByteArray(); + } + } catch (Exception e) + { + throw new RuntimeException("failed : EntityPlayerSP loading", e); + } + + return bytes; + } + + static class addHooksVisitor extends ClassVisitor + { + String owner; + + public addHooksVisitor(String owner, ClassVisitor cv) + { + super(Opcodes.ASM5, cv); + this.owner = owner; + } + + private final Set targetMethodName = Sets.newHashSet("onLivingUpdate", "func_70636_d"); + private final String targetMethoddesc = "()V"; + + private boolean isTransformed = false; + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) + { + + MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); + + if (!isTransformed) { + + FMLDeobfuscatingRemapper remap = FMLDeobfuscatingRemapper.INSTANCE; + + if (targetMethodName.contains(remap.mapMethodName(owner, name, desc)) && targetMethoddesc.equals(remap.mapMethodDesc(desc))) + { + mv = new AddHookMethodVisitor(owner, access, name, desc, mv); + + isTransformed = true; + + } + + } + + return mv; + } + } + + static class AddHookMethodVisitor extends AnalyzerAdapter { + + protected AddHookMethodVisitor(String owner, int access, String name, String desc, MethodVisitor mv) { + super(Opcodes.ASM5, owner, access, name, desc, mv); + } + + private final String targetoOwner = "net/minecraft/util/FoodStats"; + private final Set targetName = Sets.newHashSet("getFoodLevel", "func_75116_a"); + private final String targetDesc = "()I"; + + @Override + public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) { + super.visitMethodInsn(opcode, owner, name, desc, itf); + + FMLDeobfuscatingRemapper remap = FMLDeobfuscatingRemapper.INSTANCE; + if (opcode == Opcodes.INVOKEVIRTUAL + && targetoOwner.equals(remap.map(owner)) + && targetName.contains(remap.mapMethodName(owner, name, desc)) + && targetDesc.equals(remap.mapMethodDesc(desc))) { + + //mv.visitVarInsn(ALOAD, 1); + + this.mv.visitMethodInsn(Opcodes.INVOKESTATIC, "shift/sextiarysector/asm/vanilla/EntityPlayerSPMethod", "isFlag", "(I)I", false); + + } + } + } + + /* + // クラスがロードされる際に呼び出されるメソッドです。 + @Override + public byte[] transform(String name, String transformedName, byte[] basicClass) + { + // FMLRelauncher.side() : Client/Server どちらか一方のを対象とする場合や、 + // 一つのMODで Client/Sever 両方に対応したMODで、この値を判定して処理を変える事ができます。 + // 今回は"CLIENT"と比較し、Client側のファイルを対象としている例です。 + // Client側専用のMODとして公開するのであれば、判定は必須ではありません。 + + // name : 現在ロードされようとしているクラス名が格納されています。 + if (!transformedName.equals(TARGET_CLASS_NAME)) + { + + // 処理対象外なので何もしない + return basicClass; + } + + try + { + // -------------------------------------------------------------- + // ASMを使用し、既存のクラスファイルに改変を施す場合。 + // -------------------------------------------------------------- + return hookOnItemRightClick(name, basicClass); + + } catch (Exception e) + { + throw new RuntimeException("failed : TransformerBottle loading", e); + } + } + + // 下記の想定で実装されています。 + // EntityLiving.class の doRenderLiving の先頭に + // tutorial/test.class の passTestRender(EntityLiving, double, double, double)メソッドの呼び出しを追加する。 + private byte[] hookOnItemRightClick(String className, byte[] bytes) + { + // ASMで、bytesに格納されたクラスファイルを解析します。 + ClassNode cnode = new ClassNode(); + ClassReader reader = new ClassReader(bytes); + reader.accept(cnode, 0); + + // 改変対象のメソッド名です + String targetMethodName = "onLivingUpdate";//"setSprinting"; + String targetMethodNameSRG = "func_70636_d";//"func_70031_b"; + + // 改変対象メソッドの戻り値型および、引数型をあらわします ※1 + String targetMethoddesc = "()V";//"(Z)V"; + String targetMethoddescSRG = "(Z)V"; + + // 対象のメソッドを検索取得します。 + MethodNode mnode = null; + + String mdesc = null; + + for (MethodNode curMnode : cnode.methods) + { + + String mName = FMLDeobfuscatingRemapper.INSTANCE.mapMethodName(className, curMnode.name, curMnode.desc); + String mdName = FMLDeobfuscatingRemapper.INSTANCE.mapMethodDesc(curMnode.desc); + System.out.println("[ " + mName + " : " + curMnode.name + " ] [ " + mdName + " : " + curMnode.desc); + if ((targetMethodName.equals(curMnode.name) && targetMethoddesc.equals(curMnode.desc)) || (targetMethodNameSRG.equals(mName) && targetMethoddescSRG.equals(mdName))) + { + mnode = curMnode; + mdesc = curMnode.desc; + break; + } + } + + if (mnode != null) + { + + InsnList overrideList = new InsnList(); + + // メソッドコールを、バイトコードであらわした例です。 + + overrideList.add(new VarInsnNode(ILOAD, 1)); + overrideList.add(new MethodInsnNode(INVOKESTATIC, + "shift/sextiarysector/asm/vanilla/EntityPlayerSPMethod", + "isSprinting", + "(Z)Z" + , false)); + Label l8 = new Label(); + overrideList.add(new JumpInsnNode(IFEQ, this.getLabelNode(l8))); + overrideList.add(new InsnNode(RETURN)); + overrideList.add(this.getLabelNode(l8)); + + // mnode.instructions.get(1)で、対象のメソッドの先頭を取得 + // mnode.instructions.insertで、指定した位置にバイトコードを挿入します。 + mnode.instructions.insert(mnode.instructions.get(1), overrideList); + + //mnode.maxLocals = 4; + + // 改変したクラスファイルをバイト列に書き出します + ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS); + cnode.accept(cw); + bytes = cw.toByteArray(); + + System.out.println("bbbb"); + } + + return bytes; + } + + protected LabelNode getLabelNode(final Label l) { + if (!(l.info instanceof LabelNode)) { + l.info = new LabelNode(); + } + return (LabelNode) l.info; + } + + */ +} diff --git a/src/main/java/shift/sextiarysector/asm/vanilla/EntityPlayerSPMethod.java b/src/main/java/shift/sextiarysector/asm/vanilla/EntityPlayerSPMethod.java new file mode 100644 index 0000000..c213f20 --- /dev/null +++ b/src/main/java/shift/sextiarysector/asm/vanilla/EntityPlayerSPMethod.java @@ -0,0 +1,48 @@ +package shift.sextiarysector.asm.vanilla; + +import net.minecraft.client.entity.EntityPlayerSP; +import shift.sextiarysector.SextiarySector; +import shift.sextiarysector.player.EntityPlayerManager; + +public class EntityPlayerSPMethod { + + public static boolean isSprinting(boolean p_70031_1_) + { + + if (p_70031_1_) return false; + + try { + + EntityPlayerSP p = (EntityPlayerSP) SextiarySector.proxy.getClientPlayer(); + if (p.sprintingTicksLeft == 0) return false; + float f = 0.8f; + + if (p.movementInput.moveForward < f || p.isCollidedHorizontally) return false; + + if (!(p.getFoodStats().getFoodLevel() > 6.0F || p.capabilities.allowFlying)) return true; + + } catch (Exception e) { + + } + + return false; + } + + public static int isFlag(int i) + { + + try { + + EntityPlayerSP p = (EntityPlayerSP) SextiarySector.proxy.getClientPlayer(); + + if (EntityPlayerManager.getStaminaStats(p).getStaminaLevel() == 0) return 0; + + } catch (Exception e) { + + } + + return 10; + + } + +} diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index 32f5758..e9753ea 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -1,11 +1,14 @@ package shift.sextiarysector.event; +import java.util.Random; + import net.minecraft.block.BlockLeavesBase; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.IMob; +import net.minecraft.entity.passive.EntitySquid; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; @@ -387,6 +390,27 @@ public void DecayEvent(BlockEvent.HarvestDropsEvent event) } + //動物のドロップを増やす + @SubscribeEvent + public void onLivingAnimalDrops(LivingDropsEvent event) + { + + if (event.source.getSourceOfDamage() == null || event.source.getEntity() == null) { + return; + } + + double x = event.entityLiving.posX; + double y = event.entityLiving.posY; + double z = event.entityLiving.posZ; + + Random r = event.entityLiving.worldObj.rand; + + if (event.entityLiving instanceof EntitySquid) { + event.drops.add(new EntityItem(event.entityLiving.worldObj, x, y, z, new ItemStack(SSItems.squidSashimi, r.nextInt(5) + 1))); + } + + } + /* @SubscribeEvent public void onFluidRegisterEvent(FluidRegisterEvent event) { diff --git a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java index 9603722..7174752 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerStatusEventHandler.java @@ -5,11 +5,14 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.LivingAttackEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.AttackEntityEvent; import net.minecraftforge.event.entity.player.PlayerUseItemEvent; @@ -45,6 +48,26 @@ public void onPlayerUseItemEvent(PlayerUseItemEvent.Finish event) { } + /*** + * 空腹時のダメージを無効 + */ + + @SubscribeEvent + public void onPlayerUseItemEvent(LivingAttackEvent event) { + + if (!(event.entityLiving instanceof EntityPlayer)) return; + + if (event.source == DamageSource.starve) { + event.setCanceled(true); + } + + } + + @SubscribeEvent + public void onPlayerUseItemEvent(LivingUpdateEvent event) { + + } + /** * 水分関係 */ diff --git a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java index 09c93e7..3bb7641 100644 --- a/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/PlayerUnitEventHandler.java @@ -26,6 +26,7 @@ public void livingDashEvent(LivingUpdateEvent event) { // return; //} + /* if (!(event.entityLiving instanceof EntityPlayer)) { return; } @@ -50,7 +51,7 @@ public void livingDashEvent(LivingUpdateEvent event) { player.motionZ *= 1.1; //player.capabilities.setPlayerWalkSpeed(0.16f); - } + }*/ } diff --git a/src/main/java/shift/sextiarysector/player/MoistureStats.java b/src/main/java/shift/sextiarysector/player/MoistureStats.java index e77aede..eb00b0a 100644 --- a/src/main/java/shift/sextiarysector/player/MoistureStats.java +++ b/src/main/java/shift/sextiarysector/player/MoistureStats.java @@ -2,7 +2,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; import net.minecraft.world.EnumDifficulty; import shift.sextiarysector.Config; import cpw.mods.fml.relauncher.Side; @@ -65,7 +64,7 @@ else if (i.getDifficultyId() > 0 || Config.peacefulMoisture) { ++this.moistureTimer; - if (this.moistureTimer >= 80) + if (this.moistureTimer >= 160) { par1EntityPlayer.heal(1.0F); this.addExhaustion(3.0F); @@ -80,7 +79,7 @@ else if (this.moistureLevel <= 0) { if (par1EntityPlayer.getHealth() > 10.0F || i.getDifficultyId() >= 3 || par1EntityPlayer.getHealth() > 1.0F && i.getDifficultyId() >= 2) { - par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); + //par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); } this.moistureTimer = 0; diff --git a/src/main/java/shift/sextiarysector/player/StaminaStats.java b/src/main/java/shift/sextiarysector/player/StaminaStats.java index 6a90395..8fcc1d3 100644 --- a/src/main/java/shift/sextiarysector/player/StaminaStats.java +++ b/src/main/java/shift/sextiarysector/player/StaminaStats.java @@ -2,6 +2,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; import net.minecraft.world.EnumDifficulty; import shift.sextiarysector.Config; import cpw.mods.fml.relauncher.Side; @@ -84,9 +85,9 @@ else if (this.staminaLevel <= 0) { if (par1EntityPlayer.getHealth() > 10.0F || i.getDifficultyId() >= 3 || par1EntityPlayer.getHealth() > 1.0F && i.getDifficultyId() >= 2) { - //if(!par1EntityPlayer.isPlayerSleeping()){ - // par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); - //} + if (!par1EntityPlayer.isPlayerSleeping()) { + par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); + } //par1EntityPlayer.attackEntityFrom(DamageSource.starve, 1.0F); } diff --git a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java index 0a58852..1690729 100644 --- a/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java +++ b/src/main/java/shift/sextiarysector/recipe/RecipesMachine.java @@ -174,7 +174,7 @@ public static void addRecipes(CraftingManager p_77608_1_) Character.valueOf('y'), "gearStone", Character.valueOf('x'), SSItems.stoneGFStorage, Character.valueOf('z'), SSBlocks.machineFrame, - Character.valueOf('a'), "ingotBrass" + Character.valueOf('a'), "ingotZinc" })); p_77608_1_.getRecipeList().add(new ShapedOreRecipe(new ItemStack(SSBlocks.spinningMachine, 1), diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index a9b9eaf..ecad24e 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -372,6 +372,8 @@ item.ss.rice.name=Rice item.ss.shiitake.name=Shiitake +item.ss.squid_sashimi.name=Squid Sashimi + item.ss.white_rice.name=White Rice item.ss.salt.name=Salt diff --git a/src/main/resources/assets/sextiarysector/textures/items/food/fish/squid_sashimi.png b/src/main/resources/assets/sextiarysector/textures/items/food/fish/squid_sashimi.png new file mode 100644 index 0000000000000000000000000000000000000000..182bebd253cf4a72d9f2878b02c54b06622f2a78 GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sBuf-vKbiP>*~g6t)pzOL+d*(7+>lm)C*HUovOdb&7GD7>!tbj!2QRC9Lx Date: Fri, 28 Aug 2015 15:48:20 +0900 Subject: [PATCH 90/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=EF=BC=9A=E8=91=89?= =?UTF-8?q?=E3=81=A3=E3=81=B1=E3=81=8C=E6=97=A9=E3=81=8F=E6=B6=88=E6=BB=85?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・葉っぱが早く消滅するように ・豆腐モーターのレシピを追加 ・大型かまどで燃料が無限増殖するのを修正 --- build.gradle | 2 +- .../java/shift/sextiarysector/SSItems.java | 2 +- .../shift/sextiarysector/SextiarySector.java | 2 + .../container/ContainerLargeFurnace.java | 438 +++++++++--------- .../event/CommonEventHandler.java | 54 +++ .../sextiarysector/plugin/PluginTofu.java | 18 + 6 files changed, 301 insertions(+), 215 deletions(-) diff --git a/build.gradle b/build.gradle index a41b1f6..63f7c49 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ sourceSets.main { resources.srcDirs project.projectDir.name } -version = "2.4.3.b-${project.minecraft.version}" +version = "2.4.3.c-${project.minecraft.version}" minecraft { // replacing stuff in the source diff --git a/src/main/java/shift/sextiarysector/SSItems.java b/src/main/java/shift/sextiarysector/SSItems.java index 2bf3bc0..6c1e283 100644 --- a/src/main/java/shift/sextiarysector/SSItems.java +++ b/src/main/java/shift/sextiarysector/SSItems.java @@ -776,7 +776,7 @@ public static void initItems() { GameRegistry.registerItem(chocolate, "Chocolate"); //飲み物 - drinkingWaterBottle = new ItemDrink(0, 2.5f, 3, 6.5f, 0, 0, false).setUnlocalizedName("ss.drinking_water_bottle").setTextureName("sextiarysector:fluid/drinking_water_bottle"); + drinkingWaterBottle = new ItemDrink(0, 2.5f, 5, 7.8f, 0, 0, false).setUnlocalizedName("ss.drinking_water_bottle").setTextureName("sextiarysector:fluid/drinking_water_bottle"); GameRegistry.registerItem(drinkingWaterBottle, "DrinkingWaterBottle"); takumiTeaBottle = new ItemDrink(0, 0.0f, 6, 9.5f, 0, 0, false).setUnlocalizedName("ss.takumi_tea_bottle").setTextureName("sextiarysector:fluid/takumi_tea_bottle"); diff --git a/src/main/java/shift/sextiarysector/SextiarySector.java b/src/main/java/shift/sextiarysector/SextiarySector.java index 9d119b6..b94b8aa 100644 --- a/src/main/java/shift/sextiarysector/SextiarySector.java +++ b/src/main/java/shift/sextiarysector/SextiarySector.java @@ -146,6 +146,8 @@ public void init(FMLInitializationEvent event) SSPlugins.initPlugins(event); + //Blocks.leaves.setTickRandomly(true); + } @Mod.EventHandler diff --git a/src/main/java/shift/sextiarysector/container/ContainerLargeFurnace.java b/src/main/java/shift/sextiarysector/container/ContainerLargeFurnace.java index 53a8f7a..8b831fd 100644 --- a/src/main/java/shift/sextiarysector/container/ContainerLargeFurnace.java +++ b/src/main/java/shift/sextiarysector/container/ContainerLargeFurnace.java @@ -12,228 +12,240 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ContainerLargeFurnace extends Container{ +public class ContainerLargeFurnace extends Container { public InventoryFurnaceCrafting craftMatrix;// = new InventoryCrafting(this, 3, 3); public InventoryBuffer buffer; private final TileEntityLargeFurnace furnace; - private int lastCookTime; - private int lastBurnTime; - private int lastItemBurnTime; - - public ContainerLargeFurnace(InventoryPlayer par1InventoryPlayer, TileEntityLargeFurnace par2TileEntityFurnace) - { - this.furnace = par2TileEntityFurnace; - this.craftMatrix = par2TileEntityFurnace.craftMatrix; - this.buffer = par2TileEntityFurnace.buffer; - this.craftMatrix.setEventHandler(this); - //this.addSlotToContainer(new Slot(par2TileEntityFurnace, 0, 56, 17)); - //2 1 - this.addSlotToContainer(new Slot(par2TileEntityFurnace, 18, 15, 46));//1 - this.addSlotToContainer(new SlotFurnace(par1InventoryPlayer.player, par2TileEntityFurnace, 19, 135, 35));//2 - int i; - - //9 10 - for (int l = 0; l < 3; ++l) - { - for (int i1 = 0; i1 < 3; ++i1) - { - this.addSlotToContainer(new Slot(this.craftMatrix, i1 + l * 3, 41 + i1 * 18, 17 + l * 18)); - } - } - - //Buffer 18 28 - for (i = 0; i < 9; ++i) - { - this.addSlotToContainer(new Slot(buffer, i, 8 + i * 18, 88)); - } - for (i = 9; i < 18; ++i) - { - this.addSlotToContainer(new Slot(buffer, i, 8 + (i-9) * 18, 108)); - } - - //27 55 - for (i = 0; i < 3; ++i) - { - for (int j = 0; j < 9; ++j) - { - this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84+56 + i * 18)); - } - } - - //9 64 - for (i = 0; i < 9; ++i) - { - this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142+56)); - } - } - - @Override + private int lastCookTime; + private int lastBurnTime; + private int lastItemBurnTime; + + public ContainerLargeFurnace(InventoryPlayer par1InventoryPlayer, TileEntityLargeFurnace par2TileEntityFurnace) + { + this.furnace = par2TileEntityFurnace; + this.craftMatrix = par2TileEntityFurnace.craftMatrix; + this.buffer = par2TileEntityFurnace.buffer; + this.craftMatrix.setEventHandler(this); + //this.addSlotToContainer(new Slot(par2TileEntityFurnace, 0, 56, 17)); + //2 1 + this.addSlotToContainer(new Slot(par2TileEntityFurnace, 18, 15, 46));//1 + this.addSlotToContainer(new SlotFurnace(par1InventoryPlayer.player, par2TileEntityFurnace, 19, 135, 35));//2 + int i; + + //9 10 + for (int l = 0; l < 3; ++l) + { + for (int i1 = 0; i1 < 3; ++i1) + { + this.addSlotToContainer(new Slot(this.craftMatrix, i1 + l * 3, 41 + i1 * 18, 17 + l * 18)); + } + } + + //Buffer 18 28 + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(buffer, i, 8 + i * 18, 88)); + } + for (i = 9; i < 18; ++i) + { + this.addSlotToContainer(new Slot(buffer, i, 8 + (i - 9) * 18, 108)); + } + + //27 55 + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + 56 + i * 18)); + } + } + + //9 64 + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142 + 56)); + } + } + + @Override public void addCraftingToCrafters(ICrafting par1ICrafting) - { - super.addCraftingToCrafters(par1ICrafting); - par1ICrafting.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime); - par1ICrafting.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime); - par1ICrafting.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime); - } - - /** - * Looks for changes made in the container, sends them to every listener. - */ - @Override + { + super.addCraftingToCrafters(par1ICrafting); + par1ICrafting.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime); + par1ICrafting.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime); + par1ICrafting.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime); + } + + /** + * Looks for changes made in the container, sends them to every listener. + */ + @Override public void detectAndSendChanges() - { - super.detectAndSendChanges(); - - for (int i = 0; i < this.crafters.size(); ++i) - { - ICrafting icrafting = (ICrafting)this.crafters.get(i); - - if (this.lastCookTime != this.furnace.furnaceCookTime) - { - icrafting.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime); - } - - if (this.lastBurnTime != this.furnace.furnaceBurnTime) - { - icrafting.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime); - } - - if (this.lastItemBurnTime != this.furnace.currentItemBurnTime) - { - icrafting.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime); - } - } - - this.lastCookTime = this.furnace.furnaceCookTime; - this.lastBurnTime = this.furnace.furnaceBurnTime; - this.lastItemBurnTime = this.furnace.currentItemBurnTime; - } - - @Override + { + super.detectAndSendChanges(); + + for (int i = 0; i < this.crafters.size(); ++i) + { + ICrafting icrafting = (ICrafting) this.crafters.get(i); + + if (this.lastCookTime != this.furnace.furnaceCookTime) + { + icrafting.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime); + } + + if (this.lastBurnTime != this.furnace.furnaceBurnTime) + { + icrafting.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime); + } + + if (this.lastItemBurnTime != this.furnace.currentItemBurnTime) + { + icrafting.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime); + } + } + + this.lastCookTime = this.furnace.furnaceCookTime; + this.lastBurnTime = this.furnace.furnaceBurnTime; + this.lastItemBurnTime = this.furnace.currentItemBurnTime; + } + + @Override @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) - { - if (par1 == 0) - { - this.furnace.furnaceCookTime = par2; - } - - if (par1 == 1) - { - this.furnace.furnaceBurnTime = par2; - } - - if (par1 == 2) - { - this.furnace.currentItemBurnTime = par2; - } - } - - @Override + public void updateProgressBar(int par1, int par2) + { + if (par1 == 0) + { + this.furnace.furnaceCookTime = par2; + } + + if (par1 == 1) + { + this.furnace.furnaceBurnTime = par2; + } + + if (par1 == 2) + { + this.furnace.currentItemBurnTime = par2; + } + } + + @Override public boolean canInteractWith(EntityPlayer par1EntityPlayer) - { - return this.furnace.isUseableByPlayer(par1EntityPlayer); - } - - /** - * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. - */ - @Override + { + return this.furnace.isUseableByPlayer(par1EntityPlayer); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + @Override public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) - { - ItemStack itemstack = null; - Slot slot = (Slot)this.inventorySlots.get(par2); - - if (slot != null && slot.getHasStack()) - { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - if (par2 == 1) - { - if (!this.mergeItemStack(itemstack1, 29, 65, true)) - { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } - else if (par2 >= 11 && par2 <= 64) - { - if (TileEntityFurnace.isItemFuel(itemstack1)) - { - - - if(par2<=19){ - if (!this.mergeItemStack(itemstack1, 0, 1, false)) - { - return null; - } - } - else if (!this.mergeItemStack(itemstack1, 11, 20, false)) - { - if (!this.mergeItemStack(itemstack1, 20, 65, false)) - { - return null; - } - } - } - else if (par2 >= 11 && par2 <= 28) - { - if (!this.mergeItemStack(itemstack1, 29, 65, false)) - { - return null; - } - }else if (par2 >= 29 && par2 <= 55) - { - if (!this.mergeItemStack(itemstack1, 11, 20, false)) - { - - if (!this.mergeItemStack(itemstack1, 56, 65, false)) - { - return null; - } - - } - }else if (par2 >= 56 && par2 <= 64) - { - if (!this.mergeItemStack(itemstack1, 11,20, false)) - { - - if (!this.mergeItemStack(itemstack1, 29, 56, false)) - { - return null; - } - - } - } - } - else if (!this.mergeItemStack(itemstack1, 29, 65, false)) - { - return null; - } - - if (itemstack1.stackSize == 0) - { - slot.putStack((ItemStack)null); - } - else - { - slot.onSlotChanged(); - } - - - if (itemstack1.stackSize == itemstack.stackSize) - { - return null; - } - - slot.onPickupFromSlot(par1EntityPlayer, itemstack1); - } - - return itemstack; - } + { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(par2); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (par2 == 1) + { + if (!this.mergeItemStack(itemstack1, 29, 65, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (par2 >= 11 && par2 <= 64) + { + if (TileEntityFurnace.isItemFuel(itemstack1)) + { + + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return null; + } + //else if (!this.mergeItemStack(itemstack1, 11, 20, false)) { + + // return null; + + //} + + // if (par2 <= 19) { + // if (!this.mergeItemStack(itemstack1, 0, 1, false)) + // { + // return null; + // } + // } + // else if (!this.mergeItemStack(itemstack1, 11, 65, false)) { + // return null; + // } + // else if (!this.mergeItemStack(itemstack1, 11, 20, false)) + // { + // if (!this.mergeItemStack(itemstack1, 20, 65, false)) + // { + // return null; + // } + // } + + } + else if (par2 >= 11 && par2 <= 28) + { + if (!this.mergeItemStack(itemstack1, 29, 65, false)) + { + return null; + } + } else if (par2 >= 29 && par2 <= 55) + { + if (!this.mergeItemStack(itemstack1, 11, 20, false)) + { + + if (!this.mergeItemStack(itemstack1, 56, 65, false)) + { + return null; + } + + } + } else if (par2 >= 56 && par2 <= 64) + { + if (!this.mergeItemStack(itemstack1, 11, 20, false)) + { + + if (!this.mergeItemStack(itemstack1, 29, 56, false)) + { + return null; + } + + } + } + } + else if (!this.mergeItemStack(itemstack1, 29, 65, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack) null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(par1EntityPlayer, itemstack1); + } + + return itemstack; + } } diff --git a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java index e9753ea..caee708 100644 --- a/src/main/java/shift/sextiarysector/event/CommonEventHandler.java +++ b/src/main/java/shift/sextiarysector/event/CommonEventHandler.java @@ -2,6 +2,7 @@ import java.util.Random; +import net.minecraft.block.Block; import net.minecraft.block.BlockLeavesBase; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -388,8 +389,61 @@ public void DecayEvent(BlockEvent.HarvestDropsEvent event) if (event.world.rand.nextBoolean()) event.drops.add(new ItemStack(Items.stick, event.world.rand.nextInt(1) + 1)); if (event.world.rand.nextBoolean()) event.drops.add(new ItemStack(SSItems.leaf, event.world.rand.nextInt(2) + 1)); + byte b0 = 2; + int i1 = b0 + 1; + + if (event.world.checkChunksExist(event.x - i1, event.y - i1, event.z - i1, event.x + i1, event.y + i1, event.z + i1)) + { + for (int j1 = -b0; j1 <= b0; ++j1) + { + for (int k1 = -b0; k1 <= b0; ++k1) + { + for (int l1 = -b0; l1 <= b0; ++l1) + { + Block block = event.world.getBlock(event.x + j1, event.y + k1, event.z + l1); + if (block.isLeaves(event.world, event.x + j1, event.y + k1, event.z + l1)) + { + //block.updateTick(event.world, event.x + j1, event.y + k1, event.z + l1, event.world.rand); + event.world.scheduleBlockUpdate(event.x + j1, event.y + k1, event.z + l1, block, 20 + event.world.rand.nextInt(8)); + } + } + } + } + } + + //for (int i = 0; i < 2; i++) { + // this.updateLeavesTick(event); + //} + } + /* + @SubscribeEvent + public void DecayEvent(BlockEvent.BreakEvent event) + { + + byte b0 = 2; + int i1 = b0 + 1; + + if (event.world.checkChunksExist(event.x - i1, event.y - i1, event.z - i1, event.x + i1, event.y + i1, event.z + i1)) + { + for (int j1 = -b0; j1 <= b0; ++j1) + { + for (int k1 = -b0; k1 <= b0; ++k1) + { + for (int l1 = -b0; l1 <= b0; ++l1) + { + Block block = event.world.getBlock(event.x + j1, event.y + k1, event.z + l1); + if (block.isLeaves(event.world, event.x + j1, event.y + k1, event.z + l1)) + { + block.updateTick(event.world, event.x + j1, event.y + k1, event.z + l1, event.world.rand); + } + } + } + } + } + }*/ + //動物のドロップを増やす @SubscribeEvent public void onLivingAnimalDrops(LivingDropsEvent event) diff --git a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java index a4bc87c..667b9c0 100644 --- a/src/main/java/shift/sextiarysector/plugin/PluginTofu.java +++ b/src/main/java/shift/sextiarysector/plugin/PluginTofu.java @@ -2,7 +2,12 @@ import net.minecraft.block.Block; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.ShapedOreRecipe; +import shift.sextiarysector.SSBlocks; +import shift.sextiarysector.SSItems; import shift.sextiarysector.api.SextiarySectorAPI; import shift.sextiarysector.block.BlockTofuMotor; import shift.sextiarysector.item.ItemBlockDirection; @@ -27,6 +32,8 @@ public String getModName() { public static Item filterCloth; + public static Item tfCircuit; + @Override public void prePlugin(FMLPreInitializationEvent event) { tofuMotor = new BlockTofuMotor().setBlockName("ss.tofu_motor").setBlockTextureName("glass").setCreativeTab(SextiarySectorAPI.TabSSIndustry); @@ -51,6 +58,17 @@ public void initPlugin(FMLInitializationEvent event) { filterCloth = GameRegistry.findItem("TofuCraft", "filterCloth"); OreDictionary.registerOre("craftingFilterCloth", filterCloth); + tfCircuit = GameRegistry.findItem("TofuCraft", "materials"); + + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(this.tofuMotor, 1), + new Object[] { "xzx", "xyx", "pbp", + Character.valueOf('x'), "paneGlassColorless", + Character.valueOf('y'), SSItems.energyReactor, + Character.valueOf('z'), SSBlocks.stoneShaft, + Character.valueOf('b'), new ItemStack(tfCircuit, 1, 3), + Character.valueOf('p'), new ItemStack(tfCircuit, 1, 4) + })); + } @Override From da4e7e95fdad1f21b137eb249f5cf475379c070e Mon Sep 17 00:00:00 2001 From: shift02 Date: Fri, 28 Aug 2015 20:31:47 +0900 Subject: [PATCH 91/96] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=EF=BC=9A=E9=BB=92?= =?UTF-8?q?=E6=9B=9C=E7=9F=B3=E3=81=AELang=E3=83=87=E3=83=BC=E3=82=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/assets/sextiarysector/lang/en_US.lang | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/resources/assets/sextiarysector/lang/en_US.lang b/src/main/resources/assets/sextiarysector/lang/en_US.lang index ecad24e..7dd2de5 100644 --- a/src/main/resources/assets/sextiarysector/lang/en_US.lang +++ b/src/main/resources/assets/sextiarysector/lang/en_US.lang @@ -233,6 +233,8 @@ item.ss.silver_nugget.name=Silver Nugget item.ss.steel_nugget.name=Steel Nugget item.ss.ninja_nugget.name=Ninja Nugget +item.ss.obsidian_nugget.name=Obsidian Nugget + item.ss.steel_ingot.name=Steel Ingot item.ss.brass_ingot.name=Brass Ingot From 874e6c03be52bbf4b085b16180a63db6dff92b56 Mon Sep 17 00:00:00 2001 From: shift02 Date: Fri, 4 Sep 2015 19:39:31 +0900 Subject: [PATCH 92/96] =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=9AForge=E3=81=AE?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=921448?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 10 +- build.bat | 2 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 51017 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 164 +++++++++++++++++++++++ gradlew.bat | 90 +++++++++++++ setup.bat | 3 + 7 files changed, 274 insertions(+), 1 deletion(-) create mode 100644 build.bat create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 setup.bat diff --git a/.gitignore b/.gitignore index 0d43df0..00d4a90 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,12 @@ /*.exe /*.classpath /*.project -*.xcf \ No newline at end of file +*.xcf +/eclipse +.settings/org.eclipse.jdt.core.prefs +CREDITS-fml.txt +LICENSE-fml.txt +MinecraftForge-Credits.txt +MinecraftForge-License.txt +README.txt +forge-1.7.10-10.13.4.1448-1.7.10-changelog.txt diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..3c93bfe --- /dev/null +++ b/build.bat @@ -0,0 +1,2 @@ +call gradlew.bat build +pause \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..b7612167031001b7b84baf2a959e8ea8ad03c011 GIT binary patch literal 51017 zcmaI7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gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..8a0b282 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/setup.bat b/setup.bat new file mode 100644 index 0000000..62356fc --- /dev/null +++ b/setup.bat @@ -0,0 +1,3 @@ +call gradlew.bat setupDevWorkspace +call gradlew.bat eclipse +pause \ No newline at end of file From 413f57ea84fc2a83e19546c6818b9d60954b605c Mon Sep 17 00:00:00 2001 From: shift02 Date: Fri, 4 Sep 2015 19:47:00 +0900 Subject: [PATCH 93/96] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9Amaster?= =?UTF-8?q?=E3=83=97=E3=83=AD=E3=82=B8=E3=82=A7=E3=82=AF=E3=83=88=E3=81=8C?= =?UTF-8?q?=E7=84=A1=E3=81=8F=E3=81=A6=E3=82=82=E8=B5=B7=E5=8B=95=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 70 +++++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/build.gradle b/build.gradle index 63f7c49..eac805e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,72 +1,76 @@ -sourceSets.main { - java.srcDirs project.projectDir.name - resources.srcDirs project.projectDir.name +buildscript { + repositories { + mavenCentral() + maven { + name = "forge" + url = "http://files.minecraftforge.net/maven" + } + maven { + name = "sonatype" + url = "https://oss.sonatype.org/content/repositories/snapshots/" + } + } + dependencies { + classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' + } } - -version = "2.4.3.c-${project.minecraft.version}" + +apply plugin: 'forge' + +version = "2.4.3.d-1.7.10"//${project.minecraft.version}" +group= "shift.SextiarySector2" // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = "SextiarySector2" minecraft { - // replacing stuff in the source + version = "1.7.10-10.13.4.1448-1.7.10" + runDir = "eclipse" + assetDir = "eclipse/assets" + replace '@VERSION@', project.version replace '@MC_VERSION@', version } -dependencies { -compile project(':MCEconomy2') -compile fileTree(dir: 'api', include: '*.jar') +[compileJava, compileTestJava,recompMinecraft].each{ + it.options.encoding = 'UTF-8' + it.options.compilerArgs += ['-source', '1.7', '-target', '1.7'] } -//RpC̕R[hwJavão[WwB̏Ȃgradle2.0ł͓ȂB - [compileJava, compileTestJava,recompMinecraft].each{ - it.options.encoding = 'UTF-8' - it.options.compilerArgs += ['-source', '1.7', '-target', '1.7'] - } +dependencies { + compile fileTree(dir: 'api', include: '*.jar') +} processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version - + // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' - + // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } - + // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' - exclude 'dependencies.info' } - - //from(sourceSets.main.java.srcDirs+'/shift/sextiarysector/api/') { - //include '**/shift/sextiarysector/api/' - -// into sourceSets.main.java.srcDirs - //} - } jar { + into('src/shift/sextiarysector/api') { from 'src/main/java/shift/sextiarysector/api' } manifest { - attributes 'FMLCorePlugin' : 'shift.sextiarysector.asm.SSCore','FMLCorePluginContainsFMLMod':'true' - } + attributes 'FMLCorePlugin' : 'shift.sextiarysector.asm.SSCore','FMLCorePluginContainsFMLMod':'true' + } } -//jar { -// manifest { -// attributes 'FMLCorePlugin' : 'shift.sextiarysector.asm.DepLoader','FMLCorePluginContainsFMLMod':'true' -// } -//} - task devJar(type: Jar) { from sourceSets.main.output from sourceSets.main.allSource From fcf756514af6b1ec39ba51ae043a6ac3cfc50c75 Mon Sep 17 00:00:00 2001 From: flammpfeil Date: Thu, 8 Oct 2015 22:06:08 +0900 Subject: [PATCH 94/96] fix ItemFoodDrink staminaSaturationModifier is not used --- src/main/java/shift/sextiarysector/item/ItemFoodDrink.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/shift/sextiarysector/item/ItemFoodDrink.java b/src/main/java/shift/sextiarysector/item/ItemFoodDrink.java index d45a227..5154934 100644 --- a/src/main/java/shift/sextiarysector/item/ItemFoodDrink.java +++ b/src/main/java/shift/sextiarysector/item/ItemFoodDrink.java @@ -32,7 +32,7 @@ public ItemFoodDrink(int food, float foodM, int drink, float drinkM, int stamina this.moistureSaturationModifier = drinkM; this.healStaminaAmount = stamina; - this.saturationModifier = staminaM; + this.staminaSaturationModifier = staminaM; this.setCreativeTab(SextiarySectorAPI.TabSSCooking); From bed4623161df80f52f727a0b40d327fc05e147b6 Mon Sep 17 00:00:00 2001 From: jiuyaolx <252879950@qq.com> Date: Fri, 9 Oct 2015 22:21:22 +0800 Subject: [PATCH 95/96] Update zh_CN.lang --- .../assets/sextiarysector/lang/zh_CN.lang | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/main/resources/assets/sextiarysector/lang/zh_CN.lang b/src/main/resources/assets/sextiarysector/lang/zh_CN.lang index ad9a819..86c0a8b 100644 --- a/src/main/resources/assets/sextiarysector/lang/zh_CN.lang +++ b/src/main/resources/assets/sextiarysector/lang/zh_CN.lang @@ -1,6 +1,6 @@ #简体中文 zh_CN -#方块 +#black tile.ss.large_furnace.name=大型熔炉 tile.ss.fluid_furnace.name=流体熔炉 @@ -70,7 +70,6 @@ tile.ss.ninja_block.name=忍者方块 tile.ss.mithril_block.name=秘银方块 tile.ss.orichalcum_block.name=山铜方块 - tile.ss.small_windmill.name=小型风车 tile.ss.windmill.name=风车 tile.ss.large_windmill.name=大型风车 @@ -179,7 +178,6 @@ item.ss.ninja_gf_storage.name=忍者GF存储器 item.ss.orichalcum_gf_storage.name=山铜GF存储器 item.ss.hammer.name=锤子 -item.ss.color_spray.name=彩色喷雾 item.ss.calendar.name=日历 item.ss.season_stone.name=季节之石 @@ -207,16 +205,6 @@ item.ss.zinc_dust.name=锌粉 item.ss.mithril_dust.name=秘银粉 - -item.ss.iron_nugget.name=铁粒 -item.ss.copper_nugget.name=铜粒 -item.ss.zinc_nugget.name=锌粒 -item.ss.silver_nugget.name=银粒 - -item.ss.steel_nugget.name=钢粒 -item.ss.ninja_nugget.name=忍者粒 - - item.ss.steel_ingot.name=钢锭 item.ss.brass_ingot.name=黄铜锭 @@ -227,17 +215,26 @@ item.ss.copper_ingot.name=铜锭 item.ss.zinc_ingot.name=锌锭 item.ss.silver_ingot.name=银锭 +item.ss.craft_reactor.name=合成反应器 item.ss.mithril_ingot.name=秘银锭 item.ss.orichalcum_gem.name=山铜锭 item.ss.ninja_ingot.name=忍者锭 +item.ss.iron_nugget.name=铁粒 +item.ss.copper_nugget.name=铜粒 +item.ss.zinc_nugget.name=锌粒 +item.ss.silver_nugget.name=银粒 + +item.ss.steel_nugget.name=钢粒 +item.ss.ninja_nugget.name=忍者粒 + +item.ss.obsidian_nugget.name=黑曜石粒 + item.ss.red_gel.name=红石凝胶 item.ss.blue_gel.name=蓝石凝胶 item.ss.yellow_gel.name=黄石凝胶 - -item.ss.craft_reactor.name=合成反应器 item.ss.energy_reactor.name=能源反应器 item.ss.object_reactor.name=目标反应器 @@ -256,7 +253,7 @@ item.ss.magic_dust.name=魔力粉 item.ss.silk_bobbin.name=丝绸卷 -item.ss.silk_cloth.name=丝绸布匹 +item.ss.cloth.name=布匹 item.ss.small_cloth.name=小型布匹 item.ss.canvas.name=帆布 item.ss.drying_flesh.name=干燥腐肉 @@ -276,19 +273,14 @@ item.ss.stone_scoop.name=石铲 item.ss.iron_scoop.name=铁铲 item.ss.gold_scoop.name=金铲 item.ss.diamond_scoop.name=钻石铲 - item.ss.brass_scoop.name=黄铜铲 - - item.ss.wood_knife.name=木质小刀 item.ss.stone_knife.name=石质小刀 item.ss.iron_knife.name=铁质小刀 item.ss.gold_knife.name=金质小刀 item.ss.diamond_knife.name=钻石小刀 - -item.ss.brass_knife.name=黄铜小 - +item.ss.brass_knife.name=黄铜小刀 item.ss.copper_shovel.name=铜锹 item.ss.copper_pickaxe.name=铜镐 @@ -302,13 +294,6 @@ item.ss.brass_axe.name=黄铜斧 item.ss.brass_sword.name=黄铜剑 item.ss.brass_hoe.name=黄铜锄 -item.ss.ninja_shovel.name=忍者锹 -item.ss.ninja_pickaxe.name=忍者镐 -item.ss.ninja_axe.name=忍者斧 -item.ss.ninja_sword.name=忍者剑 -item.ss.ninja_hoe.name=忍者锄 - - item.ss.copper_helmet.name=铜头盔 item.ss.copper_chestplate.name=铜胸甲 item.ss.copper_leggings.name=铜护腿 @@ -344,8 +329,6 @@ item.ss.golden_corn.name=金玉米 item.ss.eggplant.name=茄子 item.ss.sweet_potato.name=甘薯 -item.ss.green_pepper.name=青椒 - item.ss.blue_potato.name=蓝土豆 item.ss.radish.name=白萝卜 @@ -355,6 +338,8 @@ item.ss.rice.name=稻米 item.ss.shiitake.name=香菇 +item.ss.squid_sashimi.name=鱿鱼刺身 + item.ss.white_rice.name=大米 item.ss.salt.name=盐 @@ -396,10 +381,18 @@ item.ss.defense_unit.name=防御单元 item.ss.attack_rust_unit.name=生锈攻击单元 item.ss.defense_rust_unit.name=生锈防御单元 item.ss.jump_unit.name=跳跃单元 +item.ss.dash_unit.name=冲刺单元 +item.ss.slowly_unit.name=慢步单元 +item.ss.pulling_unit.name=强弓单元 +item.ss.multi_schott_unit.name=多重射击单元 +item.ss.bed_monster_unit.name=睡眠单元 item.ss.pickaxe_unit.name=采掘单元 +item.ss.magic_contact_lenses.name=魔法隐形眼镜 + item.ss.debug_unit.name=调试单元 +item.ss.quiver.name=箭袋 item.ss.iron_ring.name=铁指环 item.ss.creeper_ring.name=爬行者商店指环 @@ -408,7 +401,7 @@ item.ss.xp_ring.name=经验指环 -#Fluid +#液体 fluid.ss.takumi_tea=TAKUMI 茶 fluid.ss.drinking_water=饮用水 fluid.ss.spring_water=泉水 @@ -456,7 +449,6 @@ gui.ss.funnel=流体漏斗 gui.ss.shipping_box=船舶箱子 - gui.ss.rucksack=帆布包 gui.ss.steam_motor=蒸汽引擎 @@ -479,7 +471,7 @@ gui.ss.gf_tank_5=山铜GF罐 #Shop shop.ss.creeper=爬行者商店 -shop.ss.robot=红色机器人商店 +shop.ss.robot=机器人商店 #ToolTip tooltip.season.pm=下午 @@ -652,9 +644,9 @@ achievement.ss.mithril_ore.desc2=指环呢? achievement.ss.industry=SS2 -工业- -achievement.ss.blue_gel=不思议凝胶 -achievement.ss.blue_gel.desc=合成一个蓝色凝胶 -achievement.ss.blue_gel.desc2=多么棒啊 +achievement.ss.bluestone_slime_ball=不思议凝胶 +achievement.ss.bluestone_slime_ball.desc=合成一个蓝色凝胶 +achievement.ss.bluestone_slime_ball.desc2=多么棒啊 achievement.ss.wood_gear=新兴能源 @@ -758,6 +750,14 @@ achievement.ss.shipping.desc=试试来装载货物 achievement.ss.shipping.desc2=我可是百万富翁! + +#Dep +dep.ss.error1=是需要的程序库 +dep.ss.error2=不能下载。 +dep.ss.error2=确认互联网连接,手动重启 +dep.ss.error3=下载请放入文件夹mods。 + + #NEI nei.recipe=合成配方 nei.ss.furnace.shaped=熔炉有序配方 From 6a627bb7b8158eaf7756d4af9167db890dec25b4 Mon Sep 17 00:00:00 2001 From: lib_Cr0wn Date: Sun, 22 Nov 2015 15:31:04 +0900 Subject: [PATCH 96/96] Update ja_JP.lang --- .../assets/sextiarysector/lang/ja_JP.lang | 118 ++++++++++++++++-- 1 file changed, 110 insertions(+), 8 deletions(-) diff --git a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang index 94f9423..3c75bd4 100644 --- a/src/main/resources/assets/sextiarysector/lang/ja_JP.lang +++ b/src/main/resources/assets/sextiarysector/lang/ja_JP.lang @@ -1,4 +1,4 @@ -#日本語 ja_JP +#日本語 ja_JP #ブロック tile.ss.large_furnace.name=大型かまど @@ -21,6 +21,10 @@ tile.ss.big_oak_wood_plate.name=ダークオークの木版 tile.ss.iron_plate.name=鉄プレート tile.ss.gold_plate.name=金プレート +tile.ss.copper_plate.name=銅プレート +tile.ss.zinc_plate.name=亜鉛プレート +tile.ss.silver_plate.name=銀プレート + tile.ss.hole.name=穴 tile.ss.farmland.name=農地 tile.ss.paddy.name=水田 @@ -41,8 +45,14 @@ tile.ss.chunk_loader.name=タイムローダー tile.ss.figure.name=フィギュア + + +tile.ss.leaf_block.name=葉っぱブロック + tile.ss.trap.name=トラップ +tile.ss.leaf_bed.name=葉っぱのベッド + tile.ss.drinking_water.name=飲料水 tile.ss.hot_springs.name=温泉水 @@ -61,6 +71,17 @@ tile.ss.coal_large_ore.name=大きな石炭鉱石 tile.ss.iron_large_ore.name=大きな鉄鉱石 tile.ss.gold_large_ore.name=大きな金鉱石 +tile.ss.silver_large_ore.name=大きな銀鉱石 + +tile.ss.copper_block.name=銅ブロック +tile.ss.zinc_block.name=亜鉛ブロック +tile.ss.silver_block.name=銀ブロック +tile.ss.steel_block.name=鋼鉄ブロック +tile.ss.brass_block.name=真鍮ブロック +tile.ss.ninja_block.name=ニンジャブロック +tile.ss.mithril_block.name=ミスリルブロック +tile.ss.orichalcum_block.name=オリハルコンブロック + tile.ss.small_windmill.name=小さい風車 tile.ss.windmill.name=風車 @@ -91,6 +112,7 @@ tile.ss.stone_steel_gear_shaft.name=石と鋼鉄のギアシャフト tile.ss.steel_ninja_gear_shaft.name=鋼鉄とニンジャのギアシャフト tile.ss.ninja_orichalcum_gear_shaft.name=ニンジャとオリハルコンのギアシャフト +tile.ss.machine_frame.name=機械筐体 tile.ss.millstone.name=石臼 tile.ss.loom.name=織機 tile.ss.sawmill.name=製材機 @@ -105,6 +127,7 @@ tile.ss.time_machine.name=タイムマシン tile.ss.fan.name=ファン tile.ss.saw.name=ノコ tile.ss.pump.name=ポンプ +tile.ss.suction_machine.name=吸引機 tile.ss.creeper_chest.name=クリーパーチェスト @@ -178,6 +201,11 @@ item.ss.season_stone_winter.name=シーズンストーン-冬- +item.ss.leaf_bed.name=葉っぱのベッド + + +item.ss.leaf.name=葉っぱ + item.ss.dust_waterlily.name=水連の粉 item.ss.stone_dust.name=石の粉 @@ -192,10 +220,22 @@ item.ss.diamond_dust.name=ダイヤの粉 item.ss.copper_dust.name=銅の粉 item.ss.zinc_dust.name=亜鉛の粉 +item.ss.silver_dust.name=銀の粉 item.ss.mithril_dust.name=ミスリルの粉 +item.ss.iron_nugget.name=鉄塊 +item.ss.copper_nugget.name=銅塊 +item.ss.zinc_nugget.name=亜鉛塊 +item.ss.silver_nugget.name=銀塊 + +item.ss.steel_nugget.name=鋼鉄塊 +item.ss.ninja_nugget.name=ニンジャ塊 + +item.ss.obsidian_nugget.name=黒曜石塊 + + item.ss.steel_ingot.name=鋼鉄インゴット item.ss.brass_ingot.name=真鍮インゴット @@ -215,6 +255,8 @@ item.ss.red_gel.name=レッドストーンジェル item.ss.blue_gel.name=ブルーストーンジェル item.ss.yellow_gel.name=イエローストーンジェル + +item.ss.craft_reactor.name=クラフトリアクター item.ss.energy_reactor.name=エネルギーリアクター item.ss.object_reactor.name=オブジェクトリアクター @@ -254,25 +296,52 @@ item.ss.iron_scoop.name=鉄のスコップ item.ss.gold_scoop.name=金のスコップ item.ss.diamond_scoop.name=ダイヤのスコップ +item.ss.brass_scoop.name=真鍮のスコップ + + + item.ss.wood_knife.name=木のナイフ item.ss.stone_knife.name=石のナイフ item.ss.iron_knife.name=鉄のナイフ item.ss.gold_knife.name=金のナイフ item.ss.diamond_knife.name=ダイヤのナイフ -item.ss.copper_shovel.name=銅のショベル +item.ss.brass_knife.name=真鍮のナイフ + + +item.ss.copper_shovel.name=銅のシャベル item.ss.copper_pickaxe.name=銅のツルハシ item.ss.copper_axe.name=銅の斧 item.ss.copper_sword.name=銅の剣 item.ss.copper_hoe.name=銅のクワ +item.ss.brass_shovel.name=真鍮のシャベル +item.ss.brass_pickaxe.name=真鍮のツルハシ +item.ss.brass_axe.name=真鍮の斧 +item.ss.brass_sword.name=真鍮の剣 +item.ss.brass_hoe.name=真鍮のクワ + +item.ss.ninja_shovel.name=ニンジャのシャベル +item.ss.ninja_pickaxe.name=ニンジャのツルハシ +item.ss.ninja_axe.name=ニンジャの斧 +item.ss.ninja_sword.name=ニンジャの剣 +item.ss.ninja_hoe.name=ニンジャのクワ + + item.ss.copper_helmet.name=銅のヘルメット item.ss.copper_chestplate.name=胴のチェストプレート item.ss.copper_leggings.name=銅のレギンス item.ss.copper_boots.name=銅のブーツ +item.ss.ninja_helmet.name=ニンジャのヘルメット +item.ss.ninja_chestplate.name=ニンジャのチェストプレート +item.ss.ninja_leggings.name=ニンジャのレギンス +item.ss.ninja_boots.name=ニンジャのブーツ + item.ss.wood_watering_can.name=木のジョウロ +item.ss.brass_shears.name=真鍮のハサミ + item.ss.mineboat_chest.name=チェスト付きボート item.ss.mineboat_tank.name=タンク付きボート @@ -305,6 +374,8 @@ item.ss.rice.name=米 item.ss.shiitake.name=椎茸 +item.ss.squid_sashimi.name=イカの刺身 + item.ss.white_rice.name=白米 item.ss.salt.name=塩 @@ -336,6 +407,7 @@ item.ss.takumi_tea_bottle.name=匠茶入りボトル item.ss.shift_hat.name=Shiftの帽子 item.ss.rucksack.name=リュックサック +item.ss.quiver.name=矢筒 item.ss.oxygen_tank.name=酸素タンク item.ss.gf_contact_lenses.name=GFコンタクトレンズ item.ss.water_contact_lenses.name=ウォーターコンタクトレンズ @@ -346,16 +418,26 @@ item.ss.defense_unit.name=ユニット 「ボウギョプラス」 item.ss.attack_rust_unit.name=錆びたユニット 「ダ・・ジプ・ス」 item.ss.defense_rust_unit.name=錆びたユニット 「ボウ・・・ラ・」 item.ss.jump_unit.name=ユニット 「スーパージャンプ」 -item.ss.bed_monster_unit.name=ユニット 「しずかなココロ」 +item.ss.dash_unit.name=ユニット 「ダッシュダッシュ」 +item.ss.slowly_unit.name=ユニット 「ユックリアルーク」 +item.ss.pulling_unit.name=ユニット 「カコノエイコウ」 +item.ss.multi_schott_unit.name=ユニット 「マルチショット」 +item.ss.bed_monster_unit.name=ユニット 「シズカナココロ」 item.ss.pickaxe_unit.name=ユニット 「ツルハシパワー」 +item.ss.debug_unit.name=ユニット「デバッグタイセツ」 -item.ss.iron_ring.name=鉄リング + +item.ss.iron_ring.name=鉄のリング item.ss.creeper_ring.name=クリーパーショップリング item.ss.mp_ring.name=MPリング item.ss.xp_ring.name=XPリング +item.ss.creeper_memory.name=クリーパーメモリー +item.ss.skeleton_memory.name=スケルトンメモリー + +item.ss.magic_contact_lenses.name=魔法のコンタクトレンズ #液体 fluid.ss.takumi_tea=匠茶 @@ -370,6 +452,23 @@ fluid.ss.sap=樹液 fluid.ss.iron=融けた鉄 fluid.ss.gold=融けた金 +fluid.ss.black=黒色 +fluid.ss.red=赤色 +fluid.ss.green=緑色 +fluid.ss.brown=茶色 +fluid.ss.blue=青色 +fluid.ss.purple=紫色 +fluid.ss.cyan=水色 +fluid.ss.lightgray=薄灰色 +fluid.ss.gray=灰色 +fluid.ss.pink=桃色 +fluid.ss.lime=黄緑色 +fluid.ss.yellow=黄色 +fluid.ss.lightblue=空色 +fluid.ss.magenta=赤紫色 +fluid.ss.orange=橙色 +fluid.ss.white=白色 + #ポーション ss.potion.burn=火傷 ss.potion.hot_springs=温泉 @@ -386,7 +485,11 @@ gui.ss.magic_furnace=魔法かまど gui.ss.freezer=冷凍機 gui.ss.funnel=漏斗 +gui.ss.shipping_box=出荷箱 + + gui.ss.rucksack=リュックサック +gui.ss.quiver=矢筒 gui.ss.steam_motor=蒸気モーター @@ -408,6 +511,7 @@ gui.ss.gf_tank_5=オリハルコンのGFタンク #Shop shop.ss.creeper=クリーパーショップ +shop.ss.skeleton=スケルトンショップ shop.ss.robot=ロボショップ #ツールチップ @@ -452,6 +556,7 @@ player.tab.equipment=装備 player.tab.item.ss.craft_unit=クラフト player.tab.item.ss.rucksack=リュックサック +player.tab.item.ss.quiver=矢筒 player.tab.item.ss.creeper_ring=クリーパーショップ @@ -644,7 +749,7 @@ achievement.ss.extractor=近未来 achievement.ss.extractor.desc=抽出器を作る achievement.ss.extractor.desc2=浄化装置 ? -achievement.ss.fan=ああ^〜 +achievement.ss.fan=ああ^? achievement.ss.fan.desc=ファンを作る achievement.ss.fan.desc2=青い炎 ? @@ -686,15 +791,12 @@ achievement.ss.shipping=出荷箱 achievement.ss.shipping.desc=出荷してみよう achievement.ss.shipping.desc=私は億万長者 ! - - #Dep dep.ss.error1=は必要なライブラリ dep.ss.error2=をダウンロードすることができませんでした。 dep.ss.error2=インターネットの接続を確認して再起動するか、手動で dep.ss.error3=からダウンロードしてmodsのフォルダに入れてください。 - #NEI nei.recipe=レシピ nei.ss.furnace.shaped=定形 精錬