From d39fb8299251fa3d4d9319a24c79514d902a22dc Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 7 Jan 2016 18:20:59 +0100 Subject: [PATCH 01/58] EVERYTHING IS BROKEN --- build.gradle | 24 +-- gradle/wrapper/gradle-wrapper.jar | Bin 51017 -> 52271 bytes gradle/wrapper/gradle-wrapper.properties | 4 +- .../cofh/api/energy/IEnergyConnection.java | 4 +- .../java/cofh/api/energy/IEnergyHandler.java | 10 +- .../java/cofh/api/energy/IEnergyProvider.java | 8 +- .../java/cofh/api/energy/IEnergyReceiver.java | 8 +- .../cofh/api/energy/ItemEnergyContainer.java | 18 +- .../actuallyadditions/api/Position.java | 60 ++++-- .../api/block/IHudDisplay.java | 4 +- .../api/booklet/BookletPage.java | 4 +- .../api/internal/IBookletGui.java | 4 +- .../actuallyadditions/api/package-info.java | 2 +- .../api/tile/IEnergyDisplay.java | 4 +- .../mod/ActuallyAdditions.java | 10 +- .../mod/blocks/BlockAtomicReconstructor.java | 4 +- .../mod/blocks/BlockBlackLotus.java | 4 +- .../mod/blocks/BlockBookletStand.java | 4 +- .../mod/blocks/BlockBreaker.java | 4 +- .../mod/blocks/BlockCanolaPress.java | 4 +- .../mod/blocks/BlockCoalGenerator.java | 4 +- .../mod/blocks/BlockCoffeeMachine.java | 4 +- .../mod/blocks/BlockColoredLamp.java | 4 +- .../mod/blocks/BlockCompost.java | 4 +- .../mod/blocks/BlockCrystal.java | 4 +- .../mod/blocks/BlockDirectionalBreaker.java | 4 +- .../mod/blocks/BlockDropper.java | 4 +- .../mod/blocks/BlockEnergizer.java | 4 +- .../mod/blocks/BlockFeeder.java | 4 +- .../mod/blocks/BlockFermentingBarrel.java | 4 +- .../mod/blocks/BlockFireworkBox.java | 4 +- .../mod/blocks/BlockFishingNet.java | 4 +- .../mod/blocks/BlockFluidCollector.java | 4 +- .../mod/blocks/BlockFurnaceDouble.java | 4 +- .../mod/blocks/BlockFurnaceSolar.java | 4 +- .../mod/blocks/BlockGeneric.java | 4 +- .../mod/blocks/BlockGiantChest.java | 4 +- .../mod/blocks/BlockGreenhouseGlass.java | 4 +- .../mod/blocks/BlockGrinder.java | 4 +- .../mod/blocks/BlockHeatCollector.java | 4 +- .../mod/blocks/BlockInputter.java | 4 +- .../mod/blocks/BlockItemRepairer.java | 4 +- .../mod/blocks/BlockLampPowerer.java | 4 +- .../mod/blocks/BlockLaserRelay.java | 4 +- .../blocks/BlockLavaFactoryController.java | 4 +- .../mod/blocks/BlockLeafGenerator.java | 4 +- .../mod/blocks/BlockMiner.java | 4 +- .../mod/blocks/BlockMisc.java | 4 +- .../mod/blocks/BlockOilGenerator.java | 4 +- .../mod/blocks/BlockPhantom.java | 18 +- .../mod/blocks/BlockPhantomBooster.java | 4 +- .../mod/blocks/BlockRangedCollector.java | 4 +- .../mod/blocks/BlockSlabs.java | 4 +- .../mod/blocks/BlockSmileyCloud.java | 4 +- .../mod/blocks/BlockTreasureChest.java | 4 +- .../mod/blocks/BlockWildPlant.java | 4 +- .../mod/blocks/BlockXPSolidifier.java | 4 +- .../mod/blocks/base/BlockBase.java | 2 +- .../mod/blocks/base/BlockBushBase.java | 2 +- .../mod/blocks/base/BlockContainerBase.java | 21 +- .../mod/blocks/base/BlockFluidFlowing.java | 6 +- .../mod/blocks/base/BlockPlant.java | 6 +- .../mod/blocks/base/BlockStair.java | 2 +- .../mod/blocks/base/BlockWallAA.java | 6 +- .../mod/blocks/render/RenderInventory.java | 2 +- .../mod/booklet/GuiAAAchievements.java | 2 +- .../mod/booklet/GuiBooklet.java | 4 +- .../mod/booklet/GuiBookletStand.java | 4 +- .../mod/booklet/page/PageCoffeeRecipe.java | 4 +- .../mod/booklet/page/PageCrafting.java | 6 +- .../mod/booklet/page/PageCrusherRecipe.java | 4 +- .../mod/booklet/page/PageFurnace.java | 4 +- .../mod/booklet/page/PagePicture.java | 4 +- .../mod/booklet/page/PageReconstructor.java | 4 +- .../mod/booklet/page/PageTextOnly.java | 4 +- .../mod/config/ConfigurationHandler.java | 4 +- .../mod/config/GuiConfiguration.java | 4 +- .../mod/config/GuiFactory.java | 2 +- .../mod/crafting/BlockCrafting.java | 2 +- .../mod/crafting/FoodCrafting.java | 2 +- .../mod/crafting/ItemCrafting.java | 2 +- .../mod/crafting/MiscCrafting.java | 2 +- .../mod/crafting/ToolCrafting.java | 2 +- .../mod/creative/CreativeTab.java | 4 +- .../mod/event/BucketFillEvent.java | 4 +- .../mod/event/EntityLivingEvent.java | 2 +- .../actuallyadditions/mod/event/HudEvent.java | 2 +- .../mod/event/InitEvents.java | 2 +- .../mod/event/LivingDropEvent.java | 2 +- .../mod/event/LogoutEvent.java | 4 +- .../mod/event/PlayerObtainEvents.java | 4 +- .../mod/event/TooltipEvent.java | 2 +- .../mod/event/WorldDecorationEvent.java | 4 +- .../mod/event/WorldLoadingEvents.java | 2 +- .../mod/gen/InitVillager.java | 2 +- .../mod/gen/JamVillagerTradeHandler.java | 2 +- .../actuallyadditions/mod/gen/OreGen.java | 4 +- .../gen/VillageCustomCropFieldHandler.java | 2 +- .../mod/gen/VillageJamHouseHandler.java | 2 +- .../mod/inventory/ContainerEnergizer.java | 4 +- .../mod/inventory/ContainerEnervator.java | 4 +- .../mod/inventory/GuiHandler.java | 4 +- .../mod/inventory/gui/GuiBreaker.java | 4 +- .../mod/inventory/gui/GuiCanolaPress.java | 4 +- .../mod/inventory/gui/GuiCoalGenerator.java | 4 +- .../mod/inventory/gui/GuiCoffeeMachine.java | 4 +- .../mod/inventory/gui/GuiCrafter.java | 4 +- .../inventory/gui/GuiDirectionalBreaker.java | 4 +- .../mod/inventory/gui/GuiDrill.java | 4 +- .../mod/inventory/gui/GuiDropper.java | 4 +- .../mod/inventory/gui/GuiEnergizer.java | 4 +- .../mod/inventory/gui/GuiEnervator.java | 4 +- .../mod/inventory/gui/GuiFeeder.java | 4 +- .../inventory/gui/GuiFermentingBarrel.java | 4 +- .../mod/inventory/gui/GuiFluidCollector.java | 4 +- .../mod/inventory/gui/GuiFurnaceDouble.java | 4 +- .../mod/inventory/gui/GuiGiantChest.java | 4 +- .../mod/inventory/gui/GuiGrinder.java | 4 +- .../mod/inventory/gui/GuiInputter.java | 4 +- .../mod/inventory/gui/GuiMiner.java | 4 +- .../mod/inventory/gui/GuiOilGenerator.java | 4 +- .../mod/inventory/gui/GuiPhantomPlacer.java | 4 +- .../mod/inventory/gui/GuiRangedCollector.java | 4 +- .../mod/inventory/gui/GuiRepairer.java | 4 +- .../mod/inventory/gui/GuiSmileyCloud.java | 4 +- .../mod/inventory/gui/GuiXPSolidifier.java | 4 +- .../mod/items/InitForeignPaxels.java | 4 +- .../mod/items/ItemBattery.java | 4 +- .../mod/items/ItemBooklet.java | 4 +- .../mod/items/ItemChestToCrateUpgrade.java | 4 +- .../mod/items/ItemCoffee.java | 6 +- .../mod/items/ItemCoffeeBean.java | 4 +- .../mod/items/ItemCrafterOnAStick.java | 4 +- .../mod/items/ItemCrystal.java | 4 +- .../mod/items/ItemDrill.java | 4 +- .../mod/items/ItemDrillUpgrade.java | 4 +- .../actuallyadditions/mod/items/ItemDust.java | 4 +- .../mod/items/ItemFertilizer.java | 4 +- .../mod/items/ItemFoods.java | 4 +- .../mod/items/ItemGeneric.java | 4 +- .../mod/items/ItemGrowthRing.java | 27 +-- .../mod/items/ItemHairyBall.java | 4 +- .../actuallyadditions/mod/items/ItemJams.java | 4 +- .../mod/items/ItemKnife.java | 4 +- .../mod/items/ItemLaserWrench.java | 4 +- .../mod/items/ItemLeafBlower.java | 4 +- .../mod/items/ItemMagnetRing.java | 4 +- .../actuallyadditions/mod/items/ItemMisc.java | 4 +- .../mod/items/ItemPhantomConnector.java | 4 +- .../mod/items/ItemPotionRing.java | 4 +- .../mod/items/ItemResonantRice.java | 4 +- .../actuallyadditions/mod/items/ItemSeed.java | 6 +- .../mod/items/ItemSolidifiedExperience.java | 4 +- .../mod/items/ItemTeleStaff.java | 4 +- .../mod/items/ItemWaterRemovalRing.java | 4 +- .../mod/items/ItemWingsOfTheBats.java | 4 +- .../mod/items/base/ItemAllToolAA.java | 8 +- .../mod/items/base/ItemArmorAA.java | 6 +- .../mod/items/base/ItemAxeAA.java | 6 +- .../mod/items/base/ItemBase.java | 2 +- .../mod/items/base/ItemBucketAA.java | 6 +- .../mod/items/base/ItemEnergy.java | 6 +- .../mod/items/base/ItemFoodBase.java | 2 +- .../mod/items/base/ItemHoeAA.java | 6 +- .../mod/items/base/ItemPickaxeAA.java | 6 +- .../mod/items/base/ItemShovelAA.java | 6 +- .../mod/items/base/ItemSwordAA.java | 6 +- .../mod/items/lens/ItemLens.java | 4 +- .../mod/misc/EntityColoredParticleFX.java | 4 +- .../mod/misc/LaserRelayConnectionHandler.java | 6 +- .../mod/misc/special/SpecialRenderInit.java | 4 +- .../mod/nei/NEIScreenEvents.java | 2 +- .../mod/network/PacketBookletStandButton.java | 6 +- .../mod/network/PacketHandler.java | 6 +- .../mod/network/PacketParticle.java | 10 +- .../mod/network/gui/PacketGuiButton.java | 6 +- .../mod/network/gui/PacketGuiNumber.java | 6 +- .../mod/network/gui/PacketGuiString.java | 6 +- .../mod/proxy/ClientProxy.java | 12 +- .../actuallyadditions/mod/proxy/IProxy.java | 6 +- .../mod/proxy/ServerProxy.java | 6 +- .../mod/recipe/FuelHandler.java | 4 +- .../tile/TileEntityAtomicReconstructor.java | 6 +- .../mod/tile/TileEntityBase.java | 2 +- .../mod/tile/TileEntityCanolaPress.java | 4 +- .../mod/tile/TileEntityCoalGenerator.java | 4 +- .../mod/tile/TileEntityCoffeeMachine.java | 4 +- .../tile/TileEntityDirectionalBreaker.java | 4 +- .../mod/tile/TileEntityEnergizer.java | 4 +- .../mod/tile/TileEntityEnervator.java | 4 +- .../mod/tile/TileEntityFeeder.java | 4 +- .../mod/tile/TileEntityFermentingBarrel.java | 4 +- .../mod/tile/TileEntityFireworkBox.java | 4 +- .../mod/tile/TileEntityFluidCollector.java | 4 +- .../mod/tile/TileEntityFurnaceDouble.java | 4 +- .../mod/tile/TileEntityFurnaceSolar.java | 4 +- .../mod/tile/TileEntityGrinder.java | 4 +- .../mod/tile/TileEntityHeatCollector.java | 4 +- .../mod/tile/TileEntityItemRepairer.java | 4 +- .../mod/tile/TileEntityLaserRelay.java | 4 +- .../tile/TileEntityLavaFactoryController.java | 4 +- .../mod/tile/TileEntityLeafGenerator.java | 6 +- .../mod/tile/TileEntityMiner.java | 6 +- .../mod/tile/TileEntityOilGenerator.java | 4 +- .../mod/tile/TileEntityPhantomEnergyface.java | 37 ++-- .../mod/tile/TileEntityPhantomPlacer.java | 4 +- .../mod/tile/TileEntityPhantomface.java | 4 +- .../mod/tile/TileEntitySmileyCloud.java | 4 +- .../UpdateCheckerClientNotificationEvent.java | 4 +- .../actuallyadditions/mod/util/AssetUtil.java | 9 +- .../mod/util/CompatUtil.java | 2 +- .../actuallyadditions/mod/util/Util.java | 2 +- .../actuallyadditions/mod/util/WorldUtil.java | 182 ++++++++---------- .../util/playerdata/PersistentClientData.java | 4 +- 214 files changed, 621 insertions(+), 623 deletions(-) diff --git a/build.gradle b/build.gradle index 50fc36cf7..6c8599a08 100644 --- a/build.gradle +++ b/build.gradle @@ -1,31 +1,27 @@ buildscript { repositories { - mavenCentral() + jcenter() 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' + classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT' } } - -apply plugin: 'forge' -apply plugin: 'maven' +apply plugin: 'net.minecraftforge.gradle.forge' version = "1.7.10-r20" group = "de.ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions" minecraft { - version = "1.7.10-10.13.4.1558-1.7.10" + version = "1.8.9-11.15.0.1684" runDir = "idea" + mappings = "stable_20" + replaceIn "ModUtil.java" replace "@VERSION@", project.version.toString() } @@ -42,10 +38,10 @@ repositories { } dependencies { - compile "mcp.mobius.waila:Waila:1.5.10_1.7.10" - compile "codechicken:CodeChickenLib:1.7.10-1.1.3.138:dev" - compile "codechicken:CodeChickenCore:1.7.10-1.0.7.46:dev" - compile "codechicken:NotEnoughItems:1.7.10-1.0.5.110:dev" + //compile "mcp.mobius.waila:Waila:1.5.10_1.7.10" + //compile "codechicken:CodeChickenLib:1.7.10-1.1.3.138:dev" + //compile "codechicken:CodeChickenCore:1.7.10-1.0.7.46:dev" + //compile "codechicken:NotEnoughItems:1.7.10-1.0.5.110:dev" } processResources { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index b7612167031001b7b84baf2a959e8ea8ad03c011..30d399d8d2bf522ff5de94bf434a7cc43a9a74b5 100644 GIT binary patch delta 22968 zcmZ6yV{{;0(=HrNY}>Y-Ol%ty+ji1%Cbn(co;VZRwmtDA=YHSeISM9aB zcdgymuB+;IEO=cyIHHm)I0P&R2sAVZzWk{~0wM*>f8+pI>!wfwzXs-6#=Y~MGbqUa zaw{c<_}6`$>c8?2)4wu_8g%#H_~Gr)W%MKzFk2ud0)|DtQeIBT&IsJ1*2B~x;lA!M z%8vaG>ZK^U>3a$>DB8{7^d+l54b3KJLu?E>r>fTS zH36D#yA3Jg=&#m5ANb!``nwfB!rE2&O{EqGN)5FteF8lf1b8s-8HAo_j8_J~JtK8I zKKcXba^Pcx+W~6~y+n<`bgo?m17_AizCaYF4u8S!PeQU~jGVj~i4Jio% zf4x$Wtj8@>`>wU===Ze&QT}-XLOjob`gdT^Z0xTF4`}stHi)SE_eZZ;=Wsvl`M2D# ztv7gG1wVRmX(mhcNFW?LS6=!<(%PL>f>ce*#zi|NG3jTBDt{%*VOcYG<=KUPh7%xH zJ!fDp3^)xv*36UX6z0gL>Z4<}&LF?bDZp#%Bn1HtAPbAK_6ka6E%QE{kwBuGaI{iv0y|A3ZKWg@EaYUdUY zz-j(oKP*um!bopdz+78o`Zs0J{=d{Zxzuv01OWlr07)v4z)i|*M@(vkX#O{Cn(QHq z!2YXYK%;*9uSSPh_CK~|WF|4 zp-Jx!^GfKWeQBe#bu1%}a_ML}u;Q9w4lI;mrZ6Z(Fy@r+HOX1EvQ`D?F<+5DDDLnO z(FgcPQS?bG0;*P1d~UAG4Nu+!E%5pIhOmpQm?X7p4wmLf7r0SQsT@o%_Twj?$YzQo zv2eny;m^3TZyq?nD$L+I+aT-a34Fu3^i{gPozE|v#vgN$Lh;KhS>>#XkQnyD zr)$6Rk>(|QgjxE9t+KX5z?jX~F$OfbIHoGJ3OJ$we4sDtAk(kA$w;w%X?^qsbRoS8 zB=2yioA^0{7&6yI6QDXpj3$rM@2An<(>yG+bVD^^^vR^Qf+ze}@pF-OMK(&dNpo8z zbrxkk8M@Qv;peS+L+3fDi*e>X`*~CFJpKmaYwqWwgekf#n7)|N~=;!qunlv)zrPwDy+BL*pNBU-gI_V z4TU+QQ9t`ZfF-|w!_uJ{Y6kT`j05Xk`=Q%PyYK|n!*ye|J;}wklhyY1IrEnbG<&3P zpF47ZFnd@9|C{{~O%JiCa@Y~I+*+$?1L`mkL>mc`;Ld+acJn}gkpH~M_**Y89XMl^IQ%Hu^9*#(OjtrZ36 zIE^{#ZD>(T#UY z;0v$u8!knbJyLqiZ0P7Zb8==kOZ+8TW=O4{e>gFd*Hg7TwB;Tl0C|(kUaNkF1ulvTP@ev0M8h$B6(v$axGC z@qW+qnk64Br{xOYW>YLCn`u;vxPR8UFY9mnWGQwz|;HjE5qN(K$>4ZyQ7}|a5ah)4O`!1@YM3~(u z^Hj)~W%`DQ_~$na29~4puopk!aGVWe&jpE|%2Sf<^Xr0_&8 zyP_w~((5Q{;9B&O6S;GM)csN<8Ygili2)4csaGGUV*vdI7|ouNsb`FQhUm_vRag*z zYziGg>)`eqgM!`C^Yd#u`LtPom}u`jS-j_~(;g?49#N)AZ5A8VCT|ui<_I?YFp{9& z9Nbac91V-?la;uR>H?0}zg6rbbW1x!kHrTb?$=p z760g1R&yljvhH*s5N-N|G#tVw6@IPWzz$}dB+yG`|x)D;>My4#rM!TO2c6Lv^Q9x z=ht^{4RJYdKo3}nmyK+j2i09xFJvB^Pxzx!*+!u|uDFA;Mjd=?^Nu@oNi^^O^@Ojc z)kGL`^t0dSOcQd~7-zX|m~;Lh){Jx1;0|BFpsw?-B-+P5fp;Yyx@q#4sjLeDg?GjT z7Yz)gDyQjmVu_#bjt#3!@e6?@w>si}%3o-5U0p$>j{wN)A%>XkUOB&H6_uyk7BX0I z>7ZjueQ2TMN_^Nb#HK?zk#myzj4>|PzWde&QPwW9K2bh7St2-5n*fkgCj(iXQ0}Lc z?x)@=ihq<$!J$s(Yxb6)n_nJutSca848;Gp%jZ&fJg4NA6MY=A7w_&e18J*(v z`enx&FaZR9H#9{R>qG4%#dQ<8DdInp=|Rj_m&4R0&>XLukiXme0g>#ul8E|-Xi*G& zLRoy6zQ7`vn2d@JrJF^8=Gv9yYj#=p5z&+01sZwm>H&_26!cz@09B zDynx>yXV_k>ZE1C`6lSQD!M~#00}y8 zvxr&PVv35C=5#Ld{v(9#B4gxszTxhfnka3MfYa55pKDL`m$YN%!;QOsIuK9WTIX|2BA z+TChIII|#$9iH!{r|ji7)Tb7@!yWjQ=B2>OnkpZzQcr8aNv@Rbb7I$lt=RFF@yZbd8DE1Nj>Jd|Kvgg3-j33Q7OAh>zZ z8Vyfr@kJm1`d^obf;ItdEF=&RJCYr3#8rD}=TP*^I82Q&VA+mIa` zjxLrtnzUiaFSu{~^RdPKRXKkyt0|1A+)+_Coc77t1svBY-45m{?eS2_GRD#$ofjVE zlD6#^mLoPw<$<1?u#disttA;9`1`oLZJ&qj=iYbEo%@y>;FW`PeHtqWy^PEB#Rb6m z6bW-kF@BN7`IHg-;*~P;RxNPw`PuiHLYy-1ad^pq^GPWM$O2f!H}gACXE1M2IK5@F zLf>e_zR2^xs%QI>=lbURXdZ7s-;hE-*`(Ya4TLL;zf%8x!OVV*e*mz5fq2gOEaA%h zn+Zp7aJ1?4e#kV4RWd&PP(RpraG)B3n;5S|xbi3;-b`4-D`VhD*t&!Zyc?gb4mmxg z5f;)5qfVn;WRC+(8>g7BgI3Cir}}oCxCQR6$5%37WiNPT0$IgVG@jS1Xdr>u?O_DO z0rvJ7!~w>cVbGc@&mGh2#Mj$yjF0Nb#c&xcV>B~xHILE+*+ z6sEtsV>NUzl)1fGBM)D}bbh4h4V0|F10Lz(%r!4{5r11J(&)6~3^M zkS7Jb4jxRcUGr{BXwA5$rR{g}2osi!o{KJ73(MHlJi*;!))k{Nj@%n?Dec^lfQ;BD zcEAzEc_nN{l{;d5E4FWgCyW3yH4_oLWDHPkN89LuYs*-)WQD-W?LIP(MQ1|t29Qpwm$-FVs1QxBlFk@y z;d0Ge&GBR#lC+wLphBs?{+*s2`)Pl6N7jkyQN(FCIt72JqWt|Wz$(V3^$Nrj?I-K5 zGy;hUI`&1qnaqcWd2~orgevo^F$mAx!)d?BqtdqG)6vx4=1)rD`SD^~0exsxSHGux z9z_0$%{WFEUqDZml%ulUNXL&jgdO4t_v}CdH3Ln>$NECy`**gjy5Cdt?YXlQ12v?X zVEKvD+&Bmy`%wrl{kPa5O|IPQl}W>iT~v%?z8Qx+-~$fy=WC%Ow`bBDnd2LSa~!p; z#39~?V#cr|Qf9XCvn@_e2l$DiknbYvBxf-fiFN4xHh@&TCZ^%FwE4&%Uwh^0qy1)Q zmOs^1j6|HOs&l5Ge~)=GV4t2bPR9SV9rBw{ov>VaW&&eQBENFQj_=9E`h=(E{M>A8 z=u{o%9atB);mfP(! z;+@;wVSw7wl3iXF53e@8?KV?UbZ;NTrCf>!k~FBvXpZVG!YcE}ii739mq#RooZ;4Sa9=fSBDGg+A`4zORm#TZ1!5zKksTZ;TA^Pohf6#+SM~IE zGJu}e5!$0yisF4RZC>J%m0;2QiI`1430a1Ecl{f(%Gng{JU`0TVgLj`Kc{`6wdd3I zc1`1mXpouK5%(ZF8EstTZVKGZ5sSn(SG@VdNC$EbO+PZS(j`n~uV{pn888;1Nl{oT zH9`wlLYqh|Lw0m=))Jpm=S2BECW=9_2f#IjX_i(udf>7~dWC#A=nQ}LL!_#a!4Pk| zcbRp`BO^m>)2aTEK}`IbKYO-?9e*f#3{97xBp5n95}Pc6h7B#_`wE$0JZQ8)sbu3P zJ9g+hjd>?eL}Rt1#F3AH$bHH+RZ%$^(xBK!c^HrD@1|mt;1ZaYndVX0PCo3^nytkp`43?=ciR-P-vj> zqMaf%umuaK9i6)fy{kgrN4A3+sH`1O@*;U%#B+rs&Jp>u5o!@ZJ+2q}gJ)DVRe{wPGIJP-bx}>TJC=<`SAKuOJ}UOLLGt<$0-3ZlYdmdxu?~ zZoL~@v-P#UBFwJ|J#s1B&&c5bz9zGD$)F&T>99i=JmaS|3$U!p!x1nj;kbF}*t#>E zcVdf`Q#AT3I8Nu($s36|c|pUQsfQ@LrWD#QU|KY_<>gtp+V_!U^A7Bj=6fO6xb>a7 z3Vy`<1)llX#*S;sGBa*frFLa>Xl3^bHU0xTVz-Em#cAvX_YWv=fY+znf3M+$){eTM zS}YgLZzt{!8ek{`J+()^$1h^^&i}si*Q?@-E= z!=Ji0kZ~4i&mY6CNO2xXw40CkG0u>p^lA)lJpqFq#FkWFTA$zJgy-_3`~X`hOsKiD zw*Lh|iDvjy*YQ0w>ad4j7Na3-b{S`VdGv3S8s39JQD-`pnh^3s816UY-VrNn{PcoS zPKQ-Kd0@(}x85OBC%25jQR<7nMMQf;l&{o^3dF-Gvvg~r`2>|9y`-l>yOWLb)?-R( z1OCcpFw|YIy-ObD&sAItq<-0WJ!||Fe;{!EyF~KyV=k;~FFV#HN`d zuyCQKDfRJ7WZxOP6DevUz9&e(IIl#(;uF=)0uVi7S2xBFenPOkG|~y(t^TfcE!Jo$ z+IcEgi5)aT3G$b``IBBFPolk7N)cqkrF`Ax?u` z3*VvSG)`W@P1QvM5j4OA`4>{f*9BhDL*RtExq_je%#Ismag50ZfCcKqA| zAHV|W9A4W_6HQ*#9}yg#w-atJ9$kJ>A;x@i;$>3ZQkKh=3&nzeO)s_26rB0|6I0joJ?os{*;=m;{F6g87ZBKny?Ho%=yu&EYXF-Sb&<0T6M;slAf{A@ z7_tr#K?o`!44nOWL*Td{oz&sGs(FfK1j3|MSvmoYgmi6N!ZbiUaKGK%`7}Qf+bMHc zM##1N3aXSy+|Dc;ZX%`k+?DGlcE1vE$OIl$6s^X7+WFoPrACv;K0fL+#ww5W3y|$& zk!5LriCFD!!r|o+MQVM$7}Q_m#dw;TwQ_o9OS8&}PKS8b*KFZkKfEXh)QssrRz0XQD4IWLMvQBCL0(Vtm-4tKe#8V&B6I zG}mFC2z^jBp3xp@hG<@d$m~kUpo1bUiqzZZC~^=(=Q{38F_Pu?u+vV6^yOy-_?N}l zW+J34GU1MRsf5SwuQ{aub)jxbp@)O~FL_eT5(@h-WfFp0T-EpwzbAqX0z&(5ty+m6 z2Y~WKAI12DQdnQGR_BH(9!v&@Ta2F$h-vtRtc^+>kDPBFXxE*Md3JlIv3aGupK4sT z8nGbNki;#Zu#cY2O|=#&e~C_|;Ng8Ub=Jf8YT@C=yTu@4(2F#6)$R4S$Lj_`QSjlm z2xK`bhPHK&5d-g*wWC{)u}{Bq|F>7b-c z*)V=9;pJHu$+b5HyIoi~589_bjMy!I@7txfO_JtO*^YFha%&HHb9dkm<6Redu`1p3ZK+thsVc9d^_2=!7$^wsS{y%gyA7w?b0L`3H8 zTfq9)79#Z_m#=%}xAasUI06o%K;U4PcPAg>^X0|G>!JPAnJ7s>fFm1 zW?&*GTW<4XJ4gPgO4xVmxbB{!x|XJ@B7woO0r9n+owd2NK*lV{DKgqk+!)CkJ21G5 zb0`R3yJO~(6gTmMk?qA*6tcN8q6i!nX|}@AZ;xVX*FW-SaAPPTm)$cWfP`Bq5u#X} zy(Abv-%Y6ykM#{4e%ZcL>g(_Mc;zE=dJa18Pl zvILiv9Ka-nYb;91{0vBBmah_!*&J{ZNML_y;MJXxqQ|vo8y$Iksb_c3ixHI&M`801 ziYD(j>wxGfOG;&FWg?@E0)#i%alELH+cC^O_{G+p!gP@x$zt(5l~h~O^Mj|k z^LD>gTr#>uyJL<_CZJSYit8(%HX=!D9*giQ;3OoQq4tfy0gjxhu0Ep`KUwS)LIwG= zFTev++?tA5e5k;yc#ZL6G!OGvPDY#)s^nXv?>qU~h4m*03^(fsfWJ_@K8m9Zf7K+6 z_FqiobYF9%aj?`o=P}p}$rCvxj+&#ht2_sU9k0RFrLm>iQhs9BNbh66rT^NGw$Hh{ zOFjyat|X8aHyMPA{)s}+#%js=Zp*;6_=8*iesV{Usj$OY)L@p>Y$8*YOh(z^ZI ziZymW1FrpuJZ|hBC7@9R_k$dvZ)m|)y_OG$<1>Y?Sf0k1GlrFh{R6g7;}#F0Z}{e? zi(dY&C$06Y1>RR2UHRVgOK_Obz9Q^r^&Zm;U6S>&$klvO(bijgSl`|a?mvXIwbVW$ zLfM@y0_L^aEfd1m2mq1l-Cn15yq)0b_F!4RQ0tTZcwnsTGgvKTKk?NUM! zlt=$5B2OJ%eyhr%9I~M$QESwW#sN0GMlOOeoTy;Zk**k{DHcH~Bc4Gz&e0$Rfv#K- zA=99RBFnB!0aTtf^IX&Y6-Z)&QgNc=H8({p!4(##Um6luG1yVgtcWl(?)cTpDL}|o zGg~k05zT@kl8~M&7rW3@P-ISeSczwR0!<*FZc+f9wTU8N6=JtAc z=_u3HNAPdzpha#BQzqkckky0^@LGE9RwATpOYbf=)*q zvL<-wbLA0kg%K;t@pf8hX}g@_)oITMn7n)4!(u89@mD06Y>H2#4nH4oALY1WGCSX1 z*|$X&fTd^WnL9&7Oo0VA*Vx9z16C%&rKFmOgvE4}HpXI|u)1uRSP4lL82xGvFEg$k z?6rH?%LdRU!fvtvnD9GU)6NuVO$)d6Sf${bdK?|nv^5iAj zD*b#$thABZ-dk#6GcPPC7rrjl8h0NBi0!fT-`>qwEl>1yiC`?cYgP#o(B zktXB^7nMn!2Fn&AzoLb@zixo>s>Uoycz5H7YREzi|4eshD8tGALl@r!BmyD5OVF?kvw+Gmw6=qF7 zKu9IifD_y<>1wDUVOiT2xf<@O^dVDQzz-@Z`Uk0X4&uqa(q&`^3%<};TN+#9-CF9X z+i~(o<&4J&tfaz^j0!F`E{=uSho=f%DY|^DA-D;O5u-Ev}=-wD*>K#xX*L(@4R!;a?C9zzDn* z^p@o3Kg^0)Z)O)H^}au~O`S8qY-2F+x1idOh9<;!*|8@!p82pH0i9j$JHKHO{;`fF zxaO{RZDueCf#i#B2y|G4xUo~%ek6>KFDhIoE>%N)R+PgHI&2uF(&|3k+q}}Z;NBp~ zT_PQ9>T`m7$i;2;$c0(+UljlRe`))JRjJ9$ykv#zzt1zmzTwV8H=`>Q7K+2rhF~fb zBvMB$XeCOh$5SmaeCGFAp$d0sud6gOYOzN|=`7~2Gl!aq_7~F7pWte-M5LfW%Ns2z z%?brBp|yL$avZi$#CJ6OTy^~)o=&X-C^t4-Nf(_l5Q*W`NrMz@W{kr?vaSSQi$FY6QveuN%1@% zd>i`NLNv+}#@*vD&|{w{OTwckYY7Hx*5X7>5Slm7c{i6z+Qznc0inQ3T4u`ww)Jsb zHI3jJ(v5lBmfD*wa-}4i57>kKNy-nd(o-_Qv>YKRQG>UXgycOSB@I?He$;1~1IGm;Fo2#@EUONf?)<7Z zQY8hmW62GQEuPNmEMLSGn&&c)X2vp%p4)P&y26g$wRK|a1H|Q%-ink2jV7bC7 zF96BBTl07PR^&;1Z?^P<9)Fx;pD#mKr{EMa=B-CS=ePBF%bkT=2pL;HUVI97W;YLa z4wa-IF@e+U?jChnBfu&d%ktHcvgX1XrdN1pP_K*6Wm8Z0sldsYA4ThI|NL*eC#L$G z-#b$`TTgW+GvD6OK4=S%Dd<7f<%(0}hH*<>$o%k1)9MTt+nDV<*o>Z;wM$|Ul4qr4 z9m=j6Wm@(jJxTWHVEj;$w2+(92|XJKipZ}WueL4982_#!Q|rl?>}-|0CZ=TlwZe}V z%oDqjJIuLkrX~q3k^9Pk*D^A|`@J=g!}vVK_&iVZm|z7%A(t=26=y%WuX65;(rt}; zQSt@;|8`~U*E*UaeFFjc=e8%o29UEv<2uoyr)aE)8A3;{!&-`eFOg6~R;sEIWeuA% zqRf%|Zg*vDV}sS@ul$iz8zYx<6J zG1OeVRjUmaZzusUx9>ok@M=hGVN+&ONl7vizA+v8;2 zOM=7mo;hYR@aiC7&SggB8dz(<#;B{Nrw zh7pDpv=3X{N(Y*`m4StyrS!5KmyUR5k%8!N8z!aI<>$8g)5mSOOXVR15^7vYnJ7Co z>%r!e!4_ux;V!H>eQvDF#N4e`$;8yADePPXzIBHRLQs*Djt$%aJ zVVQM@q*ciLIflWhyX{25GVP9BG3}l{L^$q=XoHZsK#Me+@C35fZgzh}rdFZx)R-&Y zc-{6!E9)iSfeJqElHm{?pyA~0v*F|&z#;V}-(mDV?IuP$tj@IkoNchybXzi~TBJ{w zSl|`E?j3wi&eK0=PL-;U9@n$WB7Xr*6L?V`QN&Ji3himW6|6G1(X!4OFovm4Z_x>{ z88>a@gP?UF3I}c_7}Oh<+^tyy<;CON`q)}CMpzhf3st}CXIbErY6c)Ze6(BNsAH!t zkPzy4(1=f(vv?aru))t=E-)gs=bCyCdOVxB@MGmatHm;4Zg$dI-bwPqW+bW%J7`=&j@8% z71%41q`w4CT3Ti-u3aBZeR)1n`#jHT%ojq}FVEwv9^yRFhL+2V@0#BEtuIx|f=RNY zCQ8!o6#&)mP*c+|{K-G?Z0uO+3s3EVFFXj5y+Wfnf;4&l;$ITgR96V>Hj*$hR@Ly!F`^JF(M9CgxZ!kK zBr&3}`l4qTiK&KU%3Ny!-P?+4)01>}AesFJh=A*RBBmGp85Lk}oYMvR+`l_REj{Q0 zz8$>6Jfr&K0&4B-`k1ly6(f^4juta+9cA(?KrEG*(NV|AtS!MvPH{)?W2BFVu%=xpPHK>-0FG z$tSB>z*EI-Xd2^1l!|KiJz(7sjYA|P(k)%a zD_O=fmm6y~WI}B+OKp7Tj@aIa?o*_S8W`nN4&`isy)q`^9a6qT=5&u_J4Lr>pj&|7 zdW`YUwQW@z>=>(zJtnaZ7OLoJEyO@=6Kz!o+lOvVP}{997uPKXb=afjttVi-?}p}+ zqBXK;{f)0p_3HPN8`a7ERTsu&$coF_KEY~u-VisiLEF299nNqbVQvfOFXQF!XnLOp zCbA0&Bnt4`1Pun(KHz_~@L3aE$2Wt5fM|e&fN=j$2OmO`c{g?vk30fU<qu(Nj~aJreEo{K|o{o}(`iG3moIlqVO>7Ln*lgd^z8%uVPqUxQb z!Tw(ekZ2-8u`}fwtpD~rMB8q&+ehOftR3KEH1t_~f1VoJ^zuc>v@u_YYMwlhAr_p1DmXTwSvRYDab8&`EBj z5EgP&J^L3ptzZaJ)G?XyOfW6sfTWqP+{map`vDql=B+da(t)b+>jEsH@;~(_4fZ_M zJ1<}1VXQlfIey&2t5I}c?P1N^_UJm=m(0ki7jKa58L_S)hjLG_9kn}#Y_)n-xn73o zY}7~ZpTLH)&&0BB)Qt|goLFB?qLUfrKKiR=3DzR`>MyXMpx!WiUJ`BMf zTC5HIWm`?QQ5VkO-swxkUN@gZx;}Le&iR_8uht>vwwSOB1w{V~-k(Nek6_w$e1@85)N408n>k(Y+2~z|nIc>!f z+rfgHk@Xre5;Jc55&AXz>ZO$YYrb4|XXCkqJ2aT7344=Lo7K`>Gk!0=u7O)_4!nn0 zBc!qz)YHiiTYr0nfD1nUf%wUffn<^ahw(KH9WgHJqflj)V@4gI<-Rtg)tNuZi!03| z!&}rK-%ZG6$a7`IlVU=Sj3(#^(ID)i#_Vspb`2pV_itYfkC?L~YKrO@_obo)nSk*} z<>4@#K{=S(I$8x8S%#Dn*bVwJsoD4=HMsDrL;jfIn(iESu}Uw=RGe9+OUu5z~a$z$&hTcN0? z85Gc_tPL4+#$3m8E9;SIFc1^vs4y7GX&-M{%yUsR_? zX38&HS_Ldx)HUZfc_i1ABHV`S{@#WKoKx5JqMYgY=M8m^Lxd_NN9QN%Gx`Gt1cw7! zj5=^;qlzW~w~F4OlaQ~KsciZ|H>I=EG7{dHcRoyae+~vlx5$mwq{n7axoum6^cGfK z_m#KqrMf(J@0#QI(Ki*#%|yMwYVBlgw(@nTydH&-(8m&ri`uw~nZ*Cc;NJj39howkEKmykA^W-EK9$7Vs(V;?vFlXheU8*{R z-C7C|xV*w7a+7FkCESF!n44}t%$jT-GA0f9)@x6#XwEQN-lMG_A8kC{h~-LX^^J#cziT#Jm#44Bx);jm&To&KUXVp!===}p^;(pl z?I^cP$I6Vq-!p3Qb#BwG+jFkCsK<`>3k@ugeOJBJ?+zYh%jNWJ9#Rh(V>yZ|(TqsY zo=e3?*;|F9I8v`*^e#y&wC;cxB!37XNU{FV2CuUDj`3N{mg;|>k z)B&^vLr|M<;u0%}<0wEo2PxJp<{ehOJ@ag1&1)fRd5C*O!gnzmLqB7Sv1fA184{IW zVN|nk{G4G9)P@U?whAF_^aX!avet0{Z>^n@)(RV^1Ci4^Rm&@Xl-^r;$W7l_G~BMm z-kc!p>mGb}WQfK@uA9oPdDX z@j|@z0&g8;?lf2}5LB?Vo!k zKS}z#Hxt5lH(85bD!+auL+T6gY|m2brP>^HC*7QIpC!6R`$4?P)M@DX-PQRe)%?iJ zR*_w)iX`{;c?c~~iZ~ZqBIqszKj8qTge%t)@u`8tZvW&q_GG-`<`#c?_O3@x7>t2` z+ndl04yhw$^zwj2EV48*Fa;5R_Z(lfUs1qqVSCut2<*5gil){fj7*5HCVH3p3#^$# ztXv{}TM#q1I!&JlvzuE^gh3`MZuSNw6XR`N_}9|c{{<%S{+TseiiQA^+%?1q6y=p~ zX{VH#>y?=6n^{@vSvk}l-4PI#nOT|HkCIk2Xb@ojaR(b2vY7g3G6^>cL6ZdNvIi$Y zzI@gsErJXpft2r*`llJhii|LeZ5fnmSK;*|+r+0UBWEq+k4@%*)l_aKLksc?-CYLj zpS^oyNas*o1Z%5e{{cVZ#q0&oC`^N5L0Te_WHBA+NEv4}iNwOOygSQiHepZh6~V{} zQ!=}3`KjRyEjzU0Pvy<|8Mjp(A})`hsEtjmmR#$GY^$&x>inmLrH|b4x31t(eO5*s z!em}Kwek`W*(xm9!EMz1(07Y^ck3@m3CAu^$5net{U20x>E63tMi!s{7svRY_e}bx zMF;U8rHMl;9PD2$>6gywe@)f8pZ_&A)#{)AkCtha2>Rcr%qE1;DE|q?x4~?f`e%%5 zA=vc^0(YtzPZ;^E zXGPQjr9A!yjgz#a4lJ4tsbaiE^4wU2u8eHKY-mXdWM--#TU1~%I}D{zD%Z>1G@e8E zttN6W9~-XhayttX+sQW1GvA4?MaR6*=liG-_zUy4Vm?|JJX;`gH0GglsuN9MInY%< zR75(ckUzXtLD>*8A+6Wn==l%!(#FY?&Bu@c+qlz1%^NktnW4G^>qQ=oV(m@eZD699 zjZHK4F=D^N6+QxSEZ$g9=zXMVR?hcIE5wF(Pisa7X5Bq_!~ za?4DbBQlur*I2R@22@n44z*SA1BKtM(^92nD2$7fG6$?`XF-lLeQY!ek9uo!r1|Q# zM#rmZYNTjY}XzDrRHqJ>Ny^l1-XE5O+w8*?6J zA18e}xlEH?&mk*dFfZ{oE%j3_9a7$N=GMG2>V)G0=1yM3dpuiH)tteZF3=R@sUBJMegY4Ma3YLztP!T8NMAw`$Y9JlPs3p(e|!FD#G53=~(u6$U2} zxw2~9#hYoCLtj_9cUa4wTJt&df;btmWT=(Yd-#bOwI5(wC>` z2waVE+C0u>EkiC7LxUi zA$q&v@?b>JtvL8^9SCAeg&W>bEf^f{r(qq5wd#t0P1jbMJETE27Df7n`HNC3*C`*H z^onG!pE1u@paI_R&(}v^KuA@)Xp4DWnbk5x{=&*owRX#Ki%F;DZ7k)>-vKMg@H@UI@-ITg@z#SK$f86EnT+*5;b=SIO?_b7q7kcc_Xn_zvQhljwVKTu!otiX8%89 zT#!P)kSI*AkGa@dIW*8epoLQJ&^U)AuFXEw`e$xkV4!-OxU$re9g_J|-C3(C2e z$!+~6dOZ_u2O!`f*l1A1a4)<&w&HYqQOyRgLN4g2MX;dHwkrBFkG)M5rcPukYZ3Xz z1lvATQ3yKVwpK=+dO!>jL)#){7Q=T_pRQuLQd3W=9jqRBDbVkE7BK76Dm%&&A>C?P zQvqU<@t6ciFu{7Ew0^lJUU+_5fzn>+ZxZNE#2kf(~8i zo$n#W$;Ox84&7K38bXctza{>)Q6iT+S*e#FP|q%oPrTK%&FhHKIB!Of{AN$u6Xrt> zFWFU?t1lrHYy9p=|13!QqoH;T*FD6^{b;&RHW5uyNel08wmPKUZg z%l3xmG`XOVP!h1v4z(kH1=QLgMnlgFtRDc}*O}+fo6r$X$L26!dwe6$XB(%KZO;ml zBYL0VWI+PqYoa3e=`q*dP!Yawy;-YnoO#<<-JOMQRky3-IejM%`=2&~TkkpJr=s{g zC?w77b8ws*#QJ68NlS1FCtG3&mRTI48jG z1v!zQr=xceR&XmQ^v%;R5P2m-!j~w%L42gbb{(HtW7!y&tZz^vT7RtMxM2r!B=JXi zH^F<+>?WVF_sFx~K~_DPFUgG*w;`XT`Hzmy<$EE){UA0}S4g&65UuilH?R?QM_QV? z{j(2)RsOKNQibJZ_9_kG4Df5AxAN`g1z2YdUygp)_Z!SVb*GAz?nAc%Wj8#1=qJ_@}WP z8d)O2?2q0~{4ZA7caa$q{+@WB+Or4@lDyJydBrld{d&lLXL`B5+Nbtgr74B*>C=!C?VS*fEg}`AfO5G5 z{{O*uQ`(w4@o!0u=;gB*{ON34rrdTWZm#d*Dt=0w+%Z3Faq7 z`fZX3A`)=RDyEhU!3-T1?kS~^82DQ*Jp)9!yl|2Bk8)L^p`T_&jfS}NPvz>G8)LgF zzb!%Ao2x(Dx*I+YJ{#UPx@Ub)85xsuh?GwU2bTgqbv?`L7k4);9@`%;9cW_gQHsa& zh;P8_2Ous;^!ua^_b)@*rvlN%VSy^|mEn9vg!cbw<0`Ma*z1hhIVVH`l+P+a*R0nUasWOTA(EFir|W%;WASS z!4DAqs|jn#S7V<`##rcfmjzdkZ=K#FgWnZ5=|K1y|HW+CX9KpU(t?m|d zh27?lTp@{8bIX5vnE@J%gDz7o(XKT}9Fkh(7n| zpnIKWh1g+5RwlhsU4@{r1f7(<$1Jm;SC}34ZZR*_1#P;SHKS`F_lpIeO~M^N-tK_~ z?k%WuCx>&+o2E27NQ~90b;0?2n1(=m;;5AD&zg&saiqv7t|{l5+6(1+%H2>X(f3Rn?AG)JCuz3(vC-!!52dn>)x?U(tu#i#SzU8M{aOJM z`vRNDBp$|sd@-^@)h&B-e!DOIyvD#(3=0mjFFN$I_Ejt&yE>^$(S=eM`98wPs`XPe z3%+PKzaZlvq@FGhis2Hflm>V5>!(5P%X8+(rBX&E8YxixwPQkthqbJhV9c7enK0`X zL!l;&TLrEcuQnX5lE>EMW*)S#N}L`wjdpBpH`8t9v~wSYqRbxtqj*b zmz(6fhi~aX>NJ(u1i`8iw>QjHJz3G zFCaKbzf)keXcYdeO)QZ)GBoUwch2LXEJy{u`azCQc69|Qv4bT!$$YpO!@;^rWfz@E0j<)7VLr>uvu&8b|NPlHw4P!7S;(^HY16Djq(F>U5;#sLrnvT2 z`uosc*>?)G-$i@Pocx_ZP-ek5q0Xs9g#nWjPj)PllI-P>`{(1TGR9u>xK4+TL6&R1 zcSd>;%i_n?Dn!K9xh(d6CM;y-NpE{nsyA z5N@4b&l>ltYPd!>K1t=h!SGsLPI`giW3=Jp?-ni<&Bw!HlF zC|9Lq%?_NGuc$gRAHqN&SIRm25xM%YbiNUL%sDv^foP4NrW545TkwwTxGzs4M?@V) z2x|w@I~qypy&p&)1BkGMJu|3md)SdYR|H8;9YOc zG3WcRLe_bMcE2eA?1lKo1k}Pht-T`3;Dc|?RR*A<_jQv8-jAw`FLY!cd~P$K#;a06 zrmDCR!ul3`kbmfcb}1DkTRlJ*3^HavI(&N<_{O9#W!hia_;xOoVAt4T5%dcO(Jz;< zp)--Tu=+QrEG|@O4g>}zTHsf_psrPqaBE>p>%sRAY)PH91deyi6vb&f4pFo1Z>ha& z)A*@HWt10vXV5`R0O}78Am$KWk3ZlJdId*ITeQTN?$&@=&psQ`sGC|?HW<*#32*Zw zaoX7^+gOZht$<7~tes#6ou7JPCl)sz0D+vk#(&}BNi$lDc2h+Q`D?DX1Te7{-9ewO zPGlr&FrgJK)Cv)`;q%$-63p(gAj5jrWr2-7^2ua2kcq*rN*hkW7m?Uv{iBA3+UEO5 zM^O?!VIxBroY~s;ejz@)a*}paK4FJs|n7NJfMp2k05T;3XOuX8WRlB##;5R1z{+Zi_WRFJ1)(g zrUY0Y<+Lc{W5G4{??5~}9mUuCp4Ohe`{me1b^?vhT3qn^_FnmPV}te~->=4vmt93K zdM@Se;7f-Q6`YL!UzKlL>=9 zq}S$8<9+D6(ZTJd*;)OmNqwfwNL5|YxFu#5*!oy?Y1FPlwj%C0{En$UQq zWg8*_W$5nC&8gAo(0{S$(mce=Etw(L>Lr2hhZZ^-HJXHQ;=QKC5m9Wvi}j7We?>Sh z66RklocD3a9WIsAs*aAU^Qq1;l{sNLGp2axP%g$OfdK#K3Zs+Av-OV}idGcmEW@fo zYayl657tQ+ur@NEDddF(1xC@-&_BLo!IW-4vR|n00!{GU-h9IzbxI&imHoDHrpUoO zH3l7Vn62N#jE2*4GHwgc+>^TyKacK;EQZlaA944!;>vkrQTX3#l9J zuriSGN_rVv6JKfiQ>q9w8(H!)&WbbogUg2W0bcUEogA!ivH~p9LScmRsQO=~_W*7?F1(p`P$8k+1;qSJHC1Pl5SZ56XtV}o-53#gO zd7tY%(Enr2JT_xJMIrsD78?@S$QX=)j~@Ugz9;6)$ZHPN%}aXc!Tt>F96+dum`Y~%#2 z5i&ofU`e;cev#UaBL&?fT0I{7z-Ay`w}?F-xwu3pzDX2~l{JsP#3==>>fSs)8i5jR zp|!axJ=i#2;oHfmC}4fsR5D^ec_%LJF$&FpT!@264x2wGgducAFY+JN&_C@FKCEj^3yPud8DHcj8^VTS+-;(VcQ-S{!g5D;)f_1EN6@HJXBP5?c>2i^Ix>p;W!x9B zeuKHAf(GAl;=JLjv!TE0d{@Q?l&v^j`|j$AK#&>2gjw-K8~x_{;FrFVu!_vEZ&)m; z#$2f{9|Gp1p)Z9;wL3j|Ow=hyDGb&0UPr)YthwE^1WoSqxRM&El<6uOP)n(8ACO>d zG*m|WW9A=oDAGT~O3CDZm5wZkp`NNDQJauytm>4iY%;4N;l;eYWIsNb;>x<4Rd52> zUR1W`lX*GcV?{5cF|}7v2}_&LranQhkAZ23?9*@P{^p+RrXSlDi~UVn3 z^io*K$Lx?hno?;oMZ%p;FMi{ALjuHIAWT#xZ|fMd?Eu(z3-#2hG^*&lJQ&7UDF!Qe zPo4PmXV+Sv(#QT{O~z=*s0%H-A4uI)ncm!(v7}fvqqEKVldO(jUX{YjV#*V}Z#KWL z&7Jbw$k{Kt&RssBUnML&FQXlk6l@gJ8rv1fA3$g5yfS`njt&vSm}Fx}B&<%n)$mc# z2%oPofPS)Ln0i5E)PwXw2*>HMkCHMA45^s4{v4dxklk++>pWBrJ5??Q7s&O zD^K|iB0f&q@z(vGy%q2FNlmtrm*L^I|BLJsKXuTU^5J9mU^c>g8X!r(@0u+orHi6P zfn>R*hM${Nz2L{NC!cOlJ#O6|KHT(kjZj;+WMWuJw|XNL>28XHnKj3q_Sg4TK(|W z$c(XPT@$AUrWZn@ZPe8BJ6rH#T#go_Co51*mW>i;OZj#@OupfZ%EAOTE~z#3ounQ4 zB-OY%!XkBsgWnivM=rsm=h*S{jKR|KBfj_84RUG#5%Y__-pOkt9;e1iTZ?MYoG5oMm}TK{*i8qEE8JD?PkeESO-Ba5Y9++`OdEu+-Y)Uq$lxD)XCmUV% zEMVy3+aa3Rmf?prVEF}hY87T{*27P_2LWtME-W7?MoQ4={t%>l(aY|qabWzxeLM5q zO3W|4vFz6Ltp^UjxPMU}eN&b}I}_!CMZ10Q-tDLcQVy)kv@&DOh76}{q?fG2f+j=H z2m$5F8#OST*Y;uNW>f6_o9OIuwfS>OI}wDV#j-Iz?$OGO1?-xUC+B%pd8IrtfYk2g z@vmxf+M=;5GqL+K6>F~^s{A!Js<7CBlcXX%=q~~|@AfyGWy!MSbDP8>JNdAD`~j}b z)$rDIN0tQbD=r=l-vksmFEeU&CdlwhAxQ%kU@r~J99VzO!Sq|*hu?!I${ANsYDg6F zS!sAV_pbc8)fBU@%FR^OZqR0 z6Fp}p_W7`Tr@NgS`XRcK%oOf2sXCT=IVq8JXY^0PyZ)%Pc<68S^L|R9{L`lCJoJO* z5B;xE*b@k$g22{c&UjI-;UH18OpyD*12X*`X?ce!L2X@-g!-N($3bO2BPKl9W~Ep1 z;CCU5Uw9!!6pfNeZArva%FMZF2_und?onO^AM$A_tK+~P%MsI}i`t;0I=6a?Z8uO_ zu)ECkaAp(TzLJ$p*b!!>NWIHCV0t*{H(R9$D9C|!W%TJrpL zZzZMb)|Eb$k_kjdNnX{hr7j6b$txczc}e{vdChlHRQ$-wympJrHNJibc9bW3O(0%8 zd~L%o)w;%+mB*rEUp_W7ik&h-{H~JyzY=BTga0K_8dWo*HU%PHR15xF+!N7QEhc)wOiLm0DuVaOD+j{_T1SLS;!F$NQVAzkx&G84OqPS`a?_SCuVl${|9qP z^fxQA2IO_SWZk&T%;Nqpr&XYt#d{=b0{LeC8;(3y2GAggYv~d5HKYue(V_~AB8eT5 zp(@_M0f30M8af1jE%fSYt!nRGb!uz%t~#W3CRZKTx@*gDo#FpeSW>*61p`%B5}{dp zHR}H=`3GRTG3rYYa#V6;0YG|Gc>mTk0st6p0N3bIKsYTvqNN`1DvsfLFi?{3(jMEu zc4gvf00Y&aD5yFC7GelOfN*TULvi2O%6Wr(TpH!@K#~&Cdky|49Ucz=V7dVwx{CtW z-yuYR8n2jdq(j~S(>_3fP3teSBUw;k+{m)K0cL-Q1k)mV8cDGKQP39~DS$9T#0yZ}cO>8L8rSyi57K#A>3I+x`qa5>ExloS(s@#D8EU;EL)X0QwpetwYHZU;G2WjI(IJVKEoc|TS z|LctKLlm_^QJ_dUAv<5>jN>9xUd3;OW*dS)Ygf5qzuyi9%7mdpi)x3U9RGO`&-GvS z?Fb~03Gt_$1O*T+RS+)}llqlFG>uxwTgTUH*J4Bl(n&Z~7a& eA@vCCYDS6&Y8c2x3jjcnFCt<90H@*d?0*0dt%|8Ab5 z{MWuP{?{ha0PiCIXCY4KF%|;^2*?o(2uL(30SqIlzndw^7z7_MIvku%u|yGyXby|Z z>C!{$6O{}oF|aL)5a=f~%LcCmlVZB#znq$3nVo8C@)7X&|3b)*9;2A2O0QS^Ri8R2 zhkCIpX~Ys@cD2pi5VAqB?+9m$+ddTUdkmhtZWhin0vakxZwnn-(uo-_UuM&Sl9HV}O7i9GcFO{BbUsSv71oI*)*9}BsZdmb+6C08pvZrB3@LTtky zMW#i&M05jyQQ_e@Tf@o#~@-X<@Xoz}Q;5Kd( zKG@lUQVnj?3~1bAW=XmBbYM8v0}I9l1$*kNo-%8{q-+e3#1$m19T@_LQ89|A1s8>1 z(pgf=f4?Cq3Hm~pygQHo2|Uw|v&N*@>PU#_8WsjYz;yY&V@9={K8~1fU__N^g4`F#KS2chzd|i380`4JVbf#}UIg+lLWe?u z_!rS4l>Luy8Ho}6zfom>K{SK|2?XSX00czw->B-tLI-@9Y^bAuC$FYfmD`<{#+gbv zCAqs@l9lRBN_U~5jM?z*lSL&(H`mKXs7d6|n|U`wM{|S#+#<7=V^+^q5Mnp&E zcEIh{L+ygA`e9`hy?yR8m1}utR zvx8?3V7p&QX6>V1Q3U$v_OSGK_h?CaY4&ZDx~YtS7{%_~*uNnV8JlJ`JfEkjdPim* zB<^ykdTIB3UilB&QAZF9Uy1X&N%w1igC>neDg$!o=r$Hp@pV{Sft}@7)L2y1>10~K z@H%*T*qJi)G8s)R(rRT-nq)#c);1T-fE&hfC*;WW)E|{Q1rZ+S#ejWSLhaWg?HQ@e zB+%;}%-!E3Y|U%^tqsOiBhB2lm8WUNL+E)qG86oDX{!!N?$b+cp2>l)A_l;L3!;_C zngCx(nYHpvTH6MNr>j;3Oa)DDY@tb_b8q~ohhmCqY zXLNY+kf?4ywVoDc_j^RlNBNJ6Puu=nd%Okkoc34 zMiEZFa^|Ksgj1UNf~mNsd3dMZp?1@lVAHx*=_p0>Xm^xnGW$=k3k=OhBs51G+*+gc zCEwBJe&N)?a6W8{&G7q^?zb_U-vY=|u8ULnrAjVr^V9Wv3u;$M{3#D!UO~6MK8LxG z0m*lipIW07`bl?~pK5|>KE=X&^9S10WgFHJN_{gBMV>*(8sKF}pH-~miH^)+=`&dX{xO6RS;{G{+Vw=S2 zbvo|4ROHLPxIBY|;Lj^0rX|`BnO!3@!?2XM({v=ydsC-VRR8c!gfVd0_K_L6Ys7%M z6@l%U^Fi%yCrSW{16!_>8UCK4w^ILYSLbeTZ@bBw_&{GgC_Ox9|KC85fN~2jtgnzT zBf5Gvj<&aaC?4G2?xai#DS&-Zv@VA%O7?F=2vcvnMzx^%i#-xNv-Ycp)k~r-F6c4y($^M8KnvJC_tZGU>*C4)llP7 zq{M!-RXo^bjNWg$T~0q|{F2!&ch>`@Y)G{fbvwzw?}M>VzrMtlk!lDE z$^>T}8zJ`CRvw2~r60lGkqQ->nKH+7kw+5>D0$Lv@ppY3At@a6*TKMP)A83Y{6xTLlrnAn8G?pm~VBK z@II|X^viQXv>lN>4SuYyVV32_0Qelt!HrhPOj{GV)@$2xC#uGfps4X{M~~vr+G%fY zzVNy9d{u}BLMc4rR2Hm3?uN+wwcmIbNYAckZeM+AChA zB;pULLLyoJXA*@bD6RR68Oj5QFVw=51~OvXx_w3XurgzbL5KZQW1q@;EF6YSkr#8B zGkKNqnfCI;?KAF569$lh9Hw6O#%QB;v8B-)7J+L$?lDRUW4@PL#azjY92}h5LI>C} z43Xd?Kel0>1ArRd&Xj|ZA(MNcwd;Mr#TzGjS6@VngcWZbg0czaSz}%#zhDM)Z&R`X zSWmiGfV?Xbi%U8s9Vn|ozluFOsoNvzYk5>}OdpJIu|g6XYz-~CPkW?FQI7|*yj|(K zPn9IAXGF(Zv{KCIxJzjJOy}Lf_L_GvgRUECxTzC7A;9HGE|1usE~$D=0r8G0ozVCw zyK_+jIE+2)U3gYC!B&)4HY0$BkYe-=v^41)uc(u~a$Y5FJ&2rFglUiyY-A}?b|vh< zMeP)KEba#+$3&b$nMwGUE9Bq93(F1Jk1+NBg%70O2tRo{LYiQ1JK&@(-G+wUdTPb|1IENw+Y=-@KA;kEOyp z&q#oSCnE4uM$;?Ck~jJI?ZO*~GoMEdA@BHa?aV%f`ApoV$kAA^T+FyY=0h&hz z;CG9VZ*s|)$2uWxxgUy$AAcSKB#s*z++Mw=8TC`f#cIj3P zNGpyNFe}VD^>%hiAF)6^UCdo1e$Nk&zS-~6TRygSPF!NL#G7HM1HJcQ2U4TJ+A)GS8{5|=#cCo!07zfySr8V5W zD`!K<$KxEK?UAk{7ms*{BZjw4(xNSx8#9=vr<)rBLSENK2gA#`fq>jQ5m3@0N{KE+ ze8WmS-kO}h+{W6*ohDPQ(Zi1frRY88Bvv-iAN3eAXTZHN)JSZz6vm|(X4(Rl+6(v# zsQ`?aGkgnrJ9F_iZix5!3uj;PCIvUjByV4mQXN^`D15BxogfjL$F*@y8msKTFStxS zKF-Pt6k*N5?DS~dkxHk1$H4IqH*6@OJ#iIncUL1ly|!{;8QneRsutQ@mSm56s=mT) z2v(YC9~nv7m-Xh@_c^(b>t)eo3+sj1BY?&REKxXl?N0LxKk<3<&X)3YiA{p*bmmf( zRC8Q&V}+y(=AlcZk&*4Bw+mUhn{+hR$iN;m+2TW=%}Az{u0zz$Ehc|QARQXxLSut% z{t%gb>U;-xi(IDVfgO&ED$?)F=B+O6P>guW4m6fEEN+#mHM#6@Id4L2H zsSpQ?%FN{}Ut>r))YdCoIZ(kObc~P zVIzAA(6HOY9v|3_tD!Z)DK+fmA(>)3?U`|&Bg>m5x+($&-d0s_2U!Kf0LXM{I5_FC z=(Aw+GCIEwrqo165?wvzwhxP^aX>Qtd-S>brX`%8q|HAMcsq(@me0Zx&>VkKtu&cTbR&h$l!h|fe>BPQCo-2D z5g9_fk#jA{EzHH32sl;UdUUzyO(&4S95LN#PHWHqG4rlHRq$KIX|Or89{|+>G0K)G z5e+s^+WgGQjvo?e?yQ-VRHDRJDif?DMi&wz&3sf$|0jx({ddr~isH;XaC4=}h;kDp z&9HC9Fc;{A16Aauuf^+Qu-&xT*WN0Q1P_w%S0f1%xW!blZT(zJdq1a$DVc-5CJ$YY zlHPp^i7Pzx{W|Z&SA?qWEZ`X9NS8w1Ce1}b#OVWVH#tmp z4i(b6P$pmynE09CVnA2+5_b`AW5vVWof#gZ4&_YOZ|JPZv{faOe%^MvVV$J&MxnD$&b zW!abQvpIwljmq2OP{84_5s7cRhL^dCa2~fHby6;klr&jz6Z(ck# zuHuC1wcTVhhL95X0A1j$eB`60;wgM2MWDi2IiFViXOV#~uLO@^!Ok*;I%_XOcMDD- zLtR7jh&osO4GoLvDNpgWdE(_x?@#}T3?;+8m~(blsdMxJiG?suQ@{Dzd}X12t{{Yi zBsKje#icGIQVc(zysn7mx~+&wPX>g_T$5oeFdU7C2CHZWY$QN$?_Y~zDTgYjv{pdZ86Cl|E6Zm8e&0+)u2?AewK3eEqYftCg z=PnG)(293;KYNsmfj&t=4r>(}!>gmIaGcmmFx!_I8z^;ceU2$R9#mM9KAt9bl*@PV9 zDIovBbHhgjN%t8nS#zqle&QBbg%k+iDX(8}}Q=kLsQ3ratbfRm(@pg$gg!}JQ8P17^R*L6IBE7x&~0_dBo zoPJZmgr0hDMd?QK|x-{jzA*E$}4C(4SBMl67+xE&^fjmQG9qP zHdf@{WLKc=>bBHyd;6t@aZj%-R?Kw>>!pKP?wnhxUv@srm|%grE>2TM@n=!irhF;E zB2PwucGf+!gzL|45dycw4QPmSHo*5cKTt;%@fYNo(P;|=fN=1S#0mZoGhbkiCvJ({ zvzYQP8P?6sM#1g9*0l1_Gn6Iz`EyCLniurSC{OJ%{o*;08ZY=Nj)AB=dB!@u&P%U| z%YJtgBky_yK*45^>i*=tesWeEqUe@I_ktY z*rW*@=9R^yN!r1`85HVBpZ@V8H0XW5TF$<`zz>wzTQ@=aCg42cbeo6nL_gTD8dTZ^ zdS+Dy_ro*(FnYy!M}7yJSpobt@01jPd9n|j&l{H1-N;dE=Bcp+S`_U`toFX1LQQ{T zg2WPt{qa2NL^yB=l%YP}0U5nuOn8|fQIpW7!Nss#Ktg1kKMwyvw~qFt$r>fuo;Yp@ zuXD@Q9>pkcnZ&)HQPD|bJj^P4rnEY6S!|HZsb5N+sCj6H|7b1BDg)p@G(Rw385HX! zh^^x%T(vPMu7F&f-80VX=K}_GE$Tmr(?6N8zATWc6c&Q=*(GL)jQPXvT*9+XkXaZPKF-uG zKQRhVcpRfR-9slFd+`Tu$z;Eg*yhSk%lhv?YKrn8Zh+di5G(USqq_QkSRR`k?^sqp z(7y1Fb3McrcwYT!FP_^@n_@SrPHi3^up&YYLS$7C{wYJ`#sEi3zA2KQssx@15V=J! zQwu(jIy8_cR^^9Q_g;BVyjjyYDF|^AlKu~x@NefpdBsU`craGmH1|V{+)^!~{xnh# zZ*;|IhS%0kfd%+mxA7J`oy!_|g;`nnwk@?AFpl)`7G-UtA7pR5v$-#l`Gyyg^5HSR zposC%!HOd-%K_qetVAf8$lx`v+c031In75y-NJpceIN~!$hdhTww{jWsD8P%oFq3B znKqcZkM*SYn1+g!b8q&JiBRqBl10d-HC?*8_{oQC6yuZqyGW#nFtgw zv`N4gXfWOG;5hh@Xu|{;uJQa(r@DdwVEK;tmSulaIFRVT-_tbxWMF?5hp=maM(lnM z;X5ulah|bOn+^(Nyh9r1g&D>@)Q^Ba=KU69#xBpjF2%GYXyuE&Zx&?awt6vMj>SAH zanqzP|{DN}Qqh?_|*<^J$K;u;*wJj%5oL7Yxc6z`?cUXIdrXY%3^v z*<_VLR4VB9zWe<)LJ{(1*3j9S>ihj{M%5*0Ge82@_(YTq3=(cGW}9zNV&Ecbo6jf& zJpPG$x^l)rWX!ey1y7k_E~bl~zf;UurnDKyrwph`ImSp<1Jvff;|JQ@!*mMwrI?q` zY0R@Lowk)M{yw~!yD61&&rf5c-ss&2Q}YOtK?>`W?n~p}Oo`R+Q&Ee`b1z!RLm#_| z1m!jmp{Et5WZd7u&JoD3E7Q}o%uA#dgYN0^17mp`{ek#0Vj}L~yt09cSQBu5{$Yxz zkHD=4lX~-!9K9Td{QeU7znyZEG$Sndzl^jNYY5DLdFa@|Ay#wQh(yHODNNyrxfX^d8S1(Jnm%57oq7d329Gc$jPTTXDwggbN4d1{?=<$GS+0 z%`#*3?ZVv}nq}$aF2}yWHm^H(^ou(L^qb+X!#a=2Jw9j8I?S?ePr(pO#0jo|Z9v)n z*X!>{ICHhBy&xKb!R|mrYER9P5>L?)E8o?qxIZj}Px~e?{0snpVS9cW4#FhCIPW_t z=tpWs0*za%ib;Cs*JwxAoV#htyNB0tiw7r3hn9$r@8d;q{wu^+QjUZ51x#M_vL)0(^}qJkmdoPZ^v@iCaK zbZkCUF#pigVJG1FThYLQ;2$1}6}iP7Cb^|K7TVK$3JQ?{Rt$C2kelC%4DmFHN#veo z$lF#{LHvlf>$IV?h&lkCn1u^HTlzd99hoOYldOxZm{@A{Brc`HR79x) z0jQ==X2FYs@R{<|RS+$19AbwLpcyjX#|k(Mup5CCS16?;<0FOmQ*#GpYa$4FQiIUWNmFS^`=X& zH{FP?{u$S*k{}tGfM#u>V}IDscuYU9cM`RtBXOX2pTDnW4dJ!cmi`0Qu*?|+Jp@C5 zcSgvUQU8eQ6(DsG!$fd&<4b2MRT9%^I~r{|QCdEEMwskF& zG&yw&K=)dEM`f{^)H+tOW5$mW6OXP(&S|(eW%n&e#%#&n_#r>9Dr!ZN$Eu?nFG7&2 zHG(_9am8DR4=o`EiA3hq@U?km?-db?iV@0sFoCsWtubVZk@aBeRcn6=IUgE9X!fjH~zl@EPPUK)M*PLCePJ}nL zlap`d9o||5#4rqZY3eIuP|i~prCw8gV1A|yD4i-+USwZt0?HLpo*iJmYxf9W%R&KC zjNdwu&xD(Qyxr*avTZTSwOtRTKGQn<_*2vipoGK8BdHdGC6Z|ig;67KX$qB5E6WRe zW)gK-pM*W5i&52C?GHJqJLb@oY9dOMRcDc{%OlJR#SJauawXH%iHzq^oJIwS@D@}m zuyNQNhh-re0s9b|eV`JF=DbMeRT+ya;)VzBi=(k(N?fd7ImoT74Z5#nW7=|yQtsdR zIqq3W^4sW{64gkwXG=mXhDl(JWC6O;D#5NK!VGTqA!?{kg+i$Q4br>H#-^|$L`E8+ zg4Ux@5^Nfiz(M_qHiy+>$W3msM0AtuA+r*<4;uO82aB(@-2%shf z-SY63OwBM{^uKf}2kCT64e4H=hWnO*!2HRyyVG<|Cx5qSrm8v9I-Yl%1mTXX*R>+2 z6fwH3wf|wC%I2L&jdEm~d24OEB??u}$W+Yzq_*hP#9Q;6yIS(<*lT;*cGLA{RxwK9 zs_I490Ee9tRvhY$Y2X2RCrW3qikc6d+EK^%rHQSbW_%AVXbZ|~%q({3?!`vd9dilG zxm{-}=oI^&PKfT6i@$B^+Ta)D-bF?A-!L{Fr#zx!=u560`|jx(ds!T7%0^;j{>e@r z9ajvMTkMg>tM`g6BKCjxCI-(aYklmWwvU^x0aKy0b4}CWjqQMIqx|7RvEo!@&+83M ztIyShD#{GESOwY#mo+eW8^yF0R(h+cVOOsK$=t>5C@ZLCPj?szo;O~nS_u%$}%)8J8c4z|0d=0a?jxHLmgjs3}tBl0t+Ms+C0ir;vR zbwPISq0ZgZYE(#_+dvWJAd?ElXKNEA;L2D6&7(STLiVKIPYV9-$zqT+BmS<;& zJ)4j`kDXQX8TiKiZnNhU7>jwj=nPvooPHJ95c(5qfC>y@wMlvg5o7A;M;+?TefJfu z7VHiEGqr76nAb2#*0H)C6W0k|Vw$+0Sa;HaJU6l|Au>!X*pO!BI%_CV@dIxH@a%L8 zH&f(mjDem*&_@Ysws}Jhz}k*rHaI#B9xIDAS4;_D=Z~{iroWkgwb6@nKigH5RcqQwA5WeJ50l%c`KFQRWI<2KJn>gtI@Td_-;ax4lkE3Idw4Dg1}Vu)0{v>;&DA z-I`=YVU~7IUs>dSNgI)VrLE0xq%&SokJQ?249+0-Z<`mpd%Kx@6N~}lc0O>&CofKZ zuO>&21w-ZQ0BzfGLmLQ8fSIEcMA~H!;ZlK@F85#ls7d*xv7_EAY}f4oh>p{Xd){b# zR5QCGmv&M@bn%7pL$Rqy;Zl??P0f$0H6$eP z$DniTgec|b{qj-YHm4@u!Spm|Zm`Ur+$`#C95zhKTaV71f=|uz0nZ`p)Z@Tx3ki!R?x_x8z_TFxR)TsCHo$gTl@Bz$sRk;BqyqEM%3pRnu&FQrI7R zqiW=h%%$vUiNW%2$Uh_J-D>rOUCou?Z}_HQ!)?cMQ)+TyPZ(;h`yzZ`^4^G+p*~k( zUBV*ISyIAQA>`Vq2;BUCy3DnYXD1E>5YS(^q*ySVL}@GlF;jFTm3B2%O>-#Ka7#@f z6^ORAC^&datD9u5k!yNH5_I^MN7w3l&#GUGyBIC8Z&r*pbQ z-0L0HOI!os5Q+nb!*5d*^i+5XaXhK02}z=lkXwfkc9#=Q9Wi+zcmx7EHrHtKd3O~=>KgXZU ztSkiETOP9FUS(Qa-kXcr$#UiN3-G0vs4Y_f%Zb*KvtS)+W!d7@)-CmkSm_lnHryQu z_9C>_ETtjob93J`*Y}!qM80JxC!8#B47tY3 z(m}R^4dqVcq}E7{+seq5TW+(80q)v;xY?CGcyx#T>d3ZsuPn2hT|Hn25#c6$^qW0E zHR4UxD-hv)Xoo7YJ$z8itE2pg#H;2AQh?nol5IFkI z1A+jNFlCh-&b$#)C1zx?86xUt+-rnz^A2wbB}#RX>N5X;dK1k?L&Q%w{lFy6$z@v zX`SmH?4O=KR>mT3w0V={?r*mWZhQ#&`EjZP`Y8L^W>CO#(Xi z=|f=T7G}P+)JgSF2K;4ZzO(ym8D5?D#MA`mLxSnEvVP0I<+Af5?U}Wsf9wnZUSgZ+ z(P~!F7ZS%u?LM4me}GBMOQ=v&P-UKxf<*+CaV_b>m7lR@(MsOL45?_LbFo!%Q$`B6 zSdPtlmvfhs*{(F-ZjMrzRCj#EzP0QPMTy-DWIepVxm% z_3Ay}+4v|8gncg7EPh{K8|vKwP6~`WlLxoz$a#*W0u`rZ(~3G`t(JEXrm6XBPex*X zKIo4vD^-g4BD(ilt?tG>7!&2WhDjFZPGrIf&Qla8Cf}YR%N_naKmIcu;f-?&IxX^Z zQJ-7QF;@;xeyiNa+3XBQ(rgV!UhvN3DXcbul{|;;$(Yy*_M)UCZ6kOJcu}b`AC0;L z!Wqbeave)VCr-U2>sCgAH;_0Rm@`W*-s?j68K6x+ngOv&Rx4jDX8M5fBTiUM8r?)z zt&=VC1%s6$(mbU(jwv!;)YI}u;6LI;n>{8c<>V&){)GOVd1u9V)E72eE;lBw_@gXk zf~-~S1bM>|OOv`}Fk*}dIM>VP@o|wIZ75DsT>{BUra7WXg^4yKjZ208jGdR;rha7$ zHaH^RX9&53P}_FeT=MzO!&RZXanDF@Z$+Qnswi`$&T6N#E(;EQ-4Q8RD>j`=aoUvG z)A_4Y5^bJ11$`kz-U1J$3~gIX60W$9sFD~P|IAu)2Ul_fVpVGdK($u{aVW$F7)3!D zR%!mmXn@)f<wB$Q_oR!AB}2&kXqa&ph4#8mGG~Rp)3* z`lYA{SZeRFyr7rz3*VSjKg&`^Dp7=@q2hlv*}k@f7*GN*VNB#->E5yRgQTcBs9Wja{-ZrfNM`>1g+cVI;h*wp zU+j|H-b6w^8z&ld1WW}@(yYx5@(iT01l!E~uq3Oi#A?A+D$BJ*YNg$-bG3qAS0s`D zYZvj0@e9^&hX+c^kdI-%!{vtSh3=vEB)8+|eRc~GD0+{O`<<8sYq$_E)fHh9=boEk zw=gmgfPgNBk70{X-c1H6aqZ;hNmbQeyx$nhuKO2xL=8W0=%nNw7N@uTK&G7{jPc?h zk_IR6hhq!3;G)jzwKF#D4j#X5Hw#Dna9_uHr%L(0GStDwQ*OwE)mLNah4r5f{({Co z{~*j$WF(8mzj%KPCcj@&E7g$#rt|_vL&)GAPtKF;OU1TAAjoxF!{e z&_Zj;B2yChnA}!l)kK9hT*{E1HuX2qiaw^4kJ5o2zo_15quWuJA1ydSgtJYi8&D!6$l176T?DYrJIe;{MDLh!Z?0OaoOl9J(yRd(RE3E zT6^SDdYLjoP=INkupKlU{&u~NlEP*jQ7xOw1LAe=v3#kbUgQ;hXgUeLfa;P3(4sk& ze&nb^&jDMq7EQxF4oOK$S?_EpujD?j^p;w?7DpGiZBz0b9A{Y2T4&(VA}%lwaZv9M ze>5SAZ~~QZT_uk6B}WK>kesC z`<(BuyR`xRhoFJa9+g7xW4T2D)Hbnl?BTt1pmm6AOG=nLu~wS?-kID(r1`eo)%zUp z*UBaZyXOn_15y24>o;(m>Nju_8Ic3M*>ix<@26KE4v*Y`pwU!w8tdP2TIt78hp(2= z^d%5yP}5?ntfE=B!<{tND_p-0KWZv;X%(}5?|#H{lt66ni2%K3`swQf7)_8W)+MmO zVrn|jY;)WK^B3=dS`vB6HCJ?c-vn{usmy7`>F^}$G_LJtIMPAaO+2fCLuRoymAY-G zc`6#L3mkhSUaxy?EVsC6cv6lOYBAiBJ+ZnL(|`C9ikqa=-owe2;cFoHeSV=RC!-%KF*Wv~!R$=-NDGx@ z8qL<~_+W)q*rKdmmxp}L#mts8M*wYK3GiMsDxG@0h87aPutNvHU-w9gA-=z4n;jKb zkd<0~`^ek6?_MQX!bn|ST;9N29!45W_oF(ezKC5WeCU^V zV*BCzcq`iO;xwy1Uwtpd*LyI}BO)*PBO>UJ2s$zEYP1Jc+!)Dez|T^O?)#b*XH4yrD(HJsd+3@RpR+M81q-7xGUFs2+h3t>OY12D#qGbOPN= z^Pe1SnY_rLZF9`%7bbrEgg(g!uC@YWroY?;`Gp&T?vZ2h6A{@`EmyWB0Hq=70j?CB z=`+Fm1+El$h-EC+x^foH1+Jxhyi)-!@x4I-xNPkopTAk)cx9mGPYvh0(x3TDedDDN zKXwB(wFMf^VZ&~zzYno(j(Qb7EUJU_`G>S%uT(f^wc_^NW{8M9wX)3BU!GL;|@#Y{~-R~6nlqQ;+~YCEs9Sqr*=y-t@P`c>aY4{W~Me~ zb`3{&cm$h*M4*5?T9lb%1G? ztax<7As_<0IE)HXQJI5(j{AgzH<1A8w3{vxYM20M$xXtF{dH&H_Zj=!k4?RJ-qc zapsf{qQ_-MvY|6to{lz#GU%QSbK{{iy6>C3dg3uwcxn}`QL8VcBTcpv4YPd=Rn`#`!y6x7=lkanb29vLn@5#rg zQl~$S*Cqt4IMtdw=k>LiXhx{3jB}HaVGkZRTh7zfn)baVmX>#$N@Y?$bQC~9q$Q5g zSC}ZWmF+^VPc1!?){@oGb0J#s><(zy&DH2UbO(B6lLoO@TmjJ`japdzbwtkd44EWa zg&7q!bm=oJ`#FKb$vu|Iv$(P3&)-I25=Bkc0=E~E>|x4!(N zu1a^k{`7r44F`Zk7XtK}cO8qCyawAr7Y0QUnqpVI=c*}`!(7{3TTiRSTeEN~HBE@A zB&)YnmeH3<(;pR<+ah)MBj9f|*c(UTxRq*`ryGaht`b{nXP zg}fs`HvlZ$x%rBWaJc!xYPfaBIM7P&(3@e{SOlNGBJ@`6`+VBlmgtSVxP1Z%s5;IO z`V^fFSTk(B4>_X!c_J_HB z!r{{R*B%6M)*WEJl8?D8^qhoHVIO%zl-1H@@&k^)2udI44Be>o8n#^jcFPuzAS&!{zJ?nLQvwd zy(=kZuMOEOL8fQfogag|uz>RCqols-DBo=M*aV3yA z@eANUnPmWL;ax#wHEQ9CwT{w z>gzH8{_yBhj%sZKYI;ZXm74^u2+d@rKp7CNa@me>^@rY-CVgfruy&VbMtQYlx9&8v zBgX#xk{|}JCm>fxk_s!Pw6IrSTT-VK#=R&qsrVYvu%s z`%RWOu;)`NSCsJCD1P?kfIxO%Uz77U=3E@66A~kFj6^w~6c`4eFRt)6mN`=}6E9!_ z07Mbto1KdMjqce%iA5S#cDNDWAC1ZhEqTV2O(Ic7eWBZvG=^I(r@ZgFo0RPoBbDQ7 z?C_`{ITO}2T)aKpyY?22#76uL{IQeJ3X)PLK-Bc~S@yL`%v9E`y}P4pqMO$ngEoGd z6&vjn948K@mpBm?e5iuWcgxN$M$vc#?kcMxKl*7?cUQzn-3`xQ~M_i7EcLLx#YGy1o zo1Y+x7^R!f1MbqkoAi#Mk#PPiXKQ7#%kOD>izUfymY_4z@^F1L2M|)n)-H`wb6U%P z>>l0@p;;utjuc@1DAA!@NTyw`WgzClZjJaY%5o6kE-#yC#4kULZw%`zCut?joq#e7n5uS6ksx)GLDc4W>@{c`Jex0ZLg5I z|4GMkVU-}r|M5{l>#3=t00C9d{O87GgAXZy!Nk_c#U)1z+E;a{f-Rz6L-Hy+d&BX=97vN+&V@j5R;(092XD0h0=f?Nq$M@uLIxde#Uex7vn&=9U z|C2VGcl3by_Ni9X2Yz<**dWi(U9f;ak&~IuHnSj=wp^4HAoSd*Q2K>qg9CZb^`}$5 zh|8c1gq@Y3Km|E&>O@I5ezvGXk-yB6SG)|jovPo&EwlfCm7s3H6am~b@RMJSA2q}{ zQC{Qj5J({*!T2qkf>Z^R7hd`P5oi`L_v)HMlWumBfs=NsI)b;WY&ChP!az%Ns6q{A z4!uM3Hif~p)XDY6n>HJ-5HMta(7rokOaw zS-IfF+!UN<<(n#x2{ok6Puf2@LgU8l;{Mxxf`RtXC3fcI-fLc`;_mIOIhPRtbxRX- zQL;g#Q;Tqmli*|bn=yGO2B&V}jM>N+8B@}sr@c_u`v}JY>UN}1BT2r-H{y{U!ZS(J zqG=}W9wUd*gr#3c4CS>*>ja|}WRoVz4yTO;IjMmer)A#_nI)kfMb<>agJP(`(uA2H zwsmQQn|r!FBYK1lfkm!@1$7xPVL2E{F*trJPn#BA(XXG=VUN4;8dbPa)S##2;~ayn zpm{f1oYBm>9gEM%Ij$RQ)ja74siNe^nb5!dY-`soCnuD)zFdsnCV`40kuh4H;4*k8 z+Sp)2dwBki9P=AZwQi52MLHS>Y`a&M08n--`f9O;6#Y*{rxzsdgSJd_^3 z<%zbnxM8-47SUX+B24& zG-0*&{nox}gb5SX00bVe=$YF0OJ&vAZM4Q*< zqG$a1*Kqnfbmv-b!j;UtGZ)FYKX^xwY_Gi5AZwrLfgx?`v3&{PwawHP3gK-URG^^& z7B~Mea%)$av-=8;y#9c(lqIZr^igOHl);~NJuo_;OM|4@_#dHq zvMZd?s%}lxrJnux@`@=$MBkH}nU0hsh5ygH*x8;f8?r}EM`TC)lAMTl2bng~+|`A_*4O!+Yc3H112{&A4rT3h*^<0rH~KPRWN3)7N9ET^VelFR zWhgVB%Enp*R9h2Fgu`$nlD90~w(*FHlxbX~=I=K3qsT>oq)@14)gW}jV$;?+gzY6O zsov_Mg;h~*b5egWIx6D+F~o!E8OAjYFr!4P&5xYg;@yF1 z31gw1oGB6kHQSx=vS2TZrX*L9n|!;G!6^);pE_OIIwO<^kao?w(|_D+l=)5bZb0EM z(;|!~H`x-$jcA@KSh#Z{JO5uBR{{>@_x;CM6Invc*oH`1vsYv*yR4aHYqE=?kiyI` zq3ju3_AN^ZF-nXrJIUBpc8w*8nC$d>8-CyZe&7E)&-*-g&V0`2oO|9ocjme0-t%e1 zO^CH`wky3$HpkwXS>!TB%v-;;`VQ){m59kAZZll&H8D1h&5zONbmM{>ofHcy>BMMi zthMJNUl;qzxGFaMM7_pb`@l*=Gpci+%M1NOYVN4lOEufv3rWJcz9m0&eSCxvrk&qQ z-x3rNg!OYS1lW)Fp}aBOqo5`V>Ta3ii$<)cYQrNSOR~NvmgMJP5911b3$Qnso$O0n zMrmw6!XGpHeJxKceAsrpyCOG!AfsnP7gI770I_vnmcx%vbfZ=((3K;l(i`{udDJt@ zdM6e(Y4SQ?3SDBA4kg{wR0TyNzVoqNM4IuoAuj*p<8I61JJgsv#4l(Ep-$H4$C_g; z9B9Tr+OlO|V7OR+A6znk*Y6bLVM7rw*u|$f#lr+;Vq~v67e8*b^TaH%X0@Qo@;vpOv4)^MhLq1*Fb|F>X=s_DxBz~}<8P$L5yu*m8YnQyW6K3Cp z%!_RNdW}0=vno8rt|yl(N}cf0M~2>eYI0_3#>cma3znej-(mCOlk~m8Q#3`3{*ktF z8*(i6H{0_Z{N%lDjG+|cHPF7A4)K&uT}EWuINBH$8X+`t^dltJxh)YBtN|Pm6MXM6 zHM;vG(B(&dojN0JnBj`j**m@-=jSSJR&J(lJ2sg8borsv*s%S5J!%EpSDkA!^Pn$H z`#KM1jQKm(w@3AI#y!n1@J()Cb)8v-<6sjLq8qo>cKk63qLw{^jk6$|H?<`(F1<*J zAuU%C#r~}2-T1e&L z)6Amf3m9vRf7$8l6j}ya6A(Uk;-L?fo>iUYh_8$*PHclVMM=oSw!yUD9iL)dgxm5E7;W)O1wd{z{gIV?#wMP zZ0TKJWrg=>y|K`VQ=pt$@Nr>#P4#AnMf7um8yrDT`L#8h@wIbDAa$7Z^A`H2-F?DB z!}F-yuV*=ixo%{+Dli?pO=W7SG&t}MCbrGtsE$#(r9INceSS5Ku1hVUKdWG7XShh7 zb(3mCt!mClWLHt@ylCs9R>IRybk0zcn`jTPqGm%nPkeSWFx()-Md-KBOUq|YU+e8_ zP7nUnQGG8-@#|)`Gk6$Tvl}&~HFS(`TgZL_#m+B76@vctVJP;=?Pto&ZncBjaIi_F zXSwi|4~UlHRhrUe)AnSZ{^B{h#Dy0T`omfA#zd#xMgGWJp57XKH_SqNOIbEtFQ>c` zgMR8zj5-0%!(DsgG2*IYTS-MxC6y&7Xf?pNb3As8D9PsqSomP=pc!5%_2)>(m>I|o3qWTUm^>wSRpS!F`ahT*oPVt3P zwtXxs>#>7+f%)thzvY1*R`HytUL2$0=?H9JfS1bCo4?SFuE(z(S!^n^p$|$M>(|@V zYR44!n2qTPMzJz2i&M$<-1R>ZWXY4J>x2^BvvcP?hMFJMVY(R_Kw=Kyy7z|gAneRF zb7X|(8lfP+*KJo9KfqNKq+Y%(_l%#E)rdwuPwtUShD}waiqO1)4UIkC$n^u}sU)3{`fcO_*RFY29r zCR2HnMVs#V%`v#-4^XKG@}6JiXAc3N_J+}q@;9zR{0ADcGn0z8)UJbGE$fkzEpnX7 z`*{)`CKK@?yJ{Exr-+R>hO(~?VGAGl^0+kGg)UXy{j?L($k$!`J&T&1)sPp(Zm3lN z9*>meom7sLHx;+mo$ceeu9f)o3F?cBsJE$%wT`%#pha7$`6Uaevfd(zHF*94E)q%q zV*Ru_pD}G(rbu)qXLQb$^h*~ilcub6bH1A z$xs*Fd(mpXWD@S8Ql~NWGt^5N^*ieJlnOz72VNDglJ{lxI>J_>f8Plf6F1K1BJbh1+??YJ=ye=5%_`1;(N1MT25oUnVo&7|-kzeLghrLU4&` zuz{i->q0Bio0hI4qtey7wTL?sVxDFu%H1g)8YJEj|4P~AJ2956G0*!pP>KCo-3>Fl zrym=ebvrq{jP#JqM5WqzsXFm$o}8|bmV9#>3Iapl{s>~GmGRKin;xXN&+!0rZG@6z zy{dFL)E?FD*kGewe1wYrHmUdh)=Egn^ni_FMM)d{YXI|Ui?1n`(o_gw z+BS2YO37SKvp!?Id=jBj7e%X=K=M)q-3e;Z%WKXO9ri(&=#GZH5J> zrOaIoPNTTAcWW7G^VxK*4chVePVZZ{a9?u_A0cl1N4^7i&xzvVEfmGe&J=Wzca4{i zh6BWQ+nHLw$8fgZYj)6AG+xdXjfheni%qv8W`o2j!TNRPK5YDwsDbBN82h$u{=lnBQS#(5-6ky_ee;<{xA@(CTbm!88felYroJ zWoqneu4Mr~K1A15Q&D=!wOUmJ1NuzkZ}MvdO%YtF!1He50uw627c1YwS8$5EC`+{z|bC05?(W&?ThS-+GP|td0^o|(n-?TVu|H% z>h6t(1%}S7jK-{)uc()wm^*c*>!i!aOSd{V`*5i$lm(ytcDe23qZN9U#_UxRr>!7r^7B=P0GwR8R2J726vAXW#p`hpyW(n!f>|44NI;n> zh8VhBBnOfxKk0s%S6jd@s;M|<9uA5|(GvVYnVW`YLBE4L7Kd;_7tO}5(Yu^6y1gs9 z3-vmhwS>MH)nSX^DIB9MeO2FlcZ+Gcjq?8FJuTrm(JkAYimW{i^mmr6NXoLs(g^1O zJic}cwP9jd@wV;4yxQlh#$VGcr%l_w-E)0vq*5Wz{^s0~iCapVi#2ST!Gb!q;&OG$ z_xI>7H%ap-vnhWiG~IPs^P?CZTJMV$KCSFmSYE3hXef*{EY{C2gSQi3X~XKb*(qD~ zG}1=Q^&v_|!I0I)2l=FXwn( z62hFC-jB83{r3G^#JwJ^-+~OUH&FBUCBl{8U9Q@m8n6D5s(?@X9lbYEmK6G0=KHT! z((?k;^)6-u#b6(j5%;wp%KA3lGG^vUikj_CA}hETFq*JOu3y{yNqf0ITXYuUoae%- zJgkp5eAK9h!r$D+CFWR1t3_O9!7yzOp)4x)0m|F4RA|ImRzxWK*tf|d6PC~EZg8^$&8{YFuZ^?rk~_CVrXd;R~ZsMc3|5?jZ4 zT*o-<>vZJH*`cImG5XBz>fy57iL&X5_g?&$$>mlHT zvt;Ef$7r$I^$@c1p_6rol=+m%;KX`CGVt$4X%I-@5b%j68MssrB?HO3;(+w6IVA|B zcnCPHPX?+qoFxPQ?!E$nV26O;uaJTDcslG26PkZT=TA=A7*H?-Zoxx}_U71efc?)X zJe*1Xi^2u2nFD!cVe){-UVjf!*?{klC#Smzdp8G3J2#g@L+cM&OdBad2^d?Z)F9B= zzg)mrICTwcYbA5Y#XkztwhqyG0B{btMGh&HUB?=>3St>;X|YO;4EtW_H$uSamSlN& z<0-yB1o$EY>8F523}8|D5J4uE1=w6+)Ix*ZZWP$phc!XK5ePt^8$01}0_)Lqz>5at z0(NBHx+al*>;fRWbc-ze!y(noy)QRvhJYP!ljYIPXZB?^fGpRO%)8;ufc0oU;ALrn zfFIsJ;1DE-`)_&~Soc2U@BIhZk^m8Gb<2TrC!kD3V`p2m$%@i$@He_ZN2!30Y93O2 z7X(-^BZCgDsviP51p^=fEU}e!-{tLA2>5p*Ho8*;tJ21`FSBZcfLD_b+@-;0wQ(MF z50DS00nd*Mo11;|U(XPmhG)kEp78^oi5)T;oegwJ0DCAV=ynJ={`o&fn%fVa%>p2Q zTmZ 0){ for(int i = 0; i < tile.getSizeInventory(); i++){ - this.dropSlotFromInventory(i, tile, world, x, y, z); + this.dropSlotFromInventory(i, tile, world, position); } } } } } - public void dropSlotFromInventory(int i, TileEntityInventoryBase tile, World world, int x, int y, int z){ + public void dropSlotFromInventory(int i, TileEntityInventoryBase tile, World world, Position pos){ ItemStack stack = tile.getStackInSlot(i); if(stack != null && stack.stackSize > 0){ float dX = Util.RANDOM.nextFloat()*0.8F+0.1F; float dY = Util.RANDOM.nextFloat()*0.8F+0.1F; float dZ = Util.RANDOM.nextFloat()*0.8F+0.1F; - EntityItem entityItem = new EntityItem(world, x+dX, y+dY, z+dZ, stack.copy()); + EntityItem entityItem = new EntityItem(world, pos.getX()+dX, pos.getY()+dY, pos.getZ()+dZ, stack.copy()); if(stack.hasTagCompound()){ entityItem.getEntityItem().setTagCompound((NBTTagCompound)stack.getTagCompound().copy()); } @@ -106,7 +109,7 @@ public abstract class BlockContainerBase extends BlockContainer{ } @Override - public void onNeighborBlockChange(World world, int x, int y, int z, Block block){ + public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state){ this.updateRedstoneState(world, x, y, z); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java index 9d2904dd2..8d908eaed 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.material.Material; @@ -24,6 +21,9 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class BlockFluidFlowing extends BlockFluidClassic{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java index 20fc6f7ed..03d5e7839 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.BlockCrops; @@ -24,6 +21,9 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.Random; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java index 23801f1f0..dff258270 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java @@ -11,13 +11,13 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockStairs; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.registry.GameRegistry; public class BlockStair extends BlockStairs{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java index 73bb30c6b..cedfd9fbe 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; @@ -22,6 +19,9 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java index 17af8debd..64dcdf922 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java @@ -10,11 +10,11 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.world.IBlockAccess; +import net.minecraftforge.fml.client.registry.ISimpleBlockRenderingHandler; import org.lwjgl.opengl.GL11; public class RenderInventory implements ISimpleBlockRenderingHandler{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java index 12a3c628e..571fc71a1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java @@ -10,12 +10,12 @@ package de.ellpeck.actuallyadditions.mod.booklet; -import cpw.mods.fml.relauncher.ReflectionHelper; import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.achievement.GuiAchievements; import net.minecraft.stats.StatFileWriter; +import net.minecraftforge.fml.relauncher.ReflectionHelper; /** * (Partially excerpted from Botania by Vazkii with permission, thanks!) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java index dec0ba126..50432e30c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.booklet; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.internal.EntrySet; @@ -38,6 +36,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java index 99493b6f7..485893374 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.booklet; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.network.PacketBookletStandButton; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBookletStand; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.Objects; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java index 28df34a68..4523443c8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeBrewing; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeIngredient; @@ -24,6 +22,8 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class PageCoffeeRecipe extends BookletPageAA{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java index d75445402..f879909b2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; -import cpw.mods.fml.relauncher.ReflectionHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; @@ -26,6 +23,9 @@ import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.item.crafting.ShapelessRecipes; import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fml.relauncher.ReflectionHelper; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java index 46a5237e5..34d7ff5d8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; @@ -23,6 +21,8 @@ import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java index a0d71421b..f9c2b3d5a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; @@ -23,6 +21,8 @@ import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.Map; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java index 2b51ea8c1..356e631d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class PagePicture extends PageTextOnly{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java index 14f794561..adc883a3c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.api.recipe.LensNoneRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; @@ -24,6 +22,8 @@ import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTextOnly.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTextOnly.java index 3d151190a..11d28dda9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTextOnly.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTextOnly.java @@ -10,12 +10,12 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class PageTextOnly extends BookletPageAA{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigurationHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigurationHandler.java index 74940a7a3..d05064a5f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigurationHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigurationHandler.java @@ -10,11 +10,11 @@ package de.ellpeck.actuallyadditions.mod.config; -import cpw.mods.fml.client.event.ConfigChangedEvent; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.fml.client.event.ConfigChangedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.io.File; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiConfiguration.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiConfiguration.java index d291a4734..b5256965c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiConfiguration.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiConfiguration.java @@ -10,12 +10,12 @@ package de.ellpeck.actuallyadditions.mod.config; -import cpw.mods.fml.client.config.GuiConfig; -import cpw.mods.fml.client.config.IConfigElement; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.gui.GuiScreen; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.ConfigElement; +import net.minecraftforge.fml.client.config.GuiConfig; +import net.minecraftforge.fml.client.config.IConfigElement; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiFactory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiFactory.java index 8399db8bb..ec8280c6a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiFactory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiFactory.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.config; -import cpw.mods.fml.client.IModGuiFactory; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; +import net.minecraftforge.fml.client.IModGuiFactory; import java.util.Set; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java index 41234ed48..1e92a2ba2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.crafting; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.blocks.BlockColoredLamp; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; @@ -23,6 +22,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; +import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java index 1c5ce4981..ce9c4ad1a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.crafting; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.config.values.ConfigCrafting; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; @@ -20,6 +19,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; +import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java index 4a7102a3d..81f9a6afa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.crafting; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; @@ -27,6 +26,7 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraftforge.common.IPlantable; +import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiscCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiscCrafting.java index d6d23082d..9618d86cd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiscCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiscCrafting.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.crafting; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.config.values.ConfigCrafting; import de.ellpeck.actuallyadditions.mod.items.InitItems; @@ -21,6 +20,7 @@ import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; +import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ToolCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ToolCrafting.java index 08c35de25..03649ffc4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ToolCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ToolCrafting.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.crafting; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.config.values.ConfigCrafting; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; @@ -21,6 +20,7 @@ import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; +import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java b/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java index 2892dae62..3db5c496e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.creative; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.items.InitForeignPaxels; import de.ellpeck.actuallyadditions.mod.items.InitItems; @@ -20,6 +18,8 @@ import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java index 28af86047..3c82914e9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.event; -import cpw.mods.fml.common.eventhandler.Event; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.items.InitItems; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.player.FillBucketEvent; +import net.minecraftforge.fml.common.eventhandler.Event; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class BucketFillEvent{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/EntityLivingEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/EntityLivingEvent.java index cd0400cb1..263ae1bb5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/EntityLivingEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/EntityLivingEvent.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.event; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats; @@ -20,6 +19,7 @@ import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.util.UUID; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java index 41fa9d6a9..013f39e8b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.event; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.tile.IRedstoneToggle; @@ -27,6 +26,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MovingObjectPosition; import net.minecraftforge.client.event.RenderGameOverlayEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class HudEvent{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/InitEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/InitEvents.java index 6571dc5b6..1ddf59809 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/InitEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/InitEvents.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.event; -import cpw.mods.fml.common.Loader; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.nei.NEIScreenEvents; import de.ellpeck.actuallyadditions.mod.update.UpdateCheckerClientNotificationEvent; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.common.Loader; public class InitEvents{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/LivingDropEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/LivingDropEvent.java index 670af2274..c84cf1df8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/LivingDropEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/LivingDropEvent.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.event; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; @@ -22,6 +21,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.living.LivingDropsEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class LivingDropEvent{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/LogoutEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/LogoutEvent.java index f2cf9d19b..2d14f6a0e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/LogoutEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/LogoutEvent.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.event; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent; import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.PlayerEvent; public class LogoutEvent{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java index 5298c7744..541857866 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.event; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent; import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements; import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; @@ -25,6 +23,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.PlayerEvent; import java.util.Locale; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java index ed04f0706..77b3e0dfc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.event; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.util.KeyUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -19,6 +18,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.item.Item; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.oredict.OreDictionary; public class TooltipEvent{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java index 313d588e8..6703a23bd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.event; -import cpw.mods.fml.common.eventhandler.Event; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheWildPlants; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; @@ -23,6 +21,8 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.world.biome.BiomeGenOcean; import net.minecraftforge.event.terraingen.DecorateBiomeEvent; +import net.minecraftforge.fml.common.eventhandler.Event; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.util.ArrayList; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldLoadingEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldLoadingEvents.java index 1f28e41ad..602ca99b7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldLoadingEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldLoadingEvents.java @@ -10,10 +10,10 @@ package de.ellpeck.actuallyadditions.mod.event; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import de.ellpeck.actuallyadditions.mod.misc.LaserRelayConnectionHandler; import de.ellpeck.actuallyadditions.mod.misc.WorldData; import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class WorldLoadingEvents{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/InitVillager.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/InitVillager.java index e9de392f4..1c1871173 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/InitVillager.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/InitVillager.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.gen; -import cpw.mods.fml.common.registry.VillagerRegistry; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.items.InitItems; @@ -21,6 +20,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.gen.structure.MapGenStructureIO; import net.minecraftforge.common.ChestGenHooks; +import net.minecraftforge.fml.common.registry.VillagerRegistry; public class InitVillager{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java index 232558eac..9beb433f5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.gen; -import cpw.mods.fml.common.registry.VillagerRegistry; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheJams; import net.minecraft.entity.passive.EntityVillager; @@ -19,6 +18,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MathHelper; import net.minecraft.village.MerchantRecipe; import net.minecraft.village.MerchantRecipeList; +import net.minecraftforge.fml.common.registry.VillagerRegistry; import net.minecraftforge.oredict.OreDictionary; import java.util.ArrayList; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java index 7ab3e8097..821c09b24 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.gen; -import cpw.mods.fml.common.IWorldGenerator; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; @@ -25,6 +23,8 @@ import net.minecraft.world.World; import net.minecraft.world.WorldType; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; +import net.minecraftforge.fml.common.IWorldGenerator; +import net.minecraftforge.fml.common.registry.GameRegistry; import java.util.Random; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageCustomCropFieldHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageCustomCropFieldHandler.java index 75d078aa7..e627eb36a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageCustomCropFieldHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageCustomCropFieldHandler.java @@ -10,8 +10,8 @@ package de.ellpeck.actuallyadditions.mod.gen; -import cpw.mods.fml.common.registry.VillagerRegistry; import net.minecraft.world.gen.structure.StructureVillagePieces; +import net.minecraftforge.fml.common.registry.VillagerRegistry; import java.util.List; import java.util.Random; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageJamHouseHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageJamHouseHandler.java index 2910e7ce5..96acd1046 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageJamHouseHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageJamHouseHandler.java @@ -10,8 +10,8 @@ package de.ellpeck.actuallyadditions.mod.gen; -import cpw.mods.fml.common.registry.VillagerRegistry; import net.minecraft.world.gen.structure.StructureVillagePieces; +import net.minecraftforge.fml.common.registry.VillagerRegistry; import java.util.List; import java.util.Random; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java index 4272e5b1d..100336929 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java @@ -11,8 +11,6 @@ package de.ellpeck.actuallyadditions.mod.inventory; import cofh.api.energy.IEnergyContainerItem; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotOutput; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; @@ -24,6 +22,8 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; @InventoryContainer public class ContainerEnergizer extends Container{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java index a5b0411b1..5b16f26fd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java @@ -11,8 +11,6 @@ package de.ellpeck.actuallyadditions.mod.inventory; import cofh.api.energy.IEnergyContainerItem; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotOutput; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; @@ -24,6 +22,8 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; @InventoryContainer public class ContainerEnervator extends Container{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java index 5091d906b..3af5ee610 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory; -import cpw.mods.fml.common.network.IGuiHandler; -import cpw.mods.fml.common.network.NetworkRegistry; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.booklet.GuiBookletStand; @@ -20,6 +18,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import net.minecraftforge.fml.common.network.IGuiHandler; +import net.minecraftforge.fml.common.network.NetworkRegistry; public class GuiHandler implements IGuiHandler{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java index bae4df8a2..fdd4f1b8a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java index daaab89d2..5d879498f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCanolaPress; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; @@ -20,6 +18,8 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java index 894188f72..34284d992 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoalGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java index 3d0c443f9..8365ae208 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoffeeMachine; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiButton; @@ -26,6 +24,8 @@ import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java index 6d282f751..94a5a3cf5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCrafter; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java index 4855a3589..c84dd0562 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDirectionalBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java index b87a2cabe..1b54f1b7f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java index e6a58242e..55700e1a6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDropper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java index b8aa7d0a0..f0651cda5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnergizer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java index 06edf819e..51d3d471b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnervator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java index 72ed73899..d8a17b528 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFeeder; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder; @@ -21,6 +19,8 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Arrays; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java index f2973c826..f8344d823 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFermentingBarrel; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; @@ -20,6 +18,8 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java index eb045ba56..1bf5e1945 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFluidCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; @@ -20,6 +18,8 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java index c01c42b63..782522bd9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFurnaceDouble; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java index c6886eaf8..e4d74c735 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerGiantChest; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java index a1b577afd..f35b9a896 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerGrinder; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java index f9bc8901c..688cbbb53 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerInputter; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiButton; @@ -30,6 +28,8 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java index aa36e573b..84f85d8da 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerMiner; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiButton; @@ -24,6 +22,8 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java index b496249bf..739d83c54 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerOilGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; @@ -20,6 +18,8 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java index 2384e1295..bb0bd73df 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerPhantomPlacer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java index 12e6a091b..df0cf5715 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerRangedCollector; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiButton; @@ -26,6 +24,8 @@ import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java index 9f7419ea6..7674cfd8b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerRepairer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer; @@ -19,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java index ca4ea5b6b..c234dfffc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerSmileyCloud; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiString; @@ -26,6 +24,8 @@ import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java index 927ef180e..a43378617 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.inventory.ContainerXPSolidifier; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiButton; @@ -25,6 +23,8 @@ import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitForeignPaxels.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitForeignPaxels.java index 0ca1e7904..001d1be79 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitForeignPaxels.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitForeignPaxels.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigCrafting; import de.ellpeck.actuallyadditions.mod.crafting.ToolCrafting; @@ -23,6 +21,8 @@ import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemTool; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.ShapelessOreRecipe; public class InitForeignPaxels{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java index 876c0da5c..60f4efc9d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemBattery extends ItemEnergy{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java index eb3f2d640..3f59f4e37 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; @@ -37,6 +35,8 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java index 44dbb5073..055baebc6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest; @@ -26,6 +24,8 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemChestToCrateUpgrade extends ItemBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java index 09759a516..ab5e0baf8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeBrewing; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeIngredient; @@ -34,6 +31,9 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.IIcon; import net.minecraft.util.StringUtils; import net.minecraft.world.World; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java index aa1079412..665bc602c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemCoffeeBean extends ItemFoodBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java index 1014d5911..c368a6273 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; @@ -22,6 +20,8 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemCrafterOnAStick extends ItemBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java index 7c29da0db..6be08f01d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.blocks.BlockCrystal; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -22,6 +20,8 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java index 1a39b8ad3..8fc4f5075 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java @@ -12,8 +12,6 @@ package de.ellpeck.actuallyadditions.mod.items; import cofh.api.energy.IEnergyContainerItem; import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; @@ -44,6 +42,8 @@ import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.HashSet; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java index b7c7a22bb..2644fea3b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; @@ -20,6 +18,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemDrillUpgrade extends ItemBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java index 7a0f24051..e7b8e0583 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheDusts; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -22,6 +20,8 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java index e11edd912..67626e437 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; @@ -21,6 +19,8 @@ import net.minecraft.item.ItemDye; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemFertilizer extends ItemBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java index 61dc3c9c5..131b9c766 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -27,6 +25,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java index eee02d5ae..e84a0e536 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemGeneric extends ItemBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java index 0f0b832bf..1323a00b5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java @@ -10,22 +10,17 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockGrass; import net.minecraft.block.IGrowable; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; @@ -51,10 +46,10 @@ public class ItemGrowthRing extends ItemEnergy{ if(equipped != null && equipped == stack && this.getEnergyStored(stack) >= energyUse){ ArrayList blocks = new ArrayList(); - if(stack.stackTagCompound == null){ + if(stack.getTagCompound() == null){ stack.setTagCompound(new NBTTagCompound()); } - int waitTime = stack.stackTagCompound.getInteger("WaitTime"); + int waitTime = stack.getTagCompound().getInteger("WaitTime"); //Adding all possible Blocks if(waitTime >= 30){ @@ -97,28 +92,16 @@ public class ItemGrowthRing extends ItemEnergy{ } } - stack.stackTagCompound.setInteger("WaitTime", 0); + stack.getTagCompound().setInteger("WaitTime", 0); } else{ - stack.stackTagCompound.setInteger("WaitTime", waitTime+1); + stack.getTagCompound().setInteger("WaitTime", waitTime+1); } } } @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairyBall.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairyBall.java index 52cfc181b..20d8707d4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairyBall.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairyBall.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; @@ -25,6 +23,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.WeightedRandom; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemHairyBall extends ItemBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java index be4f9301b..0765a01d5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheJams; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -27,6 +25,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java index c50f7609e..fb108cd6e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java @@ -11,8 +11,6 @@ package de.ellpeck.actuallyadditions.mod.items; import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; @@ -21,6 +19,8 @@ import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemKnife extends ItemBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java index cc67f58c2..a5284f36d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.misc.LaserRelayConnectionHandler; @@ -28,6 +26,8 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java index 0d216d4a1..bfe8d9eb7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; @@ -27,6 +25,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java index 789057721..316180063 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; @@ -24,6 +22,8 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java index 312de25d8..23472a6ae 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -22,6 +20,8 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java index 9550aa187..412e5deca 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; @@ -30,6 +28,8 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java index c9cdf04b4..194b3c4a1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.ThePotionRings; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -26,6 +24,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java index 4d58e6737..f44589ba8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; @@ -20,6 +18,8 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemResonantRice extends ItemBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java index d4de3266d..963fee470 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -25,6 +22,9 @@ import net.minecraft.item.ItemSeeds; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemSeed extends ItemSeeds{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java index cbcd4cb1d..436ae8830 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; @@ -21,6 +19,8 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemSolidifiedExperience extends ItemBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleStaff.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleStaff.java index c40772a6f..09e883165 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleStaff.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleStaff.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; @@ -27,6 +25,8 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemTeleStaff extends ItemEnergy{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java index 8e2ca8196..292bcf747 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; @@ -23,6 +21,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemWaterRemovalRing extends ItemEnergy{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java index 49b857391..542877f35 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; @@ -19,6 +17,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java index 16c486a85..4ad3ac597 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java @@ -11,10 +11,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; import com.google.common.collect.Sets; -import cpw.mods.fml.common.eventhandler.Event; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; @@ -31,6 +27,10 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.UseHoeEvent; +import net.minecraftforge.fml.common.eventhandler.Event; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; import java.util.HashSet; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java index fc8b8c4b9..5580aef27 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -22,6 +19,9 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemArmorAA extends ItemArmor{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java index e45d8fa22..8c6fa7608 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -21,6 +18,9 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemAxeAA extends ItemAxe{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java index 33a1e543c..f8eeb4f60 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java @@ -10,10 +10,10 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.item.Item; +import net.minecraftforge.fml.common.registry.GameRegistry; public class ItemBase extends Item{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java index bda610a17..a1c729c26 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; @@ -22,6 +19,9 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemBucketAA extends ItemBucket{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java index c6500734d..932bceac7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java @@ -11,9 +11,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; import cofh.api.energy.ItemEnergyContainer; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.creativetab.CreativeTabs; @@ -22,6 +19,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java index 85938c9fb..5953c2b85 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java @@ -10,10 +10,10 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.item.ItemFood; +import net.minecraftforge.fml.common.registry.GameRegistry; public class ItemFoodBase extends ItemFood{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java index 32f7d747c..067e180cf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -22,6 +19,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemHoeAA extends ItemHoe{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java index fd43b29c7..07e962076 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -21,6 +18,9 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemPickaxeAA extends ItemPickaxe{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java index dbb5cfffc..e25d82710 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -22,6 +19,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemShovelAA extends ItemSpade{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java index 9c18affac..aa5e505bc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; @@ -22,6 +19,9 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemSwordAA extends ItemSword{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/ItemLens.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/ItemLens.java index f8a22c60e..81353a9b9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/ItemLens.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/ItemLens.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.lens; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; @@ -20,6 +18,8 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemLens extends ItemBase implements ILensItem{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/EntityColoredParticleFX.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/EntityColoredParticleFX.java index 3b798cb92..e2753ae57 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/EntityColoredParticleFX.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/EntityColoredParticleFX.java @@ -10,10 +10,10 @@ package de.ellpeck.actuallyadditions.mod.misc; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.particle.EntityReddustFX; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class EntityColoredParticleFX extends EntityReddustFX{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java index f22e75638..3b124b5ab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java @@ -19,8 +19,8 @@ import io.netty.util.internal.ConcurrentSet; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class LaserRelayConnectionHandler{ @@ -171,9 +171,9 @@ public class LaserRelayConnectionHandler{ if(relay != null){ //Get every side of the relay for(int i = 0; i <= 5; i++){ - ForgeDirection side = ForgeDirection.getOrientation(i); + EnumFacing side = WorldUtil.getDirectionBySidesInOrder(i); //Get the Position at the side - Position pos = WorldUtil.getCoordsFromSide(side, relay.getX(), relay.getY(), relay.getZ(), 0); + Position pos = WorldUtil.getCoordsFromSide(side, relay, 0); if(!pos.isEqual(energyGottenFrom)){ TileEntity tile = pos.getTileEntity(world); if(tile instanceof IEnergyReceiver && !(tile instanceof TileEntityLaserRelay)){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index c35584b61..7262f67eb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.misc.special; -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.client.event.RenderPlayerEvent; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java index 24cc50d60..b5ecf7382 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.nei; import codechicken.nei.recipe.GuiRecipe; import codechicken.nei.recipe.IRecipeHandler; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.INEIRecipeHandler; @@ -23,6 +22,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.GuiScreenEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class NEIScreenEvents{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java index d9072b17c..3c057128e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.network; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.internal.EntrySet; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBookletStand; @@ -21,6 +18,9 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; +import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; +import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import java.util.Objects; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java index f682126b4..b92c6468e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.network; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import cpw.mods.fml.relauncher.Side; import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiButton; import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiNumber; import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiString; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; +import net.minecraftforge.fml.relauncher.Side; public class PacketHandler{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java index 696bbb27c..c05847186 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java @@ -10,16 +10,16 @@ package de.ellpeck.actuallyadditions.mod.network; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.misc.EntityColoredParticleFX; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; +import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; +import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class PacketParticle implements IMessage{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java index e300aa37c..466af0851 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.network.gui; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; +import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; +import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; public class PacketGuiButton implements IMessage{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java index ed52de8f0..a8fcf7a00 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.network.gui; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; +import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; +import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; public class PacketGuiNumber implements IMessage{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java index 504ceb8af..660b9621a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.network.gui; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; +import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; +import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; public class PacketGuiString implements IMessage{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index b996e177d..6cc76f337 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -11,12 +11,6 @@ package de.ellpeck.actuallyadditions.mod.proxy; -import cpw.mods.fml.client.registry.ClientRegistry; -import cpw.mods.fml.client.registry.RenderingRegistry; -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.VillagerRegistry; import de.ellpeck.actuallyadditions.mod.blocks.render.*; import de.ellpeck.actuallyadditions.mod.blocks.render.model.*; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; @@ -30,6 +24,12 @@ import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentClientData; import net.minecraft.client.Minecraft; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.client.registry.ClientRegistry; +import net.minecraftforge.fml.client.registry.RenderingRegistry; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.registry.VillagerRegistry; import java.io.File; import java.util.Calendar; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java index 9a78e2dc7..7ad5c04c1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.proxy; -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; public interface IProxy{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java index 280201a4a..46fe08e15 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java @@ -10,10 +10,10 @@ package de.ellpeck.actuallyadditions.mod.proxy; -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @SuppressWarnings("unused") public class ServerProxy implements IProxy{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java index 69cb9d1ed..dd8cdb85a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.recipe; -import cpw.mods.fml.common.IFuelHandler; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; import de.ellpeck.actuallyadditions.mod.items.InitItems; @@ -20,6 +18,8 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.IFuelHandler; +import net.minecraftforge.fml.common.registry.GameRegistry; import org.apache.commons.lang3.tuple.Pair; import java.util.HashMap; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java index df63dd939..295f953dc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java @@ -12,9 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.ILensItem; @@ -29,6 +26,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityAtomicReconstructor extends TileEntityInventoryBase implements IEnergyReceiver, IEnergySaver, IRedstoneToggle, IEnergyDisplay, IAtomicReconstructor{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java index 24ac027f7..66587be8f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.tile; -import cpw.mods.fml.common.registry.GameRegistry; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.network.VanillaPacketSyncer; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -21,6 +20,7 @@ import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.GameRegistry; public abstract class TileEntityBase extends TileEntity{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java index 642e82d4a..afef8ee91 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java @@ -12,8 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; @@ -23,6 +21,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityCanolaPress extends TileEntityInventoryBase implements IEnergyReceiver, IFluidHandler, IEnergySaver, IFluidSaver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java index c7abc6359..18d75dd85 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java @@ -12,13 +12,13 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityCoalGenerator extends TileEntityInventoryBase implements IEnergyProvider, IEnergySaver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java index 474a2bd48..ae2282ac6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java @@ -12,8 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeIngredient; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.ItemCoffee; @@ -26,6 +24,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements IButtonReactor, IEnergyReceiver, IFluidSaver, IFluidHandler, IEnergySaver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java index a9ea0224c..a99c73b9d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java @@ -12,8 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; @@ -21,6 +19,8 @@ import net.minecraft.block.BlockAir; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java index 5fa0a8159..2fdbf37e9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java @@ -13,11 +13,11 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyContainerItem; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityEnergizer extends TileEntityInventoryBase implements IEnergyReceiver, IEnergySaver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java index 6246344b2..7745377b5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java @@ -13,12 +13,12 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyContainerItem; import cofh.api.energy.IEnergyProvider; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityEnervator extends TileEntityInventoryBase implements IEnergyProvider, IEnergySaver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java index 94d752215..c53a7e601 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.tile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java index 70c06465e..ffd613b71 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.tile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.init.Items; @@ -19,6 +17,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityFermentingBarrel extends TileEntityInventoryBase implements IFluidHandler, IFluidSaver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java index c5a9c907e..2daff36b6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java @@ -12,8 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.entity.item.EntityFireworkRocket; @@ -24,6 +22,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.MathHelper; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityFireworkBox extends TileEntityBase implements IEnergyReceiver, IRedstoneToggle, IEnergyDisplay, IEnergySaver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java index 881c2ce01..dd5b7a213 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.tile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; @@ -20,6 +18,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityFluidCollector extends TileEntityInventoryBase implements IFluidHandler, IFluidSaver, IRedstoneToggle{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java index 23bdef8b5..012a91583 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java @@ -12,12 +12,12 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements IEnergyReceiver, IEnergySaver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java index a23286de8..79234d481 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java @@ -12,12 +12,12 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyProvider, IEnergySaver, IEnergyDisplay{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java index 34aeaca9e..29f560b1b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java @@ -13,14 +13,14 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java index 1c1855a72..d1a17a8a7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java @@ -12,8 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.util.Util; @@ -22,6 +20,8 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java index a9b99ca18..5e53b3c21 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java @@ -12,11 +12,11 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityItemRepairer extends TileEntityInventoryBase implements IEnergyReceiver, IEnergySaver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java index f66135ba7..4424f4c31 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java @@ -11,8 +11,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; @@ -27,6 +25,8 @@ import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityLaserRelay extends TileEntityBase implements IEnergyReceiver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java index 42a07c10a..181f8de5f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java @@ -12,8 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; @@ -21,6 +19,8 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityLavaFactoryController extends TileEntityBase implements IEnergyReceiver, IEnergySaver, IEnergyDisplay{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java index edba85251..de36d2910 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java @@ -12,9 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; @@ -23,6 +20,9 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java index bef5ae9cf..f5f43c4af 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java @@ -12,9 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; @@ -28,6 +25,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; import java.util.ArrayList; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java index c34d821b9..53a5715b9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java @@ -12,14 +12,14 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityOilGenerator extends TileEntityInventoryBase implements IEnergyProvider, IFluidHandler, IEnergySaver, IFluidSaver{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java index f29374bdf..4e39ebbbb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java @@ -13,10 +13,11 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.IEnergyHandler; import cofh.api.energy.IEnergyProvider; import cofh.api.energy.IEnergyReceiver; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public class TileEntityPhantomEnergyface extends TileEntityPhantomface implements IEnergyHandler{ @@ -26,17 +27,17 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.isBoundThingInRange() && this.getReceiver() != null ? this.getReceiver().receiveEnergy(from, maxReceive, simulate) : 0; } @Override - public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate){ + public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate){ return this.isBoundThingInRange() && this.getProvider() != null ? this.getProvider().extractEnergy(from, maxExtract, simulate) : 0; } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ if(this.isBoundThingInRange()){ if(this.getProvider() != null){ return this.getProvider().getEnergyStored(from); @@ -49,7 +50,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ if(this.isBoundThingInRange()){ if(this.getProvider() != null){ return this.getProvider().getMaxEnergyStored(from); @@ -63,7 +64,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement public IEnergyProvider getProvider(){ if(this.boundPosition != null){ - TileEntity tile = worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()); + TileEntity tile = worldObj.getTileEntity(boundPosition.toBlockPos()); if(tile instanceof IEnergyProvider){ return (IEnergyProvider)tile; } @@ -73,7 +74,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement public IEnergyReceiver getReceiver(){ if(this.boundPosition != null){ - TileEntity tile = worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()); + TileEntity tile = worldObj.getTileEntity(boundPosition.toBlockPos()); if(tile instanceof IEnergyReceiver){ return (IEnergyReceiver)tile; } @@ -87,12 +88,12 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement if(!worldObj.isRemote){ if(this.isBoundThingInRange() && this.getProvider() != null){ - this.pushEnergy(ForgeDirection.UP); - this.pushEnergy(ForgeDirection.DOWN); - this.pushEnergy(ForgeDirection.NORTH); - this.pushEnergy(ForgeDirection.EAST); - this.pushEnergy(ForgeDirection.SOUTH); - this.pushEnergy(ForgeDirection.WEST); + this.pushEnergy(EnumFacing.UP); + this.pushEnergy(EnumFacing.DOWN); + this.pushEnergy(EnumFacing.NORTH); + this.pushEnergy(EnumFacing.EAST); + this.pushEnergy(EnumFacing.SOUTH); + this.pushEnergy(EnumFacing.WEST); } } } @@ -102,11 +103,11 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement return super.isBoundThingInRange() && (worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) instanceof IEnergyReceiver || worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) instanceof IEnergyProvider); } - private void pushEnergy(ForgeDirection side){ - TileEntity tile = WorldUtil.getTileEntityFromSide(side, worldObj, xCoord, yCoord, zCoord); - if(tile != null && tile instanceof IEnergyReceiver && this.getProvider().getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + private void pushEnergy(EnumFacing side){ + TileEntity tile = WorldUtil.getTileEntityFromSide(side, worldObj, Position.fromTileEntity(this)); + if(tile != null && tile instanceof IEnergyReceiver && this.getProvider().getEnergyStored(side.getOpposite()) > 0){ if(((IEnergyReceiver)tile).canConnectEnergy(side.getOpposite()) && this.canConnectEnergy(side)){ - int receive = this.extractEnergy(side, Math.min(((IEnergyReceiver)tile).getMaxEnergyStored(ForgeDirection.UNKNOWN)-((IEnergyReceiver)tile).getEnergyStored(ForgeDirection.UNKNOWN), this.getEnergyStored(ForgeDirection.UNKNOWN)), true); + int receive = this.extractEnergy(side, Math.min(((IEnergyReceiver)tile).getMaxEnergyStored(side.getOpposite())-((IEnergyReceiver)tile).getEnergyStored(side.getOpposite()), this.getEnergyStored(side)), true); int actualReceive = ((IEnergyReceiver)tile).receiveEnergy(side.getOpposite(), receive, false); this.extractEnergy(side, actualReceive, false); } @@ -114,7 +115,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ if(this.isBoundThingInRange()){ if(this.getProvider() != null){ return this.getProvider().canConnectEnergy(from); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java index 50eba8341..8c04c5328 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.tile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; @@ -23,6 +21,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.Vec3; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java index 869af8fb0..3882d7863 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.tile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom; @@ -23,6 +21,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityPhantomface extends TileEntityInventoryBase implements IPhantomTile{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntitySmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntitySmileyCloud.java index a1ebe1825..e3569d266 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntitySmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntitySmileyCloud.java @@ -10,11 +10,11 @@ package de.ellpeck.actuallyadditions.mod.tile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.network.gui.IStringReactor; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.Objects; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java index 5b321bbe9..483c430dc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.update; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.TickEvent; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.IChatComponent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; public class UpdateCheckerClientNotificationEvent{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 8ce53337a..061ee263b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -10,18 +10,21 @@ package de.ellpeck.actuallyadditions.mod.util; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.*; +import net.minecraft.client.renderer.ItemRenderer; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java index b3628afc9..b15b83d4d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java @@ -10,12 +10,12 @@ package de.ellpeck.actuallyadditions.mod.util; -import cpw.mods.fml.common.event.FMLInterModComms; import de.ellpeck.actuallyadditions.mod.items.ItemSeed; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fml.common.event.FMLInterModComms; public class CompatUtil{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java index 119674142..c2fda193c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.util; -import cpw.mods.fml.common.FMLCommonHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; import de.ellpeck.actuallyadditions.api.recipe.LensNoneRecipe; @@ -23,6 +22,7 @@ import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; +import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.oredict.OreDictionary; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index 3cbf8c8df..e571d55e2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -28,6 +28,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.network.play.client.C07PacketPlayerDigging; import net.minecraft.network.play.server.S23PacketBlockChange; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; @@ -35,49 +36,29 @@ import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.IPlantable; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.fluids.*; import java.util.ArrayList; public class WorldUtil{ - /** - * Vertical Directions in Order: - * Up, Down - */ - public static final ForgeDirection[] VERTICAL_DIRECTIONS_ORDER = new ForgeDirection[]{ForgeDirection.UP, ForgeDirection.DOWN}; - /** - * Cardinal Directions in Order: - * North, East, South, West - */ - public static final ForgeDirection[] CARDINAL_DIRECTIONS_ORDER = new ForgeDirection[]{ForgeDirection.NORTH, ForgeDirection.EAST, ForgeDirection.SOUTH, ForgeDirection.WEST}; - - public static void breakBlockAtSide(ForgeDirection side, World world, int x, int y, int z){ - breakBlockAtSide(side, world, x, y, z, 0); + public static void breakBlockAtSide(EnumFacing side, World world, Position pos){ + breakBlockAtSide(side, world, pos, 0); } - public static void breakBlockAtSide(ForgeDirection side, World world, int x, int y, int z, int offset){ - if(side == ForgeDirection.UNKNOWN){ - world.setBlockToAir(x, y, z); - return; - } - Position c = getCoordsFromSide(side, x, y, z, offset); + public static void breakBlockAtSide(EnumFacing side, World world, Position pos, int offset){ + Position c = getCoordsFromSide(side, pos, offset); if(c != null){ - world.setBlockToAir(c.getX(), c.getY(), c.getZ()); + world.setBlockToAir(pos.toBlockPos()); } } - public static Position getCoordsFromSide(ForgeDirection side, int x, int y, int z, int offset){ - if(side == ForgeDirection.UNKNOWN){ - return null; - } - return new Position(x+side.offsetX*(offset+1), y+side.offsetY*(offset+1), z+side.offsetZ*(offset+1)); + public static Position getCoordsFromSide(EnumFacing side, Position pos, int offset){ + return new Position(pos.getX()+side.getFrontOffsetX()*(offset+1), pos.getY()+side.getFrontOffsetY()*(offset+1), pos.getZ()+side.getFrontOffsetZ()*(offset+1)); } - public static void pushEnergy(World world, int x, int y, int z, ForgeDirection side, EnergyStorage storage){ - TileEntity tile = getTileEntityFromSide(side, world, x, y, z); + public static void pushEnergy(World world, Position pos, EnumFacing side, EnergyStorage storage){ + TileEntity tile = getTileEntityFromSide(side, world, pos); if(tile != null && tile instanceof IEnergyReceiver && storage.getEnergyStored() > 0){ if(((IEnergyReceiver)tile).canConnectEnergy(side.getOpposite())){ int receive = ((IEnergyReceiver)tile).receiveEnergy(side.getOpposite(), Math.min(storage.getMaxExtract(), storage.getEnergyStored()), false); @@ -86,10 +67,10 @@ public class WorldUtil{ } } - public static TileEntity getTileEntityFromSide(ForgeDirection side, World world, int x, int y, int z){ - Position c = getCoordsFromSide(side, x, y, z, 0); + public static TileEntity getTileEntityFromSide(EnumFacing side, World world, Position pos){ + Position c = getCoordsFromSide(side, pos, 0); if(c != null){ - return world.getTileEntity(c.getX(), c.getY(), c.getZ()); + return world.getTileEntity(pos.toBlockPos()); } return null; } @@ -97,26 +78,23 @@ public class WorldUtil{ /** * Checks if a given Block with a given Meta is present in given Positions * - * @param positions The Positions, an array of {xCoord, yCoord, zCoord} arrays containing RELATIVE Positions + * @param positions The Positions, an array of {xCoord, yCoord, zCoord} arrays containing Positions * @param block The Block * @param meta The Meta * @param world The World - * @param x The Start X Coord - * @param y The Start Y Coord - * @param z The Start Z Coord * @return Is every block present? */ - public static boolean hasBlocksInPlacesGiven(int[][] positions, Block block, int meta, World world, int x, int y, int z){ - for(int[] xYZ : positions){ - if(!(world.getBlock(x+xYZ[0], y+xYZ[1], z+xYZ[2]) == block && world.getBlockMetadata(x+xYZ[0], y+xYZ[1], z+xYZ[2]) == meta)){ + public static boolean hasBlocksInPlacesGiven(Position[] positions, Block block, int meta, World world){ + for(Position pos : positions){ + if(!(pos.getBlock(world) == block && pos.getMetadata(world) == meta)){ return false; } } return true; } - public static void pushFluid(World world, int x, int y, int z, ForgeDirection side, FluidTank tank){ - TileEntity tile = getTileEntityFromSide(side, world, x, y, z); + public static void pushFluid(World world, Position pos, EnumFacing side, FluidTank tank){ + TileEntity tile = getTileEntityFromSide(side, world, pos); if(tile != null && tank.getFluid() != null && tile instanceof IFluidHandler){ if(((IFluidHandler)tile).canFill(side.getOpposite(), tank.getFluid().getFluid())){ int receive = ((IFluidHandler)tile).fill(side.getOpposite(), tank.getFluid(), true); @@ -125,15 +103,16 @@ public class WorldUtil{ } } - public static ItemStack placeBlockAtSide(ForgeDirection side, World world, int x, int y, int z, ItemStack stack){ + public static ItemStack placeBlockAtSide(EnumFacing side, World world, Position pos, ItemStack stack){ if(world instanceof WorldServer && stack != null && stack.getItem() != null){ + Position offsetPos = pos.getOffsetPosition(side); //Fluids FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(stack); - if(fluid != null && fluid.getFluid().getBlock() != null && fluid.getFluid().getBlock().canPlaceBlockAt(world, x+side.offsetX, y+side.offsetY, z+side.offsetZ)){ - Block block = world.getBlock(x+side.offsetX, y+side.offsetY, z+side.offsetZ); + if(fluid != null && fluid.getFluid().getBlock() != null && fluid.getFluid().getBlock().canPlaceBlockAt(world, offsetPos.toBlockPos())){ + Block block = offsetPos.getBlock(world); if(!(block instanceof IFluidBlock) && block != Blocks.lava && block != Blocks.water && block != Blocks.flowing_lava && block != Blocks.flowing_water){ - if(world.setBlock(x+side.offsetX, y+side.offsetY, z+side.offsetZ, fluid.getFluid().getBlock())){ + if(offsetPos.setBlock(world, fluid.getFluid().getBlock(), 0, 2)){ return stack.getItem().getContainerItem(stack); } } @@ -141,14 +120,14 @@ public class WorldUtil{ //Redstone else if(stack.getItem() == Items.redstone){ - world.setBlock(x+side.offsetX, y+side.offsetY, z+side.offsetZ, Blocks.redstone_wire); + offsetPos.setBlock(world, Blocks.redstone_wire, 0, 2); stack.stackSize--; } //Plants else if(stack.getItem() instanceof IPlantable){ - if(((IPlantable)stack.getItem()).getPlant(world, x, y, z).canPlaceBlockAt(world, x+side.offsetX, y+side.offsetY, z+side.offsetZ)){ - if(world.setBlock(x+side.offsetX, y+side.offsetY, z+side.offsetZ, ((IPlantable)stack.getItem()).getPlant(world, x, y, z))){ + if(((IPlantable)stack.getItem()).getPlant(world, offsetPos.toBlockPos()).getBlock().canPlaceBlockAt(world, offsetPos.toBlockPos())){ + if(offsetPos.setBlockState(world, ((IPlantable)stack.getItem()).getPlant(world, offsetPos.toBlockPos()), 0, 2)){ stack.stackSize--; } } @@ -156,29 +135,26 @@ public class WorldUtil{ else{ try{ //Blocks - stack.tryPlaceItemIntoWorld(FakePlayerUtil.getFakePlayer(world), world, x, y, z, side == ForgeDirection.UNKNOWN ? 0 : side.ordinal(), 0, 0, 0); + stack.onItemUse(FakePlayerUtil.getFakePlayer(world), world, pos.toBlockPos(), side, 0, 0, 0); return stack; } catch(Exception e){ - ModUtil.LOGGER.error("Something that places Blocks at "+x+", "+y+", "+z+" in World "+world.provider.dimensionId+" threw an Exception! Don't let that happen again!"); + ModUtil.LOGGER.error("Something that places Blocks at "+offsetPos.getX()+", "+offsetPos.getY()+", "+offsetPos.getZ()+" in World "+world.provider.getDimensionId()+" threw an Exception! Don't let that happen again!"); } } } return stack; } - public static boolean dropItemAtSide(ForgeDirection side, World world, int x, int y, int z, ItemStack stack){ - if(side != ForgeDirection.UNKNOWN){ - Position coords = getCoordsFromSide(side, x, y, z, 0); - if(coords != null){ - EntityItem item = new EntityItem(world, coords.getX()+0.5, coords.getY()+0.5, coords.getZ()+0.5, stack); - item.motionX = 0; - item.motionY = 0; - item.motionZ = 0; - world.spawnEntityInWorld(item); - } + public static void dropItemAtSide(EnumFacing side, World world, Position pos, ItemStack stack){ + Position coords = getCoordsFromSide(side, pos, 0); + if(coords != null){ + EntityItem item = new EntityItem(world, coords.getX()+0.5, coords.getY()+0.5, coords.getZ()+0.5, stack); + item.motionX = 0; + item.motionY = 0; + item.motionZ = 0; + world.spawnEntityInWorld(item); } - return false; } public static void fillBucket(FluidTank tank, ItemStack[] slots, int inputSlot, int outputSlot){ @@ -231,30 +207,34 @@ public class WorldUtil{ } } - public static ForgeDirection getDirectionBySidesInOrder(int side){ - if(side >= 0 && side < VERTICAL_DIRECTIONS_ORDER.length+CARDINAL_DIRECTIONS_ORDER.length){ - if(side < VERTICAL_DIRECTIONS_ORDER.length){ - return VERTICAL_DIRECTIONS_ORDER[side]; - } - else{ - return CARDINAL_DIRECTIONS_ORDER[side-VERTICAL_DIRECTIONS_ORDER.length]; - } + public static EnumFacing getDirectionBySidesInOrder(int side){ + switch(side){ + case 0: + return EnumFacing.UP; + case 1: + return EnumFacing.DOWN; + case 2: + return EnumFacing.NORTH; + case 3: + return EnumFacing.EAST; + case 4: + return EnumFacing.SOUTH; + default: + return EnumFacing.WEST; } - return ForgeDirection.UNKNOWN; } - public static ArrayList getMaterialsAround(World world, int x, int y, int z){ + public static ArrayList getMaterialsAround(World world, Position pos){ ArrayList blocks = new ArrayList(); - blocks.add(world.getBlock(x+1, y, z).getMaterial()); - blocks.add(world.getBlock(x-1, y, z).getMaterial()); - blocks.add(world.getBlock(x, y, z+1).getMaterial()); - blocks.add(world.getBlock(x, y, z-1).getMaterial()); - + blocks.add(pos.getOffsetPosition(EnumFacing.NORTH).getMaterial(world)); + blocks.add(pos.getOffsetPosition(EnumFacing.EAST).getMaterial(world)); + blocks.add(pos.getOffsetPosition(EnumFacing.SOUTH).getMaterial(world)); + blocks.add(pos.getOffsetPosition(EnumFacing.WEST).getMaterial(world)); return blocks; } public static boolean addToInventory(IInventory inventory, int start, int end, ArrayList stacks, boolean actuallyDo){ - return addToInventory(inventory, start, end, stacks, ForgeDirection.UNKNOWN, actuallyDo); + return addToInventory(inventory, start, end, stacks, EnumFacing.UP, actuallyDo, true); } /** @@ -262,11 +242,11 @@ public class WorldUtil{ * * @param inventory The inventory to try to put the items into * @param stacks The stacks to be put into the slots (Items don't actually get removed from there!) - * @param side The side to input from (use UNKNOWN if it should always work) + * @param side The side to input from * @param actuallyDo Do it or just test if it works? * @return Does it work? */ - public static boolean addToInventory(IInventory inventory, int start, int end, ArrayList stacks, ForgeDirection side, boolean actuallyDo){ + public static boolean addToInventory(IInventory inventory, int start, int end, ArrayList stacks, EnumFacing side, boolean actuallyDo, boolean shouldAlwaysWork){ //Copy the slots if just testing to later load them again ItemStack[] backupSlots = null; if(!actuallyDo){ @@ -282,7 +262,7 @@ public class WorldUtil{ int working = 0; for(ItemStack stackToPutIn : stacks){ for(int i = start; i < end; i++){ - if(side == ForgeDirection.UNKNOWN || ((!(inventory instanceof ISidedInventory) || ((ISidedInventory)inventory).canInsertItem(i, stackToPutIn, side.ordinal())) && inventory.isItemValidForSlot(i, stackToPutIn))){ + if(shouldAlwaysWork || ((!(inventory instanceof ISidedInventory) || ((ISidedInventory)inventory).canInsertItem(i, stackToPutIn, side)) && inventory.isItemValidForSlot(i, stackToPutIn))){ ItemStack stackInQuestion = inventory.getStackInSlot(i); if(stackToPutIn != null && (stackInQuestion == null || (stackInQuestion.isItemEqual(stackToPutIn) && stackInQuestion.getMaxStackSize() >= stackInQuestion.stackSize+stackToPutIn.stackSize))){ if(stackInQuestion == null){ @@ -310,11 +290,11 @@ public class WorldUtil{ } public static boolean addToInventory(IInventory inventory, ArrayList stacks, boolean actuallyDo){ - return addToInventory(inventory, stacks, ForgeDirection.UNKNOWN, actuallyDo); + return addToInventory(inventory, stacks, EnumFacing.UP, actuallyDo); } - public static boolean addToInventory(IInventory inventory, ArrayList stacks, ForgeDirection side, boolean actuallyDo){ - return addToInventory(inventory, 0, inventory.getSizeInventory(), stacks, side, actuallyDo); + public static boolean addToInventory(IInventory inventory, ArrayList stacks, EnumFacing side, boolean actuallyDo){ + return addToInventory(inventory, 0, inventory.getSizeInventory(), stacks, side, actuallyDo, false); } public static int findFirstFilledSlot(ItemStack[] slots){ @@ -337,7 +317,7 @@ public class WorldUtil{ double d0 = player.prevPosX+(player.posX-player.prevPosX)*(double)f; double d1 = player.prevPosY+(player.posY-player.prevPosY)*(double)f+(double)(world.isRemote ? player.getEyeHeight()-player.getDefaultEyeHeight() : player.getEyeHeight()); double d2 = player.prevPosZ+(player.posZ-player.prevPosZ)*(double)f; - Vec3 vec3 = Vec3.createVectorHelper(d0, d1, d2); + Vec3 vec3 = new Vec3(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); @@ -345,7 +325,7 @@ public class WorldUtil{ float f7 = f4*f5; float f8 = f3*f5; Vec3 vec31 = vec3.addVector((double)f7*distance, (double)f6*distance, (double)f8*distance); - return world.func_147447_a(vec3, vec31, p1, p2, p3); + return world.rayTraceBlocks(vec3, vec31, p1, p2, p3); } public static MovingObjectPosition getNearestBlockWithDefaultReachDistance(World world, EntityPlayer player){ @@ -356,51 +336,48 @@ public class WorldUtil{ * Harvests a Block by a Player * * @param world The World - * @param xPos The X Coordinate - * @param yPos The Y Coordinate - * @param zPos The Z Coordinate * @param player The Player * @return If the Block could be harvested normally (so that it drops an item) */ - public static boolean playerHarvestBlock(World world, int xPos, int yPos, int zPos, EntityPlayer player){ - Block block = world.getBlock(xPos, yPos, zPos); - int meta = world.getBlockMetadata(xPos, yPos, zPos); + public static boolean playerHarvestBlock(World world, Position pos, EntityPlayer player){ + Block block = pos.getBlock(world); + int meta = pos.getMetadata(world); //If the Block can be harvested or not - boolean canHarvest = block.canHarvestBlock(player, meta); + boolean canHarvest = block.canHarvestBlock(world, pos.toBlockPos(), player); //Send Block Breaking Event if(player instanceof EntityPlayerMP){ - BlockEvent.BreakEvent event = ForgeHooks.onBlockBreakEvent(world, ((EntityPlayerMP)player).theItemInWorldManager.getGameType(), (EntityPlayerMP)player, xPos, yPos, zPos); - if(event.isCanceled()){ + int event = ForgeHooks.onBlockBreakEvent(world, ((EntityPlayerMP)player).theItemInWorldManager.getGameType(), (EntityPlayerMP)player, pos.toBlockPos()); + if(event == -1){ return false; } } if(!world.isRemote){ //Server-Side only, special cases - block.onBlockHarvested(world, xPos, yPos, zPos, meta, player); + block.onBlockHarvested(world, pos.toBlockPos(), pos.getBlockState(world), player); } else{ //Shows the Harvest Particles and plays the Block's Sound - world.playAuxSFX(2001, xPos, yPos, zPos, Block.getIdFromBlock(block)+(meta << 12)); + world.playAuxSFX(2001, pos.toBlockPos(), Block.getIdFromBlock(block)+(meta << 12)); } //If the Block was actually "removed", meaning it will drop an Item - boolean removed = block.removedByPlayer(world, player, xPos, yPos, zPos, canHarvest); + boolean removed = block.removedByPlayer(world, pos.toBlockPos(), player, canHarvest); //Actually removes the Block from the World if(removed){ //Before the Block is destroyed, special cases - block.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, meta); + block.onBlockDestroyedByPlayer(world, pos.toBlockPos(), pos.getBlockState(world)); if(!world.isRemote && !player.capabilities.isCreativeMode){ //Actually drops the Block's Items etc. if(canHarvest){ - block.harvestBlock(world, player, xPos, yPos, zPos, meta); + block.harvestBlock(world, player, pos.toBlockPos(), pos.getBlockState(world), pos.getTileEntity(world)); } //Only drop XP when no Silk Touch is applied if(!EnchantmentHelper.getSilkTouchModifier(player)){ //Drop XP depending on Fortune Level - block.dropXpOnBlockBreak(world, xPos, yPos, zPos, block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player))); + block.dropXpOnBlockBreak(world, pos.toBlockPos(), block.getExpDrop(world, pos.toBlockPos(), EnchantmentHelper.getFortuneModifier(player))); } } } @@ -408,12 +385,13 @@ public class WorldUtil{ if(!world.isRemote){ //Update the Client of a Block Change if(player instanceof EntityPlayerMP){ - ((EntityPlayerMP)player).playerNetServerHandler.sendPacket(new S23PacketBlockChange(xPos, yPos, zPos, world)); + ((EntityPlayerMP)player).playerNetServerHandler.sendPacket(new S23PacketBlockChange(world, pos.toBlockPos())); } } else{ //Check the Server if a Block that changed on the Client really changed, if not, revert the change - Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(2, xPos, yPos, zPos, Minecraft.getMinecraft().objectMouseOver.sideHit)); + //TODO Check if this is the right action + Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, pos.toBlockPos(), Minecraft.getMinecraft().objectMouseOver.sideHit)); } return removed; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/playerdata/PersistentClientData.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/playerdata/PersistentClientData.java index 10e0ce3da..1e8c97fb7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/playerdata/PersistentClientData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/playerdata/PersistentClientData.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.util.playerdata; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import de.ellpeck.actuallyadditions.api.internal.EntrySet; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; @@ -21,6 +19,8 @@ import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.io.File; import java.io.FileInputStream; From 02e66e23df6a507608427693bc885dbbcae74745 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 7 Jan 2016 19:04:29 +0100 Subject: [PATCH 02/58] PROGRESS!! Yes, this will be progress updates. A lot. --- .../actuallyadditions/api/Position.java | 46 +++------- .../mod/blocks/BlockBookletStand.java | 53 ++++-------- .../mod/blocks/BlockCanolaPress.java | 40 +++------ .../mod/blocks/BlockPhantom.java | 47 ++++------ .../mod/blocks/base/BlockContainerBase.java | 14 +-- .../mod/items/ItemCrafterOnAStick.java | 19 +---- .../mod/tile/TileEntityCanolaPress.java | 1 - .../mod/tile/TileEntityCoalGenerator.java | 31 +++---- .../tile/TileEntityDirectionalBreaker.java | 31 +++---- .../mod/tile/TileEntityInventoryBase.java | 85 +++++++++++++------ .../mod/tile/TileEntityItemRepairer.java | 14 +-- .../mod/tile/TileEntityOilGenerator.java | 49 +++++------ .../mod/tile/TileEntityPhantomEnergyface.java | 2 +- .../mod/tile/TileEntityPhantomLiquiface.java | 35 ++++---- .../actuallyadditions/mod/util/AssetUtil.java | 1 + .../actuallyadditions/mod/util/WorldUtil.java | 26 ++++++ 16 files changed, 228 insertions(+), 266 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/Position.java b/src/main/java/de/ellpeck/actuallyadditions/api/Position.java index 7423106ac..cd2711dd3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/Position.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/Position.java @@ -23,20 +23,14 @@ import net.minecraft.world.World; /** * This utility class describes a position in the world */ -public class Position{ - - private int x; - private int y; - private int z; +public class Position extends BlockPos{ public Position(int x, int y, int z){ - this.x = x; - this.y = y; - this.z = z; + super(x, y, z); } public TileEntity getTileEntity(World world){ - return world != null ? world.getTileEntity(this.toBlockPos()) : null; + return world != null ? world.getTileEntity(this) : null; } public Material getMaterial(World world){ @@ -76,19 +70,7 @@ public class Position{ } public boolean isEqual(Position pos){ - return pos != null && this.x == pos.getX() && this.y == pos.getY() && this.z == pos.getZ(); - } - - public int getX(){ - return this.x; - } - - public int getY(){ - return this.y; - } - - public int getZ(){ - return this.z; + return pos != null && this.getX() == pos.getX() && this.getY() == pos.getY() && this.getZ() == pos.getZ(); } public boolean setBlock(World world, Block block, int meta, int flag){ @@ -98,35 +80,35 @@ public class Position{ public boolean setBlockState(World world, IBlockState state, int meta, int flag){ //TODO Fix meta - return world.setBlockState(this.toBlockPos(), state, flag); + return world.setBlockState(this, state, flag); } public Position copy(){ - return new Position(this.x, this.y, this.z); + return new Position(this.getX(), this.getY(), this.getZ()); } public String toString(){ - return "["+this.x+", "+this.y+", "+this.z+"]"; + return "["+this.getX()+", "+this.getY()+", "+this.getZ()+"]"; } public Vec3 toVec(){ - return new Vec3(this.x, this.y, this.z); - } - - public BlockPos toBlockPos(){ - return new BlockPos(this.x, this.y, this.z); + return new Vec3(this.getX(), this.getY(), this.getZ()); } public IBlockState getBlockState(World world){ - return world != null ? world.getBlockState(this.toBlockPos()) : null; + return world != null ? world.getBlockState(this) : null; } public Position getOffsetPosition(EnumFacing side){ - return new Position(this.x+side.getFrontOffsetX(), this.y+side.getFrontOffsetY(), this.z+side.getFrontOffsetZ()); + return new Position(this.getX()+side.getFrontOffsetX(), this.getY()+side.getFrontOffsetY(), this.getZ()+side.getFrontOffsetZ()); } public static Position fromTileEntity(TileEntity tile){ BlockPos pos = tile.getPos(); return new Position(pos.getX(), pos.getY(), pos.getZ()); } + + public static Position fromBlockPos(BlockPos pos){ + return (Position)pos; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java index a7ec5edd2..53a5b626b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.internal.EntrySet; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; @@ -20,20 +21,16 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBookletStand; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.profiler.Profiler; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -51,20 +48,9 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay this.setBlockBounds(f, 0F, f, 1F-f, 1F-4*f, 1F-f); } - @Override - public boolean renderAsNormalBlock(){ - return false; - } - @Override public int getRenderType(){ - return AssetUtil.bookletStandRenderId; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return this.blockIcon; + return AssetUtil.TESR_RENDER_ID; } @Override @@ -73,44 +59,39 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int f6, float f7, float f8, float f9){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BOOK_STAND.ordinal(), world, x, y, z); + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ){ + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BOOK_STAND.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = Blocks.planks.getIcon(0, 0); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; + Position pos = new Position(x, y, z); if(rotation == 0){ - world.setBlockMetadataWithNotify(x, y, z, 2, 2); + pos.setMetadata(world, 2, 2); } if(rotation == 1){ - world.setBlockMetadataWithNotify(x, y, z, 1, 2); + pos.setMetadata(world, 1, 2); } if(rotation == 2){ - world.setBlockMetadataWithNotify(x, y, z, 0, 2); + pos.setMetadata(world, 0, 2); } if(rotation == 3){ - world.setBlockMetadataWithNotify(x, y, z, 3, 2); + pos.setMetadata(world, 3, 2); } - TileEntityBookletStand tile = (TileEntityBookletStand)world.getTileEntity(x, y, z); + TileEntityBookletStand tile = (TileEntityBookletStand)world.getTileEntity(pos); if(tile != null){ //Assign a UUID if(tile.assignedPlayer == null){ - tile.assignedPlayer = player.getCommandSenderName(); + tile.assignedPlayer = player.getName(); tile.markDirty(); tile.sendUpdate(); } @@ -127,7 +108,7 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay @Override @SideOnly(Side.CLIENT) public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, MovingObjectPosition posHit, Profiler profiler, ScaledResolution resolution){ - TileEntity tile = minecraft.theWorld.getTileEntity(posHit.blockX, posHit.blockY, posHit.blockZ); + TileEntity tile = minecraft.theWorld.getTileEntity(posHit.getBlockPos()); if(tile instanceof TileEntityBookletStand){ EntrySet set = ((TileEntityBookletStand)tile).assignedEntry; @@ -147,8 +128,8 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay AssetUtil.renderStackToGui(set.chapter.getDisplayItemStack() != null ? set.chapter.getDisplayItemStack() : new ItemStack(InitItems.itemBooklet), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+10, 1F); } - minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg1, resolution.getScaledWidth()/2+25, resolution.getScaledHeight()/2+8, StringUtil.DECIMAL_COLOR_WHITE); - minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg2, resolution.getScaledWidth()/2+25, resolution.getScaledHeight()/2+18, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg1, resolution.getScaledWidth()/2+25, resolution.getScaledHeight()/2+8, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg2, resolution.getScaledWidth()/2+25, resolution.getScaledHeight()/2+18, StringUtil.DECIMAL_COLOR_WHITE); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java index c4937f124..cbc5be3d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java @@ -10,28 +10,23 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockCanolaPress extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - public BlockCanolaPress(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -46,38 +41,25 @@ public class BlockCanolaPress extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return side == 1 || side == 0 ? this.topIcon : this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityCanolaPress press = (TileEntityCanolaPress)world.getTileEntity(x, y, z); + TileEntityCanolaPress press = (TileEntityCanolaPress)world.getTileEntity(pos); if(press != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CANOLA_PRESS.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CANOLA_PRESS.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java index 4dc483a9f..210f5fe16 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java @@ -10,11 +10,11 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; @@ -28,10 +28,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.profiler.Profiler; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; +import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -60,7 +57,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ if(this.type == Type.PLACER || this.type == Type.BREAKER){ - this.dropInventory(world, pos); + this.dropInventory(world, Position.fromBlockPos(pos)); } super.breakBlock(world, pos, state); } @@ -82,61 +79,47 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return (this.type == Type.FACE && ClientProxy.pumpkinBlurPumpkinBlur && side > 1) ? this.iconSeasonal : this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int hitSide, float hitX, float hitY, float hitZ){ - if(this.tryToggleRedstone(world, x, y, z, player)){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ){ + if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ return true; } if(!world.isRemote){ - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof IPhantomTile && ((IPhantomTile)tile).getGuiID() != -1){ - player.openGui(ActuallyAdditions.instance, ((IPhantomTile)tile).getGuiID(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, ((IPhantomTile)tile).getGuiID(), world, pos.getX(), pos.getY(), pos.getZ()); } } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - - this.iconSeasonal = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockPhantomfacePumpkin"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override @SideOnly(Side.CLIENT) public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, MovingObjectPosition posHit, Profiler profiler, ScaledResolution resolution){ - TileEntity tile = minecraft.theWorld.getTileEntity(posHit.blockX, posHit.blockY, posHit.blockZ); + TileEntity tile = minecraft.theWorld.getTileEntity(posHit.getBlockPos()); if(tile != null){ if(tile instanceof IPhantomTile){ IPhantomTile phantom = (IPhantomTile)tile; - minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.GOLD+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc")+": "+phantom.getRange(), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-40, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.GOLD+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc")+": "+phantom.getRange(), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-40, StringUtil.DECIMAL_COLOR_WHITE); if(phantom.hasBoundPosition()){ - int distance = (int)Vec3.createVectorHelper(posHit.blockX, posHit.blockY, posHit.blockZ).distanceTo(Vec3.createVectorHelper(phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ())); + int distance = (int)new Vec3(posHit.getBlockPos()).distanceTo(new Vec3(phantom.getBoundPosition())); Item item = phantom.getBoundPosition().getItemBlock(minecraft.theWorld); String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(phantom.getBoundPosition().getBlock(minecraft.theWorld), 1, phantom.getBoundPosition().getMetadata(minecraft.theWorld))); - StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-30, 200, StringUtil.DECIMAL_COLOR_WHITE, true); + StringUtil.drawSplitString(minecraft.fontRendererObj, StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-30, 200, StringUtil.DECIMAL_COLOR_WHITE, true); if(phantom.isBoundThingInRange()){ - StringUtil.drawSplitString(minecraft.fontRenderer, EnumChatFormatting.DARK_GREEN+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE, true); + StringUtil.drawSplitString(minecraft.fontRendererObj, EnumChatFormatting.DARK_GREEN+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE, true); } else{ - StringUtil.drawSplitString(minecraft.fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE, true); + StringUtil.drawSplitString(minecraft.fontRendererObj, EnumChatFormatting.DARK_RED+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE, true); } } else{ - minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.RED+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.notConnected.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.RED+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.notConnected.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, StringUtil.DECIMAL_COLOR_WHITE); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index 6fe5145f2..1e6f617cd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -109,11 +109,11 @@ public abstract class BlockContainerBase extends BlockContainer{ } @Override - public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state){ - this.updateRedstoneState(world, x, y, z); + public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock){ + this.updateRedstoneState(world, pos); } - public void updateRedstoneState(World world, int x, int y, int z){ + public void updateRedstoneState(World world, Position pos){ if(!world.isRemote){ TileEntity tile = world.getTileEntity(x, y, z); if(tile instanceof TileEntityBase){ @@ -235,14 +235,14 @@ public abstract class BlockContainerBase extends BlockContainer{ } @Override - public void onBlockAdded(World world, int x, int y, int z){ - this.updateRedstoneState(world, x, y, z); + public void onBlockAdded(World world, BlockPos pos, IBlockState state){ + this.updateRedstoneState(world, pos); } - public boolean tryToggleRedstone(World world, int x, int y, int z, EntityPlayer player){ + public boolean tryToggleRedstone(World world, Position pos, EntityPlayer player){ ItemStack stack = player.getCurrentEquippedItem(); if(stack != null && Block.getBlockFromItem(stack.getItem()) instanceof BlockRedstoneTorch){ - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = pos.getTileEntity(world); if(tile instanceof IRedstoneToggle){ if(!world.isRemote){ ((IRedstoneToggle)tile).toggle(!((IRedstoneToggle)tile).isPulseMode()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java index c368a6273..5fd23d1d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java @@ -13,15 +13,10 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemCrafterOnAStick extends ItemBase{ @@ -40,18 +35,6 @@ public class ItemCrafterOnAStick extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java index afef8ee91..9ff3ed10d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java @@ -19,7 +19,6 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java index 18d75dd85..16a41fd01 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java @@ -12,11 +12,12 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntityFurnace; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -67,25 +68,21 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements } } - if(this.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.UP, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, storage); + if(this.storage.getEnergyStored() > 0){ + WorldUtil.pushEnergyToAllSides(worldObj, Position.fromTileEntity(this), this.storage); } if(flag != this.currentBurnTime > 0){ this.markDirty(); - int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + Position thisPos = Position.fromTileEntity(this); + int meta = thisPos.getMetadata(worldObj); if(meta == 1){ if(!(this.currentBurnTime <= 0 && this.slots[0] != null && TileEntityFurnace.getItemBurnTime(this.slots[0]) > 0 && this.storage.getEnergyStored() < this.storage.getMaxEnergyStored())){ - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 2); + thisPos.setMetadata(worldObj, 0, 2); } } else{ - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 1, 2); + thisPos.setMetadata(worldObj, 1, 2); } } @@ -114,7 +111,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -124,27 +121,27 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return false; } @Override - public int extractEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int extractEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.extractEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java index a99c73b9d..245655177 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java @@ -18,7 +18,7 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockAir; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -63,20 +63,21 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem } private void doWork(){ - ForgeDirection sideToManipulate = ForgeDirection.getOrientation(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)); + Position pos = Position.fromTileEntity(this); + EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(pos.getMetadata(worldObj)); for(int i = 0; i < RANGE; i++){ - Position coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, xCoord, yCoord, zCoord, i); + Position coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, pos, i); if(coordsBlock != null){ - Block blockToBreak = worldObj.getBlock(coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()); - if(blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(worldObj, coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()) > -1.0F){ + Block blockToBreak = coordsBlock.getBlock(worldObj); + if(blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(worldObj, pos) > -1.0F){ ArrayList drops = new ArrayList(); - int meta = worldObj.getBlockMetadata(coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()); - drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ(), meta, 0)); + int meta = coordsBlock.getMetadata(worldObj); + drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock, coordsBlock.getBlockState(worldObj), 0)); if(WorldUtil.addToInventory(this, drops, false)){ - worldObj.playAuxSFX(2001, coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ(), Block.getIdFromBlock(blockToBreak)+(meta << 12)); - WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, xCoord, yCoord, zCoord, i); + worldObj.playAuxSFX(2001, this.getPos(), Block.getIdFromBlock(blockToBreak)+(meta << 12)); + WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, Position.fromTileEntity(this), i); WorldUtil.addToInventory(this, drops, true); this.storage.extractEnergy(ENERGY_USE, false); this.markDirty(); @@ -106,7 +107,7 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -116,27 +117,27 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return true; } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java index cdb9d390c..aecca56c3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java @@ -16,6 +16,8 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IChatComponent; public abstract class TileEntityInventoryBase extends TileEntityBase implements ISidedInventory{ @@ -31,20 +33,6 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements this.slots = new ItemStack[itemAmount]; } - @Override - public int[] getAccessibleSlotsFromSide(int side){ - if(this.slots.length > 0){ - int[] theInt = new int[slots.length]; - for(int i = 0; i < theInt.length; i++){ - theInt[i] = i; - } - return theInt; - } - else{ - return new int[0]; - } - } - @Override public void updateEntity(){ super.updateEntity(); @@ -98,12 +86,42 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements @Override public boolean isUseableByPlayer(EntityPlayer player){ - return player.getDistanceSq(xCoord+0.5D, yCoord+0.5D, zCoord+0.5D) <= 64; + return player.getDistanceSq(this.getPos().getX()+0.5D, this.pos.getY()+0.5D, this.pos.getZ()+0.5D) <= 64; } @Override - public ItemStack getStackInSlotOnClosing(int i){ - return getStackInSlot(i); + public void openInventory(EntityPlayer player){ + + } + + @Override + public void closeInventory(EntityPlayer player){ + + } + + @Override + public boolean isItemValidForSlot(int index, ItemStack stack){ + return false; + } + + @Override + public int getField(int id){ + return 0; + } + + @Override + public void setField(int id, int value){ + + } + + @Override + public int getFieldCount(){ + return 0; + } + + @Override + public void clear(){ + this.initializeSlots(this.slots.length); } @Override @@ -147,26 +165,37 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements return null; } + @Override + public ItemStack removeStackFromSlot(int index){ + return this.slots[index] = null; + } @Override - public String getInventoryName(){ + public int[] getSlotsForFace(EnumFacing side){ + if(this.slots.length > 0){ + int[] theInt = new int[slots.length]; + for(int i = 0; i < theInt.length; i++){ + theInt[i] = i; + } + return theInt; + } + else{ + return new int[0]; + } + } + + @Override + public String getName(){ return this.name; } @Override - public boolean hasCustomInventoryName(){ + public boolean hasCustomName(){ return false; } @Override - public void openInventory(){ - + public IChatComponent getDisplayName(){ + return null; } - - @Override - public void closeInventory(){ - - } - - } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java index 5e53b3c21..22f721bf7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java @@ -14,7 +14,7 @@ import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -95,7 +95,7 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -105,27 +105,27 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot == SLOT_OUTPUT; } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java index 53a5715b9..363242f57 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java @@ -12,11 +12,12 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.*; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -64,7 +65,7 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I } int fuelUsed = 50; - if(ENERGY_PRODUCED*BURN_TIME <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){ + if(ENERGY_PRODUCED*BURN_TIME <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored()){ if(this.currentBurnTime <= 0 && this.tank.getFluidAmount() >= fuelUsed){ this.currentBurnTime = BURN_TIME; this.tank.drain(fuelUsed, true); @@ -73,25 +74,21 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I WorldUtil.emptyBucket(tank, slots, 0, 1, InitBlocks.fluidOil); - if(this.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.UP, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, storage); + if(this.storage.getEnergyStored() > 0){ + WorldUtil.pushEnergyToAllSides(worldObj, Position.fromTileEntity(this), this.storage); } if(flag != this.currentBurnTime > 0){ this.markDirty(); - int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + Position thisPos = Position.fromTileEntity(this); + int meta = thisPos.getMetadata(worldObj); if(meta == 1){ - if(!(ENERGY_PRODUCED*BURN_TIME <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN) && this.currentBurnTime <= 0 && this.tank.getFluidAmount() >= fuelUsed)){ - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 2); + if(!(ENERGY_PRODUCED*BURN_TIME <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored() && this.currentBurnTime <= 0 && this.tank.getFluidAmount() >= fuelUsed)){ + thisPos.setMetadata(worldObj, 0, 2); } } else{ - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 1, 2); + thisPos.setMetadata(worldObj, 1, 2); } } @@ -120,7 +117,7 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -130,32 +127,32 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot == 1; } @Override - public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate){ + public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate){ return this.storage.extractEnergy(maxExtract, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill){ + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ if(resource.getFluid() == InitBlocks.fluidOil){ return this.tank.fill(resource, doFill); } @@ -163,27 +160,27 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I } @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain){ + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ return null; } @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain){ + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ return null; } @Override - public boolean canFill(ForgeDirection from, Fluid fluid){ - return from != ForgeDirection.DOWN && fluid == InitBlocks.fluidOil; + public boolean canFill(EnumFacing from, Fluid fluid){ + return from != EnumFacing.DOWN && fluid == InitBlocks.fluidOil; } @Override - public boolean canDrain(ForgeDirection from, Fluid fluid){ + public boolean canDrain(EnumFacing from, Fluid fluid){ return false; } @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from){ + public FluidTankInfo[] getTankInfo(EnumFacing from){ return new FluidTankInfo[]{this.tank.getInfo()}; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java index 4e39ebbbb..7887d5b2b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java @@ -100,7 +100,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement @Override public boolean isBoundThingInRange(){ - return super.isBoundThingInRange() && (worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) instanceof IEnergyReceiver || worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) instanceof IEnergyProvider); + return super.isBoundThingInRange() && (worldObj.getTileEntity(boundPosition.toBlockPos()) instanceof IEnergyReceiver || worldObj.getTileEntity(boundPosition.toBlockPos()) instanceof IEnergyProvider); } private void pushEnergy(EnumFacing side){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java index 21475cf5c..89b229830 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java @@ -10,10 +10,11 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; @@ -32,19 +33,19 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements if(!worldObj.isRemote){ if(this.isRedstonePowered && this.isBoundThingInRange() && this.getHandler() != null){ - this.pushFluid(ForgeDirection.UP); - this.pushFluid(ForgeDirection.DOWN); - this.pushFluid(ForgeDirection.NORTH); - this.pushFluid(ForgeDirection.EAST); - this.pushFluid(ForgeDirection.SOUTH); - this.pushFluid(ForgeDirection.WEST); + this.pushFluid(EnumFacing.UP); + this.pushFluid(EnumFacing.DOWN); + this.pushFluid(EnumFacing.NORTH); + this.pushFluid(EnumFacing.EAST); + this.pushFluid(EnumFacing.SOUTH); + this.pushFluid(EnumFacing.WEST); } } } public IFluidHandler getHandler(){ if(this.boundPosition != null){ - TileEntity tile = worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()); + TileEntity tile = boundPosition.getTileEntity(worldObj); if(tile instanceof IFluidHandler){ return (IFluidHandler)tile; } @@ -52,8 +53,8 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements return null; } - private void pushFluid(ForgeDirection side){ - TileEntity tile = WorldUtil.getTileEntityFromSide(side, worldObj, xCoord, yCoord, zCoord); + private void pushFluid(EnumFacing side){ + TileEntity tile = WorldUtil.getTileEntityFromSide(side, worldObj, Position.fromTileEntity(this)); if(tile != null && tile instanceof IFluidHandler && this.getTankInfo(side) != null && this.getTankInfo(side).length > 0 && ((IFluidHandler)tile).getTankInfo(side.getOpposite()) != null && ((IFluidHandler)tile).getTankInfo(side.getOpposite()).length > 0){ for(FluidTankInfo myInfo : this.getTankInfo(side)){ for(FluidTankInfo hisInfo : ((IFluidHandler)tile).getTankInfo(side.getOpposite())){ @@ -73,11 +74,11 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements @Override public boolean isBoundThingInRange(){ - return super.isBoundThingInRange() && worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) instanceof IFluidHandler; + return super.isBoundThingInRange() && boundPosition.getTileEntity(worldObj) instanceof IFluidHandler; } @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill){ + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ if(this.isBoundThingInRange()){ return this.getHandler().fill(from, resource, doFill); } @@ -85,7 +86,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements } @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain){ + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ if(this.isBoundThingInRange()){ return this.getHandler().drain(from, resource, doDrain); } @@ -93,7 +94,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements } @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain){ + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ if(this.isBoundThingInRange()){ return this.getHandler().drain(from, maxDrain, doDrain); } @@ -101,17 +102,17 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements } @Override - public boolean canFill(ForgeDirection from, Fluid fluid){ + public boolean canFill(EnumFacing from, Fluid fluid){ return this.isBoundThingInRange() && this.getHandler().canFill(from, fluid); } @Override - public boolean canDrain(ForgeDirection from, Fluid fluid){ + public boolean canDrain(EnumFacing from, Fluid fluid){ return this.isBoundThingInRange() && this.getHandler().canDrain(from, fluid); } @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from){ + public FluidTankInfo[] getTankInfo(EnumFacing from){ if(this.isBoundThingInRange()){ return this.getHandler().getTankInfo(from); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 061ee263b..aa4fb4ede 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -31,6 +31,7 @@ import org.lwjgl.opengl.GL12; public class AssetUtil{ public static final ResourceLocation GUI_INVENTORY_LOCATION = getGuiLocation("guiInventory"); + public static final int TESR_RENDER_ID = 2; public static int compostRenderId; public static int fishingNetRenderId; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index e571d55e2..fbec82c6d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -56,6 +56,15 @@ public class WorldUtil{ public static Position getCoordsFromSide(EnumFacing side, Position pos, int offset){ return new Position(pos.getX()+side.getFrontOffsetX()*(offset+1), pos.getY()+side.getFrontOffsetY()*(offset+1), pos.getZ()+side.getFrontOffsetZ()*(offset+1)); } + + public static void pushEnergyToAllSides(World world, Position pos, EnergyStorage storage){ + WorldUtil.pushEnergy(world, pos, EnumFacing.UP, storage); + WorldUtil.pushEnergy(world, pos, EnumFacing.DOWN, storage); + WorldUtil.pushEnergy(world, pos, EnumFacing.NORTH, storage); + WorldUtil.pushEnergy(world, pos, EnumFacing.EAST, storage); + WorldUtil.pushEnergy(world, pos, EnumFacing.SOUTH, storage); + WorldUtil.pushEnergy(world, pos, EnumFacing.WEST, storage); + } public static void pushEnergy(World world, Position pos, EnumFacing side, EnergyStorage storage){ TileEntity tile = getTileEntityFromSide(side, world, pos); @@ -224,6 +233,23 @@ public class WorldUtil{ } } + public static EnumFacing getDirectionByPistonRotation(int meta){ + switch(meta){ + case 0: + return EnumFacing.UP; + case 1: + return EnumFacing.DOWN; + case 2: + return EnumFacing.NORTH; + case 3: + return EnumFacing.EAST; + case 4: + return EnumFacing.SOUTH; + default: + return EnumFacing.WEST; + } + } + public static ArrayList getMaterialsAround(World world, Position pos){ ArrayList blocks = new ArrayList(); blocks.add(pos.getOffsetPosition(EnumFacing.NORTH).getMaterial(world)); From db1e183e459c1d1749b20ae6c79bc240c8fe5202 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 7 Jan 2016 19:47:53 +0100 Subject: [PATCH 03/58] Another status update. Getting to the finish line when it comes to removing compile-breaking bugs! --- .../actuallyadditions/api/Position.java | 22 ++++--- .../mod/blocks/BlockGiantChest.java | 58 ++++++------------ .../mod/blocks/BlockItemRepairer.java | 53 ++++------------ .../mod/blocks/BlockLaserRelay.java | 43 ++++--------- .../mod/blocks/BlockSlabs.java | 61 +++++++------------ .../mod/blocks/base/BlockContainerBase.java | 33 +++++----- .../mod/items/base/ItemAxeAA.java | 16 ----- .../mod/tile/TileEntityCanolaPress.java | 38 ++++++------ .../mod/tile/TileEntityCoffeeMachine.java | 30 ++++----- .../mod/tile/TileEntityFurnaceDouble.java | 28 +++++---- .../mod/tile/TileEntityGrinder.java | 24 ++++---- .../mod/tile/TileEntityMiner.java | 24 ++++---- .../mod/tile/TileEntityPhantomface.java | 33 +++++----- .../actuallyadditions/mod/util/WorldUtil.java | 30 ++++----- 14 files changed, 203 insertions(+), 290 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/Position.java b/src/main/java/de/ellpeck/actuallyadditions/api/Position.java index cd2711dd3..d58c19166 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/Position.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/Position.java @@ -18,6 +18,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.Vec3; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; /** @@ -29,11 +30,11 @@ public class Position extends BlockPos{ super(x, y, z); } - public TileEntity getTileEntity(World world){ + public TileEntity getTileEntity(IBlockAccess world){ return world != null ? world.getTileEntity(this) : null; } - public Material getMaterial(World world){ + public Material getMaterial(IBlockAccess world){ if(world != null){ Block block = this.getBlock(world); if(block != null){ @@ -43,11 +44,11 @@ public class Position extends BlockPos{ return null; } - public Item getItemBlock(World world){ + public Item getItemBlock(IBlockAccess world){ return world != null ? Item.getItemFromBlock(this.getBlock(world)) : null; } - public Block getBlock(World world){ + public Block getBlock(IBlockAccess world){ if(world != null){ IBlockState state = this.getBlockState(world); if(state != null){ @@ -57,12 +58,12 @@ public class Position extends BlockPos{ return null; } - public int getMetadata(World world){ + public int getMetadata(IBlockAccess world){ //TODO Fix meta return /*world != null ? world.getBlockMetadata(this.x, this.y, this.z) : */0; } - public void setMetadata(World world, int meta, int flag){ + public void setMetadata(IBlockAccess world, int meta, int flag){ //TODO Fix meta /*if(world != null){ world.setBlockMetadataWithNotify(this.x, this.y, this.z, meta, flag); @@ -95,7 +96,7 @@ public class Position extends BlockPos{ return new Vec3(this.getX(), this.getY(), this.getZ()); } - public IBlockState getBlockState(World world){ + public IBlockState getBlockState(IBlockAccess world){ return world != null ? world.getBlockState(this) : null; } @@ -103,9 +104,12 @@ public class Position extends BlockPos{ return new Position(this.getX()+side.getFrontOffsetX(), this.getY()+side.getFrontOffsetY(), this.getZ()+side.getFrontOffsetZ()); } + public Position getOffsetPosition(int x, int y, int z){ + return new Position(this.getX()+x, this.getY()+y, this.getZ()+z); + } + public static Position fromTileEntity(TileEntity tile){ - BlockPos pos = tile.getPos(); - return new Position(pos.getX(), pos.getY(), pos.getZ()); + return fromBlockPos(tile.getPos()); } public static Position fromBlockPos(BlockPos pos){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java index ec1033ae8..52a1c9950 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java @@ -10,16 +10,15 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; @@ -27,20 +26,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; public class BlockGiantChest extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockGiantChest(String name){ super(Material.wood, name); this.setHarvestLevel("axe", 0); @@ -55,40 +49,26 @@ public class BlockGiantChest extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon); - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityGiantChest chest = (TileEntityGiantChest)world.getTileEntity(x, y, z); + TileEntityGiantChest chest = (TileEntityGiantChest)world.getTileEntity(pos); if(chest != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.GIANT_CHEST.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.GIANT_CHEST.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack){ + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack){ if(stack.getTagCompound() != null){ - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityGiantChest){ NBTTagList list = stack.getTagCompound().getTagList("Items", 10); ItemStack[] slots = ((TileEntityGiantChest)tile).slots; @@ -99,14 +79,14 @@ public class BlockGiantChest extends BlockContainerBase{ } } - super.onBlockPlacedBy(world, x, y, z, entity, stack); + super.onBlockPlacedBy(world, pos, state, entity, stack); } @Override - public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune){ - ArrayList drops = super.getDrops(world, x, y, z, metadata, fortune); + public ArrayList getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ + ArrayList drops = super.getDrops(world, pos, state, fortune); - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityGiantChest){ ItemStack[] slots = ((TileEntityGiantChest)tile).slots; int place = ItemUtil.getPlaceAt(slots, new ItemStack(InitItems.itemCrateKeeper), false); @@ -137,14 +117,14 @@ public class BlockGiantChest extends BlockContainerBase{ } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - TileEntity tile = world.getTileEntity(x, y, z); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityGiantChest){ if(!ItemUtil.contains(((TileEntityGiantChest)tile).slots, new ItemStack(InitItems.itemCrateKeeper), false)){ - this.dropInventory(world, x, y, z); + this.dropInventory(world, Position.fromBlockPos(pos)); } } - super.breakBlock(world, x, y, z, block, par6); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java index 630f054e3..5a9ab75c0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java @@ -10,31 +10,24 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockItemRepairer extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockItemRepairer(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -50,23 +43,11 @@ public class BlockItemRepairer extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 1){ - return this.topIcon; - } - if(side == 0){ - return this.bottomIcon; - } - return this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityItemRepairer repairer = (TileEntityItemRepairer)world.getTileEntity(x, y, z); + TileEntityItemRepairer repairer = (TileEntityItemRepairer)world.getTileEntity(pos); if(repairer != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.REPAIRER.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.REPAIRER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } @@ -74,26 +55,18 @@ public class BlockItemRepairer extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom"); - } - - @Override - public int getLightValue(IBlockAccess world, int x, int y, int z){ - return world.getBlockMetadata(x, y, z) == 1 ? 12 : 0; + public int getLightValue(IBlockAccess world, BlockPos pos){ + return Position.fromBlockPos(pos).getMetadata(world) == 1 ? 12 : 0; } @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index b84096e39..f3f1eae2d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -10,22 +10,22 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; @@ -40,14 +40,9 @@ public class BlockLaserRelay extends BlockContainerBase{ } @Override - public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB axis, List list, Entity entity){ - this.setBlockBoundsBasedOnState(world, x, y, z); - super.addCollisionBoxesToList(world, x, y, z, axis, list, entity); - } - - @Override - public boolean renderAsNormalBlock(){ - return false; + public void addCollisionBoxesToList(World world, BlockPos pos, IBlockState state, AxisAlignedBB axis, List list, Entity entity){ + this.setBlockBoundsBasedOnState(world, pos); + super.addCollisionBoxesToList(world, pos, state, axis, list, entity); } @Override @@ -55,25 +50,19 @@ public class BlockLaserRelay extends BlockContainerBase{ return AssetUtil.laserRelayRenderId; } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return this.blockIcon; - } - @Override public boolean isOpaqueCube(){ return false; } @Override - public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata){ - return side; + public IBlockState onBlockPlaced(World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, int meta, EntityLivingBase base){ + return this.getStateFromMeta(meta); } @Override - public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z){ - int meta = world.getBlockMetadata(x, y, z); + public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos){ + int meta = Position.fromBlockPos(pos).getMetadata(world); float pixel = 1F/16F; if(meta == 0){ @@ -96,15 +85,9 @@ public class BlockLaserRelay extends BlockContainerBase{ } } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = Blocks.stone.getIcon(0, 0); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java index 3a34a7140..eda653e73 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java @@ -10,20 +10,21 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; @@ -45,20 +46,9 @@ public class BlockSlabs extends BlockBase{ } @Override - public boolean renderAsNormalBlock(){ - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return this.fullBlock.getIcon(side, this.meta); - } - - @Override - public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB axis, List list, Entity entity){ - this.setBlockBoundsBasedOnState(world, x, y, z); - super.addCollisionBoxesToList(world, x, y, z, axis, list, entity); + public void addCollisionBoxesToList(World world, BlockPos pos, IBlockState state, AxisAlignedBB axis, List list, Entity entity){ + this.setBlockBoundsBasedOnState(world, pos); + super.addCollisionBoxesToList(world, pos, state, axis, list, entity); } @Override @@ -67,19 +57,19 @@ public class BlockSlabs extends BlockBase{ } @Override - public int onBlockPlaced(World par1World, int blockX, int blockY, int blockZ, int side, float hitX, float hitY, float hitZ, int meta){ - if(side == 1){ - return meta; + public IBlockState onBlockPlaced(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer){ + if(facing.ordinal() == 1){ + return this.getStateFromMeta(meta); } - if(side == 0 || hitY >= 0.5F){ - return meta+1; + if(facing.ordinal() == 0 || hitY >= 0.5F){ + return this.getStateFromMeta(meta+1); } - return meta; + return this.getStateFromMeta(meta); } @Override - public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z){ - int meta = world.getBlockMetadata(x, y, z); + public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos){ + int meta = Position.fromBlockPos(pos).getMetadata(world); float minY = meta == 1 ? 0.5F : 0.0F; float maxY = meta == 1 ? 1.0F : 0.5F; this.setBlockBounds(0.0F, minY, 0F, 1.0F, maxY, 1.0F); @@ -90,12 +80,6 @@ public class BlockSlabs extends BlockBase{ this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F); } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - - } - @Override public Class getItemBlock(){ return TheItemBlock.class; @@ -103,7 +87,7 @@ public class BlockSlabs extends BlockBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.common; + return EnumRarity.COMMON; } public static class TheItemBlock extends ItemBlockBase{ @@ -115,15 +99,16 @@ public class BlockSlabs extends BlockBase{ } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ){ - if(world.getBlock(x, y, z) == this.field_150939_a && ((side == 1 && world.getBlockMetadata(x, y, z) == 0) || (side == 0 && world.getBlockMetadata(x, y, z) == 1))){ - if(world.setBlock(x, y, z, ((BlockSlabs)this.field_150939_a).fullBlock, ((BlockSlabs)this.field_150939_a).meta, 3)){ - world.playSoundEffect(x+0.5F, y+0.5F, z+0.5F, this.field_150939_a.stepSound.getBreakSound(), (this.field_150939_a.stepSound.getVolume()+1.0F)/2.0F, this.field_150939_a.stepSound.getPitch()*0.8F); + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ){ + Position thePos = Position.fromBlockPos(pos); + if(thePos.getBlock(world) == this.block && ((side.ordinal() == 1 && thePos.getMetadata(world) == 0) || (side.ordinal() == 0 && thePos.getMetadata(world) == 1))){ + if(thePos.setBlock(world, ((BlockSlabs)this.block).fullBlock, ((BlockSlabs)this.block).meta, 3)){ + world.playSoundEffect(thePos.getX()+0.5F, thePos.getY()+0.5F, thePos.getZ()+0.5F, this.block.stepSound.getBreakSound(), (this.block.stepSound.getVolume()+1.0F)/2.0F, this.block.stepSound.frequency*0.8F); stack.stackSize--; return true; } } - return super.onItemUse(stack, player, world, x, y, z, side, hitX, hitY, hitZ); + return super.onItemUse(stack, player, world, pos, side, hitX, hitY, hitZ); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index 1e6f617cd..5c5ffdc44 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -30,6 +30,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -110,18 +111,18 @@ public abstract class BlockContainerBase extends BlockContainer{ @Override public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock){ - this.updateRedstoneState(world, pos); + this.updateRedstoneState(world, Position.fromBlockPos(pos)); } public void updateRedstoneState(World world, Position pos){ if(!world.isRemote){ - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityBase){ - boolean powered = world.isBlockIndirectlyGettingPowered(x, y, z); + boolean powered = world.isBlockIndirectlyGettingPowered(pos) > 0; boolean wasPowered = ((TileEntityBase)tile).isRedstonePowered; if(powered && !wasPowered){ if(tile instanceof IRedstoneToggle && ((IRedstoneToggle)tile).isPulseMode()){ - world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world)); + world.scheduleUpdate(pos, this, this.tickRate(world)); } ((TileEntityBase)tile).setRedstonePowered(true); } @@ -133,9 +134,9 @@ public abstract class BlockContainerBase extends BlockContainer{ } @Override - public void updateTick(World world, int x, int y, int z, Random random){ + public void updateTick(World world, BlockPos pos, IBlockState state, Random random){ if(!world.isRemote){ - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof IRedstoneToggle && ((IRedstoneToggle)tile).isPulseMode()){ ((IRedstoneToggle)tile).activateOnPulse(); } @@ -143,9 +144,9 @@ public abstract class BlockContainerBase extends BlockContainer{ } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack){ + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack){ if(stack.getTagCompound() != null){ - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof IEnergySaver){ ((IEnergySaver)tile).setEnergy(stack.getTagCompound().getInteger("Energy")); @@ -171,9 +172,9 @@ public abstract class BlockContainerBase extends BlockContainer{ } @Override - public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player){ + public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player){ if(!player.capabilities.isCreativeMode){ - this.dropBlockAsItem(world, x, y, z, meta, 0); + this.dropBlockAsItem(world, pos, state, 0); } } @@ -183,8 +184,8 @@ public abstract class BlockContainerBase extends BlockContainer{ } @Override - public int getComparatorInputOverride(World world, int x, int y, int z, int meta){ - TileEntity tile = world.getTileEntity(x, y, z); + public int getComparatorInputOverride(World world, BlockPos pos){ + TileEntity tile = world.getTileEntity(pos); if(tile instanceof IInventory){ return Container.calcRedstoneFromInventory((IInventory)tile); } @@ -192,12 +193,12 @@ public abstract class BlockContainerBase extends BlockContainer{ } @Override - public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune){ + public ArrayList getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ ArrayList drops = new ArrayList(); - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile != null){ - ItemStack stack = new ItemStack(this.getItemDropped(metadata, Util.RANDOM, fortune), 1, this.damageDropped(metadata)); + ItemStack stack = new ItemStack(this.getItemDropped(state, Util.RANDOM, fortune), 1, this.damageDropped(state)); if(tile instanceof IEnergySaver){ int energy = ((IEnergySaver)tile).getEnergy(); @@ -236,7 +237,7 @@ public abstract class BlockContainerBase extends BlockContainer{ @Override public void onBlockAdded(World world, BlockPos pos, IBlockState state){ - this.updateRedstoneState(world, pos); + this.updateRedstoneState(world, Position.fromBlockPos(pos)); } public boolean tryToggleRedstone(World world, Position pos, EntityPlayer player){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java index 8c6fa7608..2d3589230 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java @@ -13,14 +13,10 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemAxeAA extends ItemAxe{ @@ -66,16 +62,4 @@ public class ItemAxeAA extends ItemAxe{ public EnumRarity getRarity(ItemStack stack){ return this.rarity; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java index 9ff3ed10d..d469a00b4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; @@ -19,6 +20,7 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.*; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -83,12 +85,12 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE WorldUtil.fillBucket(tank, slots, 1, 2); if(this.tank.getFluidAmount() > 0){ - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, this.tank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.DOWN, this.tank); if(!this.isRedstonePowered){ - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, this.tank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.NORTH, this.tank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.EAST, this.tank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.SOUTH, this.tank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.WEST, this.tank); } } @@ -121,7 +123,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -131,37 +133,37 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot == 2 && FluidContainerRegistry.containsFluid(this.slots[0], new FluidStack(InitBlocks.fluidCanolaOil, FluidContainerRegistry.BUCKET_VOLUME)); } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill){ + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ return 0; } @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain){ + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ if(resource.getFluid() == InitBlocks.fluidCanolaOil){ return this.tank.drain(resource.amount, doDrain); } @@ -169,22 +171,22 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE } @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain){ + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ return this.tank.drain(maxDrain, doDrain); } @Override - public boolean canFill(ForgeDirection from, Fluid fluid){ + public boolean canFill(EnumFacing from, Fluid fluid){ return false; } @Override - public boolean canDrain(ForgeDirection from, Fluid fluid){ - return from != ForgeDirection.UP; + public boolean canDrain(EnumFacing from, Fluid fluid){ + return from != EnumFacing.UP; } @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from){ + public FluidTankInfo[] getTankInfo(EnumFacing from){ return new FluidTankInfo[]{this.tank.getInfo()}; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java index ae2282ac6..7017dd4d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java @@ -22,7 +22,7 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.*; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -129,7 +129,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements if(this.slots[SLOT_INPUT] != null && this.slots[SLOT_INPUT].getItem() == InitItems.itemMisc && this.slots[SLOT_INPUT].getItemDamage() == TheMiscItems.CUP.ordinal() && this.slots[SLOT_OUTPUT] == null && this.coffeeCacheAmount >= CACHE_USE && this.tank.getFluid() != null && this.tank.getFluid().getFluid() == FluidRegistry.WATER && this.tank.getFluidAmount() >= WATER_USE){ if(this.storage.getEnergyStored() >= ENERGY_USED){ if(this.brewTime%30 == 0){ - this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, ModUtil.MOD_ID_LOWER+":coffeeMachine", 0.35F, 1.0F); + this.worldObj.playSoundEffect(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), ModUtil.MOD_ID_LOWER+":coffeeMachine", 0.35F, 1.0F); } this.brewTime++; @@ -167,7 +167,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -177,7 +177,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot == SLOT_OUTPUT || (slot >= 3 && slot < this.slots.length-2 && ItemCoffee.getIngredientFromStack(stack) == null) || slot == SLOT_WATER_OUTPUT; } @@ -189,52 +189,52 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill){ - return resource.getFluid() == FluidRegistry.WATER && from != ForgeDirection.DOWN ? this.tank.fill(resource, doFill) : 0; + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ + return resource.getFluid() == FluidRegistry.WATER && from != EnumFacing.DOWN ? this.tank.fill(resource, doFill) : 0; } @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain){ + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ return null; } @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain){ + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ return null; } @Override - public boolean canFill(ForgeDirection from, Fluid fluid){ + public boolean canFill(EnumFacing from, Fluid fluid){ return true; } @Override - public boolean canDrain(ForgeDirection from, Fluid fluid){ + public boolean canDrain(EnumFacing from, Fluid fluid){ return false; } @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from){ + public FluidTankInfo[] getTankInfo(EnumFacing from){ return new FluidTankInfo[]{this.tank.getInfo()}; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java index 012a91583..74d58ca1f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java @@ -12,10 +12,11 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; +import de.ellpeck.actuallyadditions.api.Position; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -80,14 +81,15 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements if(flag != (this.firstSmeltTime > 0 || this.secondSmeltTime > 0)){ this.markDirty(); - int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + Position thisPos = Position.fromTileEntity(this); + int meta = thisPos.getMetadata(worldObj); if(meta > 3){ if(!this.canSmeltOn(SLOT_INPUT_1, SLOT_OUTPUT_1) && !this.canSmeltOn(SLOT_INPUT_2, SLOT_OUTPUT_2)){ - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, meta-4, 2); + thisPos.setMetadata(worldObj, meta-4, 2); } } else{ - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, meta+4, 2); + thisPos.setMetadata(worldObj, meta+4, 2); } } @@ -117,7 +119,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements public boolean canSmeltOn(int theInput, int theOutput){ if(this.slots[theInput] != null){ - ItemStack output = FurnaceRecipes.smelting().getSmeltingResult(this.slots[theInput]); + ItemStack output = FurnaceRecipes.instance().getSmeltingResult(this.slots[theInput]); if(this.slots[theInput] != null){ if(output != null){ if(this.slots[theOutput] == null || (this.slots[theOutput].isItemEqual(output) && this.slots[theOutput].stackSize <= this.slots[theOutput].getMaxStackSize()-output.stackSize)){ @@ -130,7 +132,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements } public void finishBurning(int theInput, int theOutput){ - ItemStack output = FurnaceRecipes.smelting().getSmeltingResult(this.slots[theInput]); + ItemStack output = FurnaceRecipes.instance().getSmeltingResult(this.slots[theInput]); if(this.slots[theOutput] == null){ this.slots[theOutput] = output.copy(); } @@ -160,37 +162,37 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @Override public boolean isItemValidForSlot(int i, ItemStack stack){ - return (i == SLOT_INPUT_1 || i == SLOT_INPUT_2) && FurnaceRecipes.smelting().getSmeltingResult(stack) != null; + return (i == SLOT_INPUT_1 || i == SLOT_INPUT_2) && FurnaceRecipes.instance().getSmeltingResult(stack) != null; } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot == SLOT_OUTPUT_1 || slot == SLOT_OUTPUT_2; } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java index 29f560b1b..4b4c50250 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java @@ -13,12 +13,13 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -50,22 +51,22 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } @@ -124,14 +125,15 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg if(flag != (this.firstCrushTime > 0 || this.secondCrushTime > 0)){ this.markDirty(); - int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + Position thisPos = Position.fromTileEntity(this); + int meta = thisPos.getMetadata(worldObj); if(meta == 1){ if(!this.canCrushOn(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2) && (!this.isDouble || !this.canCrushOn(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2))){ - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 2); + thisPos.setMetadata(worldObj, 0, 2); } } else{ - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 1, 2); + thisPos.setMetadata(worldObj, 1, 2); } } @@ -142,7 +144,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg } if(shouldPlaySound){ - this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, ModUtil.MOD_ID_LOWER+":crusher", 0.25F, 1.0F); + this.worldObj.playSoundEffect(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), ModUtil.MOD_ID_LOWER+":crusher", 0.25F, 1.0F); } } } @@ -252,7 +254,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -262,7 +264,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot == SLOT_OUTPUT_1_1 || slot == SLOT_OUTPUT_1_2 || slot == SLOT_OUTPUT_2_1 || slot == SLOT_OUTPUT_2_2; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java index f5f43c4af..9e1599f8d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java @@ -23,7 +23,7 @@ import net.minecraft.block.BlockLiquid; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.relauncher.Side; @@ -51,7 +51,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR super.updateEntity(); if(!this.worldObj.isRemote){ if(this.layerAt == -1){ - this.layerAt = this.yCoord-1; + this.layerAt = this.getPos().getY()-1; } if(!this.isRedstonePowered && this.ticksElapsed%5 == 0){ @@ -90,7 +90,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR worldObj.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block)+(meta << 12)); worldObj.setBlockToAir(x, y, z); - WorldUtil.addToInventory(this, drops, ForgeDirection.UNKNOWN, true); + WorldUtil.addToInventory(this, drops, true, true); this.markDirty(); this.storage.extractEnergy(actualUse, false); @@ -122,7 +122,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR } } - String reg = Block.blockRegistry.getNameForObject(block); + String reg = block.getRegistryName(); if(reg != null && !reg.isEmpty()){ for(String string : ConfigValues.minerExtraWhitelist){ if(reg.equals(string)){ @@ -136,7 +136,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR } private boolean isBlacklisted(Block block){ - String reg = Block.blockRegistry.getNameForObject(block); + String reg = block.getRegistryName(); if(reg != null && !reg.isEmpty()){ for(String string : ConfigValues.minerBlacklist){ if(reg.equals(string)){ @@ -148,7 +148,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR } private void shootParticles(int endX, int endY, int endZ){ - PacketHandler.theNetwork.sendToAllAround(new PacketParticle(xCoord, yCoord, zCoord, endX, endY, endZ, new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F), new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 96)); + PacketHandler.theNetwork.sendToAllAround(new PacketParticle(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), endX, endY, endZ, new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F), new NetworkRegistry.TargetPoint(worldObj.provider.getDimensionId(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), 96)); } @Override @@ -168,32 +168,32 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java index 3882d7863..9b35226bf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java @@ -19,7 +19,8 @@ import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.Vec3; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -43,7 +44,7 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP public void updateEntity(){ super.updateEntity(); if(!worldObj.isRemote){ - this.range = upgradeRange(RANGE, worldObj, xCoord, yCoord, zCoord); + this.range = upgradeRange(RANGE, worldObj, Position.fromBlockPos(this.getPos())); if(!this.hasBoundPosition()){ this.boundPosition = null; @@ -54,12 +55,12 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP this.boundPosBefore = this.boundPosition; this.boundBlockBefore = this.boundPosition == null ? null : this.boundPosition.getBlock(worldObj); - this.getWorldObj().markBlockForUpdate(this.xCoord+1, this.yCoord, this.zCoord); - this.getWorldObj().markBlockForUpdate(this.xCoord-1, this.yCoord, this.zCoord); - this.getWorldObj().markBlockForUpdate(this.xCoord, this.yCoord+1, this.zCoord); - this.getWorldObj().markBlockForUpdate(this.xCoord, this.yCoord-1, this.zCoord); - this.getWorldObj().markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord+1); - this.getWorldObj().markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord-1); + this.worldObj.markBlockForUpdate(new Position(this.getPos().getX()+1, this.getPos().getY(), this.getPos().getZ())); + this.worldObj.markBlockForUpdate(new Position(this.getPos().getX()-1, this.getPos().getY(), this.getPos().getZ())); + this.worldObj.markBlockForUpdate(new Position(this.getPos().getX(), this.getPos().getY()+1, this.getPos().getZ())); + this.worldObj.markBlockForUpdate(new Position(this.getPos().getX(), this.getPos().getY()-1, this.getPos().getZ())); + this.worldObj.markBlockForUpdate(new Position(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()+1)); + this.worldObj.markBlockForUpdate(new Position(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()-1)); this.sendUpdate(); this.markDirty(); } @@ -96,10 +97,10 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP } } - public static int upgradeRange(int defaultRange, World world, int x, int y, int z){ + public static int upgradeRange(int defaultRange, World world, Position pos){ int newRange = defaultRange; for(int i = 0; i < 3; i++){ - Block block = world.getBlock(x, y+1+i, z); + Block block = pos.getOffsetPosition(0, 1+i, 0).getBlock(world); if(block == InitBlocks.blockPhantomBooster){ newRange = newRange*2; } @@ -113,7 +114,7 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP @Override public boolean hasBoundPosition(){ if(this.boundPosition != null){ - if(worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) instanceof IPhantomTile || (this.xCoord == this.boundPosition.getX() && this.yCoord == this.boundPosition.getY() && this.zCoord == this.boundPosition.getZ())){ + if(worldObj.getTileEntity(boundPosition) instanceof IPhantomTile || (this.getPos().getX() == this.boundPosition.getX() && this.getPos().getY() == this.boundPosition.getY() && this.getPos().getZ() == this.boundPosition.getZ())){ this.boundPosition = null; return false; } @@ -133,17 +134,17 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP double d5 = (double)(Util.RANDOM.nextFloat()*1.0F*(float)j1); double d0 = (double)this.boundPosition.getX()+0.5D+0.25D*(double)i1; double d3 = (double)(Util.RANDOM.nextFloat()*1.0F*(float)i1); - worldObj.spawnParticle("portal", d0, d1, d2, d3, d4, d5); + worldObj.spawnParticle(EnumParticleTypes.PORTAL, d0, d1, d2, d3, d4, d5); } if(this.ticksElapsed%80 == 0){ - PacketParticle.renderParticlesFromAToB(xCoord, yCoord, zCoord, boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), 2, 0.35F, COLORS, 3); + PacketParticle.renderParticlesFromAToB(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), 2, 0.35F, COLORS, 3); } } @Override public boolean isBoundThingInRange(){ - return this.hasBoundPosition() && this.boundPosition.toVec().distanceTo(Vec3.createVectorHelper(xCoord, yCoord, zCoord)) <= this.range; + return this.hasBoundPosition() && this.boundPosition.toVec().distanceTo(Position.fromBlockPos(this.getPos()).toVec()) <= this.range; } @Override @@ -167,12 +168,12 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return false; } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return false; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index fbec82c6d..d68404b44 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -259,10 +259,6 @@ public class WorldUtil{ return blocks; } - public static boolean addToInventory(IInventory inventory, int start, int end, ArrayList stacks, boolean actuallyDo){ - return addToInventory(inventory, start, end, stacks, EnumFacing.UP, actuallyDo, true); - } - /** * Add an ArrayList of ItemStacks to an Array of slots * @@ -315,12 +311,12 @@ public class WorldUtil{ return working >= stacks.size(); } - public static boolean addToInventory(IInventory inventory, ArrayList stacks, boolean actuallyDo){ - return addToInventory(inventory, stacks, EnumFacing.UP, actuallyDo); + public static boolean addToInventory(IInventory inventory, ArrayList stacks, boolean actuallyDo, boolean shouldAlwaysWork){ + return addToInventory(inventory, stacks, EnumFacing.UP, actuallyDo, shouldAlwaysWork); } - public static boolean addToInventory(IInventory inventory, ArrayList stacks, EnumFacing side, boolean actuallyDo){ - return addToInventory(inventory, 0, inventory.getSizeInventory(), stacks, side, actuallyDo, false); + public static boolean addToInventory(IInventory inventory, ArrayList stacks, EnumFacing side, boolean actuallyDo, boolean shouldAlwaysWork){ + return addToInventory(inventory, 0, inventory.getSizeInventory(), stacks, side, actuallyDo, shouldAlwaysWork); } public static int findFirstFilledSlot(ItemStack[] slots){ @@ -369,11 +365,11 @@ public class WorldUtil{ Block block = pos.getBlock(world); int meta = pos.getMetadata(world); //If the Block can be harvested or not - boolean canHarvest = block.canHarvestBlock(world, pos.toBlockPos(), player); + boolean canHarvest = block.canHarvestBlock(world, pos, player); //Send Block Breaking Event if(player instanceof EntityPlayerMP){ - int event = ForgeHooks.onBlockBreakEvent(world, ((EntityPlayerMP)player).theItemInWorldManager.getGameType(), (EntityPlayerMP)player, pos.toBlockPos()); + int event = ForgeHooks.onBlockBreakEvent(world, ((EntityPlayerMP)player).theItemInWorldManager.getGameType(), (EntityPlayerMP)player, pos); if(event == -1){ return false; } @@ -381,29 +377,29 @@ public class WorldUtil{ if(!world.isRemote){ //Server-Side only, special cases - block.onBlockHarvested(world, pos.toBlockPos(), pos.getBlockState(world), player); + block.onBlockHarvested(world, pos, pos.getBlockState(world), player); } else{ //Shows the Harvest Particles and plays the Block's Sound - world.playAuxSFX(2001, pos.toBlockPos(), Block.getIdFromBlock(block)+(meta << 12)); + world.playAuxSFX(2001, pos, Block.getIdFromBlock(block)+(meta << 12)); } //If the Block was actually "removed", meaning it will drop an Item - boolean removed = block.removedByPlayer(world, pos.toBlockPos(), player, canHarvest); + boolean removed = block.removedByPlayer(world, pos, player, canHarvest); //Actually removes the Block from the World if(removed){ //Before the Block is destroyed, special cases - block.onBlockDestroyedByPlayer(world, pos.toBlockPos(), pos.getBlockState(world)); + block.onBlockDestroyedByPlayer(world, pos, pos.getBlockState(world)); if(!world.isRemote && !player.capabilities.isCreativeMode){ //Actually drops the Block's Items etc. if(canHarvest){ - block.harvestBlock(world, player, pos.toBlockPos(), pos.getBlockState(world), pos.getTileEntity(world)); + block.harvestBlock(world, player, pos, pos.getBlockState(world), pos.getTileEntity(world)); } //Only drop XP when no Silk Touch is applied if(!EnchantmentHelper.getSilkTouchModifier(player)){ //Drop XP depending on Fortune Level - block.dropXpOnBlockBreak(world, pos.toBlockPos(), block.getExpDrop(world, pos.toBlockPos(), EnchantmentHelper.getFortuneModifier(player))); + block.dropXpOnBlockBreak(world, pos, block.getExpDrop(world, pos, EnchantmentHelper.getFortuneModifier(player))); } } } @@ -411,7 +407,7 @@ public class WorldUtil{ if(!world.isRemote){ //Update the Client of a Block Change if(player instanceof EntityPlayerMP){ - ((EntityPlayerMP)player).playerNetServerHandler.sendPacket(new S23PacketBlockChange(world, pos.toBlockPos())); + ((EntityPlayerMP)player).playerNetServerHandler.sendPacket(new S23PacketBlockChange(world, pos)); } } else{ From 020745a81384a48ac99f40e8ecc686f57d8476db Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 7 Jan 2016 21:41:28 +0100 Subject: [PATCH 04/58] Remember how I said "I'm nearing the end of bugfixing"? Well that was a lie apparently. --- .../actuallyadditions/api/Position.java | 30 ++--- .../api/internal/IAtomicReconstructor.java | 2 +- .../mod/blocks/BlockAtomicReconstructor.java | 72 +++-------- .../mod/blocks/BlockBlackLotus.java | 16 --- .../mod/blocks/BlockBreaker.java | 73 +++--------- .../mod/blocks/BlockCoalGenerator.java | 48 +++----- .../mod/blocks/BlockCoffeeMachine.java | 56 +++------ .../mod/blocks/BlockCompost.java | 57 +++------ .../mod/blocks/BlockCrystal.java | 32 ++--- .../mod/blocks/BlockDirectionalBreaker.java | 73 +++--------- .../mod/blocks/BlockDropper.java | 73 +++--------- .../mod/blocks/BlockEnergizer.java | 46 ++----- .../mod/blocks/BlockFeeder.java | 40 ++----- .../mod/blocks/BlockFishingNet.java | 2 +- .../mod/blocks/BlockFurnaceDouble.java | 112 ++++++------------ .../mod/blocks/BlockFurnaceSolar.java | 26 +--- .../mod/blocks/BlockGeneric.java | 19 +-- .../mod/blocks/BlockGreenhouseGlass.java | 36 +----- .../mod/blocks/BlockGrinder.java | 66 +++-------- .../mod/blocks/BlockHeatCollector.java | 26 +--- .../mod/blocks/BlockInputter.java | 36 ++---- .../mod/blocks/BlockLaserRelay.java | 2 +- .../blocks/BlockLavaFactoryController.java | 26 +--- .../mod/blocks/BlockLeafGenerator.java | 36 ++---- .../mod/blocks/BlockPhantomBooster.java | 26 +--- .../mod/blocks/BlockRangedCollector.java | 38 ++---- .../mod/blocks/BlockSmileyCloud.java | 69 ++++------- .../mod/blocks/BlockTreasureChest.java | 87 +++----------- .../mod/blocks/base/BlockFluidFlowing.java | 38 ++---- .../mod/blocks/base/BlockPlant.java | 55 +++------ .../mod/blocks/render/RenderInventory.java | 14 +-- .../render/RenderReconstructorLens.java | 5 +- .../mod/gen/JamVillagerTradeHandler.java | 9 +- .../mod/inventory/ContainerEnergizer.java | 5 +- .../mod/inventory/ContainerEnervator.java | 5 +- .../mod/items/ItemBattery.java | 19 +-- .../mod/items/ItemChestToCrateUpgrade.java | 38 ++---- .../mod/items/ItemCoffee.java | 24 +--- .../mod/items/ItemCoffeeBean.java | 19 +-- .../mod/items/ItemDrill.java | 91 ++++++-------- .../mod/items/ItemDrillUpgrade.java | 17 --- .../mod/items/ItemFertilizer.java | 29 ++--- .../mod/items/ItemFoods.java | 50 ++------ .../mod/items/ItemHairyBall.java | 21 +--- .../actuallyadditions/mod/items/ItemJams.java | 35 +----- .../mod/items/ItemKnife.java | 26 +--- .../mod/items/ItemLaserWrench.java | 26 ++-- .../mod/items/ItemLeafBlower.java | 38 ++---- .../mod/items/ItemMagnetRing.java | 23 +--- .../mod/items/ItemPhantomConnector.java | 26 ++-- .../mod/items/ItemResonantRice.java | 19 +-- .../mod/items/ItemWingsOfTheBats.java | 19 +-- .../mod/items/base/ItemAllToolAA.java | 93 +++++++-------- .../mod/items/base/ItemArmorAA.java | 18 +-- .../mod/items/base/ItemBucketAA.java | 18 +-- .../mod/items/base/ItemHoeAA.java | 16 --- .../mod/items/base/ItemShovelAA.java | 16 --- .../mod/items/lens/ItemLens.java | 19 +-- .../tile/TileEntityAtomicReconstructor.java | 33 +++--- .../mod/tile/TileEntityBreaker.java | 30 ++--- .../mod/tile/TileEntityDropper.java | 9 +- .../mod/tile/TileEntityEnergizer.java | 14 +-- .../mod/tile/TileEntityEnervator.java | 24 ++-- .../mod/tile/TileEntityFermentingBarrel.java | 35 +++--- .../mod/tile/TileEntityFishingNet.java | 12 +- .../mod/tile/TileEntityHeatCollector.java | 26 ++-- .../mod/tile/TileEntityLeafGenerator.java | 36 +++--- .../mod/tile/TileEntityPhantomPlacer.java | 25 ++-- .../actuallyadditions/mod/util/AssetUtil.java | 83 +++++++------ .../actuallyadditions/mod/util/WorldUtil.java | 14 +-- 70 files changed, 671 insertions(+), 1726 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/Position.java b/src/main/java/de/ellpeck/actuallyadditions/api/Position.java index d58c19166..2cbb72451 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/Position.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/Position.java @@ -59,31 +59,23 @@ public class Position extends BlockPos{ } public int getMetadata(IBlockAccess world){ - //TODO Fix meta - return /*world != null ? world.getBlockMetadata(this.x, this.y, this.z) : */0; + return this.getBlock(world).getMetaFromState(this.getBlockState(world)); } - public void setMetadata(IBlockAccess world, int meta, int flag){ - //TODO Fix meta - /*if(world != null){ - world.setBlockMetadataWithNotify(this.x, this.y, this.z, meta, flag); - }*/ + public void setMetadata(World world, int meta, int flag){ + if(world != null){ + world.setBlockState(this, this.getBlock(world).getStateFromMeta(meta), flag); + } + } + + public boolean setBlock(World world, Block block, int meta, int flag){ + return world.setBlockState(this, block.getStateFromMeta(meta), flag); } public boolean isEqual(Position pos){ return pos != null && this.getX() == pos.getX() && this.getY() == pos.getY() && this.getZ() == pos.getZ(); } - public boolean setBlock(World world, Block block, int meta, int flag){ - //TODO Fix meta - return world != null && this.setBlockState(world, block.getDefaultState(), meta, flag); - } - - public boolean setBlockState(World world, IBlockState state, int meta, int flag){ - //TODO Fix meta - return world.setBlockState(this, state, flag); - } - public Position copy(){ return new Position(this.getX(), this.getY(), this.getZ()); } @@ -115,4 +107,8 @@ public class Position extends BlockPos{ public static Position fromBlockPos(BlockPos pos){ return (Position)pos; } + + public boolean setBlockState(World world, IBlockState state, int flag){ + return world.setBlockState(this, state, flag); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IAtomicReconstructor.java index 7f6f7b986..b4625cc17 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IAtomicReconstructor.java @@ -38,7 +38,7 @@ public interface IAtomicReconstructor{ /** * Returns the world of the reconstructor */ - World getWorld(); + World getWorldObject(); /** * Extracts a specified amount of energy from the Reconstructor's RF storage diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 8269c01d9..c6db78090 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; @@ -17,33 +18,27 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.profiler.Profiler; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockAtomicReconstructor extends BlockContainerBase implements IHudDisplay{ - @SideOnly(Side.CLIENT) - private IIcon frontIcon; - @SideOnly(Side.CLIENT) - private IIcon topIcon; - public BlockAtomicReconstructor(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -54,40 +49,15 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ - int rotation = BlockPistonBase.determineOrientation(world, x, y, z, player); - world.setBlockMetadataWithNotify(x, y, z, rotation, 2); + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ + int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); + Position.fromBlockPos(pos).setMetadata(world, rotation, 2); - super.onBlockPlacedBy(world, x, y, z, player, stack); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ - int meta = world.getBlockMetadata(x, y, z); - if(side != meta && (side == 0 || side == 1)){ - return this.topIcon; - } - if(side == meta){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 0 || side == 1){ - return this.topIcon; - } - if(side == 3){ - return this.frontIcon; - } - return this.blockIcon; + super.onBlockPlacedBy(world, pos, state, player, stack); } @Override @@ -96,12 +66,12 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ - if(this.tryToggleRedstone(world, x, y, z, player)){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ + if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ return true; } if(!world.isRemote){ - TileEntityAtomicReconstructor reconstructor = (TileEntityAtomicReconstructor)world.getTileEntity(x, y, z); + TileEntityAtomicReconstructor reconstructor = (TileEntityAtomicReconstructor)world.getTileEntity(pos); if(reconstructor != null){ ItemStack heldItem = player.getCurrentEquippedItem(); if(heldItem != null){ @@ -123,29 +93,21 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front"); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - } - @Override public TileEntity createNewTileEntity(World world, int i){ return new TileEntityAtomicReconstructor(); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } @Override @SideOnly(Side.CLIENT) public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, MovingObjectPosition posHit, Profiler profiler, ScaledResolution resolution){ - TileEntity tile = minecraft.theWorld.getTileEntity(posHit.blockX, posHit.blockY, posHit.blockZ); + TileEntity tile = minecraft.theWorld.getTileEntity(posHit.getBlockPos()); if(tile instanceof TileEntityAtomicReconstructor){ ItemStack slot = ((TileEntityAtomicReconstructor)tile).getStackInSlot(0); String strg; @@ -157,7 +119,7 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud AssetUtil.renderStackToGui(slot, resolution.getScaledWidth()/2+15, resolution.getScaledHeight()/2-29, 1F); } - minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg, resolution.getScaledWidth()/2+35, resolution.getScaledHeight()/2-25, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg, resolution.getScaledWidth()/2+35, resolution.getScaledHeight()/2-25, StringUtil.DECIMAL_COLOR_WHITE); } } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBlackLotus.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBlackLotus.java index 4396c74fa..da6fdd6d2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBlackLotus.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBlackLotus.java @@ -11,11 +11,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockBlackLotus extends BlockBushBase{ @@ -23,15 +18,4 @@ public class BlockBlackLotus extends BlockBushBase{ super(name); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java index 568657963..a59e4a5d4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java @@ -10,33 +10,25 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockBreaker extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon frontIcon; - @SideOnly(Side.CLIENT) - private IIcon topIcon; - private boolean isPlacer; public BlockBreaker(boolean isPlacer, String name){ @@ -54,69 +46,36 @@ public class BlockBreaker extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ - int meta = world.getBlockMetadata(x, y, z); - if(side != meta && (side == 0 || side == 1)){ - return this.topIcon; - } - if(side == meta){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 0 || side == 1){ - return this.topIcon; - } - if(side == 3){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ - if(this.tryToggleRedstone(world, x, y, z, player)){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ + if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ return true; } if(!world.isRemote){ - TileEntityBreaker breaker = (TileEntityBreaker)world.getTileEntity(x, y, z); + TileEntityBreaker breaker = (TileEntityBreaker)world.getTileEntity(pos); if(breaker != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BREAKER.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BREAKER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front"); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.uncommon; + return EnumRarity.UNCOMMON; } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ - int rotation = BlockPistonBase.determineOrientation(world, x, y, z, player); - world.setBlockMetadataWithNotify(x, y, z, rotation, 2); + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ + int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); + Position.fromBlockPos(pos).setMetadata(world, rotation, 2); - super.onBlockPlacedBy(world, x, y, z, player, stack); + super.onBlockPlacedBy(world, pos, state, player, stack); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java index 9c73057e9..34e6f9ec0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java @@ -10,20 +10,21 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -32,11 +33,6 @@ import java.util.Random; public class BlockCoalGenerator extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockCoalGenerator(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -53,50 +49,36 @@ public class BlockCoalGenerator extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, int x, int y, int z, Random rand){ - int meta = world.getBlockMetadata(x, y, z); + public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ + int meta = Position.fromBlockPos(pos).getMetadata(world); if(meta == 1){ for(int i = 0; i < 5; i++){ - world.spawnParticle(ClientProxy.bulletForMyValentine ? "heart" : "smoke", (double)x+0.5F, (double)y+1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D); + world.spawnParticle(ClientProxy.bulletForMyValentine ? EnumParticleTypes.HEART : EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX()+0.5F, (double)pos.getY()+1.0F, (double)pos.getZ()+0.5F, 0.0D, 0.0D, 0.0D); } } } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityCoalGenerator press = (TileEntityCoalGenerator)world.getTileEntity(x, y, z); + TileEntityCoalGenerator press = (TileEntityCoalGenerator)world.getTileEntity(pos); if(press != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.COAL_GENERATOR.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.COAL_GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java index 0a4cfc451..ca6d1da3a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java @@ -10,25 +10,23 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockCoffeeMachine extends BlockContainerBase{ @@ -43,20 +41,9 @@ public class BlockCoffeeMachine extends BlockContainerBase{ this.setBlockBounds(f, 0F, f, 1F-f, 1F-2*f, 1F-f); } - @Override - public boolean renderAsNormalBlock(){ - return false; - } - @Override public int getRenderType(){ - return AssetUtil.coffeeMachineRenderId; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return this.blockIcon; + return AssetUtil.TESR_RENDER_ID; } @Override @@ -65,56 +52,51 @@ public class BlockCoffeeMachine extends BlockContainerBase{ } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int f6, float f7, float f8, float f9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing f6, float f7, float f8, float f9){ if(!world.isRemote){ - TileEntityCoffeeMachine machine = (TileEntityCoffeeMachine)world.getTileEntity(x, y, z); + TileEntityCoffeeMachine machine = (TileEntityCoffeeMachine)world.getTileEntity(pos); if(machine != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.COFFEE_MACHINE.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.COFFEE_MACHINE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = Blocks.coal_block.getIcon(0, 0); - } - @Override public TileEntity createNewTileEntity(World world, int meta){ return new TileEntityCoffeeMachine(); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; + Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - world.setBlockMetadataWithNotify(x, y, z, 2, 2); + thePos.setMetadata(world, 0, 2); } if(rotation == 1){ - world.setBlockMetadataWithNotify(x, y, z, 1, 2); + thePos.setMetadata(world, 3, 2); } if(rotation == 2){ - world.setBlockMetadataWithNotify(x, y, z, 0, 2); + thePos.setMetadata(world, 1, 2); } if(rotation == 3){ - world.setBlockMetadataWithNotify(x, y, z, 3, 2); + thePos.setMetadata(world, 2, 2); } - super.onBlockPlacedBy(world, x, y, z, player, stack); + super.onBlockPlacedBy(world, pos, state, player, stack); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java index 450911ae2..10e2a0fd0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.items.ItemFertilizer; @@ -18,22 +19,17 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.profiler.Profiler; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -52,35 +48,24 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ this.setBlockBoundsForItemRender(); } - @Override - public boolean renderAsNormalBlock(){ - return false; - } - @Override public int getRenderType(){ - return AssetUtil.compostRenderId; + return AssetUtil.TESR_RENDER_ID; } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return this.blockIcon; - } - - @Override - public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB mask, List list, Entity collidingEntity){ + public void addCollisionBoxesToList(World world, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity){ this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3125F, 1.0F); - super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity); + super.addCollisionBoxesToList(world, pos, state, mask, list, collidingEntity); float f = 0.125F; this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); - super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity); + super.addCollisionBoxesToList(world, pos, state, mask, list, collidingEntity); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); - super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity); + super.addCollisionBoxesToList(world, pos, state, mask, list, collidingEntity); this.setBlockBounds(1.0F-f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity); + super.addCollisionBoxesToList(world, pos, state, mask, list, collidingEntity); this.setBlockBounds(0.0F, 0.0F, 1.0F-f, 1.0F, 1.0F, 1.0F); - super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity); + super.addCollisionBoxesToList(world, pos, state, mask, list, collidingEntity); this.setBlockBoundsForItemRender(); } @@ -90,10 +75,10 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int f6, float f7, float f8, float f9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing f6, float f7, float f8, float f9){ if(!world.isRemote){ ItemStack stackPlayer = player.getCurrentEquippedItem(); - TileEntityCompost tile = (TileEntityCompost)world.getTileEntity(x, y, z); + TileEntityCompost tile = (TileEntityCompost)world.getTileEntity(pos); //Add items to be composted if(stackPlayer != null && stackPlayer.getItem() instanceof ItemMisc && stackPlayer.getItemDamage() == TheMiscItems.MASHED_FOOD.ordinal() && (tile.slots[0] == null || (!(tile.slots[0].getItem() instanceof ItemFertilizer) && tile.slots[0].stackSize < TileEntityCompost.AMOUNT))){ if(tile.slots[0] == null){ @@ -129,32 +114,26 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ this.setBlockBounds(f, 0.0F, f, 1.0F-f, 1.0F, 1.0F-f); } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = Blocks.planks.getIcon(0, 0); - } - @Override public TileEntity createNewTileEntity(World world, int meta){ return new TileEntityCompost(); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.uncommon; + return EnumRarity.UNCOMMON; } @Override @SideOnly(Side.CLIENT) public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, MovingObjectPosition posHit, Profiler profiler, ScaledResolution resolution){ - TileEntity tile = minecraft.theWorld.getTileEntity(posHit.blockX, posHit.blockY, posHit.blockZ); + TileEntity tile = minecraft.theWorld.getTileEntity(posHit.getBlockPos()); if(tile instanceof TileEntityCompost){ ItemStack slot = ((TileEntityCompost)tile).getStackInSlot(0); String strg; @@ -166,7 +145,7 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ AssetUtil.renderStackToGui(slot, resolution.getScaledWidth()/2+15, resolution.getScaledHeight()/2-29, 1F); } - minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg, resolution.getScaledWidth()/2+35, resolution.getScaledHeight()/2-25, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg, resolution.getScaledWidth()/2+35, resolution.getScaledHeight()/2-25, StringUtil.DECIMAL_COLOR_WHITE); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java index fcf924794..080174425 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java @@ -13,16 +13,15 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -41,26 +40,21 @@ public class BlockCrystal extends BlockBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return this.blockIcon; - } - - @Override - public int damageDropped(int meta){ - return meta; + public int damageDropped(IBlockState state){ + return this.getMetaFromState(state); } @Override @SideOnly(Side.CLIENT) - public int getRenderColor(int meta){ - return meta >= allCrystals.length ? super.getRenderColor(meta) : allCrystals[meta].color; + public int getRenderColor(IBlockState state){ + int meta = this.getMetaFromState(state); + return meta >= allCrystals.length ? super.getRenderColor(state) : allCrystals[meta].color; } @Override @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess world, int x, int y, int z){ - return this.getRenderColor(world.getBlockMetadata(x, y, z)); + public int colorMultiplier(IBlockAccess world, BlockPos pos, int renderPass){ + return this.getRenderColor(world.getBlockState(pos)); } @SuppressWarnings("all") @@ -71,12 +65,6 @@ public class BlockCrystal extends BlockBase{ } } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - @Override public Class getItemBlock(){ return TheItemBlock.class; @@ -84,7 +72,7 @@ public class BlockCrystal extends BlockBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return stack.getItemDamage() >= allCrystals.length ? EnumRarity.common : allCrystals[stack.getItemDamage()].rarity; + return stack.getItemDamage() >= allCrystals.length ? EnumRarity.COMMON : allCrystals[stack.getItemDamage()].rarity; } public static class TheItemBlock extends ItemBlockBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java index b4a172aab..89c55dba0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java @@ -10,33 +10,25 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockDirectionalBreaker extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon frontIcon; - @SideOnly(Side.CLIENT) - private IIcon topIcon; - public BlockDirectionalBreaker(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -51,69 +43,36 @@ public class BlockDirectionalBreaker extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ - int meta = world.getBlockMetadata(x, y, z); - if(side != meta && (side == 0 || side == 1)){ - return this.topIcon; - } - if(side == meta){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 0 || side == 1){ - return this.topIcon; - } - if(side == 3){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ - if(this.tryToggleRedstone(world, x, y, z, player)){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ + if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ return true; } if(!world.isRemote){ - TileEntityDirectionalBreaker breaker = (TileEntityDirectionalBreaker)world.getTileEntity(x, y, z); + TileEntityDirectionalBreaker breaker = (TileEntityDirectionalBreaker)world.getTileEntity(pos); if(breaker != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.DIRECTIONAL_BREAKER.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.DIRECTIONAL_BREAKER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front"); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ - int rotation = BlockPistonBase.determineOrientation(world, x, y, z, player); - world.setBlockMetadataWithNotify(x, y, z, rotation, 2); + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ + int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); + Position.fromBlockPos(pos).setMetadata(world, rotation, 2); - super.onBlockPlacedBy(world, x, y, z, player, stack); + super.onBlockPlacedBy(world, pos, state, player, stack); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java index 9045bcd30..1254215ca 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java @@ -10,33 +10,25 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockDropper extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon frontIcon; - @SideOnly(Side.CLIENT) - private IIcon topIcon; - public BlockDropper(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -51,69 +43,36 @@ public class BlockDropper extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ - int meta = world.getBlockMetadata(x, y, z); - if(side != meta && (side == 0 || side == 1)){ - return this.topIcon; - } - if(side == meta){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 0 || side == 1){ - return this.topIcon; - } - if(side == 3){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ - if(this.tryToggleRedstone(world, x, y, z, player)){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ + if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ return true; } if(!world.isRemote){ - TileEntityDropper dropper = (TileEntityDropper)world.getTileEntity(x, y, z); + TileEntityDropper dropper = (TileEntityDropper)world.getTileEntity(pos); if(dropper != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.DROPPER.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.DROPPER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front"); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ - int rotation = BlockPistonBase.determineOrientation(world, x, y, z, player); - world.setBlockMetadataWithNotify(x, y, z, rotation, 2); + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ + int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); + Position.fromBlockPos(pos).setMetadata(world, rotation, 2); - super.onBlockPlacedBy(world, x, y, z, player, stack); + super.onBlockPlacedBy(world, pos, state, player, stack); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java index d308f5018..f444f05f5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java @@ -10,30 +10,24 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockEnergizer extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon sideIcon; private boolean isEnergizer; public BlockEnergizer(boolean isEnergizer, String name){ @@ -51,24 +45,18 @@ public class BlockEnergizer extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return side == 1 ? this.topIcon : (side == 0 ? this.blockIcon : this.sideIcon); - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ if(this.isEnergizer){ - TileEntityEnergizer energizer = (TileEntityEnergizer)world.getTileEntity(x, y, z); + TileEntityEnergizer energizer = (TileEntityEnergizer)world.getTileEntity(pos); if(energizer != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ENERGIZER.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ENERGIZER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } } else{ - TileEntityEnervator energizer = (TileEntityEnervator)world.getTileEntity(x, y, z); + TileEntityEnervator energizer = (TileEntityEnervator)world.getTileEntity(pos); if(energizer != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ENERVATOR.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ENERVATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } } return true; @@ -76,22 +64,14 @@ public class BlockEnergizer extends BlockContainerBase{ return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - this.sideIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Side"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java index 1623e8dd6..3873905f2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java @@ -10,28 +10,23 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockFeeder extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - public BlockFeeder(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -46,38 +41,25 @@ public class BlockFeeder extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return (side == 0 || side == 1) ? this.topIcon : this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityFeeder feeder = (TileEntityFeeder)world.getTileEntity(x, y, z); + TileEntityFeeder feeder = (TileEntityFeeder)world.getTileEntity(pos); if(feeder != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FEEDER.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FEEDER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.uncommon; + return EnumRarity.UNCOMMON; } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java index f0418d5bf..4342eef0e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java @@ -47,7 +47,7 @@ public class BlockFishingNet extends BlockContainerBase{ @Override public int getRenderType(){ - return AssetUtil.fishingNetRenderId; + return AssetUtil.TESR_RENDER_ID; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java index 6380efc42..f424810b8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java @@ -10,21 +10,22 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -35,13 +36,6 @@ import java.util.Random; public class BlockFurnaceDouble extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon onIcon; - @SideOnly(Side.CLIENT) - private IIcon frontIcon; - public BlockFurnaceDouble(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -58,73 +52,45 @@ public class BlockFurnaceDouble extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ - int meta = world.getBlockMetadata(x, y, z); - if(side == 1){ - return this.topIcon; - } - if(side == meta+2 && meta <= 3){ - return this.frontIcon; - } - else if(side == meta-2 && meta > 3){ - return this.onIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 1){ - return this.topIcon; - } - if(side == 3){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, int x, int y, int z, Random rand){ - int meta = world.getBlockMetadata(x, y, z); + public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ + int meta = Position.fromBlockPos(pos).getMetadata(world); if(meta > 3){ - float f = (float)x+0.5F; - float f1 = (float)y+0.0F+rand.nextFloat()*6.0F/16.0F; - float f2 = (float)z+0.5F; + float f = (float)pos.getX()+0.5F; + float f1 = (float)pos.getY()+0.0F+rand.nextFloat()*6.0F/16.0F; + float f2 = (float)pos.getZ()+0.5F; float f3 = 0.52F; float f4 = rand.nextFloat()*0.6F-0.3F; if(meta == 6){ - world.spawnParticle("smoke", (double)(f-f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", (double)(f-f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)(f-f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.FLAME, (double)(f-f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); } if(meta == 7){ - world.spawnParticle("smoke", (double)(f+f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", (double)(f+f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)(f+f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.FLAME, (double)(f+f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); } if(meta == 4){ - world.spawnParticle("smoke", (double)(f+f4), (double)f1, (double)(f2-f3), 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", (double)(f+f4), (double)f1, (double)(f2-f3), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)(f+f4), (double)f1, (double)(f2-f3), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.FLAME, (double)(f+f4), (double)f1, (double)(f2-f3), 0.0D, 0.0D, 0.0D); } if(meta == 5){ - world.spawnParticle("smoke", (double)(f+f4), (double)f1, (double)(f2+f3), 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", (double)(f+f4), (double)f1, (double)(f2+f3), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)(f+f4), (double)f1, (double)(f2+f3), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.FLAME, (double)(f+f4), (double)f1, (double)(f2+f3), 0.0D, 0.0D, 0.0D); } for(int i = 0; i < 5; i++){ - world.spawnParticle(ClientProxy.bulletForMyValentine ? "heart" : "smoke", (double)x+0.5F, (double)y+1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D); + world.spawnParticle(ClientProxy.bulletForMyValentine ? EnumParticleTypes.HEART : EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX()+0.5F, (double)pos.getY()+1.0F, (double)pos.getZ()+0.5F, 0.0D, 0.0D, 0.0D); } } } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityFurnaceDouble furnace = (TileEntityFurnaceDouble)world.getTileEntity(x, y, z); + TileEntityFurnaceDouble furnace = (TileEntityFurnaceDouble)world.getTileEntity(pos); if(furnace != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FURNACE_DOUBLE.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FURNACE_DOUBLE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } @@ -132,47 +98,39 @@ public class BlockFurnaceDouble extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - this.onIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"On"); - this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front"); - } - - @Override - public int getLightValue(IBlockAccess world, int x, int y, int z){ - return world.getBlockMetadata(x, y, z) > 3 ? 12 : 0; + public int getLightValue(IBlockAccess world, BlockPos pos){ + return Position.fromBlockPos(pos).getMetadata(world) > 3 ? 12 : 0; } @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.uncommon; + return EnumRarity.UNCOMMON; } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; + Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - world.setBlockMetadataWithNotify(x, y, z, 0, 2); + thePos.setMetadata(world, 0, 2); } if(rotation == 1){ - world.setBlockMetadataWithNotify(x, y, z, 3, 2); + thePos.setMetadata(world, 3, 2); } if(rotation == 2){ - world.setBlockMetadataWithNotify(x, y, z, 1, 2); + thePos.setMetadata(world, 1, 2); } if(rotation == 3){ - world.setBlockMetadataWithNotify(x, y, z, 2, 2); + thePos.setMetadata(world, 2, 2); } - super.onBlockPlacedBy(world, x, y, z, player, stack); + super.onBlockPlacedBy(world, pos, state, player, stack); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java index a1d680007..0e4621239 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java @@ -14,15 +14,10 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockFurnaceSolar extends BlockContainerBase{ @@ -40,20 +35,9 @@ public class BlockFurnaceSolar extends BlockContainerBase{ return new TileEntityFurnaceSolar(); } - @Override - public boolean renderAsNormalBlock(){ - return false; - } - @Override public int getRenderType(){ - return AssetUtil.furnaceSolarRenderId; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return this.blockIcon; + return AssetUtil.TESR_RENDER_ID; } @Override @@ -61,14 +45,8 @@ public class BlockFurnaceSolar extends BlockContainerBase{ return false; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = Blocks.daylight_detector.getIcon(0, 0); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.uncommon; + return EnumRarity.UNCOMMON; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java index cdd4ee43f..a1a584a64 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java @@ -11,14 +11,9 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockGeneric extends BlockBase{ @@ -30,20 +25,8 @@ public class BlockGeneric extends BlockBase{ this.setStepSound(soundTypeStone); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.common; + return EnumRarity.COMMON; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java index 3f724c3c9..db6347c23 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java @@ -12,15 +12,11 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGreenhouseGlass; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Facing; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; +import net.minecraft.util.EnumWorldBlockLayer; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -35,22 +31,10 @@ public class BlockGreenhouseGlass extends BlockContainerBase{ this.setStepSound(soundTypeStone); } - @Override - public boolean renderAsNormalBlock(){ - return false; - } - @Override @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int meta){ - return world.getBlockMetadata(x, y, z) != world.getBlockMetadata(x-Facing.offsetsXForSide[meta], y-Facing.offsetsYForSide[meta], z-Facing.offsetsZForSide[meta]) || (world.getBlock(x, y, z) != this && super.shouldSideBeRendered(world, x, y, z, meta)); - - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return this.blockIcon; + public EnumWorldBlockLayer getBlockLayer(){ + return EnumWorldBlockLayer.CUTOUT; } @Override @@ -58,21 +42,9 @@ public class BlockGreenhouseGlass extends BlockContainerBase{ return false; } - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass(){ - return 0; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java index 469619f14..a41a09f55 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java @@ -10,20 +10,21 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; @@ -34,12 +35,6 @@ import java.util.Random; public class BlockGrinder extends BlockContainerBase{ private final boolean isDouble; - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon onIcon; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; public BlockGrinder(boolean isDouble, String name){ super(Material.rock, name); @@ -58,40 +53,26 @@ public class BlockGrinder extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 1 && meta != 1){ - return this.topIcon; - } - if(side == 1){ - return this.onIcon; - } - if(side == 0){ - return this.bottomIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, int x, int y, int z, Random rand){ - int meta = world.getBlockMetadata(x, y, z); + public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ + Position thePos = Position.fromBlockPos(pos); + int meta = thePos.getMetadata(world); if(meta == 1){ for(int i = 0; i < 5; i++){ double xRand = rand.nextDouble()/0.75D-0.5D; double zRand = rand.nextDouble()/0.75D-0.5D; - world.spawnParticle("crit", (double)x+0.4F, (double)y+0.8F, (double)z+0.4F, xRand, 0.5D, zRand); + world.spawnParticle(EnumParticleTypes.CRIT, (double)pos.getX()+0.4F, (double)pos.getY()+0.8F, (double)pos.getZ()+0.4F, xRand, 0.5D, zRand); } - world.spawnParticle(ClientProxy.bulletForMyValentine ? "heart" : "smoke", (double)x+0.5F, (double)y+1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D); + world.spawnParticle(ClientProxy.bulletForMyValentine ? EnumParticleTypes.HEART : EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX()+0.5F, (double)pos.getY()+1.0F, (double)pos.getZ()+0.5F, 0.0D, 0.0D, 0.0D); } } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityGrinder grinder = (TileEntityGrinder)world.getTileEntity(x, y, z); + TileEntityGrinder grinder = (TileEntityGrinder)world.getTileEntity(pos); if(grinder != null){ - player.openGui(ActuallyAdditions.instance, this.isDouble ? GuiHandler.GuiTypes.GRINDER_DOUBLE.ordinal() : GuiHandler.GuiTypes.GRINDER.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, this.isDouble ? GuiHandler.GuiTypes.GRINDER_DOUBLE.ordinal() : GuiHandler.GuiTypes.GRINDER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } @@ -99,27 +80,18 @@ public class BlockGrinder extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockGrinderTop"); - this.onIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockGrinderOn"); - this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockGrinderBottom"); - } - - @Override - public int getLightValue(IBlockAccess world, int x, int y, int z){ - return world.getBlockMetadata(x, y, z) == 1 ? 12 : 0; + public int getLightValue(IBlockAccess world, BlockPos pos){ + return Position.fromBlockPos(pos).getMetadata(world) == 1 ? 12 : 0; } @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java index a7cc060b5..cc02ddf0f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java @@ -12,24 +12,14 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockHeatCollector extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockHeatCollector(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -43,22 +33,8 @@ public class BlockHeatCollector extends BlockContainerBase{ return new TileEntityHeatCollector(); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Side"); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.uncommon; + return EnumRarity.UNCOMMON; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java index 97bd26111..3b37177b0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; @@ -21,15 +22,14 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockInputter extends BlockContainerBase{ @@ -53,17 +53,11 @@ public class BlockInputter extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityInputter inputter = (TileEntityInputter)world.getTileEntity(x, y, z); + TileEntityInputter inputter = (TileEntityInputter)world.getTileEntity(pos); if(inputter != null){ - player.openGui(ActuallyAdditions.instance, this.isAdvanced ? GuiHandler.GuiTypes.INPUTTER_ADVANCED.ordinal() : GuiHandler.GuiTypes.INPUTTER.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, this.isAdvanced ? GuiHandler.GuiTypes.INPUTTER_ADVANCED.ordinal() : GuiHandler.GuiTypes.INPUTTER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } @@ -71,21 +65,15 @@ public class BlockInputter extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ + public void breakBlock(World world, BlockPos pos, IBlockState state){ if(!world.isRemote){ - TileEntity aTile = world.getTileEntity(x, y, z); + TileEntity aTile = world.getTileEntity(pos); if(aTile instanceof TileEntityInventoryBase){ TileEntityInventoryBase tile = (TileEntityInventoryBase)aTile; - this.dropSlotFromInventory(0, tile, world, x, y, z); + this.dropSlotFromInventory(0, tile, world, Position.fromBlockPos(pos)); } } - super.breakBlock(world, x, y, z, block, par6); + super.breakBlock(world, pos, state); } @Override @@ -95,7 +83,7 @@ public class BlockInputter extends BlockContainerBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } public static class TheItemBlock extends ItemBlockBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index f3f1eae2d..a583e605b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -47,7 +47,7 @@ public class BlockLaserRelay extends BlockContainerBase{ @Override public int getRenderType(){ - return AssetUtil.laserRelayRenderId; + return AssetUtil.TESR_RENDER_ID; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java index f6fb71e7c..a67f97a10 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java @@ -18,13 +18,11 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.profiler.Profiler; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; @@ -32,9 +30,6 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class BlockLavaFactoryController extends BlockContainerBase implements IHudDisplay{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - public BlockLavaFactoryController(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -48,35 +43,22 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IH return new TileEntityLavaFactoryController(); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return side == 1 ? this.topIcon : this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override @SideOnly(Side.CLIENT) public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, MovingObjectPosition posHit, Profiler profiler, ScaledResolution resolution){ - TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController)minecraft.theWorld.getTileEntity(posHit.blockX, posHit.blockY, posHit.blockZ); + TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController)minecraft.theWorld.getTileEntity(posHit.getBlockPos()); if(factory != null){ int state = factory.isMultiblock(); if(state == TileEntityLavaFactoryController.NOT_MULTI){ - StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.notPart.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE, true); + StringUtil.drawSplitString(minecraft.fontRendererObj, StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.notPart.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE, true); } else if(state == TileEntityLavaFactoryController.HAS_AIR || state == TileEntityLavaFactoryController.HAS_LAVA){ - StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.works.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE, true); + StringUtil.drawSplitString(minecraft.fontRendererObj, StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.works.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE, true); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java index 72f956051..0ccf8fea9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java @@ -10,27 +10,19 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLeafGenerator; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockLeafGenerator extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockLeafGenerator(String name){ super(Material.iron, name); this.setHarvestLevel("pickaxe", 0); @@ -44,28 +36,14 @@ public class BlockLeafGenerator extends BlockContainerBase{ return new TileEntityLeafGenerator(); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java index 009a12460..0ae6f218a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java @@ -14,15 +14,10 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBooster; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockPhantomBooster extends BlockContainerBase{ @@ -37,20 +32,9 @@ public class BlockPhantomBooster extends BlockContainerBase{ this.setBlockBounds(3*f, 0F, 3*f, 1-3*f, 1F, 1-3*f); } - @Override - public boolean renderAsNormalBlock(){ - return false; - } - @Override public int getRenderType(){ - return AssetUtil.phantomBoosterRenderId; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return this.blockIcon; + return AssetUtil.TESR_RENDER_ID; } @Override @@ -58,15 +42,9 @@ public class BlockPhantomBooster extends BlockContainerBase{ return false; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = Blocks.lapis_block.getIcon(0, 0); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java index 1e32fd25f..13d782493 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java @@ -10,22 +10,20 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockRangedCollector extends BlockContainerBase{ @@ -43,45 +41,33 @@ public class BlockRangedCollector extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityRangedCollector breaker = (TileEntityRangedCollector)world.getTileEntity(x, y, z); + TileEntityRangedCollector breaker = (TileEntityRangedCollector)world.getTileEntity(pos); if(breaker != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.RANGED_COLLECTOR.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.RANGED_COLLECTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ + public void breakBlock(World world, BlockPos pos, IBlockState state){ if(!world.isRemote){ - TileEntity aTile = world.getTileEntity(x, y, z); + TileEntity aTile = world.getTileEntity(pos); if(aTile instanceof TileEntityRangedCollector){ TileEntityRangedCollector tile = (TileEntityRangedCollector)aTile; for(int i = 0; i < TileEntityRangedCollector.WHITELIST_START; i++){ - this.dropSlotFromInventory(i, tile, world, x, y, z); + this.dropSlotFromInventory(i, tile, world, Position.fromBlockPos(pos)); } } } - super.breakBlock(world, x, y, z, block, par6); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java index 30e1db521..78e8389be 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; @@ -17,19 +18,15 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.Util; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; +import net.minecraft.util.*; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; @@ -48,20 +45,9 @@ public class BlockSmileyCloud extends BlockContainerBase{ this.setTickRandomly(true); } - @Override - public boolean renderAsNormalBlock(){ - return false; - } - @Override public int getRenderType(){ - return AssetUtil.smileyCloudRenderId; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return this.blockIcon; + return AssetUtil.TESR_RENDER_ID; } @Override @@ -71,23 +57,23 @@ public class BlockSmileyCloud extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, int x, int y, int z, Random rand){ + public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ if(Util.RANDOM.nextInt(30) == 0){ for(int i = 0; i < 2; i++){ double d = Util.RANDOM.nextGaussian()*0.02D; double d1 = Util.RANDOM.nextGaussian()*0.02D; double d2 = Util.RANDOM.nextGaussian()*0.02D; - world.spawnParticle("heart", x+Util.RANDOM.nextFloat(), y+0.65+Util.RANDOM.nextFloat(), z+Util.RANDOM.nextFloat(), d, d1, d2); + world.spawnParticle(EnumParticleTypes.HEART, pos.getX()+Util.RANDOM.nextFloat(), pos.getY()+0.65+Util.RANDOM.nextFloat(), pos.getZ()+Util.RANDOM.nextFloat(), d, d1, d2); } } } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int f6, float f7, float f8, float f9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing f6, float f7, float f8, float f9){ if(!world.isRemote){ - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntitySmileyCloud){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CLOUD.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CLOUD.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); player.triggerAchievement(TheAchievements.NAME_SMILEY_CLOUD.ach); } @@ -96,14 +82,14 @@ public class BlockSmileyCloud extends BlockContainerBase{ } @Override - public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB axis, List list, Entity entity){ - this.setBlockBoundsBasedOnState(world, x, y, z); - super.addCollisionBoxesToList(world, x, y, z, axis, list, entity); + public void addCollisionBoxesToList(World world, BlockPos pos, IBlockState state, AxisAlignedBB axis, List list, Entity entity){ + this.setBlockBoundsBasedOnState(world, pos); + super.addCollisionBoxesToList(world, pos, state, axis, list, entity); } @Override - public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z){ - int meta = world.getBlockMetadata(x, y, z); + public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos){ + int meta = Position.fromBlockPos(pos).getMetadata(world); float f = 0.0625F; if(meta == 0){ @@ -120,45 +106,40 @@ public class BlockSmileyCloud extends BlockContainerBase{ } } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = Blocks.wool.getIcon(0, 0); - } - @Override public TileEntity createNewTileEntity(World world, int meta){ return new TileEntitySmileyCloud(); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; + Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - world.setBlockMetadataWithNotify(x, y, z, 2, 2); + thePos.setMetadata(world, 0, 2); } if(rotation == 1){ - world.setBlockMetadataWithNotify(x, y, z, 1, 2); + thePos.setMetadata(world, 3, 2); } if(rotation == 2){ - world.setBlockMetadataWithNotify(x, y, z, 0, 2); + thePos.setMetadata(world, 1, 2); } if(rotation == 3){ - world.setBlockMetadataWithNotify(x, y, z, 3, 2); + thePos.setMetadata(world, 2, 2); } - super.onBlockPlacedBy(world, x, y, z, player, stack); + super.onBlockPlacedBy(world, pos, state, player, stack); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java index b63725a8d..61bfc0d7f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java @@ -11,13 +11,13 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot; import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -25,10 +25,7 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; -import net.minecraft.util.WeightedRandom; -import net.minecraft.world.IBlockAccess; +import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -37,13 +34,6 @@ import java.util.Random; public class BlockTreasureChest extends BlockBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - @SideOnly(Side.CLIENT) - private IIcon frontIcon; - public BlockTreasureChest(String name){ super(Material.wood, name); this.setHarvestLevel("axe", 0); @@ -55,58 +45,27 @@ public class BlockTreasureChest extends BlockBase{ @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ - int meta = world.getBlockMetadata(x, y, z); - if(side == 1){ - return this.topIcon; - } - if(side == meta+2){ - return this.frontIcon; - } - if(side == 0){ - return this.bottomIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 1){ - return this.topIcon; - } - if(side == 0){ - return this.bottomIcon; - } - if(side == 3){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, int x, int y, int z, Random rand){ + public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ for(int i = 0; i < 2; i++){ for(float f = 0; f <= 3; f += 0.5){ float particleX = rand.nextFloat(); float particleZ = rand.nextFloat(); - world.spawnParticle("bubble", (double)x+particleX, (double)y+f+1, (double)z+particleZ, 0.0D, 0.2D, 0.0D); + world.spawnParticle(EnumParticleTypes.WATER_BUBBLE, (double)pos.getX()+particleX, (double)pos.getY()+f+1, (double)pos.getZ()+particleZ, 0.0D, 0.2D, 0.0D); } } } @Override - public Item getItemDropped(int par1, Random rand, int par3){ + public Item getItemDropped(IBlockState state, Random rand, int par3){ return null; } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ world.playSoundAtEntity(player, "random.chestopen", 0.2F, Util.RANDOM.nextFloat()*0.1F+0.9F); - this.dropItems(world, x, y, z); - world.setBlockToAir(x, y, z); + this.dropItems(world, Position.fromBlockPos(pos)); + world.setBlockToAir(pos); player.triggerAchievement(TheAchievements.OPEN_TREASURE_CHEST.ach); } @@ -119,42 +78,34 @@ public class BlockTreasureChest extends BlockBase{ } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; + Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - world.setBlockMetadataWithNotify(x, y, z, 0, 2); + thePos.setMetadata(world, 0, 2); } if(rotation == 1){ - world.setBlockMetadataWithNotify(x, y, z, 3, 2); + thePos.setMetadata(world, 3, 2); } if(rotation == 2){ - world.setBlockMetadataWithNotify(x, y, z, 1, 2); + thePos.setMetadata(world, 1, 2); } if(rotation == 3){ - world.setBlockMetadataWithNotify(x, y, z, 2, 2); + thePos.setMetadata(world, 2, 2); } } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom"); - this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front"); - } - - private void dropItems(World world, int x, int y, int z){ + private void dropItems(World world, Position pos){ for(int i = 0; i < MathHelper.getRandomIntegerInRange(Util.RANDOM, 3, 6); i++){ - TreasureChestLoot theReturn = (TreasureChestLoot)WeightedRandom.getRandomItem(Util.RANDOM, ActuallyAdditionsAPI.treasureChestLoot); + TreasureChestLoot theReturn = WeightedRandom.getRandomItem(Util.RANDOM, ActuallyAdditionsAPI.treasureChestLoot); ItemStack itemStack = theReturn.returnItem.copy(); itemStack.stackSize = MathHelper.getRandomIntegerInRange(Util.RANDOM, theReturn.minAmount, theReturn.maxAmount); float dX = Util.RANDOM.nextFloat()*0.8F+0.1F; float dY = Util.RANDOM.nextFloat()*0.8F+0.1F; float dZ = Util.RANDOM.nextFloat()*0.8F+0.1F; - EntityItem entityItem = new EntityItem(world, x+dX, y+dY, z+dZ, itemStack.copy()); + EntityItem entityItem = new EntityItem(world, pos.getX()+dX, pos.getY()+dY, pos.getZ()+dZ, itemStack.copy()); if(itemStack.hasTagCompound()){ entityItem.getEntityItem().setTagCompound((NBTTagCompound)itemStack.getTagCompound().copy()); } @@ -169,6 +120,6 @@ public class BlockTreasureChest extends BlockBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java index 8d908eaed..fa8173121 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java @@ -10,41 +10,33 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockFluidFlowing extends BlockFluidClassic{ - @SideOnly(Side.CLIENT) - public IIcon stillIcon; - @SideOnly(Side.CLIENT) - public IIcon flowingIcon; - private String name; public BlockFluidFlowing(Fluid fluid, Material material, String unlocalizedName){ super(fluid, material); this.name = unlocalizedName; - this.setRenderPass(1); displacements.put(this, false); this.register(); } private void register(){ - this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); + this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName()); if(this.shouldAddCreative()){ this.setCreativeTab(CreativeTab.instance); @@ -67,30 +59,16 @@ public class BlockFluidFlowing extends BlockFluidClassic{ } @Override - public boolean canDisplace(IBlockAccess world, int x, int y, int z){ - return !world.getBlock(x, y, z).getMaterial().isLiquid() && super.canDisplace(world, x, y, z); + public boolean canDisplace(IBlockAccess world, BlockPos pos){ + return !Position.fromBlockPos(pos).getMaterial(world).isLiquid() && super.canDisplace(world, pos); } @Override - public boolean displaceIfPossible(World world, int x, int y, int z){ - return !world.getBlock(x, y, z).getMaterial().isLiquid() && super.displaceIfPossible(world, x, y, z); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return side <= 1 ? this.stillIcon : this.flowingIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.stillIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Still"); - this.flowingIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Flowing"); - this.definedFluid.setIcons(this.stillIcon, this.flowingIcon); + public boolean displaceIfPossible(World world, BlockPos pos){ + return !Position.fromBlockPos(pos).getMaterial(world).isLiquid() && super.displaceIfPossible(world, pos); } public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java index 03d5e7839..34a7de202 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java @@ -13,17 +13,15 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.BlockCrops; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.Random; @@ -32,8 +30,6 @@ public class BlockPlant extends BlockCrops{ public Item seedItem; public Item returnItem; public int returnMeta; - @SideOnly(Side.CLIENT) - private IIcon[] textures; private int stages; private String name; private int minDropAmount; @@ -49,7 +45,7 @@ public class BlockPlant extends BlockCrops{ } private void register(){ - this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); + this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName()); if(this.shouldAddCreative()){ this.setCreativeTab(CreativeTab.instance); @@ -72,64 +68,41 @@ public class BlockPlant extends BlockCrops{ } public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override - public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z){ + public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos){ return EnumPlantType.Crop; } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(meta < 7){ - if(meta == 6){ - meta = 5; - } - return this.textures[meta >> 1]; - } - else{ - return this.textures[this.textures.length-1]; - } - } - - @Override - public Item func_149866_i(){ + public Item getSeed(){ return this.seedItem; } @Override - public Item func_149865_P(){ + public Item getCrop(){ return this.returnItem; } @Override - public Item getItemDropped(int meta, Random rand, int par3){ - return meta >= 7 ? this.func_149865_P() : this.func_149866_i(); + public Item getItemDropped(IBlockState state, Random rand, int par3){ + return this.getMetaFromState(state) >= 7 ? this.getCrop() : this.getSeed(); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.textures = new IIcon[this.stages]; - for(int i = 0; i < this.textures.length; i++){ - textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Stage"+(i+1)); - } + public int damageDropped(IBlockState state){ + return this.getMetaFromState(state) >= 7 ? this.returnMeta : 0; } @Override - public int damageDropped(int meta){ - return meta >= 7 ? this.returnMeta : 0; - } - - @Override - public int getDamageValue(World world, int x, int y, int z){ + public int getDamageValue(World world, BlockPos pos){ return 0; } @Override - public int quantityDropped(int meta, int fortune, Random random){ - return meta >= 7 ? random.nextInt(addDropAmount)+minDropAmount : super.quantityDropped(meta, fortune, random); + public int quantityDropped(IBlockState state, int fortune, Random random){ + return this.getMetaFromState(state) >= 7 ? random.nextInt(addDropAmount)+minDropAmount : super.quantityDropped(state, fortune, random); } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java index 64dcdf922..1c23efebf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java @@ -10,14 +10,8 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.world.IBlockAccess; -import net.minecraftforge.fml.client.registry.ISimpleBlockRenderingHandler; -import org.lwjgl.opengl.GL11; - -public class RenderInventory implements ISimpleBlockRenderingHandler{ +//TODO Fix the rendering handler +public class RenderInventory{ private RenderTileEntity tileRender; private int renderID; @@ -27,7 +21,7 @@ public class RenderInventory implements ISimpleBlockRenderingHandler{ this.renderID = renderID; } - @Override + /*@Override public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer){ GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(this.tileRender.resLoc); @@ -50,5 +44,5 @@ public class RenderInventory implements ISimpleBlockRenderingHandler{ @Override public int getRenderId(){ return this.renderID; - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java index 295849a27..4a14f1af7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; @@ -21,7 +22,7 @@ import org.lwjgl.opengl.GL11; public class RenderReconstructorLens extends TileEntitySpecialRenderer{ @Override - public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5){ + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int par6){ if(!(tile instanceof TileEntityAtomicReconstructor)){ return; } @@ -32,7 +33,7 @@ public class RenderReconstructorLens extends TileEntitySpecialRenderer{ GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - int meta = tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord); + int meta = Position.fromTileEntity(tile).getMetadata(getWorld()); if(meta == 0){ GL11.glTranslatef(0F, -0.5F, 0F); GL11.glTranslatef(-0.25F, 0F, -0.25F); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java index 9beb433f5..a67fbfeb7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/JamVillagerTradeHandler.java @@ -18,13 +18,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MathHelper; import net.minecraft.village.MerchantRecipe; import net.minecraft.village.MerchantRecipeList; -import net.minecraftforge.fml.common.registry.VillagerRegistry; import net.minecraftforge.oredict.OreDictionary; import java.util.ArrayList; import java.util.Random; -public class JamVillagerTradeHandler implements VillagerRegistry.IVillageTradeHandler{ +//TODO Fix the villager +public class JamVillagerTradeHandler{ private ArrayList trades = new ArrayList(); @@ -41,7 +41,7 @@ public class JamVillagerTradeHandler implements VillagerRegistry.IVillageTradeHa } public void addWants(String oredictName, int minSize, int maxSize){ - ArrayList stacks = (ArrayList)OreDictionary.getOres(oredictName, false); + ArrayList stacks = (ArrayList)OreDictionary.getOres(oredictName); trades.add(new Trade(stacks, minSize, maxSize)); } @@ -49,7 +49,8 @@ public class JamVillagerTradeHandler implements VillagerRegistry.IVillageTradeHa trades.add(new Trade(stack, minSize, maxSize)); } - @Override + //TODO Fix the Villager + //@Override @SuppressWarnings("all") public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random rand){ for(int trade = 0; trade < trades.size(); trade++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java index 100336929..d28356719 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java @@ -21,7 +21,6 @@ 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 net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -61,8 +60,8 @@ public class ContainerEnergizer extends Container{ @Override @SideOnly(Side.CLIENT) - public IIcon getBackgroundIconIndex(){ - return ItemArmor.func_94602_b(finalI); + public String getSlotTexture(){ + return ItemArmor.EMPTY_SLOT_NAMES[finalI]; } }); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java index 5b16f26fd..95829c910 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java @@ -21,7 +21,6 @@ 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 net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -61,8 +60,8 @@ public class ContainerEnervator extends Container{ @Override @SideOnly(Side.CLIENT) - public IIcon getBackgroundIconIndex(){ - return ItemArmor.func_94602_b(finalI); + public String getSlotTexture(){ + return ItemArmor.EMPTY_SLOT_NAMES[finalI]; } }); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java index 60f4efc9d..7baf5e9d5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java @@ -11,13 +11,8 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemBattery extends ItemEnergy{ @@ -28,18 +23,6 @@ public class ItemBattery extends ItemEnergy{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.RARE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java index 055baebc6..e1e274493 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java @@ -10,22 +10,20 @@ package de.ellpeck.actuallyadditions.mod.items; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockChest; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemChestToCrateUpgrade extends ItemBase{ @@ -34,10 +32,11 @@ public class ItemChestToCrateUpgrade extends ItemBase{ } @Override - public boolean onItemUse(ItemStack heldStack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10){ + public boolean onItemUse(ItemStack heldStack, EntityPlayer player, World world, BlockPos pos, EnumFacing facing, float par8, float par9, float par10){ if(player.isSneaking()){ - TileEntity tileHit = world.getTileEntity(x, y, z); - if(world.getBlock(x, y, z) instanceof BlockChest && tileHit instanceof TileEntityChest){ + TileEntity tileHit = world.getTileEntity(pos); + Block block = Position.fromBlockPos(pos).getBlock(world); + if(block instanceof BlockChest && tileHit instanceof TileEntityChest){ if(!world.isRemote){ TileEntityChest chest = (TileEntityChest)tileHit; @@ -52,11 +51,11 @@ public class ItemChestToCrateUpgrade extends ItemBase{ } //Set New Block - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(world.getBlock(x, y, z))+(world.getBlockMetadata(x, y, z) << 12)); - world.setBlock(x, y, z, InitBlocks.blockGiantChest, 0, 2); + world.playAuxSFX(2001, pos, Block.getIdFromBlock(block)+(Position.fromBlockPos(pos).getMetadata(world) << 12)); + Position.fromBlockPos(pos).setBlock(world, InitBlocks.blockGiantChest, 0, 2); //Copy Items into new Chest - TileEntity newTileHit = world.getTileEntity(x, y, z); + TileEntity newTileHit = world.getTileEntity(pos); if(newTileHit instanceof TileEntityGiantChest){ TileEntityGiantChest newChest = (TileEntityGiantChest)newTileHit; for(int i = 0; i < stacks.length; i++){ @@ -76,24 +75,11 @@ public class ItemChestToCrateUpgrade extends ItemBase{ } } - return super.onItemUse(heldStack, player, world, x, y, z, par7, par8, par9, par10); + return super.onItemUse(heldStack, player, world, pos, facing, par8, par9, par10); } @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } - } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java index ab5e0baf8..58400ae70 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java @@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.EnumAction; @@ -28,12 +27,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; import net.minecraft.util.StringUtils; import net.minecraft.world.World; import net.minecraftforge.fml.common.Loader; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; @@ -77,9 +73,9 @@ public class ItemCoffee extends ItemFoodBase{ } @Override - public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player){ + public ItemStack onItemUseFinish(ItemStack stack, World world, EntityPlayer player){ ItemStack theStack = stack.copy(); - super.onEaten(stack, world, player); + super.onItemUseFinish(stack, world, player); applyPotionEffectsFromStack(stack, player); theStack.setItemDamage(theStack.getItemDamage()+1); if(theStack.getMaxDamage()-theStack.getItemDamage() < 0){ @@ -101,13 +97,7 @@ public class ItemCoffee extends ItemFoodBase{ @Override public EnumAction getItemUseAction(ItemStack stack){ - return EnumAction.drink; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1){ - return this.itemIcon; + return EnumAction.DRINK; } @Override @@ -136,13 +126,7 @@ public class ItemCoffee extends ItemFoodBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); + return EnumRarity.RARE; } public static class MilkIngredient extends CoffeeIngredient{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java index 665bc602c..9e65ea4f8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java @@ -11,13 +11,8 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemCoffeeBean extends ItemFoodBase{ @@ -28,18 +23,6 @@ public class ItemCoffeeBean extends ItemFoodBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.RARE; } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java index 8fc4f5075..37021dbf2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java @@ -12,8 +12,8 @@ package de.ellpeck.actuallyadditions.mod.items; import cofh.api.energy.IEnergyContainerItem; import com.google.common.collect.Multimap; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; @@ -22,7 +22,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; @@ -37,8 +37,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; -import net.minecraft.util.IIcon; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; @@ -54,8 +55,6 @@ public class ItemDrill extends ItemEnergy{ private static final int ENERGY_USE = 100; private static final int HARVEST_LEVEL = 4; - @SideOnly(Side.CLIENT) - private IIcon[] allDemDamnIconsMaan; public ItemDrill(String name){ super(500000, 5000, name); @@ -72,15 +71,9 @@ public class ItemDrill extends ItemEnergy{ this.setHarvestLevel("pickaxe", HARVEST_LEVEL); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1){ - return par1 >= this.allDemDamnIconsMaan.length ? null : this.allDemDamnIconsMaan[par1]; - } - @Override //Places Blocks if the Placing Upgrade is installed - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int hitSide, float hitX, float hitY, float hitZ){ + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ){ ItemStack upgrade = this.getHasUpgradeAsStack(stack, ItemDrillUpgrade.UpgradeType.PLACER); if(upgrade != null){ int slot = ItemDrillUpgrade.getSlotToPlaceFrom(upgrade); @@ -92,7 +85,7 @@ public class ItemDrill extends ItemEnergy{ //tryPlaceItemIntoWorld could throw an Exception try{ //Places the Block into the World - if(equip.tryPlaceItemIntoWorld(player, world, x, y, z, hitSide, hitX, hitY, hitZ)){ + if(equip.onItemUse(player, world, pos, side, hitX, hitY, hitZ)){ if(!player.capabilities.isCreativeMode){ player.inventory.setInventorySlotContents(slot, equip.stackSize <= 0 ? null : equip.copy()); } @@ -104,7 +97,7 @@ public class ItemDrill extends ItemEnergy{ //Notify the Player and log the Exception catch(Exception e){ player.addChatComponentMessage(new ChatComponentText("Ouch! That really hurt! You must have done something wrong, don't do that again please!")); - ModUtil.LOGGER.error("Player "+player.getCommandSenderName()+" who should place a Block using a Drill at "+player.posX+", "+player.posY+", "+player.posZ+" in World "+world.provider.dimensionId+" threw an Exception! Don't let that happen again!"); + ModUtil.LOGGER.error("Player "+player.getName()+" who should place a Block using a Drill at "+player.posX+", "+player.posY+", "+player.posZ+" in World "+world.provider.getDimensionId()+" threw an Exception! Don't let that happen again!"); } } else{ @@ -216,32 +209,23 @@ public class ItemDrill extends ItemEnergy{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.allDemDamnIconsMaan = new IIcon[16]; - for(int i = 0; i < this.allDemDamnIconsMaan.length; i++){ - this.allDemDamnIconsMaan[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+TheColoredLampColors.values()[i].name); - } + return EnumRarity.EPIC; } @Override public Multimap getAttributeModifiers(ItemStack stack){ Multimap map = super.getAttributeModifiers(stack); - map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Drill Modifier", this.getEnergyStored(stack) >= ENERGY_USE ? 8.0F : 0.1F, 0)); + map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(itemModifierUUID, "Drill Modifier", this.getEnergyStored(stack) >= ENERGY_USE ? 8.0F : 0.1F, 0)); return map; } @Override - public float getDigSpeed(ItemStack stack, Block block, int meta){ - return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) ? (this.hasExtraWhitelist(block) || block.getHarvestTool(meta) == null || block.getHarvestTool(meta).isEmpty() || this.getToolClasses(stack).contains(block.getHarvestTool(meta)) ? this.getEfficiencyFromUpgrade(stack) : 1.0F) : 0.1F; + public float getDigSpeed(ItemStack stack, IBlockState state){ + return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) ? (this.hasExtraWhitelist(state.getBlock()) || state.getBlock().getHarvestTool(state) == null || state.getBlock().getHarvestTool(state).isEmpty() || this.getToolClasses(stack).contains(state.getBlock().getHarvestTool(state)) ? this.getEfficiencyFromUpgrade(stack) : 1.0F) : 0.1F; } @Override - public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player){ + public boolean onBlockStartBreak(ItemStack stack, BlockPos pos, EntityPlayer player){ boolean toReturn = false; int use = this.getEnergyUsePerBlock(stack); if(this.getEnergyStored(stack) >= use){ @@ -258,14 +242,14 @@ public class ItemDrill extends ItemEnergy{ //Breaks the Blocks if(!player.isSneaking() && this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.THREE_BY_THREE)){ if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE)){ - toReturn = this.breakBlocks(stack, 2, player.worldObj, x, y, z, player); + toReturn = this.breakBlocks(stack, 2, player.worldObj, pos, player); } else{ - toReturn = this.breakBlocks(stack, 1, player.worldObj, x, y, z, player); + toReturn = this.breakBlocks(stack, 1, player.worldObj, pos, player); } } else{ - toReturn = this.breakBlocks(stack, 0, player.worldObj, x, y, z, player); + toReturn = this.breakBlocks(stack, 0, player.worldObj, pos, player); } //Removes Enchantments added above @@ -353,7 +337,7 @@ public class ItemDrill extends ItemEnergy{ @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tabs, List list){ - for(int i = 0; i < this.allDemDamnIconsMaan.length; i++){ + for(int i = 0; i < 16; i++){ this.addDrillStack(list, i); } } @@ -427,12 +411,9 @@ public class ItemDrill extends ItemEnergy{ * @param stack The Drill * @param radius The Radius to break Blocks in (0 means only 1 Block will be broken!) * @param world The World - * @param x The X Coord of the main Block to break - * @param y The Y Coord of the main Block to break - * @param z The Z Coord of the main Block to break * @param player The Player who breaks the Blocks */ - public boolean breakBlocks(ItemStack stack, int radius, World world, int x, int y, int z, EntityPlayer player){ + public boolean breakBlocks(ItemStack stack, int radius, World world, BlockPos aPos, EntityPlayer player){ int xRange = radius; int yRange = radius; int zRange = 0; @@ -444,7 +425,7 @@ public class ItemDrill extends ItemEnergy{ } //Corrects Blocks to hit depending on Side of original Block hit - int side = pos.sideHit; + int side = pos.sideHit.ordinal(); if(side == 0 || side == 1){ zRange = radius; yRange = 0; @@ -455,12 +436,12 @@ public class ItemDrill extends ItemEnergy{ } //Not defined later because main Block is getting broken below - float mainHardness = world.getBlock(x, y, z).getBlockHardness(world, x, y, z); + float mainHardness = Position.fromBlockPos(aPos).getBlock(world).getBlockHardness(world, aPos); //Break Middle Block first int use = this.getEnergyUsePerBlock(stack); if(this.getEnergyStored(stack) >= use){ - if(!this.tryHarvestBlock(world, x, y, z, false, stack, player, use)){ + if(!this.tryHarvestBlock(world, Position.fromBlockPos(aPos), false, stack, player, use)){ return false; } } @@ -470,14 +451,15 @@ public class ItemDrill extends ItemEnergy{ //Break Blocks around if(radius > 0 && mainHardness >= 0.2F){ - for(int xPos = x-xRange; xPos <= x+xRange; xPos++){ - for(int yPos = y-yRange; yPos <= y+yRange; yPos++){ - for(int zPos = z-zRange; zPos <= z+zRange; zPos++){ - if(!(x == xPos && y == yPos && z == zPos)){ + for(int xPos = aPos.getX()-xRange; xPos <= aPos.getX()+xRange; xPos++){ + for(int yPos = aPos.getY()-yRange; yPos <= aPos.getY()+yRange; yPos++){ + for(int zPos = aPos.getZ()-zRange; zPos <= aPos.getZ()+zRange; zPos++){ + if(!(aPos.getX() == xPos && aPos.getY() == yPos && aPos.getZ() == zPos)){ if(this.getEnergyStored(stack) >= use){ //Only break Blocks around that are (about) as hard or softer - if(world.getBlock(xPos, yPos, zPos).getBlockHardness(world, xPos, yPos, zPos) <= mainHardness+5.0F){ - this.tryHarvestBlock(world, xPos, yPos, zPos, true, stack, player, use); + Position thePos = new Position(xPos, yPos, zPos); + if(thePos.getBlock(world).getBlockHardness(world, thePos) <= mainHardness+5.0F){ + this.tryHarvestBlock(world, thePos, true, stack, player, use); } } else{ @@ -497,29 +479,26 @@ public class ItemDrill extends ItemEnergy{ * Has to be called on both Server and Client * * @param world The World - * @param xPos The X Position of the Block to break - * @param yPos The Y Position of the Block to break - * @param zPos The Z Position of the Block to break * @param isExtra If the Block is the Block that was looked at when breaking or an additional Block * @param stack The Drill * @param player The Player breaking the Blocks * @param use The Energy that should be extracted per Block */ - private boolean tryHarvestBlock(World world, int xPos, int yPos, int zPos, boolean isExtra, ItemStack stack, EntityPlayer player, int use){ - Block block = world.getBlock(xPos, yPos, zPos); - float hardness = block.getBlockHardness(world, xPos, yPos, zPos); - int meta = world.getBlockMetadata(xPos, yPos, zPos); - boolean canHarvest = (ForgeHooks.canHarvestBlock(block, player, meta) || this.canHarvestBlock(block, stack)) && (!isExtra || this.getDigSpeed(stack, block, meta) > 1.0F); - if(hardness >= 0.0F && (!isExtra || (canHarvest && !block.hasTileEntity(meta)))){ + private boolean tryHarvestBlock(World world, Position pos, boolean isExtra, ItemStack stack, EntityPlayer player, int use){ + Block block = pos.getBlock(world); + float hardness = block.getBlockHardness(world, pos); + int meta = pos.getMetadata(world); + boolean canHarvest = (ForgeHooks.canHarvestBlock(block, player, world, pos) || this.canHarvestBlock(block, stack)) && (!isExtra || this.getDigSpeed(stack, pos.getBlockState(world)) > 1.0F); + if(hardness >= 0.0F && (!isExtra || (canHarvest && !block.hasTileEntity(pos.getBlockState(world))))){ this.extractEnergy(stack, use, false); //Break the Block - return WorldUtil.playerHarvestBlock(world, xPos, yPos, zPos, player); + return WorldUtil.playerHarvestBlock(world, pos, player); } return false; } private boolean hasExtraWhitelist(Block block){ - String name = Block.blockRegistry.getNameForObject(block); + String name = block.getRegistryName(); if(name != null){ for(String list : ConfigValues.drillExtraminingWhitelist){ if(list.equals(name)){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java index 2644fea3b..54088ca7b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java @@ -11,15 +11,10 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemDrillUpgrade extends ItemBase{ @@ -58,18 +53,6 @@ public class ItemDrillUpgrade extends ItemBase{ stack.setTagCompound(compound); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } - public enum UpgradeType{ SPEED, SPEED_II, diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java index 67626e437..0a43ead28 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java @@ -11,16 +11,13 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemDye; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemFertilizer extends ItemBase{ @@ -29,30 +26,18 @@ public class ItemFertilizer extends ItemBase{ } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10){ - if(ItemDye.applyBonemeal(stack, world, x, y, z, player)){ + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float par8, float par9, float par10){ + if(ItemDye.applyBonemeal(stack, world, pos, player)){ if(!world.isRemote){ - world.playAuxSFX(2005, x, y, z, 0); + world.playAuxSFX(2005, pos, 0); } return true; } - return super.onItemUse(stack, player, world, x, y, z, par7, par8, par9, par10); + return super.onItemUse(stack, player, world, pos, side, par8, par9, par10); } @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.RARE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java index 131b9c766..a9c786362 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java @@ -12,10 +12,8 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -23,7 +21,6 @@ import net.minecraft.item.EnumAction; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -33,10 +30,6 @@ import java.util.List; public class ItemFoods extends ItemFoodBase{ public static final TheFoods[] allFoods = TheFoods.values(); - @SideOnly(Side.CLIENT) - public IIcon[] textures; - @SideOnly(Side.CLIENT) - private IIcon iconEllspeck; private static final String ELLSPECK = "ellspeck"; @@ -48,14 +41,14 @@ public class ItemFoods extends ItemFoodBase{ } @Override - public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player){ - ItemStack stackToReturn = super.onEaten(stack, world, player); + public ItemStack onItemUseFinish(ItemStack stack, World world, EntityPlayer player){ + ItemStack stackToReturn = super.onItemUseFinish(stack, world, player); ItemStack returnItem = stack.getItemDamage() >= allFoods.length ? null : allFoods[stack.getItemDamage()].returnItem; if(returnItem != null){ if(!player.inventory.addItemStackToInventory(returnItem.copy())){ if(!world.isRemote){ EntityItem entityItem = new EntityItem(player.worldObj, player.posX, player.posY, player.posZ, returnItem.copy()); - entityItem.delayBeforeCanPickup = 0; + entityItem.setPickupDelay(0); player.worldObj.spawnEntityInWorld(entityItem); } } @@ -70,36 +63,19 @@ public class ItemFoods extends ItemFoodBase{ @Override public EnumAction getItemUseAction(ItemStack stack){ - return stack.getItemDamage() >= allFoods.length ? EnumAction.eat : (allFoods[stack.getItemDamage()].getsDrunken ? EnumAction.drink : EnumAction.eat); + return stack.getItemDamage() >= allFoods.length ? EnumAction.EAT : (allFoods[stack.getItemDamage()].getsDrunken ? EnumAction.DRINK : EnumAction.EAT); } @Override - public int func_150905_g(ItemStack stack){ + public int getHealAmount(ItemStack stack){ return stack.getItemDamage() >= allFoods.length ? 0 : allFoods[stack.getItemDamage()].healAmount; } @Override - public float func_150906_h(ItemStack stack){ + public float getSaturationModifier(ItemStack stack){ return stack.getItemDamage() >= allFoods.length ? 0 : allFoods[stack.getItemDamage()].saturation; } - @Override - public IIcon getIcon(ItemStack stack, int pass){ - return getIconIndex(stack); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconIndex(ItemStack stack){ - int damage = stack.getItemDamage(); - if(damage == TheFoods.BACON.ordinal() && StringUtil.equalsToLowerCase(stack.getDisplayName(), ELLSPECK)){ - return this.iconEllspeck; - } - else{ - return damage >= textures.length ? null : textures[damage]; - } - } - @Override public int getMetadata(int damage){ return damage; @@ -112,7 +88,7 @@ public class ItemFoods extends ItemFoodBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return stack.getItemDamage() >= allFoods.length ? EnumRarity.common : allFoods[stack.getItemDamage()].rarity; + return stack.getItemDamage() >= allFoods.length ? EnumRarity.COMMON : allFoods[stack.getItemDamage()].rarity; } @SuppressWarnings("all") @@ -123,22 +99,12 @@ public class ItemFoods extends ItemFoodBase{ } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.textures = new IIcon[allFoods.length]; - for(int i = 0; i < textures.length; i++){ - textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+allFoods[i].name); - } - this.iconEllspeck = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":itemEllspeck"); - } - @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ if(stack.getItemDamage() == TheFoods.BACON.ordinal() && StringUtil.equalsToLowerCase(stack.getDisplayName(), ELLSPECK)){ String strg = "Yes, this is an ugly texture of bacon with its legs behind its head. This is an homage to Ellpeck, the mod author, being able to put his legs behind his head. Wasn't my idea, so don't judge me."; - list.addAll(Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strg, 200)); + list.addAll(Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strg, 200)); } } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairyBall.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairyBall.java index 20d8707d4..0d4785dc2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairyBall.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairyBall.java @@ -13,18 +13,13 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.Util; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.util.WeightedRandom; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemHairyBall extends ItemBase{ @@ -38,7 +33,7 @@ public class ItemHairyBall extends ItemBase{ ItemStack returnItem = this.getRandomReturnItem(); if(!player.inventory.addItemStackToInventory(returnItem)){ EntityItem entityItem = new EntityItem(player.worldObj, player.posX, player.posY, player.posZ, returnItem); - entityItem.delayBeforeCanPickup = 0; + entityItem.setPickupDelay(0); player.worldObj.spawnEntityInWorld(entityItem); } stack.stackSize--; @@ -53,18 +48,6 @@ public class ItemHairyBall extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java index 0765a01d5..bea7bca7a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java @@ -12,9 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheJams; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -23,7 +21,6 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -33,8 +30,6 @@ import java.util.List; public class ItemJams extends ItemFoodBase{ public static final TheJams[] allJams = TheJams.values(); - @SideOnly(Side.CLIENT) - public IIcon overlayIcon; public ItemJams(String name){ super(0, 0.0F, false, name); @@ -61,18 +56,7 @@ public class ItemJams extends ItemFoodBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return stack.getItemDamage() >= allJams.length ? EnumRarity.common : allJams[stack.getItemDamage()].rarity; - } - - @Override - public boolean requiresMultipleRenderPasses(){ - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamageForRenderPass(int damage, int pass){ - return pass > 0 ? this.overlayIcon : super.getIconFromDamageForRenderPass(damage, pass); + return stack.getItemDamage() >= allJams.length ? EnumRarity.COMMON : allJams[stack.getItemDamage()].rarity; } @SuppressWarnings("all") @@ -84,15 +68,8 @@ public class ItemJams extends ItemFoodBase{ } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.overlayIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Overlay"); - } - - @Override - public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player){ - ItemStack stackToReturn = super.onEaten(stack, world, player); + public ItemStack onItemUseFinish(ItemStack stack, World world, EntityPlayer player){ + ItemStack stackToReturn = super.onItemUseFinish(stack, world, player); if(!world.isRemote && stack.getItemDamage() < allJams.length){ PotionEffect firstEffectToGet = new PotionEffect(allJams[stack.getItemDamage()].firstEffectToGet, 200); @@ -104,7 +81,7 @@ public class ItemJams extends ItemFoodBase{ ItemStack returnItem = new ItemStack(Items.glass_bottle); if(!player.inventory.addItemStackToInventory(returnItem.copy())){ EntityItem entityItem = new EntityItem(player.worldObj, player.posX, player.posY, player.posZ, returnItem.copy()); - entityItem.delayBeforeCanPickup = 0; + entityItem.setPickupDelay(0); player.worldObj.spawnEntityInWorld(entityItem); } } @@ -112,12 +89,12 @@ public class ItemJams extends ItemFoodBase{ } @Override - public int func_150905_g(ItemStack stack){ + public int getHealAmount(ItemStack stack){ return stack.getItemDamage() >= allJams.length ? 0 : allJams[stack.getItemDamage()].healAmount; } @Override - public float func_150906_h(ItemStack stack){ + public float getSaturationModifier(ItemStack stack){ return stack.getItemDamage() >= allJams.length ? 0 : allJams[stack.getItemDamage()].saturation; } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java index fb108cd6e..7cd298423 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemKnife.java @@ -12,15 +12,10 @@ package de.ellpeck.actuallyadditions.mod.items; import com.google.common.collect.Multimap; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemKnife extends ItemBase{ @@ -31,11 +26,6 @@ public class ItemKnife extends ItemBase{ this.setContainerItem(this); } - @Override - public boolean doesContainerItemLeaveCraftingGrid(ItemStack stack){ - return false; - } - @Override public boolean getShareTag(){ return true; @@ -43,20 +33,14 @@ public class ItemKnife extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); + return EnumRarity.EPIC; } @SuppressWarnings("unchecked") @Override public Multimap getAttributeModifiers(ItemStack stack){ Multimap map = super.getAttributeModifiers(stack); - map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Knife Modifier", 3, 0)); + map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(itemModifierUUID, "Knife Modifier", 3, 0)); return map; } @@ -67,10 +51,4 @@ public class ItemKnife extends ItemBase{ theStack.stackSize = 1; return theStack; } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java index a5284f36d..5449e61c2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java @@ -16,15 +16,15 @@ import de.ellpeck.actuallyadditions.mod.misc.LaserRelayConnectionHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -39,17 +39,17 @@ public class ItemLaserWrench extends ItemBase{ } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10){ + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing par7, float par8, float par9, float par10){ if(!world.isRemote){ - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityLaserRelay){ if(ItemPhantomConnector.getStoredPosition(stack) == null){ - ItemPhantomConnector.storeConnection(stack, x, y, z, world); + ItemPhantomConnector.storeConnection(stack, pos.getX(), pos.getY(), pos.getZ(), world); player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".laser.stored.desc"))); } else{ Position savedPos = ItemPhantomConnector.getStoredPosition(stack); - Position otherPos = new Position(x, y, z); + Position otherPos = Position.fromBlockPos(pos); if(ItemPhantomConnector.getStoredWorld(stack) == world && savedPos.getTileEntity(world) instanceof TileEntityLaserRelay && LaserRelayConnectionHandler.getInstance().addConnection(savedPos, otherPos)){ ItemPhantomConnector.clearStorage(stack); @@ -96,18 +96,6 @@ public class ItemLaserWrench extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java index bfe8d9eb7..f017e9776 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java @@ -13,20 +13,15 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.Collections; @@ -49,7 +44,7 @@ public class ItemLeafBlower extends ItemBase{ @Override public EnumAction getItemUseAction(ItemStack stack){ - return EnumAction.bow; + return EnumAction.BOW; } @Override @@ -60,13 +55,7 @@ public class ItemLeafBlower extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return this.isAdvanced ? EnumRarity.epic : EnumRarity.rare; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); + return this.isAdvanced ? EnumRarity.EPIC : EnumRarity.RARE; } @Override @@ -100,9 +89,10 @@ public class ItemLeafBlower extends ItemBase{ for(int reachZ = -rangeSides; reachZ < rangeSides+1; reachZ++){ for(int reachY = (this.isAdvanced ? -rangeSides : -rangeUp); reachY < (this.isAdvanced ? rangeSides : rangeUp)+1; reachY++){ //The current Block to break - Block block = world.getBlock(x+reachX, y+reachY, z+reachZ); - if(block != null && (block instanceof BlockBush || (this.isAdvanced && block.isLeaves(world, x+reachX, y+reachY, z+reachZ)))){ - breakPositions.add(new Position(x+reachX, y+reachY, z+reachZ)); + Position pos = new Position(x+reachX, y+reachY, z+reachZ); + Block block = pos.getBlock(world); + if(block != null && (block instanceof BlockBush || (this.isAdvanced && block.isLeaves(world, pos)))){ + breakPositions.add(pos); } } } @@ -112,17 +102,17 @@ public class ItemLeafBlower extends ItemBase{ Collections.shuffle(breakPositions); Position theCoord = breakPositions.get(0); - Block theBlock = world.getBlock(theCoord.getX(), theCoord.getY(), theCoord.getZ()); + Block theBlock = theCoord.getBlock(world); ArrayList drops = new ArrayList(); - int meta = world.getBlockMetadata(theCoord.getX(), theCoord.getY(), theCoord.getZ()); + int meta = theCoord.getMetadata(world); //Gets all of the Drops the Block should have - drops.addAll(theBlock.getDrops(world, theCoord.getX(), theCoord.getY(), theCoord.getZ(), meta, 0)); + drops.addAll(theBlock.getDrops(world, theCoord, theCoord.getBlockState(world), 0)); //Deletes the Block - world.setBlockToAir(theCoord.getX(), theCoord.getY(), theCoord.getZ()); + world.setBlockToAir(theCoord); //Plays the Breaking Sound - world.playAuxSFX(2001, theCoord.getX(), theCoord.getY(), theCoord.getZ(), Block.getIdFromBlock(theBlock)+(meta << 12)); + world.playAuxSFX(2001, theCoord, Block.getIdFromBlock(theBlock)+(meta << 12)); for(ItemStack theDrop : drops){ //Drops the Items into the World @@ -130,10 +120,4 @@ public class ItemLeafBlower extends ItemBase{ } } } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java index 316180063..0f4422e89 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java @@ -11,19 +11,14 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -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.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; @@ -40,13 +35,13 @@ public class ItemMagnetRing extends ItemEnergy{ if(!entity.isSneaking()){ //Get all the Items in the area int range = 5; - ArrayList items = (ArrayList)world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(entity.posX-range, entity.posY-range, entity.posZ-range, entity.posX+range, entity.posY+range, entity.posZ+range)); + ArrayList items = (ArrayList)world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.fromBounds(entity.posX-range, entity.posY-range, entity.posZ-range, entity.posX+range, entity.posY+range, entity.posZ+range)); if(!items.isEmpty()){ for(EntityItem item : items){ if(this.getEnergyStored(stack) >= energyUse){ //If the Item is near enough to get picked up //(So it doesn't bounce around until it notices itself..) - if(Vec3.createVectorHelper(entity.posX, entity.posY, entity.posZ).distanceTo(Vec3.createVectorHelper(item.posX, item.posY, item.posZ)) <= 1.5){ + if(new Vec3(entity.posX, entity.posY, entity.posZ).distanceTo(new Vec3(item.posX, item.posY, item.posZ)) <= 1.5){ item.onCollideWithPlayer((EntityPlayer)entity); } else{ @@ -71,18 +66,6 @@ public class ItemMagnetRing extends ItemEnergy{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java index 412e5deca..4275e321d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java @@ -16,16 +16,16 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fml.relauncher.Side; @@ -41,10 +41,10 @@ public class ItemPhantomConnector extends ItemBase{ } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10){ + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing par7, float par8, float par9, float par10){ if(!world.isRemote){ //Passing Data to Phantoms - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile != null){ //Passing to Phantom if(tile instanceof IPhantomTile){ @@ -61,7 +61,7 @@ public class ItemPhantomConnector extends ItemBase{ } } //Storing Connections - storeConnection(stack, x, y, z, world); + storeConnection(stack, pos.getX(), pos.getY(), pos.getZ(), world); player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.stored.desc"))); } return true; @@ -114,7 +114,7 @@ public class ItemPhantomConnector extends ItemBase{ tag.setInteger("XCoordOfTileStored", x); tag.setInteger("YCoordOfTileStored", y); tag.setInteger("ZCoordOfTileStored", z); - tag.setInteger("WorldOfTileStored", world.provider.dimensionId); + tag.setInteger("WorldOfTileStored", world.provider.getDimensionId()); stack.setTagCompound(tag); } @@ -147,18 +147,6 @@ public class ItemPhantomConnector extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java index f44589ba8..91f7f35a9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java @@ -11,15 +11,10 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemResonantRice extends ItemBase{ @@ -38,18 +33,6 @@ public class ItemResonantRice extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java index 542877f35..50dca5adb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java @@ -11,14 +11,9 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; @@ -94,18 +89,6 @@ public class ItemWingsOfTheBats extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java index 4ad3ac597..8a36cf0fa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java @@ -16,18 +16,18 @@ import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; +import net.minecraft.block.BlockDirt; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemTool; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.UseHoeEvent; -import net.minecraftforge.fml.common.eventhandler.Event; +import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -39,8 +39,6 @@ import java.util.Set; @SuppressWarnings("unchecked") public class ItemAllToolAA extends ItemTool{ - @SideOnly(Side.CLIENT) - private IIcon overlayIcon; private int color; private String name; @@ -87,35 +85,48 @@ public class ItemAllToolAA extends ItemTool{ } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ){ - if(!player.canPlayerEdit(x, y, z, side, stack)){ + public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ){ + if(!playerIn.canPlayerEdit(pos.offset(side), side, stack)){ return false; } else{ - UseHoeEvent event = new UseHoeEvent(player, stack, world, x, y, z); - if(MinecraftForge.EVENT_BUS.post(event)){ - return false; + int hook = ForgeEventFactory.onHoeUse(stack, playerIn, worldIn, pos); + if(hook != 0){ + return hook > 0; } - if(event.getResult() == Event.Result.ALLOW){ - stack.damageItem(1, player); - return true; - } - Block block = world.getBlock(x, y, z); - if(side != 0 && world.getBlock(x, y+1, z).isAir(world, x, y+1, z) && (block == Blocks.grass || block == Blocks.dirt)){ - Block block1 = Blocks.farmland; - world.playSoundEffect((double)((float)x+0.5F), (double)((float)y+0.5F), (double)((float)z+0.5F), block1.stepSound.getStepResourcePath(), (block1.stepSound.getVolume()+1.0F)/2.0F, block1.stepSound.getPitch()*0.8F); - if(world.isRemote){ - return true; + + IBlockState state = worldIn.getBlockState(pos); + Block block = state.getBlock(); + + if(side != EnumFacing.DOWN && worldIn.isAirBlock(pos.up())){ + if(block == Blocks.grass){ + return this.useHoe(stack, playerIn, worldIn, pos, Blocks.farmland.getDefaultState()); } - else{ - world.setBlock(x, y, z, block1); - stack.damageItem(1, player); - return true; + + if(block == Blocks.dirt){ + switch(state.getValue(BlockDirt.VARIANT)){ + case DIRT: + return this.useHoe(stack, playerIn, worldIn, pos, Blocks.farmland.getDefaultState()); + case COARSE_DIRT: + return this.useHoe(stack, playerIn, worldIn, pos, Blocks.dirt.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.DIRT)); + } } } - else{ - return false; - } + + return false; + } + } + + private boolean useHoe(ItemStack stack, EntityPlayer player, World worldIn, BlockPos target, IBlockState newState){ + worldIn.playSoundEffect((double)((float)target.getX()+0.5F), (double)((float)target.getY()+0.5F), (double)((float)target.getZ()+0.5F), newState.getBlock().stepSound.getStepSound(), (newState.getBlock().stepSound.getVolume()+1.0F)/2.0F, newState.getBlock().stepSound.getFrequency()*0.8F); + + if(worldIn.isRemote){ + return true; + } + else{ + worldIn.setBlockState(target, newState); + stack.damageItem(1, player); + return true; } } @@ -130,31 +141,13 @@ public class ItemAllToolAA extends ItemTool{ return this.rarity; } - @Override - public boolean requiresMultipleRenderPasses(){ - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamageForRenderPass(int damage, int pass){ - return pass > 0 ? this.overlayIcon : super.getIconFromDamageForRenderPass(damage, pass); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":itemPaxel"); - this.overlayIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":itemPaxelOverlay"); - } - @Override public boolean canHarvestBlock(Block block, ItemStack stack){ return this.hasExtraWhitelist(block) || block.getMaterial().isToolNotRequired() || (block == Blocks.snow_layer || block == Blocks.snow || (block == Blocks.obsidian ? this.toolMaterial.getHarvestLevel() >= 3 : (block != Blocks.diamond_block && block != Blocks.diamond_ore ? (block != Blocks.emerald_ore && block != Blocks.emerald_block ? (block != Blocks.gold_block && block != Blocks.gold_ore ? (block != Blocks.iron_block && block != Blocks.iron_ore ? (block != Blocks.lapis_block && block != Blocks.lapis_ore ? (block != Blocks.redstone_ore && block != Blocks.lit_redstone_ore ? (block.getMaterial() == Material.rock || (block.getMaterial() == Material.iron || block.getMaterial() == Material.anvil)) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2))); } private boolean hasExtraWhitelist(Block block){ - String name = Block.blockRegistry.getNameForObject(block); + String name = block.getRegistryName(); if(name != null){ for(String list : ConfigValues.paxelExtraMiningWhitelist){ if(list.equals(name)){ @@ -191,7 +184,7 @@ public class ItemAllToolAA extends ItemTool{ } @Override - public float getDigSpeed(ItemStack stack, Block block, int meta){ - return this.hasExtraWhitelist(block) || block.getHarvestTool(meta) == null || block.getHarvestTool(meta).isEmpty() || this.getToolClasses(stack).contains(block.getHarvestTool(meta)) ? this.efficiencyOnProperMaterial : 1.0F; + public float getDigSpeed(ItemStack stack, IBlockState state){ + return this.hasExtraWhitelist(state.getBlock()) || state.getBlock().getHarvestTool(state) == null || state.getBlock().getHarvestTool(state).isEmpty() || this.getToolClasses(stack).contains(state.getBlock().getHarvestTool(state)) ? this.efficiencyOnProperMaterial : 1.0F; } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java index 5580aef27..377389b84 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java @@ -13,15 +13,11 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemArmorAA extends ItemArmor{ @@ -42,7 +38,7 @@ public class ItemArmorAA extends ItemArmor{ } public ItemArmorAA(String name, ArmorMaterial material, int type, ItemStack repairItem, String textureBase){ - this(name, material, type, repairItem, textureBase, EnumRarity.rare); + this(name, material, type, repairItem, textureBase, EnumRarity.RARE); } private void register(){ @@ -69,12 +65,6 @@ public class ItemArmorAA extends ItemArmor{ return this.rarity; } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } - @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){ return this.textures[slot == 2 ? 1 : 0]; @@ -84,10 +74,4 @@ public class ItemArmorAA extends ItemArmor{ public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ return ItemUtil.areItemsEqual(this.repairItem, stack, false); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java index a1c729c26..d43eed4ba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java @@ -13,15 +13,11 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.init.Items; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemBucketAA extends ItemBucket{ @@ -56,18 +52,6 @@ public class ItemBucketAA extends ItemBucket{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.uncommon; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.UNCOMMON; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java index 067e180cf..af3eddf2e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java @@ -13,15 +13,11 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemHoeAA extends ItemHoe{ @@ -67,16 +63,4 @@ public class ItemHoeAA extends ItemHoe{ public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ return ItemUtil.areItemsEqual(this.repairItem, stack, false); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java index e25d82710..3f7293658 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java @@ -13,15 +13,11 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemShovelAA extends ItemSpade{ @@ -67,16 +63,4 @@ public class ItemShovelAA extends ItemSpade{ public EnumRarity getRarity(ItemStack stack){ return this.rarity; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/ItemLens.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/ItemLens.java index 81353a9b9..5ba2e0d6c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/ItemLens.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/ItemLens.java @@ -13,13 +13,8 @@ package de.ellpeck.actuallyadditions.mod.items.lens; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemLens extends ItemBase implements ILensItem{ @@ -34,19 +29,7 @@ public class ItemLens extends ItemBase implements ILensItem{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.uncommon; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.UNCOMMON; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java index 295f953dc..c41034f7c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java @@ -24,8 +24,8 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -68,7 +68,8 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple private void doWork(){ if(this.storage.getEnergyStored() >= ENERGY_USE){ - ForgeDirection sideToManipulate = ForgeDirection.getOrientation(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)); + Position thisPos = Position.fromTileEntity(this); + EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(thisPos.getMetadata(worldObj)); //Extract energy for shooting the laser itself too! this.storage.extractEnergy(ENERGY_USE, false); @@ -76,7 +77,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple Lens currentLens = this.getCurrentLens(); int distance = currentLens.getDistance(); for(int i = 0; i < distance; i++){ - Position hitBlock = WorldUtil.getCoordsFromSide(sideToManipulate, xCoord, yCoord, zCoord, i); + Position hitBlock = WorldUtil.getCoordsFromSide(sideToManipulate, thisPos, i); if(currentLens.invoke(hitBlock, this)){ this.shootLaser(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), currentLens); @@ -99,8 +100,8 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple } private void shootLaser(int endX, int endY, int endZ, Lens currentLens){ - this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, ModUtil.MOD_ID_LOWER+":reconstructor", 0.35F, 1.0F); - PacketHandler.theNetwork.sendToAllAround(new PacketParticle(xCoord, yCoord, zCoord, endX, endY, endZ, currentLens.getColor(), 8, 2F), new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 64)); + this.worldObj.playSoundEffect(this.getX(), this.getY(), this.getZ(), ModUtil.MOD_ID_LOWER+":reconstructor", 0.35F, 1.0F); + PacketHandler.theNetwork.sendToAllAround(new PacketParticle(this.getX(), this.getY(), this.getZ(), endX, endY, endZ, currentLens.getColor(), 8, 2F), new NetworkRegistry.TargetPoint(worldObj.provider.getDimensionId(), this.getX(), this.getY(), this.getZ(), 64)); } @Override @@ -135,27 +136,27 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -165,28 +166,28 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return true; } @Override public int getX(){ - return this.xCoord; + return this.getPos().getX(); } @Override public int getY(){ - return this.yCoord; + return this.getPos().getY(); } @Override public int getZ(){ - return this.zCoord; + return this.getPos().getZ(); } @Override - public World getWorld(){ - return this.getWorldObj(); + public World getWorldObject(){ + return this.getWorld(); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java index e68f3a132..edda2c407 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java @@ -16,7 +16,7 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockAir; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import java.util.ArrayList; @@ -67,26 +67,26 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst } private void doWork(){ - ForgeDirection sideToManipulate = ForgeDirection.getOrientation(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)); + EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(Position.fromTileEntity(this).getMetadata(worldObj)); - Position coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, xCoord, yCoord, zCoord, 0); + Position coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, Position.fromTileEntity(this), 0); if(coordsBlock != null){ - Block blockToBreak = worldObj.getBlock(coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()); - if(!this.isPlacer && blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(worldObj, coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()) > -1.0F){ + Block blockToBreak = coordsBlock.getBlock(worldObj); + if(!this.isPlacer && blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(worldObj, coordsBlock) > -1.0F){ ArrayList drops = new ArrayList(); - int meta = worldObj.getBlockMetadata(coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()); - drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ(), meta, 0)); + int meta = coordsBlock.getMetadata(worldObj); + drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock, coordsBlock.getBlockState(worldObj), 0)); - if(WorldUtil.addToInventory(this, drops, false)){ - worldObj.playAuxSFX(2001, coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ(), Block.getIdFromBlock(blockToBreak)+(meta << 12)); - WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, xCoord, yCoord, zCoord); - WorldUtil.addToInventory(this, drops, true); + if(WorldUtil.addToInventory(this, drops, false, true)){ + worldObj.playAuxSFX(2001, coordsBlock, Block.getIdFromBlock(blockToBreak)+(meta << 12)); + WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, Position.fromTileEntity(this)); + WorldUtil.addToInventory(this, drops, true, true); this.markDirty(); } } - else if(this.isPlacer && worldObj.getBlock(coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()).isReplaceable(worldObj, coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ())){ + else if(this.isPlacer && coordsBlock.getBlock(worldObj).isReplaceable(worldObj, coordsBlock)){ int theSlot = WorldUtil.findFirstFilledSlot(this.slots); - this.setInventorySlotContents(theSlot, WorldUtil.placeBlockAtSide(sideToManipulate, worldObj, xCoord, yCoord, zCoord, this.slots[theSlot])); + this.setInventorySlotContents(theSlot, WorldUtil.placeBlockAtSide(sideToManipulate, worldObj, Position.fromTileEntity(this), this.slots[theSlot])); if(this.slots[theSlot] != null && this.slots[theSlot].stackSize <= 0){ this.slots[theSlot] = null; } @@ -95,7 +95,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -105,7 +105,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java index aebd29557..9d3a9d8cc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java @@ -10,10 +10,11 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public class TileEntityDropper extends TileEntityInventoryBase implements IRedstoneToggle{ @@ -59,7 +60,7 @@ public class TileEntityDropper extends TileEntityInventoryBase implements IRedst if(this.removeFromInventory(false) != null){ ItemStack stack = this.removeFromInventory(true); stack.stackSize = 1; - WorldUtil.dropItemAtSide(ForgeDirection.getOrientation(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)), worldObj, xCoord, yCoord, zCoord, stack); + WorldUtil.dropItemAtSide(WorldUtil.getDirectionByPistonRotation(Position.fromTileEntity(this).getMetadata(worldObj)), worldObj, Position.fromTileEntity(this), stack); } } @@ -80,7 +81,7 @@ public class TileEntityDropper extends TileEntityInventoryBase implements IRedst } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -90,7 +91,7 @@ public class TileEntityDropper extends TileEntityInventoryBase implements IRedst } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java index 2fdbf37e9..faed346ed 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java @@ -15,7 +15,7 @@ import cofh.api.energy.IEnergyContainerItem; import cofh.api.energy.IEnergyReceiver; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -66,7 +66,7 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements IEne } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -76,7 +76,7 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements IEne } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot == 1; } @@ -86,22 +86,22 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements IEne } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java index 7745377b5..0a163057a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java @@ -13,10 +13,11 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyContainerItem; import cofh.api.energy.IEnergyProvider; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -48,13 +49,8 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements IEne } } - if(this.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.UP, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, storage); + if(this.storage.getEnergyStored() > 0){ + WorldUtil.pushEnergyToAllSides(worldObj, Position.fromTileEntity(this), this.storage); } if(lastEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){ @@ -76,22 +72,22 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements IEne } @Override - public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate){ + public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate){ return this.storage.extractEnergy(maxExtract, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } @@ -101,7 +97,7 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements IEne } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -111,7 +107,7 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements IEne } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot == 1; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java index ffd613b71..b740f5f3e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java @@ -10,12 +10,13 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.*; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -58,12 +59,12 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen WorldUtil.fillBucket(oilTank, slots, 2, 3); if(this.oilTank.getFluidAmount() > 0){ - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, this.oilTank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.DOWN, this.oilTank); if(!this.isRedstonePowered){ - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, this.oilTank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, this.oilTank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, this.oilTank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, this.oilTank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.NORTH, this.oilTank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.EAST, this.oilTank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.SOUTH, this.oilTank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.WEST, this.oilTank); } } @@ -109,7 +110,7 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -119,20 +120,20 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return (slot == 1 && stack.getItem() == Items.bucket) || (slot == 3 && FluidContainerRegistry.containsFluid(stack, new FluidStack(InitBlocks.fluidOil, FluidContainerRegistry.BUCKET_VOLUME))); } @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill){ - if(from != ForgeDirection.DOWN && resource.getFluid() == InitBlocks.fluidCanolaOil){ + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ + if(from != EnumFacing.DOWN && resource.getFluid() == InitBlocks.fluidCanolaOil){ return this.canolaTank.fill(resource, doFill); } return 0; } @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain){ + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ if(resource.getFluid() == InitBlocks.fluidOil){ return this.oilTank.drain(resource.amount, doDrain); } @@ -140,22 +141,22 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen } @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain){ + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ return this.oilTank.drain(maxDrain, doDrain); } @Override - public boolean canFill(ForgeDirection from, Fluid fluid){ - return from != ForgeDirection.DOWN && fluid == InitBlocks.fluidCanolaOil; + public boolean canFill(EnumFacing from, Fluid fluid){ + return from != EnumFacing.DOWN && fluid == InitBlocks.fluidCanolaOil; } @Override - public boolean canDrain(ForgeDirection from, Fluid fluid){ - return from != ForgeDirection.UP && fluid == InitBlocks.fluidOil; + public boolean canDrain(EnumFacing from, Fluid fluid){ + return from != EnumFacing.UP && fluid == InitBlocks.fluidOil; } @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from){ + public FluidTankInfo[] getTankInfo(EnumFacing from){ return new FluidTankInfo[]{this.canolaTank.getInfo(), this.oilTank.getInfo()}; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java index 7d72f3bd3..ed98ccb0b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.material.Material; @@ -18,8 +19,8 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; import net.minecraftforge.common.FishingHooks; -import net.minecraftforge.common.util.ForgeDirection; import java.util.ArrayList; @@ -32,19 +33,20 @@ public class TileEntityFishingNet extends TileEntityBase{ super.updateEntity(); if(!worldObj.isRemote){ if(!this.isRedstonePowered){ - if(worldObj.getBlock(xCoord, yCoord-1, zCoord).getMaterial() == Material.water){ + Position pos = Position.fromTileEntity(this); + if(pos.getOffsetPosition(0, -1, 0).getMaterial(worldObj) == Material.water){ if(this.timeUntilNextDrop > 0){ this.timeUntilNextDrop--; if(timeUntilNextDrop <= 0){ ItemStack fishable = FishingHooks.getRandomFishable(Util.RANDOM, Util.RANDOM.nextFloat()); - TileEntity tile = worldObj.getTileEntity(xCoord, yCoord+1, zCoord); + TileEntity tile = pos.getOffsetPosition(0, 1, 0).getTileEntity(worldObj); if(tile != null && tile instanceof IInventory){ ArrayList list = new ArrayList(); list.add(fishable); - WorldUtil.addToInventory((IInventory)tile, list, ForgeDirection.DOWN, true); + WorldUtil.addToInventory((IInventory)tile, list, EnumFacing.DOWN, true, false); } else{ - EntityItem item = new EntityItem(worldObj, xCoord+0.5, yCoord+0.5, zCoord+0.5, fishable); + EntityItem item = new EntityItem(worldObj, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, fishable); item.lifespan = 2000; worldObj.spawnEntityInWorld(item); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java index d1a17a8a7..9ab93af85 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java @@ -19,7 +19,7 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -37,12 +37,12 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr super.updateEntity(); if(!worldObj.isRemote){ ArrayList blocksAround = new ArrayList(); - if(ENERGY_PRODUCE <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){ + if(ENERGY_PRODUCE <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored()){ for(int i = 1; i <= 5; i++){ - Position coords = WorldUtil.getCoordsFromSide(WorldUtil.getDirectionBySidesInOrder(i), xCoord, yCoord, zCoord, 0); + Position coords = WorldUtil.getCoordsFromSide(WorldUtil.getDirectionBySidesInOrder(i), Position.fromTileEntity(this), 0); if(coords != null){ - Block block = worldObj.getBlock(coords.getX(), coords.getY(), coords.getZ()); - if(block != null && block.getMaterial() == Material.lava && worldObj.getBlockMetadata(coords.getX(), coords.getY(), coords.getZ()) == 0){ + Block block = coords.getBlock(worldObj); + if(block != null && block.getMaterial() == Material.lava && coords.getMetadata(worldObj) == 0){ blocksAround.add(i); } } @@ -54,13 +54,13 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr if(Util.RANDOM.nextInt(10000) == 0){ int randomSide = blocksAround.get(Util.RANDOM.nextInt(blocksAround.size())); - WorldUtil.breakBlockAtSide(WorldUtil.getDirectionBySidesInOrder(randomSide), worldObj, xCoord, yCoord, zCoord); + WorldUtil.breakBlockAtSide(WorldUtil.getDirectionBySidesInOrder(randomSide), worldObj, Position.fromTileEntity(this)); } } } - if(this.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.UP, this.storage); + if(this.storage.getEnergyStored() > 0){ + WorldUtil.pushEnergy(worldObj, Position.fromTileEntity(this), EnumFacing.UP, this.storage); } if(this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){ @@ -82,23 +82,23 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr } @Override - public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate){ + public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate){ return this.storage.extractEnergy(maxExtract, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ - return from == ForgeDirection.UP; + public boolean canConnectEnergy(EnumFacing from){ + return from == EnumFacing.UP; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java index de36d2910..17cd83120 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java @@ -19,7 +19,7 @@ import de.ellpeck.actuallyadditions.mod.network.PacketParticle; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -51,9 +51,10 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr for(int reachX = -RANGE; reachX < RANGE+1; reachX++){ for(int reachZ = -RANGE; reachZ < RANGE+1; reachZ++){ for(int reachY = -RANGE; reachY < RANGE+1; reachY++){ - Block block = this.worldObj.getBlock(this.xCoord+reachX, this.yCoord+reachY, this.zCoord+reachZ); - if(block != null && block.isLeaves(this.worldObj, this.xCoord+reachX, this.yCoord+reachY, this.zCoord+reachZ)){ - breakPositions.add(new Position(this.xCoord+reachX, this.yCoord+reachY, this.zCoord+reachZ)); + Position pos = new Position(this.pos.getX()+reachX, this.pos.getY()+reachY, this.pos.getZ()+reachZ); + Block block = pos.getBlock(worldObj); + if(block != null && block.isLeaves(this.worldObj, pos)){ + breakPositions.add(pos); } } } @@ -63,15 +64,15 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr Collections.shuffle(breakPositions); Position theCoord = breakPositions.get(0); - Block theBlock = this.worldObj.getBlock(theCoord.getX(), theCoord.getY(), theCoord.getZ()); - int meta = this.worldObj.getBlockMetadata(theCoord.getX(), theCoord.getY(), theCoord.getZ()); - this.worldObj.playAuxSFX(2001, theCoord.getX(), theCoord.getY(), theCoord.getZ(), Block.getIdFromBlock(theBlock)+(meta << 12)); + Block theBlock = theCoord.getBlock(worldObj); + int meta = theCoord.getMetadata(worldObj); + this.worldObj.playAuxSFX(2001, theCoord, Block.getIdFromBlock(theBlock)+(meta << 12)); - this.worldObj.setBlockToAir(theCoord.getX(), theCoord.getY(), theCoord.getZ()); + this.worldObj.setBlockToAir(this.getPos()); this.storage.receiveEnergy(ENERGY_PRODUCED, false); - PacketHandler.theNetwork.sendToAllAround(new PacketParticle(xCoord, yCoord, zCoord, theCoord.getX(), theCoord.getY(), theCoord.getZ(), new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F), new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 64)); + PacketHandler.theNetwork.sendToAllAround(new PacketParticle(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), theCoord.getX(), theCoord.getY(), theCoord.getZ(), new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F), new NetworkRegistry.TargetPoint(worldObj.provider.getDimensionId(), this.pos.getX(), this.pos.getY(), this.pos.getZ(), 64)); } } } @@ -80,13 +81,8 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr } } - if(this.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.UP, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, storage); + if(this.storage.getEnergyStored() > 0){ + WorldUtil.pushEnergyToAllSides(worldObj, Position.fromTileEntity(this), this.storage); } if(this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){ @@ -108,22 +104,22 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr } @Override - public int extractEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int extractEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.extractEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java index 8c04c5328..56aec2145 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java @@ -19,8 +19,9 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.Vec3; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -49,7 +50,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements public void updateEntity(){ super.updateEntity(); if(!worldObj.isRemote){ - this.range = TileEntityPhantomface.upgradeRange(RANGE, worldObj, xCoord, yCoord, zCoord); + this.range = TileEntityPhantomface.upgradeRange(RANGE, worldObj, Position.fromTileEntity(this)); if(!this.hasBoundPosition()){ this.boundPosition = null; @@ -85,11 +86,11 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements @Override public boolean hasBoundPosition(){ if(this.boundPosition != null){ - if(this.worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) instanceof IPhantomTile || (this.xCoord == this.boundPosition.getX() && this.yCoord == this.boundPosition.getY() && this.zCoord == this.boundPosition.getZ() && this.worldObj.provider.dimensionId == this.worldObj.provider.dimensionId)){ + if(this.worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) instanceof IPhantomTile || (this.getPos().getX() == this.boundPosition.getX() && this.getPos().getY() == this.boundPosition.getY() && this.getPos().getZ() == this.boundPosition.getZ() && this.worldObj.provider.getDimensionId() == this.worldObj.provider.getDimensionId())){ this.boundPosition = null; return false; } - return this.worldObj.provider.dimensionId == this.worldObj.provider.dimensionId; + return this.worldObj.provider.getDimensionId() == this.worldObj.provider.getDimensionId(); } return false; } @@ -103,9 +104,9 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements drops.addAll(blockToBreak.getDrops(worldObj, boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), meta, 0)); if(WorldUtil.addToInventory(this, drops, false)){ - worldObj.playAuxSFX(2001, boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), Block.getIdFromBlock(blockToBreak)+(meta << 12)); - WorldUtil.breakBlockAtSide(ForgeDirection.UNKNOWN, worldObj, boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()); - WorldUtil.addToInventory(this, drops, true); + worldObj.playAuxSFX(2001, this.boundPosition, Block.getIdFromBlock(blockToBreak)+(meta << 12)); + worldObj.setBlockToAir(this.boundPosition); + WorldUtil.addToInventory(this, drops, true, true); this.markDirty(); } } @@ -132,17 +133,17 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements double d5 = (double)(Util.RANDOM.nextFloat()*1.0F*(float)j1); double d0 = (double)this.boundPosition.getX()+0.5D+0.25D*(double)i1; double d3 = (double)(Util.RANDOM.nextFloat()*1.0F*(float)i1); - worldObj.spawnParticle("portal", d0, d1, d2, d3, d4, d5); + worldObj.spawnParticle(EnumParticleTypes.PORTAL, d0, d1, d2, d3, d4, d5); } if(this.ticksElapsed%80 == 0){ - PacketParticle.renderParticlesFromAToB(xCoord, yCoord, zCoord, boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), 2, 0.35F, TileEntityPhantomface.COLORS, 3); + PacketParticle.renderParticlesFromAToB(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), 2, 0.35F, TileEntityPhantomface.COLORS, 3); } } @Override public boolean isBoundThingInRange(){ - return this.hasBoundPosition() && this.boundPosition.toVec().distanceTo(Vec3.createVectorHelper(xCoord, yCoord, zCoord)) <= this.range; + return this.hasBoundPosition() && this.boundPosition.toVec().distanceTo(new Vec3(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ())) <= this.range; } @Override @@ -190,7 +191,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -200,7 +201,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return this.isBreaker; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index aa4fb4ede..e42027ebc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -14,14 +14,12 @@ import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.ItemRenderer; -import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -33,14 +31,14 @@ public class AssetUtil{ public static final ResourceLocation GUI_INVENTORY_LOCATION = getGuiLocation("guiInventory"); public static final int TESR_RENDER_ID = 2; - public static int compostRenderId; + /*public static int compostRenderId; public static int fishingNetRenderId; public static int furnaceSolarRenderId; public static int coffeeMachineRenderId; public static int phantomBoosterRenderId; public static int smileyCloudRenderId; public static int laserRelayRenderId; - public static int bookletStandRenderId; + public static int bookletStandRenderId;*/ public static ResourceLocation getGuiLocation(String file){ return new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/gui/"+file+".png"); @@ -57,19 +55,21 @@ public class AssetUtil{ @SideOnly(Side.CLIENT) public static void renderItemInWorld(ItemStack stack, int renderPass){ - IIcon icon = stack.getItem().getIcon(stack, renderPass); + //TODO Fix rendering items in world + /*IIcon icon = stack.getItem().getIcon(stack, renderPass); float f = icon.getMinU(); float f1 = icon.getMaxU(); float f2 = icon.getMinV(); float f3 = icon.getMaxV(); Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); - ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F/16F); + ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F/16F);*/ } @SideOnly(Side.CLIENT) public static void renderBlockInWorld(Block block, int meta){ - Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); - RenderBlocks.getInstance().renderBlockAsItem(block, meta, 1F); + //TODO Fix rendering blocks in world + /*Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); + RenderBlocks.getInstance().renderBlockAsItem(block, meta, 1F);*/ } @SideOnly(Side.CLIENT) @@ -84,11 +84,11 @@ public class AssetUtil{ GL11.glScalef(scale, scale, scale); Minecraft mc = Minecraft.getMinecraft(); - boolean flagBefore = mc.fontRenderer.getUnicodeFlag(); - mc.fontRenderer.setUnicodeFlag(false); - RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), stack, 0, 0); - RenderItem.getInstance().renderItemOverlayIntoGUI(mc.fontRenderer, mc.getTextureManager(), stack, 0, 0); - mc.fontRenderer.setUnicodeFlag(flagBefore); + boolean flagBefore = mc.fontRendererObj.getUnicodeFlag(); + mc.fontRendererObj.setUnicodeFlag(false); + Minecraft.getMinecraft().getRenderItem().renderItemAndEffectIntoGUI(stack, 0, 0); + Minecraft.getMinecraft().getRenderItem().renderItemOverlayIntoGUI(mc.fontRendererObj, stack, 0, 0, null); + mc.fontRendererObj.setUnicodeFlag(flagBefore); //GL+MC+NEI suck if(mc.currentScreen instanceof GuiBooklet || mc.currentScreen == null){ @@ -98,32 +98,31 @@ public class AssetUtil{ } //Copied from Gui.class and changed - public static void drawHorizontalGradientRect(int startX, int startY, int endX, int endY, int firstColor, int secondColor){ - float f = (float)(firstColor >> 24 & 255)/255.0F; - float f1 = (float)(firstColor >> 16 & 255)/255.0F; - float f2 = (float)(firstColor >> 8 & 255)/255.0F; - float f3 = (float)(firstColor & 255)/255.0F; - float f4 = (float)(secondColor >> 24 & 255)/255.0F; - float f5 = (float)(secondColor >> 16 & 255)/255.0F; - float f6 = (float)(secondColor >> 8 & 255)/255.0F; - float f7 = (float)(secondColor & 255)/255.0F; - GL11.glDisable(GL11.GL_TEXTURE_2D); - GL11.glEnable(GL11.GL_BLEND); - GL11.glDisable(GL11.GL_ALPHA_TEST); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - GL11.glShadeModel(GL11.GL_SMOOTH); - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.setColorRGBA_F(f1, f2, f3, f); - tessellator.addVertex((double)startX, (double)startY, 0); - tessellator.addVertex((double)startX, (double)endY, 0); - tessellator.setColorRGBA_F(f5, f6, f7, f4); - tessellator.addVertex((double)endX, (double)endY, 0); - tessellator.addVertex((double)endX, (double)startY, 0); + public static void drawHorizontalGradientRect(int left, int top, int right, int bottom, int startColor, int endColor, float zLevel){ + float f = (float)(startColor >> 24 & 255)/255.0F; + float f1 = (float)(startColor >> 16 & 255)/255.0F; + float f2 = (float)(startColor >> 8 & 255)/255.0F; + float f3 = (float)(startColor & 255)/255.0F; + float f4 = (float)(endColor >> 24 & 255)/255.0F; + float f5 = (float)(endColor >> 16 & 255)/255.0F; + float f6 = (float)(endColor >> 8 & 255)/255.0F; + float f7 = (float)(endColor & 255)/255.0F; + GlStateManager.disableTexture2D(); + GlStateManager.enableBlend(); + GlStateManager.disableAlpha(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + GlStateManager.shadeModel(7425); + Tessellator tessellator = Tessellator.getInstance(); + WorldRenderer worldrenderer = tessellator.getWorldRenderer(); + worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR); + worldrenderer.pos((double)right, (double)top, (double)zLevel).color(f1, f2, f3, f).endVertex(); + worldrenderer.pos((double)left, (double)top, (double)zLevel).color(f1, f2, f3, f).endVertex(); + worldrenderer.pos((double)left, (double)bottom, (double)zLevel).color(f5, f6, f7, f4).endVertex(); + worldrenderer.pos((double)right, (double)bottom, (double)zLevel).color(f5, f6, f7, f4).endVertex(); tessellator.draw(); - GL11.glShadeModel(GL11.GL_FLAT); - GL11.glDisable(GL11.GL_BLEND); - GL11.glEnable(GL11.GL_ALPHA_TEST); - GL11.glEnable(GL11.GL_TEXTURE_2D); + GlStateManager.shadeModel(7424); + GlStateManager.disableBlend(); + GlStateManager.enableAlpha(); + GlStateManager.enableTexture2D(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index d68404b44..30f08039e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -49,7 +49,7 @@ public class WorldUtil{ public static void breakBlockAtSide(EnumFacing side, World world, Position pos, int offset){ Position c = getCoordsFromSide(side, pos, offset); if(c != null){ - world.setBlockToAir(pos.toBlockPos()); + world.setBlockToAir(pos); } } @@ -79,7 +79,7 @@ public class WorldUtil{ public static TileEntity getTileEntityFromSide(EnumFacing side, World world, Position pos){ Position c = getCoordsFromSide(side, pos, 0); if(c != null){ - return world.getTileEntity(pos.toBlockPos()); + return world.getTileEntity(pos); } return null; } @@ -118,7 +118,7 @@ public class WorldUtil{ //Fluids FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(stack); - if(fluid != null && fluid.getFluid().getBlock() != null && fluid.getFluid().getBlock().canPlaceBlockAt(world, offsetPos.toBlockPos())){ + if(fluid != null && fluid.getFluid().getBlock() != null && fluid.getFluid().getBlock().canPlaceBlockAt(world, offsetPos)){ Block block = offsetPos.getBlock(world); if(!(block instanceof IFluidBlock) && block != Blocks.lava && block != Blocks.water && block != Blocks.flowing_lava && block != Blocks.flowing_water){ if(offsetPos.setBlock(world, fluid.getFluid().getBlock(), 0, 2)){ @@ -135,8 +135,8 @@ public class WorldUtil{ //Plants else if(stack.getItem() instanceof IPlantable){ - if(((IPlantable)stack.getItem()).getPlant(world, offsetPos.toBlockPos()).getBlock().canPlaceBlockAt(world, offsetPos.toBlockPos())){ - if(offsetPos.setBlockState(world, ((IPlantable)stack.getItem()).getPlant(world, offsetPos.toBlockPos()), 0, 2)){ + if(((IPlantable)stack.getItem()).getPlant(world, offsetPos).getBlock().canPlaceBlockAt(world, offsetPos)){ + if(offsetPos.setBlockState(world, ((IPlantable)stack.getItem()).getPlant(world, offsetPos), 2)){ stack.stackSize--; } } @@ -144,7 +144,7 @@ public class WorldUtil{ else{ try{ //Blocks - stack.onItemUse(FakePlayerUtil.getFakePlayer(world), world, pos.toBlockPos(), side, 0, 0, 0); + stack.onItemUse(FakePlayerUtil.getFakePlayer(world), world, pos, side, 0, 0, 0); return stack; } catch(Exception e){ @@ -413,7 +413,7 @@ public class WorldUtil{ else{ //Check the Server if a Block that changed on the Client really changed, if not, revert the change //TODO Check if this is the right action - Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, pos.toBlockPos(), Minecraft.getMinecraft().objectMouseOver.sideHit)); + Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, pos, Minecraft.getMinecraft().objectMouseOver.sideHit)); } return removed; } From b2a00d2c8d3bd7900959c5e5d553620d7cfbd2f0 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 7 Jan 2016 23:42:42 +0100 Subject: [PATCH 05/58] Sooo.. yea, I'm still at it. And still not compilable. Oh god. --- .../cofh/api/energy/TileEnergyHandler.java | 12 +-- .../java/cofh/api/energy/package-info.java | 2 +- src/main/java/cofh/api/package-info.java | 3 +- .../api/recipe/CrusherRecipe.java | 6 +- .../api/recipe/LensNoneRecipe.java | 4 +- .../mod/blocks/BlockBookletStand.java | 14 ++-- .../mod/blocks/BlockColoredLamp.java | 49 ++++------- .../mod/blocks/BlockFermentingBarrel.java | 40 +++------ .../mod/blocks/BlockFireworkBox.java | 38 +++------ .../mod/blocks/BlockFishingNet.java | 24 +----- .../mod/blocks/BlockFluidCollector.java | 64 +++------------ .../mod/blocks/BlockLampPowerer.java | 66 ++++----------- .../mod/blocks/BlockMiner.java | 33 ++------ .../mod/blocks/BlockMisc.java | 41 +--------- .../mod/blocks/BlockOilGenerator.java | 50 ++++------- .../mod/blocks/BlockWildPlant.java | 47 ++++------- .../mod/blocks/BlockXPSolidifier.java | 82 +++++-------------- .../actuallyadditions/mod/blocks/FluidAA.java | 5 +- .../mod/blocks/InitBlocks.java | 4 +- .../mod/blocks/base/BlockBase.java | 4 +- .../mod/blocks/base/BlockBushBase.java | 4 +- .../mod/blocks/base/BlockStair.java | 6 +- .../mod/blocks/base/BlockWallAA.java | 16 ++-- .../mod/blocks/base/ItemBlockBase.java | 28 +++---- .../mod/blocks/render/RenderLaserRelay.java | 5 +- .../mod/blocks/render/RenderSmileyCloud.java | 22 ++--- .../mod/blocks/render/RenderTileEntity.java | 5 +- .../mod/booklet/GuiBooklet.java | 35 +++++--- .../mod/booklet/GuiBookletStand.java | 10 +-- .../mod/booklet/button/BookmarkButton.java | 4 +- .../mod/booklet/button/IndexButton.java | 6 +- .../mod/booklet/button/TexturedButton.java | 4 +- .../mod/booklet/page/PageCoffeeRecipe.java | 6 +- .../mod/booklet/page/PageCrafting.java | 6 +- .../mod/booklet/page/PagePicture.java | 2 +- .../mod/booklet/page/PageReconstructor.java | 6 +- .../mod/booklet/page/PageTextOnly.java | 2 +- .../mod/config/GuiConfiguration.java | 3 +- .../mod/crafting/FoodCrafting.java | 6 +- .../mod/event/TooltipEvent.java | 2 +- .../mod/event/WorldDecorationEvent.java | 48 +++++------ .../mod/gen/InitVillager.java | 18 ++-- .../actuallyadditions/mod/gen/OreGen.java | 8 +- .../gen/VillageComponentCustomCropField.java | 15 +--- .../gen/VillageCustomCropFieldHandler.java | 8 +- .../mod/inventory/ContainerCrafter.java | 2 +- .../mod/inventory/ContainerFurnaceDouble.java | 8 +- .../mod/inventory/GuiHandler.java | 5 +- .../mod/inventory/gui/GuiCanolaPress.java | 6 +- .../mod/inventory/gui/GuiCoalGenerator.java | 4 +- .../inventory/gui/GuiDirectionalBreaker.java | 4 +- .../mod/inventory/gui/GuiFeeder.java | 4 +- .../inventory/gui/GuiFermentingBarrel.java | 6 +- .../mod/inventory/gui/GuiGiantChest.java | 2 +- .../mod/inventory/gui/GuiGrinder.java | 4 +- .../mod/inventory/gui/GuiMiner.java | 4 +- .../mod/inventory/gui/GuiOilGenerator.java | 6 +- .../mod/inventory/gui/GuiRepairer.java | 4 +- .../mod/inventory/gui/GuiXPSolidifier.java | 2 +- .../mod/items/InitForeignPaxels.java | 12 +-- .../mod/items/ItemBooklet.java | 41 ++++------ .../mod/items/ItemCrystal.java | 23 +----- .../actuallyadditions/mod/items/ItemDust.java | 17 +--- .../mod/items/ItemGeneric.java | 19 +---- .../mod/items/ItemGrowthRing.java | 6 +- .../actuallyadditions/mod/items/ItemMisc.java | 22 +---- .../mod/items/ItemPotionRing.java | 21 +---- .../actuallyadditions/mod/items/ItemSeed.java | 29 ++----- .../mod/items/ItemSolidifiedExperience.java | 19 +---- .../mod/items/ItemTeleStaff.java | 49 ++++------- .../mod/items/ItemWaterRemovalRing.java | 31 ++----- .../mod/items/base/ItemEnergy.java | 2 +- .../mod/items/base/ItemPickaxeAA.java | 16 ---- .../mod/items/base/ItemSwordAA.java | 16 ---- .../mod/items/lens/LensDeath.java | 4 +- .../mod/items/lens/LensDetonation.java | 4 +- .../mod/items/metalists/TheDusts.java | 16 ++-- .../mod/items/metalists/TheFoods.java | 42 +++++----- .../mod/items/metalists/TheJams.java | 14 ++-- .../mod/items/metalists/TheMiscItems.java | 38 ++++----- .../mod/items/metalists/ThePotionRings.java | 20 ++--- .../mod/misc/DispenserHandlerEmptyBucket.java | 12 +-- .../mod/misc/DispenserHandlerFillBucket.java | 28 ++++--- .../mod/misc/special/RenderSpecial.java | 3 +- .../mod/misc/special/SpecialRenderInit.java | 12 +-- .../mod/network/PacketParticle.java | 2 +- .../mod/network/gui/PacketGuiNumber.java | 5 +- .../mod/network/gui/PacketGuiString.java | 5 +- .../mod/proxy/ClientProxy.java | 18 ++-- .../mod/recipe/CrusherRecipeRegistry.java | 2 +- .../mod/tile/TileEntityBase.java | 18 ++-- .../mod/tile/TileEntityBookletStand.java | 5 -- .../mod/tile/TileEntityCompost.java | 5 +- .../tile/TileEntityDirectionalBreaker.java | 4 +- .../mod/tile/TileEntityFeeder.java | 12 +-- .../mod/tile/TileEntityFireworkBox.java | 18 ++-- .../mod/tile/TileEntityFluidCollector.java | 50 +++++------ .../mod/tile/TileEntityFurnaceSolar.java | 29 ++++--- .../mod/tile/TileEntityGiantChest.java | 10 +-- .../mod/tile/TileEntityGreenhouseGlass.java | 15 ++-- .../mod/tile/TileEntityInventoryBase.java | 4 +- .../mod/tile/TileEntityLaserRelay.java | 28 +++---- .../tile/TileEntityLavaFactoryController.java | 38 +++++---- .../mod/tile/TileEntityMiner.java | 25 +++--- .../mod/tile/TileEntityPhantomEnergyface.java | 6 +- .../mod/tile/TileEntityPhantomPlacer.java | 16 ++-- .../mod/tile/TileEntityRangedCollector.java | 11 +-- .../mod/tile/TileEntityXPSolidifier.java | 5 +- .../UpdateCheckerClientNotificationEvent.java | 8 +- .../actuallyadditions/mod/util/AssetUtil.java | 4 +- .../actuallyadditions/mod/util/ItemUtil.java | 6 +- .../util/playerdata/PersistentClientData.java | 2 +- 112 files changed, 665 insertions(+), 1126 deletions(-) diff --git a/src/main/java/cofh/api/energy/TileEnergyHandler.java b/src/main/java/cofh/api/energy/TileEnergyHandler.java index 7cc655e92..175ee6676 100644 --- a/src/main/java/cofh/api/energy/TileEnergyHandler.java +++ b/src/main/java/cofh/api/energy/TileEnergyHandler.java @@ -2,7 +2,7 @@ package cofh.api.energy; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; /** * Reference implementation of {@link IEnergyHandler}. Use/extend this or implement your own. @@ -30,34 +30,34 @@ public class TileEnergyHandler extends TileEntity implements IEnergyHandler { /* IEnergyConnection */ @Override - public boolean canConnectEnergy(ForgeDirection from) { + public boolean canConnectEnergy(EnumFacing from) { return true; } /* IEnergyReceiver */ @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) { + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) { return storage.receiveEnergy(maxReceive, simulate); } /* IEnergyProvider */ @Override - public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate) { + public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate) { return storage.extractEnergy(maxExtract, simulate); } /* IEnergyReceiver and IEnergyProvider */ @Override - public int getEnergyStored(ForgeDirection from) { + public int getEnergyStored(EnumFacing from) { return storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from) { + public int getMaxEnergyStored(EnumFacing from) { return storage.getMaxEnergyStored(); } diff --git a/src/main/java/cofh/api/energy/package-info.java b/src/main/java/cofh/api/energy/package-info.java index 7379702b8..880844fca 100644 --- a/src/main/java/cofh/api/energy/package-info.java +++ b/src/main/java/cofh/api/energy/package-info.java @@ -6,5 +6,5 @@ package cofh.api.energy; import cofh.api.CoFHAPIProps; -import cpw.mods.fml.common.API; +import net.minecraftforge.fml.common.API; diff --git a/src/main/java/cofh/api/package-info.java b/src/main/java/cofh/api/package-info.java index 08ff5fcb6..25e1ecc5d 100644 --- a/src/main/java/cofh/api/package-info.java +++ b/src/main/java/cofh/api/package-info.java @@ -5,5 +5,4 @@ @API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHLib", provides = "CoFHAPI") package cofh.api; -import cpw.mods.fml.common.API; - +import net.minecraftforge.fml.common.API; \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CrusherRecipe.java index 7a6c04d8b..31c326130 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CrusherRecipe.java @@ -60,7 +60,7 @@ public class CrusherRecipe{ return null; } - List stacks = OreDictionary.getOres(this.outputOne, false); + List stacks = OreDictionary.getOres(this.outputOne); if(stacks != null && !stacks.isEmpty()){ List stacksCopy = new ArrayList(); for(ItemStack stack : stacks){ @@ -84,7 +84,7 @@ public class CrusherRecipe{ return null; } - List stacks = OreDictionary.getOres(this.outputTwo, false); + List stacks = OreDictionary.getOres(this.outputTwo); if(stacks != null && !stacks.isEmpty()){ List stacksCopy = new ArrayList(); for(ItemStack stack : stacks){ @@ -108,7 +108,7 @@ public class CrusherRecipe{ return null; } - List stacks = OreDictionary.getOres(this.input, false); + List stacks = OreDictionary.getOres(this.input); if(stacks != null && !stacks.isEmpty()){ List stacksCopy = new ArrayList(); for(ItemStack stack : stacks){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/recipe/LensNoneRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/api/recipe/LensNoneRecipe.java index 45bb5e923..12d7b8aa1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/recipe/LensNoneRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/recipe/LensNoneRecipe.java @@ -46,7 +46,7 @@ public class LensNoneRecipe{ return null; } - List stacks = OreDictionary.getOres(this.output, false); + List stacks = OreDictionary.getOres(this.output); if(stacks != null && !stacks.isEmpty()){ List stacksCopy = new ArrayList(); for(ItemStack stack : stacks){ @@ -70,7 +70,7 @@ public class LensNoneRecipe{ return null; } - List stacks = OreDictionary.getOres(this.input, false); + List stacks = OreDictionary.getOres(this.input); if(stacks != null && !stacks.isEmpty()){ List stacksCopy = new ArrayList(); for(ItemStack stack : stacks){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java index 53a5b626b..79d8c2a44 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java @@ -70,21 +70,21 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - Position pos = new Position(x, y, z); + Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - pos.setMetadata(world, 2, 2); + thePos.setMetadata(world, 2, 2); } if(rotation == 1){ - pos.setMetadata(world, 1, 2); + thePos.setMetadata(world, 1, 2); } if(rotation == 2){ - pos.setMetadata(world, 0, 2); + thePos.setMetadata(world, 0, 2); } if(rotation == 3){ - pos.setMetadata(world, 3, 2); + thePos.setMetadata(world, 3, 2); } TileEntityBookletStand tile = (TileEntityBookletStand)world.getTileEntity(pos); @@ -97,7 +97,7 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay } } - super.onBlockPlacedBy(world, x, y, z, player, stack); + super.onBlockPlacedBy(world, pos, state, player, stack); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java index 89b2d51f1..d5756a3f9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; @@ -17,13 +18,14 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; @@ -37,8 +39,6 @@ public class BlockColoredLamp extends BlockBase{ public static TheColoredLampColors[] allLampTypes = TheColoredLampColors.values(); public boolean isOn; - @SideOnly(Side.CLIENT) - private IIcon[] textures; public BlockColoredLamp(boolean isOn, String name){ super(Material.redstoneLight, name); @@ -49,27 +49,21 @@ public class BlockColoredLamp extends BlockBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return meta >= allLampTypes.length ? null : textures[meta]; - } - - @Override - public Item getItemDropped(int par1, Random rand, int par3){ + public Item getItemDropped(IBlockState state, Random rand, int par3){ return Item.getItemFromBlock(InitBlocks.blockColoredLamp); } @Override - public int damageDropped(int meta){ - return meta; + public int damageDropped(IBlockState state){ + return this.getMetaFromState(state); } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ){ //Turning On if(player.isSneaking()){ if(!world.isRemote){ - world.setBlock(x, y, z, this.isOn ? InitBlocks.blockColoredLamp : InitBlocks.blockColoredLampOn, world.getBlockMetadata(x, y, z), 2); + Position.fromBlockPos(pos).setBlock(world, this.isOn ? InitBlocks.blockColoredLamp : InitBlocks.blockColoredLampOn, Position.fromBlockPos(pos).getMetadata(world), 2); } return true; } @@ -81,9 +75,9 @@ public class BlockColoredLamp extends BlockBase{ String name = OreDictionary.getOreName(oreID); TheColoredLampColors color = TheColoredLampColors.getColorFromDyeName(name); if(color != null){ - if(world.getBlockMetadata(x, y, z) != color.ordinal()){ + if(Position.fromBlockPos(pos).getMetadata(world) != color.ordinal()){ if(!world.isRemote){ - world.setBlockMetadataWithNotify(x, y, z, color.ordinal(), 2); + Position.fromBlockPos(pos).setMetadata(world, color.ordinal(), 2); if(!player.capabilities.isCreativeMode){ player.inventory.decrStackSize(player.inventory.currentItem, 1); } @@ -98,13 +92,13 @@ public class BlockColoredLamp extends BlockBase{ } @Override - public ItemStack createStackedBlock(int meta){ - return new ItemStack(InitBlocks.blockColoredLamp, 1, meta); + public ItemStack createStackedBlock(IBlockState state){ + return new ItemStack(InitBlocks.blockColoredLamp, 1, this.getMetaFromState(state)); } @Override @SideOnly(Side.CLIENT) - public Item getItem(World world, int x, int y, int z){ + public Item getItem(World world, BlockPos pos){ return Item.getItemFromBlock(InitBlocks.blockColoredLamp); } @@ -117,16 +111,7 @@ public class BlockColoredLamp extends BlockBase{ } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.textures = new IIcon[allLampTypes.length]; - for(int i = 0; i < allLampTypes.length; i++){ - this.textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+allLampTypes[i].name); - } - } - - @Override - public int getLightValue(IBlockAccess world, int x, int y, int z){ + public int getLightValue(IBlockAccess world, BlockPos pos){ return this.isOn ? 15 : 0; } @@ -137,7 +122,7 @@ public class BlockColoredLamp extends BlockBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } public static class TheItemBlock extends ItemBlockBase{ @@ -153,7 +138,7 @@ public class BlockColoredLamp extends BlockBase{ if(stack.getItemDamage() >= allLampTypes.length){ return null; } - return StringUtil.localize(this.getUnlocalizedName(stack)+".name")+(((BlockColoredLamp)this.field_150939_a).isOn ? " ("+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".onSuffix.desc")+")" : ""); + return StringUtil.localize(this.getUnlocalizedName(stack)+".name")+(((BlockColoredLamp)this.block).isOn ? " ("+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".onSuffix.desc")+")" : ""); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java index 4b0856cff..a2534f4ad 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java @@ -10,28 +10,23 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockFermentingBarrel extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon iconTop; - public BlockFermentingBarrel(String name){ super(Material.wood, name); this.setHarvestLevel("axe", 0); @@ -46,38 +41,25 @@ public class BlockFermentingBarrel extends BlockContainerBase{ } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return side <= 1 ? this.iconTop : this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityFermentingBarrel press = (TileEntityFermentingBarrel)world.getTileEntity(x, y, z); + TileEntityFermentingBarrel press = (TileEntityFermentingBarrel)world.getTileEntity(pos); if(press != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FERMENTING_BARREL.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FERMENTING_BARREL.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.iconTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java index c233ac84c..d7bdb72c3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java @@ -10,26 +10,21 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFireworkBox; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockFireworkBox extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - public BlockFireworkBox(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -44,31 +39,18 @@ public class BlockFireworkBox extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return side == 1 ? this.topIcon : this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ - return this.tryToggleRedstone(world, x, y, z, player); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ + return this.tryToggleRedstone(world, Position.fromBlockPos(pos), player); } @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java index 4342eef0e..62ac87c7c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java @@ -14,15 +14,10 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFishingNet; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockFishingNet extends BlockContainerBase{ @@ -40,35 +35,18 @@ public class BlockFishingNet extends BlockContainerBase{ return new TileEntityFishingNet(); } - @Override - public boolean renderAsNormalBlock(){ - return false; - } - @Override public int getRenderType(){ return AssetUtil.TESR_RENDER_ID; } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return this.blockIcon; - } - @Override public boolean isOpaqueCube(){ return false; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = Blocks.planks.getIcon(0, 0); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java index 69c5ff5ba..d829dfcd7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java @@ -10,33 +10,24 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockFluidCollector extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon frontIcon; - @SideOnly(Side.CLIENT) - private IIcon topIcon; - private boolean isPlacer; public BlockFluidCollector(boolean isPlacer, String name){ @@ -53,31 +44,6 @@ public class BlockFluidCollector extends BlockContainerBase{ return this.isPlacer ? new TileEntityFluidCollector.TileEntityFluidPlacer() : new TileEntityFluidCollector(); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ - int meta = world.getBlockMetadata(x, y, z); - if(side != meta && (side == 0 || side == 1)){ - return this.topIcon; - } - if(side == meta){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 0 || side == 1){ - return this.topIcon; - } - if(side == 3){ - return this.frontIcon; - } - return this.blockIcon; - } - @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ if(this.tryToggleRedstone(world, x, y, z, player)){ @@ -93,30 +59,22 @@ public class BlockFluidCollector extends BlockContainerBase{ return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front"); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ - int rotation = BlockPistonBase.determineOrientation(world, x, y, z, player); - world.setBlockMetadataWithNotify(x, y, z, rotation, 2); + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ + int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); + Position.fromBlockPos(pos).setMetadata(world, rotation, 2); - super.onBlockPlacedBy(world, x, y, z, player, stack); + super.onBlockPlacedBy(world, pos, state, player, stack); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java index a2ab7d0f8..81750b054 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java @@ -12,27 +12,19 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockLampPowerer extends BlockBase{ - @SideOnly(Side.CLIENT) - private IIcon frontIcon; - public BlockLampPowerer(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -42,59 +34,35 @@ public class BlockLampPowerer extends BlockBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ - int meta = world.getBlockMetadata(x, y, z); - if(side == meta){ - return this.frontIcon; - } - return this.blockIcon; + public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock){ + this.updateLamp(world, Position.fromBlockPos(pos)); } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 3){ - return this.frontIcon; - } - return this.blockIcon; + public void onBlockAdded(World world, BlockPos pos, IBlockState state){ + this.updateLamp(world, Position.fromBlockPos(pos)); } @Override - public void onNeighborBlockChange(World world, int x, int y, int z, Block block){ - this.updateLamp(world, x, y, z); + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ + int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); + Position.fromBlockPos(pos).setMetadata(world, rotation, 2); + + super.onBlockPlacedBy(world, pos, state, player, stack); } - @Override - public void onBlockAdded(World world, int x, int y, int z){ - this.updateLamp(world, x, y, z); - } - - @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ - int rotation = BlockPistonBase.determineOrientation(world, x, y, z, player); - world.setBlockMetadataWithNotify(x, y, z, rotation, 2); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front"); - } - - private void updateLamp(World world, int x, int y, int z){ + private void updateLamp(World world, Position pos){ if(!world.isRemote){ - Position coords = WorldUtil.getCoordsFromSide(ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z)), x, y, z, 0); + Position coords = WorldUtil.getCoordsFromSide(WorldUtil.getDirectionByPistonRotation(pos.getMetadata(world)), pos, 0); if(coords != null && coords.getBlock(world) instanceof BlockColoredLamp){ - if(world.isBlockIndirectlyGettingPowered(x, y, z)){ + if(world.isBlockIndirectlyGettingPowered(pos) > 0){ if(!((BlockColoredLamp)coords.getBlock(world)).isOn){ - world.setBlock(coords.getX(), coords.getY(), coords.getZ(), InitBlocks.blockColoredLampOn, world.getBlockMetadata(coords.getX(), coords.getY(), coords.getZ()), 2); + pos.setBlock(world, InitBlocks.blockColoredLampOn, coords.getMetadata(world), 2); } } else{ if(((BlockColoredLamp)coords.getBlock(world)).isOn){ - world.setBlock(coords.getX(), coords.getY(), coords.getZ(), InitBlocks.blockColoredLamp, world.getBlockMetadata(coords.getX(), coords.getY(), coords.getZ()), 2); + pos.setBlock(world, InitBlocks.blockColoredLamp, coords.getMetadata(world), 2); } } } @@ -103,6 +71,6 @@ public class BlockLampPowerer extends BlockBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java index 95b303791..f574c7a81 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java @@ -15,19 +15,19 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.profiler.Profiler; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; @@ -35,11 +35,6 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class BlockMiner extends BlockContainerBase implements IHudDisplay{ - @SideOnly(Side.CLIENT) - private IIcon frontIcon; - @SideOnly(Side.CLIENT) - private IIcon topIcon; - public BlockMiner(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -48,39 +43,25 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay{ this.setStepSound(soundTypeStone); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return side == 0 ? this.frontIcon : (side == 1 ? this.topIcon : this.blockIcon); - } - @Override public boolean isOpaqueCube(){ return false; } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityMiner){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.MINER.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.MINER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front"); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java index 8ea8efc92..bf0131bd9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java @@ -13,17 +13,14 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -32,13 +29,6 @@ import java.util.List; public class BlockMisc extends BlockBase{ public static final TheMiscBlocks[] allMiscBlocks = TheMiscBlocks.values(); - @SideOnly(Side.CLIENT) - public IIcon[] textures; - - @SideOnly(Side.CLIENT) - private IIcon ironCasingSeasonalTop; - @SideOnly(Side.CLIENT) - private IIcon ironCasingSeasonal; public BlockMisc(String name){ super(Material.rock, name); @@ -48,19 +38,8 @@ public class BlockMisc extends BlockBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - if(ClientProxy.jingleAllTheWay && side != 0){ - if(metadata == TheMiscBlocks.IRON_CASING.ordinal()){ - return side == 1 ? this.ironCasingSeasonalTop : this.ironCasingSeasonal; - } - } - return metadata >= textures.length ? null : textures[metadata]; - } - - @Override - public int damageDropped(int meta){ - return meta; + public int damageDropped(IBlockState state){ + return this.getMetaFromState(state); } @SuppressWarnings("all") @@ -71,18 +50,6 @@ public class BlockMisc extends BlockBase{ } } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.textures = new IIcon[allMiscBlocks.length]; - for(int i = 0; i < textures.length; i++){ - textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+allMiscBlocks[i].name); - } - - this.ironCasingSeasonalTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscIronCasingSnowTop"); - this.ironCasingSeasonal = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscIronCasingSnow"); - } - @Override public Class getItemBlock(){ return TheItemBlock.class; @@ -90,7 +57,7 @@ public class BlockMisc extends BlockBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return stack.getItemDamage() >= allMiscBlocks.length ? EnumRarity.common : allMiscBlocks[stack.getItemDamage()].rarity; + return stack.getItemDamage() >= allMiscBlocks.length ? EnumRarity.COMMON : allMiscBlocks[stack.getItemDamage()].rarity; } public static class TheItemBlock extends ItemBlockBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java index f7fe199d4..8b036ac43 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java @@ -10,20 +10,21 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -32,11 +33,6 @@ import java.util.Random; public class BlockOilGenerator extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockOilGenerator(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -53,50 +49,34 @@ public class BlockOilGenerator extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, int x, int y, int z, Random rand){ - int meta = world.getBlockMetadata(x, y, z); - - if(meta == 1){ + public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ + if(Position.fromBlockPos(pos).getMetadata(world) == 1){ for(int i = 0; i < 5; i++){ - world.spawnParticle(ClientProxy.bulletForMyValentine ? "heart" : "smoke", (double)x+0.5F, (double)y+1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D); + world.spawnParticle(ClientProxy.bulletForMyValentine ? EnumParticleTypes.HEART : EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX()+0.5F, (double)pos.getY()+1.0F, (double)pos.getZ()+0.5F, 0.0D, 0.0D, 0.0D); } } } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityOilGenerator generator = (TileEntityOilGenerator)world.getTileEntity(x, y, z); + TileEntityOilGenerator generator = (TileEntityOilGenerator)world.getTileEntity(pos); if(generator != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.OIL_GENERATOR.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.OIL_GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index a9e8abbe6..6dd9567ef 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; @@ -17,18 +18,19 @@ import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheWildPlants; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.ArrayList; import java.util.List; public class BlockWildPlant extends BlockBushBase{ @@ -41,8 +43,10 @@ public class BlockWildPlant extends BlockBushBase{ } @Override - public boolean canBlockStay(World world, int x, int y, int z){ - return world.getBlockMetadata(x, y, z) == TheWildPlants.RICE.ordinal() ? world.getBlock(x, y-1, z).getMaterial() == Material.water : world.getBlock(x, y-1, z).canSustainPlant(world, x, y-1, z, ForgeDirection.UP, this); + public boolean canBlockStay(World world, BlockPos pos, IBlockState state){ + Position thePos = Position.fromBlockPos(pos); + Position offset = thePos.getOffsetPosition(0, -1, 0); + return thePos.getMetadata(world) == TheWildPlants.RICE.ordinal() ? offset.getMaterial(world) == Material.water : offset.getBlock(world).canSustainPlant(world, offset, EnumFacing.UP, this); } @Override @@ -57,24 +61,18 @@ public class BlockWildPlant extends BlockBushBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return stack.getItemDamage() >= allWildPlants.length ? EnumRarity.common : allWildPlants[stack.getItemDamage()].rarity; + return stack.getItemDamage() >= allWildPlants.length ? EnumRarity.COMMON : allWildPlants[stack.getItemDamage()].rarity; } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata){ - return metadata >= allWildPlants.length ? null : allWildPlants[metadata].wildVersionOf.getIcon(0, 7); - } - - @Override - public boolean canSilkHarvest(){ + public boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player){ return false; } @Override @SideOnly(Side.CLIENT) - public Item getItem(World world, int x, int y, int z){ - int meta = world.getBlockMetadata(x, y, z); + public Item getItem(World world, BlockPos pos){ + int meta = Position.fromBlockPos(pos).getMetadata(world); return meta >= allWildPlants.length ? null : ((BlockPlant)allWildPlants[meta].wildVersionOf).seedItem; } @@ -87,14 +85,9 @@ public class BlockWildPlant extends BlockBushBase{ } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - - } - - @Override - public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune){ - return metadata >= allWildPlants.length ? null : allWildPlants[metadata].wildVersionOf.getDrops(world, x, y, z, 7, fortune); + public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ + int metadata = Position.fromBlockPos(pos).getMetadata(world); + return metadata >= allWildPlants.length ? null : allWildPlants[metadata].wildVersionOf.getDrops(world, pos, allWildPlants[metadata].wildVersionOf.getStateFromMeta(7), fortune); } public static class TheItemBlock extends ItemBlockBase{ @@ -105,12 +98,6 @@ public class BlockWildPlant extends BlockBushBase{ this.setMaxDamage(0); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta){ - return this.field_150939_a.getIcon(0, meta); - } - @Override public String getUnlocalizedName(ItemStack stack){ return stack.getItemDamage() >= allWildPlants.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allWildPlants[stack.getItemDamage()].name; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java index 7f7bf6f4c..2ac3a7517 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java @@ -10,36 +10,28 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.Util; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MathHelper; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockXPSolidifier extends BlockContainerBase{ - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon frontIcon; - public BlockXPSolidifier(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -54,93 +46,61 @@ public class BlockXPSolidifier extends BlockContainerBase{ } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ - int meta = world.getBlockMetadata(x, y, z); - if(side == 1 || side == 0){ - return this.topIcon; - } - if(side == meta+2){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - if(side == 1 || side == 0){ - return this.topIcon; - } - if(side == 3){ - return this.frontIcon; - } - return this.blockIcon; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ - TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier)world.getTileEntity(x, y, z); + TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier)world.getTileEntity(pos); if(solidifier != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.XP_SOLIDIFIER.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.XP_SOLIDIFIER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top"); - this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front"); - } - @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; + return EnumRarity.EPIC; } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; + Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - world.setBlockMetadataWithNotify(x, y, z, 0, 2); + thePos.setMetadata(world, 0, 2); } if(rotation == 1){ - world.setBlockMetadataWithNotify(x, y, z, 3, 2); + thePos.setMetadata(world, 3, 2); } if(rotation == 2){ - world.setBlockMetadataWithNotify(x, y, z, 1, 2); + thePos.setMetadata(world, 1, 2); } if(rotation == 3){ - world.setBlockMetadataWithNotify(x, y, z, 2, 2); + thePos.setMetadata(world, 2, 2); } - super.onBlockPlacedBy(world, x, y, z, player, stack); + super.onBlockPlacedBy(world, pos, state, player, stack); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - TileEntity tile = world.getTileEntity(x, y, z); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityXPSolidifier){ TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier)tile; if(solidifier.amount > 0){ int stacks = solidifier.amount/64; int rest = solidifier.amount%64; for(int i = 0; i < stacks; i++){ - this.spawnItem(world, x, y, z, new ItemStack(InitItems.itemSolidifiedExperience, 64)); + this.spawnItem(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(InitItems.itemSolidifiedExperience, 64)); } - this.spawnItem(world, x, y, z, new ItemStack(InitItems.itemSolidifiedExperience, rest)); + this.spawnItem(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(InitItems.itemSolidifiedExperience, rest)); solidifier.amount = 0; } } - super.breakBlock(world, x, y, z, block, par6); + super.breakBlock(world, pos, state); } private void spawnItem(World world, int x, int y, int z, ItemStack stack){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/FluidAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/FluidAA.java index 369406f9a..8f81a2617 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/FluidAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/FluidAA.java @@ -11,12 +11,13 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; public class FluidAA extends Fluid{ - public FluidAA(String fluidName){ - super(fluidName); + public FluidAA(String fluidName, String textureName){ + super(fluidName, new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/"+textureName+"Still.png"), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/"+textureName+"Flowing.png")); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java index 9317d87c7..4c791c41a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java @@ -209,7 +209,7 @@ public class InitBlocks{ //Canola Fluid String canolaOil = "canolaoil"; if(!FluidRegistry.isFluidRegistered(canolaOil) || ConfigBoolValues.PREVENT_CANOLA_OVERRIDE.isEnabled()){ - fluidCanolaOil = new FluidAA(canolaOil).setRarity(EnumRarity.uncommon); + fluidCanolaOil = new FluidAA(canolaOil, "blockCanolaOil").setRarity(EnumRarity.UNCOMMON); FluidRegistry.registerFluid(fluidCanolaOil); } else{ @@ -229,7 +229,7 @@ public class InitBlocks{ //Oil Fluid String oil = "oil"; if(!FluidRegistry.isFluidRegistered(oil) || ConfigBoolValues.PREVENT_OIL_OVERRIDE.isEnabled()){ - fluidOil = new FluidAA(oil).setRarity(EnumRarity.uncommon); + fluidOil = new FluidAA(oil, "blockOil").setRarity(EnumRarity.UNCOMMON); FluidRegistry.registerFluid(fluidOil); } else{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java index f9d627cc8..190391c3e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java @@ -30,7 +30,7 @@ public class BlockBase extends Block{ } private void register(){ - this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); + this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName()); if(this.shouldAddCreative()){ this.setCreativeTab(CreativeTab.instance); @@ -53,6 +53,6 @@ public class BlockBase extends Block{ } public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.common; + return EnumRarity.COMMON; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java index 12d93d11b..a5678a55f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java @@ -29,7 +29,7 @@ public class BlockBushBase extends BlockBush{ } private void register(){ - this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); + this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName()); if(this.shouldAddCreative()){ this.setCreativeTab(CreativeTab.instance); @@ -52,6 +52,6 @@ public class BlockBushBase extends BlockBush{ } public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.common; + return EnumRarity.COMMON; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java index dff258270..e3ab693e7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java @@ -28,7 +28,7 @@ public class BlockStair extends BlockStairs{ } public BlockStair(Block block, String name, int meta){ - super(block, meta); + super(block.getStateFromMeta(meta)); this.name = name; this.setLightOpacity(0); @@ -36,7 +36,7 @@ public class BlockStair extends BlockStairs{ } private void register(){ - this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); + this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName()); if(this.shouldAddCreative()){ this.setCreativeTab(CreativeTab.instance); @@ -59,6 +59,6 @@ public class BlockStair extends BlockStairs{ } public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.common; + return EnumRarity.COMMON; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java index cedfd9fbe..ecab947e4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java @@ -14,11 +14,11 @@ import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockWall; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -45,7 +45,7 @@ public class BlockWallAA extends BlockWall{ } private void register(){ - this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); + this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName()); if(this.shouldAddCreative()){ this.setCreativeTab(CreativeTab.instance); @@ -68,13 +68,7 @@ public class BlockWallAA extends BlockWall{ } public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.common; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta){ - return this.baseBlock.getIcon(side, this.meta); + return EnumRarity.COMMON; } @SuppressWarnings("unchecked") @@ -85,7 +79,7 @@ public class BlockWallAA extends BlockWall{ } @Override - public int damageDropped(int meta){ - return meta; + public int damageDropped(IBlockState state){ + return this.getMetaFromState(state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/ItemBlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/ItemBlockBase.java index e52750253..37578bd51 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/ItemBlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/ItemBlockBase.java @@ -36,26 +36,26 @@ public class ItemBlockBase extends ItemBlock{ @Override public EnumRarity getRarity(ItemStack stack){ - if(this.field_150939_a instanceof BlockBase){ - return ((BlockBase)this.field_150939_a).getRarity(stack); + if(this.block instanceof BlockBase){ + return ((BlockBase)this.block).getRarity(stack); } - else if(this.field_150939_a instanceof BlockContainerBase){ - return ((BlockContainerBase)this.field_150939_a).getRarity(stack); + else if(this.block instanceof BlockContainerBase){ + return ((BlockContainerBase)this.block).getRarity(stack); } - else if(this.field_150939_a instanceof BlockFluidFlowing){ - return ((BlockFluidFlowing)this.field_150939_a).getRarity(stack); + else if(this.block instanceof BlockFluidFlowing){ + return ((BlockFluidFlowing)this.block).getRarity(stack); } - else if(this.field_150939_a instanceof BlockPlant){ - return ((BlockPlant)this.field_150939_a).getRarity(stack); + else if(this.block instanceof BlockPlant){ + return ((BlockPlant)this.block).getRarity(stack); } - else if(this.field_150939_a instanceof BlockStair){ - return ((BlockStair)this.field_150939_a).getRarity(stack); + else if(this.block instanceof BlockStair){ + return ((BlockStair)this.block).getRarity(stack); } - else if(this.field_150939_a instanceof BlockWallAA){ - return ((BlockWallAA)this.field_150939_a).getRarity(stack); + else if(this.block instanceof BlockWallAA){ + return ((BlockWallAA)this.block).getRarity(stack); } - else if(this.field_150939_a instanceof BlockBushBase){ - return ((BlockBushBase)this.field_150939_a).getRarity(stack); + else if(this.block instanceof BlockBushBase){ + return ((BlockBushBase)this.block).getRarity(stack); } else{ return Util.FALLBACK_RARITY; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java index 9d0bfdbda..58847b5fc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; import net.minecraft.tileentity.TileEntity; import org.lwjgl.opengl.GL11; @@ -22,14 +23,14 @@ public class RenderLaserRelay extends RenderTileEntity{ } @Override - public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5){ + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int par6){ GL11.glPushMatrix(); GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.0F, -2.0F, 0.0F); this.bindTexture(resLoc); - int meta = tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord); + int meta = Position.fromTileEntity(tile).getMetadata(tile.getWorld()); if(meta == 0){ GL11.glRotatef(180F, 1F, 0F, 0F); GL11.glTranslatef(0F, -2F, 0F); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java index cd4b4866e..1ef11319d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; import de.ellpeck.actuallyadditions.mod.misc.cloud.ISmileyCloudEasterEgg; import de.ellpeck.actuallyadditions.mod.misc.cloud.SmileyCloudEasterEggs; @@ -19,8 +20,6 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -34,7 +33,7 @@ public class RenderSmileyCloud extends RenderTileEntity{ } @Override - public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5){ + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int partial){ if(!(tile instanceof TileEntitySmileyCloud)){ return; } @@ -43,7 +42,7 @@ public class RenderSmileyCloud extends RenderTileEntity{ GL11.glPushMatrix(); { if(theCloud.flyHeight == 0){ - theCloud.flyHeight = tile.getWorldObj().rand.nextInt(30)+30; + theCloud.flyHeight = tile.getWorld().rand.nextInt(30)+30; } int bobHeight = theCloud.flyHeight; double theTime = Minecraft.getSystemTime(); @@ -67,7 +66,7 @@ public class RenderSmileyCloud extends RenderTileEntity{ GL11.glPushMatrix(); { if(theModel.doesRotate()){ - int meta = tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord); + int meta = Position.fromTileEntity(tile).getMetadata(tile.getWorld()); if(meta == 0){ GL11.glRotatef(180F, 0F, 1F, 0F); } @@ -113,8 +112,8 @@ public class RenderSmileyCloud extends RenderTileEntity{ GL11.glRotatef(180F, 1F, 0F, 0F); GL11.glRotatef(180F, 0F, 1F, 0F); - GL11.glRotatef(-RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(RenderManager.instance.playerViewX, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(-Minecraft.getMinecraft().getRenderManager().playerViewY, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(Minecraft.getMinecraft().getRenderManager().playerViewX, 1.0F, 0.0F, 0.0F); float f = 1.6F; float f1 = 0.016666668F*f; GL11.glScalef(-f1, -f1, f1); @@ -123,20 +122,21 @@ public class RenderSmileyCloud extends RenderTileEntity{ GL11.glDepthMask(false); GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(770, 771, 1, 0); - Tessellator tessellator = Tessellator.instance; + //TODO Fix nameplate with Smiley Cloud + /*Tessellator tessellator = Tessellator.getInstance(); GL11.glDisable(GL11.GL_TEXTURE_2D); tessellator.startDrawingQuads(); - int i = Minecraft.getMinecraft().fontRenderer.getStringWidth(theCloud.name)/2; + int i = Minecraft.getMinecraft().fontRendererObj.getStringWidth(theCloud.name)/2; tessellator.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F); tessellator.addVertex(-i-1, -1.0D, 0.0D); tessellator.addVertex(-i-1, 8.0D, 0.0D); tessellator.addVertex(i+1, 8.0D, 0.0D); tessellator.addVertex(i+1, -1.0D, 0.0D); tessellator.draw(); - GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glEnable(GL11.GL_TEXTURE_2D);*/ GL11.glDepthMask(true); - Minecraft.getMinecraft().fontRenderer.drawString(theCloud.name, -Minecraft.getMinecraft().fontRenderer.getStringWidth(theCloud.name)/2, 0, StringUtil.DECIMAL_COLOR_WHITE); + Minecraft.getMinecraft().fontRendererObj.drawString(theCloud.name, -Minecraft.getMinecraft().fontRendererObj.getStringWidth(theCloud.name)/2, 0, StringUtil.DECIMAL_COLOR_WHITE); GL11.glEnable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_BLEND); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java index 83878b964..e445aeed7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -28,7 +29,7 @@ public class RenderTileEntity extends TileEntitySpecialRenderer{ } @Override - public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5){ + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int i){ GL11.glPushMatrix(); GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); @@ -36,7 +37,7 @@ public class RenderTileEntity extends TileEntitySpecialRenderer{ this.bindTexture(resLoc); if(theModel.doesRotate()){ - int meta = tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord); + int meta = Position.fromTileEntity(tile).getMetadata(tile.getWorld()); if(meta == 0){ GL11.glRotatef(180F, 0F, 1F, 0F); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java index 50432e30c..7a55f86fe 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java @@ -90,8 +90,9 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ this.saveOnClose = saveOnClose; } + @Override public void drawHoveringText(List list, int x, int y){ - super.func_146283_a(list, x, y); + super.drawHoveringText(list, x, y); } public FontRenderer getFontRenderer(){ @@ -181,7 +182,7 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ else{ if(AND_HIS_NAME_IS.length > this.hisNameIsAt && AND_HIS_NAME_IS[this.hisNameIsAt] == key){ if(this.hisNameIsAt+1 >= AND_HIS_NAME_IS.length){ - Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147673_a(new ResourceLocation(ModUtil.MOD_ID_LOWER, "duhDuhDuhDuuuh"))); + Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation(ModUtil.MOD_ID_LOWER, "duhDuhDuhDuuuh"))); ModUtil.LOGGER.info("AND HIS NAME IS JOHN CENA DUH DUH DUH DUUUH"); this.hisNameIsAt = 0; } @@ -211,7 +212,12 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ BookletUtils.openIndexEntry(this, null, 1, true); } } - super.mouseClicked(par1, par2, par3); + try{ + super.mouseClicked(par1, par2, par3); + } + catch(Exception e){ + ModUtil.LOGGER.error("Something bad happened when trying to click a button in the booklet!", e); + } } @Override @@ -283,11 +289,11 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ ArrayList updateHover = new ArrayList(); if(UpdateChecker.checkFailed){ - updateHover.add(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.failed")).getFormattedText()); + updateHover.add(IChatComponent.Serializer.jsonToComponent(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.failed")).getFormattedText()); } else if(UpdateChecker.needsUpdateNotify){ - updateHover.add(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.generic")).getFormattedText()); - updateHover.add(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersion)).getFormattedText()); + updateHover.add(IChatComponent.Serializer.jsonToComponent(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.generic")).getFormattedText()); + updateHover.add(IChatComponent.Serializer.jsonToComponent(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersion)).getFormattedText()); updateHover.add(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.buttonOptions")); } this.buttonUpdate = new TexturedButton(4, this.guiLeft-11, this.guiTop-11, 245, 0, 11, 11, updateHover); @@ -327,7 +333,7 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ this.buttonList.add(this.bookmarkButtons[i]); } - this.searchField = new GuiTextField(this.fontRendererObj, guiLeft+148, guiTop+162, 66, 10); + this.searchField = new GuiTextField(4500, this.fontRendererObj, guiLeft+148, guiTop+162, 66, 10); this.searchField.setMaxStringLength(30); this.searchField.setEnableBackgroundDrawing(false); this.searchField.setCanLoseFocus(false); @@ -366,7 +372,12 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ BookletUtils.handlePreviousPage(this); } } - super.handleMouseInput(); + try{ + super.handleMouseInput(); + } + catch(Exception e){ + ModUtil.LOGGER.error("Something bad happened when trying to click a button in the booklet!", e); + } } @Override @@ -404,8 +415,8 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ @Override public void renderTooltipAndTransferButton(BookletPage from, ItemStack stack, int x, int y, boolean renderTransferButton, boolean mousePressed){ - boolean flagBefore = this.mc.fontRenderer.getUnicodeFlag(); - this.mc.fontRenderer.setUnicodeFlag(false); + boolean flagBefore = this.mc.fontRendererObj.getUnicodeFlag(); + this.mc.fontRendererObj.setUnicodeFlag(false); List list = stack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips); @@ -426,14 +437,14 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ if(mousePressed){ BookletUtils.openIndexEntry(this, page.getChapter().getEntry(), ActuallyAdditionsAPI.bookletEntries.indexOf(page.getChapter().getEntry())/GuiBooklet.CHAPTER_BUTTONS_AMOUNT+1, true); BookletUtils.openChapter(this, page.getChapter(), page); - Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); + Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F)); } } } this.drawHoveringText(list, x, y); - this.mc.fontRenderer.setUnicodeFlag(flagBefore); + this.mc.fontRendererObj.setUnicodeFlag(flagBefore); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java index 485893374..07c5ad3e4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java @@ -36,7 +36,7 @@ public class GuiBookletStand extends GuiBooklet{ @Override public void actionPerformed(GuiButton button){ if(button == this.buttonSetPage){ - PacketHandler.theNetwork.sendToServer(new PacketBookletStandButton(this.theStand.xCoord, this.theStand.yCoord, this.theStand.zCoord, this.theStand.getWorldObj(), Minecraft.getMinecraft().thePlayer, this.currentEntrySet)); + PacketHandler.theNetwork.sendToServer(new PacketBookletStandButton(this.theStand.getPos().getX(), this.theStand.getPos().getY(), this.theStand.getPos().getZ(), this.theStand.getWorld(), Minecraft.getMinecraft().thePlayer, this.currentEntrySet)); } super.actionPerformed(button); } @@ -54,15 +54,15 @@ public class GuiBookletStand extends GuiBooklet{ this.buttonSetPage = new GuiButton(-100, this.guiLeft+this.xSize+10, this.guiTop+10, 100, 20, "Set Page"){ @Override public void drawButton(Minecraft mc, int x, int y){ - boolean unicodeBefore = mc.fontRenderer.getUnicodeFlag(); - mc.fontRenderer.setUnicodeFlag(false); + boolean unicodeBefore = mc.fontRendererObj.getUnicodeFlag(); + mc.fontRendererObj.setUnicodeFlag(false); super.drawButton(mc, x, y); - mc.fontRenderer.setUnicodeFlag(unicodeBefore); + mc.fontRendererObj.setUnicodeFlag(unicodeBefore); } }; this.buttonList.add(this.buttonSetPage); - this.buttonSetPage.visible = Objects.equals(Minecraft.getMinecraft().thePlayer.getCommandSenderName(), this.theStand.assignedPlayer); + this.buttonSetPage.visible = Objects.equals(Minecraft.getMinecraft().thePlayer.getName(), this.theStand.assignedPlayer); //Open the pages the book was assigned BookletUtils.openIndexEntry(this, this.theStand.assignedEntry.entry, this.theStand.assignedEntry.pageInIndex, true); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java index 223fbfc6a..bdbf2c783 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java @@ -58,8 +58,8 @@ public class BookmarkButton extends GuiButton{ if(this.visible){ minecraft.getTextureManager().bindTexture(GuiBooklet.resLoc); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.field_146123_n = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; - int k = this.getHoverState(this.field_146123_n); + this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; + int k = this.getHoverState(this.hovered); if(k == 0){ k = 1; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java index 4d8321c17..1a3566f20 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java @@ -32,7 +32,7 @@ public class IndexButton extends GuiButton{ public void drawButton(Minecraft minecraft, int mouseX, int mouseY){ if(this.visible){ 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; + this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition+this.width && mouseY < this.yPosition+this.height; GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(770, 771, 1, 0); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); @@ -48,9 +48,9 @@ public class IndexButton extends GuiButton{ } } - if(this.field_146123_n){ + if(this.hovered){ GL11.glPushMatrix(); - AssetUtil.drawHorizontalGradientRect(this.xPosition+textOffsetX-1, this.yPosition+this.height-1, this.xPosition+this.gui.getFontRenderer().getStringWidth(this.displayString)+textOffsetX+1, this.yPosition+this.height, 0x80 << 24 | 22271, 22271); + AssetUtil.drawHorizontalGradientRect(this.xPosition+textOffsetX-1, this.yPosition+this.height-1, this.xPosition+this.gui.getFontRenderer().getStringWidth(this.displayString)+textOffsetX+1, this.yPosition+this.height, 0x80 << 24 | 22271, 22271, this.zLevel); GL11.glPopMatrix(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java index 47778c1eb..6a19b422a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java @@ -48,8 +48,8 @@ public class TexturedButton extends GuiButton{ if(this.visible){ minecraft.getTextureManager().bindTexture(GuiBooklet.resLoc); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.field_146123_n = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; - int k = this.getHoverState(this.field_146123_n); + this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; + int k = this.getHoverState(this.hovered); if(k == 0){ k = 1; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java index 4523443c8..a1c4fed7f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java @@ -46,15 +46,15 @@ public class PageCoffeeRecipe extends BookletPageAA{ @SideOnly(Side.CLIENT) public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ String strg = "Coffee Machine Recipe"; - Minecraft.getMinecraft().fontRenderer.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRenderer.getStringWidth(strg)/2, gui.getGuiTop()+10, 0); + Minecraft.getMinecraft().fontRendererObj.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRendererObj.getStringWidth(strg)/2, gui.getGuiTop()+10, 0); String text = gui.getCurrentEntrySet().page.getText(); if(text != null && !text.isEmpty()){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, text, gui.getGuiLeft()+14, gui.getGuiTop()+100, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+100, 115, 0, false); } if(this.ingredient.maxAmplifier > 0){ - Minecraft.getMinecraft().fontRenderer.drawString("Maximum Amplifier: "+this.ingredient.maxAmplifier, gui.getGuiLeft()+19+5, gui.getGuiTop()+20+60, 0); + Minecraft.getMinecraft().fontRendererObj.drawString("Maximum Amplifier: "+this.ingredient.maxAmplifier, gui.getGuiLeft()+19+5, gui.getGuiTop()+20+60, 0); } for(int i = 0; i < 2; i++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java index f879909b2..f0a10765b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java @@ -87,16 +87,16 @@ public class PageCrafting extends BookletPageAA{ IRecipe recipe = this.recipes[this.recipePos]; if(recipe == null){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.getGuiLeft()+14, gui.getGuiTop()+15, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.getGuiLeft()+14, gui.getGuiTop()+15, 115, 0, false); } else{ String strg = StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+"."+(recipe instanceof ShapedRecipes ? "shapedRecipe" : (recipe instanceof ShapelessRecipes ? "shapelessRecipe" : (recipe instanceof ShapelessOreRecipe ? "shapelessOreRecipe" : "shapedOreRecipe")))); - Minecraft.getMinecraft().fontRenderer.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRenderer.getStringWidth(strg)/2, gui.getGuiTop()+10, 0); + Minecraft.getMinecraft().fontRendererObj.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRendererObj.getStringWidth(strg)/2, gui.getGuiTop()+10, 0); } String text = gui.getCurrentEntrySet().page.getText(); if(text != null && !text.isEmpty()){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, text, gui.getGuiLeft()+14, gui.getGuiTop()+90, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+90, 115, 0, false); } if(recipe != null){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java index 356e631d7..5d8aa51a2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java @@ -37,7 +37,7 @@ public class PagePicture extends PageTextOnly{ String text = gui.getCurrentEntrySet().page.getText(); if(text != null && !text.isEmpty()){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, text, gui.getGuiLeft()+14, gui.getGuiTop()+textStartY, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+textStartY, 115, 0, false); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java index adc883a3c..e61f7b7b8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java @@ -72,16 +72,16 @@ public class PageReconstructor extends BookletPageAA{ public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ LensNoneRecipe recipe = this.recipes[this.recipePos]; if(recipe == null){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.getGuiLeft()+14, gui.getGuiTop()+15, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.getGuiLeft()+14, gui.getGuiTop()+15, 115, 0, false); } else{ String strg = "Atomic Reconstructor"; - Minecraft.getMinecraft().fontRenderer.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRenderer.getStringWidth(strg)/2, gui.getGuiTop()+10, 0); + Minecraft.getMinecraft().fontRendererObj.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRendererObj.getStringWidth(strg)/2, gui.getGuiTop()+10, 0); } String text = gui.getCurrentEntrySet().page.getText(); if(text != null && !text.isEmpty()){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, text, gui.getGuiLeft()+14, gui.getGuiTop()+100, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+100, 115, 0, false); } if(recipe != null){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTextOnly.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTextOnly.java index 11d28dda9..18155443e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTextOnly.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageTextOnly.java @@ -41,7 +41,7 @@ public class PageTextOnly extends BookletPageAA{ public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ String text = gui.getCurrentEntrySet().page.getText(); if(text != null && !text.isEmpty()){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, text, gui.getGuiLeft()+14, gui.getGuiTop()+9, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+9, 115, 0, false); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiConfiguration.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiConfiguration.java index b5256965c..4e90478b4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiConfiguration.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/GuiConfiguration.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.config; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.gui.GuiScreen; -import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.ConfigElement; import net.minecraftforge.fml.client.config.GuiConfig; import net.minecraftforge.fml.client.config.IConfigElement; @@ -31,7 +30,7 @@ public class GuiConfiguration extends GuiConfig{ for(int i = 0; i < ConfigCategories.values().length; i++){ ConfigCategories cat = ConfigCategories.values()[i]; ConfigurationHandler.config.setCategoryComment(cat.name, cat.comment); - list.add(new ConfigElement(ConfigurationHandler.config.getCategory(cat.name))); + list.add(new ConfigElement(ConfigurationHandler.config.getCategory(cat.name))); } return list; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java index ce9c4ad1a..527d9a8ca 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java @@ -73,7 +73,7 @@ public class FoodCrafting{ 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'M', new ItemStack(Blocks.brown_mushroom), 'C', "cropCarrot", - 'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD), + 'F', new ItemStack(Items.cooked_fish, 1, Util.WILDCARD), 'K', knifeStack, 'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()))); recipePizza = Util.GetRecipes.lastIRecipe(); @@ -105,7 +105,7 @@ public class FoodCrafting{ "KCP", "FB ", "PCP", 'P', new ItemStack(Items.paper), 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), - 'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD), + 'F', new ItemStack(Items.cooked_fish, 1, Util.WILDCARD), 'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 'K', knifeStack)); recipeSubSandwich = Util.GetRecipes.lastIRecipe(); @@ -132,7 +132,7 @@ public class FoodCrafting{ if(ConfigCrafting.FISH_N_CHIPS.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()), "FIF", " P ", - 'I', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD), + 'I', new ItemStack(Items.cooked_fish, 1, Util.WILDCARD), 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()))); recipeFishNChips = Util.GetRecipes.lastIRecipe(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java index 77b3e0dfc..163a584fa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/TooltipEvent.java @@ -66,7 +66,7 @@ public class TooltipEvent{ } //Disabling Info - event.toolTip.addAll(Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(EnumChatFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".disablingInfo.desc"), 200)); + event.toolTip.addAll(Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(EnumChatFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".disablingInfo.desc"), 200)); } else{ if(ConfigBoolValues.CTRL_INFO_FOR_EXTRA_INFO.isEnabled()){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java index 6703a23bd..6caefa3ae 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.event; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheWildPlants; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; @@ -18,6 +19,7 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; +import net.minecraft.block.BlockBush; import net.minecraft.block.material.Material; import net.minecraft.world.biome.BiomeGenOcean; import net.minecraftforge.event.terraingen.DecorateBiomeEvent; @@ -31,7 +33,7 @@ public class WorldDecorationEvent{ @SubscribeEvent public void onWorldDecoration(DecorateBiomeEvent.Decorate event){ if((event.getResult() == Event.Result.ALLOW || event.getResult() == Event.Result.DEFAULT)){ - if(Util.arrayContains(ConfigValues.plantDimensionBlacklist, event.world.provider.dimensionId) < 0){ + if(Util.arrayContains(ConfigValues.plantDimensionBlacklist, event.world.provider.getDimensionId()) < 0){ this.generateRice(event); this.genPlantNormally(InitBlocks.blockWildPlant, TheWildPlants.CANOLA.ordinal(), ConfigIntValues.CANOLA_AMOUNT.getValue(), ConfigBoolValues.DO_CANOLA_GEN.isEnabled(), Material.grass, event); this.genPlantNormally(InitBlocks.blockWildPlant, TheWildPlants.FLAX.ordinal(), ConfigIntValues.FLAX_AMOUNT.getValue(), ConfigBoolValues.DO_FLAX_GEN.isEnabled(), Material.grass, event); @@ -42,15 +44,14 @@ public class WorldDecorationEvent{ //Generate Treasure Chests if(ConfigBoolValues.DO_TREASURE_CHEST_GEN.isEnabled()){ if(event.rand.nextInt(300) == 0){ - int genX = event.chunkX+event.rand.nextInt(16)+8; - int genZ = event.chunkZ+event.rand.nextInt(16)+8; - int genY = event.world.getTopSolidOrLiquidBlock(genX, genZ); + Position randomPos = new Position(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); + randomPos = Position.fromBlockPos(event.world.getTopSolidOrLiquidBlock(randomPos)); - if(event.world.getBiomeGenForCoords(genX, genZ) instanceof BiomeGenOcean){ - if(genY >= 25 && genY <= 45){ - if(event.world.getBlock(genX, genY, genZ).getMaterial() == Material.water){ - if(event.world.getBlock(genX, genY-1, genZ).getMaterial().isSolid()){ - event.world.setBlock(genX, genY, genZ, InitBlocks.blockTreasureChest, event.rand.nextInt(4), 2); + if(event.world.getBiomeGenForCoords(randomPos) instanceof BiomeGenOcean){ + if(randomPos.getY() >= 25 && randomPos.getY() <= 45){ + if(randomPos.getBlock(event.world).getMaterial() == Material.water){ + if(randomPos.getOffsetPosition(0, -1, 0).getMaterial(event.world).isSolid()){ + randomPos.setBlock(event.world, InitBlocks.blockTreasureChest, event.rand.nextInt(4), 2); } } } @@ -64,16 +65,15 @@ public class WorldDecorationEvent{ if(ConfigBoolValues.DO_RICE_GEN.isEnabled()){ for(int i = 0; i < ConfigIntValues.RICE_AMOUNT.getValue(); i++){ if(event.rand.nextInt(50) == 0){ - int genX = event.chunkX+event.rand.nextInt(16)+8; - int genZ = event.chunkZ+event.rand.nextInt(16)+8; - int genY = event.world.getTopSolidOrLiquidBlock(genX, genZ); + Position randomPos = new Position(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); + randomPos = Position.fromBlockPos(event.world.getTopSolidOrLiquidBlock(randomPos)); - if(event.world.getBlock(genX, genY, genZ).getMaterial() == Material.water){ - ArrayList blocksAroundBottom = WorldUtil.getMaterialsAround(event.world, genX, genY, genZ); - ArrayList blocksAroundTop = WorldUtil.getMaterialsAround(event.world, genX, genY+1, genZ); + if(randomPos.getMaterial(event.world) == Material.water){ + ArrayList blocksAroundBottom = WorldUtil.getMaterialsAround(event.world, randomPos); + ArrayList blocksAroundTop = WorldUtil.getMaterialsAround(event.world, randomPos.getOffsetPosition(0, 1, 0)); if(blocksAroundBottom.contains(Material.grass) || blocksAroundBottom.contains(Material.ground) || blocksAroundBottom.contains(Material.rock) || blocksAroundBottom.contains(Material.sand)){ - if(!blocksAroundTop.contains(Material.water) && event.world.getBlock(genX, genY+1, genZ).getMaterial() == Material.air){ - event.world.setBlock(genX, genY+1, genZ, InitBlocks.blockWildPlant, TheWildPlants.RICE.ordinal(), 2); + if(!blocksAroundTop.contains(Material.water) && randomPos.getMaterial(event.world) == Material.air){ + randomPos.getOffsetPosition(0, 1, 0).setBlock(event.world, InitBlocks.blockWildPlant, TheWildPlants.RICE.ordinal(), 2); } } } @@ -86,14 +86,14 @@ public class WorldDecorationEvent{ if(doIt){ for(int i = 0; i < amount; i++){ if(event.rand.nextInt(400) == 0){ - int genX = event.chunkX+event.rand.nextInt(16)+8; - int genZ = event.chunkZ+event.rand.nextInt(16)+8; - int genY = event.world.getTopSolidOrLiquidBlock(genX, genZ)-1; + Position randomPos = new Position(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); + randomPos = Position.fromBlockPos(event.world.getTopSolidOrLiquidBlock(randomPos)); - if(event.world.getBlock(genX, genY, genZ).getMaterial() == blockBelow){ - event.world.setBlock(genX, genY+1, genZ, plant, meta, 2); - if(!plant.canBlockStay(event.world, genX, genY+1, genZ)){ - event.world.setBlockToAir(genX, genY+1, genZ); + if(randomPos.getMaterial(event.world) == blockBelow){ + Position top = randomPos.getOffsetPosition(0, 1, 0); + top.setBlock(event.world, plant, meta, 2); + if(plant instanceof BlockBush && !((BlockBush)plant).canBlockStay(event.world, top, top.getBlockState(event.world))){ + event.world.setBlockToAir(top); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/InitVillager.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/InitVillager.java index 1c1871173..f46d3b9a2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/InitVillager.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/InitVillager.java @@ -11,16 +11,8 @@ package de.ellpeck.actuallyadditions.mod.gen; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; -import de.ellpeck.actuallyadditions.mod.items.InitItems; -import de.ellpeck.actuallyadditions.mod.items.metalists.TheJams; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.gen.structure.MapGenStructureIO; -import net.minecraftforge.common.ChestGenHooks; -import net.minecraftforge.fml.common.registry.VillagerRegistry; public class InitVillager{ @@ -38,7 +30,8 @@ public class InitVillager{ } private static void initJamVillagePart(){ - int jamID = ConfigIntValues.JAM_VILLAGER_ID.getValue(); + //TODO Fix villager + /*int jamID = ConfigIntValues.JAM_VILLAGER_ID.getValue(); VillagerRegistry.instance().registerVillagerId(jamID); VillagerRegistry.instance().registerVillageTradeHandler(jamID, new JamVillagerTradeHandler()); @@ -52,12 +45,13 @@ public class InitVillager{ ChestGenHooks.addItem(JAM_HOUSE_CHEST_NAME, new WeightedRandomChestContent(new ItemStack(Items.potionitem), 1, 1, 20)); VillagerRegistry.instance().registerVillageCreationHandler(new VillageJamHouseHandler()); - MapGenStructureIO.func_143031_a(VillageComponentJamHouse.class, ModUtil.MOD_ID_LOWER+":jamHouseStructure"); + MapGenStructureIO.func_143031_a(VillageComponentJamHouse.class, ModUtil.MOD_ID_LOWER+":jamHouseStructure");*/ } private static void initCustomCropFieldPart(){ - VillagerRegistry.instance().registerVillageCreationHandler(new VillageCustomCropFieldHandler()); - MapGenStructureIO.func_143031_a(VillageComponentCustomCropField.class, ModUtil.MOD_ID_LOWER+":customCropFieldStructure"); + //TODO Fix village + //VillagerRegistry.instance().registerVillageCreationHandler(new VillageCustomCropFieldHandler()); + MapGenStructureIO.registerStructureComponent(VillageComponentCustomCropField.class, ModUtil.MOD_ID_LOWER+":customCropFieldStructure"); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java index 821c09b24..3e6be8436 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.gen; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; @@ -17,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; +import net.minecraft.block.state.pattern.BlockHelper; import net.minecraft.init.Blocks; import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -40,8 +42,8 @@ public class OreGen implements IWorldGenerator{ @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){ - if(world.provider.terrainType != WorldType.FLAT && Util.arrayContains(ConfigValues.oreGenDimensionBlacklist, world.provider.dimensionId) < 0){ - switch(world.provider.dimensionId){ + if(world.getWorldType() != WorldType.FLAT && Util.arrayContains(ConfigValues.oreGenDimensionBlacklist, world.provider.getDimensionId()) < 0){ + switch(world.provider.getDimensionId()){ case -1: generateNether(world, random, chunkX*16, chunkZ*16); //case 0: @@ -77,7 +79,7 @@ public class OreGen implements IWorldGenerator{ int posX = blockXPos+random.nextInt(16); int posY = minY+random.nextInt(yDiff); int posZ = blockZPos+random.nextInt(16); - new WorldGenMinable(block, meta, maxVeinSize, blockIn).generate(world, random, posX, posY, posZ); + new WorldGenMinable(block.getStateFromMeta(meta), maxVeinSize, BlockHelper.forBlock(blockIn)).generate(world, random, new Position(posX, posY, posZ)); } } else{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentCustomCropField.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentCustomCropField.java index 98f23d755..2106b9729 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentCustomCropField.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentCustomCropField.java @@ -10,18 +10,8 @@ package de.ellpeck.actuallyadditions.mod.gen; -import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.util.MathHelper; -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 java.util.List; -import java.util.Random; - public class VillageComponentCustomCropField extends StructureVillagePieces.House1{ private static final int xSize = 13; @@ -35,7 +25,8 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous } - public VillageComponentCustomCropField(StructureBoundingBox boundingBox, int par5){ + //TODO Fix village + /*public VillageComponentCustomCropField(StructureBoundingBox boundingBox, int par5){ this.coordBaseMode = par5; this.boundingBox = boundingBox; } @@ -108,5 +99,5 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous default: return InitBlocks.blockCanola; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageCustomCropFieldHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageCustomCropFieldHandler.java index e627eb36a..f5d6af12d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageCustomCropFieldHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageCustomCropFieldHandler.java @@ -13,10 +13,10 @@ package de.ellpeck.actuallyadditions.mod.gen; import net.minecraft.world.gen.structure.StructureVillagePieces; import net.minecraftforge.fml.common.registry.VillagerRegistry; -import java.util.List; import java.util.Random; -public class VillageCustomCropFieldHandler implements VillagerRegistry.IVillageCreationHandler{ +//TODO Fix village +public abstract class VillageCustomCropFieldHandler implements VillagerRegistry.IVillageCreationHandler{ @Override public StructureVillagePieces.PieceWeight getVillagePieceWeight(Random random, int i){ @@ -28,8 +28,8 @@ public class VillageCustomCropFieldHandler implements VillagerRegistry.IVillageC return VillageComponentCustomCropField.class; } - @Override + /*@Override public Object buildComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5){ return VillageComponentCustomCropField.buildComponent(pieces, p1, p2, p3, p4); - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCrafter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCrafter.java index 7db458e36..25c9dc220 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCrafter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCrafter.java @@ -102,7 +102,7 @@ public class ContainerCrafter extends Container{ if(!this.world.isRemote){ for(int i = 0; i < 9; ++i){ - ItemStack stack = this.craftMatrix.getStackInSlotOnClosing(i); + ItemStack stack = this.craftMatrix.removeStackFromSlot(i); if(stack != null){ player.dropPlayerItemWithRandomChoice(stack, false); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java index b048ad84d..0bf493f40 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java @@ -17,7 +17,7 @@ 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.inventory.SlotFurnace; +import net.minecraft.inventory.SlotFurnaceOutput; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; @@ -30,9 +30,9 @@ public class ContainerFurnaceDouble extends Container{ this.tileFurnace = (TileEntityFurnaceDouble)tile; this.addSlotToContainer(new Slot(this.tileFurnace, TileEntityFurnaceDouble.SLOT_INPUT_1, 51, 21)); - this.addSlotToContainer(new SlotFurnace(inventory.player, this.tileFurnace, TileEntityFurnaceDouble.SLOT_OUTPUT_1, 51, 69)); + this.addSlotToContainer(new SlotFurnaceOutput(inventory.player, this.tileFurnace, TileEntityFurnaceDouble.SLOT_OUTPUT_1, 51, 69)); this.addSlotToContainer(new Slot(this.tileFurnace, TileEntityFurnaceDouble.SLOT_INPUT_2, 109, 21)); - this.addSlotToContainer(new SlotFurnace(inventory.player, this.tileFurnace, TileEntityFurnaceDouble.SLOT_OUTPUT_2, 108, 69)); + this.addSlotToContainer(new SlotFurnaceOutput(inventory.player, this.tileFurnace, TileEntityFurnaceDouble.SLOT_OUTPUT_2, 108, 69)); for(int i = 0; i < 3; i++){ for(int j = 0; j < 9; j++){ @@ -67,7 +67,7 @@ public class ContainerFurnaceDouble extends Container{ //Other Slots in Inventory excluded else if(slot >= inventoryStart){ //Shift from Inventory - if(FurnaceRecipes.smelting().getSmeltingResult(newStack) != null){ + if(FurnaceRecipes.instance().getSmeltingResult(newStack) != null){ if(!this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_1, TileEntityFurnaceDouble.SLOT_INPUT_1+1, false)){ if(!this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_2, TileEntityFurnaceDouble.SLOT_INPUT_2+1, false)){ return null; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java index 3af5ee610..2cc63478a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.inventory; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.booklet.GuiBookletStand; @@ -32,7 +33,7 @@ public class GuiHandler implements IGuiHandler{ public Object getServerGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){ TileEntityBase tile = null; if(GuiTypes.values()[id].checkTileEntity){ - tile = (TileEntityBase)world.getTileEntity(x, y, z); + tile = (TileEntityBase)world.getTileEntity(new Position(x, y, z)); } switch(GuiTypes.values()[id]){ case FEEDER: @@ -96,7 +97,7 @@ public class GuiHandler implements IGuiHandler{ public Object getClientGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){ TileEntityBase tile = null; if(GuiTypes.values()[id].checkTileEntity){ - tile = (TileEntityBase)world.getTileEntity(x, y, z); + tile = (TileEntityBase)world.getTileEntity(new Position(x, y, z)); } switch(GuiTypes.values()[id]){ case FEEDER: diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java index 5d879498f..70f2674da 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java @@ -42,18 +42,18 @@ public class GuiCanolaPress extends GuiContainer{ super.drawScreen(x, y, f); String text1 = this.press.storage.getEnergyStored()+"/"+this.press.storage.getMaxEnergyStored()+" RF"; if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text1), x, y); + this.drawHoveringText(Collections.singletonList(text1), x, y); } String text2 = StringUtil.getFluidInfo(this.press.tank); if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text2), x, y); + this.drawHoveringText(Collections.singletonList(text2), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.press.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.press.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java index 34284d992..0a99e1521 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java @@ -41,13 +41,13 @@ public class GuiCoalGenerator extends GuiContainer{ super.drawScreen(x, y, f); String text1 = this.generator.storage.getEnergyStored()+"/"+this.generator.storage.getMaxEnergyStored()+" RF"; if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text1), x, y); + this.drawHoveringText(Collections.singletonList(text1), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.generator.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.generator.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java index c84dd0562..38ce8c9d8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java @@ -42,13 +42,13 @@ public class GuiDirectionalBreaker extends GuiContainer{ String text1 = this.breaker.storage.getEnergyStored()+"/"+this.breaker.storage.getMaxEnergyStored()+" RF"; if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text1), x, y); + this.drawHoveringText(Collections.singletonList(text1), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.breaker.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.breaker.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java index d8a17b528..b37f9943a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java @@ -43,13 +43,13 @@ public class GuiFeeder extends GuiContainer{ super.drawScreen(x, y, f); if(x >= guiLeft+69 && y >= guiTop+30 && x <= guiLeft+69+10 && y <= guiTop+30+10){ String[] array = new String[]{(this.tileFeeder.currentAnimalAmount+" "+StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.animals")), ((this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < TileEntityFeeder.THRESHOLD) ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.enoughToBreed") : (this.tileFeeder.currentAnimalAmount >= TileEntityFeeder.THRESHOLD ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.tooMany") : StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.notEnough")))}; - this.func_146283_a(Arrays.asList(array), x, y); + this.drawHoveringText(Arrays.asList(array), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileFeeder.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileFeeder.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java index f8344d823..dedf85855 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java @@ -43,18 +43,18 @@ public class GuiFermentingBarrel extends GuiContainer{ String text1 = StringUtil.getFluidInfo(this.press.canolaTank); if(x >= guiLeft+61 && y >= guiTop+6 && x <= guiLeft+76 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text1), x, y); + this.drawHoveringText(Collections.singletonList(text1), x, y); } String text2 = StringUtil.getFluidInfo(this.press.oilTank); if(x >= guiLeft+99 && y >= guiTop+6 && x <= guiLeft+114 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text2), x, y); + this.drawHoveringText(Collections.singletonList(text2), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.press.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.press.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java index e4d74c735..15a04b4e5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java @@ -38,7 +38,7 @@ public class GuiGiantChest extends GuiContainer{ @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.chest.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.chest.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java index f35b9a896..71479c992 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java @@ -48,13 +48,13 @@ public class GuiGrinder extends GuiContainer{ super.drawScreen(x, y, f); String text = this.tileGrinder.storage.getEnergyStored()+"/"+this.tileGrinder.storage.getMaxEnergyStored()+" RF"; if((this.isDouble && x >= guiLeft+14 && y >= guiTop+6 && x <= guiLeft+29 && y <= guiTop+88) || (!this.isDouble && x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88)){ - this.func_146283_a(Collections.singletonList(text), x, y); + this.drawHoveringText(Collections.singletonList(text), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileGrinder.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileGrinder.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java index 84f85d8da..84df01c20 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java @@ -58,7 +58,7 @@ public class GuiMiner extends GuiContainer{ @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.miner.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.miner.getName()); } @Override @@ -77,6 +77,6 @@ public class GuiMiner extends GuiContainer{ @Override public void actionPerformed(GuiButton button){ - PacketHandler.theNetwork.sendToServer(new PacketGuiButton(miner.xCoord, miner.yCoord, miner.zCoord, miner.getWorldObj(), button.id, Minecraft.getMinecraft().thePlayer)); + PacketHandler.theNetwork.sendToServer(new PacketGuiButton(miner.getPos().getX(), miner.getPos().getY(), miner.getPos().getZ(), miner.getWorld(), button.id, Minecraft.getMinecraft().thePlayer)); } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java index 739d83c54..70f8657e4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java @@ -42,17 +42,17 @@ public class GuiOilGenerator extends GuiContainer{ super.drawScreen(x, y, f); String text1 = this.generator.storage.getEnergyStored()+"/"+this.generator.storage.getMaxEnergyStored()+" RF"; if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text1), x, y); + this.drawHoveringText(Collections.singletonList(text1), x, y); } String text2 = StringUtil.getFluidInfo(this.generator.tank); if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text2), x, y); + this.drawHoveringText(Collections.singletonList(text2), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.generator.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.generator.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java index 7674cfd8b..c6d823914 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java @@ -41,13 +41,13 @@ public class GuiRepairer extends GuiContainer{ super.drawScreen(x, y, f); String text = this.tileRepairer.storage.getEnergyStored()+"/"+this.tileRepairer.storage.getMaxEnergyStored()+" RF"; if(x >= guiLeft+28 && y >= guiTop+6 && x <= guiLeft+43 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text), x, y); + this.drawHoveringText(Collections.singletonList(text), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileRepairer.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileRepairer.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java index a43378617..02b7a52f9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java @@ -81,7 +81,7 @@ public class GuiXPSolidifier extends GuiContainer{ @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.solidifier.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.solidifier.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitForeignPaxels.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitForeignPaxels.java index 001d1be79..281ca1ec4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitForeignPaxels.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitForeignPaxels.java @@ -59,8 +59,8 @@ public class InitForeignPaxels{ Item shovel = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_shovel"); if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ - Item.ToolMaterial material = ((ItemTool)axe).func_150913_i(); - soPaxels[i] = new ItemAllToolAA(material, SO_REPAIR_NAMES[i], "paxelSO"+SO_NAMES[i], EnumRarity.rare, SO_COLORS[i]); + Item.ToolMaterial material = ((ItemTool)axe).getToolMaterial(); + soPaxels[i] = new ItemAllToolAA(material, SO_REPAIR_NAMES[i], "paxelSO"+SO_NAMES[i], EnumRarity.RARE, SO_COLORS[i]); if(ConfigCrafting.PAXELS.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(soPaxels[i], axe, pickaxe, hoe, sword, shovel)); @@ -87,8 +87,8 @@ public class InitForeignPaxels{ Item shovel = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Shovel"); if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ - Item.ToolMaterial material = ((ItemTool)axe).func_150913_i(); - mtPaxels[i] = new ItemAllToolAA(material, MT_REPAIR_NAMES[i], "paxelMT"+MT_NAMES[i], EnumRarity.rare, MT_COLORS[i]); + Item.ToolMaterial material = ((ItemTool)axe).getToolMaterial(); + mtPaxels[i] = new ItemAllToolAA(material, MT_REPAIR_NAMES[i], "paxelMT"+MT_NAMES[i], EnumRarity.RARE, MT_COLORS[i]); if(ConfigCrafting.PAXELS.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(mtPaxels[i], axe, pickaxe, hoe, sword, shovel)); @@ -115,8 +115,8 @@ public class InitForeignPaxels{ Item shovel = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.shovel"+TF_NAMES[i]); if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ - Item.ToolMaterial material = ((ItemTool)axe).func_150913_i(); - tfPaxels[i] = new ItemAllToolAA(material, "ingot"+TF_NAMES[i], "paxelTF"+TF_NAMES[i], EnumRarity.rare, TF_COLORS[i]); + Item.ToolMaterial material = ((ItemTool)axe).getToolMaterial(); + tfPaxels[i] = new ItemAllToolAA(material, "ingot"+TF_NAMES[i], "paxelTF"+TF_NAMES[i], EnumRarity.RARE, TF_COLORS[i]); if(ConfigCrafting.PAXELS.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(tfPaxels[i], axe, pickaxe, hoe, sword, shovel)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java index 3f59f4e37..64f96090b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java @@ -11,6 +11,7 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.internal.EntrySet; @@ -26,13 +27,13 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.profiler.Profiler; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; @@ -62,10 +63,10 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{ } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ){ + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing face, float hitX, float hitY, float hitZ){ if(player.isSneaking()){ - Block block = world.getBlock(x, y, z); - ItemStack blockStack = new ItemStack(block, 1, world.getBlockMetadata(x, y, z)); + Block block = Position.fromBlockPos(pos).getBlock(world); + ItemStack blockStack = new ItemStack(block, 1, Position.fromBlockPos(pos).getMetadata(world)); if(blockStack != null){ BookletPage page = BookletUtils.getFirstPageForStack(blockStack); if(page != null){ @@ -88,27 +89,15 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } @Override public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, MovingObjectPosition posHit, Profiler profiler, ScaledResolution resolution){ if(posHit != null){ - Block block = minecraft.theWorld.getBlock(posHit.blockX, posHit.blockY, posHit.blockZ); - if(block != null && !block.isAir(minecraft.theWorld, posHit.blockX, posHit.blockY, posHit.blockZ)){ - ItemStack blockStack = new ItemStack(block, 1, minecraft.theWorld.getBlockMetadata(posHit.blockX, posHit.blockY, posHit.blockZ)); + Block block = Position.fromBlockPos(posHit.getBlockPos()).getBlock(minecraft.theWorld); + if(block != null && !block.isAir(minecraft.theWorld, posHit.getBlockPos())){ + ItemStack blockStack = new ItemStack(block, 1, Position.fromBlockPos(posHit.getBlockPos()).getMetadata(minecraft.theWorld)); if(blockStack != null){ int height = resolution.getScaledHeight()/5*3; if(player.isSneaking()){ @@ -119,18 +108,18 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{ String strg3 = "Right-Click to open..."; AssetUtil.renderStackToGui(page.getChapter().getDisplayItemStack() != null ? page.getChapter().getDisplayItemStack() : new ItemStack(InitItems.itemBooklet), resolution.getScaledWidth()/2-10, height+41, 1F); - minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg1, resolution.getScaledWidth()/2-minecraft.fontRenderer.getStringWidth(strg1)/2, height+20, StringUtil.DECIMAL_COLOR_WHITE); - minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg2, resolution.getScaledWidth()/2-minecraft.fontRenderer.getStringWidth(strg2)/2, height+30, StringUtil.DECIMAL_COLOR_WHITE); - minecraft.fontRenderer.drawStringWithShadow(EnumChatFormatting.GOLD+strg3, resolution.getScaledWidth()/2-minecraft.fontRenderer.getStringWidth(strg3)/2, height+60, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg1, resolution.getScaledWidth()/2-minecraft.fontRendererObj.getStringWidth(strg1)/2, height+20, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg2, resolution.getScaledWidth()/2-minecraft.fontRendererObj.getStringWidth(strg2)/2, height+30, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.GOLD+strg3, resolution.getScaledWidth()/2-minecraft.fontRendererObj.getStringWidth(strg3)/2, height+60, StringUtil.DECIMAL_COLOR_WHITE); } else{ String strg = EnumChatFormatting.DARK_RED+"No Info available! Sorry :("; - minecraft.fontRenderer.drawStringWithShadow(strg, resolution.getScaledWidth()/2-minecraft.fontRenderer.getStringWidth(strg)/2, height+60, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(strg, resolution.getScaledWidth()/2-minecraft.fontRendererObj.getStringWidth(strg)/2, height+60, StringUtil.DECIMAL_COLOR_WHITE); } } else{ String strg = EnumChatFormatting.DARK_GREEN+""+EnumChatFormatting.ITALIC+"Sneak!"; - minecraft.fontRenderer.drawStringWithShadow(strg, resolution.getScaledWidth()/2-minecraft.fontRenderer.getStringWidth(strg)/2, height+60, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(strg, resolution.getScaledWidth()/2-minecraft.fontRendererObj.getStringWidth(strg)/2, height+60, StringUtil.DECIMAL_COLOR_WHITE); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java index 6be08f01d..130e352a2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java @@ -12,14 +12,11 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.blocks.BlockCrystal; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -27,21 +24,12 @@ import java.util.List; public class ItemCrystal extends ItemBase{ - @SideOnly(Side.CLIENT) - public IIcon[] textures; - public ItemCrystal(String name){ super(name); this.setHasSubtypes(true); this.setMaxDamage(0); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1){ - return par1 >= this.textures.length ? null : this.textures[par1]; - } - @Override public int getMetadata(int damage){ return damage; @@ -54,7 +42,7 @@ public class ItemCrystal extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return stack.getItemDamage() >= BlockCrystal.allCrystals.length ? EnumRarity.common : BlockCrystal.allCrystals[stack.getItemDamage()].rarity; + return stack.getItemDamage() >= BlockCrystal.allCrystals.length ? EnumRarity.COMMON : BlockCrystal.allCrystals[stack.getItemDamage()].rarity; } @SuppressWarnings("all") @@ -64,13 +52,4 @@ public class ItemCrystal extends ItemBase{ list.add(new ItemStack(this, 1, j)); } } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.textures = new IIcon[BlockCrystal.allCrystals.length]; - for(int i = 0; i < this.textures.length; i++){ - this.textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+BlockCrystal.allCrystals[i].name); - } - } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java index e7b8e0583..507da0834 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java @@ -12,14 +12,11 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheDusts; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -52,7 +49,7 @@ public class ItemDust extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return stack.getItemDamage() >= allDusts.length ? EnumRarity.common : allDusts[stack.getItemDamage()].rarity; + return stack.getItemDamage() >= allDusts.length ? EnumRarity.COMMON : allDusts[stack.getItemDamage()].rarity; } @SuppressWarnings("all") @@ -62,16 +59,4 @@ public class ItemDust extends ItemBase{ list.add(new ItemStack(this, 1, j)); } } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java index e84a0e536..3b1c5e464 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java @@ -11,13 +11,8 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemGeneric extends ItemBase{ @@ -28,18 +23,6 @@ public class ItemGeneric extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.uncommon; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.UNCOMMON; } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java index 1323a00b5..6a6882ffe 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java @@ -60,7 +60,7 @@ public class ItemGrowthRing extends ItemEnergy{ int theX = MathHelper.floor_double(player.posX+x); int theY = MathHelper.floor_double(player.posY+y); int theZ = MathHelper.floor_double(player.posZ+z); - Block theBlock = world.getBlock(theX, theY, theZ); + Block theBlock = new Position(theX, theY, theZ).getBlock(world); if((theBlock instanceof IGrowable || theBlock instanceof IPlantable) && !(theBlock instanceof BlockGrass)){ blocks.add(new Position(theX, theY, theZ)); } @@ -75,11 +75,11 @@ public class ItemGrowthRing extends ItemEnergy{ Position pos = blocks.get(Util.RANDOM.nextInt(blocks.size())); int metaBefore = pos.getMetadata(world); - pos.getBlock(world).updateTick(world, pos.getX(), pos.getY(), pos.getZ(), Util.RANDOM); + pos.getBlock(world).updateTick(world, pos, pos.getBlockState(world), Util.RANDOM); //Show Particles if Metadata changed if(pos.getMetadata(world) != metaBefore){ - world.playAuxSFX(2005, pos.getX(), pos.getY(), pos.getZ(), 0); + world.playAuxSFX(2005, pos, 0); } if(!player.capabilities.isCreativeMode){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java index 23472a6ae..981cc862a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java @@ -12,14 +12,11 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -28,20 +25,12 @@ import java.util.List; public class ItemMisc extends ItemBase{ public static final TheMiscItems[] allMiscItems = TheMiscItems.values(); - @SideOnly(Side.CLIENT) - public IIcon[] textures; public ItemMisc(String name){ super(name); this.setHasSubtypes(true); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1){ - return par1 >= textures.length ? null : textures[par1]; - } - @Override public int getMetadata(int damage){ return damage; @@ -54,7 +43,7 @@ public class ItemMisc extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return stack.getItemDamage() >= allMiscItems.length ? EnumRarity.common : allMiscItems[stack.getItemDamage()].rarity; + return stack.getItemDamage() >= allMiscItems.length ? EnumRarity.COMMON : allMiscItems[stack.getItemDamage()].rarity; } @SuppressWarnings("all") @@ -64,13 +53,4 @@ public class ItemMisc extends ItemBase{ list.add(new ItemStack(this, 1, j)); } } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.textures = new IIcon[allMiscItems.length]; - for(int i = 0; i < textures.length; i++){ - textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+allMiscItems[i].name); - } - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java index 194b3c4a1..cc8b88ee3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java @@ -12,9 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.ThePotionRings; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -22,7 +20,6 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -72,11 +69,11 @@ public class ItemPotionRing extends ItemBase{ if(!effect.needsWaitBeforeActivating || !thePlayer.isPotionActive(effect.effectID)){ if(!((ItemPotionRing)stack.getItem()).isAdvanced){ if(equippedStack != null && stack == equippedStack){ - thePlayer.addPotionEffect(new PotionEffect(effect.effectID, effect.activeTime, effect.normalAmplifier, true)); + thePlayer.addPotionEffect(new PotionEffect(effect.effectID, effect.activeTime, effect.normalAmplifier, true, false)); } } else{ - thePlayer.addPotionEffect(new PotionEffect(effect.effectID, effect.activeTime, effect.advancedAmplifier, true)); + thePlayer.addPotionEffect(new PotionEffect(effect.effectID, effect.activeTime, effect.advancedAmplifier, true, false)); } } } @@ -95,7 +92,7 @@ public class ItemPotionRing extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return stack.getItemDamage() >= allRings.length ? EnumRarity.common : allRings[stack.getItemDamage()].rarity; + return stack.getItemDamage() >= allRings.length ? EnumRarity.COMMON : allRings[stack.getItemDamage()].rarity; } @SuppressWarnings("all") @@ -105,16 +102,4 @@ public class ItemPotionRing extends ItemBase{ list.add(new ItemStack(this, 1, j)); } } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java index 963fee470..137030382 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java @@ -14,17 +14,15 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemSeeds; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemSeed extends ItemSeeds{ @@ -65,28 +63,11 @@ public class ItemSeed extends ItemSeeds{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.rare; + return EnumRarity.RARE; } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } - - @Override - public Block getPlant(IBlockAccess world, int x, int y, int z){ - return this.plant; - } - - @Override - public int getPlantMetadata(IBlockAccess world, int x, int y, int z){ - return 0; + public IBlockState getPlant(IBlockAccess world, BlockPos pos){ + return this.plant.getDefaultState(); } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java index 436ae8830..22ff464e0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java @@ -11,16 +11,11 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemSolidifiedExperience extends ItemBase{ @@ -51,18 +46,6 @@ public class ItemSolidifiedExperience extends ItemBase{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.uncommon; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.UNCOMMON; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleStaff.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleStaff.java index 09e883165..f22a94cca 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleStaff.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleStaff.java @@ -11,22 +11,16 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemTeleStaff extends ItemEnergy{ @@ -40,23 +34,20 @@ public class ItemTeleStaff extends ItemEnergy{ if(this.getWaitTime(stack) <= 0){ MovingObjectPosition pos = WorldUtil.getNearestPositionWithAir(world, player, 100); if(pos != null && (pos.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK || player.rotationPitch >= -5)){ - int side = pos.sideHit; + int side = pos.sideHit.ordinal(); if(side != -1){ - ForgeDirection forgeSide = ForgeDirection.getOrientation(side); - if(forgeSide != ForgeDirection.UNKNOWN){ - double x = pos.hitVec.xCoord-(side == 4 ? 0.5 : 0)+(side == 5 ? 0.5 : 0); - double y = pos.hitVec.yCoord-(side == 0 ? 2.0 : 0)+(side == 1 ? 0.5 : 0); - double z = pos.hitVec.zCoord-(side == 2 ? 0.5 : 0)+(side == 3 ? 0.5 : 0); - int baseUse = 200; - int use = baseUse+(int)(baseUse*pos.hitVec.distanceTo(Vec3.createVectorHelper(player.posX, player.posY+(player.getEyeHeight()-player.getDefaultEyeHeight()), player.posZ))); - if(this.getEnergyStored(stack) >= use){ - ((EntityPlayerMP)player).playerNetServerHandler.setPlayerLocation(x, y, z, player.rotationYaw, player.rotationPitch); - player.mountEntity(null); - world.playSoundAtEntity(player, "mob.endermen.portal", 1.0F, 1.0F); - if(!player.capabilities.isCreativeMode){ - this.extractEnergy(stack, use, false); - this.setWaitTime(stack, 50); - } + double x = pos.hitVec.xCoord-(side == 4 ? 0.5 : 0)+(side == 5 ? 0.5 : 0); + double y = pos.hitVec.yCoord-(side == 0 ? 2.0 : 0)+(side == 1 ? 0.5 : 0); + double z = pos.hitVec.zCoord-(side == 2 ? 0.5 : 0)+(side == 3 ? 0.5 : 0); + int baseUse = 200; + int use = baseUse+(int)(baseUse*pos.hitVec.distanceTo(new Vec3(player.posX, player.posY+(player.getEyeHeight()-player.getDefaultEyeHeight()), player.posZ))); + if(this.getEnergyStored(stack) >= use){ + ((EntityPlayerMP)player).playerNetServerHandler.setPlayerLocation(x, y, z, player.rotationYaw, player.rotationPitch); + player.mountEntity(null); + world.playSoundAtEntity(player, "mob.endermen.portal", 1.0F, 1.0F); + if(!player.capabilities.isCreativeMode){ + this.extractEnergy(stack, use, false); + this.setWaitTime(stack, 50); } } } @@ -77,19 +68,7 @@ public class ItemTeleStaff extends ItemEnergy{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } private int getWaitTime(ItemStack stack){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java index 292bcf747..0f5b08b52 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java @@ -10,19 +10,16 @@ package de.ellpeck.actuallyadditions.mod.items; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemWaterRemovalRing extends ItemEnergy{ @@ -52,16 +49,18 @@ public class ItemWaterRemovalRing extends ItemEnergy{ int theZ = MathHelper.floor_double(player.posZ+z); if(this.getEnergyStored(stack) >= energyUse){ //Remove Water - if(world.getBlock(theX, theY, theZ) == Blocks.water || world.getBlock(theX, theY, theZ) == Blocks.flowing_water){ - world.setBlockToAir(theX, theY, theZ); + Position pos = new Position(theX, theY, theZ); + Block block = pos.getBlock(world); + if(block == Blocks.water || block == Blocks.flowing_water){ + world.setBlockToAir(pos); if(!player.capabilities.isCreativeMode){ this.extractEnergy(stack, energyUse, false); } } //Remove Lava - else if(world.getBlock(theX, theY, theZ) == Blocks.lava || world.getBlock(theX, theY, theZ) == Blocks.flowing_lava){ - world.setBlockToAir(theX, theY, theZ); + else if(block == Blocks.lava || block == Blocks.flowing_lava){ + world.setBlockToAir(pos); if(!player.capabilities.isCreativeMode){ this.extractEnergy(stack, energyUse*2, false); @@ -76,18 +75,6 @@ public class ItemWaterRemovalRing extends ItemEnergy{ @Override public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + return EnumRarity.EPIC; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java index 932bceac7..e31b45f6a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java @@ -100,7 +100,7 @@ public abstract class ItemEnergy extends ItemEnergyContainer{ @Override @SideOnly(Side.CLIENT) - public boolean hasEffect(ItemStack stack, int pass){ + public boolean hasEffect(ItemStack stack){ return false; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java index 07e962076..c6aa13ebd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java @@ -13,14 +13,10 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemPickaxeAA extends ItemPickaxe{ @@ -66,16 +62,4 @@ public class ItemPickaxeAA extends ItemPickaxe{ public EnumRarity getRarity(ItemStack stack){ return this.rarity; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java index aa5e505bc..fae0a2f9c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java @@ -14,14 +14,10 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; -import net.minecraft.util.IIcon; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class ItemSwordAA extends ItemSword{ @@ -71,16 +67,4 @@ public class ItemSwordAA extends ItemSword{ public EnumRarity getRarity(ItemStack stack){ return this.rarity; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java index 476eb4286..5e3a16852 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java @@ -28,13 +28,13 @@ public class LensDeath extends Lens{ if(tile.getEnergy() >= use){ tile.extractEnergy(use); - ArrayList entities = (ArrayList)tile.getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX()+1, hitBlock.getY()+1, hitBlock.getZ()+1)); + ArrayList entities = (ArrayList)tile.getWorldObject().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.fromBounds(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX()+1, hitBlock.getY()+1, hitBlock.getZ()+1)); for(EntityLivingBase entity : entities){ entity.attackEntityFrom(DamageSources.DAMAGE_ATOMIC_RECONSTRUCTOR, 20F); } } - return hitBlock != null && !hitBlock.getBlock(tile.getWorld()).isAir(tile.getWorld(), hitBlock.getX(), hitBlock.getY(), hitBlock.getZ()); + return hitBlock != null && !hitBlock.getBlock(tile.getWorldObject()).isAir(tile.getWorldObject(), hitBlock); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java index ff5be4082..27c90de23 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java @@ -18,10 +18,10 @@ public class LensDetonation extends Lens{ @Override public boolean invoke(Position hitBlock, IAtomicReconstructor tile){ - if(hitBlock != null && !hitBlock.getBlock(tile.getWorld()).isAir(tile.getWorld(), hitBlock.getX(), hitBlock.getY(), hitBlock.getZ())){ + if(hitBlock != null && !hitBlock.getBlock(tile.getWorldObject()).isAir(tile.getWorldObject(), hitBlock)){ int use = 250000; if(tile.getEnergy() >= use){ - tile.getWorld().newExplosion(null, hitBlock.getX()+0.5, hitBlock.getY()+0.5, hitBlock.getZ()+0.5, 10F, true, true); + tile.getWorldObject().newExplosion(null, hitBlock.getX()+0.5, hitBlock.getY()+0.5, hitBlock.getZ()+0.5, 10F, true, true); tile.extractEnergy(use); } return true; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheDusts.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheDusts.java index da17e1de6..c54c6bea7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheDusts.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheDusts.java @@ -15,14 +15,14 @@ import net.minecraft.item.EnumRarity; public enum TheDusts{ - IRON("Iron", 7826534, EnumRarity.common), - GOLD("Gold", 14335744, EnumRarity.uncommon), - DIAMOND("Diamond", 292003, EnumRarity.rare), - EMERALD("Emerald", 4319527, EnumRarity.epic), - LAPIS("Lapis", 1849791, EnumRarity.uncommon), - QUARTZ("Quartz", StringUtil.DECIMAL_COLOR_WHITE, EnumRarity.uncommon), - COAL("Coal", 0, EnumRarity.uncommon), - QUARTZ_BLACK("QuartzBlack", 18, EnumRarity.rare); + IRON("Iron", 7826534, EnumRarity.COMMON), + GOLD("Gold", 14335744, EnumRarity.UNCOMMON), + DIAMOND("Diamond", 292003, EnumRarity.RARE), + EMERALD("Emerald", 4319527, EnumRarity.EPIC), + LAPIS("Lapis", 1849791, EnumRarity.UNCOMMON), + QUARTZ("Quartz", StringUtil.DECIMAL_COLOR_WHITE, EnumRarity.UNCOMMON), + COAL("Coal", 0, EnumRarity.UNCOMMON), + QUARTZ_BLACK("QuartzBlack", 18, EnumRarity.RARE); public final String name; public final int color; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheFoods.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheFoods.java index 207170f2a..89fc96e3a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheFoods.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheFoods.java @@ -17,27 +17,27 @@ import net.minecraft.item.ItemStack; public enum TheFoods{ - CHEESE("Cheese", 1, 0.5F, false, 3, EnumRarity.common), - PUMPKIN_STEW("PumpkinStew", 10, 1F, true, 30, EnumRarity.common), - CARROT_JUICE("CarrotJuice", 6, 0.6F, true, 20, EnumRarity.common), - FISH_N_CHIPS("FishNChips", 20, 5F, false, 40, EnumRarity.uncommon), - FRENCH_FRIES("FrenchFries", 16, 4F, false, 32, EnumRarity.common), - FRENCH_FRY("FrenchFry", 3, 0.5F, false, 3, EnumRarity.common), - SPAGHETTI("Spaghetti", 18, 3F, false, 38, EnumRarity.common), - NOODLE("Noodle", 1, 0.5F, false, 3, EnumRarity.common), - CHOCOLATE_CAKE("ChocolateCake", 16, 2F, false, 45, EnumRarity.uncommon), - CHOCOLATE("Chocolate", 5, 1F, false, 15, EnumRarity.common), - TOAST("Toast", 3, 0.4F, false, 25, EnumRarity.common), - SUBMARINE_SANDWICH("SubmarineSandwich", 10, 8F, false, 40, EnumRarity.uncommon), - BIG_COOKIE("BigCookie", 6, 1F, false, 20, EnumRarity.uncommon), - HAMBURGER("Hamburger", 14, 6F, false, 40, EnumRarity.common), - PIZZA("Pizza", 20, 10F, false, 45, EnumRarity.uncommon), - BAGUETTE("Baguette", 7, 2F, false, 25, EnumRarity.common), - RICE("Rice", 2, 1F, false, 10, EnumRarity.uncommon), - RICE_BREAD("RiceBread", 8, 3F, false, 25, EnumRarity.uncommon), - DOUGHNUT("Doughnut", 4, 0.5F, false, 10, EnumRarity.epic), - CHOCOLATE_TOAST("ChocolateToast", 8, 1.4F, false, 40, EnumRarity.rare), - BACON("Bacon", 4, 0.5F, false, 30, EnumRarity.common); + CHEESE("Cheese", 1, 0.5F, false, 3, EnumRarity.COMMON), + PUMPKIN_STEW("PumpkinStew", 10, 1F, true, 30, EnumRarity.COMMON), + CARROT_JUICE("CarrotJuice", 6, 0.6F, true, 20, EnumRarity.COMMON), + FISH_N_CHIPS("FishNChips", 20, 5F, false, 40, EnumRarity.UNCOMMON), + FRENCH_FRIES("FrenchFries", 16, 4F, false, 32, EnumRarity.COMMON), + FRENCH_FRY("FrenchFry", 3, 0.5F, false, 3, EnumRarity.COMMON), + SPAGHETTI("Spaghetti", 18, 3F, false, 38, EnumRarity.COMMON), + NOODLE("Noodle", 1, 0.5F, false, 3, EnumRarity.COMMON), + CHOCOLATE_CAKE("ChocolateCake", 16, 2F, false, 45, EnumRarity.UNCOMMON), + CHOCOLATE("Chocolate", 5, 1F, false, 15, EnumRarity.COMMON), + TOAST("Toast", 3, 0.4F, false, 25, EnumRarity.COMMON), + SUBMARINE_SANDWICH("SubmarineSandwich", 10, 8F, false, 40, EnumRarity.UNCOMMON), + BIG_COOKIE("BigCookie", 6, 1F, false, 20, EnumRarity.UNCOMMON), + HAMBURGER("Hamburger", 14, 6F, false, 40, EnumRarity.COMMON), + PIZZA("Pizza", 20, 10F, false, 45, EnumRarity.UNCOMMON), + BAGUETTE("Baguette", 7, 2F, false, 25, EnumRarity.COMMON), + RICE("Rice", 2, 1F, false, 10, EnumRarity.UNCOMMON), + RICE_BREAD("RiceBread", 8, 3F, false, 25, EnumRarity.UNCOMMON), + DOUGHNUT("Doughnut", 4, 0.5F, false, 10, EnumRarity.EPIC), + CHOCOLATE_TOAST("ChocolateToast", 8, 1.4F, false, 40, EnumRarity.RARE), + BACON("Bacon", 4, 0.5F, false, 30, EnumRarity.COMMON); public final String name; public final int healAmount; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheJams.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheJams.java index de4f53f16..2056c0a79 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheJams.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheJams.java @@ -14,13 +14,13 @@ import net.minecraft.item.EnumRarity; public enum TheJams{ - CU_BA_RA("CuBaRa", 6, 0.1F, EnumRarity.rare, 5, 12, 12595273), - GRA_KI_BA("GraKiBa", 6, 0.1F, EnumRarity.rare, 16, 13, 5492820), - PL_AP_LE("PlApLe", 6, 0.1F, EnumRarity.rare, 15, 3, 13226009), - CH_AP_CI("ChApCi", 6, 0.1F, EnumRarity.rare, 10, 1, 13189222), - HO_ME_KI("HoMeKi", 6, 0.1F, EnumRarity.rare, 10, 14, 2031360), - PI_CO("PiCo", 6, 0.1F, EnumRarity.rare, 9, 1, 16056203), - HO_ME_CO("HoMeCo", 6, 0.1F, EnumRarity.rare, 10, 13, 10462208); + CU_BA_RA("CuBaRa", 6, 0.1F, EnumRarity.RARE, 5, 12, 12595273), + GRA_KI_BA("GraKiBa", 6, 0.1F, EnumRarity.RARE, 16, 13, 5492820), + PL_AP_LE("PlApLe", 6, 0.1F, EnumRarity.RARE, 15, 3, 13226009), + CH_AP_CI("ChApCi", 6, 0.1F, EnumRarity.RARE, 10, 1, 13189222), + HO_ME_KI("HoMeKi", 6, 0.1F, EnumRarity.RARE, 10, 14, 2031360), + PI_CO("PiCo", 6, 0.1F, EnumRarity.RARE, 9, 1, 16056203), + HO_ME_CO("HoMeCo", 6, 0.1F, EnumRarity.RARE, 10, 13, 10462208); public final String name; public final int healAmount; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheMiscItems.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheMiscItems.java index bcb78228b..609effc57 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheMiscItems.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheMiscItems.java @@ -14,25 +14,25 @@ import net.minecraft.item.EnumRarity; public enum TheMiscItems{ - PAPER_CONE("PaperCone", EnumRarity.common), - MASHED_FOOD("MashedFood", EnumRarity.uncommon), - KNIFE_BLADE("KnifeBlade", EnumRarity.common), - KNIFE_HANDLE("KnifeHandle", EnumRarity.common), - DOUGH("Dough", EnumRarity.common), - QUARTZ("BlackQuartz", EnumRarity.epic), - RING("Ring", EnumRarity.uncommon), - COIL("Coil", EnumRarity.common), - COIL_ADVANCED("CoilAdvanced", EnumRarity.uncommon), - RICE_DOUGH("RiceDough", EnumRarity.uncommon), - TINY_COAL("TinyCoal", EnumRarity.common), - TINY_CHAR("TinyCharcoal", EnumRarity.common), - RICE_SLIME("RiceSlime", EnumRarity.uncommon), - CANOLA("Canola", EnumRarity.uncommon), - CUP("Cup", EnumRarity.uncommon), - BAT_WING("BatWing", EnumRarity.rare), - DRILL_CORE("DrillCore", EnumRarity.uncommon), - BLACK_DYE("BlackDye", EnumRarity.epic), - LENS("Lens", EnumRarity.uncommon); + PAPER_CONE("PaperCone", EnumRarity.COMMON), + MASHED_FOOD("MashedFood", EnumRarity.UNCOMMON), + KNIFE_BLADE("KnifeBlade", EnumRarity.COMMON), + KNIFE_HANDLE("KnifeHandle", EnumRarity.COMMON), + DOUGH("Dough", EnumRarity.COMMON), + QUARTZ("BlackQuartz", EnumRarity.EPIC), + RING("Ring", EnumRarity.UNCOMMON), + COIL("Coil", EnumRarity.COMMON), + COIL_ADVANCED("CoilAdvanced", EnumRarity.UNCOMMON), + RICE_DOUGH("RiceDough", EnumRarity.UNCOMMON), + TINY_COAL("TinyCoal", EnumRarity.COMMON), + TINY_CHAR("TinyCharcoal", EnumRarity.COMMON), + RICE_SLIME("RiceSlime", EnumRarity.UNCOMMON), + CANOLA("Canola", EnumRarity.UNCOMMON), + CUP("Cup", EnumRarity.UNCOMMON), + BAT_WING("BatWing", EnumRarity.RARE), + DRILL_CORE("DrillCore", EnumRarity.UNCOMMON), + BLACK_DYE("BlackDye", EnumRarity.EPIC), + LENS("Lens", EnumRarity.UNCOMMON); public final String name; public final EnumRarity rarity; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/ThePotionRings.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/ThePotionRings.java index a06dfaa3b..e134e8a90 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/ThePotionRings.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/ThePotionRings.java @@ -18,22 +18,22 @@ import net.minecraft.potion.Potion; public enum ThePotionRings{ - SPEED(Potion.moveSpeed.getName(), 8171462, Potion.moveSpeed.getId(), 0, 1, 10, false, EnumRarity.uncommon, new ItemStack(Items.sugar)), + SPEED(Potion.moveSpeed.getName(), 8171462, Potion.moveSpeed.getId(), 0, 1, 10, false, EnumRarity.UNCOMMON, new ItemStack(Items.sugar)), //Slowness - HASTE(Potion.digSpeed.getName(), 14270531, Potion.digSpeed.getId(), 0, 1, 10, false, EnumRarity.epic, new ItemStack(Items.repeater)), + HASTE(Potion.digSpeed.getName(), 14270531, Potion.digSpeed.getId(), 0, 1, 10, false, EnumRarity.EPIC, new ItemStack(Items.repeater)), //Mining Fatigue - STRENGTH(Potion.damageBoost.getName(), 9643043, Potion.damageBoost.getId(), 0, 1, 10, false, EnumRarity.rare, new ItemStack(Items.blaze_powder)), + STRENGTH(Potion.damageBoost.getName(), 9643043, Potion.damageBoost.getId(), 0, 1, 10, false, EnumRarity.RARE, new ItemStack(Items.blaze_powder)), //Health (Not Happening) //Damage - JUMP_BOOST(Potion.jump.getName(), 7889559, Potion.jump.getId(), 0, 1, 10, false, EnumRarity.rare, new ItemStack(Blocks.piston)), + JUMP_BOOST(Potion.jump.getName(), 7889559, Potion.jump.getId(), 0, 1, 10, false, EnumRarity.RARE, new ItemStack(Blocks.piston)), //Nausea - REGEN(Potion.regeneration.getName(), 13458603, Potion.regeneration.getId(), 0, 1, 50, true, EnumRarity.rare, new ItemStack(Items.ghast_tear)), - RESISTANCE(Potion.resistance.getName(), 10044730, Potion.resistance.getId(), 0, 1, 10, false, EnumRarity.epic, new ItemStack(Items.slime_ball)), - FIRE_RESISTANCE(Potion.fireResistance.getName(), 14981690, Potion.fireResistance.getId(), 0, 0, 10, false, EnumRarity.uncommon, new ItemStack(Items.magma_cream)), - WATER_BREATHING(Potion.waterBreathing.getName(), 3035801, Potion.waterBreathing.getId(), 0, 0, 10, false, EnumRarity.rare, new ItemStack(Items.fish, 1, 3)), - INVISIBILITY(Potion.invisibility.getName(), 8356754, Potion.invisibility.getId(), 0, 0, 10, false, EnumRarity.epic, new ItemStack(Items.fermented_spider_eye)), + REGEN(Potion.regeneration.getName(), 13458603, Potion.regeneration.getId(), 0, 1, 50, true, EnumRarity.RARE, new ItemStack(Items.ghast_tear)), + RESISTANCE(Potion.resistance.getName(), 10044730, Potion.resistance.getId(), 0, 1, 10, false, EnumRarity.EPIC, new ItemStack(Items.slime_ball)), + FIRE_RESISTANCE(Potion.fireResistance.getName(), 14981690, Potion.fireResistance.getId(), 0, 0, 10, false, EnumRarity.UNCOMMON, new ItemStack(Items.magma_cream)), + WATER_BREATHING(Potion.waterBreathing.getName(), 3035801, Potion.waterBreathing.getId(), 0, 0, 10, false, EnumRarity.RARE, new ItemStack(Items.fish, 1, 3)), + INVISIBILITY(Potion.invisibility.getName(), 8356754, Potion.invisibility.getId(), 0, 0, 10, false, EnumRarity.EPIC, new ItemStack(Items.fermented_spider_eye)), //Blindness - NIGHT_VISION(Potion.nightVision.getName(), 2039713, Potion.nightVision.getId(), 0, 0, 300, false, EnumRarity.rare, new ItemStack(Items.golden_carrot)); + NIGHT_VISION(Potion.nightVision.getName(), 2039713, Potion.nightVision.getId(), 0, 0, 300, false, EnumRarity.RARE, new ItemStack(Items.golden_carrot)); //Hunger //Weakness //Poison diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerEmptyBucket.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerEmptyBucket.java index 0f94d513a..06ef9228a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerEmptyBucket.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerEmptyBucket.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.misc; +import de.ellpeck.actuallyadditions.api.Position; import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.BehaviorDefaultDispenseItem; import net.minecraft.dispenser.IBlockSource; @@ -22,12 +23,13 @@ public class DispenserHandlerEmptyBucket extends BehaviorDefaultDispenseItem{ @Override public ItemStack dispenseStack(IBlockSource source, ItemStack bucket){ - EnumFacing facing = BlockDispenser.func_149937_b(source.getBlockMetadata()); - int x = source.getXInt()+facing.getFrontOffsetX(); - int y = source.getYInt()+facing.getFrontOffsetY(); - int z = source.getZInt()+facing.getFrontOffsetZ(); + EnumFacing facing = BlockDispenser.getFacing(source.getBlockMetadata()); + int x = source.getBlockTileEntity().getPos().getX()+facing.getFrontOffsetX(); + int y = source.getBlockTileEntity().getPos().getY()+facing.getFrontOffsetY(); + int z = source.getBlockTileEntity().getPos().getZ()+facing.getFrontOffsetZ(); + Position pos = new Position(x, y, z); - if(source.getWorld().isAirBlock(x, y, z) && !source.getWorld().getBlock(x, y, z).getMaterial().isSolid() && ((ItemBucket)bucket.getItem()).tryPlaceContainedLiquid(source.getWorld(), x, y, z)){ + if(source.getWorld().isAirBlock(pos) && !pos.getMaterial(source.getWorld()).isSolid() && ((ItemBucket)bucket.getItem()).tryPlaceContainedLiquid(source.getWorld(), pos)){ return new ItemStack(Items.bucket); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFillBucket.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFillBucket.java index 1c270205e..8e88a9157 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFillBucket.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFillBucket.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.misc; +import de.ellpeck.actuallyadditions.api.Position; import net.minecraft.block.Block; import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.BehaviorDefaultDispenseItem; @@ -26,10 +27,10 @@ public class DispenserHandlerFillBucket extends BehaviorDefaultDispenseItem{ @Override public ItemStack dispenseStack(IBlockSource source, ItemStack emptyBucket){ - EnumFacing facing = BlockDispenser.func_149937_b(source.getBlockMetadata()); - int x = source.getXInt()+facing.getFrontOffsetX(); - int y = source.getYInt()+facing.getFrontOffsetY(); - int z = source.getZInt()+facing.getFrontOffsetZ(); + EnumFacing facing = BlockDispenser.getFacing(source.getBlockMetadata()); + int x = source.getBlockTileEntity().getPos().getX()+facing.getFrontOffsetX(); + int y = source.getBlockTileEntity().getPos().getY()+facing.getFrontOffsetY(); + int z = source.getBlockTileEntity().getPos().getZ()+facing.getFrontOffsetZ(); ItemStack filledBucket = this.tryFillBucket(source, x, y, z, emptyBucket); @@ -44,7 +45,7 @@ public class DispenserHandlerFillBucket extends BehaviorDefaultDispenseItem{ emptyBucket = filledBucket.copy(); } //Not enough space for the bucket in the inventory? - else if(((TileEntityDispenser)source.getBlockTileEntity()).func_146019_a(filledBucket.copy()) < 0){ + else if(((TileEntityDispenser)source.getBlockTileEntity()).addItemStack(filledBucket.copy()) < 0){ new BehaviorDefaultDispenseItem().dispense(source, filledBucket.copy()); } //Filled Bucket or Empty Buckets because either they weren't filled or the full one was dispensed out because of missing space @@ -52,24 +53,25 @@ public class DispenserHandlerFillBucket extends BehaviorDefaultDispenseItem{ } private ItemStack tryFillBucket(IBlockSource source, int x, int y, int z, ItemStack bucket){ - Block block = source.getWorld().getBlock(x, y, z); + Position pos = new Position(x, y, z); + Block block = pos.getBlock(source.getWorld()); if(block == Blocks.water || block == Blocks.flowing_water){ - if(source.getWorld().getBlockMetadata(x, y, z) == 0){ - source.getWorld().setBlockToAir(x, y, z); + if(pos.getMetadata(source.getWorld()) == 0){ + source.getWorld().setBlockToAir(pos); return new ItemStack(Items.water_bucket); } } else if(block == Blocks.lava || block == Blocks.flowing_lava){ - if(source.getWorld().getBlockMetadata(x, y, z) == 0){ - source.getWorld().setBlockToAir(x, y, z); + if(pos.getMetadata(source.getWorld()) == 0){ + source.getWorld().setBlockToAir(pos); return new ItemStack(Items.lava_bucket); } } - else if(block instanceof IFluidBlock && ((IFluidBlock)block).canDrain(source.getWorld(), x, y, z)){ - ItemStack stack = FluidContainerRegistry.fillFluidContainer(((IFluidBlock)block).drain(source.getWorld(), x, y, z, false), bucket); + else if(block instanceof IFluidBlock && ((IFluidBlock)block).canDrain(source.getWorld(), pos)){ + ItemStack stack = FluidContainerRegistry.fillFluidContainer(((IFluidBlock)block).drain(source.getWorld(), pos, false), bucket); if(stack != null){ - ((IFluidBlock)block).drain(source.getWorld(), x, y, z, true); + ((IFluidBlock)block).drain(source.getWorld(), pos, true); return stack; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java index 4c3d07ec2..aca9ab153 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java @@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EnumPlayerModelParts; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -32,7 +33,7 @@ public class RenderSpecial{ } public void render(EntityPlayer player){ - if(player.isInvisible() || player.getHideCape()){ + if(player.isInvisible() || player.isWearing(EnumPlayerModelParts.CAPE)){ return; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index 7262f67eb..7de40db46 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.RenderPlayerEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -48,12 +49,13 @@ public class SpecialRenderInit{ ItemStack stack = null; //Get the Item from the String - if(Item.itemRegistry.containsKey(itemName)){ - stack = new ItemStack((Item)Item.itemRegistry.getObject(itemName), 1, meta); + ResourceLocation resLoc = new ResourceLocation(itemName); + if(Item.itemRegistry.containsKey(resLoc)){ + stack = new ItemStack(Item.itemRegistry.getObject(resLoc), 1, meta); } else{ - if(Block.blockRegistry.containsKey(itemName)){ - stack = new ItemStack((Block)Block.blockRegistry.getObject(itemName), 1, meta); + if(Block.blockRegistry.containsKey(resLoc)){ + stack = new ItemStack(Block.blockRegistry.getObject(resLoc), 1, meta); } } @@ -70,7 +72,7 @@ public class SpecialRenderInit{ if(!specialList.isEmpty()){ for(Map.Entry entry : specialList.entrySet()){ //Does the player have one of the names from the list? - if(StringUtil.equalsToLowerCase(entry.getKey(), event.entityPlayer.getCommandSenderName())){ + if(StringUtil.equalsToLowerCase(entry.getKey(), event.entityPlayer.getName())){ //Render the special Item/Block entry.getValue().render(event.entityPlayer); break; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java index c05847186..f61ebfe3b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketParticle.java @@ -58,7 +58,7 @@ public class PacketParticle implements IMessage{ int difX = startX-endX; int difY = startY-endY; int difZ = startZ-endZ; - double distance = Vec3.createVectorHelper(startX, startY, startZ).distanceTo(Vec3.createVectorHelper(endX, endY, endZ)); + double distance = new Vec3(startX, startY, startZ).distanceTo(new Vec3(endX, endY, endZ)); for(int times = 0; times < particleAmount/2; times++){ for(double i = 0; i <= 1; i += 1/(distance*particleAmount)){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java index a8fcf7a00..5b014ad5a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.network.gui; +import de.ellpeck.actuallyadditions.api.Position; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; @@ -38,7 +39,7 @@ public class PacketGuiNumber implements IMessage{ this.tileX = x; this.tileY = y; this.tileZ = z; - this.worldID = world.provider.dimensionId; + this.worldID = world.provider.getDimensionId(); this.text = text; this.textID = textID; this.playerID = player.getEntityId(); @@ -71,7 +72,7 @@ public class PacketGuiNumber implements IMessage{ @Override public IMessage onMessage(PacketGuiNumber message, MessageContext ctx){ World world = DimensionManager.getWorld(message.worldID); - TileEntity tile = world.getTileEntity(message.tileX, message.tileY, message.tileZ); + TileEntity tile = world.getTileEntity(new Position(message.tileX, message.tileY, message.tileZ)); if(tile instanceof INumberReactor){ INumberReactor reactor = (INumberReactor)tile; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java index 660b9621a..0aad40dcc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.network.gui; +import de.ellpeck.actuallyadditions.api.Position; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; @@ -38,7 +39,7 @@ public class PacketGuiString implements IMessage{ this.tileX = x; this.tileY = y; this.tileZ = z; - this.worldID = world.provider.dimensionId; + this.worldID = world.provider.getDimensionId(); this.text = text; this.textID = textID; this.playerID = player.getEntityId(); @@ -82,7 +83,7 @@ public class PacketGuiString implements IMessage{ @Override public IMessage onMessage(PacketGuiString message, MessageContext ctx){ World world = DimensionManager.getWorld(message.worldID); - TileEntity tile = world.getTileEntity(message.tileX, message.tileY, message.tileZ); + TileEntity tile = world.getTileEntity(new Position(message.tileX, message.tileY, message.tileZ)); if(tile instanceof IStringReactor){ IStringReactor reactor = (IStringReactor)tile; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index 6cc76f337..d77636e90 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -11,7 +11,10 @@ package de.ellpeck.actuallyadditions.mod.proxy; -import de.ellpeck.actuallyadditions.mod.blocks.render.*; +import de.ellpeck.actuallyadditions.mod.blocks.render.RenderLaserRelay; +import de.ellpeck.actuallyadditions.mod.blocks.render.RenderReconstructorLens; +import de.ellpeck.actuallyadditions.mod.blocks.render.RenderSmileyCloud; +import de.ellpeck.actuallyadditions.mod.blocks.render.RenderTileEntity; import de.ellpeck.actuallyadditions.mod.blocks.render.model.*; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; @@ -25,7 +28,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.registry.ClientRegistry; -import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -64,15 +66,6 @@ public class ClientProxy implements IProxy{ InitEvents.initClient(); - AssetUtil.compostRenderId = RenderingRegistry.getNextAvailableRenderId(); - AssetUtil.fishingNetRenderId = RenderingRegistry.getNextAvailableRenderId(); - AssetUtil.furnaceSolarRenderId = RenderingRegistry.getNextAvailableRenderId(); - AssetUtil.coffeeMachineRenderId = RenderingRegistry.getNextAvailableRenderId(); - AssetUtil.phantomBoosterRenderId = RenderingRegistry.getNextAvailableRenderId(); - AssetUtil.smileyCloudRenderId = RenderingRegistry.getNextAvailableRenderId(); - AssetUtil.laserRelayRenderId = RenderingRegistry.getNextAvailableRenderId(); - AssetUtil.bookletStandRenderId = RenderingRegistry.getNextAvailableRenderId(); - registerRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost()), AssetUtil.compostRenderId); registerRenderer(TileEntityFishingNet.class, new RenderTileEntity(new ModelFishingNet()), AssetUtil.fishingNetRenderId); registerRenderer(TileEntityFurnaceSolar.class, new RenderTileEntity(new ModelFurnaceSolar()), AssetUtil.furnaceSolarRenderId); @@ -95,6 +88,7 @@ public class ClientProxy implements IProxy{ private static void registerRenderer(Class tileClass, RenderTileEntity tileRender, int renderID){ ClientRegistry.bindTileEntitySpecialRenderer(tileClass, tileRender); - RenderingRegistry.registerBlockHandler(new RenderInventory(tileRender, renderID)); + //TODO Fix inventory rendering + //RenderingRegistry.registerBlockHandler(new RenderInventory(tileRender, renderID)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/CrusherRecipeRegistry.java b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/CrusherRecipeRegistry.java index 1c26d7e77..77497cb10 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/CrusherRecipeRegistry.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/CrusherRecipeRegistry.java @@ -38,7 +38,7 @@ public class CrusherRecipeRegistry{ String output = theCase.resultPreString+ore.substring(theCase.theCase.length()); if(!hasOreRecipe(ore)){ - if(!OreDictionary.getOres(output, false).isEmpty() && !OreDictionary.getOres(ore, false).isEmpty()){ + if(!OreDictionary.getOres(output).isEmpty() && !OreDictionary.getOres(ore).isEmpty()){ ActuallyAdditionsAPI.addCrusherRecipe(ore, output, theCase.resultAmount); } else{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java index 66587be8f..5a0bc7eb8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java @@ -13,16 +13,18 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.network.VanillaPacketSyncer; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; 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.BlockPos; +import net.minecraft.util.ITickable; import net.minecraft.world.World; import net.minecraftforge.fml.common.registry.GameRegistry; -public abstract class TileEntityBase extends TileEntity{ +public abstract class TileEntityBase extends TileEntity implements ITickable{ protected int ticksElapsed; public boolean isRedstonePowered; @@ -89,6 +91,10 @@ public abstract class TileEntityBase extends TileEntity{ } @Override + public void update(){ + this.updateEntity(); + } + public void updateEntity(){ this.ticksElapsed++; } @@ -97,17 +103,17 @@ public abstract class TileEntityBase extends TileEntity{ public Packet getDescriptionPacket(){ NBTTagCompound tag = new NBTTagCompound(); this.writeSyncableNBT(tag, true); - return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 3, tag); + return new S35PacketUpdateTileEntity(this.pos, 3, tag); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ - this.readSyncableNBT(pkt.func_148857_g(), true); + this.readSyncableNBT(pkt.getNbtCompound(), true); } @Override - public boolean shouldRefresh(Block oldBlock, Block newBlock, int oldMeta, int newMeta, World world, int x, int y, int z){ - return !(oldBlock.isAssociatedBlock(newBlock)); + public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState){ + return !(oldState.getBlock().isAssociatedBlock(newState.getBlock())); } public void writeSyncableNBT(NBTTagCompound compound, boolean isForSync){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBookletStand.java index 008ec3a87..5d4f027e1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBookletStand.java @@ -18,11 +18,6 @@ public class TileEntityBookletStand extends TileEntityBase{ public EntrySet assignedEntry = new EntrySet(null); public String assignedPlayer; - @Override - public boolean canUpdate(){ - return false; - } - @Override public void writeSyncableNBT(NBTTagCompound compound, boolean isForSync){ super.writeSyncableNBT(compound, isForSync); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java index f4c8d39bf..4f09fb2d3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java @@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.items.ItemMisc; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumFacing; public class TileEntityCompost extends TileEntityInventoryBase{ @@ -79,7 +80,7 @@ public class TileEntityCompost extends TileEntityInventoryBase{ } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -89,7 +90,7 @@ public class TileEntityCompost extends TileEntityInventoryBase{ } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return stack.getItem() instanceof ItemFertilizer; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java index 245655177..e28ababbc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java @@ -75,10 +75,10 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem int meta = coordsBlock.getMetadata(worldObj); drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock, coordsBlock.getBlockState(worldObj), 0)); - if(WorldUtil.addToInventory(this, drops, false)){ + if(WorldUtil.addToInventory(this, drops, false, true)){ worldObj.playAuxSFX(2001, this.getPos(), Block.getIdFromBlock(blockToBreak)+(meta << 12)); WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, Position.fromTileEntity(this), i); - WorldUtil.addToInventory(this, drops, true); + WorldUtil.addToInventory(this, drops, true, true); this.storage.extractEnergy(ENERGY_USE, false); this.markDirty(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java index c53a7e601..a755d6f94 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java @@ -15,6 +15,8 @@ import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -45,7 +47,7 @@ public class TileEntityFeeder extends TileEntityInventoryBase{ if(!worldObj.isRemote){ boolean theFlag = this.currentTimer > 0; int range = 5; - List animals = worldObj.getEntitiesWithinAABB(EntityAnimal.class, AxisAlignedBB.getBoundingBox(this.xCoord-range, this.yCoord-range, this.zCoord-range, this.xCoord+range, this.yCoord+range, this.zCoord+range)); + List animals = worldObj.getEntitiesWithinAABB(EntityAnimal.class, AxisAlignedBB.fromBounds(this.pos.getX()-range, this.pos.getY()-range, this.pos.getZ()-range, this.pos.getX()+range, this.pos.getY()+range, this.pos.getZ()+range)); if(animals != null){ this.currentAnimalAmount = animals.size(); if(this.currentAnimalAmount >= 2){ @@ -108,17 +110,17 @@ public class TileEntityFeeder extends TileEntityInventoryBase{ } public void feedAnimal(EntityAnimal animal){ - animal.func_146082_f(null); + animal.setInLove(null); for(int i = 0; i < 7; i++){ double d = Util.RANDOM.nextGaussian()*0.02D; double d1 = Util.RANDOM.nextGaussian()*0.02D; double d2 = Util.RANDOM.nextGaussian()*0.02D; - worldObj.spawnParticle("heart", (animal.posX+(double)(Util.RANDOM.nextFloat()*animal.width*2.0F))-animal.width, animal.posY+0.5D+(double)(Util.RANDOM.nextFloat()*animal.height), (animal.posZ+(double)(Util.RANDOM.nextFloat()*animal.width*2.0F))-animal.width, d, d1, d2); + worldObj.spawnParticle(EnumParticleTypes.HEART, (animal.posX+(double)(Util.RANDOM.nextFloat()*animal.width*2.0F))-animal.width, animal.posY+0.5D+(double)(Util.RANDOM.nextFloat()*animal.height), (animal.posZ+(double)(Util.RANDOM.nextFloat()*animal.width*2.0F))-animal.width, d, d1, d2); } } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -128,7 +130,7 @@ public class TileEntityFeeder extends TileEntityInventoryBase{ } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return false; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java index 2daff36b6..f22f8c960 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java @@ -20,8 +20,8 @@ import net.minecraft.item.ItemDye; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MathHelper; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -61,9 +61,9 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyRece for(int i = 0; i < amount; i++){ ItemStack firework = this.makeFirework(); - double x = this.xCoord+MathHelper.getRandomDoubleInRange(Util.RANDOM, 0, range*2)-range; - double z = this.zCoord+MathHelper.getRandomDoubleInRange(Util.RANDOM, 0, range*2)-range; - EntityFireworkRocket rocket = new EntityFireworkRocket(this.worldObj, x, this.yCoord+0.5, z, firework); + double x = this.pos.getX()+MathHelper.getRandomDoubleInRange(Util.RANDOM, 0, range*2)-range; + double z = this.pos.getZ()+MathHelper.getRandomDoubleInRange(Util.RANDOM, 0, range*2)-range; + EntityFireworkRocket rocket = new EntityFireworkRocket(this.worldObj, x, this.pos.getY()+0.5, z, firework); this.worldObj.spawnEntityInWorld(rocket); } @@ -105,7 +105,7 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyRece int[] colors = new int[MathHelper.getRandomIntegerInRange(Util.RANDOM, 1, 6)]; for(int i = 0; i < colors.length; i++){ - colors[i] = ItemDye.field_150922_c[Util.RANDOM.nextInt(ItemDye.field_150922_c.length)]; + colors[i] = ItemDye.dyeColors[Util.RANDOM.nextInt(ItemDye.dyeColors.length)]; } compound.setIntArray("Colors", colors); @@ -127,22 +127,22 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyRece } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java index dd5b7a213..e43f7039d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java @@ -16,7 +16,7 @@ import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.*; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -54,37 +54,39 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements } private void doWork(){ - ForgeDirection sideToManipulate = ForgeDirection.getOrientation(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)); + Position thisPos = Position.fromTileEntity(this); + + EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(thisPos.getMetadata(worldObj)); + Position coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, Position.fromTileEntity(this), 0); - Position coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, xCoord, yCoord, zCoord, 0); if(coordsBlock != null){ - Block blockToBreak = worldObj.getBlock(coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()); - if(!this.isPlacer && blockToBreak != null && worldObj.getBlockMetadata(coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()) == 0 && FluidContainerRegistry.BUCKET_VOLUME <= this.tank.getCapacity()-this.tank.getFluidAmount()){ + Block blockToBreak = coordsBlock.getBlock(worldObj); + if(!this.isPlacer && blockToBreak != null && coordsBlock.getMetadata(worldObj) == 0 && FluidContainerRegistry.BUCKET_VOLUME <= this.tank.getCapacity()-this.tank.getFluidAmount()){ if(blockToBreak instanceof IFluidBlock && ((IFluidBlock)blockToBreak).getFluid() != null){ if(this.tank.fill(new FluidStack(((IFluidBlock)blockToBreak).getFluid(), FluidContainerRegistry.BUCKET_VOLUME), false) >= FluidContainerRegistry.BUCKET_VOLUME){ this.tank.fill(new FluidStack(((IFluidBlock)blockToBreak).getFluid(), FluidContainerRegistry.BUCKET_VOLUME), true); - WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, xCoord, yCoord, zCoord); + WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, thisPos); } } else if(blockToBreak == Blocks.lava || blockToBreak == Blocks.flowing_lava){ if(this.tank.fill(new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME), false) >= FluidContainerRegistry.BUCKET_VOLUME){ this.tank.fill(new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME), true); - WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, xCoord, yCoord, zCoord); + WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, thisPos); } } else if(blockToBreak == Blocks.water || blockToBreak == Blocks.flowing_water){ if(this.tank.fill(new FluidStack(FluidRegistry.WATER, FluidContainerRegistry.BUCKET_VOLUME), false) >= FluidContainerRegistry.BUCKET_VOLUME){ this.tank.fill(new FluidStack(FluidRegistry.WATER, FluidContainerRegistry.BUCKET_VOLUME), true); - WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, xCoord, yCoord, zCoord); + WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, thisPos); } } } - else if(this.isPlacer && worldObj.getBlock(coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()).isReplaceable(worldObj, coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ())){ + else if(this.isPlacer && coordsBlock.getBlock(worldObj).isReplaceable(worldObj, coordsBlock)){ if(this.tank.getFluidAmount() >= FluidContainerRegistry.BUCKET_VOLUME){ if(this.tank.getFluid().getFluid().getBlock() != null){ - Block block = worldObj.getBlock(xCoord+sideToManipulate.offsetX, yCoord+sideToManipulate.offsetY, zCoord+sideToManipulate.offsetZ); + Block block = coordsBlock.getBlock(worldObj); if(!(block instanceof IFluidBlock) && block != Blocks.lava && block != Blocks.water && block != Blocks.flowing_lava && block != Blocks.flowing_water){ - WorldUtil.placeBlockAtSide(sideToManipulate, worldObj, xCoord, yCoord, zCoord, new ItemStack(this.tank.getFluid().getFluid().getBlock())); + WorldUtil.placeBlockAtSide(sideToManipulate, worldObj, thisPos, new ItemStack(this.tank.getFluid().getFluid().getBlock())); this.tank.drain(FluidContainerRegistry.BUCKET_VOLUME, true); } } @@ -94,7 +96,7 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements } @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill){ + public int fill(EnumFacing from, FluidStack resource, boolean doFill){ if(this.isPlacer){ return this.tank.fill(resource, doFill); } @@ -102,7 +104,7 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements } @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain){ + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain){ if(!this.isPlacer){ return this.tank.drain(resource.amount, doDrain); } @@ -110,7 +112,7 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements } @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain){ + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain){ if(!this.isPlacer){ return this.tank.drain(maxDrain, doDrain); } @@ -118,17 +120,17 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements } @Override - public boolean canFill(ForgeDirection from, Fluid fluid){ + public boolean canFill(EnumFacing from, Fluid fluid){ return this.isPlacer; } @Override - public boolean canDrain(ForgeDirection from, Fluid fluid){ + public boolean canDrain(EnumFacing from, Fluid fluid){ return !this.isPlacer; } @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from){ + public FluidTankInfo[] getTankInfo(EnumFacing from){ return new FluidTankInfo[]{this.tank.getInfo()}; } @@ -157,12 +159,12 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements } if(!this.isPlacer && this.tank.getFluidAmount() > 0){ - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, this.tank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.DOWN, this.tank); if(!this.isRedstonePowered){ - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, this.tank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.NORTH, this.tank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.EAST, this.tank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.SOUTH, this.tank); + WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.WEST, this.tank); } } @@ -192,7 +194,7 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -210,7 +212,7 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot == 1; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java index 79234d481..ac060be93 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java @@ -12,10 +12,11 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -26,23 +27,23 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro private int oldEnergy; @Override - public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate){ + public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate){ return this.storage.extractEnergy(maxExtract, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return this.storage.getEnergyStored(); } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return this.storage.getMaxEnergyStored(); } @Override - public boolean canConnectEnergy(ForgeDirection from){ - return from != ForgeDirection.UP; + public boolean canConnectEnergy(EnumFacing from){ + return from != EnumFacing.UP; } @Override @@ -50,18 +51,14 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro super.updateEntity(); if(!worldObj.isRemote){ if(!this.hasBlockAbove() && worldObj.isDaytime()){ - if(PRODUCE <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){ + if(PRODUCE <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored()){ this.storage.receiveEnergy(PRODUCE, false); this.markDirty(); } } - if(this.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, storage); - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, storage); + if(this.storage.getEnergyStored() > 0){ + WorldUtil.pushEnergyToAllSides(worldObj, Position.fromTileEntity(this), this.storage); } if(this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){ @@ -83,8 +80,10 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro } public boolean hasBlockAbove(){ - for(int y = yCoord+1; y <= worldObj.getHeight(); y++){ - if(!worldObj.getBlock(xCoord, y, zCoord).isAir(worldObj, xCoord, y, zCoord)){ + Position pos = Position.fromTileEntity(this); + for(int y = 1; y <= worldObj.getHeight(); y++){ + Position offset = pos.getOffsetPosition(0, y, 0); + if(!offset.getBlock(worldObj).isAir(worldObj, offset)){ return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGiantChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGiantChest.java index 6f7e18b23..5c22be285 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGiantChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGiantChest.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.tile; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; public class TileEntityGiantChest extends TileEntityInventoryBase{ @@ -20,12 +21,7 @@ public class TileEntityGiantChest extends TileEntityInventoryBase{ } @Override - public boolean canUpdate(){ - return false; - } - - @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -35,7 +31,7 @@ public class TileEntityGiantChest extends TileEntityInventoryBase{ } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGreenhouseGlass.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGreenhouseGlass.java index f2afc4700..ba8435aaa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGreenhouseGlass.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGreenhouseGlass.java @@ -26,17 +26,17 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{ public void updateEntity(){ super.updateEntity(); if(!worldObj.isRemote){ - if(worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord) && worldObj.isDaytime()){ + if(worldObj.canBlockSeeSky(this.getPos()) && worldObj.isDaytime()){ if(this.timeUntilNextFert > 0){ this.timeUntilNextFert--; if(timeUntilNextFert <= 0){ Position blockToFert = this.blockToFertilize(); if(blockToFert != null){ int metaBefore = blockToFert.getMetadata(worldObj); - worldObj.getBlock(blockToFert.getX(), blockToFert.getY(), blockToFert.getZ()).updateTick(worldObj, blockToFert.getX(), blockToFert.getY(), blockToFert.getZ(), Util.RANDOM); + blockToFert.getBlock(worldObj).updateTick(worldObj, blockToFert, blockToFert.getBlockState(worldObj), Util.RANDOM); if(blockToFert.getMetadata(worldObj) != metaBefore){ - worldObj.playAuxSFX(2005, blockToFert.getX(), blockToFert.getY(), blockToFert.getZ(), 0); + worldObj.playAuxSFX(2005, blockToFert, 0); } } } @@ -50,11 +50,12 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{ } public Position blockToFertilize(){ - for(int i = yCoord-1; i > 0; i--){ - Block block = worldObj.getBlock(xCoord, i, zCoord); - if(block != null && !(worldObj.isAirBlock(xCoord, i, zCoord))){ + for(int i = -1; i > 0; i--){ + Position offset = Position.fromBlockPos(pos).getOffsetPosition(0, i, 0); + Block block = offset.getBlock(worldObj); + if(block != null && !(worldObj.isAirBlock(offset))){ if((block instanceof IGrowable || block instanceof IPlantable) && !(block instanceof BlockGrass)){ - return new Position(xCoord, i, zCoord); + return offset; } else{ return null; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java index aecca56c3..3f09a4094 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java @@ -167,7 +167,9 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements @Override public ItemStack removeStackFromSlot(int index){ - return this.slots[index] = null; + ItemStack stack = this.slots[index]; + this.slots[index] = null; + return stack; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java index 4424f4c31..e6ff79f28 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java @@ -24,7 +24,7 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -44,7 +44,7 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei @SideOnly(Side.CLIENT) public void renderParticles(){ if(Util.RANDOM.nextInt(ConfigBoolValues.LESS_LASER_RELAY_PARTICLES.isEnabled() ? 15 : 8) == 0){ - Position thisPos = new Position(this.xCoord, this.yCoord, this.zCoord); + Position thisPos = Position.fromTileEntity(this); LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().getNetworkFor(thisPos); if(network != null){ for(LaserRelayConnectionHandler.ConnectionPair aPair : network.connections){ @@ -60,7 +60,7 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei public Packet getDescriptionPacket(){ NBTTagCompound compound = new NBTTagCompound(); - Position thisPos = new Position(this.xCoord, this.yCoord, this.zCoord); + Position thisPos = Position.fromTileEntity(this); ConcurrentSet connections = LaserRelayConnectionHandler.getInstance().getConnectionsFor(thisPos); if(connections != null){ @@ -69,18 +69,18 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei list.appendTag(pair.writeToNBT()); } compound.setTag("Connections", list); - return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 3, compound); + return new S35PacketUpdateTileEntity(thisPos, 3, compound); } return null; } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ - Position thisPos = new Position(this.xCoord, this.yCoord, this.zCoord); - if(pkt != null && pkt.func_148857_g() != null){ + Position thisPos = Position.fromTileEntity(this); + if(pkt != null && pkt.getNbtCompound() != null){ LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(thisPos); - NBTTagList list = pkt.func_148857_g().getTagList("Connections", 10); + NBTTagList list = pkt.getNbtCompound().getTagList("Connections", 10); for(int i = 0; i < list.tagCount(); i++){ LaserRelayConnectionHandler.ConnectionPair pair = LaserRelayConnectionHandler.ConnectionPair.readFromNBT(list.getCompoundTagAt(i)); LaserRelayConnectionHandler.getInstance().addConnection(pair.firstRelay, pair.secondRelay); @@ -94,28 +94,28 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei @Override public void invalidate(){ super.invalidate(); - LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(new Position(this.xCoord, this.yCoord, this.zCoord)); + LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(Position.fromTileEntity(this)); } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ - return this.transmitEnergy(WorldUtil.getCoordsFromSide(from, xCoord, yCoord, zCoord, 0), maxReceive, simulate); + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ + return this.transmitEnergy(WorldUtil.getCoordsFromSide(from, Position.fromTileEntity(this), 0), maxReceive, simulate); } @Override - public int getEnergyStored(ForgeDirection from){ + public int getEnergyStored(EnumFacing from){ return 0; } @Override - public int getMaxEnergyStored(ForgeDirection from){ + public int getMaxEnergyStored(EnumFacing from){ return 0; } public int transmitEnergy(Position blockFrom, int maxTransmit, boolean simulate){ int transmitted = 0; if(maxTransmit > 0){ - LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().getNetworkFor(new Position(this.xCoord, this.yCoord, this.zCoord)); + LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().getNetworkFor(Position.fromTileEntity(this)); if(network != null){ transmitted = LaserRelayConnectionHandler.getInstance().transferEnergyToReceiverInNeed(worldObj, blockFrom, network, Math.min(ConfigIntValues.LASER_RELAY_MAX_TRANSFER.getValue(), maxTransmit), simulate); } @@ -124,7 +124,7 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei } @Override - public boolean canConnectEnergy(ForgeDirection from){ + public boolean canConnectEnergy(EnumFacing from){ return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java index 181f8de5f..07ab28d94 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java @@ -12,13 +12,14 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -28,8 +29,6 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I public static final int HAS_LAVA = 1; public static final int HAS_AIR = 2; public static final int ENERGY_USE = 150000; - //The Positions the Case Blocks should be in for the Factory to work - private static final int[][] CASE_POSITIONS = {{-1, 1, 0}, {1, 1, 0}, {0, 1, -1}, {0, 1, 1}}; public EnergyStorage storage = new EnergyStorage(3000000); private int currentWorkTime; private int oldEnergy; @@ -43,7 +42,7 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I this.currentWorkTime++; if(this.currentWorkTime >= 200){ this.currentWorkTime = 0; - worldObj.setBlock(xCoord, yCoord+1, zCoord, Blocks.lava); + Position.fromTileEntity(this).getOffsetPosition(0, 1, 0).setBlock(worldObj, Blocks.lava, 0, 2); this.storage.extractEnergy(ENERGY_USE, false); } } @@ -72,11 +71,20 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I } public int isMultiblock(){ - if(WorldUtil.hasBlocksInPlacesGiven(CASE_POSITIONS, InitBlocks.blockMisc, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal(), worldObj, xCoord, yCoord, zCoord)){ - if(worldObj.getBlock(xCoord, yCoord+1, zCoord) == Blocks.lava || worldObj.getBlock(xCoord, yCoord+1, zCoord) == Blocks.flowing_lava){ + Position thisPos = Position.fromTileEntity(this); + Position[] positions = new Position[]{ + thisPos.getOffsetPosition(1, 1, 0), + thisPos.getOffsetPosition(-1, 1, 0), + thisPos.getOffsetPosition(0, 1, 1), + thisPos.getOffsetPosition(0, 1, -1) + }; + + if(WorldUtil.hasBlocksInPlacesGiven(positions, InitBlocks.blockMisc, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal(), worldObj)){ + Position pos = thisPos.getOffsetPosition(0, 1, 0); + if(pos.getBlock(worldObj) == Blocks.lava || pos.getBlock(worldObj) == Blocks.flowing_lava){ return HAS_LAVA; } - if(worldObj.getBlock(xCoord, yCoord+1, zCoord) == null || worldObj.isAirBlock(xCoord, yCoord+1, zCoord)){ + if(pos.getBlock(worldObj) == null || worldObj.isAirBlock(pos)){ return HAS_AIR; } } @@ -84,23 +92,23 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I } @Override - public int receiveEnergy(ForgeDirection from, int maxExtract, boolean simulate){ - return from != ForgeDirection.UP ? this.storage.receiveEnergy(maxExtract, simulate) : 0; + public int receiveEnergy(EnumFacing from, int maxExtract, boolean simulate){ + return from != EnumFacing.UP ? this.storage.receiveEnergy(maxExtract, simulate) : 0; } @Override - public int getEnergyStored(ForgeDirection from){ - return from != ForgeDirection.UP ? this.storage.getEnergyStored() : 0; + public int getEnergyStored(EnumFacing from){ + return from != EnumFacing.UP ? this.storage.getEnergyStored() : 0; } @Override - public int getMaxEnergyStored(ForgeDirection from){ - return from != ForgeDirection.UP ? this.storage.getMaxEnergyStored() : 0; + public int getMaxEnergyStored(EnumFacing from){ + return from != EnumFacing.UP ? this.storage.getMaxEnergyStored() : 0; } @Override - public boolean canConnectEnergy(ForgeDirection from){ - return from != ForgeDirection.UP; + public boolean canConnectEnergy(EnumFacing from){ + return from != EnumFacing.UP; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java index 9e1599f8d..0f5242aba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; @@ -57,7 +58,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR if(!this.isRedstonePowered && this.ticksElapsed%5 == 0){ if(this.layerAt > 0){ - if(this.mine(TileEntityPhantomface.upgradeRange(DEFAULT_RANGE, worldObj, xCoord, yCoord, zCoord))){ + if(this.mine(TileEntityPhantomface.upgradeRange(DEFAULT_RANGE, worldObj, Position.fromTileEntity(this)))){ this.layerAt--; } } @@ -75,26 +76,24 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR for(int aZ = -range; aZ <= range; aZ++){ int actualUse = ENERGY_USE_PER_BLOCK*(this.onlyMineOres ? 3 : 1); if(this.storage.getEnergyStored() >= actualUse){ - int x = this.xCoord+anX; - int z = this.zCoord+aZ; - int y = this.layerAt; + Position pos = new Position(this.pos.getX()+anX, this.layerAt, this.pos.getZ()+aZ); - Block block = this.worldObj.getBlock(x, y, z); - int meta = this.worldObj.getBlockMetadata(x, y, z); - if(block != null && !block.isAir(this.worldObj, x, y, z)){ - if(block.getHarvestLevel(meta) <= 3F && block.getBlockHardness(this.worldObj, x, y, z) >= 0F && !(block instanceof BlockLiquid) && !(block instanceof IFluidBlock) && this.isMinable(block, meta)){ + Block block = pos.getBlock(worldObj); + int meta = pos.getMetadata(worldObj); + if(block != null && !block.isAir(this.worldObj, pos)){ + if(block.getHarvestLevel(pos.getBlockState(worldObj)) <= 3F && block.getBlockHardness(this.worldObj, pos) >= 0F && !(block instanceof BlockLiquid) && !(block instanceof IFluidBlock) && this.isMinable(block, meta)){ ArrayList drops = new ArrayList(); - drops.addAll(block.getDrops(worldObj, x, y, z, meta, 0)); + drops.addAll(block.getDrops(worldObj, pos, pos.getBlockState(worldObj), 0)); - if(WorldUtil.addToInventory(this, drops, ForgeDirection.UNKNOWN, false)){ - worldObj.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block)+(meta << 12)); - worldObj.setBlockToAir(x, y, z); + if(WorldUtil.addToInventory(this, drops, false, true)){ + worldObj.playAuxSFX(2001, pos, Block.getIdFromBlock(block)+(meta << 12)); + worldObj.setBlockToAir(pos); WorldUtil.addToInventory(this, drops, true, true); this.markDirty(); this.storage.extractEnergy(actualUse, false); - this.shootParticles(x, y, z); + this.shootParticles(pos.getX(), pos.getY(), pos.getZ()); } return false; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java index 7887d5b2b..1452563ba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java @@ -64,7 +64,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement public IEnergyProvider getProvider(){ if(this.boundPosition != null){ - TileEntity tile = worldObj.getTileEntity(boundPosition.toBlockPos()); + TileEntity tile = worldObj.getTileEntity(boundPosition); if(tile instanceof IEnergyProvider){ return (IEnergyProvider)tile; } @@ -74,7 +74,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement public IEnergyReceiver getReceiver(){ if(this.boundPosition != null){ - TileEntity tile = worldObj.getTileEntity(boundPosition.toBlockPos()); + TileEntity tile = worldObj.getTileEntity(boundPosition); if(tile instanceof IEnergyReceiver){ return (IEnergyReceiver)tile; } @@ -100,7 +100,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement @Override public boolean isBoundThingInRange(){ - return super.isBoundThingInRange() && (worldObj.getTileEntity(boundPosition.toBlockPos()) instanceof IEnergyReceiver || worldObj.getTileEntity(boundPosition.toBlockPos()) instanceof IEnergyProvider); + return super.isBoundThingInRange() && (worldObj.getTileEntity(boundPosition) instanceof IEnergyReceiver || worldObj.getTileEntity(boundPosition) instanceof IEnergyProvider); } private void pushEnergy(EnumFacing side){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java index 56aec2145..8be8f3a75 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java @@ -86,7 +86,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements @Override public boolean hasBoundPosition(){ if(this.boundPosition != null){ - if(this.worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) instanceof IPhantomTile || (this.getPos().getX() == this.boundPosition.getX() && this.getPos().getY() == this.boundPosition.getY() && this.getPos().getZ() == this.boundPosition.getZ() && this.worldObj.provider.getDimensionId() == this.worldObj.provider.getDimensionId())){ + if(this.worldObj.getTileEntity(boundPosition) instanceof IPhantomTile || (this.getPos().getX() == this.boundPosition.getX() && this.getPos().getY() == this.boundPosition.getY() && this.getPos().getZ() == this.boundPosition.getZ() && this.worldObj.provider.getDimensionId() == this.worldObj.provider.getDimensionId())){ this.boundPosition = null; return false; } @@ -97,13 +97,13 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements private void doWork(){ if(this.isBreaker){ - Block blockToBreak = worldObj.getBlock(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()); - if(blockToBreak != null && blockToBreak.getBlockHardness(worldObj, boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) > -1.0F){ + Block blockToBreak = boundPosition.getBlock(worldObj); + if(blockToBreak != null && blockToBreak.getBlockHardness(worldObj, boundPosition) > -1.0F){ ArrayList drops = new ArrayList(); - int meta = worldObj.getBlockMetadata(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()); - drops.addAll(blockToBreak.getDrops(worldObj, boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), meta, 0)); + int meta = boundPosition.getMetadata(worldObj); + drops.addAll(blockToBreak.getDrops(worldObj, boundPosition, boundPosition.getBlockState(worldObj), 0)); - if(WorldUtil.addToInventory(this, drops, false)){ + if(WorldUtil.addToInventory(this, drops, false, true)){ worldObj.playAuxSFX(2001, this.boundPosition, Block.getIdFromBlock(blockToBreak)+(meta << 12)); worldObj.setBlockToAir(this.boundPosition); WorldUtil.addToInventory(this, drops, true, true); @@ -112,9 +112,9 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements } } else{ - if(worldObj.getBlock(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()).isReplaceable(worldObj, boundPosition.getX(), boundPosition.getY(), boundPosition.getZ())){ + if(boundPosition.getBlock(worldObj).isReplaceable(worldObj, boundPosition)){ int theSlot = WorldUtil.findFirstFilledSlot(this.slots); - this.setInventorySlotContents(theSlot, WorldUtil.placeBlockAtSide(ForgeDirection.UNKNOWN, worldObj, boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), this.slots[theSlot])); + this.setInventorySlotContents(theSlot, WorldUtil.placeBlockAtSide(EnumFacing.UP, worldObj, boundPosition, this.slots[theSlot])); if(this.slots[theSlot] != null && this.slots[theSlot].stackSize <= 0){ this.slots[theSlot] = null; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java index 77417bfcc..3ded41dec 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java @@ -17,6 +17,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumFacing; import java.util.ArrayList; @@ -37,7 +38,7 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement super.updateEntity(); if(!worldObj.isRemote){ if(!this.isRedstonePowered){ - ArrayList items = (ArrayList)this.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(this.xCoord-RANGE, this.yCoord-RANGE, this.zCoord-RANGE, this.xCoord+RANGE, this.yCoord+RANGE, this.zCoord+RANGE)); + ArrayList items = (ArrayList)this.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.fromBounds(this.pos.getX()-RANGE, this.pos.getY()-RANGE, this.pos.getZ()-RANGE, this.pos.getX()+RANGE, this.pos.getY()+RANGE, this.pos.getZ()+RANGE)); if(!items.isEmpty()){ for(EntityItem item : items){ if(!item.isDead && item.getEntityItem() != null){ @@ -45,8 +46,8 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement if(this.checkFilter(toAdd)){ ArrayList checkList = new ArrayList(); checkList.add(toAdd); - if(WorldUtil.addToInventory(this, 0, WHITELIST_START, checkList, false)){ - WorldUtil.addToInventory(this, 0, WHITELIST_START, checkList, true); + if(WorldUtil.addToInventory(this, 0, WHITELIST_START, checkList, EnumFacing.UP, false, true)){ + WorldUtil.addToInventory(this, 0, WHITELIST_START, checkList, EnumFacing.UP, true, true); item.setDead(); } } @@ -85,7 +86,7 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -95,7 +96,7 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot < WHITELIST_START; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java index a61a7a41d..124dd30eb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java @@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumFacing; public class TileEntityXPSolidifier extends TileEntityInventoryBase implements IButtonReactor{ @@ -65,7 +66,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -75,7 +76,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java index 483c430dc..b98ad9c36 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java @@ -31,13 +31,13 @@ public class UpdateCheckerClientNotificationEvent{ if(ticksElapsedBeforeInfo >= 800){ EntityPlayer player = Minecraft.getMinecraft().thePlayer; if(UpdateChecker.checkFailed){ - player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.failed"))); + player.addChatComponentMessage(IChatComponent.Serializer.jsonToComponent(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.failed"))); notified = true; } else if(UpdateChecker.needsUpdateNotify){ - player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.generic"))); - player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersion))); - player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.buttons", UpdateChecker.CHANGELOG_LINK, UpdateChecker.DOWNLOAD_LINK))); + player.addChatComponentMessage(IChatComponent.Serializer.jsonToComponent(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.generic"))); + player.addChatComponentMessage(IChatComponent.Serializer.jsonToComponent(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersion))); + player.addChatComponentMessage(IChatComponent.Serializer.jsonToComponent(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.buttons", UpdateChecker.CHANGELOG_LINK, UpdateChecker.DOWNLOAD_LINK))); notified = true; } ticksElapsedBeforeInfo = 0; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index e42027ebc..5b15b161a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -31,14 +31,14 @@ public class AssetUtil{ public static final ResourceLocation GUI_INVENTORY_LOCATION = getGuiLocation("guiInventory"); public static final int TESR_RENDER_ID = 2; - /*public static int compostRenderId; + public static int compostRenderId; public static int fishingNetRenderId; public static int furnaceSolarRenderId; public static int coffeeMachineRenderId; public static int phantomBoosterRenderId; public static int smileyCloudRenderId; public static int laserRelayRenderId; - public static int bookletStandRenderId;*/ + public static int bookletStandRenderId; public static ResourceLocation getGuiLocation(String file){ return new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/gui/"+file+".png"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java index 8b799f6c4..e62ac4e4f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java @@ -14,6 +14,7 @@ import net.minecraft.enchantment.Enchantment; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.ResourceLocation; import java.util.List; @@ -21,8 +22,9 @@ import java.util.List; public class ItemUtil{ public static Item getItemFromName(String name){ - if(Item.itemRegistry.containsKey(name)){ - return (Item)Item.itemRegistry.getObject(name); + ResourceLocation resLoc = new ResourceLocation(name); + if(Item.itemRegistry.containsKey(resLoc)){ + return Item.itemRegistry.getObject(resLoc); } return null; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/playerdata/PersistentClientData.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/playerdata/PersistentClientData.java index 1e8c97fb7..2b4ed115d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/playerdata/PersistentClientData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/playerdata/PersistentClientData.java @@ -89,7 +89,7 @@ public class PersistentClientData{ private static String getName(){ if(Minecraft.getMinecraft().theWorld != null){ - return Minecraft.getMinecraft().isIntegratedServerRunning() ? Minecraft.getMinecraft().getIntegratedServer().getFolderName() : Minecraft.getMinecraft().func_147104_D().serverIP; + return Minecraft.getMinecraft().isIntegratedServerRunning() ? Minecraft.getMinecraft().getIntegratedServer().getFolderName() : Minecraft.getMinecraft().getCurrentServerData().serverIP; } else{ return "Invalid"; From 0ca8fc90c14a36bfd5ef9d9f35eaa556616010a1 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 08:10:55 +0100 Subject: [PATCH 06/58] IT RUNS! No textures though. And lots of bugs. --- .../api/ActuallyAdditionsAPI.java | 4 +- .../actuallyadditions/api/Position.java | 3 +- .../mod/blocks/BlockFluidCollector.java | 9 +-- .../mod/blocks/BlockMiner.java | 12 ++-- .../mod/blocks/BlockTreasureChest.java | 2 +- .../mod/blocks/base/BlockBase.java | 20 +++++++ .../mod/blocks/base/BlockBushBase.java | 20 +++++++ .../mod/blocks/base/BlockContainerBase.java | 18 ++++++ .../mod/blocks/metalists/TheMiscBlocks.java | 20 +++---- .../mod/blocks/metalists/TheWildPlants.java | 8 +-- .../mod/blocks/render/model/ModelCompost.java | 2 +- .../mod/booklet/BookletUtils.java | 4 +- .../mod/booklet/GuiBooklet.java | 19 ++---- .../mod/booklet/page/PageCrusherRecipe.java | 8 +-- .../mod/booklet/page/PageFurnace.java | 12 ++-- .../mod/crafting/ItemCrafting.java | 10 ++-- .../mod/event/BucketFillEvent.java | 5 +- .../actuallyadditions/mod/event/HudEvent.java | 7 ++- .../mod/event/PlayerObtainEvents.java | 7 +-- .../mod/gen/VillageComponentJamHouse.java | 18 +----- .../mod/gen/VillageJamHouseHandler.java | 8 +-- .../mod/inventory/ContainerDrill.java | 58 ++++++++++++++----- .../mod/inventory/gui/GuiBreaker.java | 2 +- .../mod/inventory/gui/GuiCoffeeMachine.java | 8 +-- .../mod/inventory/gui/GuiDropper.java | 2 +- .../mod/inventory/gui/GuiEnergizer.java | 4 +- .../mod/inventory/gui/GuiEnervator.java | 4 +- .../mod/inventory/gui/GuiFluidCollector.java | 4 +- .../mod/inventory/gui/GuiFurnaceDouble.java | 4 +- .../mod/inventory/gui/GuiInputter.java | 39 +++++++------ .../mod/inventory/gui/GuiPhantomPlacer.java | 2 +- .../mod/inventory/gui/GuiRangedCollector.java | 4 +- .../mod/inventory/gui/GuiSmileyCloud.java | 8 ++- .../mod/items/InitItems.java | 46 +++++++-------- .../mod/items/base/ItemArmorAA.java | 9 --- .../mod/items/lens/LensColor.java | 10 ++-- .../mod/items/lens/LensNone.java | 14 ++--- .../mod/material/InitArmorMaterials.java | 19 +++--- .../mod/misc/DamageSources.java | 4 +- .../mod/misc/DispenserHandlerFertilize.java | 14 +++-- .../mod/misc/special/SpecialRenderInit.java | 2 +- .../mod/nei/NEIBookletRecipe.java | 10 ++-- .../mod/nei/NEIFurnaceDoubleRecipe.java | 6 +- .../mod/nei/NEIScreenEvents.java | 4 +- .../mod/network/PacketBookletStandButton.java | 7 ++- .../mod/network/VanillaPacketSyncer.java | 4 +- .../mod/network/gui/PacketGuiButton.java | 5 +- .../mod/proxy/ClientProxy.java | 6 +- .../mod/tile/TileEntityInputter.java | 14 +++-- .../mod/tile/TileEntityPhantomBooster.java | 4 -- .../mod/tile/TileEntityPhantomItemface.java | 34 +++++++---- .../mod/util/CompatUtil.java | 6 +- .../actuallyadditions/mod/util/Util.java | 2 - 53 files changed, 323 insertions(+), 252 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java index 75f2b1c47..f1240d0d9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java @@ -69,7 +69,7 @@ public class ActuallyAdditionsAPI{ * @param outputTwoChance The chance of the second output (0 won't occur at all, 100 will all the time) */ public static void addCrusherRecipe(String input, String outputOne, int outputOneAmount, String outputTwo, int outputTwoAmount, int outputTwoChance){ - if(!OreDictionary.getOres(input, false).isEmpty() && !OreDictionary.getOres(outputOne, false).isEmpty() && (outputTwo == null || outputTwo.isEmpty() || !OreDictionary.getOres(outputTwo, false).isEmpty())){ + if(!OreDictionary.getOres(input).isEmpty() && !OreDictionary.getOres(outputOne).isEmpty() && (outputTwo == null || outputTwo.isEmpty() || !OreDictionary.getOres(outputTwo).isEmpty())){ crusherRecipes.add(new CrusherRecipe(input, outputOne, outputOneAmount, outputTwo, outputTwoAmount, outputTwoChance)); } } @@ -107,7 +107,7 @@ public class ActuallyAdditionsAPI{ * @param outputOneAmount The amount of the first output */ public static void addCrusherRecipe(ItemStack input, String outputOne, int outputOneAmount){ - if(!OreDictionary.getOres(outputOne, false).isEmpty()){ + if(!OreDictionary.getOres(outputOne).isEmpty()){ crusherRecipes.add(new CrusherRecipe(input, outputOne, outputOneAmount)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/Position.java b/src/main/java/de/ellpeck/actuallyadditions/api/Position.java index 2cbb72451..2bab2c467 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/Position.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/Position.java @@ -105,7 +105,8 @@ public class Position extends BlockPos{ } public static Position fromBlockPos(BlockPos pos){ - return (Position)pos; + //TODO Make this less object creaty (Typecasting doesn't work?) + return new Position(pos.getX(), pos.getY(), pos.getZ()); } public boolean setBlockState(World world, IBlockState state, int flag){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java index d829dfcd7..4f6f97527 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java @@ -24,6 +24,7 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; public class BlockFluidCollector extends BlockContainerBase{ @@ -45,14 +46,14 @@ public class BlockFluidCollector extends BlockContainerBase{ } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ - if(this.tryToggleRedstone(world, x, y, z, player)){ + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ + if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ return true; } if(!world.isRemote){ - TileEntityFluidCollector collector = (TileEntityFluidCollector)world.getTileEntity(x, y, z); + TileEntityFluidCollector collector = (TileEntityFluidCollector)world.getTileEntity(pos); if(collector != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FLUID_COLLECTOR.ordinal(), world, x, y, z); + player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FLUID_COLLECTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java index f574c7a81..ebbdcfda9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; @@ -70,18 +70,18 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay{ } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); + public void breakBlock(World world, BlockPos pos, IBlockState state){ + this.dropInventory(world, Position.fromBlockPos(pos)); + super.breakBlock(world, pos, state); } @Override @SideOnly(Side.CLIENT) public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, MovingObjectPosition posHit, Profiler profiler, ScaledResolution resolution){ - TileEntity tile = minecraft.theWorld.getTileEntity(posHit.blockX, posHit.blockY, posHit.blockZ); + TileEntity tile = minecraft.theWorld.getTileEntity(posHit.getBlockPos()); if(tile instanceof TileEntityMiner){ String info = ((TileEntityMiner)tile).layerAt <= 0 ? "Done Mining!" : "Mining at Y = "+((TileEntityMiner)tile).layerAt+"."; - minecraft.fontRenderer.drawStringWithShadow(info, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-20, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow(info, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-20, StringUtil.DECIMAL_COLOR_WHITE); } } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java index 61bfc0d7f..3778976ce 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java @@ -73,7 +73,7 @@ public class BlockTreasureChest extends BlockBase{ } @Override - public boolean canSilkHarvest(){ + public boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player){ return false; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java index 190391c3e..50124b36c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java @@ -14,6 +14,9 @@ import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockState; +import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -55,4 +58,21 @@ public class BlockBase extends Block{ public EnumRarity getRarity(ItemStack stack){ return EnumRarity.COMMON; } + + public static final PropertyInteger META = PropertyInteger.create("metadata", 0, 15); + + @Override + protected BlockState createBlockState(){ + return new BlockState(this, META); + } + + @Override + public IBlockState getStateFromMeta(int meta){ + return getDefaultState().withProperty(META, meta); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(META); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java index a5678a55f..28362a05d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java @@ -13,6 +13,9 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.BlockBush; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockState; +import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -54,4 +57,21 @@ public class BlockBushBase extends BlockBush{ public EnumRarity getRarity(ItemStack stack){ return EnumRarity.COMMON; } + + public static final PropertyInteger META = PropertyInteger.create("metadata", 0, 15); + + @Override + protected BlockState createBlockState(){ + return new BlockState(this, META); + } + + @Override + public IBlockState getStateFromMeta(int meta){ + return getDefaultState().withProperty(META, meta); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(META); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index 5c5ffdc44..f33f3bb45 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -19,6 +19,8 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockRedstoneTorch; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; @@ -259,4 +261,20 @@ public abstract class BlockContainerBase extends BlockContainer{ return false; } + public static final PropertyInteger META = PropertyInteger.create("metadata", 0, 15); + + @Override + protected BlockState createBlockState(){ + return new BlockState(this, META); + } + + @Override + public IBlockState getStateFromMeta(int meta){ + return getDefaultState().withProperty(META, meta); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(META); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java index 2980ce7e2..865a60d3e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java @@ -14,16 +14,16 @@ import net.minecraft.item.EnumRarity; public enum TheMiscBlocks{ - QUARTZ_PILLAR("BlackQuartzPillar", EnumRarity.rare), - QUARTZ_CHISELED("BlackQuartzChiseled", EnumRarity.rare), - QUARTZ("BlackQuartz", EnumRarity.rare), - ORE_QUARTZ("OreBlackQuartz", EnumRarity.epic), - WOOD_CASING("WoodCasing", EnumRarity.common), - CHARCOAL_BLOCK("Charcoal", EnumRarity.common), - ENDERPEARL_BLOCK("Enderpearl", EnumRarity.rare), - LAVA_FACTORY_CASE("LavaFactoryCase", EnumRarity.uncommon), - ENDER_CASING("EnderCasing", EnumRarity.epic), - IRON_CASING("IronCasing", EnumRarity.rare); + QUARTZ_PILLAR("BlackQuartzPillar", EnumRarity.RARE), + QUARTZ_CHISELED("BlackQuartzChiseled", EnumRarity.RARE), + QUARTZ("BlackQuartz", EnumRarity.RARE), + ORE_QUARTZ("OreBlackQuartz", EnumRarity.EPIC), + WOOD_CASING("WoodCasing", EnumRarity.COMMON), + CHARCOAL_BLOCK("Charcoal", EnumRarity.COMMON), + ENDERPEARL_BLOCK("Enderpearl", EnumRarity.RARE), + LAVA_FACTORY_CASE("LavaFactoryCase", EnumRarity.UNCOMMON), + ENDER_CASING("EnderCasing", EnumRarity.EPIC), + IRON_CASING("IronCasing", EnumRarity.RARE); public final String name; public final EnumRarity rarity; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheWildPlants.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheWildPlants.java index 862298d81..3257d776d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheWildPlants.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheWildPlants.java @@ -16,10 +16,10 @@ import net.minecraft.item.EnumRarity; public enum TheWildPlants{ - CANOLA("Canola", EnumRarity.rare, InitBlocks.blockCanola), - FLAX("Flax", EnumRarity.rare, InitBlocks.blockFlax), - RICE("Rice", EnumRarity.rare, InitBlocks.blockRice), - COFFEE("Coffee", EnumRarity.rare, InitBlocks.blockCoffee); + CANOLA("Canola", EnumRarity.RARE, InitBlocks.blockCanola), + FLAX("Flax", EnumRarity.RARE, InitBlocks.blockFlax), + RICE("Rice", EnumRarity.RARE, InitBlocks.blockRice), + COFFEE("Coffee", EnumRarity.RARE, InitBlocks.blockCoffee); public final String name; public final EnumRarity rarity; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java index d7dc69737..c47e49adb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java @@ -75,7 +75,7 @@ public class ModelCompost extends ModelBaseAA{ @Override public void renderExtra(float f, TileEntity tile){ //Hehe - if("ShadowfactsDev".equals(Minecraft.getMinecraft().thePlayer.getCommandSenderName())){ + if("ShadowfactsDev".equals(Minecraft.getMinecraft().thePlayer.getName())){ GL11.glTranslatef(0F, 1F, 0F); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java index a37f3d5a2..a1705812f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java @@ -81,7 +81,7 @@ public class BookletUtils{ booklet.getFontRenderer().drawString(strg, booklet.guiLeft+booklet.xSize/2-booklet.getFontRenderer().getStringWidth(strg)/2-3, booklet.guiTop+12+booklet.getFontRenderer().FONT_HEIGHT, 0); String version; - String playerName = Minecraft.getMinecraft().thePlayer.getCommandSenderName(); + String playerName = Minecraft.getMinecraft().thePlayer.getName(); if(playerName.equals("dqmhose")){ version = "Pants Edition"; } @@ -184,7 +184,7 @@ public class BookletUtils{ public static void doHoverTexts(GuiBooklet booklet, int mouseX, int mouseY){ //Update all of the buttons' hovering texts for(Object button : booklet.getButtonList()){ - if(button instanceof GuiButton && ((GuiButton)button).visible && ((GuiButton)button).func_146115_a()){ + if(button instanceof GuiButton && ((GuiButton)button).visible && ((GuiButton)button).isMouseOver()){ if(button instanceof BookmarkButton){ ((BookmarkButton)button).drawHover(mouseX, mouseY); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java index 7a55f86fe..0b0305463 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java @@ -42,6 +42,7 @@ import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; +import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -197,7 +198,7 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ } @Override - protected void mouseClicked(int par1, int par2, int par3){ + protected void mouseClicked(int par1, int par2, int par3) throws IOException{ this.searchField.mouseClicked(par1, par2, par3); //Left mouse button if(par3 == 0 && this.currentEntrySet.chapter != null){ @@ -212,12 +213,7 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ BookletUtils.openIndexEntry(this, null, 1, true); } } - try{ - super.mouseClicked(par1, par2, par3); - } - catch(Exception e){ - ModUtil.LOGGER.error("Something bad happened when trying to click a button in the booklet!", e); - } + super.mouseClicked(par1, par2, par3); } @Override @@ -362,7 +358,7 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ @Override //For scrolling through pages - public void handleMouseInput(){ + public void handleMouseInput() throws IOException{ int wheel = Mouse.getEventDWheel(); if(wheel != 0){ if(wheel > 0){ @@ -372,12 +368,7 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ BookletUtils.handlePreviousPage(this); } } - try{ - super.handleMouseInput(); - } - catch(Exception e){ - ModUtil.LOGGER.error("Something bad happened when trying to click a button in the booklet!", e); - } + super.handleMouseInput(); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java index 34d7ff5d8..efb564d88 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java @@ -58,21 +58,21 @@ public class PageCrusherRecipe extends BookletPageAA{ @SideOnly(Side.CLIENT) public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ if(recipe == null){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.getGuiLeft()+14, gui.getGuiTop()+15, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.getGuiLeft()+14, gui.getGuiTop()+15, 115, 0, false); } else{ String strg = "Crusher Recipe"; - Minecraft.getMinecraft().fontRenderer.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRenderer.getStringWidth(strg)/2, gui.getGuiTop()+10, 0); + Minecraft.getMinecraft().fontRendererObj.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRendererObj.getStringWidth(strg)/2, gui.getGuiTop()+10, 0); } String text = gui.getCurrentEntrySet().page.getText(); if(text != null && !text.isEmpty()){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, text, gui.getGuiLeft()+14, gui.getGuiTop()+100, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+100, 115, 0, false); } if(recipe != null){ if(recipe.outputTwoChance > 0){ - Minecraft.getMinecraft().fontRenderer.drawString(recipe.outputTwoChance+"%", gui.getGuiLeft()+37+62, gui.getGuiTop()+20+33, 0); + Minecraft.getMinecraft().fontRendererObj.drawString(recipe.outputTwoChance+"%", gui.getGuiLeft()+37+62, gui.getGuiTop()+20+33, 0); } if(recipe.getRecipeOutputOnes() != null){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java index f9c2b3d5a..e86abfee7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java @@ -62,16 +62,16 @@ public class PageFurnace extends BookletPageAA{ public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ ItemStack input = this.input != null ? this.input : this.getInputForOutput(this.result); if(input == null){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.getGuiLeft()+14, gui.getGuiTop()+15, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.getGuiLeft()+14, gui.getGuiTop()+15, 115, 0, false); } else{ String strg = "Furnace Recipe"; - Minecraft.getMinecraft().fontRenderer.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRenderer.getStringWidth(strg)/2, gui.getGuiTop()+10, 0); + Minecraft.getMinecraft().fontRendererObj.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRendererObj.getStringWidth(strg)/2, gui.getGuiTop()+10, 0); } String text = gui.getCurrentEntrySet().page.getText(); if(text != null && !text.isEmpty()){ - StringUtil.drawSplitString(Minecraft.getMinecraft().fontRenderer, text, gui.getGuiLeft()+14, gui.getGuiTop()+100, 115, 0, false); + StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+100, 115, 0, false); } if(input != null){ @@ -99,10 +99,10 @@ public class PageFurnace extends BookletPageAA{ } private ItemStack getInputForOutput(ItemStack output){ - for(Object o : FurnaceRecipes.smelting().getSmeltingList().entrySet()){ - ItemStack stack = (ItemStack)((Map.Entry)o).getValue(); + for(Map.Entry o : FurnaceRecipes.instance().getSmeltingList().entrySet()){ + ItemStack stack = (ItemStack)(o).getValue(); if(stack.isItemEqual(output)){ - return (ItemStack)((Map.Entry)o).getKey(); + return (ItemStack)(o).getKey(); } } return null; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java index 81f9a6afa..1ab666667 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java @@ -391,7 +391,7 @@ public class ItemCrafting{ } //Resonant Rice - if(ConfigCrafting.RESONANT_RICE.isEnabled() && !OreDictionary.getOres("nuggetEnderium", false).isEmpty()){ + if(ConfigCrafting.RESONANT_RICE.isEnabled() && !OreDictionary.getOres("nuggetEnderium").isEmpty()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemResonantRice), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.gunpowder)); } @@ -533,10 +533,10 @@ public class ItemCrafting{ public static void initMashedFoodRecipes(){ if(ConfigCrafting.MASHED_FOOD.isEnabled()){ - for(Object item : Item.itemRegistry){ + for(Item item : Item.itemRegistry){ if(item instanceof ItemFood || item instanceof IPlantable || item instanceof IGrowable){ if(!isBlacklisted(item)){ - ItemStack ingredient = new ItemStack((Item)item, 1, Util.WILDCARD); + ItemStack ingredient = new ItemStack(item, 1, Util.WILDCARD); GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.MASHED_FOOD.ordinal()), ingredient, ingredient, ingredient, ingredient, new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD)); recipesMashedFood.add(Util.GetRecipes.lastIRecipe()); } @@ -545,9 +545,9 @@ public class ItemCrafting{ } } - private static boolean isBlacklisted(Object item){ + private static boolean isBlacklisted(Item item){ for(String except : ConfigValues.mashedFoodCraftingExceptions){ - if(Item.itemRegistry.getNameForObject(item).equals(except)){ + if(item.getRegistryName().equals(except)){ return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java index 3c82914e9..a9d9934e6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.event; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.items.InitItems; import net.minecraft.block.Block; @@ -28,9 +29,9 @@ public class BucketFillEvent{ } private void fillBucket(FillBucketEvent event, Item item, Block fluid){ - Block block = event.world.getBlock(event.target.blockX, event.target.blockY, event.target.blockZ); + Block block = Position.fromBlockPos(event.target.getBlockPos()).getBlock(event.world); if(block == fluid){ - event.world.setBlockToAir(event.target.blockX, event.target.blockY, event.target.blockZ); + event.world.setBlockToAir(event.target.getBlockPos()); event.result = new ItemStack(item); event.setResult(Event.Result.ALLOW); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java index 013f39e8b..372a75d8c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.event; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.tile.IRedstoneToggle; @@ -37,7 +38,7 @@ public class HudEvent{ Profiler profiler = minecraft.mcProfiler; EntityPlayer player = minecraft.thePlayer; MovingObjectPosition posHit = minecraft.objectMouseOver; - FontRenderer font = minecraft.fontRenderer; + FontRenderer font = minecraft.fontRendererObj; ItemStack stack = player.getCurrentEquippedItem(); profiler.startSection(ModUtil.MOD_ID+"Hud"); @@ -51,8 +52,8 @@ public class HudEvent{ } if(posHit != null){ - Block blockHit = minecraft.theWorld.getBlock(posHit.blockX, posHit.blockY, posHit.blockZ); - TileEntity tileHit = minecraft.theWorld.getTileEntity(posHit.blockX, posHit.blockY, posHit.blockZ); + Block blockHit = Position.fromBlockPos(posHit.getBlockPos()).getBlock(minecraft.theWorld); + TileEntity tileHit = minecraft.theWorld.getTileEntity(posHit.getBlockPos()); if(blockHit instanceof IHudDisplay){ profiler.startSection("BlockHudDisplay"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java index 541857866..1069e1f94 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java @@ -20,7 +20,6 @@ import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentServerData; import net.minecraft.block.Block; 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.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -37,8 +36,8 @@ public class PlayerObtainEvents{ if(ConfigBoolValues.GIVE_BOOKLET_ON_FIRST_CRAFT.isEnabled()){ if(!event.player.worldObj.isRemote && event.crafting.getItem() != InitItems.itemBooklet){ - String itemName = Item.itemRegistry.getNameForObject(event.crafting.getItem()); - String blockName = Block.blockRegistry.getNameForObject(Block.getBlockFromItem(event.crafting.getItem())); + String itemName = event.crafting.getItem().getRegistryName(); + String blockName = Block.getBlockFromItem(event.crafting.getItem()).getRegistryName(); if((itemName != null && itemName.toLowerCase(Locale.ROOT).contains(ModUtil.MOD_ID_LOWER)) || (blockName != null && blockName.toLowerCase(Locale.ROOT).contains(ModUtil.MOD_ID_LOWER))){ NBTTagCompound compound = PersistentServerData.getDataFromPlayer(event.player); @@ -47,7 +46,7 @@ public class PlayerObtainEvents{ WorldData.makeDirty(); EntityItem entityItem = new EntityItem(event.player.worldObj, event.player.posX, event.player.posY, event.player.posZ, new ItemStack(InitItems.itemBooklet)); - entityItem.delayBeforeCanPickup = 0; + entityItem.setPickupDelay(0); event.player.worldObj.spawnEntityInWorld(entityItem); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentJamHouse.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentJamHouse.java index b525b966b..7fe2d8b9e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentJamHouse.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageComponentJamHouse.java @@ -10,20 +10,7 @@ package de.ellpeck.actuallyadditions.mod.gen; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityChest; -import net.minecraft.util.WeightedRandomChestContent; -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 net.minecraftforge.common.ChestGenHooks; - -import java.util.List; -import java.util.Random; public class VillageComponentJamHouse extends StructureVillagePieces.House1{ @@ -38,7 +25,8 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{ } - public VillageComponentJamHouse(StructureBoundingBox boundingBox, int par5){ + //TODO Fix village + /*public VillageComponentJamHouse(StructureBoundingBox boundingBox, int par5){ this.coordBaseMode = par5; this.boundingBox = boundingBox; } @@ -200,5 +188,5 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{ @Override protected int getVillagerType(int par1){ return ConfigIntValues.JAM_VILLAGER_ID.getValue(); - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageJamHouseHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageJamHouseHandler.java index 96acd1046..f847cdd2a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageJamHouseHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/VillageJamHouseHandler.java @@ -13,10 +13,10 @@ package de.ellpeck.actuallyadditions.mod.gen; import net.minecraft.world.gen.structure.StructureVillagePieces; import net.minecraftforge.fml.common.registry.VillagerRegistry; -import java.util.List; import java.util.Random; -public class VillageJamHouseHandler implements VillagerRegistry.IVillageCreationHandler{ +//TODO Fix village +public abstract class VillageJamHouseHandler implements VillagerRegistry.IVillageCreationHandler{ @Override public StructureVillagePieces.PieceWeight getVillagePieceWeight(Random random, int i){ @@ -28,8 +28,8 @@ public class VillageJamHouseHandler implements VillagerRegistry.IVillageCreation return VillageComponentJamHouse.class; } - @Override + /*@Override public Object buildComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5){ return VillageComponentJamHouse.buildComponent(pieces, p1, p2, p3, p4); - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java index c02a4cc91..17914bb9e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java @@ -21,6 +21,7 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import net.minecraft.util.IChatComponent; @InventoryContainer public class ContainerDrill extends Container{ @@ -72,7 +73,7 @@ public class ContainerDrill extends Container{ final int hotbarStart = inventoryEnd+1; final int hotbarEnd = hotbarStart+8; - Slot theSlot = (Slot)this.inventorySlots.get(slot); + Slot theSlot = this.inventorySlots.get(slot); if(theSlot != null && theSlot.getHasStack()){ ItemStack newStack = theSlot.getStack(); @@ -149,15 +150,20 @@ public class ContainerDrill extends Container{ public ItemStack[] slots = new ItemStack[SLOT_AMOUNT]; @Override - public String getInventoryName(){ + public String getName(){ return "drill"; } @Override - public boolean hasCustomInventoryName(){ + public boolean hasCustomName(){ return false; } + @Override + public IChatComponent getDisplayName(){ + return null; + } + @Override public int getInventoryStackLimit(){ return 64; @@ -168,29 +174,44 @@ public class ContainerDrill extends Container{ } - @Override - public void openInventory(){ - - } - - @Override - public void closeInventory(){ - - } - @Override public boolean isItemValidForSlot(int slot, ItemStack stack){ return true; } + @Override + public int getField(int id){ + return 0; + } + + @Override + public void setField(int id, int value){ + + } + + @Override + public int getFieldCount(){ + return 0; + } + + @Override + public void clear(){ + this.slots = new ItemStack[this.slots.length]; + } + @Override public boolean isUseableByPlayer(EntityPlayer player){ return true; } @Override - public ItemStack getStackInSlotOnClosing(int i){ - return getStackInSlot(i); + public void openInventory(EntityPlayer player){ + + } + + @Override + public void closeInventory(EntityPlayer player){ + } @Override @@ -233,5 +254,12 @@ public class ContainerDrill extends Container{ } return null; } + + @Override + public ItemStack removeStackFromSlot(int index){ + ItemStack stack = this.slots[index]; + this.slots[index] = null; + return stack; + } } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java index fdd4f1b8a..d8d11cbf9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java @@ -41,7 +41,7 @@ public class GuiBreaker extends GuiContainer{ @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.breaker.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.breaker.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java index 8365ae208..7e43650ee 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java @@ -66,22 +66,22 @@ public class GuiCoffeeMachine extends GuiContainer{ String text1 = this.machine.storage.getEnergyStored()+"/"+this.machine.storage.getMaxEnergyStored()+" RF"; if(x >= guiLeft+16 && y >= guiTop+5 && x <= guiLeft+23 && y <= guiTop+89){ - this.func_146283_a(Collections.singletonList(text1), x, y); + this.drawHoveringText(Collections.singletonList(text1), x, y); } String text3 = StringUtil.getFluidInfo(this.machine.tank); if(x >= guiLeft+27 && y >= guiTop+5 && x <= guiLeft+33 && y <= guiTop+70){ - this.func_146283_a(Collections.singletonList(text3), x, y); + this.drawHoveringText(Collections.singletonList(text3), x, y); } String text2 = this.machine.coffeeCacheAmount+"/"+TileEntityCoffeeMachine.COFFEE_CACHE_MAX_AMOUNT+" "+StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.coffee"); if(x >= guiLeft+40 && y >= guiTop+25 && x <= guiLeft+49 && y <= guiTop+56){ - this.func_146283_a(Collections.singletonList(text2), x, y); + this.drawHoveringText(Collections.singletonList(text2), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.machine.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.machine.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java index 55700e1a6..01dd3340e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java @@ -41,7 +41,7 @@ public class GuiDropper extends GuiContainer{ @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.dropper.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.dropper.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java index f0651cda5..6e3b08246 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java @@ -41,13 +41,13 @@ public class GuiEnergizer extends GuiContainer{ super.drawScreen(x, y, f); String text1 = this.energizer.storage.getEnergyStored()+"/"+this.energizer.storage.getMaxEnergyStored()+" RF"; if(x >= guiLeft+57 && y >= guiTop+6 && x <= guiLeft+72 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text1), x, y); + this.drawHoveringText(Collections.singletonList(text1), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.energizer.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.energizer.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java index 51d3d471b..18bc7a47c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java @@ -41,13 +41,13 @@ public class GuiEnervator extends GuiContainer{ super.drawScreen(x, y, f); String text1 = this.enervator.storage.getEnergyStored()+"/"+this.enervator.storage.getMaxEnergyStored()+" RF"; if(x >= guiLeft+57 && y >= guiTop+6 && x <= guiLeft+72 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text1), x, y); + this.drawHoveringText(Collections.singletonList(text1), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.enervator.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.enervator.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java index 1bf5e1945..e8149e7cd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java @@ -43,13 +43,13 @@ public class GuiFluidCollector extends GuiContainer{ String text2 = StringUtil.getFluidInfo(this.collector.tank); if(x >= guiLeft+68 && y >= guiTop+6 && x <= guiLeft+83 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text2), x, y); + this.drawHoveringText(Collections.singletonList(text2), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.collector.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.collector.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java index 782522bd9..239c8e7db 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java @@ -41,13 +41,13 @@ public class GuiFurnaceDouble extends GuiContainer{ super.drawScreen(x, y, f); String text = this.tileFurnace.storage.getEnergyStored()+"/"+this.tileFurnace.storage.getMaxEnergyStored()+" RF"; if(x >= guiLeft+28 && y >= guiTop+6 && x <= guiLeft+43 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text), x, y); + this.drawHoveringText(Collections.singletonList(text), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileFurnace.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileFurnace.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java index 688cbbb53..0894a035e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java @@ -33,6 +33,7 @@ import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -80,17 +81,17 @@ public class GuiInputter extends GuiContainer{ public void initGui(){ super.initGui(); - this.fieldPullStart = new GuiTextField(this.fontRendererObj, guiLeft+13, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8); + this.fieldPullStart = new GuiTextField(3000, this.fontRendererObj, guiLeft+13, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8); this.fieldPullStart.setMaxStringLength(4); this.fieldPullStart.setEnableBackgroundDrawing(false); - this.fieldPullEnd = new GuiTextField(this.fontRendererObj, guiLeft+50, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8); + this.fieldPullEnd = new GuiTextField(3001, this.fontRendererObj, guiLeft+50, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8); this.fieldPullEnd.setMaxStringLength(4); this.fieldPullEnd.setEnableBackgroundDrawing(false); - this.fieldPutStart = new GuiTextField(this.fontRendererObj, guiLeft+98, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8); + this.fieldPutStart = new GuiTextField(3002, this.fontRendererObj, guiLeft+98, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8); this.fieldPutStart.setMaxStringLength(4); this.fieldPutStart.setEnableBackgroundDrawing(false); - this.fieldPutEnd = new GuiTextField(this.fontRendererObj, guiLeft+135, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8); + this.fieldPutEnd = new GuiTextField(3004, this.fontRendererObj, guiLeft+135, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8); this.fieldPutEnd.setMaxStringLength(4); this.fieldPutEnd.setEnableBackgroundDrawing(false); @@ -130,36 +131,36 @@ public class GuiInputter extends GuiContainer{ ArrayList list = new ArrayList(); list.add(EnumChatFormatting.BOLD+text1); list.addAll(infoList); - this.func_146283_a(list, x, y); + this.drawHoveringText(list, x, y); } String text2 = this.tileInputter.isPutWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.blacklist"); if(x >= guiLeft+157 && y >= guiTop+16 && x <= guiLeft+172 && y <= guiTop+31){ ArrayList list = new ArrayList(); list.add(EnumChatFormatting.BOLD+text2); list.addAll(infoList); - this.func_146283_a(list, x, y); + this.drawHoveringText(list, x, y); } } int newTopOffset = this.guiTop+(this.isAdvanced ? OFFSET_ADVANCED : 0); //Info Mode on! if(x >= guiLeft+11 && y >= newTopOffset+65 && x <= guiLeft+11+31 && y <= newTopOffset+65+12){ - this.func_146283_a(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.1").replace("

", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.pull")), 200), x, y); + this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.1").replace("

", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.pull")), 200), x, y); } if(x >= guiLeft+96 && y >= newTopOffset+65 && x <= guiLeft+96+31 && y <= newTopOffset+65+12){ - this.func_146283_a(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.1").replace("

", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.put")), 200), x, y); + this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.1").replace("

", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.put")), 200), x, y); } if(x >= guiLeft+48 && y >= newTopOffset+65 && x <= guiLeft+48+31 && y <= newTopOffset+65+12){ - this.func_146283_a(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.2").replace("

", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.pull")), 200), x, y); + this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.2").replace("

", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.pull")), 200), x, y); } if(x >= guiLeft+133 && y >= newTopOffset+65 && x <= guiLeft+133+31 && y <= newTopOffset+65+12){ - this.func_146283_a(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.2").replace("

", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.put")), 200), x, y); + this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".inputter.info.2").replace("

", StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.put")), 200), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileInputter.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileInputter.getName()); } @Override @@ -190,7 +191,7 @@ public class GuiInputter extends GuiContainer{ } @Override - protected void mouseClicked(int par1, int par2, int par3){ + protected void mouseClicked(int par1, int par2, int par3) throws IOException{ this.fieldPutStart.mouseClicked(par1, par2, par3); this.fieldPutEnd.mouseClicked(par1, par2, par3); this.fieldPullStart.mouseClicked(par1, par2, par3); @@ -200,7 +201,7 @@ public class GuiInputter extends GuiContainer{ } @Override - public void keyTyped(char theChar, int key){ + public void keyTyped(char theChar, int key) throws IOException{ if(key == Keyboard.KEY_RETURN || key == Keyboard.KEY_NUMPADENTER){ if(this.fieldPutStart.isFocused()){ this.setVariable(this.fieldPutStart, 0); @@ -282,8 +283,8 @@ public class GuiInputter extends GuiContainer{ if(this.visible){ mc.getTextureManager().bindTexture(resLoc); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.field_146123_n = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; - int k = this.getHoverState(this.field_146123_n); + this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; + int k = this.getHoverState(this.hovered); GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(770, 771, 1, 0); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); @@ -297,11 +298,11 @@ public class GuiInputter extends GuiContainer{ else if(!this.enabled){ color = 10526880; } - else if(this.field_146123_n){ + else if(this.hovered){ color = 16777120; } - this.drawCenteredString(mc.fontRenderer, this.displayString, this.xPosition+this.width/2, this.yPosition+(this.height-8)/2, color); + this.drawCenteredString(mc.fontRendererObj, this.displayString, this.xPosition+this.width/2, this.yPosition+(this.height-8)/2, color); } } } @@ -319,8 +320,8 @@ public class GuiInputter extends GuiContainer{ if(this.visible){ mc.getTextureManager().bindTexture(resLoc); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.field_146123_n = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; - int k = this.getHoverState(this.field_146123_n); + this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; + int k = this.getHoverState(this.hovered); GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(770, 771, 1, 0); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java index bb0bd73df..2e0b64395 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java @@ -41,7 +41,7 @@ public class GuiPhantomPlacer extends GuiContainer{ @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.placer.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.placer.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java index df0cf5715..c23db71ec 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java @@ -72,13 +72,13 @@ public class GuiRangedCollector extends GuiContainer{ String text1 = this.collector.isWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.blacklist"); if(x >= guiLeft+3 && y >= guiTop+16 && x <= guiLeft+18 && y <= guiTop+31){ - this.func_146283_a(Collections.singletonList(text1), x, y); + this.drawHoveringText(Collections.singletonList(text1), x, y); } } @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.collector.getInventoryName()); + AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.collector.getName()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java index c234dfffc..0bbb47a59 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java @@ -29,6 +29,8 @@ import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; +import java.io.IOException; + @SideOnly(Side.CLIENT) public class GuiSmileyCloud extends GuiContainer{ @@ -59,7 +61,7 @@ public class GuiSmileyCloud extends GuiContainer{ public void initGui(){ super.initGui(); - this.nameField = new GuiTextField(this.fontRendererObj, guiLeft+5, guiTop+6, 114, 8); + this.nameField = new GuiTextField(4000, this.fontRendererObj, guiLeft+5, guiTop+6, 114, 8); this.nameField.setMaxStringLength(20); this.nameField.setEnableBackgroundDrawing(false); this.nameField.setFocused(true); @@ -89,13 +91,13 @@ public class GuiSmileyCloud extends GuiContainer{ } @Override - protected void mouseClicked(int par1, int par2, int par3){ + protected void mouseClicked(int par1, int par2, int par3) throws IOException{ this.nameField.mouseClicked(par1, par2, par3); super.mouseClicked(par1, par2, par3); } @Override - public void keyTyped(char theChar, int key){ + public void keyTyped(char theChar, int key) throws IOException{ if(key != 1 && this.nameField.isFocused()){ if(key == Keyboard.KEY_RETURN || key == Keyboard.KEY_NUMPADENTER){ this.setVariable(this.nameField); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java index 5ac491d90..3cd12087b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java @@ -276,29 +276,29 @@ public class InitItems{ CompatUtil.registerMFRSeed(itemFlaxSeed); itemCoffeeSeed = new ItemSeed("itemCoffeeSeed", "seedCoffeeBeans", InitBlocks.blockCoffee, itemCoffeeBean, 0); CompatUtil.registerMFRSeed(itemCoffeeSeed); - itemPickaxeEmerald = new ItemPickaxeAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemPickaxeEmerald", EnumRarity.epic); - itemAxeEmerald = new ItemAxeAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemAxeEmerald", EnumRarity.epic); - itemShovelEmerald = new ItemShovelAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemShovelEmerald", EnumRarity.epic); - itemSwordEmerald = new ItemSwordAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemSwordEmerald", EnumRarity.epic); - itemHoeEmerald = new ItemHoeAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemHoeEmerald", EnumRarity.epic); - itemPickaxeObsidian = new ItemPickaxeAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemPickaxeObsidian", EnumRarity.uncommon); - itemAxeObsidian = new ItemAxeAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemAxeObsidian", EnumRarity.uncommon); - itemShovelObsidian = new ItemShovelAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemShovelObsidian", EnumRarity.uncommon); - itemSwordObsidian = new ItemSwordAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemSwordObsidian", EnumRarity.uncommon); - itemHoeObsidian = new ItemHoeAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemHoeObsidian", EnumRarity.uncommon); - itemPickaxeQuartz = new ItemPickaxeAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "itemPickaxeQuartz", EnumRarity.rare); - itemAxeQuartz = new ItemAxeAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "itemAxeQuartz", EnumRarity.rare); - itemShovelQuartz = new ItemShovelAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "itemShovelQuartz", EnumRarity.rare); - itemSwordQuartz = new ItemSwordAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "itemSwordQuartz", EnumRarity.rare); - itemHoeQuartz = new ItemHoeAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "itemHoeQuartz", EnumRarity.rare); - woodenPaxel = new ItemAllToolAA(Item.ToolMaterial.WOOD, "plankWood", "woodenPaxel", EnumRarity.uncommon, 5192733); - stonePaxel = new ItemAllToolAA(Item.ToolMaterial.STONE, new ItemStack(Blocks.cobblestone), "stonePaxel", EnumRarity.uncommon, 7040621); - ironPaxel = new ItemAllToolAA(Item.ToolMaterial.IRON, new ItemStack(Items.iron_ingot), "ironPaxel", EnumRarity.rare, 10920613); - goldPaxel = new ItemAllToolAA(Item.ToolMaterial.GOLD, new ItemStack(Items.gold_ingot), "goldPaxel", EnumRarity.rare, 16770048); - diamondPaxel = new ItemAllToolAA(Item.ToolMaterial.EMERALD, new ItemStack(Items.diamond), "diamondPaxel", EnumRarity.epic, 3250376); - emeraldPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "emeraldPaxel", EnumRarity.epic, 7723338); - obsidianPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "obsidianPaxel", EnumRarity.epic, 4166); - quartzPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "quartzPaxel", EnumRarity.rare, 1710103); + itemPickaxeEmerald = new ItemPickaxeAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemPickaxeEmerald", EnumRarity.EPIC); + itemAxeEmerald = new ItemAxeAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemAxeEmerald", EnumRarity.EPIC); + itemShovelEmerald = new ItemShovelAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemShovelEmerald", EnumRarity.EPIC); + itemSwordEmerald = new ItemSwordAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemSwordEmerald", EnumRarity.EPIC); + itemHoeEmerald = new ItemHoeAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemHoeEmerald", EnumRarity.EPIC); + itemPickaxeObsidian = new ItemPickaxeAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemPickaxeObsidian", EnumRarity.UNCOMMON); + itemAxeObsidian = new ItemAxeAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemAxeObsidian", EnumRarity.UNCOMMON); + itemShovelObsidian = new ItemShovelAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemShovelObsidian", EnumRarity.UNCOMMON); + itemSwordObsidian = new ItemSwordAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemSwordObsidian", EnumRarity.UNCOMMON); + itemHoeObsidian = new ItemHoeAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemHoeObsidian", EnumRarity.UNCOMMON); + itemPickaxeQuartz = new ItemPickaxeAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "itemPickaxeQuartz", EnumRarity.RARE); + itemAxeQuartz = new ItemAxeAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "itemAxeQuartz", EnumRarity.RARE); + itemShovelQuartz = new ItemShovelAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "itemShovelQuartz", EnumRarity.RARE); + itemSwordQuartz = new ItemSwordAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "itemSwordQuartz", EnumRarity.RARE); + itemHoeQuartz = new ItemHoeAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "itemHoeQuartz", EnumRarity.RARE); + woodenPaxel = new ItemAllToolAA(Item.ToolMaterial.WOOD, "plankWood", "woodenPaxel", EnumRarity.UNCOMMON, 5192733); + stonePaxel = new ItemAllToolAA(Item.ToolMaterial.STONE, new ItemStack(Blocks.cobblestone), "stonePaxel", EnumRarity.UNCOMMON, 7040621); + ironPaxel = new ItemAllToolAA(Item.ToolMaterial.IRON, new ItemStack(Items.iron_ingot), "ironPaxel", EnumRarity.RARE, 10920613); + goldPaxel = new ItemAllToolAA(Item.ToolMaterial.GOLD, new ItemStack(Items.gold_ingot), "goldPaxel", EnumRarity.RARE, 16770048); + diamondPaxel = new ItemAllToolAA(Item.ToolMaterial.EMERALD, new ItemStack(Items.diamond), "diamondPaxel", EnumRarity.EPIC, 3250376); + emeraldPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "emeraldPaxel", EnumRarity.EPIC, 7723338); + obsidianPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "obsidianPaxel", EnumRarity.EPIC, 4166); + quartzPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "quartzPaxel", EnumRarity.RARE, 1710103); itemPickaxeCrystalRed = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "itemPickaxeCrystalRed", Util.CRYSTAL_RED_RARITY); itemAxeCrystalRed = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "itemAxeCrystalRed", Util.CRYSTAL_RED_RARITY); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java index 377389b84..d7868c13b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import net.minecraft.entity.Entity; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; @@ -23,15 +22,12 @@ public class ItemArmorAA extends ItemArmor{ private ItemStack repairItem; private String name; - private String[] textures; private EnumRarity rarity; public ItemArmorAA(String name, ArmorMaterial material, int type, ItemStack repairItem, String textureBase, EnumRarity rarity){ super(material, 0, type); this.repairItem = repairItem; this.name = name; - String texture = ModUtil.MOD_ID_LOWER+":textures/armor/"+textureBase; - textures = new String[]{texture+"1.png", texture+"2.png"}; this.rarity = rarity; this.register(); @@ -65,11 +61,6 @@ public class ItemArmorAA extends ItemArmor{ return this.rarity; } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){ - return this.textures[slot == 2 ? 1 : 0]; - } - @Override public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ return ItemUtil.areItemsEqual(this.repairItem, stack, false); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java index 9350e2632..7b43b366e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java @@ -56,18 +56,18 @@ public class LensColor extends Lens{ @Override public boolean invoke(Position hitBlock, IAtomicReconstructor tile){ if(hitBlock != null){ - if(Util.arrayContains(CONVERTABLE_BLOCKS, hitBlock.getBlock(tile.getWorld())) >= 0 && tile.getEnergy() >= ENERGY_USE){ - int meta = hitBlock.getMetadata(tile.getWorld()); + if(Util.arrayContains(CONVERTABLE_BLOCKS, hitBlock.getBlock(tile.getWorldObject())) >= 0 && tile.getEnergy() >= ENERGY_USE){ + int meta = hitBlock.getMetadata(tile.getWorldObject()); if(meta >= 15){ - hitBlock.setMetadata(tile.getWorld(), 0, 2); + hitBlock.setMetadata(tile.getWorldObject(), 0, 2); } else{ - hitBlock.setMetadata(tile.getWorld(), meta+1, 2); + hitBlock.setMetadata(tile.getWorldObject(), meta+1, 2); } tile.extractEnergy(ENERGY_USE); } - ArrayList items = (ArrayList)tile.getWorld().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX()+1, hitBlock.getY()+1, hitBlock.getZ()+1)); + ArrayList items = (ArrayList)tile.getWorldObject().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.fromBounds(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX()+1, hitBlock.getY()+1, hitBlock.getZ()+1)); for(EntityItem item : items){ if(item.getEntityItem() != null && tile.getEnergy() >= ENERGY_USE){ if(Util.arrayContains(CONVERTABLE_BLOCKS, item.getEntityItem().getItem()) >= 0 || Util.arrayContains(CONVERTABLE_BLOCKS, Block.getBlockFromItem(item.getEntityItem().getItem())) >= 0){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java index 1f18c8525..1402a0414 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java @@ -28,7 +28,7 @@ public class LensNone extends Lens{ @SuppressWarnings("unchecked") @Override public boolean invoke(Position hitBlock, IAtomicReconstructor tile){ - if(hitBlock != null && !hitBlock.getBlock(tile.getWorld()).isAir(tile.getWorld(), hitBlock.getX(), hitBlock.getY(), hitBlock.getZ())){ + if(hitBlock != null && !hitBlock.getBlock(tile.getWorldObject()).isAir(tile.getWorldObject(), hitBlock)){ int range = 2; //Converting the Blocks @@ -36,19 +36,19 @@ public class LensNone extends Lens{ for(int reachZ = -range; reachZ < range+1; reachZ++){ for(int reachY = -range; reachY < range+1; reachY++){ Position pos = new Position(hitBlock.getX()+reachX, hitBlock.getY()+reachY, hitBlock.getZ()+reachZ); - List recipes = LensNoneRecipeHandler.getRecipesFor(new ItemStack(pos.getBlock(tile.getWorld()), 1, pos.getMetadata(tile.getWorld()))); + List recipes = LensNoneRecipeHandler.getRecipesFor(new ItemStack(pos.getBlock(tile.getWorldObject()), 1, pos.getMetadata(tile.getWorldObject()))); for(LensNoneRecipe recipe : recipes){ if(recipe != null && tile.getEnergy() >= recipe.energyUse){ List outputs = recipe.getOutputs(); if(outputs != null && !outputs.isEmpty()){ ItemStack output = outputs.get(0); if(output.getItem() instanceof ItemBlock){ - tile.getWorld().playAuxSFX(2001, pos.getX(), pos.getY(), pos.getZ(), Block.getIdFromBlock(pos.getBlock(tile.getWorld()))+(pos.getMetadata(tile.getWorld()) << 12)); - pos.setBlock(tile.getWorld(), Block.getBlockFromItem(output.getItem()), output.getItemDamage(), 2); + tile.getWorldObject().playAuxSFX(2001, pos, Block.getIdFromBlock(pos.getBlock(tile.getWorldObject()))+(pos.getMetadata(tile.getWorldObject()) << 12)); + pos.setBlock(tile.getWorldObject(), Block.getBlockFromItem(output.getItem()), output.getItemDamage(), 2); } else{ - EntityItem item = new EntityItem(tile.getWorld(), pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, output.copy()); - tile.getWorld().spawnEntityInWorld(item); + EntityItem item = new EntityItem(tile.getWorldObject(), pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, output.copy()); + tile.getWorldObject().spawnEntityInWorld(item); } tile.extractEnergy(recipe.energyUse); break; @@ -60,7 +60,7 @@ public class LensNone extends Lens{ } //Converting the Items - ArrayList items = (ArrayList)tile.getWorld().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(hitBlock.getX()-range, hitBlock.getY()-range, hitBlock.getZ()-range, hitBlock.getX()+range, hitBlock.getY()+range, hitBlock.getZ()+range)); + ArrayList items = (ArrayList)tile.getWorldObject().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.fromBounds(hitBlock.getX()-range, hitBlock.getY()-range, hitBlock.getZ()-range, hitBlock.getX()+range, hitBlock.getY()+range, hitBlock.getZ()+range)); for(EntityItem item : items){ ItemStack stack = item.getEntityItem(); if(stack != null){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/material/InitArmorMaterials.java b/src/main/java/de/ellpeck/actuallyadditions/mod/material/InitArmorMaterials.java index c55c6bccb..a44e8d511 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/material/InitArmorMaterials.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/material/InitArmorMaterials.java @@ -30,15 +30,16 @@ public class InitArmorMaterials{ public static void init(){ ModUtil.LOGGER.info("Initializing Armor Materials..."); - armorMaterialEmerald = EnumHelper.addArmorMaterial("armorMaterialEmerald", 50, new int[]{5, 9, 8, 5}, 15); - armorMaterialObsidian = EnumHelper.addArmorMaterial("armorMaterialObsidian", 120, new int[]{3, 4, 3, 1}, 10); - armorMaterialQuartz = EnumHelper.addArmorMaterial("armorMaterialQuartz", 20, new int[]{3, 6, 5, 3}, 8); + //TODO Fix armor textures + armorMaterialEmerald = EnumHelper.addArmorMaterial("armorMaterialEmerald", "TODO", 50, new int[]{5, 9, 8, 5}, 15); + armorMaterialObsidian = EnumHelper.addArmorMaterial("armorMaterialObsidian", "TODO", 120, new int[]{3, 4, 3, 1}, 10); + armorMaterialQuartz = EnumHelper.addArmorMaterial("armorMaterialQuartz", "TODO", 20, new int[]{3, 6, 5, 3}, 8); - armorMaterialCrystalRed = EnumHelper.addArmorMaterial("armorMaterialCrystalRed", 18, new int[]{3, 7, 6, 3}, 9); - armorMaterialCrystalBlue = EnumHelper.addArmorMaterial("armorMaterialCrystalBlue", 18, new int[]{3, 7, 6, 3}, 10); - armorMaterialCrystalLightBlue = EnumHelper.addArmorMaterial("armorMaterialCrystalLightBlue", 35, new int[]{7, 9, 7, 5}, 12); - armorMaterialCrystalBlack = EnumHelper.addArmorMaterial("armorMaterialCrystalBlack", 12, new int[]{1, 4, 3, 1}, 13); - armorMaterialCrystalGreen = EnumHelper.addArmorMaterial("armorMaterialCrystalGreen", 60, new int[]{7, 10, 9, 6}, 18); - armorMaterialCrystalWhite = EnumHelper.addArmorMaterial("armorMaterialCrystalWhite", 18, new int[]{4, 7, 6, 4}, 11); + armorMaterialCrystalRed = EnumHelper.addArmorMaterial("armorMaterialCrystalRed", "TODO", 18, new int[]{3, 7, 6, 3}, 9); + armorMaterialCrystalBlue = EnumHelper.addArmorMaterial("armorMaterialCrystalBlue", "TODO", 18, new int[]{3, 7, 6, 3}, 10); + armorMaterialCrystalLightBlue = EnumHelper.addArmorMaterial("armorMaterialCrystalLightBlue", "TODO", 35, new int[]{7, 9, 7, 5}, 12); + armorMaterialCrystalBlack = EnumHelper.addArmorMaterial("armorMaterialCrystalBlack", "TODO", 12, new int[]{1, 4, 3, 1}, 13); + armorMaterialCrystalGreen = EnumHelper.addArmorMaterial("armorMaterialCrystalGreen", "TODO", 60, new int[]{7, 10, 9, 6}, 18); + armorMaterialCrystalWhite = EnumHelper.addArmorMaterial("armorMaterialCrystalWhite", "TODO", 18, new int[]{4, 7, 6, 4}, 11); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java index df6e701d2..1b06219c2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java @@ -30,8 +30,8 @@ public class DamageSources extends DamageSource{ } @Override - public IChatComponent func_151519_b(EntityLivingBase entity){ + public IChatComponent getDeathMessage(EntityLivingBase entity){ String locTag = "death."+ModUtil.MOD_ID_LOWER+"."+this.damageType+"."+(Util.RANDOM.nextInt(this.messageCount)+1); - return new ChatComponentText(StringUtil.localizeFormatted(locTag, entity.getCommandSenderName())); + return new ChatComponentText(StringUtil.localizeFormatted(locTag, entity.getName())); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java index ea127b730..0581f5fd1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.misc; +import de.ellpeck.actuallyadditions.api.Position; import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.BehaviorDefaultDispenseItem; import net.minecraft.dispenser.IBlockSource; @@ -21,13 +22,14 @@ public class DispenserHandlerFertilize extends BehaviorDefaultDispenseItem{ @Override public ItemStack dispenseStack(IBlockSource source, ItemStack stack){ - EnumFacing facing = BlockDispenser.func_149937_b(source.getBlockMetadata()); - int x = source.getXInt()+facing.getFrontOffsetX(); - int y = source.getYInt()+facing.getFrontOffsetY(); - int z = source.getZInt()+facing.getFrontOffsetZ(); + EnumFacing facing = BlockDispenser.getFacing(source.getBlockMetadata()); + int x = source.getBlockTileEntity().getPos().getX()+facing.getFrontOffsetX(); + int y = source.getBlockTileEntity().getPos().getY()+facing.getFrontOffsetY(); + int z = source.getBlockTileEntity().getPos().getZ()+facing.getFrontOffsetZ(); + Position pos = new Position(x, y, z); - if(ItemDye.applyBonemeal(stack, source.getWorld(), x, y, z, null)){ - source.getWorld().playAuxSFX(2005, x, y, z, 0); + if(ItemDye.applyBonemeal(stack, source.getWorld(), pos, null)){ + source.getWorld().playAuxSFX(2005, pos, 0); } return stack; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index 7de40db46..6fac9afca 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -68,7 +68,7 @@ public class SpecialRenderInit{ } @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onPlayerRender(RenderPlayerEvent.Specials.Pre event){ + public void onPlayerRender(RenderPlayerEvent.Pre event){ if(!specialList.isEmpty()){ for(Map.Entry entry : specialList.entrySet()){ //Does the player have one of the names from the list? diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java index 696f94e63..e17ccb256 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java @@ -48,7 +48,7 @@ public class NEIBookletRecipe extends TemplateRecipeHandler implements INEIRecip @Override public void loadTransferRects(){ - transferRects.add(new RecipeTransferRect(new Rectangle(0, 18, 165, Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT), NAME)); + transferRects.add(new RecipeTransferRect(new Rectangle(0, 18, 165, Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT), NAME)); } @SuppressWarnings("unchecked") @@ -107,17 +107,17 @@ public class NEIBookletRecipe extends TemplateRecipeHandler implements INEIRecip public void drawExtras(int recipe){ CachedInfoStack stack = (CachedInfoStack)this.arecipes.get(recipe); if(stack.theStack != null){ - List header = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".booklet.header").replaceAll("", EnumChatFormatting.BLUE+"").replaceAll("", EnumChatFormatting.BLACK+""), 165); + List header = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".booklet.header").replaceAll("", EnumChatFormatting.BLUE+"").replaceAll("", EnumChatFormatting.BLACK+""), 165); for(int i = 0; i < header.size(); i++){ - GuiDraw.drawString((String)header.get(i), 0, 18+i*(Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT+1), 0, false); + GuiDraw.drawString((String)header.get(i), 0, 18+i*(Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT+1), 0, false); } int maxLines = 5; IBookletChapter chapter = stack.thePage.getChapter(); String aText = (chapter.getPages()[0] instanceof PagePicture && chapter.getPages().length > 1 ? chapter.getPages()[1] : chapter.getPages()[0]).getText(); - List text = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(aText != null ? aText : EnumChatFormatting.DARK_RED+StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".booklet.noText"), 165); + List text = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(aText != null ? aText : EnumChatFormatting.DARK_RED+StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".booklet.noText"), 165); for(int i = 0; i < Math.min(maxLines, text.size()); i++){ - GuiDraw.drawString(text.get(i)+(i == maxLines-1 && text.size() > maxLines ? EnumChatFormatting.RESET+""+EnumChatFormatting.BLACK+"..." : ""), 0, 18+25+i*(Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT+1), 0, false); + GuiDraw.drawString(text.get(i)+(i == maxLines-1 && text.size() > maxLines ? EnumChatFormatting.RESET+""+EnumChatFormatting.BLACK+"..." : ""), 0, 18+25+i*(Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT+1), 0, false); } GuiDraw.drawString(EnumChatFormatting.ITALIC+chapter.getLocalizedName(), 0, 97, 0, false); GuiDraw.drawString(EnumChatFormatting.ITALIC+"Page "+stack.thePage.getID(), 0, 107, 0, false); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java index 87d99ba8d..1335f96bd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java @@ -55,7 +55,7 @@ public class NEIFurnaceDoubleRecipe extends TemplateRecipeHandler implements INE @Override public void loadCraftingRecipes(String outputId, Object... results){ if(outputId.equals(NAME) && getClass() == NEIFurnaceDoubleRecipe.class){ - Map recipes = (Map)FurnaceRecipes.smelting().getSmeltingList(); + Map recipes = FurnaceRecipes.instance().getSmeltingList(); for(Map.Entry recipe : recipes.entrySet()){ arecipes.add(new CachedFurn(recipe.getKey(), recipe.getValue())); } @@ -68,7 +68,7 @@ public class NEIFurnaceDoubleRecipe extends TemplateRecipeHandler implements INE @SuppressWarnings("unchecked") @Override public void loadCraftingRecipes(ItemStack result){ - Map recipes = (Map)FurnaceRecipes.smelting().getSmeltingList(); + Map recipes = FurnaceRecipes.instance().getSmeltingList(); for(Map.Entry recipe : recipes.entrySet()){ if(NEIServerUtils.areStacksSameType(recipe.getValue(), result)){ arecipes.add(new CachedFurn(recipe.getKey(), recipe.getValue())); @@ -79,7 +79,7 @@ public class NEIFurnaceDoubleRecipe extends TemplateRecipeHandler implements INE @SuppressWarnings("unchecked") @Override public void loadUsageRecipes(ItemStack ingredient){ - Map recipes = (Map)FurnaceRecipes.smelting().getSmeltingList(); + Map recipes = FurnaceRecipes.instance().getSmeltingList(); for(Map.Entry recipe : recipes.entrySet()){ if(NEIServerUtils.areStacksSameTypeCrafting(recipe.getKey(), ingredient)){ CachedFurn theRecipe = new CachedFurn(recipe.getKey(), recipe.getValue()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java index b5ecf7382..4ed8915ba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java @@ -44,9 +44,9 @@ public class NEIScreenEvents{ @Override public void drawButton(Minecraft minecraft, int x, int y){ super.drawButton(minecraft, x, y); - if(this.visible && this.field_146123_n){ + if(this.visible && this.hovered){ String text = StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".clickToSeeRecipe"); - Minecraft.getMinecraft().fontRenderer.drawString(text, this.xPosition-Minecraft.getMinecraft().fontRenderer.getStringWidth(text)-1, this.yPosition+this.height/2-Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT/2, StringUtil.DECIMAL_COLOR_WHITE, true); + Minecraft.getMinecraft().fontRendererObj.drawString(text, this.xPosition-Minecraft.getMinecraft().fontRendererObj.getStringWidth(text)-1, this.yPosition+this.height/2-Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT/2, StringUtil.DECIMAL_COLOR_WHITE, true); } } }; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java index 3c057128e..6fe99fdce 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java @@ -11,6 +11,7 @@ package de.ellpeck.actuallyadditions.mod.network; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.internal.EntrySet; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBookletStand; import io.netty.buffer.ByteBuf; @@ -46,7 +47,7 @@ public class PacketBookletStandButton implements IMessage{ this.tileX = x; this.tileY = y; this.tileZ = z; - this.worldID = world.provider.dimensionId; + this.worldID = world.provider.getDimensionId(); this.playerID = player.getEntityId(); this.entryID = set.entry == null ? -1 : ActuallyAdditionsAPI.bookletEntries.indexOf(set.entry); @@ -88,11 +89,11 @@ public class PacketBookletStandButton implements IMessage{ @Override public IMessage onMessage(PacketBookletStandButton message, MessageContext ctx){ World world = DimensionManager.getWorld(message.worldID); - TileEntity tile = world.getTileEntity(message.tileX, message.tileY, message.tileZ); + TileEntity tile = world.getTileEntity(new Position(message.tileX, message.tileY, message.tileZ)); EntityPlayer player = (EntityPlayer)world.getEntityByID(message.playerID); if(tile instanceof TileEntityBookletStand){ - if(Objects.equals(player.getCommandSenderName(), ((TileEntityBookletStand)tile).assignedPlayer)){ + if(Objects.equals(player.getName(), ((TileEntityBookletStand)tile).assignedPlayer)){ EntrySet theSet = ((TileEntityBookletStand)tile).assignedEntry; theSet.entry = message.entryID == -1 ? null : ActuallyAdditionsAPI.bookletEntries.get(message.entryID); theSet.chapter = message.chapterID == -1 || message.entryID == -1 || theSet.entry.getChapters().size() <= message.chapterID ? null : theSet.entry.getChapters().get(message.chapterID); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/VanillaPacketSyncer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/VanillaPacketSyncer.java index 095032a93..07d531664 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/VanillaPacketSyncer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/VanillaPacketSyncer.java @@ -18,7 +18,7 @@ import java.util.List; public class VanillaPacketSyncer{ public static void sendTileToNearbyPlayers(TileEntity tile){ - List allPlayers = tile.getWorldObj().playerEntities; + List allPlayers = tile.getWorld().playerEntities; for(Object player : allPlayers){ if(player instanceof EntityPlayerMP){ sendTileToPlayer(tile, (EntityPlayerMP)player, 64); @@ -27,7 +27,7 @@ public class VanillaPacketSyncer{ } public static void sendTileToPlayer(TileEntity tile, EntityPlayerMP player, int maxDistance){ - if(player.getDistance(tile.xCoord, tile.yCoord, tile.zCoord) <= maxDistance){ + if(player.getDistance(tile.getPos().getX(), tile.getPos().getY(), tile.getPos().getZ()) <= maxDistance){ sendTileToPlayer(tile, player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java index 466af0851..aabdb2577 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.network.gui; +import de.ellpeck.actuallyadditions.api.Position; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; @@ -37,7 +38,7 @@ public class PacketGuiButton implements IMessage{ this.tileX = x; this.tileY = y; this.tileZ = z; - this.worldID = world.provider.dimensionId; + this.worldID = world.provider.getDimensionId(); this.buttonID = buttonID; this.playerID = player.getEntityId(); } @@ -67,7 +68,7 @@ public class PacketGuiButton implements IMessage{ @Override public IMessage onMessage(PacketGuiButton message, MessageContext ctx){ World world = DimensionManager.getWorld(message.worldID); - TileEntity tile = world.getTileEntity(message.tileX, message.tileY, message.tileZ); + TileEntity tile = world.getTileEntity(new Position(message.tileX, message.tileY, message.tileZ)); if(tile instanceof IButtonReactor){ IButtonReactor reactor = (IButtonReactor)tile; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index d77636e90..25df1657f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.blocks.render.RenderSmileyCloud; import de.ellpeck.actuallyadditions.mod.blocks.render.RenderTileEntity; import de.ellpeck.actuallyadditions.mod.blocks.render.model.*; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.event.InitEvents; import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit; import de.ellpeck.actuallyadditions.mod.tile.*; @@ -26,12 +25,10 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentClientData; import net.minecraft.client.Minecraft; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.registry.VillagerRegistry; import java.io.File; import java.util.Calendar; @@ -76,7 +73,8 @@ public class ClientProxy implements IProxy{ registerRenderer(TileEntityBookletStand.class, new RenderTileEntity(new ModelBookletStand()), AssetUtil.bookletStandRenderId); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAtomicReconstructor.class, new RenderReconstructorLens()); - VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png")); + //TODO Fix villager + //VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png")); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java index 0551560f6..65e51d184 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; +import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.network.gui.INumberReactor; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; @@ -19,6 +20,7 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; public class TileEntityInputter extends TileEntityInventoryBase implements IButtonReactor, INumberReactor{ @@ -121,7 +123,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt if(theSided != null){ //Check if Item can be inserted from any Side (Because Sidedness gets ignored!) for(int j = 0; j <= 5; j++){ - if(theSided.canExtractItem(i, tempStack, j)){ + if(theSided.canExtractItem(i, tempStack, EnumFacing.values()[j])){ theStack = tempStack; theSlotToPull = i; can = true; @@ -208,7 +210,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt if(theInventory.isItemValidForSlot(i, this.slots[0]) && (tempStack == null || (tempStack.isItemEqual(this.slots[0]) && tempStack.stackSize < maxSize)) && this.checkBothFilters(this.slots[0])){ if(theSided != null){ for(int j = 0; j <= 5; j++){ - if(theSided.canInsertItem(i, this.slots[0], j)){ + if(theSided.canInsertItem(i, this.slots[0], EnumFacing.values()[j])){ theStack = tempStack; theSlotToPut = i; can = true; @@ -301,8 +303,8 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt public void initVars(){ //Gets the Place to put and Pull - this.placeToPull = WorldUtil.getTileEntityFromSide(WorldUtil.getDirectionBySidesInOrder(this.sideToPull), this.worldObj, this.xCoord, this.yCoord, this.zCoord); - this.placeToPut = WorldUtil.getTileEntityFromSide(WorldUtil.getDirectionBySidesInOrder(this.sideToPut), this.worldObj, this.xCoord, this.yCoord, this.zCoord); + this.placeToPull = WorldUtil.getTileEntityFromSide(WorldUtil.getDirectionBySidesInOrder(this.sideToPull), this.worldObj, Position.fromTileEntity(this)); + this.placeToPut = WorldUtil.getTileEntityFromSide(WorldUtil.getDirectionBySidesInOrder(this.sideToPut), this.worldObj, Position.fromTileEntity(this)); //Resets the Variables if(this.placeToPull instanceof IInventory){ @@ -427,7 +429,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); } @@ -437,7 +439,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return slot == 0; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBooster.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBooster.java index d396a4a94..f6d4c700c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBooster.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBooster.java @@ -12,8 +12,4 @@ package de.ellpeck.actuallyadditions.mod.tile; public class TileEntityPhantomBooster extends TileEntityBase{ - @Override - public boolean canUpdate(){ - return false; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java index 4c3ab6849..fd8a5541f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java @@ -15,6 +15,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; public class TileEntityPhantomItemface extends TileEntityPhantomface{ @@ -24,10 +25,10 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface{ } @Override - public int[] getAccessibleSlotsFromSide(int side){ + public int[] getSlotsForFace(EnumFacing side){ if(this.isBoundThingInRange()){ if(this.getSided() != null){ - return this.getSided().getAccessibleSlotsFromSide(side); + return this.getSided().getSlotsForFace(side); } else{ int[] theInt = new int[this.getSizeInventory()]; @@ -45,11 +46,6 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface{ return this.isBoundThingInRange() ? this.getInventory().getInventoryStackLimit() : 0; } - @Override - public ItemStack getStackInSlotOnClosing(int i){ - return this.isBoundThingInRange() ? this.getInventory().getStackInSlotOnClosing(i) : null; - } - @Override public void setInventorySlotContents(int i, ItemStack stack){ if(this.isBoundThingInRange()){ @@ -74,13 +70,13 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface{ } @Override - public String getInventoryName(){ + public String getName(){ return this.name; } @Override public boolean isBoundThingInRange(){ - return super.isBoundThingInRange() && worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()) instanceof IInventory; + return super.isBoundThingInRange() && worldObj.getTileEntity(boundPosition) instanceof IInventory; } public ISidedInventory getSided(){ @@ -89,7 +85,7 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface{ public IInventory getInventory(){ if(this.boundPosition != null){ - TileEntity tile = worldObj.getTileEntity(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()); + TileEntity tile = worldObj.getTileEntity(boundPosition); if(tile instanceof IInventory){ return (IInventory)tile; } @@ -98,12 +94,12 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface{ } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isBoundThingInRange() && (this.getSided() == null || this.getSided().canInsertItem(slot, stack, side)); } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return this.isBoundThingInRange() && (this.getSided() == null || this.getSided().canExtractItem(slot, stack, side)); } @@ -112,4 +108,18 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface{ return this.isBoundThingInRange() && this.getInventory().isItemValidForSlot(i, stack); } + @Override + public ItemStack removeStackFromSlot(int index){ + if(this.isBoundThingInRange()){ + return this.getInventory().removeStackFromSlot(index); + } + return null; + } + + @Override + public void clear(){ + if(this.isBoundThingInRange()){ + this.getInventory().clear(); + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java index b15b83d4d..16d4cb058 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java @@ -23,14 +23,14 @@ public class CompatUtil{ FMLInterModComms.sendMessage("MineFactoryReloaded", "registerHarvestable_Crop", new ItemStack(block, 1, 7)); NBTTagCompound compound = new NBTTagCompound(); - compound.setString("plant", Block.blockRegistry.getNameForObject(block)); + compound.setString("plant", block.getRegistryName()); FMLInterModComms.sendMessage("MineFactoryReloaded", "registerFertilizable_Crop", compound); } public static void registerMFRSeed(Item item){ NBTTagCompound compound = new NBTTagCompound(); - compound.setString("seed", Item.itemRegistry.getNameForObject(item)); - compound.setString("crop", Block.blockRegistry.getNameForObject(((ItemSeed)item).plant)); + compound.setString("seed", item.getRegistryName()); + compound.setString("crop", ((ItemSeed)item).plant.getRegistryName()); FMLInterModComms.sendMessage("MineFactoryReloaded", "registerPlantable_Crop", compound); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java index c2fda193c..fff61d9e6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java @@ -22,7 +22,6 @@ import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.oredict.OreDictionary; import java.util.List; @@ -45,7 +44,6 @@ public class Util{ public static void registerEvent(Object o){ MinecraftForge.EVENT_BUS.register(o); - FMLCommonHandler.instance().bus().register(o); } public static boolean isDevVersion(){ From 5a1b6f9d78a1b78083c1ef2864be38217956fea0 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 08:13:42 +0100 Subject: [PATCH 07/58] Fixed a bug with the crafting page. //Like that would matter.. --- .../actuallyadditions/mod/booklet/page/PageCrafting.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java index f0a10765b..bc3b388db 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java @@ -30,6 +30,7 @@ import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; import java.util.ArrayList; +import java.util.List; public class PageCrafting extends BookletPageAA{ @@ -114,7 +115,7 @@ public class PageCrafting extends BookletPageAA{ else if(recipe instanceof ShapelessRecipes){ ShapelessRecipes shapeless = (ShapelessRecipes)recipe; for(int i = 0; i < shapeless.recipeItems.size(); i++){ - stacks[i] = (ItemStack)shapeless.recipeItems.get(i); + stacks[i] = shapeless.recipeItems.get(i); } } else if(recipe instanceof ShapedOreRecipe){ @@ -124,7 +125,7 @@ public class PageCrafting extends BookletPageAA{ for(int i = 0; i < shaped.getInput().length; i++){ Object input = shaped.getInput()[i]; if(input != null){ - stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((ArrayList)input).isEmpty() ? null : ((ArrayList)input).get(0)); + stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((List)input).isEmpty() ? null : ((List)input).get(0)); } } } @@ -132,7 +133,7 @@ public class PageCrafting extends BookletPageAA{ ShapelessOreRecipe shapeless = (ShapelessOreRecipe)recipe; for(int i = 0; i < shapeless.getInput().size(); i++){ Object input = shapeless.getInput().get(i); - stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((ArrayList)input).isEmpty() ? null : ((ArrayList)input).get(0)); + stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((List)input).isEmpty() ? null : ((List)input).get(0)); } } From 6ee039fcc261814d79bee91440c114dad4d69818 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 08:18:27 +0100 Subject: [PATCH 08/58] Fix some other minor bugs that I found quickly. I really need to start working on actually repairing the textures. --- .../mod/misc/special/SpecialRenderInit.java | 1 + .../de/ellpeck/actuallyadditions/mod/util/WorldUtil.java | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index 6fac9afca..e86f3323f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -68,6 +68,7 @@ public class SpecialRenderInit{ } @SubscribeEvent(priority = EventPriority.HIGHEST) + //TODO Fix floating item public void onPlayerRender(RenderPlayerEvent.Pre event){ if(!specialList.isEmpty()){ for(Map.Entry entry : specialList.entrySet()){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index 30f08039e..494b19b0c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -15,6 +15,7 @@ import cofh.api.energy.IEnergyReceiver; import de.ellpeck.actuallyadditions.api.Position; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.item.EntityItem; @@ -363,6 +364,7 @@ public class WorldUtil{ */ public static boolean playerHarvestBlock(World world, Position pos, EntityPlayer player){ Block block = pos.getBlock(world); + IBlockState state = pos.getBlockState(world); int meta = pos.getMetadata(world); //If the Block can be harvested or not boolean canHarvest = block.canHarvestBlock(world, pos, player); @@ -377,7 +379,7 @@ public class WorldUtil{ if(!world.isRemote){ //Server-Side only, special cases - block.onBlockHarvested(world, pos, pos.getBlockState(world), player); + block.onBlockHarvested(world, pos, state, player); } else{ //Shows the Harvest Particles and plays the Block's Sound @@ -389,12 +391,12 @@ public class WorldUtil{ //Actually removes the Block from the World if(removed){ //Before the Block is destroyed, special cases - block.onBlockDestroyedByPlayer(world, pos, pos.getBlockState(world)); + block.onBlockDestroyedByPlayer(world, pos, state); if(!world.isRemote && !player.capabilities.isCreativeMode){ //Actually drops the Block's Items etc. if(canHarvest){ - block.harvestBlock(world, player, pos, pos.getBlockState(world), pos.getTileEntity(world)); + block.harvestBlock(world, player, pos, state, pos.getTileEntity(world)); } //Only drop XP when no Silk Touch is applied if(!EnchantmentHelper.getSilkTouchModifier(player)){ From f602eccca0f6701490f72394a866266dbdc3f98a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 13:31:58 +0100 Subject: [PATCH 09/58] Remove Position. Don't need it. --- .../actuallyadditions/api/Position.java | 115 ------------------ .../actuallyadditions/api/lens/Lens.java | 4 +- .../api/tile/IPhantomTile.java | 6 +- .../mod/blocks/BlockAtomicReconstructor.java | 8 +- .../mod/blocks/BlockBookletStand.java | 11 +- .../mod/blocks/BlockBreaker.java | 9 +- .../mod/blocks/BlockCanolaPress.java | 3 +- .../mod/blocks/BlockCoalGenerator.java | 7 +- .../mod/blocks/BlockCoffeeMachine.java | 13 +- .../mod/blocks/BlockColoredLamp.java | 9 +- .../mod/blocks/BlockCompost.java | 3 +- .../mod/blocks/BlockDirectionalBreaker.java | 9 +- .../mod/blocks/BlockDropper.java | 8 +- .../mod/blocks/BlockEnergizer.java | 3 +- .../mod/blocks/BlockFeeder.java | 3 +- .../mod/blocks/BlockFermentingBarrel.java | 3 +- .../mod/blocks/BlockFireworkBox.java | 6 +- .../mod/blocks/BlockFluidCollector.java | 9 +- .../mod/blocks/BlockFurnaceDouble.java | 17 ++- .../mod/blocks/BlockGiantChest.java | 3 +- .../mod/blocks/BlockGrinder.java | 9 +- .../mod/blocks/BlockInputter.java | 4 +- .../mod/blocks/BlockItemRepairer.java | 7 +- .../mod/blocks/BlockLampPowerer.java | 23 ++-- .../mod/blocks/BlockLaserRelay.java | 4 +- .../mod/blocks/BlockLeafGenerator.java | 3 +- .../mod/blocks/BlockMiner.java | 4 +- .../mod/blocks/BlockOilGenerator.java | 7 +- .../mod/blocks/BlockPhantom.java | 10 +- .../mod/blocks/BlockRangedCollector.java | 3 +- .../mod/blocks/BlockSlabs.java | 11 +- .../mod/blocks/BlockSmileyCloud.java | 16 +-- .../mod/blocks/BlockTreasureChest.java | 15 ++- .../mod/blocks/BlockWildPlant.java | 14 +-- .../mod/blocks/BlockXPSolidifier.java | 14 +-- .../mod/blocks/base/BlockBase.java | 10 +- .../mod/blocks/base/BlockBushBase.java | 10 +- .../mod/blocks/base/BlockContainerBase.java | 27 ++-- .../mod/blocks/base/BlockFluidFlowing.java | 7 +- .../mod/blocks/base/BlockWallAA.java | 4 +- .../mod/blocks/render/RenderLaserRelay.java | 4 +- .../render/RenderReconstructorLens.java | 5 +- .../mod/blocks/render/RenderSmileyCloud.java | 4 +- .../mod/blocks/render/RenderTileEntity.java | 4 +- .../mod/event/BucketFillEvent.java | 5 +- .../actuallyadditions/mod/event/HudEvent.java | 4 +- .../mod/event/WorldDecorationEvent.java | 38 +++--- .../actuallyadditions/mod/gen/OreGen.java | 4 +- .../mod/inventory/GuiHandler.java | 6 +- .../mod/items/ItemBooklet.java | 10 +- .../mod/items/ItemChestToCrateUpgrade.java | 8 +- .../mod/items/ItemDrill.java | 19 ++- .../mod/items/ItemGrowthRing.java | 18 +-- .../mod/items/ItemLaserWrench.java | 12 +- .../mod/items/ItemLeafBlower.java | 17 +-- .../mod/items/ItemPhantomConnector.java | 7 +- .../mod/items/ItemWaterRemovalRing.java | 8 +- .../mod/items/lens/LensColor.java | 14 ++- .../mod/items/lens/LensDeath.java | 7 +- .../mod/items/lens/LensDetonation.java | 7 +- .../mod/items/lens/LensNone.java | 16 +-- .../mod/misc/DispenserHandlerEmptyBucket.java | 8 +- .../mod/misc/DispenserHandlerFertilize.java | 5 +- .../mod/misc/DispenserHandlerFillBucket.java | 12 +- .../mod/misc/LaserRelayConnectionHandler.java | 43 +++---- .../mod/network/PacketBookletStandButton.java | 4 +- .../mod/network/gui/PacketGuiButton.java | 5 +- .../mod/network/gui/PacketGuiNumber.java | 5 +- .../mod/network/gui/PacketGuiString.java | 5 +- .../tile/TileEntityAtomicReconstructor.java | 8 +- .../mod/tile/TileEntityBreaker.java | 20 +-- .../mod/tile/TileEntityCanolaPress.java | 11 +- .../mod/tile/TileEntityCoalGenerator.java | 11 +- .../tile/TileEntityDirectionalBreaker.java | 16 +-- .../mod/tile/TileEntityDropper.java | 4 +- .../mod/tile/TileEntityEnervator.java | 3 +- .../mod/tile/TileEntityFermentingBarrel.java | 11 +- .../mod/tile/TileEntityFishingNet.java | 8 +- .../mod/tile/TileEntityFluidCollector.java | 36 +++--- .../mod/tile/TileEntityFurnaceDouble.java | 9 +- .../mod/tile/TileEntityFurnaceSolar.java | 10 +- .../mod/tile/TileEntityGreenhouseGlass.java | 18 +-- .../mod/tile/TileEntityGrinder.java | 9 +- .../mod/tile/TileEntityHeatCollector.java | 13 +- .../mod/tile/TileEntityInputter.java | 6 +- .../mod/tile/TileEntityLaserRelay.java | 19 +-- .../tile/TileEntityLavaFactoryController.java | 23 ++-- .../mod/tile/TileEntityLeafGenerator.java | 17 +-- .../mod/tile/TileEntityMiner.java | 15 +-- .../mod/tile/TileEntityOilGenerator.java | 11 +- .../mod/tile/TileEntityPhantomEnergyface.java | 3 +- .../mod/tile/TileEntityPhantomLiquiface.java | 7 +- .../mod/tile/TileEntityPhantomPlacer.java | 25 ++-- .../mod/tile/TileEntityPhantomface.java | 40 +++--- .../actuallyadditions/mod/util/PosUtil.java | 70 +++++++++++ .../actuallyadditions/mod/util/WorldUtil.java | 84 ++++++------- 96 files changed, 604 insertions(+), 658 deletions(-) delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/api/Position.java create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/Position.java b/src/main/java/de/ellpeck/actuallyadditions/api/Position.java deleted file mode 100644 index 2bab2c467..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/api/Position.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * This file ("Position.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.api; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.Item; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.Vec3; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -/** - * This utility class describes a position in the world - */ -public class Position extends BlockPos{ - - public Position(int x, int y, int z){ - super(x, y, z); - } - - public TileEntity getTileEntity(IBlockAccess world){ - return world != null ? world.getTileEntity(this) : null; - } - - public Material getMaterial(IBlockAccess world){ - if(world != null){ - Block block = this.getBlock(world); - if(block != null){ - return block.getMaterial(); - } - } - return null; - } - - public Item getItemBlock(IBlockAccess world){ - return world != null ? Item.getItemFromBlock(this.getBlock(world)) : null; - } - - public Block getBlock(IBlockAccess world){ - if(world != null){ - IBlockState state = this.getBlockState(world); - if(state != null){ - return state.getBlock(); - } - } - return null; - } - - public int getMetadata(IBlockAccess world){ - return this.getBlock(world).getMetaFromState(this.getBlockState(world)); - } - - public void setMetadata(World world, int meta, int flag){ - if(world != null){ - world.setBlockState(this, this.getBlock(world).getStateFromMeta(meta), flag); - } - } - - public boolean setBlock(World world, Block block, int meta, int flag){ - return world.setBlockState(this, block.getStateFromMeta(meta), flag); - } - - public boolean isEqual(Position pos){ - return pos != null && this.getX() == pos.getX() && this.getY() == pos.getY() && this.getZ() == pos.getZ(); - } - - public Position copy(){ - return new Position(this.getX(), this.getY(), this.getZ()); - } - - public String toString(){ - return "["+this.getX()+", "+this.getY()+", "+this.getZ()+"]"; - } - - public Vec3 toVec(){ - return new Vec3(this.getX(), this.getY(), this.getZ()); - } - - public IBlockState getBlockState(IBlockAccess world){ - return world != null ? world.getBlockState(this) : null; - } - - public Position getOffsetPosition(EnumFacing side){ - return new Position(this.getX()+side.getFrontOffsetX(), this.getY()+side.getFrontOffsetY(), this.getZ()+side.getFrontOffsetZ()); - } - - public Position getOffsetPosition(int x, int y, int z){ - return new Position(this.getX()+x, this.getY()+y, this.getZ()+z); - } - - public static Position fromTileEntity(TileEntity tile){ - return fromBlockPos(tile.getPos()); - } - - public static Position fromBlockPos(BlockPos pos){ - //TODO Make this less object creaty (Typecasting doesn't work?) - return new Position(pos.getX(), pos.getY(), pos.getZ()); - } - - public boolean setBlockState(World world, IBlockState state, int flag){ - return world.setBlockState(this, state, flag); - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/lens/Lens.java b/src/main/java/de/ellpeck/actuallyadditions/api/lens/Lens.java index bf106d804..8c0bb48be 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/lens/Lens.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/lens/Lens.java @@ -11,9 +11,9 @@ package de.ellpeck.actuallyadditions.api.lens; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import net.minecraft.item.Item; +import net.minecraft.util.BlockPos; /** * This is the base class for a Reconstructor Lens Type (NOT THE ITEM!) @@ -32,7 +32,7 @@ public abstract class Lens{ * @param tile The tile the lens was invoked from * @return If the Reconstructor should stop continuing (return false if you want it to go through blocks) */ - public abstract boolean invoke(Position hitBlock, IAtomicReconstructor tile); + public abstract boolean invoke(BlockPos hitBlock, IAtomicReconstructor tile); /** * Returns the color in an array of 3 float values that are r, g, b diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/tile/IPhantomTile.java b/src/main/java/de/ellpeck/actuallyadditions/api/tile/IPhantomTile.java index 725738c5e..e034a2228 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/tile/IPhantomTile.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/tile/IPhantomTile.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.api.tile; -import de.ellpeck.actuallyadditions.api.Position; +import net.minecraft.util.BlockPos; /** * Extending this will cause a TileEntity to be able to be connected via a Phantom Connector @@ -30,12 +30,12 @@ public interface IPhantomTile{ /** * @return The position this tile is bound to */ - Position getBoundPosition(); + BlockPos getBoundPosition(); /** * Sets the bound position */ - void setBoundPosition(Position pos); + void setBoundPosition(BlockPos pos); /** * @return The ID of the GUI it opens, -1 if none diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index c6db78090..4de761aea 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; @@ -55,7 +55,7 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); - Position.fromBlockPos(pos).setMetadata(world, rotation, 2); + PosUtil.setMetadata(pos, world, rotation, 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @@ -67,7 +67,7 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ - if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ + if(this.tryToggleRedstone(world, pos, player)){ return true; } if(!world.isRemote){ @@ -100,7 +100,7 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java index 79d8c2a44..13c8abfc8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.internal.EntrySet; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; @@ -19,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBookletStand; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -72,19 +72,18 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - thePos.setMetadata(world, 2, 2); + PosUtil.setMetadata(pos, world, 2, 2); } if(rotation == 1){ - thePos.setMetadata(world, 1, 2); + PosUtil.setMetadata(pos, world, 1, 2); } if(rotation == 2){ - thePos.setMetadata(world, 0, 2); + PosUtil.setMetadata(pos, world, 0, 2); } if(rotation == 3){ - thePos.setMetadata(world, 3, 2); + PosUtil.setMetadata(pos, world, 3, 2); } TileEntityBookletStand tile = (TileEntityBookletStand)world.getTileEntity(pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java index a59e4a5d4..3668e1229 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java @@ -10,11 +10,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -47,7 +48,7 @@ public class BlockBreaker extends BlockContainerBase{ @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ - if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ + if(this.tryToggleRedstone(world, pos, player)){ return true; } if(!world.isRemote){ @@ -68,14 +69,14 @@ public class BlockBreaker extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); - Position.fromBlockPos(pos).setMetadata(world, rotation, 2); + PosUtil.setMetadata(pos, world, rotation, 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java index cbc5be3d7..1487ff364 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; @@ -59,7 +58,7 @@ public class BlockCanolaPress extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java index 34e6f9ec0..7a0e7fdb1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java @@ -10,12 +10,13 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -50,7 +51,7 @@ public class BlockCoalGenerator extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ - int meta = Position.fromBlockPos(pos).getMetadata(world); + int meta = PosUtil.getMetadata(pos, world); if(meta == 1){ for(int i = 0; i < 5; i++){ @@ -78,7 +79,7 @@ public class BlockCoalGenerator extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java index ca6d1da3a..d4afda732 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java @@ -10,12 +10,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; @@ -70,7 +70,7 @@ public class BlockCoffeeMachine extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } @@ -82,19 +82,18 @@ public class BlockCoffeeMachine extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - thePos.setMetadata(world, 0, 2); + PosUtil.setMetadata(pos, world, 0, 2); } if(rotation == 1){ - thePos.setMetadata(world, 3, 2); + PosUtil.setMetadata(pos, world, 3, 2); } if(rotation == 2){ - thePos.setMetadata(world, 1, 2); + PosUtil.setMetadata(pos, world, 1, 2); } if(rotation == 3){ - thePos.setMetadata(world, 2, 2); + PosUtil.setMetadata(pos, world, 2, 2); } super.onBlockPlacedBy(world, pos, state, player, stack); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java index d5756a3f9..fb709f589 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java @@ -10,11 +10,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -63,7 +64,7 @@ public class BlockColoredLamp extends BlockBase{ //Turning On if(player.isSneaking()){ if(!world.isRemote){ - Position.fromBlockPos(pos).setBlock(world, this.isOn ? InitBlocks.blockColoredLamp : InitBlocks.blockColoredLampOn, Position.fromBlockPos(pos).getMetadata(world), 2); + PosUtil.setBlock(pos, world, this.isOn ? InitBlocks.blockColoredLamp : InitBlocks.blockColoredLampOn, PosUtil.getMetadata(pos, world), 2); } return true; } @@ -75,9 +76,9 @@ public class BlockColoredLamp extends BlockBase{ String name = OreDictionary.getOreName(oreID); TheColoredLampColors color = TheColoredLampColors.getColorFromDyeName(name); if(color != null){ - if(Position.fromBlockPos(pos).getMetadata(world) != color.ordinal()){ + if(PosUtil.getMetadata(pos, world) != color.ordinal()){ if(!world.isRemote){ - Position.fromBlockPos(pos).setMetadata(world, color.ordinal(), 2); + PosUtil.setMetadata(pos, world, color.ordinal(), 2); if(!player.capabilities.isCreativeMode){ player.inventory.decrStackSize(player.inventory.currentItem, 1); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java index 10e2a0fd0..b6bd79a05 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.items.ItemFertilizer; @@ -121,7 +120,7 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java index 89c55dba0..0dc6cfc1b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java @@ -10,11 +10,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -44,7 +45,7 @@ public class BlockDirectionalBreaker extends BlockContainerBase{ @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ - if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ + if(this.tryToggleRedstone(world, pos, player)){ return true; } if(!world.isRemote){ @@ -65,14 +66,14 @@ public class BlockDirectionalBreaker extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); - Position.fromBlockPos(pos).setMetadata(world, rotation, 2); + PosUtil.setMetadata(pos, world, rotation, 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java index 1254215ca..686d4fbf5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java @@ -10,11 +10,11 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -44,7 +44,7 @@ public class BlockDropper extends BlockContainerBase{ @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ - if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ + if(this.tryToggleRedstone(world, pos, player)){ return true; } if(!world.isRemote){ @@ -65,14 +65,14 @@ public class BlockDropper extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); - Position.fromBlockPos(pos).setMetadata(world, rotation, 2); + PosUtil.setMetadata(pos, world, rotation, 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java index f444f05f5..f778ebd5a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; @@ -71,7 +70,7 @@ public class BlockEnergizer extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java index 3873905f2..a65c7b701 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; @@ -59,7 +58,7 @@ public class BlockFeeder extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java index a2534f4ad..b7c5922e1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; @@ -42,7 +41,7 @@ public class BlockFermentingBarrel extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java index d7bdb72c3..0b53d74b7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFireworkBox; import net.minecraft.block.material.Material; @@ -40,7 +40,7 @@ public class BlockFireworkBox extends BlockContainerBase{ @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ - return this.tryToggleRedstone(world, Position.fromBlockPos(pos), player); + return this.tryToggleRedstone(world, pos, player); } @Override @@ -50,7 +50,7 @@ public class BlockFireworkBox extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java index 4f6f97527..b72624706 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java @@ -10,11 +10,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -47,7 +48,7 @@ public class BlockFluidCollector extends BlockContainerBase{ @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ - if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ + if(this.tryToggleRedstone(world, pos, player)){ return true; } if(!world.isRemote){ @@ -68,14 +69,14 @@ public class BlockFluidCollector extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); - Position.fromBlockPos(pos).setMetadata(world, rotation, 2); + PosUtil.setMetadata(pos, world, rotation, 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java index f424810b8..fcb732c2c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java @@ -10,12 +10,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; @@ -53,7 +53,7 @@ public class BlockFurnaceDouble extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ - int meta = Position.fromBlockPos(pos).getMetadata(world); + int meta = PosUtil.getMetadata(pos, world); if(meta > 3){ float f = (float)pos.getX()+0.5F; @@ -99,7 +99,7 @@ public class BlockFurnaceDouble extends BlockContainerBase{ @Override public int getLightValue(IBlockAccess world, BlockPos pos){ - return Position.fromBlockPos(pos).getMetadata(world) > 3 ? 12 : 0; + return PosUtil.getMetadata(pos, world) > 3 ? 12 : 0; } @Override @@ -110,19 +110,18 @@ public class BlockFurnaceDouble extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - thePos.setMetadata(world, 0, 2); + PosUtil.setMetadata(pos, world, 0, 2); } if(rotation == 1){ - thePos.setMetadata(world, 3, 2); + PosUtil.setMetadata(pos, world, 3, 2); } if(rotation == 2){ - thePos.setMetadata(world, 1, 2); + PosUtil.setMetadata(pos, world, 1, 2); } if(rotation == 3){ - thePos.setMetadata(world, 2, 2); + PosUtil.setMetadata(pos, world, 2, 2); } super.onBlockPlacedBy(world, pos, state, player, stack); @@ -130,7 +129,7 @@ public class BlockFurnaceDouble extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java index 52a1c9950..0794f9d29 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; @@ -121,7 +120,7 @@ public class BlockGiantChest extends BlockContainerBase{ TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityGiantChest){ if(!ItemUtil.contains(((TileEntityGiantChest)tile).slots, new ItemStack(InitItems.itemCrateKeeper), false)){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java index a41a09f55..1f20a8862 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java @@ -10,12 +10,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -54,8 +54,7 @@ public class BlockGrinder extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ - Position thePos = Position.fromBlockPos(pos); - int meta = thePos.getMetadata(world); + int meta = PosUtil.getMetadata(pos, world); if(meta == 1){ for(int i = 0; i < 5; i++){ @@ -81,7 +80,7 @@ public class BlockGrinder extends BlockContainerBase{ @Override public int getLightValue(IBlockAccess world, BlockPos pos){ - return Position.fromBlockPos(pos).getMetadata(world) == 1 ? 12 : 0; + return PosUtil.getMetadata(pos, world) == 1 ? 12 : 0; } @Override @@ -91,7 +90,7 @@ public class BlockGrinder extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java index 3b37177b0..e33c2a118 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockInputter.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; @@ -70,7 +70,7 @@ public class BlockInputter extends BlockContainerBase{ TileEntity aTile = world.getTileEntity(pos); if(aTile instanceof TileEntityInventoryBase){ TileEntityInventoryBase tile = (TileEntityInventoryBase)aTile; - this.dropSlotFromInventory(0, tile, world, Position.fromBlockPos(pos)); + this.dropSlotFromInventory(0, tile, world, pos); } } super.breakBlock(world, pos, state); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java index 5a9ab75c0..18f1baee6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemRepairer.java @@ -10,11 +10,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -56,7 +57,7 @@ public class BlockItemRepairer extends BlockContainerBase{ @Override public int getLightValue(IBlockAccess world, BlockPos pos){ - return Position.fromBlockPos(pos).getMetadata(world) == 1 ? 12 : 0; + return PosUtil.getMetadata(pos, world) == 1 ? 12 : 0; } @Override @@ -66,7 +67,7 @@ public class BlockItemRepairer extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java index 81750b054..2fb4d56d3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java @@ -10,8 +10,9 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; @@ -35,34 +36,34 @@ public class BlockLampPowerer extends BlockBase{ @Override public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock){ - this.updateLamp(world, Position.fromBlockPos(pos)); + this.updateLamp(world, pos); } @Override public void onBlockAdded(World world, BlockPos pos, IBlockState state){ - this.updateLamp(world, Position.fromBlockPos(pos)); + this.updateLamp(world, pos); } @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = BlockPistonBase.getFacingFromEntity(world, pos, player).ordinal(); - Position.fromBlockPos(pos).setMetadata(world, rotation, 2); + PosUtil.setMetadata(pos, world, rotation, 2); super.onBlockPlacedBy(world, pos, state, player, stack); } - private void updateLamp(World world, Position pos){ + private void updateLamp(World world, BlockPos pos){ if(!world.isRemote){ - Position coords = WorldUtil.getCoordsFromSide(WorldUtil.getDirectionByPistonRotation(pos.getMetadata(world)), pos, 0); - if(coords != null && coords.getBlock(world) instanceof BlockColoredLamp){ + BlockPos coords = WorldUtil.getCoordsFromSide(WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(pos, world)), pos, 0); + if(coords != null && PosUtil.getBlock(coords, world) instanceof BlockColoredLamp){ if(world.isBlockIndirectlyGettingPowered(pos) > 0){ - if(!((BlockColoredLamp)coords.getBlock(world)).isOn){ - pos.setBlock(world, InitBlocks.blockColoredLampOn, coords.getMetadata(world), 2); + if(!((BlockColoredLamp)PosUtil.getBlock(coords, world)).isOn){ + PosUtil.setBlock(coords, world, InitBlocks.blockColoredLampOn, PosUtil.getMetadata(coords, world), 2); } } else{ - if(((BlockColoredLamp)coords.getBlock(world)).isOn){ - pos.setBlock(world, InitBlocks.blockColoredLamp, coords.getMetadata(world), 2); + if(((BlockColoredLamp)PosUtil.getBlock(coords, world)).isOn){ + PosUtil.setBlock(coords, world, InitBlocks.blockColoredLamp, PosUtil.getMetadata(coords, world), 2); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index a583e605b..9849619e0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -10,10 +10,10 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; @@ -62,7 +62,7 @@ public class BlockLaserRelay extends BlockContainerBase{ @Override public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos){ - int meta = Position.fromBlockPos(pos).getMetadata(world); + int meta = PosUtil.getMetadata(pos, world); float pixel = 1F/16F; if(meta == 0){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java index 0ccf8fea9..66214b816 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLeafGenerator; import net.minecraft.block.material.Material; @@ -43,7 +42,7 @@ public class BlockLeafGenerator extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java index ebbdcfda9..fa39e5b0f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; @@ -71,7 +71,7 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java index 8b036ac43..4b4c0e2c8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java @@ -10,12 +10,13 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -50,7 +51,7 @@ public class BlockOilGenerator extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ - if(Position.fromBlockPos(pos).getMetadata(world) == 1){ + if(PosUtil.getMetadata(pos, world) == 1){ for(int i = 0; i < 5; i++){ world.spawnParticle(ClientProxy.bulletForMyValentine ? EnumParticleTypes.HEART : EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX()+0.5F, (double)pos.getY()+1.0F, (double)pos.getZ()+0.5F, 0.0D, 0.0D, 0.0D); } @@ -76,7 +77,7 @@ public class BlockOilGenerator extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java index 210f5fe16..97ec0e515 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -57,7 +57,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ if(this.type == Type.PLACER || this.type == Type.BREAKER){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); } super.breakBlock(world, pos, state); } @@ -80,7 +80,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{ @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ){ - if(this.tryToggleRedstone(world, Position.fromBlockPos(pos), player)){ + if(this.tryToggleRedstone(world, pos, player)){ return true; } if(!world.isRemote){ @@ -107,8 +107,8 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{ minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.GOLD+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc")+": "+phantom.getRange(), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-40, StringUtil.DECIMAL_COLOR_WHITE); if(phantom.hasBoundPosition()){ int distance = (int)new Vec3(posHit.getBlockPos()).distanceTo(new Vec3(phantom.getBoundPosition())); - Item item = phantom.getBoundPosition().getItemBlock(minecraft.theWorld); - String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(phantom.getBoundPosition().getBlock(minecraft.theWorld), 1, phantom.getBoundPosition().getMetadata(minecraft.theWorld))); + Item item = PosUtil.getItemBlock(phantom.getBoundPosition(), minecraft.theWorld); + String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(PosUtil.getBlock(phantom.getBoundPosition(), minecraft.theWorld), 1, PosUtil.getMetadata(phantom.getBoundPosition(), minecraft.theWorld))); StringUtil.drawSplitString(minecraft.fontRendererObj, StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-30, 200, StringUtil.DECIMAL_COLOR_WHITE, true); if(phantom.isBoundThingInRange()){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java index 13d782493..6d608829a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; @@ -64,7 +63,7 @@ public class BlockRangedCollector extends BlockContainerBase{ if(aTile instanceof TileEntityRangedCollector){ TileEntityRangedCollector tile = (TileEntityRangedCollector)aTile; for(int i = 0; i < TileEntityRangedCollector.WHITELIST_START; i++){ - this.dropSlotFromInventory(i, tile, world, Position.fromBlockPos(pos)); + this.dropSlotFromInventory(i, tile, world, pos); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java index eda653e73..d81f82da5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; @@ -69,7 +69,7 @@ public class BlockSlabs extends BlockBase{ @Override public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos){ - int meta = Position.fromBlockPos(pos).getMetadata(world); + int meta = PosUtil.getMetadata(pos, world); float minY = meta == 1 ? 0.5F : 0.0F; float maxY = meta == 1 ? 1.0F : 0.5F; this.setBlockBounds(0.0F, minY, 0F, 1.0F, maxY, 1.0F); @@ -100,10 +100,9 @@ public class BlockSlabs extends BlockBase{ @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ){ - Position thePos = Position.fromBlockPos(pos); - if(thePos.getBlock(world) == this.block && ((side.ordinal() == 1 && thePos.getMetadata(world) == 0) || (side.ordinal() == 0 && thePos.getMetadata(world) == 1))){ - if(thePos.setBlock(world, ((BlockSlabs)this.block).fullBlock, ((BlockSlabs)this.block).meta, 3)){ - world.playSoundEffect(thePos.getX()+0.5F, thePos.getY()+0.5F, thePos.getZ()+0.5F, this.block.stepSound.getBreakSound(), (this.block.stepSound.getVolume()+1.0F)/2.0F, this.block.stepSound.frequency*0.8F); + if(PosUtil.getBlock(pos, world) == this.block && ((side.ordinal() == 1 && PosUtil.getMetadata(pos, world) == 0) || (side.ordinal() == 0 && PosUtil.getMetadata(pos, world) == 1))){ + if(PosUtil.setBlock(pos, world, ((BlockSlabs)this.block).fullBlock, ((BlockSlabs)this.block).meta, 3)){ + world.playSoundEffect(pos.getX()+0.5F, pos.getY()+0.5F, pos.getZ()+0.5F, this.block.stepSound.getBreakSound(), (this.block.stepSound.getVolume()+1.0F)/2.0F, this.block.stepSound.frequency*0.8F); stack.stackSize--; return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java index 78e8389be..1c1687ed6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java @@ -10,13 +10,14 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -89,7 +90,7 @@ public class BlockSmileyCloud extends BlockContainerBase{ @Override public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos){ - int meta = Position.fromBlockPos(pos).getMetadata(world); + int meta = PosUtil.getMetadata(pos, world); float f = 0.0625F; if(meta == 0){ @@ -113,7 +114,7 @@ public class BlockSmileyCloud extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); super.breakBlock(world, pos, state); } @@ -125,19 +126,18 @@ public class BlockSmileyCloud extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - thePos.setMetadata(world, 0, 2); + PosUtil.setMetadata(pos, world, 0, 2); } if(rotation == 1){ - thePos.setMetadata(world, 3, 2); + PosUtil.setMetadata(pos, world, 3, 2); } if(rotation == 2){ - thePos.setMetadata(world, 1, 2); + PosUtil.setMetadata(pos, world, 1, 2); } if(rotation == 3){ - thePos.setMetadata(world, 2, 2); + PosUtil.setMetadata(pos, world, 2, 2); } super.onBlockPlacedBy(world, pos, state, player, stack); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java index 3778976ce..ec3bfed7a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot; import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -64,7 +64,7 @@ public class BlockTreasureChest extends BlockBase{ public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ world.playSoundAtEntity(player, "random.chestopen", 0.2F, Util.RANDOM.nextFloat()*0.1F+0.9F); - this.dropItems(world, Position.fromBlockPos(pos)); + this.dropItems(world, pos); world.setBlockToAir(pos); player.triggerAchievement(TheAchievements.OPEN_TREASURE_CHEST.ach); @@ -80,23 +80,22 @@ public class BlockTreasureChest extends BlockBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - thePos.setMetadata(world, 0, 2); + PosUtil.setMetadata(pos, world, 0, 2); } if(rotation == 1){ - thePos.setMetadata(world, 3, 2); + PosUtil.setMetadata(pos, world, 3, 2); } if(rotation == 2){ - thePos.setMetadata(world, 1, 2); + PosUtil.setMetadata(pos, world, 1, 2); } if(rotation == 3){ - thePos.setMetadata(world, 2, 2); + PosUtil.setMetadata(pos, world, 2, 2); } } - private void dropItems(World world, Position pos){ + private void dropItems(World world, BlockPos pos){ for(int i = 0; i < MathHelper.getRandomIntegerInRange(Util.RANDOM, 3, 6); i++){ TreasureChestLoot theReturn = WeightedRandom.getRandomItem(Util.RANDOM, ActuallyAdditionsAPI.treasureChestLoot); ItemStack itemStack = theReturn.returnItem.copy(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index 6dd9567ef..30a94f885 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -10,11 +10,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheWildPlants; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -44,9 +45,8 @@ public class BlockWildPlant extends BlockBushBase{ @Override public boolean canBlockStay(World world, BlockPos pos, IBlockState state){ - Position thePos = Position.fromBlockPos(pos); - Position offset = thePos.getOffsetPosition(0, -1, 0); - return thePos.getMetadata(world) == TheWildPlants.RICE.ordinal() ? offset.getMaterial(world) == Material.water : offset.getBlock(world).canSustainPlant(world, offset, EnumFacing.UP, this); + BlockPos offset = PosUtil.offset(pos, 0, -1, 0); + return PosUtil.getMetadata(pos, world) == TheWildPlants.RICE.ordinal() ? PosUtil.getMaterial(offset, world) == Material.water : PosUtil.getBlock(offset, world).canSustainPlant(world, offset, EnumFacing.UP, this); } @Override @@ -72,8 +72,8 @@ public class BlockWildPlant extends BlockBushBase{ @Override @SideOnly(Side.CLIENT) public Item getItem(World world, BlockPos pos){ - int meta = Position.fromBlockPos(pos).getMetadata(world); - return meta >= allWildPlants.length ? null : ((BlockPlant)allWildPlants[meta].wildVersionOf).seedItem; + int metadata = PosUtil.getMetadata(pos, world); + return metadata >= allWildPlants.length ? null : ((BlockPlant)allWildPlants[metadata].wildVersionOf).seedItem; } @SuppressWarnings("all") @@ -86,7 +86,7 @@ public class BlockWildPlant extends BlockBushBase{ @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ - int metadata = Position.fromBlockPos(pos).getMetadata(world); + int metadata = PosUtil.getMetadata(pos, world); return metadata >= allWildPlants.length ? null : allWildPlants[metadata].wildVersionOf.getDrops(world, pos, allWildPlants[metadata].wildVersionOf.getStateFromMeta(7), fortune); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java index 2ac3a7517..56618d060 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java @@ -10,12 +10,13 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -65,19 +66,18 @@ public class BlockXPSolidifier extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - Position thePos = Position.fromBlockPos(pos); if(rotation == 0){ - thePos.setMetadata(world, 0, 2); + PosUtil.setMetadata(pos, world, 0, 2); } if(rotation == 1){ - thePos.setMetadata(world, 3, 2); + PosUtil.setMetadata(pos, world, 3, 2); } if(rotation == 2){ - thePos.setMetadata(world, 1, 2); + PosUtil.setMetadata(pos, world, 1, 2); } if(rotation == 3){ - thePos.setMetadata(world, 2, 2); + PosUtil.setMetadata(pos, world, 2, 2); } super.onBlockPlacedBy(world, pos, state, player, stack); @@ -85,7 +85,7 @@ public class BlockXPSolidifier extends BlockContainerBase{ @Override public void breakBlock(World world, BlockPos pos, IBlockState state){ - this.dropInventory(world, Position.fromBlockPos(pos)); + this.dropInventory(world, pos); TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityXPSolidifier){ TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier)tile; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java index 50124b36c..25cc4c1c0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java @@ -12,9 +12,9 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; @@ -59,20 +59,18 @@ public class BlockBase extends Block{ return EnumRarity.COMMON; } - public static final PropertyInteger META = PropertyInteger.create("metadata", 0, 15); - @Override protected BlockState createBlockState(){ - return new BlockState(this, META); + return new BlockState(this, PosUtil.META); } @Override public IBlockState getStateFromMeta(int meta){ - return getDefaultState().withProperty(META, meta); + return getDefaultState().withProperty(PosUtil.META, meta); } @Override public int getMetaFromState(IBlockState state){ - return state.getValue(META); + return state.getValue(PosUtil.META); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java index 28362a05d..1f459215c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java @@ -12,8 +12,8 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockBush; -import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; @@ -58,20 +58,18 @@ public class BlockBushBase extends BlockBush{ return EnumRarity.COMMON; } - public static final PropertyInteger META = PropertyInteger.create("metadata", 0, 15); - @Override protected BlockState createBlockState(){ - return new BlockState(this, META); + return new BlockState(this, PosUtil.META); } @Override public IBlockState getStateFromMeta(int meta){ - return getDefaultState().withProperty(META, meta); + return getDefaultState().withProperty(PosUtil.META, meta); } @Override public int getMetaFromState(IBlockState state){ - return state.getValue(META); + return state.getValue(PosUtil.META); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index f33f3bb45..91288deb7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -10,16 +10,15 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockRedstoneTorch; import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; @@ -78,9 +77,9 @@ public abstract class BlockContainerBase extends BlockContainer{ return EnumRarity.COMMON; } - public void dropInventory(World world, Position position){ + public void dropInventory(World world, BlockPos position){ if(!world.isRemote){ - TileEntity aTile = position.getTileEntity(world); + TileEntity aTile = world.getTileEntity(position); if(aTile instanceof TileEntityInventoryBase){ TileEntityInventoryBase tile = (TileEntityInventoryBase)aTile; if(tile.getSizeInventory() > 0){ @@ -92,7 +91,7 @@ public abstract class BlockContainerBase extends BlockContainer{ } } - public void dropSlotFromInventory(int i, TileEntityInventoryBase tile, World world, Position pos){ + public void dropSlotFromInventory(int i, TileEntityInventoryBase tile, World world, BlockPos pos){ ItemStack stack = tile.getStackInSlot(i); if(stack != null && stack.stackSize > 0){ float dX = Util.RANDOM.nextFloat()*0.8F+0.1F; @@ -113,10 +112,10 @@ public abstract class BlockContainerBase extends BlockContainer{ @Override public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock){ - this.updateRedstoneState(world, Position.fromBlockPos(pos)); + this.updateRedstoneState(world, pos); } - public void updateRedstoneState(World world, Position pos){ + public void updateRedstoneState(World world, BlockPos pos){ if(!world.isRemote){ TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityBase){ @@ -239,13 +238,13 @@ public abstract class BlockContainerBase extends BlockContainer{ @Override public void onBlockAdded(World world, BlockPos pos, IBlockState state){ - this.updateRedstoneState(world, Position.fromBlockPos(pos)); + this.updateRedstoneState(world, pos); } - public boolean tryToggleRedstone(World world, Position pos, EntityPlayer player){ + public boolean tryToggleRedstone(World world, BlockPos pos, EntityPlayer player){ ItemStack stack = player.getCurrentEquippedItem(); if(stack != null && Block.getBlockFromItem(stack.getItem()) instanceof BlockRedstoneTorch){ - TileEntity tile = pos.getTileEntity(world); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof IRedstoneToggle){ if(!world.isRemote){ ((IRedstoneToggle)tile).toggle(!((IRedstoneToggle)tile).isPulseMode()); @@ -261,20 +260,18 @@ public abstract class BlockContainerBase extends BlockContainer{ return false; } - public static final PropertyInteger META = PropertyInteger.create("metadata", 0, 15); - @Override protected BlockState createBlockState(){ - return new BlockState(this, META); + return new BlockState(this, PosUtil.META); } @Override public IBlockState getStateFromMeta(int meta){ - return getDefaultState().withProperty(META, meta); + return getDefaultState().withProperty(PosUtil.META, meta); } @Override public int getMetaFromState(IBlockState state){ - return state.getValue(META); + return state.getValue(PosUtil.META); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java index fa8173121..e35c10b0b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java @@ -10,9 +10,10 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; @@ -60,12 +61,12 @@ public class BlockFluidFlowing extends BlockFluidClassic{ @Override public boolean canDisplace(IBlockAccess world, BlockPos pos){ - return !Position.fromBlockPos(pos).getMaterial(world).isLiquid() && super.canDisplace(world, pos); + return !PosUtil.getMaterial(pos, world).isLiquid() && super.canDisplace(world, pos); } @Override public boolean displaceIfPossible(World world, BlockPos pos){ - return !Position.fromBlockPos(pos).getMaterial(world).isLiquid() && super.displaceIfPossible(world, pos); + return !PosUtil.getMaterial(pos, world).isLiquid() && super.displaceIfPossible(world, pos); } public EnumRarity getRarity(ItemStack stack){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java index ecab947e4..c052be249 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java @@ -28,7 +28,6 @@ import java.util.List; public class BlockWallAA extends BlockWall{ private String name; - private Block baseBlock; private int meta; public BlockWallAA(String name, Block base){ @@ -37,7 +36,6 @@ public class BlockWallAA extends BlockWall{ public BlockWallAA(String name, Block base, int meta){ super(base); - this.baseBlock = base; this.name = name; this.meta = meta; @@ -80,6 +78,6 @@ public class BlockWallAA extends BlockWall{ @Override public int damageDropped(IBlockState state){ - return this.getMetaFromState(state); + return meta; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java index 58847b5fc..7772c5bbd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java @@ -10,8 +10,8 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.tileentity.TileEntity; import org.lwjgl.opengl.GL11; @@ -30,7 +30,7 @@ public class RenderLaserRelay extends RenderTileEntity{ GL11.glTranslatef(0.0F, -2.0F, 0.0F); this.bindTexture(resLoc); - int meta = Position.fromTileEntity(tile).getMetadata(tile.getWorld()); + int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); if(meta == 0){ GL11.glRotatef(180F, 1F, 0F, 0F); GL11.glTranslatef(0F, -2F, 0F); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java index 4a14f1af7..bc22f0397 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java @@ -10,10 +10,11 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -33,7 +34,7 @@ public class RenderReconstructorLens extends TileEntitySpecialRenderer{ GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - int meta = Position.fromTileEntity(tile).getMetadata(getWorld()); + int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); if(meta == 0){ GL11.glTranslatef(0F, -0.5F, 0F); GL11.glTranslatef(-0.25F, 0F, -0.25F); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java index 1ef11319d..7181ce7a5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; import de.ellpeck.actuallyadditions.mod.misc.cloud.ISmileyCloudEasterEgg; import de.ellpeck.actuallyadditions.mod.misc.cloud.SmileyCloudEasterEggs; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; @@ -66,7 +66,7 @@ public class RenderSmileyCloud extends RenderTileEntity{ GL11.glPushMatrix(); { if(theModel.doesRotate()){ - int meta = Position.fromTileEntity(tile).getMetadata(tile.getWorld()); + int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); if(meta == 0){ GL11.glRotatef(180F, 0F, 1F, 0F); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java index e445aeed7..1d4212aa9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; @@ -37,7 +37,7 @@ public class RenderTileEntity extends TileEntitySpecialRenderer{ this.bindTexture(resLoc); if(theModel.doesRotate()){ - int meta = Position.fromTileEntity(tile).getMetadata(tile.getWorld()); + int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); if(meta == 0){ GL11.glRotatef(180F, 0F, 1F, 0F); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java index a9d9934e6..5d6bb78ae 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/BucketFillEvent.java @@ -10,9 +10,10 @@ package de.ellpeck.actuallyadditions.mod.event; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.items.InitItems; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -29,7 +30,7 @@ public class BucketFillEvent{ } private void fillBucket(FillBucketEvent event, Item item, Block fluid){ - Block block = Position.fromBlockPos(event.target.getBlockPos()).getBlock(event.world); + Block block = PosUtil.getBlock(event.target.getBlockPos(), event.world); if(block == fluid){ event.world.setBlockToAir(event.target.getBlockPos()); event.result = new ItemStack(item); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java index 372a75d8c..a55d44217 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java @@ -10,11 +10,11 @@ package de.ellpeck.actuallyadditions.mod.event; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.tile.IRedstoneToggle; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockRedstoneTorch; @@ -52,7 +52,7 @@ public class HudEvent{ } if(posHit != null){ - Block blockHit = Position.fromBlockPos(posHit.getBlockPos()).getBlock(minecraft.theWorld); + Block blockHit = PosUtil.getBlock(posHit.getBlockPos(), minecraft.theWorld); TileEntity tileHit = minecraft.theWorld.getTileEntity(posHit.getBlockPos()); if(blockHit instanceof IHudDisplay){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java index 6caefa3ae..0f83e2734 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java @@ -10,17 +10,19 @@ package de.ellpeck.actuallyadditions.mod.event; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheWildPlants; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.block.material.Material; +import net.minecraft.util.BlockPos; import net.minecraft.world.biome.BiomeGenOcean; import net.minecraftforge.event.terraingen.DecorateBiomeEvent; import net.minecraftforge.fml.common.eventhandler.Event; @@ -44,14 +46,14 @@ public class WorldDecorationEvent{ //Generate Treasure Chests if(ConfigBoolValues.DO_TREASURE_CHEST_GEN.isEnabled()){ if(event.rand.nextInt(300) == 0){ - Position randomPos = new Position(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); - randomPos = Position.fromBlockPos(event.world.getTopSolidOrLiquidBlock(randomPos)); + BlockPos randomPos = new BlockPos(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); + randomPos = event.world.getTopSolidOrLiquidBlock(randomPos); if(event.world.getBiomeGenForCoords(randomPos) instanceof BiomeGenOcean){ if(randomPos.getY() >= 25 && randomPos.getY() <= 45){ - if(randomPos.getBlock(event.world).getMaterial() == Material.water){ - if(randomPos.getOffsetPosition(0, -1, 0).getMaterial(event.world).isSolid()){ - randomPos.setBlock(event.world, InitBlocks.blockTreasureChest, event.rand.nextInt(4), 2); + if(PosUtil.getBlock(randomPos, event.world).getMaterial() == Material.water){ + if(PosUtil.getMaterial(PosUtil.offset(randomPos, 0, -1, 0), event.world).isSolid()){ + PosUtil.setBlock(randomPos, event.world, InitBlocks.blockTreasureChest, event.rand.nextInt(4), 2); } } } @@ -65,15 +67,15 @@ public class WorldDecorationEvent{ if(ConfigBoolValues.DO_RICE_GEN.isEnabled()){ for(int i = 0; i < ConfigIntValues.RICE_AMOUNT.getValue(); i++){ if(event.rand.nextInt(50) == 0){ - Position randomPos = new Position(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); - randomPos = Position.fromBlockPos(event.world.getTopSolidOrLiquidBlock(randomPos)); + BlockPos randomPos = new BlockPos(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); + randomPos = event.world.getTopSolidOrLiquidBlock(randomPos); - if(randomPos.getMaterial(event.world) == Material.water){ + if(PosUtil.getMaterial(randomPos, event.world) == Material.water){ ArrayList blocksAroundBottom = WorldUtil.getMaterialsAround(event.world, randomPos); - ArrayList blocksAroundTop = WorldUtil.getMaterialsAround(event.world, randomPos.getOffsetPosition(0, 1, 0)); + ArrayList blocksAroundTop = WorldUtil.getMaterialsAround(event.world, PosUtil.offset(randomPos, 0, 1, 0)); if(blocksAroundBottom.contains(Material.grass) || blocksAroundBottom.contains(Material.ground) || blocksAroundBottom.contains(Material.rock) || blocksAroundBottom.contains(Material.sand)){ - if(!blocksAroundTop.contains(Material.water) && randomPos.getMaterial(event.world) == Material.air){ - randomPos.getOffsetPosition(0, 1, 0).setBlock(event.world, InitBlocks.blockWildPlant, TheWildPlants.RICE.ordinal(), 2); + if(!blocksAroundTop.contains(Material.water) && PosUtil.getMaterial(randomPos, event.world) == Material.air){ + PosUtil.setBlock(PosUtil.offset(randomPos, 0, 1, 0), event.world, InitBlocks.blockWildPlant, TheWildPlants.RICE.ordinal(), 2); } } } @@ -86,13 +88,13 @@ public class WorldDecorationEvent{ if(doIt){ for(int i = 0; i < amount; i++){ if(event.rand.nextInt(400) == 0){ - Position randomPos = new Position(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); - randomPos = Position.fromBlockPos(event.world.getTopSolidOrLiquidBlock(randomPos)); + BlockPos randomPos = new BlockPos(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); + randomPos = event.world.getTopSolidOrLiquidBlock(randomPos); - if(randomPos.getMaterial(event.world) == blockBelow){ - Position top = randomPos.getOffsetPosition(0, 1, 0); - top.setBlock(event.world, plant, meta, 2); - if(plant instanceof BlockBush && !((BlockBush)plant).canBlockStay(event.world, top, top.getBlockState(event.world))){ + if(PosUtil.getMaterial(randomPos, event.world) == blockBelow){ + BlockPos top = PosUtil.offset(randomPos, 0, 1, 0); + PosUtil.setBlock(top, event.world, plant, meta, 2); + if(plant instanceof BlockBush && !((BlockBush)plant).canBlockStay(event.world, top, event.world.getBlockState(top))){ event.world.setBlockToAir(top); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java index 3e6be8436..46a556502 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/OreGen.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.gen; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; @@ -20,6 +19,7 @@ import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.state.pattern.BlockHelper; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraft.world.WorldType; @@ -79,7 +79,7 @@ public class OreGen implements IWorldGenerator{ int posX = blockXPos+random.nextInt(16); int posY = minY+random.nextInt(yDiff); int posZ = blockZPos+random.nextInt(16); - new WorldGenMinable(block.getStateFromMeta(meta), maxVeinSize, BlockHelper.forBlock(blockIn)).generate(world, random, new Position(posX, posY, posZ)); + new WorldGenMinable(block.getStateFromMeta(meta), maxVeinSize, BlockHelper.forBlock(blockIn)).generate(world, random, new BlockPos(posX, posY, posZ)); } } else{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java index 2cc63478a..6f5180775 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.inventory; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.booklet.GuiBookletStand; @@ -18,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.inventory.gui.*; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.common.network.IGuiHandler; import net.minecraftforge.fml.common.network.NetworkRegistry; @@ -33,7 +33,7 @@ public class GuiHandler implements IGuiHandler{ public Object getServerGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){ TileEntityBase tile = null; if(GuiTypes.values()[id].checkTileEntity){ - tile = (TileEntityBase)world.getTileEntity(new Position(x, y, z)); + tile = (TileEntityBase)world.getTileEntity(new BlockPos(x, y, z)); } switch(GuiTypes.values()[id]){ case FEEDER: @@ -97,7 +97,7 @@ public class GuiHandler implements IGuiHandler{ public Object getClientGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){ TileEntityBase tile = null; if(GuiTypes.values()[id].checkTileEntity){ - tile = (TileEntityBase)world.getTileEntity(new Position(x, y, z)); + tile = (TileEntityBase)world.getTileEntity(new BlockPos(x, y, z)); } switch(GuiTypes.values()[id]){ case FEEDER: diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java index 64f96090b..d5b3ab558 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.internal.EntrySet; @@ -23,6 +22,7 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -65,8 +65,8 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{ @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing face, float hitX, float hitY, float hitZ){ if(player.isSneaking()){ - Block block = Position.fromBlockPos(pos).getBlock(world); - ItemStack blockStack = new ItemStack(block, 1, Position.fromBlockPos(pos).getMetadata(world)); + Block block = PosUtil.getBlock(pos, world); + ItemStack blockStack = new ItemStack(block, 1, PosUtil.getMetadata(pos, world)); if(blockStack != null){ BookletPage page = BookletUtils.getFirstPageForStack(blockStack); if(page != null){ @@ -95,9 +95,9 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{ @Override public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, MovingObjectPosition posHit, Profiler profiler, ScaledResolution resolution){ if(posHit != null){ - Block block = Position.fromBlockPos(posHit.getBlockPos()).getBlock(minecraft.theWorld); + Block block = PosUtil.getBlock(posHit.getBlockPos(), minecraft.theWorld); if(block != null && !block.isAir(minecraft.theWorld, posHit.getBlockPos())){ - ItemStack blockStack = new ItemStack(block, 1, Position.fromBlockPos(posHit.getBlockPos()).getMetadata(minecraft.theWorld)); + ItemStack blockStack = new ItemStack(block, 1, PosUtil.getMetadata(posHit.getBlockPos(), minecraft.theWorld)); if(blockStack != null){ int height = resolution.getScaledHeight()/5*3; if(player.isSneaking()){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java index e1e274493..98e6e598f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java @@ -10,10 +10,10 @@ package de.ellpeck.actuallyadditions.mod.items; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockChest; import net.minecraft.entity.player.EntityPlayer; @@ -35,7 +35,7 @@ public class ItemChestToCrateUpgrade extends ItemBase{ public boolean onItemUse(ItemStack heldStack, EntityPlayer player, World world, BlockPos pos, EnumFacing facing, float par8, float par9, float par10){ if(player.isSneaking()){ TileEntity tileHit = world.getTileEntity(pos); - Block block = Position.fromBlockPos(pos).getBlock(world); + Block block = PosUtil.getBlock(pos, world); if(block instanceof BlockChest && tileHit instanceof TileEntityChest){ if(!world.isRemote){ TileEntityChest chest = (TileEntityChest)tileHit; @@ -51,8 +51,8 @@ public class ItemChestToCrateUpgrade extends ItemBase{ } //Set New Block - world.playAuxSFX(2001, pos, Block.getIdFromBlock(block)+(Position.fromBlockPos(pos).getMetadata(world) << 12)); - Position.fromBlockPos(pos).setBlock(world, InitBlocks.blockGiantChest, 0, 2); + world.playAuxSFX(2001, pos, Block.getIdFromBlock(block)+(PosUtil.getMetadata(pos, world) << 12)); + PosUtil.setBlock(pos, world, InitBlocks.blockGiantChest, 0, 2); //Copy Items into new Chest TileEntity newTileHit = world.getTileEntity(pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java index 37021dbf2..bc072ef5f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java @@ -12,13 +12,13 @@ package de.ellpeck.actuallyadditions.mod.items; import cofh.api.energy.IEnergyContainerItem; import com.google.common.collect.Multimap; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -436,12 +436,12 @@ public class ItemDrill extends ItemEnergy{ } //Not defined later because main Block is getting broken below - float mainHardness = Position.fromBlockPos(aPos).getBlock(world).getBlockHardness(world, aPos); + float mainHardness = PosUtil.getBlock(aPos, world).getBlockHardness(world, aPos); //Break Middle Block first int use = this.getEnergyUsePerBlock(stack); if(this.getEnergyStored(stack) >= use){ - if(!this.tryHarvestBlock(world, Position.fromBlockPos(aPos), false, stack, player, use)){ + if(!this.tryHarvestBlock(world, aPos, false, stack, player, use)){ return false; } } @@ -457,8 +457,8 @@ public class ItemDrill extends ItemEnergy{ if(!(aPos.getX() == xPos && aPos.getY() == yPos && aPos.getZ() == zPos)){ if(this.getEnergyStored(stack) >= use){ //Only break Blocks around that are (about) as hard or softer - Position thePos = new Position(xPos, yPos, zPos); - if(thePos.getBlock(world).getBlockHardness(world, thePos) <= mainHardness+5.0F){ + BlockPos thePos = new BlockPos(xPos, yPos, zPos); + if(PosUtil.getBlock(thePos, world).getBlockHardness(world, thePos) <= mainHardness+5.0F){ this.tryHarvestBlock(world, thePos, true, stack, player, use); } } @@ -484,12 +484,11 @@ public class ItemDrill extends ItemEnergy{ * @param player The Player breaking the Blocks * @param use The Energy that should be extracted per Block */ - private boolean tryHarvestBlock(World world, Position pos, boolean isExtra, ItemStack stack, EntityPlayer player, int use){ - Block block = pos.getBlock(world); + private boolean tryHarvestBlock(World world, BlockPos pos, boolean isExtra, ItemStack stack, EntityPlayer player, int use){ + Block block = PosUtil.getBlock(pos, world); float hardness = block.getBlockHardness(world, pos); - int meta = pos.getMetadata(world); - boolean canHarvest = (ForgeHooks.canHarvestBlock(block, player, world, pos) || this.canHarvestBlock(block, stack)) && (!isExtra || this.getDigSpeed(stack, pos.getBlockState(world)) > 1.0F); - if(hardness >= 0.0F && (!isExtra || (canHarvest && !block.hasTileEntity(pos.getBlockState(world))))){ + boolean canHarvest = (ForgeHooks.canHarvestBlock(block, player, world, pos) || this.canHarvestBlock(block, stack)) && (!isExtra || this.getDigSpeed(stack, world.getBlockState(pos)) > 1.0F); + if(hardness >= 0.0F && (!isExtra || (canHarvest && !block.hasTileEntity(world.getBlockState(pos))))){ this.extractEnergy(stack, use, false); //Break the Block return WorldUtil.playerHarvestBlock(world, pos, player); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java index 6a6882ffe..f4b1922a1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java @@ -10,8 +10,8 @@ package de.ellpeck.actuallyadditions.mod.items; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockGrass; @@ -21,6 +21,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; @@ -44,7 +45,7 @@ public class ItemGrowthRing extends ItemEnergy{ int energyUse = 300; if(equipped != null && equipped == stack && this.getEnergyStored(stack) >= energyUse){ - ArrayList blocks = new ArrayList(); + ArrayList blocks = new ArrayList(); if(stack.getTagCompound() == null){ stack.setTagCompound(new NBTTagCompound()); @@ -60,9 +61,10 @@ public class ItemGrowthRing extends ItemEnergy{ int theX = MathHelper.floor_double(player.posX+x); int theY = MathHelper.floor_double(player.posY+y); int theZ = MathHelper.floor_double(player.posZ+z); - Block theBlock = new Position(theX, theY, theZ).getBlock(world); + BlockPos posInQuestion = new BlockPos(theX, theY, theZ); + Block theBlock = PosUtil.getBlock(posInQuestion, world); if((theBlock instanceof IGrowable || theBlock instanceof IPlantable) && !(theBlock instanceof BlockGrass)){ - blocks.add(new Position(theX, theY, theZ)); + blocks.add(posInQuestion); } } } @@ -72,13 +74,13 @@ public class ItemGrowthRing extends ItemEnergy{ if(!blocks.isEmpty()){ for(int i = 0; i < 45; i++){ if(this.getEnergyStored(stack) >= energyUse){ - Position pos = blocks.get(Util.RANDOM.nextInt(blocks.size())); + BlockPos pos = blocks.get(Util.RANDOM.nextInt(blocks.size())); - int metaBefore = pos.getMetadata(world); - pos.getBlock(world).updateTick(world, pos, pos.getBlockState(world), Util.RANDOM); + int metaBefore = PosUtil.getMetadata(pos, world); + PosUtil.getBlock(pos, world).updateTick(world, pos, world.getBlockState(pos), Util.RANDOM); //Show Particles if Metadata changed - if(pos.getMetadata(world) != metaBefore){ + if(PosUtil.getMetadata(pos, world) != metaBefore){ world.playAuxSFX(2005, pos, 0); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java index 5449e61c2..18f914a88 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.misc.LaserRelayConnectionHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; @@ -48,13 +47,12 @@ public class ItemLaserWrench extends ItemBase{ player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".laser.stored.desc"))); } else{ - Position savedPos = ItemPhantomConnector.getStoredPosition(stack); - Position otherPos = Position.fromBlockPos(pos); - if(ItemPhantomConnector.getStoredWorld(stack) == world && savedPos.getTileEntity(world) instanceof TileEntityLaserRelay && LaserRelayConnectionHandler.getInstance().addConnection(savedPos, otherPos)){ + BlockPos savedPos = ItemPhantomConnector.getStoredPosition(stack); + if(ItemPhantomConnector.getStoredWorld(stack) == world && world.getTileEntity(savedPos) instanceof TileEntityLaserRelay && LaserRelayConnectionHandler.getInstance().addConnection(savedPos, pos)){ ItemPhantomConnector.clearStorage(stack); - ((TileEntityLaserRelay)savedPos.getTileEntity(world)).sendUpdate(); - ((TileEntityLaserRelay)otherPos.getTileEntity(world)).sendUpdate(); + ((TileEntityLaserRelay)world.getTileEntity(savedPos)).sendUpdate(); + ((TileEntityLaserRelay)world.getTileEntity(pos)).sendUpdate(); player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".laser.connected.desc"))); } @@ -84,7 +82,7 @@ public class ItemLaserWrench extends ItemBase{ @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - Position coords = ItemPhantomConnector.getStoredPosition(stack); + BlockPos coords = ItemPhantomConnector.getStoredPosition(stack); if(coords != null){ list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".boundTo.desc")+":"); list.add("X: "+coords.getX()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java index f017e9776..bf1c922c6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.items; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.entity.item.EntityItem; @@ -20,6 +20,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -81,7 +82,7 @@ public class ItemLeafBlower extends ItemBase{ * @param z The Z Position of the Player */ public void breakStuff(World world, int x, int y, int z){ - ArrayList breakPositions = new ArrayList(); + ArrayList breakPositions = new ArrayList(); int rangeSides = 5; int rangeUp = 1; @@ -89,8 +90,8 @@ public class ItemLeafBlower extends ItemBase{ for(int reachZ = -rangeSides; reachZ < rangeSides+1; reachZ++){ for(int reachY = (this.isAdvanced ? -rangeSides : -rangeUp); reachY < (this.isAdvanced ? rangeSides : rangeUp)+1; reachY++){ //The current Block to break - Position pos = new Position(x+reachX, y+reachY, z+reachZ); - Block block = pos.getBlock(world); + BlockPos pos = new BlockPos(x+reachX, y+reachY, z+reachZ); + Block block = PosUtil.getBlock(pos, world); if(block != null && (block instanceof BlockBush || (this.isAdvanced && block.isLeaves(world, pos)))){ breakPositions.add(pos); } @@ -101,13 +102,13 @@ public class ItemLeafBlower extends ItemBase{ if(!breakPositions.isEmpty()){ Collections.shuffle(breakPositions); - Position theCoord = breakPositions.get(0); - Block theBlock = theCoord.getBlock(world); + BlockPos theCoord = breakPositions.get(0); + Block theBlock = PosUtil.getBlock(theCoord, world); ArrayList drops = new ArrayList(); - int meta = theCoord.getMetadata(world); + int meta = PosUtil.getMetadata(theCoord, world); //Gets all of the Drops the Block should have - drops.addAll(theBlock.getDrops(world, theCoord, theCoord.getBlockState(world), 0)); + drops.addAll(theBlock.getDrops(world, theCoord, world.getBlockState(theCoord), 0)); //Deletes the Block world.setBlockToAir(theCoord); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java index 4275e321d..3167d7bbd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; @@ -80,14 +79,14 @@ public class ItemPhantomConnector extends ItemBase{ } } - public static Position getStoredPosition(ItemStack stack){ + public static BlockPos getStoredPosition(ItemStack stack){ NBTTagCompound tag = stack.getTagCompound(); if(tag != null){ int x = tag.getInteger("XCoordOfTileStored"); int y = tag.getInteger("YCoordOfTileStored"); int z = tag.getInteger("ZCoordOfTileStored"); if(!(x == 0 && y == 0 && z == 0)){ - return new Position(x, y, z); + return new BlockPos(x, y, z); } } return null; @@ -135,7 +134,7 @@ public class ItemPhantomConnector extends ItemBase{ @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - Position coords = getStoredPosition(stack); + BlockPos coords = getStoredPosition(stack); if(coords != null){ list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".boundTo.desc")+":"); list.add("X: "+coords.getX()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java index 0f5b08b52..2678bc041 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java @@ -10,14 +10,16 @@ package de.ellpeck.actuallyadditions.mod.items; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -49,8 +51,8 @@ public class ItemWaterRemovalRing extends ItemEnergy{ int theZ = MathHelper.floor_double(player.posZ+z); if(this.getEnergyStored(stack) >= energyUse){ //Remove Water - Position pos = new Position(theX, theY, theZ); - Block block = pos.getBlock(world); + BlockPos pos = new BlockPos(theX, theY, theZ); + Block block = PosUtil.getBlock(pos, world); if(block == Blocks.water || block == Blocks.flowing_water){ world.setBlockToAir(pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java index 7b43b366e..89e6d898d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java @@ -10,16 +10,18 @@ package de.ellpeck.actuallyadditions.mod.items.lens; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import java.util.ArrayList; @@ -54,15 +56,15 @@ public class LensColor extends Lens{ @SuppressWarnings("unchecked") @Override - public boolean invoke(Position hitBlock, IAtomicReconstructor tile){ + public boolean invoke(BlockPos hitBlock, IAtomicReconstructor tile){ if(hitBlock != null){ - if(Util.arrayContains(CONVERTABLE_BLOCKS, hitBlock.getBlock(tile.getWorldObject())) >= 0 && tile.getEnergy() >= ENERGY_USE){ - int meta = hitBlock.getMetadata(tile.getWorldObject()); + if(Util.arrayContains(CONVERTABLE_BLOCKS, PosUtil.getBlock(hitBlock, tile.getWorldObject())) >= 0 && tile.getEnergy() >= ENERGY_USE){ + int meta = PosUtil.getMetadata(hitBlock, tile.getWorldObject()); if(meta >= 15){ - hitBlock.setMetadata(tile.getWorldObject(), 0, 2); + PosUtil.setMetadata(hitBlock, tile.getWorldObject(), 0, 2); } else{ - hitBlock.setMetadata(tile.getWorldObject(), meta+1, 2); + PosUtil.setMetadata(hitBlock, tile.getWorldObject(), meta+1, 2); } tile.extractEnergy(ENERGY_USE); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java index 5e3a16852..35e3166b2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java @@ -10,12 +10,13 @@ package de.ellpeck.actuallyadditions.mod.items.lens; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.mod.misc.DamageSources; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import java.util.ArrayList; @@ -23,7 +24,7 @@ public class LensDeath extends Lens{ @SuppressWarnings("unchecked") @Override - public boolean invoke(Position hitBlock, IAtomicReconstructor tile){ + public boolean invoke(BlockPos hitBlock, IAtomicReconstructor tile){ int use = 150; //Per Block (because it doesn't only activate when something is hit like the other lenses!) if(tile.getEnergy() >= use){ tile.extractEnergy(use); @@ -34,7 +35,7 @@ public class LensDeath extends Lens{ } } - return hitBlock != null && !hitBlock.getBlock(tile.getWorldObject()).isAir(tile.getWorldObject(), hitBlock); + return hitBlock != null && !PosUtil.getBlock(hitBlock, tile.getWorldObject()).isAir(tile.getWorldObject(), hitBlock); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java index 27c90de23..83b556617 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java @@ -10,15 +10,16 @@ package de.ellpeck.actuallyadditions.mod.items.lens; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; +import net.minecraft.util.BlockPos; public class LensDetonation extends Lens{ @Override - public boolean invoke(Position hitBlock, IAtomicReconstructor tile){ - if(hitBlock != null && !hitBlock.getBlock(tile.getWorldObject()).isAir(tile.getWorldObject(), hitBlock)){ + public boolean invoke(BlockPos hitBlock, IAtomicReconstructor tile){ + if(hitBlock != null && !PosUtil.getBlock(hitBlock, tile.getWorldObject()).isAir(tile.getWorldObject(), hitBlock)){ int use = 250000; if(tile.getEnergy() >= use){ tile.getWorldObject().newExplosion(null, hitBlock.getX()+0.5, hitBlock.getY()+0.5, hitBlock.getZ()+0.5, 10F, true, true); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java index 1402a0414..d4f270fa8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java @@ -10,15 +10,17 @@ package de.ellpeck.actuallyadditions.mod.items.lens; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.api.recipe.LensNoneRecipe; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import java.util.ArrayList; import java.util.List; @@ -27,24 +29,24 @@ public class LensNone extends Lens{ @SuppressWarnings("unchecked") @Override - public boolean invoke(Position hitBlock, IAtomicReconstructor tile){ - if(hitBlock != null && !hitBlock.getBlock(tile.getWorldObject()).isAir(tile.getWorldObject(), hitBlock)){ + public boolean invoke(BlockPos hitBlock, IAtomicReconstructor tile){ + if(hitBlock != null && !PosUtil.getBlock(hitBlock, tile.getWorldObject()).isAir(tile.getWorldObject(), hitBlock)){ int range = 2; //Converting the Blocks for(int reachX = -range; reachX < range+1; reachX++){ for(int reachZ = -range; reachZ < range+1; reachZ++){ for(int reachY = -range; reachY < range+1; reachY++){ - Position pos = new Position(hitBlock.getX()+reachX, hitBlock.getY()+reachY, hitBlock.getZ()+reachZ); - List recipes = LensNoneRecipeHandler.getRecipesFor(new ItemStack(pos.getBlock(tile.getWorldObject()), 1, pos.getMetadata(tile.getWorldObject()))); + BlockPos pos = new BlockPos(hitBlock.getX()+reachX, hitBlock.getY()+reachY, hitBlock.getZ()+reachZ); + List recipes = LensNoneRecipeHandler.getRecipesFor(new ItemStack(PosUtil.getBlock(pos, tile.getWorldObject()), 1, PosUtil.getMetadata(pos, tile.getWorldObject()))); for(LensNoneRecipe recipe : recipes){ if(recipe != null && tile.getEnergy() >= recipe.energyUse){ List outputs = recipe.getOutputs(); if(outputs != null && !outputs.isEmpty()){ ItemStack output = outputs.get(0); if(output.getItem() instanceof ItemBlock){ - tile.getWorldObject().playAuxSFX(2001, pos, Block.getIdFromBlock(pos.getBlock(tile.getWorldObject()))+(pos.getMetadata(tile.getWorldObject()) << 12)); - pos.setBlock(tile.getWorldObject(), Block.getBlockFromItem(output.getItem()), output.getItemDamage(), 2); + tile.getWorldObject().playAuxSFX(2001, pos, Block.getIdFromBlock(PosUtil.getBlock(pos, tile.getWorldObject()))+(PosUtil.getMetadata(pos, tile.getWorldObject()) << 12)); + PosUtil.setBlock(pos, tile.getWorldObject(), Block.getBlockFromItem(output.getItem()), output.getItemDamage(), 2); } else{ EntityItem item = new EntityItem(tile.getWorldObject(), pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, output.copy()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerEmptyBucket.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerEmptyBucket.java index 06ef9228a..7d45c1066 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerEmptyBucket.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerEmptyBucket.java @@ -10,13 +10,15 @@ package de.ellpeck.actuallyadditions.mod.misc; -import de.ellpeck.actuallyadditions.api.Position; + +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.BehaviorDefaultDispenseItem; import net.minecraft.dispenser.IBlockSource; import net.minecraft.init.Items; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; public class DispenserHandlerEmptyBucket extends BehaviorDefaultDispenseItem{ @@ -27,9 +29,9 @@ public class DispenserHandlerEmptyBucket extends BehaviorDefaultDispenseItem{ int x = source.getBlockTileEntity().getPos().getX()+facing.getFrontOffsetX(); int y = source.getBlockTileEntity().getPos().getY()+facing.getFrontOffsetY(); int z = source.getBlockTileEntity().getPos().getZ()+facing.getFrontOffsetZ(); - Position pos = new Position(x, y, z); + BlockPos pos = new BlockPos(x, y, z); - if(source.getWorld().isAirBlock(pos) && !pos.getMaterial(source.getWorld()).isSolid() && ((ItemBucket)bucket.getItem()).tryPlaceContainedLiquid(source.getWorld(), pos)){ + if(source.getWorld().isAirBlock(pos) && !PosUtil.getMaterial(pos, source.getWorld()).isSolid() && ((ItemBucket)bucket.getItem()).tryPlaceContainedLiquid(source.getWorld(), pos)){ return new ItemStack(Items.bucket); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java index 0581f5fd1..09b36adb5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java @@ -10,12 +10,13 @@ package de.ellpeck.actuallyadditions.mod.misc; -import de.ellpeck.actuallyadditions.api.Position; + import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.BehaviorDefaultDispenseItem; import net.minecraft.dispenser.IBlockSource; import net.minecraft.item.ItemDye; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; public class DispenserHandlerFertilize extends BehaviorDefaultDispenseItem{ @@ -26,7 +27,7 @@ public class DispenserHandlerFertilize extends BehaviorDefaultDispenseItem{ int x = source.getBlockTileEntity().getPos().getX()+facing.getFrontOffsetX(); int y = source.getBlockTileEntity().getPos().getY()+facing.getFrontOffsetY(); int z = source.getBlockTileEntity().getPos().getZ()+facing.getFrontOffsetZ(); - Position pos = new Position(x, y, z); + BlockPos pos = new BlockPos(x, y, z); if(ItemDye.applyBonemeal(stack, source.getWorld(), pos, null)){ source.getWorld().playAuxSFX(2005, pos, 0); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFillBucket.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFillBucket.java index 8e88a9157..daf0fad2e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFillBucket.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFillBucket.java @@ -10,7 +10,8 @@ package de.ellpeck.actuallyadditions.mod.misc; -import de.ellpeck.actuallyadditions.api.Position; + +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.BehaviorDefaultDispenseItem; @@ -19,6 +20,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntityDispenser; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.IFluidBlock; @@ -53,17 +55,17 @@ public class DispenserHandlerFillBucket extends BehaviorDefaultDispenseItem{ } private ItemStack tryFillBucket(IBlockSource source, int x, int y, int z, ItemStack bucket){ - Position pos = new Position(x, y, z); - Block block = pos.getBlock(source.getWorld()); + BlockPos pos = new BlockPos(x, y, z); + Block block = PosUtil.getBlock(pos, source.getWorld()); if(block == Blocks.water || block == Blocks.flowing_water){ - if(pos.getMetadata(source.getWorld()) == 0){ + if(PosUtil.getMetadata(pos, source.getWorld()) == 0){ source.getWorld().setBlockToAir(pos); return new ItemStack(Items.water_bucket); } } else if(block == Blocks.lava || block == Blocks.flowing_lava){ - if(pos.getMetadata(source.getWorld()) == 0){ + if(PosUtil.getMetadata(pos, source.getWorld()) == 0){ source.getWorld().setBlockToAir(pos); return new ItemStack(Items.lava_bucket); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java index 3b124b5ab..c2f77f41c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java @@ -11,14 +11,15 @@ package de.ellpeck.actuallyadditions.mod.misc; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import io.netty.util.internal.ConcurrentSet; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; @@ -61,7 +62,7 @@ public class LaserRelayConnectionHandler{ /** * Gets all Connections for a Relay */ - public ConcurrentSet getConnectionsFor(Position relay){ + public ConcurrentSet getConnectionsFor(BlockPos relay){ ConcurrentSet allPairs = new ConcurrentSet(); for(Network aNetwork : this.networks){ for(ConnectionPair pair : aNetwork.connections){ @@ -76,7 +77,7 @@ public class LaserRelayConnectionHandler{ /** * Removes a Relay from its Network */ - public void removeRelayFromNetwork(Position relay){ + public void removeRelayFromNetwork(BlockPos relay){ Network network = this.getNetworkFor(relay); if(network != null){ //Setup new network (so that splitting a network will cause it to break into two) @@ -94,7 +95,7 @@ public class LaserRelayConnectionHandler{ /** * Gets a Network for a Relay */ - public Network getNetworkFor(Position relay){ + public Network getNetworkFor(BlockPos relay){ for(Network aNetwork : this.networks){ for(ConnectionPair pair : aNetwork.connections){ if(pair.contains(relay)){ @@ -109,9 +110,9 @@ public class LaserRelayConnectionHandler{ * Adds a new connection between two relays * (Puts it into the correct network!) */ - public boolean addConnection(Position firstRelay, Position secondRelay){ - int distance = (int)firstRelay.toVec().distanceTo(secondRelay.toVec()); - if(distance > TileEntityLaserRelay.MAX_DISTANCE || firstRelay.isEqual(secondRelay)){ + public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay){ + int distance = (int)PosUtil.toVec(firstRelay).distanceTo(PosUtil.toVec(secondRelay)); + if(distance > TileEntityLaserRelay.MAX_DISTANCE || PosUtil.areSamePos(firstRelay, secondRelay)){ return false; } @@ -161,21 +162,21 @@ public class LaserRelayConnectionHandler{ //System.out.println("Merged Two Networks!"); } - public int transferEnergyToReceiverInNeed(World world, Position energyGottenFrom, Network network, int maxTransfer, boolean simulate){ + public int transferEnergyToReceiverInNeed(World world, BlockPos energyGottenFrom, Network network, int maxTransfer, boolean simulate){ int transmitted = 0; //Go through all of the connections in the network for(ConnectionPair pair : network.connections){ - Position[] relays = new Position[]{pair.firstRelay, pair.secondRelay}; + BlockPos[] relays = new BlockPos[]{pair.firstRelay, pair.secondRelay}; //Go through both relays in the connection - for(Position relay : relays){ + for(BlockPos relay : relays){ if(relay != null){ //Get every side of the relay for(int i = 0; i <= 5; i++){ EnumFacing side = WorldUtil.getDirectionBySidesInOrder(i); //Get the Position at the side - Position pos = WorldUtil.getCoordsFromSide(side, relay, 0); - if(!pos.isEqual(energyGottenFrom)){ - TileEntity tile = pos.getTileEntity(world); + BlockPos pos = WorldUtil.getCoordsFromSide(side, relay, 0); + if(!PosUtil.areSamePos(pos, energyGottenFrom)){ + TileEntity tile = world.getTileEntity(pos); if(tile instanceof IEnergyReceiver && !(tile instanceof TileEntityLaserRelay)){ IEnergyReceiver receiver = (IEnergyReceiver)tile; if(receiver.canConnectEnergy(side.getOpposite())){ @@ -203,30 +204,30 @@ public class LaserRelayConnectionHandler{ public static class ConnectionPair{ - public Position firstRelay; - public Position secondRelay; + public BlockPos firstRelay; + public BlockPos secondRelay; - public ConnectionPair(Position firstRelay, Position secondRelay){ + public ConnectionPair(BlockPos firstRelay, BlockPos secondRelay){ this.firstRelay = firstRelay; this.secondRelay = secondRelay; } public static ConnectionPair readFromNBT(NBTTagCompound compound){ if(compound != null){ - Position[] pos = new Position[2]; + BlockPos[] pos = new BlockPos[2]; for(int i = 0; i < pos.length; i++){ int anX = compound.getInteger("x"+i); int aY = compound.getInteger("y"+i); int aZ = compound.getInteger("z"+i); - pos[i] = new Position(anX, aY, aZ); + pos[i] = new BlockPos(anX, aY, aZ); } return new ConnectionPair(pos[0], pos[1]); } return null; } - public boolean contains(Position relay){ - return (this.firstRelay != null && this.firstRelay.isEqual(relay)) || (this.secondRelay != null && this.secondRelay.isEqual(relay)); + public boolean contains(BlockPos relay){ + return (this.firstRelay != null && PosUtil.areSamePos(firstRelay, relay)) || (this.secondRelay != null && PosUtil.areSamePos(secondRelay, relay)); } @Override @@ -237,7 +238,7 @@ public class LaserRelayConnectionHandler{ public NBTTagCompound writeToNBT(){ NBTTagCompound compound = new NBTTagCompound(); for(int i = 0; i < 2; i++){ - Position relay = i == 0 ? this.firstRelay : this.secondRelay; + BlockPos relay = i == 0 ? this.firstRelay : this.secondRelay; compound.setInteger("x"+i, relay.getX()); compound.setInteger("y"+i, relay.getY()); compound.setInteger("z"+i, relay.getZ()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java index 6fe99fdce..ab30f892a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java @@ -11,12 +11,12 @@ package de.ellpeck.actuallyadditions.mod.network; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.internal.EntrySet; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBookletStand; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; @@ -89,7 +89,7 @@ public class PacketBookletStandButton implements IMessage{ @Override public IMessage onMessage(PacketBookletStandButton message, MessageContext ctx){ World world = DimensionManager.getWorld(message.worldID); - TileEntity tile = world.getTileEntity(new Position(message.tileX, message.tileY, message.tileZ)); + TileEntity tile = world.getTileEntity(new BlockPos(message.tileX, message.tileY, message.tileZ)); EntityPlayer player = (EntityPlayer)world.getEntityByID(message.playerID); if(tile instanceof TileEntityBookletStand){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java index aabdb2577..bbe43d312 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiButton.java @@ -10,10 +10,11 @@ package de.ellpeck.actuallyadditions.mod.network.gui; -import de.ellpeck.actuallyadditions.api.Position; + import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; @@ -68,7 +69,7 @@ public class PacketGuiButton implements IMessage{ @Override public IMessage onMessage(PacketGuiButton message, MessageContext ctx){ World world = DimensionManager.getWorld(message.worldID); - TileEntity tile = world.getTileEntity(new Position(message.tileX, message.tileY, message.tileZ)); + TileEntity tile = world.getTileEntity(new BlockPos(message.tileX, message.tileY, message.tileZ)); if(tile instanceof IButtonReactor){ IButtonReactor reactor = (IButtonReactor)tile; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java index 5b014ad5a..1be9ea5a8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiNumber.java @@ -10,10 +10,11 @@ package de.ellpeck.actuallyadditions.mod.network.gui; -import de.ellpeck.actuallyadditions.api.Position; + import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; @@ -72,7 +73,7 @@ public class PacketGuiNumber implements IMessage{ @Override public IMessage onMessage(PacketGuiNumber message, MessageContext ctx){ World world = DimensionManager.getWorld(message.worldID); - TileEntity tile = world.getTileEntity(new Position(message.tileX, message.tileY, message.tileZ)); + TileEntity tile = world.getTileEntity(new BlockPos(message.tileX, message.tileY, message.tileZ)); if(tile instanceof INumberReactor){ INumberReactor reactor = (INumberReactor)tile; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java index 0aad40dcc..d48071826 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/PacketGuiString.java @@ -10,10 +10,11 @@ package de.ellpeck.actuallyadditions.mod.network.gui; -import de.ellpeck.actuallyadditions.api.Position; + import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; @@ -83,7 +84,7 @@ public class PacketGuiString implements IMessage{ @Override public IMessage onMessage(PacketGuiString message, MessageContext ctx){ World world = DimensionManager.getWorld(message.worldID); - TileEntity tile = world.getTileEntity(new Position(message.tileX, message.tileY, message.tileZ)); + TileEntity tile = world.getTileEntity(new BlockPos(message.tileX, message.tileY, message.tileZ)); if(tile instanceof IStringReactor){ IStringReactor reactor = (IStringReactor)tile; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java index c41034f7c..89a7a6276 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.api.lens.Lens; @@ -21,9 +20,11 @@ import de.ellpeck.actuallyadditions.mod.items.lens.Lenses; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketParticle; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.fml.common.network.NetworkRegistry; @@ -68,8 +69,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple private void doWork(){ if(this.storage.getEnergyStored() >= ENERGY_USE){ - Position thisPos = Position.fromTileEntity(this); - EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(thisPos.getMetadata(worldObj)); + EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, worldObj)); //Extract energy for shooting the laser itself too! this.storage.extractEnergy(ENERGY_USE, false); @@ -77,7 +77,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple Lens currentLens = this.getCurrentLens(); int distance = currentLens.getDistance(); for(int i = 0; i < distance; i++){ - Position hitBlock = WorldUtil.getCoordsFromSide(sideToManipulate, thisPos, i); + BlockPos hitBlock = WorldUtil.getCoordsFromSide(sideToManipulate, this.pos, i); if(currentLens.invoke(hitBlock, this)){ this.shootLaser(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), currentLens); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java index edda2c407..f3b5f8f44 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java @@ -10,12 +10,14 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.api.Position; + +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockAir; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import java.util.ArrayList; @@ -67,26 +69,26 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst } private void doWork(){ - EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(Position.fromTileEntity(this).getMetadata(worldObj)); + EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, worldObj)); - Position coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, Position.fromTileEntity(this), 0); + BlockPos coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, this.pos, 0); if(coordsBlock != null){ - Block blockToBreak = coordsBlock.getBlock(worldObj); + Block blockToBreak = PosUtil.getBlock(coordsBlock, worldObj); if(!this.isPlacer && blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(worldObj, coordsBlock) > -1.0F){ ArrayList drops = new ArrayList(); - int meta = coordsBlock.getMetadata(worldObj); - drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock, coordsBlock.getBlockState(worldObj), 0)); + int meta = PosUtil.getMetadata(coordsBlock, worldObj); + drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock, worldObj.getBlockState(coordsBlock), 0)); if(WorldUtil.addToInventory(this, drops, false, true)){ worldObj.playAuxSFX(2001, coordsBlock, Block.getIdFromBlock(blockToBreak)+(meta << 12)); - WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, Position.fromTileEntity(this)); + WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.pos); WorldUtil.addToInventory(this, drops, true, true); this.markDirty(); } } - else if(this.isPlacer && coordsBlock.getBlock(worldObj).isReplaceable(worldObj, coordsBlock)){ + else if(this.isPlacer && PosUtil.getBlock(coordsBlock, worldObj).isReplaceable(worldObj, coordsBlock)){ int theSlot = WorldUtil.findFirstFilledSlot(this.slots); - this.setInventorySlotContents(theSlot, WorldUtil.placeBlockAtSide(sideToManipulate, worldObj, Position.fromTileEntity(this), this.slots[theSlot])); + this.setInventorySlotContents(theSlot, WorldUtil.placeBlockAtSide(sideToManipulate, worldObj, this.pos, this.slots[theSlot])); if(this.slots[theSlot] != null && this.slots[theSlot].stackSize <= 0){ this.slots[theSlot] = null; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java index d469a00b4..9b58198f5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; @@ -85,12 +84,12 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE WorldUtil.fillBucket(tank, slots, 1, 2); if(this.tank.getFluidAmount() > 0){ - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.DOWN, this.tank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.DOWN, this.tank); if(!this.isRedstonePowered){ - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.NORTH, this.tank); - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.EAST, this.tank); - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.SOUTH, this.tank); - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.WEST, this.tank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.NORTH, this.tank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.EAST, this.tank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.SOUTH, this.tank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.WEST, this.tank); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java index 16a41fd01..e8e5dc3cd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java @@ -12,7 +12,7 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import de.ellpeck.actuallyadditions.api.Position; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -69,20 +69,19 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements } if(this.storage.getEnergyStored() > 0){ - WorldUtil.pushEnergyToAllSides(worldObj, Position.fromTileEntity(this), this.storage); + WorldUtil.pushEnergyToAllSides(worldObj, this.pos, this.storage); } if(flag != this.currentBurnTime > 0){ this.markDirty(); - Position thisPos = Position.fromTileEntity(this); - int meta = thisPos.getMetadata(worldObj); + int meta = PosUtil.getMetadata(this.getPos(), worldObj); if(meta == 1){ if(!(this.currentBurnTime <= 0 && this.slots[0] != null && TileEntityFurnace.getItemBurnTime(this.slots[0]) > 0 && this.storage.getEnergyStored() < this.storage.getMaxEnergyStored())){ - thisPos.setMetadata(worldObj, 0, 2); + PosUtil.setMetadata(this.pos, worldObj, 0, 2); } } else{ - thisPos.setMetadata(worldObj, 1, 2); + PosUtil.setMetadata(this.pos, worldObj, 1, 2); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java index e28ababbc..b5c37fb0d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java @@ -12,12 +12,13 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockAir; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -63,21 +64,20 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem } private void doWork(){ - Position pos = Position.fromTileEntity(this); - EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(pos.getMetadata(worldObj)); + EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, worldObj)); for(int i = 0; i < RANGE; i++){ - Position coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, pos, i); + BlockPos coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, pos, i); if(coordsBlock != null){ - Block blockToBreak = coordsBlock.getBlock(worldObj); + Block blockToBreak = PosUtil.getBlock(coordsBlock, worldObj); if(blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(worldObj, pos) > -1.0F){ ArrayList drops = new ArrayList(); - int meta = coordsBlock.getMetadata(worldObj); - drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock, coordsBlock.getBlockState(worldObj), 0)); + int meta = PosUtil.getMetadata(coordsBlock, worldObj); + drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock, worldObj.getBlockState(coordsBlock), 0)); if(WorldUtil.addToInventory(this, drops, false, true)){ worldObj.playAuxSFX(2001, this.getPos(), Block.getIdFromBlock(blockToBreak)+(meta << 12)); - WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, Position.fromTileEntity(this), i); + WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.getPos(), i); WorldUtil.addToInventory(this, drops, true, true); this.storage.extractEnergy(ENERGY_USE, false); this.markDirty(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java index 9d3a9d8cc..8fd2a6139 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.api.Position; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -60,7 +60,7 @@ public class TileEntityDropper extends TileEntityInventoryBase implements IRedst if(this.removeFromInventory(false) != null){ ItemStack stack = this.removeFromInventory(true); stack.stackSize = 1; - WorldUtil.dropItemAtSide(WorldUtil.getDirectionByPistonRotation(Position.fromTileEntity(this).getMetadata(worldObj)), worldObj, Position.fromTileEntity(this), stack); + WorldUtil.dropItemAtSide(WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, worldObj)), worldObj, this.pos, stack); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java index 0a163057a..d02151c62 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyContainerItem; import cofh.api.energy.IEnergyProvider; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -50,7 +49,7 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements IEne } if(this.storage.getEnergyStored() > 0){ - WorldUtil.pushEnergyToAllSides(worldObj, Position.fromTileEntity(this), this.storage); + WorldUtil.pushEnergyToAllSides(worldObj, this.pos, this.storage); } if(lastEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java index b740f5f3e..3d221ae4b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.init.Items; @@ -59,12 +58,12 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen WorldUtil.fillBucket(oilTank, slots, 2, 3); if(this.oilTank.getFluidAmount() > 0){ - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.DOWN, this.oilTank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.DOWN, this.oilTank); if(!this.isRedstonePowered){ - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.NORTH, this.oilTank); - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.EAST, this.oilTank); - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.SOUTH, this.oilTank); - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.WEST, this.oilTank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.NORTH, this.oilTank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.EAST, this.oilTank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.SOUTH, this.oilTank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.WEST, this.oilTank); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java index ed98ccb0b..79db068e3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java @@ -10,7 +10,8 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.api.Position; + +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.material.Material; @@ -33,13 +34,12 @@ public class TileEntityFishingNet extends TileEntityBase{ super.updateEntity(); if(!worldObj.isRemote){ if(!this.isRedstonePowered){ - Position pos = Position.fromTileEntity(this); - if(pos.getOffsetPosition(0, -1, 0).getMaterial(worldObj) == Material.water){ + if(PosUtil.getMaterial(PosUtil.offset(this.pos, 0, -1, 0), this.worldObj) == Material.water){ if(this.timeUntilNextDrop > 0){ this.timeUntilNextDrop--; if(timeUntilNextDrop <= 0){ ItemStack fishable = FishingHooks.getRandomFishable(Util.RANDOM, Util.RANDOM.nextFloat()); - TileEntity tile = pos.getOffsetPosition(0, 1, 0).getTileEntity(worldObj); + TileEntity tile = worldObj.getTileEntity(PosUtil.offset(pos, 0, 1, 0)); if(tile != null && tile instanceof IInventory){ ArrayList list = new ArrayList(); list.add(fishable); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java index e43f7039d..49fb8cc59 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java @@ -10,12 +10,14 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.api.Position; + +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.*; import net.minecraftforge.fml.relauncher.Side; @@ -54,39 +56,37 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements } private void doWork(){ - Position thisPos = Position.fromTileEntity(this); - - EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(thisPos.getMetadata(worldObj)); - Position coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, Position.fromTileEntity(this), 0); + EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, worldObj)); + BlockPos coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, this.pos, 0); if(coordsBlock != null){ - Block blockToBreak = coordsBlock.getBlock(worldObj); - if(!this.isPlacer && blockToBreak != null && coordsBlock.getMetadata(worldObj) == 0 && FluidContainerRegistry.BUCKET_VOLUME <= this.tank.getCapacity()-this.tank.getFluidAmount()){ + Block blockToBreak = PosUtil.getBlock(coordsBlock, worldObj); + if(!this.isPlacer && blockToBreak != null && PosUtil.getMetadata(coordsBlock, worldObj) == 0 && FluidContainerRegistry.BUCKET_VOLUME <= this.tank.getCapacity()-this.tank.getFluidAmount()){ if(blockToBreak instanceof IFluidBlock && ((IFluidBlock)blockToBreak).getFluid() != null){ if(this.tank.fill(new FluidStack(((IFluidBlock)blockToBreak).getFluid(), FluidContainerRegistry.BUCKET_VOLUME), false) >= FluidContainerRegistry.BUCKET_VOLUME){ this.tank.fill(new FluidStack(((IFluidBlock)blockToBreak).getFluid(), FluidContainerRegistry.BUCKET_VOLUME), true); - WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, thisPos); + WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.pos); } } else if(blockToBreak == Blocks.lava || blockToBreak == Blocks.flowing_lava){ if(this.tank.fill(new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME), false) >= FluidContainerRegistry.BUCKET_VOLUME){ this.tank.fill(new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME), true); - WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, thisPos); + WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.pos); } } else if(blockToBreak == Blocks.water || blockToBreak == Blocks.flowing_water){ if(this.tank.fill(new FluidStack(FluidRegistry.WATER, FluidContainerRegistry.BUCKET_VOLUME), false) >= FluidContainerRegistry.BUCKET_VOLUME){ this.tank.fill(new FluidStack(FluidRegistry.WATER, FluidContainerRegistry.BUCKET_VOLUME), true); - WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, thisPos); + WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.pos); } } } - else if(this.isPlacer && coordsBlock.getBlock(worldObj).isReplaceable(worldObj, coordsBlock)){ + else if(this.isPlacer && PosUtil.getBlock(coordsBlock, worldObj).isReplaceable(worldObj, coordsBlock)){ if(this.tank.getFluidAmount() >= FluidContainerRegistry.BUCKET_VOLUME){ if(this.tank.getFluid().getFluid().getBlock() != null){ - Block block = coordsBlock.getBlock(worldObj); + Block block = PosUtil.getBlock(coordsBlock, worldObj); if(!(block instanceof IFluidBlock) && block != Blocks.lava && block != Blocks.water && block != Blocks.flowing_lava && block != Blocks.flowing_water){ - WorldUtil.placeBlockAtSide(sideToManipulate, worldObj, thisPos, new ItemStack(this.tank.getFluid().getFluid().getBlock())); + WorldUtil.placeBlockAtSide(sideToManipulate, worldObj, this.pos, new ItemStack(this.tank.getFluid().getFluid().getBlock())); this.tank.drain(FluidContainerRegistry.BUCKET_VOLUME, true); } } @@ -159,12 +159,12 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements } if(!this.isPlacer && this.tank.getFluidAmount() > 0){ - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.DOWN, this.tank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.DOWN, this.tank); if(!this.isRedstonePowered){ - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.NORTH, this.tank); - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.EAST, this.tank); - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.SOUTH, this.tank); - WorldUtil.pushFluid(worldObj, Position.fromTileEntity(this), EnumFacing.WEST, this.tank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.NORTH, this.tank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.EAST, this.tank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.SOUTH, this.tank); + WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.WEST, this.tank); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java index 74d58ca1f..0eca889d2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java @@ -12,7 +12,7 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; @@ -81,15 +81,14 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements if(flag != (this.firstSmeltTime > 0 || this.secondSmeltTime > 0)){ this.markDirty(); - Position thisPos = Position.fromTileEntity(this); - int meta = thisPos.getMetadata(worldObj); + int meta = PosUtil.getMetadata(this.pos, worldObj); if(meta > 3){ if(!this.canSmeltOn(SLOT_INPUT_1, SLOT_OUTPUT_1) && !this.canSmeltOn(SLOT_INPUT_2, SLOT_OUTPUT_2)){ - thisPos.setMetadata(worldObj, meta-4, 2); + PosUtil.setMetadata(this.pos, worldObj, meta-4, 2); } } else{ - thisPos.setMetadata(worldObj, meta+4, 2); + PosUtil.setMetadata(this.pos, worldObj, meta+4, 2); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java index ac060be93..03ef5752a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java @@ -12,10 +12,11 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -58,7 +59,7 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro } if(this.storage.getEnergyStored() > 0){ - WorldUtil.pushEnergyToAllSides(worldObj, Position.fromTileEntity(this), this.storage); + WorldUtil.pushEnergyToAllSides(worldObj, this.pos, this.storage); } if(this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){ @@ -80,10 +81,9 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro } public boolean hasBlockAbove(){ - Position pos = Position.fromTileEntity(this); for(int y = 1; y <= worldObj.getHeight(); y++){ - Position offset = pos.getOffsetPosition(0, y, 0); - if(!offset.getBlock(worldObj).isAir(worldObj, offset)){ + BlockPos offset = PosUtil.offset(this.pos, 0, y, 0); + if(!PosUtil.getBlock(offset, worldObj).isAir(worldObj, offset)){ return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGreenhouseGlass.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGreenhouseGlass.java index ba8435aaa..7d60df32c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGreenhouseGlass.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGreenhouseGlass.java @@ -10,12 +10,14 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.api.Position; + +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockGrass; import net.minecraft.block.IGrowable; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraftforge.common.IPlantable; public class TileEntityGreenhouseGlass extends TileEntityBase{ @@ -30,12 +32,12 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{ if(this.timeUntilNextFert > 0){ this.timeUntilNextFert--; if(timeUntilNextFert <= 0){ - Position blockToFert = this.blockToFertilize(); + BlockPos blockToFert = this.blockToFertilize(); if(blockToFert != null){ - int metaBefore = blockToFert.getMetadata(worldObj); - blockToFert.getBlock(worldObj).updateTick(worldObj, blockToFert, blockToFert.getBlockState(worldObj), Util.RANDOM); + int metaBefore = PosUtil.getMetadata(blockToFert, worldObj); + PosUtil.getBlock(blockToFert, worldObj).updateTick(worldObj, blockToFert, worldObj.getBlockState(blockToFert), Util.RANDOM); - if(blockToFert.getMetadata(worldObj) != metaBefore){ + if(PosUtil.getMetadata(blockToFert, worldObj) != metaBefore){ worldObj.playAuxSFX(2005, blockToFert, 0); } } @@ -49,10 +51,10 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{ } } - public Position blockToFertilize(){ + public BlockPos blockToFertilize(){ for(int i = -1; i > 0; i--){ - Position offset = Position.fromBlockPos(pos).getOffsetPosition(0, i, 0); - Block block = offset.getBlock(worldObj); + BlockPos offset = PosUtil.offset(this.pos, 0, i, 0); + Block block = PosUtil.getBlock(pos, worldObj); if(block != null && !(worldObj.isAirBlock(offset))){ if((block instanceof IGrowable || block instanceof IPlantable) && !(block instanceof BlockGrass)){ return offset; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java index 4b4c50250..cb3a03232 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java @@ -13,9 +13,9 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -125,15 +125,14 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg if(flag != (this.firstCrushTime > 0 || this.secondCrushTime > 0)){ this.markDirty(); - Position thisPos = Position.fromTileEntity(this); - int meta = thisPos.getMetadata(worldObj); + int meta = PosUtil.getMetadata(this.pos, worldObj); if(meta == 1){ if(!this.canCrushOn(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2) && (!this.isDouble || !this.canCrushOn(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2))){ - thisPos.setMetadata(worldObj, 0, 2); + PosUtil.setMetadata(this.pos, worldObj, 0, 2); } } else{ - thisPos.setMetadata(worldObj, 1, 2); + PosUtil.setMetadata(this.pos, worldObj, 1, 2); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java index 9ab93af85..7d538d2a2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java @@ -12,13 +12,14 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -39,10 +40,10 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr ArrayList blocksAround = new ArrayList(); if(ENERGY_PRODUCE <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored()){ for(int i = 1; i <= 5; i++){ - Position coords = WorldUtil.getCoordsFromSide(WorldUtil.getDirectionBySidesInOrder(i), Position.fromTileEntity(this), 0); + BlockPos coords = WorldUtil.getCoordsFromSide(WorldUtil.getDirectionBySidesInOrder(i), this.pos, 0); if(coords != null){ - Block block = coords.getBlock(worldObj); - if(block != null && block.getMaterial() == Material.lava && coords.getMetadata(worldObj) == 0){ + Block block = PosUtil.getBlock(coords, worldObj); + if(block != null && block.getMaterial() == Material.lava && PosUtil.getMetadata(coords, worldObj) == 0){ blocksAround.add(i); } } @@ -54,13 +55,13 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr if(Util.RANDOM.nextInt(10000) == 0){ int randomSide = blocksAround.get(Util.RANDOM.nextInt(blocksAround.size())); - WorldUtil.breakBlockAtSide(WorldUtil.getDirectionBySidesInOrder(randomSide), worldObj, Position.fromTileEntity(this)); + WorldUtil.breakBlockAtSide(WorldUtil.getDirectionBySidesInOrder(randomSide), worldObj, this.pos); } } } if(this.storage.getEnergyStored() > 0){ - WorldUtil.pushEnergy(worldObj, Position.fromTileEntity(this), EnumFacing.UP, this.storage); + WorldUtil.pushEnergy(worldObj, this.pos, EnumFacing.UP, this.storage); } if(this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java index 65e51d184..70f672209 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.api.Position; + import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.network.gui.INumberReactor; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; @@ -303,8 +303,8 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt public void initVars(){ //Gets the Place to put and Pull - this.placeToPull = WorldUtil.getTileEntityFromSide(WorldUtil.getDirectionBySidesInOrder(this.sideToPull), this.worldObj, Position.fromTileEntity(this)); - this.placeToPut = WorldUtil.getTileEntityFromSide(WorldUtil.getDirectionBySidesInOrder(this.sideToPut), this.worldObj, Position.fromTileEntity(this)); + this.placeToPull = WorldUtil.getTileEntityFromSide(WorldUtil.getDirectionBySidesInOrder(this.sideToPull), this.worldObj, this.pos); + this.placeToPut = WorldUtil.getTileEntityFromSide(WorldUtil.getDirectionBySidesInOrder(this.sideToPut), this.worldObj, this.pos); //Resets the Variables if(this.placeToPull instanceof IInventory){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java index e6ff79f28..39bf833f4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java @@ -11,11 +11,11 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.misc.LaserRelayConnectionHandler; import de.ellpeck.actuallyadditions.mod.network.PacketParticle; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import io.netty.util.internal.ConcurrentSet; @@ -24,6 +24,7 @@ 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.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -44,11 +45,11 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei @SideOnly(Side.CLIENT) public void renderParticles(){ if(Util.RANDOM.nextInt(ConfigBoolValues.LESS_LASER_RELAY_PARTICLES.isEnabled() ? 15 : 8) == 0){ - Position thisPos = Position.fromTileEntity(this); + BlockPos thisPos = this.pos; LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().getNetworkFor(thisPos); if(network != null){ for(LaserRelayConnectionHandler.ConnectionPair aPair : network.connections){ - if(aPair.contains(thisPos) && thisPos.isEqual(aPair.firstRelay)){ + if(aPair.contains(thisPos) && PosUtil.areSamePos(thisPos, aPair.firstRelay)){ PacketParticle.renderParticlesFromAToB(aPair.firstRelay.getX(), aPair.firstRelay.getY(), aPair.firstRelay.getZ(), aPair.secondRelay.getX(), aPair.secondRelay.getY(), aPair.secondRelay.getZ(), ConfigBoolValues.LESS_LASER_RELAY_PARTICLES.isEnabled() ? 1 : Util.RANDOM.nextInt(3)+1, 0.8F, COLOR, 1F); } } @@ -60,7 +61,7 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei public Packet getDescriptionPacket(){ NBTTagCompound compound = new NBTTagCompound(); - Position thisPos = Position.fromTileEntity(this); + BlockPos thisPos = this.pos; ConcurrentSet connections = LaserRelayConnectionHandler.getInstance().getConnectionsFor(thisPos); if(connections != null){ @@ -76,7 +77,7 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ - Position thisPos = Position.fromTileEntity(this); + BlockPos thisPos = this.pos; if(pkt != null && pkt.getNbtCompound() != null){ LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(thisPos); @@ -94,12 +95,12 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei @Override public void invalidate(){ super.invalidate(); - LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(Position.fromTileEntity(this)); + LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(this.pos); } @Override public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ - return this.transmitEnergy(WorldUtil.getCoordsFromSide(from, Position.fromTileEntity(this), 0), maxReceive, simulate); + return this.transmitEnergy(WorldUtil.getCoordsFromSide(from, this.pos, 0), maxReceive, simulate); } @Override @@ -112,10 +113,10 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei return 0; } - public int transmitEnergy(Position blockFrom, int maxTransmit, boolean simulate){ + public int transmitEnergy(BlockPos blockFrom, int maxTransmit, boolean simulate){ int transmitted = 0; if(maxTransmit > 0){ - LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().getNetworkFor(Position.fromTileEntity(this)); + LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().getNetworkFor(this.pos); if(network != null){ transmitted = LaserRelayConnectionHandler.getInstance().transferEnergyToReceiverInNeed(worldObj, blockFrom, network, Math.min(ConfigIntValues.LASER_RELAY_MAX_TRANSFER.getValue(), maxTransmit), simulate); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java index 07ab28d94..f57699ca6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java @@ -12,13 +12,14 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -42,7 +43,7 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I this.currentWorkTime++; if(this.currentWorkTime >= 200){ this.currentWorkTime = 0; - Position.fromTileEntity(this).getOffsetPosition(0, 1, 0).setBlock(worldObj, Blocks.lava, 0, 2); + PosUtil.setBlock(PosUtil.offset(this.pos, 0, 1, 0), worldObj, Blocks.lava, 0, 2); this.storage.extractEnergy(ENERGY_USE, false); } } @@ -71,20 +72,20 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I } public int isMultiblock(){ - Position thisPos = Position.fromTileEntity(this); - Position[] positions = new Position[]{ - thisPos.getOffsetPosition(1, 1, 0), - thisPos.getOffsetPosition(-1, 1, 0), - thisPos.getOffsetPosition(0, 1, 1), - thisPos.getOffsetPosition(0, 1, -1) + BlockPos thisPos = this.pos; + BlockPos[] positions = new BlockPos[]{ + PosUtil.offset(thisPos, 1, 1, 0), + PosUtil.offset(thisPos, -1, 1, 0), + PosUtil.offset(thisPos, 0, 1, 1), + PosUtil.offset(thisPos, 0, 1, -1) }; if(WorldUtil.hasBlocksInPlacesGiven(positions, InitBlocks.blockMisc, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal(), worldObj)){ - Position pos = thisPos.getOffsetPosition(0, 1, 0); - if(pos.getBlock(worldObj) == Blocks.lava || pos.getBlock(worldObj) == Blocks.flowing_lava){ + BlockPos pos = PosUtil.offset(thisPos, 0, 1, 0); + if(PosUtil.getBlock(pos, worldObj) == Blocks.lava || PosUtil.getBlock(pos, worldObj) == Blocks.flowing_lava){ return HAS_LAVA; } - if(pos.getBlock(worldObj) == null || worldObj.isAirBlock(pos)){ + if(PosUtil.getBlock(pos, worldObj) == null || worldObj.isAirBlock(pos)){ return HAS_AIR; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java index 17cd83120..93bd094e4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java @@ -12,13 +12,14 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketParticle; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.relauncher.Side; @@ -46,13 +47,13 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr this.nextUseCounter = 0; if(ENERGY_PRODUCED <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored()){ - ArrayList breakPositions = new ArrayList(); + ArrayList breakPositions = new ArrayList(); for(int reachX = -RANGE; reachX < RANGE+1; reachX++){ for(int reachZ = -RANGE; reachZ < RANGE+1; reachZ++){ for(int reachY = -RANGE; reachY < RANGE+1; reachY++){ - Position pos = new Position(this.pos.getX()+reachX, this.pos.getY()+reachY, this.pos.getZ()+reachZ); - Block block = pos.getBlock(worldObj); + BlockPos pos = PosUtil.offset(this.pos, reachX, reachY, reachZ); + Block block = PosUtil.getBlock(pos, worldObj); if(block != null && block.isLeaves(this.worldObj, pos)){ breakPositions.add(pos); } @@ -62,10 +63,10 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr if(!breakPositions.isEmpty()){ Collections.shuffle(breakPositions); - Position theCoord = breakPositions.get(0); + BlockPos theCoord = breakPositions.get(0); - Block theBlock = theCoord.getBlock(worldObj); - int meta = theCoord.getMetadata(worldObj); + Block theBlock = PosUtil.getBlock(theCoord, worldObj); + int meta = PosUtil.getMetadata(theCoord, worldObj); this.worldObj.playAuxSFX(2001, theCoord, Block.getIdFromBlock(theBlock)+(meta << 12)); this.worldObj.setBlockToAir(this.getPos()); @@ -82,7 +83,7 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr } if(this.storage.getEnergyStored() > 0){ - WorldUtil.pushEnergyToAllSides(worldObj, Position.fromTileEntity(this), this.storage); + WorldUtil.pushEnergyToAllSides(worldObj, this.pos, this.storage); } if(this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java index 0f5242aba..15d81844a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java @@ -12,18 +12,19 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketParticle; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fml.common.network.NetworkRegistry; @@ -58,7 +59,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR if(!this.isRedstonePowered && this.ticksElapsed%5 == 0){ if(this.layerAt > 0){ - if(this.mine(TileEntityPhantomface.upgradeRange(DEFAULT_RANGE, worldObj, Position.fromTileEntity(this)))){ + if(this.mine(TileEntityPhantomface.upgradeRange(DEFAULT_RANGE, worldObj, this.pos))){ this.layerAt--; } } @@ -76,14 +77,14 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR for(int aZ = -range; aZ <= range; aZ++){ int actualUse = ENERGY_USE_PER_BLOCK*(this.onlyMineOres ? 3 : 1); if(this.storage.getEnergyStored() >= actualUse){ - Position pos = new Position(this.pos.getX()+anX, this.layerAt, this.pos.getZ()+aZ); + BlockPos pos = new BlockPos(this.pos.getX()+anX, this.layerAt, this.pos.getZ()+aZ); - Block block = pos.getBlock(worldObj); - int meta = pos.getMetadata(worldObj); + Block block = PosUtil.getBlock(pos, worldObj); + int meta = PosUtil.getMetadata(pos, worldObj); if(block != null && !block.isAir(this.worldObj, pos)){ - if(block.getHarvestLevel(pos.getBlockState(worldObj)) <= 3F && block.getBlockHardness(this.worldObj, pos) >= 0F && !(block instanceof BlockLiquid) && !(block instanceof IFluidBlock) && this.isMinable(block, meta)){ + if(block.getHarvestLevel(worldObj.getBlockState(pos)) <= 3F && block.getBlockHardness(this.worldObj, pos) >= 0F && !(block instanceof BlockLiquid) && !(block instanceof IFluidBlock) && this.isMinable(block, meta)){ ArrayList drops = new ArrayList(); - drops.addAll(block.getDrops(worldObj, pos, pos.getBlockState(worldObj), 0)); + drops.addAll(block.getDrops(worldObj, pos, worldObj.getBlockState(pos), 0)); if(WorldUtil.addToInventory(this, drops, false, true)){ worldObj.playAuxSFX(2001, pos, Block.getIdFromBlock(block)+(meta << 12)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java index 363242f57..bb2eb5f00 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java @@ -12,8 +12,8 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -75,20 +75,19 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I WorldUtil.emptyBucket(tank, slots, 0, 1, InitBlocks.fluidOil); if(this.storage.getEnergyStored() > 0){ - WorldUtil.pushEnergyToAllSides(worldObj, Position.fromTileEntity(this), this.storage); + WorldUtil.pushEnergyToAllSides(worldObj, this.pos, this.storage); } if(flag != this.currentBurnTime > 0){ this.markDirty(); - Position thisPos = Position.fromTileEntity(this); - int meta = thisPos.getMetadata(worldObj); + int meta = PosUtil.getMetadata(pos, worldObj); if(meta == 1){ if(!(ENERGY_PRODUCED*BURN_TIME <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored() && this.currentBurnTime <= 0 && this.tank.getFluidAmount() >= fuelUsed)){ - thisPos.setMetadata(worldObj, 0, 2); + PosUtil.setMetadata(this.pos, worldObj, 0, 2); } } else{ - thisPos.setMetadata(worldObj, 1, 2); + PosUtil.setMetadata(this.pos, worldObj, 1, 2); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java index 1452563ba..7d4599288 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.IEnergyHandler; import cofh.api.energy.IEnergyProvider; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.tileentity.TileEntity; @@ -104,7 +103,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement } private void pushEnergy(EnumFacing side){ - TileEntity tile = WorldUtil.getTileEntityFromSide(side, worldObj, Position.fromTileEntity(this)); + TileEntity tile = WorldUtil.getTileEntityFromSide(side, worldObj, this.getPos()); if(tile != null && tile instanceof IEnergyReceiver && this.getProvider().getEnergyStored(side.getOpposite()) > 0){ if(((IEnergyReceiver)tile).canConnectEnergy(side.getOpposite()) && this.canConnectEnergy(side)){ int receive = this.extractEnergy(side, Math.min(((IEnergyReceiver)tile).getMaxEnergyStored(side.getOpposite())-((IEnergyReceiver)tile).getEnergyStored(side.getOpposite()), this.getEnergyStored(side)), true); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java index 89b229830..005dca4a5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.tileentity.TileEntity; @@ -45,7 +44,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements public IFluidHandler getHandler(){ if(this.boundPosition != null){ - TileEntity tile = boundPosition.getTileEntity(worldObj); + TileEntity tile = worldObj.getTileEntity(boundPosition); if(tile instanceof IFluidHandler){ return (IFluidHandler)tile; } @@ -54,7 +53,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements } private void pushFluid(EnumFacing side){ - TileEntity tile = WorldUtil.getTileEntityFromSide(side, worldObj, Position.fromTileEntity(this)); + TileEntity tile = WorldUtil.getTileEntityFromSide(side, worldObj, this.pos); if(tile != null && tile instanceof IFluidHandler && this.getTankInfo(side) != null && this.getTankInfo(side).length > 0 && ((IFluidHandler)tile).getTankInfo(side.getOpposite()) != null && ((IFluidHandler)tile).getTankInfo(side.getOpposite()).length > 0){ for(FluidTankInfo myInfo : this.getTankInfo(side)){ for(FluidTankInfo hisInfo : ((IFluidHandler)tile).getTankInfo(side.getOpposite())){ @@ -74,7 +73,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements @Override public boolean isBoundThingInRange(){ - return super.isBoundThingInRange() && boundPosition.getTileEntity(worldObj) instanceof IFluidHandler; + return super.isBoundThingInRange() && worldObj.getTileEntity(boundPosition) instanceof IFluidHandler; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java index 8be8f3a75..272764edc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java @@ -10,15 +10,16 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.network.PacketParticle; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.Vec3; @@ -30,7 +31,7 @@ import java.util.ArrayList; public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements IPhantomTile, IRedstoneToggle{ public static final int RANGE = 3; - public Position boundPosition; + public BlockPos boundPosition; public int currentTime; public int range; public boolean isBreaker; @@ -50,7 +51,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements public void updateEntity(){ super.updateEntity(); if(!worldObj.isRemote){ - this.range = TileEntityPhantomface.upgradeRange(RANGE, worldObj, Position.fromTileEntity(this)); + this.range = TileEntityPhantomface.upgradeRange(RANGE, worldObj, this.pos); if(!this.hasBoundPosition()){ this.boundPosition = null; @@ -97,11 +98,11 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements private void doWork(){ if(this.isBreaker){ - Block blockToBreak = boundPosition.getBlock(worldObj); + Block blockToBreak = PosUtil.getBlock(boundPosition, worldObj); if(blockToBreak != null && blockToBreak.getBlockHardness(worldObj, boundPosition) > -1.0F){ ArrayList drops = new ArrayList(); - int meta = boundPosition.getMetadata(worldObj); - drops.addAll(blockToBreak.getDrops(worldObj, boundPosition, boundPosition.getBlockState(worldObj), 0)); + int meta = PosUtil.getMetadata(boundPosition, worldObj); + drops.addAll(blockToBreak.getDrops(worldObj, boundPosition, worldObj.getBlockState(boundPosition), 0)); if(WorldUtil.addToInventory(this, drops, false, true)){ worldObj.playAuxSFX(2001, this.boundPosition, Block.getIdFromBlock(blockToBreak)+(meta << 12)); @@ -112,7 +113,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements } } else{ - if(boundPosition.getBlock(worldObj).isReplaceable(worldObj, boundPosition)){ + if(PosUtil.getBlock(boundPosition, worldObj).isReplaceable(worldObj, boundPosition)){ int theSlot = WorldUtil.findFirstFilledSlot(this.slots); this.setInventorySlotContents(theSlot, WorldUtil.placeBlockAtSide(EnumFacing.UP, worldObj, boundPosition, this.slots[theSlot])); if(this.slots[theSlot] != null && this.slots[theSlot].stackSize <= 0){ @@ -143,17 +144,17 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements @Override public boolean isBoundThingInRange(){ - return this.hasBoundPosition() && this.boundPosition.toVec().distanceTo(new Vec3(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ())) <= this.range; + return this.hasBoundPosition() && PosUtil.toVec(this.boundPosition).distanceTo(new Vec3(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ())) <= this.range; } @Override - public Position getBoundPosition(){ + public BlockPos getBoundPosition(){ return this.boundPosition; } @Override - public void setBoundPosition(Position pos){ - this.boundPosition = pos == null ? null : pos.copy(); + public void setBoundPosition(BlockPos pos){ + this.boundPosition = pos == null ? null : PosUtil.copyPos(pos); } @Override @@ -185,7 +186,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements int z = compound.getInteger("ZCoordOfTileStored"); this.range = compound.getInteger("Range"); if(!(x == 0 && y == 0 && z == 0)){ - this.boundPosition = new Position(x, y, z); + this.boundPosition = new BlockPos(x, y, z); this.markDirty(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java index 9b35226bf..d93fc32c0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java @@ -10,15 +10,16 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.api.Position; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.network.PacketParticle; +import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; @@ -29,11 +30,11 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP public static final int RANGE = 16; public static final float[] COLORS = new float[]{93F/255F, 43F/255F, 181F/255F}; - public Position boundPosition; + public BlockPos boundPosition; public BlockPhantom.Type type; public int range; private int rangeBefore; - private Position boundPosBefore; + private BlockPos boundPosBefore; private Block boundBlockBefore; public TileEntityPhantomface(String name){ @@ -44,23 +45,23 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP public void updateEntity(){ super.updateEntity(); if(!worldObj.isRemote){ - this.range = upgradeRange(RANGE, worldObj, Position.fromBlockPos(this.getPos())); + this.range = upgradeRange(RANGE, worldObj, this.getPos()); if(!this.hasBoundPosition()){ this.boundPosition = null; } - if(this.boundPosition != this.boundPosBefore || (this.boundPosition != null && this.boundPosition.getBlock(worldObj) != this.boundBlockBefore) || this.rangeBefore != this.range){ + if(this.boundPosition != this.boundPosBefore || (this.boundPosition != null && PosUtil.getBlock(this.boundPosition, worldObj) != this.boundBlockBefore) || this.rangeBefore != this.range){ this.rangeBefore = this.range; this.boundPosBefore = this.boundPosition; - this.boundBlockBefore = this.boundPosition == null ? null : this.boundPosition.getBlock(worldObj); + this.boundBlockBefore = this.boundPosition == null ? null : PosUtil.getBlock(this.boundPosition, this.worldObj); - this.worldObj.markBlockForUpdate(new Position(this.getPos().getX()+1, this.getPos().getY(), this.getPos().getZ())); - this.worldObj.markBlockForUpdate(new Position(this.getPos().getX()-1, this.getPos().getY(), this.getPos().getZ())); - this.worldObj.markBlockForUpdate(new Position(this.getPos().getX(), this.getPos().getY()+1, this.getPos().getZ())); - this.worldObj.markBlockForUpdate(new Position(this.getPos().getX(), this.getPos().getY()-1, this.getPos().getZ())); - this.worldObj.markBlockForUpdate(new Position(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()+1)); - this.worldObj.markBlockForUpdate(new Position(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()-1)); + this.worldObj.markBlockForUpdate(PosUtil.offset(this.pos, 1, 0, 0)); + this.worldObj.markBlockForUpdate(PosUtil.offset(this.pos, -1, 0, 0)); + this.worldObj.markBlockForUpdate(PosUtil.offset(this.pos, 0, 1, 0)); + this.worldObj.markBlockForUpdate(PosUtil.offset(this.pos, 0, -1, 0)); + this.worldObj.markBlockForUpdate(PosUtil.offset(this.pos, 0, 0, 1)); + this.worldObj.markBlockForUpdate(PosUtil.offset(this.pos, 0, 0, -1)); this.sendUpdate(); this.markDirty(); } @@ -89,18 +90,17 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP int x = compound.getInteger("XCoordOfTileStored"); int y = compound.getInteger("YCoordOfTileStored"); int z = compound.getInteger("ZCoordOfTileStored"); - int world = compound.getInteger("WorldOfTileStored"); this.range = compound.getInteger("Range"); if(!(x == 0 && y == 0 && z == 0)){ - this.boundPosition = new Position(x, y, z); + this.boundPosition = new BlockPos(x, y, z); this.markDirty(); } } - public static int upgradeRange(int defaultRange, World world, Position pos){ + public static int upgradeRange(int defaultRange, World world, BlockPos pos){ int newRange = defaultRange; for(int i = 0; i < 3; i++){ - Block block = pos.getOffsetPosition(0, 1+i, 0).getBlock(world); + Block block = PosUtil.getBlock(PosUtil.offset(pos, 0, 1+i, 0), world); if(block == InitBlocks.blockPhantomBooster){ newRange = newRange*2; } @@ -144,17 +144,17 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP @Override public boolean isBoundThingInRange(){ - return this.hasBoundPosition() && this.boundPosition.toVec().distanceTo(Position.fromBlockPos(this.getPos()).toVec()) <= this.range; + return this.hasBoundPosition() && PosUtil.toVec(this.boundPosition).distanceTo(PosUtil.toVec(this.getPos())) <= this.range; } @Override - public Position getBoundPosition(){ + public BlockPos getBoundPosition(){ return this.boundPosition; } @Override - public void setBoundPosition(Position pos){ - this.boundPosition = pos == null ? null : pos.copy(); + public void setBoundPosition(BlockPos pos){ + this.boundPosition = pos == null ? null : PosUtil.copyPos(pos); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java new file mode 100644 index 000000000..d9bcdfbde --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java @@ -0,0 +1,70 @@ +/* + * This file ("PosUtil.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense/ + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.util; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.util.BlockPos; +import net.minecraft.util.Vec3; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class PosUtil{ + + public static final PropertyInteger META = PropertyInteger.create("meta", 0, 15); + + public static Block getBlock(BlockPos pos, IBlockAccess world){ + return world.getBlockState(pos).getBlock(); + } + + public static Material getMaterial(BlockPos pos, IBlockAccess world){ + return getBlock(pos, world).getMaterial(); + } + + public static int getMetadata(BlockPos pos, IBlockAccess world){ + return getBlock(pos, world).getMetaFromState(world.getBlockState(pos)); + } + + public static BlockPos offset(BlockPos pos, int x, int y, int z){ + return new BlockPos(pos.getX()+x, pos.getY()+y, pos.getZ()+z); + } + + public static boolean setBlock(BlockPos pos, World world, Block block, int meta, int flag){ + return world.setBlockState(pos, block.getStateFromMeta(meta), flag); + } + + public static Vec3 toVec(BlockPos pos){ + return new Vec3(pos.getX(), pos.getY(), pos.getZ()); + } + + public static BlockPos copyPos(BlockPos pos){ + return new BlockPos(pos.getX(), pos.getY(), pos.getZ()); + } + + public static ItemBlock getItemBlock(BlockPos pos, IBlockAccess world){ + Item item = Item.getItemFromBlock(getBlock(pos, world)); + if(item instanceof ItemBlock){ + return (ItemBlock)item; + } + return null; + } + + public static void setMetadata(BlockPos pos, World world, int meta, int flag){ + world.setBlockState(pos, getBlock(pos, world).getStateFromMeta(meta), flag); + } + + public static boolean areSamePos(BlockPos first, BlockPos second){ + return first.getX() == second.getX() && first.getY() == second.getY() && first.getZ() == second.getZ(); + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index 494b19b0c..dbda94332 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.util; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.Position; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -29,10 +28,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.network.play.client.C07PacketPlayerDigging; import net.minecraft.network.play.server.S23PacketBlockChange; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; +import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.ForgeHooks; @@ -43,22 +39,22 @@ import java.util.ArrayList; public class WorldUtil{ - public static void breakBlockAtSide(EnumFacing side, World world, Position pos){ + public static void breakBlockAtSide(EnumFacing side, World world, BlockPos pos){ breakBlockAtSide(side, world, pos, 0); } - public static void breakBlockAtSide(EnumFacing side, World world, Position pos, int offset){ - Position c = getCoordsFromSide(side, pos, offset); + public static void breakBlockAtSide(EnumFacing side, World world, BlockPos pos, int offset){ + BlockPos c = getCoordsFromSide(side, pos, offset); if(c != null){ world.setBlockToAir(pos); } } - public static Position getCoordsFromSide(EnumFacing side, Position pos, int offset){ - return new Position(pos.getX()+side.getFrontOffsetX()*(offset+1), pos.getY()+side.getFrontOffsetY()*(offset+1), pos.getZ()+side.getFrontOffsetZ()*(offset+1)); + public static BlockPos getCoordsFromSide(EnumFacing side, BlockPos pos, int offset){ + return new BlockPos(pos.getX()+side.getFrontOffsetX()*(offset+1), pos.getY()+side.getFrontOffsetY()*(offset+1), pos.getZ()+side.getFrontOffsetZ()*(offset+1)); } - public static void pushEnergyToAllSides(World world, Position pos, EnergyStorage storage){ + public static void pushEnergyToAllSides(World world, BlockPos pos, EnergyStorage storage){ WorldUtil.pushEnergy(world, pos, EnumFacing.UP, storage); WorldUtil.pushEnergy(world, pos, EnumFacing.DOWN, storage); WorldUtil.pushEnergy(world, pos, EnumFacing.NORTH, storage); @@ -67,7 +63,7 @@ public class WorldUtil{ WorldUtil.pushEnergy(world, pos, EnumFacing.WEST, storage); } - public static void pushEnergy(World world, Position pos, EnumFacing side, EnergyStorage storage){ + public static void pushEnergy(World world, BlockPos pos, EnumFacing side, EnergyStorage storage){ TileEntity tile = getTileEntityFromSide(side, world, pos); if(tile != null && tile instanceof IEnergyReceiver && storage.getEnergyStored() > 0){ if(((IEnergyReceiver)tile).canConnectEnergy(side.getOpposite())){ @@ -77,8 +73,8 @@ public class WorldUtil{ } } - public static TileEntity getTileEntityFromSide(EnumFacing side, World world, Position pos){ - Position c = getCoordsFromSide(side, pos, 0); + public static TileEntity getTileEntityFromSide(EnumFacing side, World world, BlockPos pos){ + BlockPos c = getCoordsFromSide(side, pos, 0); if(c != null){ return world.getTileEntity(pos); } @@ -94,16 +90,16 @@ public class WorldUtil{ * @param world The World * @return Is every block present? */ - public static boolean hasBlocksInPlacesGiven(Position[] positions, Block block, int meta, World world){ - for(Position pos : positions){ - if(!(pos.getBlock(world) == block && pos.getMetadata(world) == meta)){ + public static boolean hasBlocksInPlacesGiven(BlockPos[] positions, Block block, int meta, World world){ + for(BlockPos pos : positions){ + if(!(PosUtil.getBlock(pos, world) == block && PosUtil.getMetadata(pos, world) == meta)){ return false; } } return true; } - public static void pushFluid(World world, Position pos, EnumFacing side, FluidTank tank){ + public static void pushFluid(World world, BlockPos pos, EnumFacing side, FluidTank tank){ TileEntity tile = getTileEntityFromSide(side, world, pos); if(tile != null && tank.getFluid() != null && tile instanceof IFluidHandler){ if(((IFluidHandler)tile).canFill(side.getOpposite(), tank.getFluid().getFluid())){ @@ -113,16 +109,16 @@ public class WorldUtil{ } } - public static ItemStack placeBlockAtSide(EnumFacing side, World world, Position pos, ItemStack stack){ + public static ItemStack placeBlockAtSide(EnumFacing side, World world, BlockPos pos, ItemStack stack){ if(world instanceof WorldServer && stack != null && stack.getItem() != null){ - Position offsetPos = pos.getOffsetPosition(side); + BlockPos offsetPos = pos.offset(side); //Fluids FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(stack); if(fluid != null && fluid.getFluid().getBlock() != null && fluid.getFluid().getBlock().canPlaceBlockAt(world, offsetPos)){ - Block block = offsetPos.getBlock(world); + Block block = PosUtil.getBlock(offsetPos, world); if(!(block instanceof IFluidBlock) && block != Blocks.lava && block != Blocks.water && block != Blocks.flowing_lava && block != Blocks.flowing_water){ - if(offsetPos.setBlock(world, fluid.getFluid().getBlock(), 0, 2)){ + if(PosUtil.setBlock(pos, world, fluid.getFluid().getBlock(), 0, 2)){ return stack.getItem().getContainerItem(stack); } } @@ -130,14 +126,14 @@ public class WorldUtil{ //Redstone else if(stack.getItem() == Items.redstone){ - offsetPos.setBlock(world, Blocks.redstone_wire, 0, 2); + PosUtil.setBlock(pos, world, Blocks.redstone_wire, 0, 2); stack.stackSize--; } //Plants else if(stack.getItem() instanceof IPlantable){ if(((IPlantable)stack.getItem()).getPlant(world, offsetPos).getBlock().canPlaceBlockAt(world, offsetPos)){ - if(offsetPos.setBlockState(world, ((IPlantable)stack.getItem()).getPlant(world, offsetPos), 2)){ + if(world.setBlockState(offsetPos, ((IPlantable)stack.getItem()).getPlant(world, offsetPos), 2)){ stack.stackSize--; } } @@ -156,8 +152,8 @@ public class WorldUtil{ return stack; } - public static void dropItemAtSide(EnumFacing side, World world, Position pos, ItemStack stack){ - Position coords = getCoordsFromSide(side, pos, 0); + public static void dropItemAtSide(EnumFacing side, World world, BlockPos pos, ItemStack stack){ + BlockPos coords = getCoordsFromSide(side, pos, 0); if(coords != null){ EntityItem item = new EntityItem(world, coords.getX()+0.5, coords.getY()+0.5, coords.getZ()+0.5, stack); item.motionX = 0; @@ -235,28 +231,15 @@ public class WorldUtil{ } public static EnumFacing getDirectionByPistonRotation(int meta){ - switch(meta){ - case 0: - return EnumFacing.UP; - case 1: - return EnumFacing.DOWN; - case 2: - return EnumFacing.NORTH; - case 3: - return EnumFacing.EAST; - case 4: - return EnumFacing.SOUTH; - default: - return EnumFacing.WEST; - } + return EnumFacing.values()[meta]; } - public static ArrayList getMaterialsAround(World world, Position pos){ + public static ArrayList getMaterialsAround(World world, BlockPos pos){ ArrayList blocks = new ArrayList(); - blocks.add(pos.getOffsetPosition(EnumFacing.NORTH).getMaterial(world)); - blocks.add(pos.getOffsetPosition(EnumFacing.EAST).getMaterial(world)); - blocks.add(pos.getOffsetPosition(EnumFacing.SOUTH).getMaterial(world)); - blocks.add(pos.getOffsetPosition(EnumFacing.WEST).getMaterial(world)); + blocks.add(PosUtil.getMaterial(pos.offset(EnumFacing.NORTH), world)); + blocks.add(PosUtil.getMaterial(pos.offset(EnumFacing.EAST), world)); + blocks.add(PosUtil.getMaterial(pos.offset(EnumFacing.SOUTH), world)); + blocks.add(PosUtil.getMaterial(pos.offset(EnumFacing.WEST), world)); return blocks; } @@ -362,10 +345,11 @@ public class WorldUtil{ * @param player The Player * @return If the Block could be harvested normally (so that it drops an item) */ - public static boolean playerHarvestBlock(World world, Position pos, EntityPlayer player){ - Block block = pos.getBlock(world); - IBlockState state = pos.getBlockState(world); - int meta = pos.getMetadata(world); + public static boolean playerHarvestBlock(World world, BlockPos pos, EntityPlayer player){ + Block block = PosUtil.getBlock(pos, world); + IBlockState state = world.getBlockState(pos); + int meta = PosUtil.getMetadata(pos, world); + TileEntity tile = world.getTileEntity(pos); //If the Block can be harvested or not boolean canHarvest = block.canHarvestBlock(world, pos, player); @@ -396,7 +380,7 @@ public class WorldUtil{ if(!world.isRemote && !player.capabilities.isCreativeMode){ //Actually drops the Block's Items etc. if(canHarvest){ - block.harvestBlock(world, player, pos, state, pos.getTileEntity(world)); + block.harvestBlock(world, player, pos, state, tile); } //Only drop XP when no Silk Touch is applied if(!EnchantmentHelper.getSilkTouchModifier(player)){ From 92b9b7a844ddb28c4e7c2f0bdcda5fdf21a8b94e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 15:21:05 +0100 Subject: [PATCH 10/58] Some more "minor fixes", if you want to call it that. (I declare you completely nuts if you do, though.) --- .../mod/blocks/BlockAtomicReconstructor.java | 8 +++ .../mod/blocks/BlockBookletStand.java | 8 +++ .../mod/blocks/BlockBreaker.java | 7 ++ .../mod/blocks/BlockCoalGenerator.java | 8 +++ .../mod/blocks/BlockCoffeeMachine.java | 8 +++ .../mod/blocks/BlockColoredLamp.java | 7 ++ .../mod/blocks/BlockCrystal.java | 7 ++ .../mod/blocks/BlockDirectionalBreaker.java | 8 +++ .../mod/blocks/BlockDropper.java | 7 ++ .../mod/blocks/BlockFluidCollector.java | 8 +++ .../mod/blocks/BlockFurnaceDouble.java | 8 +++ .../mod/blocks/BlockGrinder.java | 7 ++ .../mod/blocks/BlockLampPowerer.java | 8 +++ .../mod/blocks/BlockLaserRelay.java | 8 +++ .../mod/blocks/BlockMisc.java | 7 ++ .../mod/blocks/BlockOilGenerator.java | 8 +++ .../mod/blocks/BlockSlabs.java | 8 +++ .../mod/blocks/BlockSmileyCloud.java | 7 ++ .../mod/blocks/BlockTreasureChest.java | 8 +++ .../mod/blocks/BlockWildPlant.java | 7 ++ .../mod/blocks/BlockXPSolidifier.java | 8 +++ .../mod/blocks/InitBlocks.java | 8 +-- .../mod/blocks/base/BlockBase.java | 12 ++-- .../mod/blocks/base/BlockBushBase.java | 13 ++-- .../mod/blocks/base/BlockContainerBase.java | 12 ++-- .../mod/blocks/base/BlockPlant.java | 4 +- .../mod/blocks/render/RenderInventory.java | 8 +-- .../mod/blocks/render/RenderLaserRelay.java | 36 +++++----- .../render/RenderReconstructorLens.java | 52 +++++++------- .../mod/blocks/render/RenderSmileyCloud.java | 67 +++++++++---------- .../mod/blocks/render/RenderTileEntity.java | 18 ++--- .../mod/blocks/render/model/ModelCompost.java | 4 +- .../blocks/render/model/ModelLaserRelay.java | 5 +- .../mod/booklet/GuiAAAchievements.java | 5 +- .../mod/booklet/GuiBooklet.java | 6 +- .../mod/booklet/button/BookmarkButton.java | 15 ++--- .../mod/booklet/button/IndexButton.java | 19 +++--- .../mod/booklet/button/TexturedButton.java | 11 ++- .../actuallyadditions/mod/event/HudEvent.java | 2 +- .../mod/inventory/gui/GuiBreaker.java | 4 +- .../mod/inventory/gui/GuiCanolaPress.java | 4 +- .../mod/inventory/gui/GuiCoalGenerator.java | 4 +- .../mod/inventory/gui/GuiCoffeeMachine.java | 4 +- .../mod/inventory/gui/GuiCrafter.java | 4 +- .../inventory/gui/GuiDirectionalBreaker.java | 4 +- .../mod/inventory/gui/GuiDrill.java | 4 +- .../mod/inventory/gui/GuiDropper.java | 4 +- .../mod/inventory/gui/GuiEnergizer.java | 4 +- .../mod/inventory/gui/GuiEnervator.java | 4 +- .../mod/inventory/gui/GuiFeeder.java | 4 +- .../inventory/gui/GuiFermentingBarrel.java | 4 +- .../mod/inventory/gui/GuiFluidCollector.java | 4 +- .../mod/inventory/gui/GuiFurnaceDouble.java | 4 +- .../mod/inventory/gui/GuiGiantChest.java | 4 +- .../mod/inventory/gui/GuiGrinder.java | 4 +- .../mod/inventory/gui/GuiInputter.java | 21 +++--- .../mod/inventory/gui/GuiMiner.java | 4 +- .../mod/inventory/gui/GuiOilGenerator.java | 4 +- .../mod/inventory/gui/GuiPhantomPlacer.java | 4 +- .../mod/inventory/gui/GuiRangedCollector.java | 4 +- .../mod/inventory/gui/GuiRepairer.java | 4 +- .../mod/inventory/gui/GuiSmileyCloud.java | 4 +- .../mod/inventory/gui/GuiXPSolidifier.java | 4 +- .../mod/misc/cloud/SmileyCloudEasterEggs.java | 32 ++++----- .../mod/misc/special/RenderSpecial.java | 24 +++---- .../mod/nei/NEIBookletRecipe.java | 6 +- .../mod/nei/NEICoffeeMachineRecipe.java | 4 +- .../mod/nei/NEICompostRecipe.java | 4 +- .../mod/nei/NEICrusherRecipe.java | 6 +- .../mod/nei/NEIFurnaceDoubleRecipe.java | 4 +- .../mod/nei/NEIHairyBallRecipe.java | 4 +- .../mod/nei/NEIReconstructorRecipe.java | 4 +- .../mod/nei/NEITreasureChestRecipe.java | 4 +- .../mod/tile/TileEntityLeafGenerator.java | 2 +- .../actuallyadditions/mod/util/AssetUtil.java | 21 +++--- .../actuallyadditions/mod/util/PosUtil.java | 12 ++-- .../actuallyadditions/mod/util/WorldUtil.java | 16 ++--- 77 files changed, 440 insertions(+), 273 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 4de761aea..bbf510513 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -20,6 +20,7 @@ import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; @@ -39,6 +40,8 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class BlockAtomicReconstructor extends BlockContainerBase implements IHudDisplay{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); + public BlockAtomicReconstructor(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -47,6 +50,11 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud this.setStepSound(soundTypeStone); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public EnumRarity getRarity(ItemStack stack){ return EnumRarity.EPIC; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java index 13c8abfc8..f8e5be1f1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java @@ -21,6 +21,7 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; @@ -37,6 +38,8 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class BlockBookletStand extends BlockContainerBase implements IHudDisplay{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); + public BlockBookletStand(String name){ super(Material.wood, name); this.setHarvestLevel("axe", 0); @@ -48,6 +51,11 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay this.setBlockBounds(f, 0F, f, 1F-f, 1F-4*f, 1F-f); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public int getRenderType(){ return AssetUtil.TESR_RENDER_ID; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java index 3668e1229..1077968f8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java @@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -31,6 +32,7 @@ import net.minecraft.world.World; public class BlockBreaker extends BlockContainerBase{ private boolean isPlacer; + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); public BlockBreaker(boolean isPlacer, String name){ super(Material.rock, name); @@ -41,6 +43,11 @@ public class BlockBreaker extends BlockContainerBase{ this.setStepSound(soundTypeStone); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public TileEntity createNewTileEntity(World world, int par2){ return this.isPlacer ? new TileEntityBreaker.TileEntityPlacer() : new TileEntityBreaker(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java index 7a0e7fdb1..7017e7e06 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java @@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; @@ -34,6 +35,8 @@ import java.util.Random; public class BlockCoalGenerator extends BlockContainerBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 1); + public BlockCoalGenerator(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -43,6 +46,11 @@ public class BlockCoalGenerator extends BlockContainerBase{ this.setTickRandomly(true); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public TileEntity createNewTileEntity(World world, int par2){ return new TileEntityCoalGenerator(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java index d4afda732..c27be20aa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java @@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -30,6 +31,8 @@ import net.minecraft.world.World; public class BlockCoffeeMachine extends BlockContainerBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); + public BlockCoffeeMachine(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -41,6 +44,11 @@ public class BlockCoffeeMachine extends BlockContainerBase{ this.setBlockBounds(f, 0F, f, 1F-f, 1F-2*f, 1F-f); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public int getRenderType(){ return AssetUtil.TESR_RENDER_ID; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java index fb709f589..628a63863 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java @@ -19,6 +19,7 @@ import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -39,6 +40,7 @@ import java.util.Random; public class BlockColoredLamp extends BlockBase{ public static TheColoredLampColors[] allLampTypes = TheColoredLampColors.values(); + private static final PropertyInteger META = PropertyInteger.create("meta", 0, allLampTypes.length-1); public boolean isOn; public BlockColoredLamp(boolean isOn, String name){ @@ -49,6 +51,11 @@ public class BlockColoredLamp extends BlockBase{ this.isOn = isOn; } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public Item getItemDropped(IBlockState state, Random rand, int par3){ return Item.getItemFromBlock(InitBlocks.blockColoredLamp); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java index 080174425..46a0263f5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java @@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; @@ -31,6 +32,7 @@ import java.util.List; public class BlockCrystal extends BlockBase{ public static final TheCrystals[] allCrystals = TheCrystals.values(); + private static final PropertyInteger META = PropertyInteger.create("meta", 0, allCrystals.length-1); public BlockCrystal(String name){ super(Material.rock, name); @@ -39,6 +41,11 @@ public class BlockCrystal extends BlockBase{ this.setHarvestLevel("pickaxe", 1); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public int damageDropped(IBlockState state){ return this.getMetaFromState(state); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java index 0dc6cfc1b..0082f798a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java @@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -30,6 +31,8 @@ import net.minecraft.world.World; public class BlockDirectionalBreaker extends BlockContainerBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); + public BlockDirectionalBreaker(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -38,6 +41,11 @@ public class BlockDirectionalBreaker extends BlockContainerBase{ this.setStepSound(soundTypeStone); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public TileEntity createNewTileEntity(World world, int par2){ return new TileEntityDirectionalBreaker(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java index 686d4fbf5..67e26bea4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java @@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -29,6 +30,8 @@ import net.minecraft.world.World; public class BlockDropper extends BlockContainerBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); + public BlockDropper(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -36,6 +39,10 @@ public class BlockDropper extends BlockContainerBase{ this.setResistance(10.0F); this.setStepSound(soundTypeStone); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } @Override public TileEntity createNewTileEntity(World world, int par2){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java index b72624706..84fb63f54 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java @@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -30,6 +31,8 @@ import net.minecraft.world.World; public class BlockFluidCollector extends BlockContainerBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); + private boolean isPlacer; public BlockFluidCollector(boolean isPlacer, String name){ @@ -41,6 +44,11 @@ public class BlockFluidCollector extends BlockContainerBase{ this.setStepSound(soundTypeStone); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public TileEntity createNewTileEntity(World world, int par2){ return this.isPlacer ? new TileEntityFluidCollector.TileEntityFluidPlacer() : new TileEntityFluidCollector(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java index fcb732c2c..1b44fe834 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java @@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -36,6 +37,8 @@ import java.util.Random; public class BlockFurnaceDouble extends BlockContainerBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 7); + public BlockFurnaceDouble(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -45,6 +48,11 @@ public class BlockFurnaceDouble extends BlockContainerBase{ this.setTickRandomly(true); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public TileEntity createNewTileEntity(World world, int par2){ return new TileEntityFurnaceDouble(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java index 1f20a8862..fc2805758 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java @@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; @@ -35,6 +36,7 @@ import java.util.Random; public class BlockGrinder extends BlockContainerBase{ private final boolean isDouble; + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 1); public BlockGrinder(boolean isDouble, String name){ super(Material.rock, name); @@ -46,6 +48,11 @@ public class BlockGrinder extends BlockContainerBase{ this.setTickRandomly(true); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public TileEntity createNewTileEntity(World world, int par2){ return this.isDouble ? new TileEntityGrinder.TileEntityGrinderDouble() : new TileEntityGrinder(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java index 2fb4d56d3..710afc2dd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java @@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.EnumRarity; @@ -26,6 +27,8 @@ import net.minecraft.world.World; public class BlockLampPowerer extends BlockBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); + public BlockLampPowerer(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -34,6 +37,11 @@ public class BlockLampPowerer extends BlockBase{ this.setStepSound(soundTypeStone); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock){ this.updateLamp(world, pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index 9849619e0..73d95fa11 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -31,6 +32,8 @@ import java.util.List; public class BlockLaserRelay extends BlockContainerBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); + public BlockLaserRelay(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -39,6 +42,11 @@ public class BlockLaserRelay extends BlockContainerBase{ this.setStepSound(soundTypeStone); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public void addCollisionBoxesToList(World world, BlockPos pos, IBlockState state, AxisAlignedBB axis, List list, Entity entity){ this.setBlockBoundsBasedOnState(world, pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java index bf0131bd9..52106f979 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java @@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; @@ -29,6 +30,7 @@ import java.util.List; public class BlockMisc extends BlockBase{ public static final TheMiscBlocks[] allMiscBlocks = TheMiscBlocks.values(); + private static final PropertyInteger META = PropertyInteger.create("meta", 0, allMiscBlocks.length-1); public BlockMisc(String name){ super(Material.rock, name); @@ -37,6 +39,11 @@ public class BlockMisc extends BlockBase{ this.setHarvestLevel("pickaxe", 1); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public int damageDropped(IBlockState state){ return this.getMetaFromState(state); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java index 4b4c0e2c8..fe4a88625 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java @@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; @@ -34,6 +35,8 @@ import java.util.Random; public class BlockOilGenerator extends BlockContainerBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 1); + public BlockOilGenerator(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -43,6 +46,11 @@ public class BlockOilGenerator extends BlockContainerBase{ this.setTickRandomly(true); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public TileEntity createNewTileEntity(World world, int par2){ return new TileEntityOilGenerator(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java index d81f82da5..29d1da66f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java @@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.Block; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -37,6 +38,8 @@ public class BlockSlabs extends BlockBase{ this(name, fullBlock, 0); } + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 1); + public BlockSlabs(String name, Block fullBlock, int meta){ super(fullBlock.getMaterial(), name); this.setHardness(1.5F); @@ -45,6 +48,11 @@ public class BlockSlabs extends BlockBase{ this.meta = meta; } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public void addCollisionBoxesToList(World world, BlockPos pos, IBlockState state, AxisAlignedBB axis, List list, Entity entity){ this.setBlockBoundsBasedOnState(world, pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java index 1c1687ed6..2c732a07e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java @@ -20,6 +20,7 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -38,6 +39,8 @@ import java.util.Random; public class BlockSmileyCloud extends BlockContainerBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); + public BlockSmileyCloud(String name){ super(Material.cloth, name); this.setHardness(0.5F); @@ -45,6 +48,10 @@ public class BlockSmileyCloud extends BlockContainerBase{ this.setStepSound(soundTypeCloth); this.setTickRandomly(true); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } @Override public int getRenderType(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java index ec3bfed7a..d8eed6bc5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java @@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; @@ -34,6 +35,8 @@ import java.util.Random; public class BlockTreasureChest extends BlockBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); + public BlockTreasureChest(String name){ super(Material.wood, name); this.setHarvestLevel("axe", 0); @@ -43,6 +46,11 @@ public class BlockTreasureChest extends BlockBase{ this.setTickRandomly(true); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index 30a94f885..0174093bc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -19,6 +19,7 @@ import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -37,12 +38,18 @@ import java.util.List; public class BlockWildPlant extends BlockBushBase{ public static final TheWildPlants[] allWildPlants = TheWildPlants.values(); + private static final PropertyInteger META = PropertyInteger.create("meta", 0, allWildPlants.length-1); public BlockWildPlant(String name){ super(name); this.setStepSound(soundTypeGrass); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public boolean canBlockStay(World world, BlockPos pos, IBlockState state){ BlockPos offset = PosUtil.offset(pos, 0, -1, 0); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java index 56618d060..b9fc6797d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java @@ -19,6 +19,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; @@ -33,6 +34,8 @@ import net.minecraft.world.World; public class BlockXPSolidifier extends BlockContainerBase{ + private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); + public BlockXPSolidifier(String name){ super(Material.rock, name); this.setHarvestLevel("pickaxe", 0); @@ -41,6 +44,11 @@ public class BlockXPSolidifier extends BlockContainerBase{ this.setStepSound(soundTypeStone); } + @Override + protected PropertyInteger getMetaProperty(){ + return META; + } + @Override public TileEntity createNewTileEntity(World world, int par2){ return new TileEntityXPSolidifier(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java index 4c791c41a..54f252f67 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java @@ -162,13 +162,13 @@ public class InitBlocks{ blockCoalGenerator = new BlockCoalGenerator("blockCoalGenerator"); blockOilGenerator = new BlockOilGenerator("blockOilGenerator"); blockFermentingBarrel = new BlockFermentingBarrel("blockFermentingBarrel"); - blockRice = new BlockPlant("blockRice", 6, 1, 2); + blockRice = new BlockPlant("blockRice", 1, 2); CompatUtil.registerMFRPlant(blockRice); - blockCanola = new BlockPlant("blockCanola", 4, 5, 5); + blockCanola = new BlockPlant("blockCanola", 5, 5); CompatUtil.registerMFRPlant(blockCanola); - blockFlax = new BlockPlant("blockFlax", 6, 2, 4); + blockFlax = new BlockPlant("blockFlax", 2, 4); CompatUtil.registerMFRPlant(blockFlax); - blockCoffee = new BlockPlant("blockCoffee", 6, 2, 2); + blockCoffee = new BlockPlant("blockCoffee", 2, 2); CompatUtil.registerMFRPlant(blockCoffee); blockCompost = new BlockCompost("blockCompost"); blockMisc = new BlockMisc("blockMisc"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java index 25cc4c1c0..8b278af9b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java @@ -12,9 +12,9 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; @@ -61,16 +61,20 @@ public class BlockBase extends Block{ @Override protected BlockState createBlockState(){ - return new BlockState(this, PosUtil.META); + return this.getMetaProperty() == null ? super.createBlockState() : new BlockState(this, this.getMetaProperty()); } @Override public IBlockState getStateFromMeta(int meta){ - return getDefaultState().withProperty(PosUtil.META, meta); + return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); } @Override public int getMetaFromState(IBlockState state){ - return state.getValue(PosUtil.META); + return this.getMetaProperty() == null ? super.getMetaFromState(state) : state.getValue(this.getMetaProperty()); + } + + protected PropertyInteger getMetaProperty(){ + return null; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java index 1f459215c..58c407a74 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java @@ -12,8 +12,8 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.BlockBush; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; @@ -25,7 +25,6 @@ public class BlockBushBase extends BlockBush{ private String name; public BlockBushBase(String name){ - this.setStepSound(soundTypeGrass); this.name = name; this.register(); @@ -60,16 +59,20 @@ public class BlockBushBase extends BlockBush{ @Override protected BlockState createBlockState(){ - return new BlockState(this, PosUtil.META); + return this.getMetaProperty() == null ? super.createBlockState() : new BlockState(this, this.getMetaProperty()); } @Override public IBlockState getStateFromMeta(int meta){ - return getDefaultState().withProperty(PosUtil.META, meta); + return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); } @Override public int getMetaFromState(IBlockState state){ - return state.getValue(PosUtil.META); + return this.getMetaProperty() == null ? super.getMetaFromState(state) : state.getValue(this.getMetaProperty()); + } + + protected PropertyInteger getMetaProperty(){ + return null; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index 91288deb7..1107eba4e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -13,12 +13,12 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockRedstoneTorch; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; @@ -262,16 +262,20 @@ public abstract class BlockContainerBase extends BlockContainer{ @Override protected BlockState createBlockState(){ - return new BlockState(this, PosUtil.META); + return this.getMetaProperty() == null ? super.createBlockState() : new BlockState(this, this.getMetaProperty()); } @Override public IBlockState getStateFromMeta(int meta){ - return getDefaultState().withProperty(PosUtil.META, meta); + return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); } @Override public int getMetaFromState(IBlockState state){ - return state.getValue(PosUtil.META); + return this.getMetaProperty() == null ? super.getMetaFromState(state) : state.getValue(this.getMetaProperty()); + } + + protected PropertyInteger getMetaProperty(){ + return null; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java index 34a7de202..2fe64985b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java @@ -30,14 +30,12 @@ public class BlockPlant extends BlockCrops{ public Item seedItem; public Item returnItem; public int returnMeta; - private int stages; private String name; private int minDropAmount; private int addDropAmount; - public BlockPlant(String name, int stages, int minDropAmount, int addDropAmount){ + public BlockPlant(String name, int minDropAmount, int addDropAmount){ this.name = name; - this.stages = stages; this.minDropAmount = minDropAmount; this.addDropAmount = addDropAmount; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java index 1c23efebf..a24babb8f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java @@ -23,12 +23,12 @@ public class RenderInventory{ /*@Override public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer){ - GL11.glPushMatrix(); + GlStateManager.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(this.tileRender.resLoc); - GL11.glTranslatef(0F, 1F, 0F); - GL11.glRotatef(180F, 1F, 0F, 0F); + GlStateManager.glTranslatef(0F, 1F, 0F); + GlStateManager.glRotatef(180F, 1F, 0F, 0F); this.tileRender.theModel.render(0.0625F); - GL11.glPopMatrix(); + GlStateManager.glPopMatrix(); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java index 7772c5bbd..1df707eaf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java @@ -12,8 +12,8 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; import de.ellpeck.actuallyadditions.mod.util.PosUtil; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.tileentity.TileEntity; -import org.lwjgl.opengl.GL11; public class RenderLaserRelay extends RenderTileEntity{ @@ -24,38 +24,38 @@ public class RenderLaserRelay extends RenderTileEntity{ @Override public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int par6){ - GL11.glPushMatrix(); - GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glTranslatef(0.0F, -2.0F, 0.0F); + GlStateManager.pushMatrix(); + GlStateManager.translate((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.translate(0.0F, -2.0F, 0.0F); this.bindTexture(resLoc); int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); if(meta == 0){ - GL11.glRotatef(180F, 1F, 0F, 0F); - GL11.glTranslatef(0F, -2F, 0F); + GlStateManager.rotate(180F, 1F, 0F, 0F); + GlStateManager.translate(0F, -2F, 0F); } else if(meta == 3){ - GL11.glRotatef(-90, 1F, 0F, 0F); - GL11.glTranslatef(0F, -1F, 1F); + GlStateManager.rotate(-90, 1F, 0F, 0F); + GlStateManager.translate(0F, -1F, 1F); } else if(meta == 2){ - GL11.glRotatef(90, 1F, 0F, 0F); - GL11.glTranslatef(0F, -1F, -1F); + GlStateManager.rotate(90, 1F, 0F, 0F); + GlStateManager.translate(0F, -1F, -1F); } else if(meta == 4){ - GL11.glRotatef(90, 0F, 0F, 1F); - GL11.glTranslatef(1F, -1F, 0F); + GlStateManager.rotate(90, 0F, 0F, 1F); + GlStateManager.translate(1F, -1F, 0F); } else if(meta == 5){ - GL11.glRotatef(90, 0F, 0F, -1F); - GL11.glTranslatef(-1F, -1F, 0F); + GlStateManager.rotate(90, 0F, 0F, -1F); + GlStateManager.translate(-1F, -1F, 0F); } - GL11.glScalef(0.85F, 0.85F, 0.85F); - GL11.glTranslatef(0F, 0.2657F, 0F); + GlStateManager.scale(0.85F, 0.85F, 0.85F); + GlStateManager.translate(0F, 0.2657F, 0F); theModel.render(0.0625F); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java index bc22f0397..92b0645a4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java @@ -15,10 +15,10 @@ import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import org.lwjgl.opengl.GL11; public class RenderReconstructorLens extends TileEntitySpecialRenderer{ @@ -30,48 +30,48 @@ public class RenderReconstructorLens extends TileEntitySpecialRenderer{ ItemStack stack = ((TileEntityAtomicReconstructor)tile).getStackInSlot(0); if(stack != null && stack.getItem() instanceof ILensItem){ - GL11.glPushMatrix(); - GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.pushMatrix(); + GlStateManager.translate((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); if(meta == 0){ - GL11.glTranslatef(0F, -0.5F, 0F); - GL11.glTranslatef(-0.25F, 0F, -0.25F); - GL11.glRotatef(90F, 1F, 0F, 0F); + GlStateManager.translate(0F, -0.5F, 0F); + GlStateManager.translate(-0.25F, 0F, -0.25F); + GlStateManager.rotate(90F, 1F, 0F, 0F); } if(meta == 1){ - GL11.glTranslatef(0F, -1.5F-0.5F/16F, 0F); - GL11.glTranslatef(-0.25F, 0F, -0.25F); - GL11.glRotatef(90F, 1F, 0F, 0F); + GlStateManager.translate(0F, -1.5F-0.5F/16F, 0F); + GlStateManager.translate(-0.25F, 0F, -0.25F); + GlStateManager.rotate(90F, 1F, 0F, 0F); } if(meta == 2){ - GL11.glTranslatef(0F, -1F, 0F); - GL11.glTranslatef(0F, 0F, -0.5F); - GL11.glTranslatef(-0.25F, -0.25F, 0F); + GlStateManager.translate(0F, -1F, 0F); + GlStateManager.translate(0F, 0F, -0.5F); + GlStateManager.translate(-0.25F, -0.25F, 0F); } if(meta == 3){ - GL11.glTranslatef(0F, -1F, 0F); - GL11.glTranslatef(0F, 0F, 0.5F+0.5F/16F); - GL11.glTranslatef(-0.25F, -0.25F, 0F); + GlStateManager.translate(0F, -1F, 0F); + GlStateManager.translate(0F, 0F, 0.5F+0.5F/16F); + GlStateManager.translate(-0.25F, -0.25F, 0F); } if(meta == 4){ - GL11.glTranslatef(0F, -1F, 0F); - GL11.glTranslatef(0.5F+0.5F/16F, 0F, 0F); - GL11.glTranslatef(0F, -0.25F, 0.25F); - GL11.glRotatef(90F, 0F, 1F, 0F); + GlStateManager.translate(0F, -1F, 0F); + GlStateManager.translate(0.5F+0.5F/16F, 0F, 0F); + GlStateManager.translate(0F, -0.25F, 0.25F); + GlStateManager.rotate(90F, 0F, 1F, 0F); } if(meta == 5){ - GL11.glTranslatef(0F, -1F, 0F); - GL11.glTranslatef(-0.5F, 0F, 0F); - GL11.glTranslatef(0F, -0.25F, 0.25F); - GL11.glRotatef(90F, 0F, 1F, 0F); + GlStateManager.translate(0F, -1F, 0F); + GlStateManager.translate(-0.5F, 0F, 0F); + GlStateManager.translate(0F, -0.25F, 0.25F); + GlStateManager.rotate(90F, 0F, 1F, 0F); } - GL11.glScalef(0.5F, 0.5F, 0.5F); + GlStateManager.scale(0.5F, 0.5F, 0.5F); AssetUtil.renderItemInWorld(stack, 0); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java index 7181ce7a5..180784f49 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java @@ -19,10 +19,9 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class RenderSmileyCloud extends RenderTileEntity{ @@ -39,7 +38,7 @@ public class RenderSmileyCloud extends RenderTileEntity{ } TileEntitySmileyCloud theCloud = (TileEntitySmileyCloud)tile; - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); { if(theCloud.flyHeight == 0){ theCloud.flyHeight = tile.getWorld().rand.nextInt(30)+30; @@ -53,28 +52,28 @@ public class RenderSmileyCloud extends RenderTileEntity{ } if(time-(bobHeight/2) >= theCloud.lastFlyHeight){ - GL11.glTranslated(0, (time-theCloud.lastFlyHeight)/300, 0); + GlStateManager.translate(0, (time-theCloud.lastFlyHeight)/300, 0); } else{ - GL11.glTranslated(0, -(time-theCloud.lastFlyHeight)/300+(double)bobHeight/300, 0); + GlStateManager.translate(0, -(time-theCloud.lastFlyHeight)/300+(double)bobHeight/300, 0); } - GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glTranslatef(0.0F, -2F, 0.0F); + GlStateManager.translate((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.translate(0.0F, -2F, 0.0F); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); { if(theModel.doesRotate()){ int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); if(meta == 0){ - GL11.glRotatef(180F, 0F, 1F, 0F); + GlStateManager.rotate(180F, 0F, 1F, 0F); } if(meta == 1){ - GL11.glRotatef(90F, 0F, 1F, 0F); + GlStateManager.rotate(90F, 0F, 1F, 0F); } if(meta == 3){ - GL11.glRotatef(270F, 0F, 1F, 0F); + GlStateManager.rotate(270F, 0F, 1F, 0F); } } @@ -103,28 +102,28 @@ public class RenderSmileyCloud extends RenderTileEntity{ } } } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); if(theCloud.name != null && !theCloud.name.isEmpty() && !Minecraft.getMinecraft().gameSettings.hideGUI){ - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); { - GL11.glTranslatef(0F, 0.1F, 0F); - GL11.glRotatef(180F, 1F, 0F, 0F); - GL11.glRotatef(180F, 0F, 1F, 0F); + GlStateManager.translate(0F, 0.1F, 0F); + GlStateManager.rotate(180F, 1F, 0F, 0F); + GlStateManager.rotate(180F, 0F, 1F, 0F); - GL11.glRotatef(-Minecraft.getMinecraft().getRenderManager().playerViewY, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(Minecraft.getMinecraft().getRenderManager().playerViewX, 1.0F, 0.0F, 0.0F); + GlStateManager.rotate(-Minecraft.getMinecraft().getRenderManager().playerViewY, 0.0F, 1.0F, 0.0F); + GlStateManager.rotate(Minecraft.getMinecraft().getRenderManager().playerViewX, 1.0F, 0.0F, 0.0F); float f = 1.6F; float f1 = 0.016666668F*f; - GL11.glScalef(-f1, -f1, f1); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glTranslatef(0.0F, 0F/f1, 0.0F); - GL11.glDepthMask(false); - GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); + GlStateManager.scale(-f1, -f1, f1); + GlStateManager.disableLighting(); + GlStateManager.translate(0.0F, 0F/f1, 0.0F); + GlStateManager.depthMask(false); + GlStateManager.enableBlend(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); //TODO Fix nameplate with Smiley Cloud /*Tessellator tessellator = Tessellator.getInstance(); - GL11.glDisable(GL11.GL_TEXTURE_2D); + GlStateManager.glDisable(GlStateManager.GL_TEXTURE_2D); tessellator.startDrawingQuads(); int i = Minecraft.getMinecraft().fontRendererObj.getStringWidth(theCloud.name)/2; tessellator.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F); @@ -133,20 +132,20 @@ public class RenderSmileyCloud extends RenderTileEntity{ tessellator.addVertex(i+1, 8.0D, 0.0D); tessellator.addVertex(i+1, -1.0D, 0.0D); tessellator.draw(); - GL11.glEnable(GL11.GL_TEXTURE_2D);*/ - GL11.glDepthMask(true); + GlStateManager.glEnable(GlStateManager.GL_TEXTURE_2D);*/ + GlStateManager.depthMask(true); Minecraft.getMinecraft().fontRendererObj.drawString(theCloud.name, -Minecraft.getMinecraft().fontRendererObj.getStringWidth(theCloud.name)/2, 0, StringUtil.DECIMAL_COLOR_WHITE); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_BLEND); - GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glScalef(1F/-f1, 1F/-f1, 1F/f1); + GlStateManager.enableLighting(); + GlStateManager.disableBlend(); + GlStateManager.color(1F, 1F, 1F, 1F); + GlStateManager.scale(1F/-f1, 1F/-f1, 1F/f1); } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java index 1d4212aa9..fa0e46756 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java @@ -13,10 +13,10 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class RenderTileEntity extends TileEntitySpecialRenderer{ @@ -30,29 +30,29 @@ public class RenderTileEntity extends TileEntitySpecialRenderer{ @Override public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int i){ - GL11.glPushMatrix(); - GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glTranslatef(0.0F, -2.0F, 0.0F); + GlStateManager.pushMatrix(); + GlStateManager.translate((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.translate(0.0F, -2.0F, 0.0F); this.bindTexture(resLoc); if(theModel.doesRotate()){ int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); if(meta == 0){ - GL11.glRotatef(180F, 0F, 1F, 0F); + GlStateManager.rotate(180F, 0F, 1F, 0F); } if(meta == 1){ - GL11.glRotatef(90F, 0F, 1F, 0F); + GlStateManager.rotate(90F, 0F, 1F, 0F); } if(meta == 3){ - GL11.glRotatef(270F, 0F, 1F, 0F); + GlStateManager.rotate(270F, 0F, 1F, 0F); } } theModel.render(0.0625F); theModel.renderExtra(0.0625F, tile); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java index c47e49adb..9804bf28d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java @@ -14,9 +14,9 @@ import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import org.lwjgl.opengl.GL11; public class ModelCompost extends ModelBaseAA{ @@ -76,7 +76,7 @@ public class ModelCompost extends ModelBaseAA{ public void renderExtra(float f, TileEntity tile){ //Hehe if("ShadowfactsDev".equals(Minecraft.getMinecraft().thePlayer.getName())){ - GL11.glTranslatef(0F, 1F, 0F); + GlStateManager.translate(0F, 1F, 0F); } if(tile instanceof TileEntityCompost){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelLaserRelay.java index 520ddcfd3..d44cce4ea 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelLaserRelay.java @@ -11,6 +11,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.render.model; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import org.lwjgl.opengl.GL11; /** @@ -153,8 +154,8 @@ public class ModelLaserRelay extends ModelBaseAA{ @Override public void render(float f){ - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.enableBlend(); + GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); bottom.render(f); laserPillar.render(f); laserBase.render(f); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java index 571fc71a1..82e10c8a6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.booklet; import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements; -import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.achievement.GuiAchievements; import net.minecraft.stats.StatFileWriter; @@ -24,12 +23,12 @@ public class GuiAAAchievements extends GuiAchievements{ public GuiAAAchievements(GuiScreen screen, StatFileWriter writer){ super(screen, writer); - ReflectionHelper.setPrivateValue(GuiAchievements.class, this, InitAchievements.pageNumber, 21); + ReflectionHelper.setPrivateValue(GuiAchievements.class, this, InitAchievements.pageNumber, 20); } @Override public void initGui(){ super.initGui(); - ((GuiButton)buttonList.get(1)).displayString = InitAchievements.theAchievementPage.getName(); + this.buttonList.get(1).displayString = InitAchievements.theAchievementPage.getName(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java index 0b0305463..3b79372c7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java @@ -32,6 +32,7 @@ import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; @@ -40,7 +41,6 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.GL11; import java.io.IOException; import java.util.ArrayList; @@ -118,10 +118,10 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ //So don't fuck with everything unintentionally // //(This fixes your fuckery) - GL11.glScalef(1.0F, 1.0F, 1.0F); + GlStateManager.scale(1.0F, 1.0F, 1.0F); //Draws the Background - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(ClientProxy.jingleAllTheWay ? resLocChristmas : (ClientProxy.pumpkinBlurPumpkinBlur ? resLocHalloween : (ClientProxy.bulletForMyValentine ? resLocValentine : resLoc))); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java index bdbf2c783..8107e6119 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java @@ -18,10 +18,9 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.KeyUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import org.lwjgl.opengl.GL11; import java.util.ArrayList; @@ -57,24 +56,24 @@ public class BookmarkButton extends GuiButton{ public void drawButton(Minecraft minecraft, int x, int y){ if(this.visible){ minecraft.getTextureManager().bindTexture(GuiBooklet.resLoc); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; int k = this.getHoverState(this.hovered); if(k == 0){ k = 1; } - GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.enableBlend(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + GlStateManager.blendFunc(770, 771); int renderHeight = 25; this.drawTexturedModalRect(this.xPosition, this.yPosition, 146+(this.assignedEntry.entry == null ? 0 : 16), 194-renderHeight+k*renderHeight, this.width, renderHeight); this.mouseDragged(minecraft, x, y); if(this.assignedEntry.entry != null){ - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); AssetUtil.renderStackToGui(this.assignedEntry.chapter != null && this.assignedEntry.chapter.getDisplayItemStack() != null ? this.assignedEntry.chapter.getDisplayItemStack() : new ItemStack(InitItems.itemBooklet), this.xPosition+2, this.yPosition+1, 0.725F); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java index 1a3566f20..0767fd902 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java @@ -15,8 +15,7 @@ import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.renderer.OpenGlHelper; -import org.lwjgl.opengl.GL11; +import net.minecraft.client.renderer.GlStateManager; public class IndexButton extends GuiButton{ @@ -31,27 +30,27 @@ public class IndexButton extends GuiButton{ @Override public void drawButton(Minecraft minecraft, int mouseX, int mouseY){ if(this.visible){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition+this.width && mouseY < this.yPosition+this.height; - GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.enableBlend(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + GlStateManager.blendFunc(770, 771); this.mouseDragged(minecraft, mouseX, mouseY); int textOffsetX = 0; if(this.chap != null){ if(this.chap.getDisplayItemStack() != null){ - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); AssetUtil.renderStackToGui(this.chap.getDisplayItemStack(), this.xPosition-4, this.yPosition, 0.725F); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); textOffsetX = 10; } } if(this.hovered){ - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); AssetUtil.drawHorizontalGradientRect(this.xPosition+textOffsetX-1, this.yPosition+this.height-1, this.xPosition+this.gui.getFontRenderer().getStringWidth(this.displayString)+textOffsetX+1, this.yPosition+this.height, 0x80 << 24 | 22271, 22271, this.zLevel); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } this.gui.getFontRenderer().drawString(this.displayString, this.xPosition+textOffsetX, this.yPosition+(this.height-8)/2, 0); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java index 6a19b422a..b185df808 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/TexturedButton.java @@ -13,8 +13,7 @@ package de.ellpeck.actuallyadditions.mod.booklet.button; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.renderer.OpenGlHelper; -import org.lwjgl.opengl.GL11; +import net.minecraft.client.renderer.GlStateManager; import java.util.ArrayList; import java.util.List; @@ -47,16 +46,16 @@ public class TexturedButton extends GuiButton{ public void drawButton(Minecraft minecraft, int x, int y){ if(this.visible){ minecraft.getTextureManager().bindTexture(GuiBooklet.resLoc); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; int k = this.getHoverState(this.hovered); if(k == 0){ k = 1; } - GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.enableBlend(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + GlStateManager.blendFunc(770, 771); this.drawTexturedModalRect(this.xPosition, this.yPosition, this.texturePosX, this.texturePosY-this.height+k*this.height, this.width, this.height); this.mouseDragged(minecraft, x, y); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java index a55d44217..359e4e2d3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java @@ -51,7 +51,7 @@ public class HudEvent{ } } - if(posHit != null){ + if(posHit != null && posHit.getBlockPos() != null){ Block blockHit = PosUtil.getBlock(posHit.getBlockPos(), minecraft.theWorld); TileEntity tileHit = minecraft.theWorld.getTileEntity(posHit.getBlockPos()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java index d8d11cbf9..413ff5cb3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class GuiBreaker extends GuiContainer{ @@ -46,7 +46,7 @@ public class GuiBreaker extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java index 70f2674da..8594f6447 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java @@ -16,11 +16,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -58,7 +58,7 @@ public class GuiCanolaPress extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java index 0a99e1521..a0d541a9d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -52,7 +52,7 @@ public class GuiCoalGenerator extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java index 7e43650ee..9991570ec 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java @@ -21,12 +21,12 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -86,7 +86,7 @@ public class GuiCoffeeMachine extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java index 94a5a3cf5..e66956e1b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java @@ -14,11 +14,11 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerCrafter; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class GuiCrafter extends GuiContainer{ @@ -39,7 +39,7 @@ public class GuiCrafter extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java index 38ce8c9d8..f3dacb552 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -53,7 +53,7 @@ public class GuiDirectionalBreaker extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java index 1b54f1b7f..fce51af26 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java @@ -14,11 +14,11 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class GuiDrill extends GuiContainer{ @@ -38,7 +38,7 @@ public class GuiDrill extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+54, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java index 01dd3340e..a015c2eef 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class GuiDropper extends GuiContainer{ @@ -46,7 +46,7 @@ public class GuiDropper extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java index 6e3b08246..57e370a46 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -52,7 +52,7 @@ public class GuiEnergizer extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java index 18bc7a47c..866c82aa0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -52,7 +52,7 @@ public class GuiEnervator extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java index b37f9943a..7e60a3795 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java @@ -17,11 +17,11 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Arrays; @@ -54,7 +54,7 @@ public class GuiFeeder extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+70, 0, 0, 176, 86); this.mc.getTextureManager().bindTexture(resLoc); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java index dedf85855..543f88437 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java @@ -16,11 +16,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -59,7 +59,7 @@ public class GuiFermentingBarrel extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java index e8149e7cd..bf3aedf77 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java @@ -16,11 +16,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -54,7 +54,7 @@ public class GuiFluidCollector extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java index 239c8e7db..a821f0a28 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -52,7 +52,7 @@ public class GuiFurnaceDouble extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java index 15a04b4e5..87acd5918 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class GuiGiantChest extends GuiContainer{ @@ -43,7 +43,7 @@ public class GuiGiantChest extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 242, 190); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java index 71479c992..e6436a084 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGrinder.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -59,7 +59,7 @@ public class GuiGrinder extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java index 0894a035e..ba72bc1ff 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiInputter.java @@ -23,7 +23,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; @@ -31,7 +31,6 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; -import org.lwjgl.opengl.GL11; import java.io.IOException; import java.util.ArrayList; @@ -165,7 +164,7 @@ public class GuiInputter extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93+(isAdvanced ? OFFSET_ADVANCED : 0), 0, 0, 176, 86); @@ -282,12 +281,12 @@ public class GuiInputter extends GuiContainer{ public void drawButton(Minecraft mc, int x, int y){ if(this.visible){ mc.getTextureManager().bindTexture(resLoc); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; int k = this.getHoverState(this.hovered); - GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.enableBlend(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + GlStateManager.blendFunc(770, 771); this.drawTexturedModalRect(this.xPosition, this.yPosition, 176, k*16, 16, 16); this.mouseDragged(mc, x, y); @@ -319,12 +318,12 @@ public class GuiInputter extends GuiContainer{ public void drawButton(Minecraft mc, int x, int y){ if(this.visible){ mc.getTextureManager().bindTexture(resLoc); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; int k = this.getHoverState(this.hovered); - GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.enableBlend(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + GlStateManager.blendFunc(770, 771); this.drawTexturedModalRect(this.xPosition, this.yPosition, 192, k*8, 8, 8); this.mouseDragged(mc, x, y); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java index 84df01c20..f3ab98257 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java @@ -20,11 +20,11 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class GuiMiner extends GuiContainer{ @@ -63,7 +63,7 @@ public class GuiMiner extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java index 70f8657e4..93dee8c80 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java @@ -16,11 +16,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -57,7 +57,7 @@ public class GuiOilGenerator extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java index 2e0b64395..58b2a48ef 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class GuiPhantomPlacer extends GuiContainer{ @@ -46,7 +46,7 @@ public class GuiPhantomPlacer extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java index c23db71ec..feb847d8a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java @@ -21,12 +21,12 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -83,7 +83,7 @@ public class GuiRangedCollector extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+86, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java index c6d823914..6af9383b3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java @@ -15,11 +15,11 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -52,7 +52,7 @@ public class GuiRepairer extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java index 0bbb47a59..3ec364c7b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java @@ -21,13 +21,13 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; -import org.lwjgl.opengl.GL11; import java.io.IOException; @@ -82,7 +82,7 @@ public class GuiSmileyCloud extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java index 02b7a52f9..ef38f3511 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java @@ -20,12 +20,12 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class GuiXPSolidifier extends GuiContainer{ @@ -86,7 +86,7 @@ public class GuiXPSolidifier extends GuiContainer{ @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/cloud/SmileyCloudEasterEggs.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/cloud/SmileyCloudEasterEggs.java index b7176bb7c..a9d33c467 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/cloud/SmileyCloudEasterEggs.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/cloud/SmileyCloudEasterEggs.java @@ -16,10 +16,10 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.Block; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; import java.util.ArrayList; @@ -377,30 +377,30 @@ public class SmileyCloudEasterEggs{ } private static void renderHoldingItem(boolean leftHand, ItemStack stack){ - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); - GL11.glRotatef(180F, 0F, 0F, 1F); - GL11.glRotatef(270F, 0F, 1F, 0F); - GL11.glTranslatef(0F, -1.5F, 0F); - GL11.glTranslatef(-0.5F, 0.2F, leftHand ? 0.55F : -0.5F); - GL11.glScalef(0.75F, 0.75F, 0.75F); + GlStateManager.rotate(180F, 0F, 0F, 1F); + GlStateManager.rotate(270F, 0F, 1F, 0F); + GlStateManager.translate(0F, -1.5F, 0F); + GlStateManager.translate(-0.5F, 0.2F, leftHand ? 0.55F : -0.5F); + GlStateManager.scale(0.75F, 0.75F, 0.75F); AssetUtil.renderItemInWorld(stack, 0); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private static void renderHeadBlock(Block block, int meta, float rotation){ - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glTranslatef(-0.015F, 0.6F, 0.075F); - GL11.glScalef(0.3F, 0.3F, 0.3F); - GL11.glRotatef(180F, 1F, 0F, 0F); - GL11.glRotatef(rotation, 0F, 1F, 0F); + GlStateManager.pushMatrix(); + GlStateManager.disableLighting(); + GlStateManager.translate(-0.015F, 0.6F, 0.075F); + GlStateManager.scale(0.3F, 0.3F, 0.3F); + GlStateManager.rotate(180F, 1F, 0F, 0F); + GlStateManager.rotate(rotation, 0F, 1F, 0F); AssetUtil.renderBlockInWorld(block, meta); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.enableLighting(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java index aca9ab153..c22f3a5e3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java @@ -14,12 +14,12 @@ import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EnumPlayerModelParts; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; import java.util.Calendar; @@ -55,33 +55,33 @@ public class RenderSpecial{ this.lastTimeForBobbing = time; } - GL11.glPushMatrix(); - GL11.glTranslated(0D, -0.775D+offsetUp, 0D); - GL11.glRotatef(180F, 1.0F, 0.0F, 1.0F); - GL11.glScalef(size, size, size); + GlStateManager.pushMatrix(); + GlStateManager.translate(0D, -0.775D+offsetUp, 0D); + GlStateManager.rotate(180F, 1.0F, 0.0F, 1.0F); + GlStateManager.scale(size, size, size); if(time-(bobHeight/2) >= lastTimeForBobbing){ - GL11.glTranslated(0, (time-this.lastTimeForBobbing)/100, 0); + GlStateManager.translate(0, (time-this.lastTimeForBobbing)/100, 0); } else{ - GL11.glTranslated(0, -(time-lastTimeForBobbing)/100+bobHeight/100, 0); + GlStateManager.translate(0, -(time-lastTimeForBobbing)/100+bobHeight/100, 0); } - GL11.glRotated(theTime/20, 0, 1, 0); + GlStateManager.rotate((float)(theTime/20), 0, 1, 0); - GL11.glDisable(GL11.GL_LIGHTING); + GlStateManager.disableLighting(); if(this.theThingToRender != null){ if(isBlock){ AssetUtil.renderBlockInWorld(Block.getBlockFromItem(this.theThingToRender.getItem()), this.theThingToRender.getItemDamage()); } else{ - GL11.glTranslatef(-0.5F, 0F, 0F); + GlStateManager.translate(-0.5F, 0F, 0F); AssetUtil.renderItemInWorld(this.theThingToRender, 0); } } - GL11.glEnable(GL11.GL_LIGHTING); + GlStateManager.enableLighting(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java index e17ccb256..cbf3493e6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java @@ -25,9 +25,9 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.ArrayList; @@ -136,8 +136,8 @@ public class NEIBookletRecipe extends TemplateRecipeHandler implements INEIRecip @Override public void drawForeground(int recipe){ - GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glDisable(GL11.GL_LIGHTING); + GlStateManager.color(1F, 1F, 1F, 1F); + GlStateManager.disableLighting(); this.drawExtras(recipe); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java index 133696079..582721ddc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java @@ -30,8 +30,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.ArrayList; @@ -128,7 +128,7 @@ public class NEICoffeeMachineRecipe extends TemplateRecipeHandler implements INE @Override public void drawBackground(int recipeIndex){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); GuiDraw.drawTexturedModalRect(0, 0, 0, 0, 126, 88); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java index 8f7c2c73f..db1abbd42 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java @@ -25,8 +25,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.Collections; @@ -98,7 +98,7 @@ public class NEICompostRecipe extends TemplateRecipeHandler implements INEIRecip @Override public void drawBackground(int recipeIndex){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); GuiDraw.drawTexturedModalRect(32, 0, 0, 0, 96, 60); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java index 6ad70313f..4bb30a127 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java @@ -25,8 +25,8 @@ import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.ArrayList; @@ -104,7 +104,7 @@ public class NEICrusherRecipe extends TemplateRecipeHandler implements INEIRecip @Override public void drawBackground(int recipeIndex){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); GuiDraw.drawTexturedModalRect(60, 13, 60, 13, 56, 79); } @@ -163,7 +163,7 @@ public class NEICrusherRecipe extends TemplateRecipeHandler implements INEIRecip @Override public void drawBackground(int recipeIndex){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); GuiDraw.drawTexturedModalRect(33, 20, 33, 20, 110, 70); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java index 1335f96bd..6251087af 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java @@ -23,9 +23,9 @@ import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; -import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.Collections; @@ -111,7 +111,7 @@ public class NEIFurnaceDoubleRecipe extends TemplateRecipeHandler implements INE @Override public void drawBackground(int recipeIndex){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); GuiDraw.drawTexturedModalRect(46, 20, 46, 20, 84, 70); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java index e84b69572..f77fc5656 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java @@ -24,8 +24,8 @@ import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.Collections; @@ -118,7 +118,7 @@ public class NEIHairyBallRecipe extends TemplateRecipeHandler implements INEIRec @Override public void drawBackground(int recipeIndex){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); GuiDraw.drawTexturedModalRect(32, 0, 0, 0, 96, 60); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java index f009a0a1d..0174ff111 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java @@ -26,9 +26,9 @@ import de.ellpeck.actuallyadditions.mod.util.*; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.ArrayList; @@ -144,7 +144,7 @@ public class NEIReconstructorRecipe extends TemplateRecipeHandler implements INE @Override public void drawBackground(int recipeIndex){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); GuiDraw.drawTexturedModalRect(32, 0, 0, 0, 96, 60); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java index 2dbbf913a..f6c90cfce 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java @@ -24,8 +24,8 @@ import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.Collections; @@ -116,7 +116,7 @@ public class NEITreasureChestRecipe extends TemplateRecipeHandler implements INE @Override public void drawBackground(int recipeIndex){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); GuiDraw.drawTexturedModalRect(32, 0, 0, 0, 96, 60); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java index 93bd094e4..4018ccf7f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java @@ -69,7 +69,7 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr int meta = PosUtil.getMetadata(theCoord, worldObj); this.worldObj.playAuxSFX(2001, theCoord, Block.getIdFromBlock(theBlock)+(meta << 12)); - this.worldObj.setBlockToAir(this.getPos()); + this.worldObj.setBlockToAir(theCoord); this.storage.receiveEnergy(ENERGY_PRODUCED, false); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 5b15b161a..a448d5ed0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -24,7 +24,6 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; public class AssetUtil{ @@ -74,14 +73,14 @@ public class AssetUtil{ @SideOnly(Side.CLIENT) public static void renderStackToGui(ItemStack stack, int x, int y, float scale){ - GL11.glPushMatrix(); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.pushMatrix(); + GlStateManager.enableBlend(); + GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); RenderHelper.enableGUIStandardItemLighting(); - GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glTranslated(x, y, 0); - GL11.glScalef(scale, scale, scale); + GlStateManager.enableDepth(); + GlStateManager.enableRescaleNormal(); + GlStateManager.translate(x, y, 0); + GlStateManager.scale(scale, scale, scale); Minecraft mc = Minecraft.getMinecraft(); boolean flagBefore = mc.fontRendererObj.getUnicodeFlag(); @@ -94,7 +93,7 @@ public class AssetUtil{ if(mc.currentScreen instanceof GuiBooklet || mc.currentScreen == null){ RenderHelper.disableStandardItemLighting(); } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } //Copied from Gui.class and changed @@ -115,10 +114,10 @@ public class AssetUtil{ Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldrenderer = tessellator.getWorldRenderer(); worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR); - worldrenderer.pos((double)right, (double)top, (double)zLevel).color(f1, f2, f3, f).endVertex(); worldrenderer.pos((double)left, (double)top, (double)zLevel).color(f1, f2, f3, f).endVertex(); - worldrenderer.pos((double)left, (double)bottom, (double)zLevel).color(f5, f6, f7, f4).endVertex(); + worldrenderer.pos((double)left, (double)bottom, (double)zLevel).color(f1, f2, f3, f).endVertex(); worldrenderer.pos((double)right, (double)bottom, (double)zLevel).color(f5, f6, f7, f4).endVertex(); + worldrenderer.pos((double)right, (double)top, (double)zLevel).color(f5, f6, f7, f4).endVertex(); tessellator.draw(); GlStateManager.shadeModel(7424); GlStateManager.disableBlend(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java index d9bcdfbde..2e97727b4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java @@ -12,7 +12,7 @@ package de.ellpeck.actuallyadditions.mod.util; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.IBlockState; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.util.BlockPos; @@ -22,10 +22,14 @@ import net.minecraft.world.World; public class PosUtil{ - public static final PropertyInteger META = PropertyInteger.create("meta", 0, 15); - public static Block getBlock(BlockPos pos, IBlockAccess world){ - return world.getBlockState(pos).getBlock(); + if(pos != null){ + IBlockState state = world.getBlockState(pos); + if(state != null){ + return state.getBlock(); + } + } + return null; } public static Material getMaterial(BlockPos pos, IBlockAccess world){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index dbda94332..73ddb426c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -55,12 +55,12 @@ public class WorldUtil{ } public static void pushEnergyToAllSides(World world, BlockPos pos, EnergyStorage storage){ - WorldUtil.pushEnergy(world, pos, EnumFacing.UP, storage); - WorldUtil.pushEnergy(world, pos, EnumFacing.DOWN, storage); - WorldUtil.pushEnergy(world, pos, EnumFacing.NORTH, storage); - WorldUtil.pushEnergy(world, pos, EnumFacing.EAST, storage); - WorldUtil.pushEnergy(world, pos, EnumFacing.SOUTH, storage); - WorldUtil.pushEnergy(world, pos, EnumFacing.WEST, storage); + pushEnergy(world, pos, EnumFacing.UP, storage); + pushEnergy(world, pos, EnumFacing.DOWN, storage); + pushEnergy(world, pos, EnumFacing.NORTH, storage); + pushEnergy(world, pos, EnumFacing.EAST, storage); + pushEnergy(world, pos, EnumFacing.SOUTH, storage); + pushEnergy(world, pos, EnumFacing.WEST, storage); } public static void pushEnergy(World world, BlockPos pos, EnumFacing side, EnergyStorage storage){ @@ -76,7 +76,7 @@ public class WorldUtil{ public static TileEntity getTileEntityFromSide(EnumFacing side, World world, BlockPos pos){ BlockPos c = getCoordsFromSide(side, pos, 0); if(c != null){ - return world.getTileEntity(pos); + return world.getTileEntity(c); } return null; } @@ -399,7 +399,7 @@ public class WorldUtil{ else{ //Check the Server if a Block that changed on the Client really changed, if not, revert the change //TODO Check if this is the right action - Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, pos, Minecraft.getMinecraft().objectMouseOver.sideHit)); + Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.STOP_DESTROY_BLOCK, pos, Minecraft.getMinecraft().objectMouseOver.sideHit)); } return removed; } From 6693636247507ad459da056f4f175ce8aa84db0c Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 15:26:52 +0100 Subject: [PATCH 11/58] Bump API version. If I don't do it now, I'll forget. --- .../java/de/ellpeck/actuallyadditions/api/package-info.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/package-info.java b/src/main/java/de/ellpeck/actuallyadditions/api/package-info.java index 3148fea10..d7c557d20 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/package-info.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/package-info.java @@ -7,7 +7,7 @@ * * © 2016 Ellpeck */ -@API(owner = "ActuallyAdditions", apiVersion = "3", provides = "ActuallyAdditionsAPI") +@API(owner = "ActuallyAdditions", apiVersion = "4", provides = "ActuallyAdditionsAPI") package de.ellpeck.actuallyadditions.api; import net.minecraftforge.fml.common.API; \ No newline at end of file From 020384f5ffdbf533613cc274679604b499067d15 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 15:33:19 +0100 Subject: [PATCH 12/58] Put Version and API Name in main class --- .../ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java | 4 ++++ .../java/de/ellpeck/actuallyadditions/api/package-info.java | 2 +- .../java/de/ellpeck/actuallyadditions/mod/util/ModUtil.java | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java index f1240d0d9..8e2da7f6e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java @@ -26,6 +26,10 @@ import java.util.List; public class ActuallyAdditionsAPI{ + public static final String MOD_ID = "ActuallyAdditions"; + public static final String API_ID = MOD_ID+"API"; + public static final String API_VERSION = "4"; + public static List crusherRecipes = new ArrayList(); public static List ballOfFurReturnItems = new ArrayList(); public static List treasureChestLoot = new ArrayList(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/package-info.java b/src/main/java/de/ellpeck/actuallyadditions/api/package-info.java index d7c557d20..f2612d9f4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/package-info.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/package-info.java @@ -7,7 +7,7 @@ * * © 2016 Ellpeck */ -@API(owner = "ActuallyAdditions", apiVersion = "4", provides = "ActuallyAdditionsAPI") +@API(owner = ActuallyAdditionsAPI.MOD_ID, apiVersion = ActuallyAdditionsAPI.API_VERSION, provides = ActuallyAdditionsAPI.API_ID) package de.ellpeck.actuallyadditions.api; import net.minecraftforge.fml.common.API; \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ModUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ModUtil.java index e9b99040f..ddc3cce50 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ModUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ModUtil.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.util; +import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -18,7 +19,7 @@ import java.util.Locale; public class ModUtil{ public static final String VERSION = "@VERSION@"; //build.gradle - public static final String MOD_ID = "ActuallyAdditions"; + public static final String MOD_ID = ActuallyAdditionsAPI.MOD_ID; public static final String NAME = "Actually Additions"; public static final String MOD_ID_LOWER = MOD_ID.toLowerCase(Locale.ROOT); From c08d2221fa5ec54669daa802083a273c452a8466 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 16:52:53 +0100 Subject: [PATCH 13/58] This doesn't work. --- .../mod/blocks/base/BlockBase.java | 3 +++ .../mod/blocks/base/BlockBushBase.java | 3 +++ .../mod/blocks/base/BlockContainerBase.java | 2 ++ .../mod/blocks/base/BlockFluidFlowing.java | 3 +++ .../mod/blocks/base/BlockPlant.java | 3 +++ .../mod/blocks/base/BlockStair.java | 3 +++ .../mod/blocks/base/BlockWallAA.java | 3 +++ .../mod/items/base/ItemAllToolAA.java | 3 +++ .../mod/items/base/ItemArmorAA.java | 3 +++ .../mod/items/base/ItemAxeAA.java | 3 +++ .../mod/items/base/ItemBase.java | 3 +++ .../mod/items/base/ItemBucketAA.java | 3 +++ .../mod/items/base/ItemEnergy.java | 3 +++ .../mod/items/base/ItemFoodBase.java | 3 +++ .../mod/items/base/ItemHoeAA.java | 3 +++ .../mod/items/base/ItemPickaxeAA.java | 3 +++ .../mod/items/base/ItemShovelAA.java | 3 +++ .../mod/items/base/ItemSwordAA.java | 3 +++ .../mod/proxy/ClientProxy.java | 26 +++++++++++++++++++ .../actuallyadditions/mod/util/Util.java | 3 +++ .../blockstates/blockGrinder.json | 6 +++++ .../models/block/blockGrinder.json | 12 +++++++++ .../models/block/blockGrinderOn.json | 12 +++++++++ .../models/item/blockGrinder.json | 10 +++++++ 24 files changed, 122 insertions(+) create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockGrinder.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockGrinder.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockGrinderOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockGrinder.json diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java index 8b278af9b..a30a47613 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; @@ -41,6 +42,8 @@ public class BlockBase extends Block{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java index 58c407a74..2ef28c895 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.BlockBush; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockState; @@ -39,6 +40,8 @@ public class BlockBushBase extends BlockBush{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index 1107eba4e..b277ef052 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -59,6 +59,8 @@ public abstract class BlockContainerBase extends BlockContainer{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java index e35c10b0b..77b399785 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java @@ -14,6 +14,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.material.Material; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; @@ -45,6 +46,8 @@ public class BlockFluidFlowing extends BlockFluidClassic{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java index 2fe64985b..eb08d0435 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.BlockCrops; import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; @@ -51,6 +52,8 @@ public class BlockPlant extends BlockCrops{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java index e3ab693e7..5e820217c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockStairs; import net.minecraft.item.EnumRarity; @@ -44,6 +45,8 @@ public class BlockStair extends BlockStairs{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java index c052be249..d2f2dc179 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockWall; import net.minecraft.block.state.IBlockState; @@ -51,6 +52,8 @@ public class BlockWallAA extends BlockWall{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java index 8a36cf0fa..f55898e1a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java @@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockDirt; import net.minecraft.block.material.Material; @@ -74,6 +75,8 @@ public class ItemAllToolAA extends ItemTool{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java index d7868c13b..b6e560a42 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; @@ -46,6 +47,8 @@ public class ItemArmorAA extends ItemArmor{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java index 2d3589230..9716101a6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; @@ -43,6 +44,8 @@ public class ItemAxeAA extends ItemAxe{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java index f8eeb4f60..1b0751dd1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -35,6 +36,8 @@ public class ItemBase extends Item{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java index d43eed4ba..1346cf5d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.init.Items; import net.minecraft.item.EnumRarity; @@ -40,6 +41,8 @@ public class ItemBucketAA extends ItemBucket{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java index e31b45f6a..5a4d2259d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import cofh.api.energy.ItemEnergyContainer; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -47,6 +48,8 @@ public abstract class ItemEnergy extends ItemEnergyContainer{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java index 5953c2b85..d1dc47c3f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.ItemFood; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -36,6 +37,8 @@ public class ItemFoodBase extends ItemFood{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java index af3eddf2e..eef2dd295 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemHoe; @@ -44,6 +45,8 @@ public class ItemHoeAA extends ItemHoe{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java index c6aa13ebd..9a063fa29 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; @@ -43,6 +44,8 @@ public class ItemPickaxeAA extends ItemPickaxe{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java index 3f7293658..fbb380d8a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemSpade; @@ -44,6 +45,8 @@ public class ItemShovelAA extends ItemSpade{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java index fae0a2f9c..06183f132 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java @@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; @@ -44,6 +45,8 @@ public class ItemSwordAA extends ItemSword{ else{ this.setCreativeTab(null); } + + Util.ITEMS_AND_BLOCKS.add(this); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index 25df1657f..1864d8937 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -22,8 +22,14 @@ import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit; import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentClientData; +import net.minecraft.block.Block; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.ItemModelMesher; +import net.minecraft.client.resources.model.ModelResourceLocation; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @@ -31,7 +37,9 @@ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import java.io.File; +import java.util.ArrayList; import java.util.Calendar; +import java.util.List; @SuppressWarnings("unused") public class ClientProxy implements IProxy{ @@ -75,6 +83,24 @@ public class ClientProxy implements IProxy{ //TODO Fix villager //VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png")); + + for(Object o : Util.ITEMS_AND_BLOCKS){ + ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); + if(o instanceof Item){ + List subItems = new ArrayList(); + ((Item)o).getSubItems((Item)o, null, subItems); + for(ItemStack aStack : subItems){ + mesher.register(aStack.getItem(), aStack.getItemDamage(), new ModelResourceLocation(ModUtil.MOD_ID_LOWER+":"+aStack.getItem().getRegistryName(), "inventory")); + } + } + else if(o instanceof Block){ + List subItems = new ArrayList(); + ((Block)o).getSubBlocks(Item.getItemFromBlock((Block)o), null, subItems); + for(ItemStack aStack : subItems){ + mesher.register(aStack.getItem(), aStack.getItemDamage(), new ModelResourceLocation(ModUtil.MOD_ID_LOWER+":"+aStack.getItem().getRegistryName(), "inventory")); + } + } + } } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java index fff61d9e6..36ff8f015 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java @@ -24,12 +24,15 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.oredict.OreDictionary; +import java.util.ArrayList; import java.util.List; import java.util.Random; @SuppressWarnings("unused") public class Util{ + public static final List ITEMS_AND_BLOCKS = new ArrayList(); + public static final Random RANDOM = new Random(); public static final int WILDCARD = OreDictionary.WILDCARD_VALUE; diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockGrinder.json b/src/main/resources/assets/actuallyadditions/blockstates/blockGrinder.json new file mode 100644 index 000000000..1d8694186 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockGrinder.json @@ -0,0 +1,6 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockGrinder" }, + "meta=1": { "model": "actuallyadditions:blockGrinderOn" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockGrinder.json b/src/main/resources/assets/actuallyadditions/models/block/blockGrinder.json new file mode 100644 index 000000000..c6cf965b5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockGrinder.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockGrinder", + "down": "actuallyadditions:blocks/blockGrinderBottom", + "up": "actuallyadditions:blocks/blockGrinderTop", + "north": "actuallyadditions:blocks/blockGrinder", + "east": "actuallyadditions:blocks/blockGrinder", + "south": "actuallyadditions:blocks/blockGrinder", + "west": "actuallyadditions:blocks/blockGrinder" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockGrinderOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockGrinderOn.json new file mode 100644 index 000000000..32ace4441 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockGrinderOn.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockGrinder", + "down": "actuallyadditions:blocks/blockGrinderBottom", + "up": "actuallyadditions:blocks/blockGrinderOn", + "north": "actuallyadditions:blocks/blockGrinder", + "east": "actuallyadditions:blocks/blockGrinder", + "south": "actuallyadditions:blocks/blockGrinder", + "west": "actuallyadditions:blocks/blockGrinder" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockGrinder.json b/src/main/resources/assets/actuallyadditions/models/item/blockGrinder.json new file mode 100644 index 000000000..f3ad2c432 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockGrinder.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockGrinder", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file From 77860267dae42c31b86ccef3e3cfed98f4849e45 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 17:25:31 +0100 Subject: [PATCH 14/58] ITEMS AND BLOCKS RENDER Well. Not all of them. --- .../mod/blocks/BlockSmileyCloud.java | 10 ++++----- .../mod/blocks/base/BlockContainerBase.java | 5 +++++ .../mod/proxy/ClientProxy.java | 21 ++++++++++++------- .../models/item/itemBooklet.json | 18 ++++++++++++++++ 4 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBooklet.json diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java index 2c732a07e..3afb1cc05 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java @@ -135,16 +135,16 @@ public class BlockSmileyCloud extends BlockContainerBase{ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; if(rotation == 0){ - PosUtil.setMetadata(pos, world, 0, 2); + PosUtil.setMetadata(pos, world, 2, 2); } if(rotation == 1){ - PosUtil.setMetadata(pos, world, 3, 2); - } - if(rotation == 2){ PosUtil.setMetadata(pos, world, 1, 2); } + if(rotation == 2){ + PosUtil.setMetadata(pos, world, 0, 2); + } if(rotation == 3){ - PosUtil.setMetadata(pos, world, 2, 2); + PosUtil.setMetadata(pos, world, 3, 2); } super.onBlockPlacedBy(world, pos, state, player, stack); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index b277ef052..b0f17b2eb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -280,4 +280,9 @@ public abstract class BlockContainerBase extends BlockContainer{ protected PropertyInteger getMetaProperty(){ return null; } + + @Override + public int getRenderType(){ + return 3; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index 1864d8937..8b76e26b8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -85,19 +85,24 @@ public class ClientProxy implements IProxy{ //VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png")); for(Object o : Util.ITEMS_AND_BLOCKS){ - ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); + + ItemStack stack = null; if(o instanceof Item){ - List subItems = new ArrayList(); - ((Item)o).getSubItems((Item)o, null, subItems); - for(ItemStack aStack : subItems){ - mesher.register(aStack.getItem(), aStack.getItemDamage(), new ModelResourceLocation(ModUtil.MOD_ID_LOWER+":"+aStack.getItem().getRegistryName(), "inventory")); - } + stack = new ItemStack((Item)o); } else if(o instanceof Block){ + stack = new ItemStack((Block)o); + } + + if(stack != null){ + ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); + String name = stack.getItem().getRegistryName(); + List subItems = new ArrayList(); - ((Block)o).getSubBlocks(Item.getItemFromBlock((Block)o), null, subItems); + stack.getItem().getSubItems(stack.getItem(), null, subItems); + for(ItemStack aStack : subItems){ - mesher.register(aStack.getItem(), aStack.getItemDamage(), new ModelResourceLocation(ModUtil.MOD_ID_LOWER+":"+aStack.getItem().getRegistryName(), "inventory")); + mesher.register(aStack.getItem(), aStack.getItemDamage(), new ModelResourceLocation(name, "inventory")); } } } diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBooklet.json b/src/main/resources/assets/actuallyadditions/models/item/itemBooklet.json new file mode 100644 index 000000000..fb3016358 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBooklet.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBooklet" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} From 98efec99d084211f2eeeb995754c982fd428867e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 18:09:11 +0100 Subject: [PATCH 15/58] Fixed knife crafting being broken --- .../mod/crafting/FoodCrafting.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java index 527d9a8ca..d2cb5a0b0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java @@ -56,7 +56,7 @@ public class FoodCrafting{ //Bacon if(ConfigCrafting.BACON.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()), - knifeStack, new ItemStack(Items.cooked_porkchop))); + knifeStack.copy(), new ItemStack(Items.cooked_porkchop))); recipeBacon = Util.GetRecipes.lastIRecipe(); } @@ -74,7 +74,7 @@ public class FoodCrafting{ 'M', new ItemStack(Blocks.brown_mushroom), 'C', "cropCarrot", 'F', new ItemStack(Items.cooked_fish, 1, Util.WILDCARD), - 'K', knifeStack, + 'K', knifeStack.copy(), 'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()))); recipePizza = Util.GetRecipes.lastIRecipe(); } @@ -85,7 +85,7 @@ public class FoodCrafting{ "KT ", "CB ", " T ", 'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), - 'K', knifeStack, + 'K', knifeStack.copy(), 'B', new ItemStack(Items.cooked_beef))); recipeHamburger = Util.GetRecipes.lastIRecipe(); } @@ -107,7 +107,7 @@ public class FoodCrafting{ 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), 'F', new ItemStack(Items.cooked_fish, 1, Util.WILDCARD), 'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), - 'K', knifeStack)); + 'K', knifeStack.copy())); recipeSubSandwich = Util.GetRecipes.lastIRecipe(); } @@ -115,7 +115,7 @@ public class FoodCrafting{ if(ConfigCrafting.FRENCH_FRY.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()), new ItemStack(Items.baked_potato), - knifeStack)); + knifeStack.copy())); recipeFrenchFry = Util.GetRecipes.lastIRecipe(); } @@ -157,7 +157,7 @@ public class FoodCrafting{ //Carrot Juice if(ConfigCrafting.CARROT_JUICE.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()), - new ItemStack(Items.glass_bottle), "cropCarrot", knifeStack)); + new ItemStack(Items.glass_bottle), "cropCarrot", knifeStack.copy())); recipeCarrotJuice = Util.GetRecipes.lastIRecipe(); } @@ -173,7 +173,7 @@ public class FoodCrafting{ //Noodle if(ConfigCrafting.NOODLE.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), - "cropWheat", knifeStack)); + "cropWheat", knifeStack.copy())); recipeNoodle = Util.GetRecipes.lastIRecipe(); } From 51872bbc23c0bd81ec6812e97b4f13eac743b7f9 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 20:51:03 +0100 Subject: [PATCH 16/58] Dis game is ass - More textures --- .../mod/blocks/BlockColoredLamp.java | 14 ++++++ .../mod/blocks/base/BlockBase.java | 9 +++- .../mod/blocks/base/BlockBushBase.java | 9 +++- .../mod/blocks/base/BlockContainerBase.java | 8 ++- .../mod/blocks/base/BlockFluidFlowing.java | 9 +++- .../mod/blocks/base/BlockPlant.java | 9 +++- .../mod/blocks/base/BlockStair.java | 9 +++- .../mod/blocks/base/BlockWallAA.java | 9 +++- .../mod/booklet/GuiBooklet.java | 4 +- .../mod/items/base/ItemAllToolAA.java | 9 +++- .../mod/items/base/ItemArmorAA.java | 9 +++- .../mod/items/base/ItemAxeAA.java | 9 +++- .../mod/items/base/ItemBase.java | 10 +++- .../mod/items/base/ItemBucketAA.java | 9 +++- .../mod/items/base/ItemEnergy.java | 9 +++- .../mod/items/base/ItemFoodBase.java | 10 +++- .../mod/items/base/ItemHoeAA.java | 9 +++- .../mod/items/base/ItemPickaxeAA.java | 9 +++- .../mod/items/base/ItemShovelAA.java | 9 +++- .../mod/items/base/ItemSwordAA.java | 9 +++- .../mod/proxy/ClientProxy.java | 49 +++++++++---------- .../actuallyadditions/mod/proxy/IProxy.java | 7 +++ .../mod/proxy/ServerProxy.java | 13 +++++ .../actuallyadditions/mod/util/Util.java | 3 -- .../blockstates/blockAtomicReconstructor.json | 10 ++++ .../blockstates/blockColoredLamp.json | 20 ++++++++ .../blockstates/blockColoredLampOn.json | 20 ++++++++ .../blockstates/blockFireworkBox.json | 5 ++ .../blockstates/blockInputter.json | 5 ++ .../blockstates/blockInputterAdvanced.json | 5 ++ .../blockstates/blockPhantomBreaker.json | 5 ++ .../blockstates/blockPhantomEnergyface.json | 5 ++ .../blockstates/blockPhantomLiquiface.json | 5 ++ .../blockstates/blockPhantomPlacer.json | 5 ++ .../blockstates/blockPhantomface.json | 5 ++ .../block/blockAtomicReconstructor.json | 12 +++++ .../models/block/blockColoredLampBlack.json | 6 +++ .../models/block/blockColoredLampBlackOn.json | 6 +++ .../models/block/blockColoredLampBlue.json | 6 +++ .../models/block/blockColoredLampBlueOn.json | 6 +++ .../models/block/blockColoredLampBrown.json | 6 +++ .../models/block/blockColoredLampBrownOn.json | 6 +++ .../models/block/blockColoredLampCyan.json | 6 +++ .../models/block/blockColoredLampCyanOn.json | 6 +++ .../models/block/blockColoredLampGray.json | 6 +++ .../models/block/blockColoredLampGrayOn.json | 6 +++ .../models/block/blockColoredLampGreen.json | 6 +++ .../models/block/blockColoredLampGreenOn.json | 6 +++ .../block/blockColoredLampLightBlue.json | 6 +++ .../block/blockColoredLampLightBlueOn.json | 6 +++ .../block/blockColoredLampLightGray.json | 6 +++ .../block/blockColoredLampLightGrayOn.json | 6 +++ .../models/block/blockColoredLampLime.json | 6 +++ .../models/block/blockColoredLampLimeOn.json | 6 +++ .../models/block/blockColoredLampMagenta.json | 6 +++ .../block/blockColoredLampMagentaOn.json | 6 +++ .../models/block/blockColoredLampOrange.json | 6 +++ .../block/blockColoredLampOrangeOn.json | 6 +++ .../models/block/blockColoredLampPink.json | 6 +++ .../models/block/blockColoredLampPinkOn.json | 6 +++ .../models/block/blockColoredLampPurple.json | 6 +++ .../block/blockColoredLampPurpleOn.json | 6 +++ .../models/block/blockColoredLampRed.json | 6 +++ .../models/block/blockColoredLampRedOn.json | 6 +++ .../models/block/blockColoredLampWhite.json | 6 +++ .../models/block/blockColoredLampWhiteOn.json | 6 +++ .../models/block/blockColoredLampYellow.json | 6 +++ .../block/blockColoredLampYellowOn.json | 6 +++ .../models/block/blockFireworkBox.json | 12 +++++ .../models/block/blockInputter.json | 6 +++ .../models/block/blockInputterAdvanced.json | 6 +++ .../models/block/blockPhantomBreaker.json | 6 +++ .../models/block/blockPhantomEnergyface.json | 6 +++ .../models/block/blockPhantomLiquiface.json | 6 +++ .../models/block/blockPhantomPlacer.json | 6 +++ .../models/block/blockPhantomface.json | 6 +++ .../models/item/blockAtomicReconstructor.json | 10 ++++ .../models/item/blockColoredLampBlack.json | 10 ++++ .../models/item/blockColoredLampBlue.json | 10 ++++ .../models/item/blockColoredLampBrown.json | 10 ++++ .../models/item/blockColoredLampCyan.json | 10 ++++ .../models/item/blockColoredLampGray.json | 10 ++++ .../models/item/blockColoredLampGreen.json | 10 ++++ .../item/blockColoredLampLightBlue.json | 10 ++++ .../item/blockColoredLampLightGray.json | 10 ++++ .../models/item/blockColoredLampLime.json | 10 ++++ .../models/item/blockColoredLampMagenta.json | 10 ++++ .../models/item/blockColoredLampOrange.json | 10 ++++ .../models/item/blockColoredLampPink.json | 10 ++++ .../models/item/blockColoredLampPurple.json | 10 ++++ .../models/item/blockColoredLampWhite.json | 10 ++++ .../models/item/blockColoredLampYellow.json | 10 ++++ .../models/item/blockFireworkBox.json | 10 ++++ .../models/item/blockInputter.json | 10 ++++ .../models/item/blockInputterAdvanced.json | 10 ++++ .../models/item/blockPhantomBreaker.json | 10 ++++ .../models/item/blockPhantomEnergyface.json | 10 ++++ .../models/item/blockPhantomLiquiface.json | 10 ++++ .../models/item/blockPhantomPlacer.json | 10 ++++ .../models/item/blockPhantomface.json | 10 ++++ 100 files changed, 775 insertions(+), 66 deletions(-) create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockAtomicReconstructor.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockColoredLamp.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockColoredLampOn.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockFireworkBox.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockInputter.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockInputterAdvanced.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockPhantomBreaker.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockPhantomEnergyface.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockPhantomLiquiface.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockPhantomPlacer.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockPhantomface.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockAtomicReconstructor.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlackOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlueOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBrown.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBrownOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampCyan.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampCyanOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGray.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGrayOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGreenOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightBlueOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightGray.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightGrayOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLime.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLimeOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampMagenta.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampMagentaOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampOrange.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampOrangeOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPink.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPinkOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPurple.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPurpleOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampRedOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampWhiteOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampYellow.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockColoredLampYellowOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFireworkBox.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockInputter.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockInputterAdvanced.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPhantomBreaker.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPhantomEnergyface.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPhantomLiquiface.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPhantomPlacer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPhantomface.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockAtomicReconstructor.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBrown.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampCyan.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampGray.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightGray.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLime.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampMagenta.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOrange.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampPink.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampPurple.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampYellow.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockFireworkBox.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockInputter.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockInputterAdvanced.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockPhantomBreaker.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockPhantomEnergyface.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockPhantomLiquiface.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockPhantomPlacer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockPhantomface.json diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java index 628a63863..8ae5cfd8b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java @@ -11,6 +11,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; @@ -28,6 +29,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; @@ -133,6 +135,18 @@ public class BlockColoredLamp extends BlockBase{ return EnumRarity.RARE; } + @Override + protected void registerRendering(){ + ResourceLocation[] resLocs = new ResourceLocation[allLampTypes.length]; + for(int i = 0; i < allLampTypes.length; i++){ + String name = this.getBaseName()+allLampTypes[i].name; + resLocs[i] = new ResourceLocation(ModUtil.MOD_ID_LOWER, name); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, name)); + } + ActuallyAdditions.proxy.addRenderVariant(Item.getItemFromBlock(this), resLocs); + } + + public static class TheItemBlock extends ItemBlockBase{ public TheItemBlock(Block block){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java index a30a47613..b420cb2d6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; @@ -20,6 +20,7 @@ import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; public class BlockBase extends Block{ @@ -43,7 +44,11 @@ public class BlockBase extends Block{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java index 2ef28c895..11bc17dc2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java @@ -10,15 +10,16 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.BlockBush; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; public class BlockBushBase extends BlockBush{ @@ -41,7 +42,11 @@ public class BlockBushBase extends BlockBush{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index b0f17b2eb..d2497bbf1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -31,6 +32,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; @@ -60,7 +62,11 @@ public abstract class BlockContainerBase extends BlockContainer{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java index 77b399785..5c27d120c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java @@ -11,14 +11,15 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.material.Material; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; @@ -47,7 +48,11 @@ public class BlockFluidFlowing extends BlockFluidClassic{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java index eb08d0435..a7de0e08c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java @@ -10,15 +10,16 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.BlockCrops; import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; @@ -53,7 +54,11 @@ public class BlockPlant extends BlockCrops{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java index 5e820217c..0717d9014 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockStair.java @@ -11,13 +11,14 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockStairs; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; public class BlockStair extends BlockStairs{ @@ -46,7 +47,11 @@ public class BlockStair extends BlockStairs{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java index d2f2dc179..601cc4444 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockWall; import net.minecraft.block.state.IBlockState; @@ -20,6 +20,7 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -53,7 +54,11 @@ public class BlockWallAA extends BlockWall{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java index 3b79372c7..ee11aa458 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java @@ -361,10 +361,10 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ public void handleMouseInput() throws IOException{ int wheel = Mouse.getEventDWheel(); if(wheel != 0){ - if(wheel > 0){ + if(wheel < 0){ BookletUtils.handleNextPage(this); } - else if(wheel < 0){ + else if(wheel > 0){ BookletUtils.handlePreviousPage(this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java index f55898e1a..4c70b1aac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java @@ -11,11 +11,11 @@ package de.ellpeck.actuallyadditions.mod.items.base; import com.google.common.collect.Sets; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockDirt; import net.minecraft.block.material.Material; @@ -27,6 +27,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.ItemTool; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -76,7 +77,11 @@ public class ItemAllToolAA extends ItemTool{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java index b6e560a42..d622568c9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java @@ -10,13 +10,14 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; public class ItemArmorAA extends ItemArmor{ @@ -48,7 +49,11 @@ public class ItemArmorAA extends ItemArmor{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java index 9716101a6..0d0aaac5f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAxeAA.java @@ -10,13 +10,14 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; public class ItemAxeAA extends ItemAxe{ @@ -45,7 +46,11 @@ public class ItemAxeAA extends ItemAxe{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java index 1b0751dd1..c06a5fea5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java @@ -10,10 +10,12 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -37,7 +39,11 @@ public class ItemBase extends Item{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java index 1346cf5d7..db657d632 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBucketAA.java @@ -10,14 +10,15 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.init.Items; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; public class ItemBucketAA extends ItemBucket{ @@ -42,7 +43,11 @@ public class ItemBucketAA extends ItemBucket{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java index 5a4d2259d..01b3b36d0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java @@ -11,14 +11,15 @@ package de.ellpeck.actuallyadditions.mod.items.base; import cofh.api.energy.ItemEnergyContainer; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; 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.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; @@ -49,7 +50,11 @@ public abstract class ItemEnergy extends ItemEnergyContainer{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java index d1dc47c3f..963c357ed 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java @@ -10,10 +10,12 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -38,7 +40,11 @@ public class ItemFoodBase extends ItemFood{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java index eef2dd295..15c227873 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java @@ -10,14 +10,15 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; public class ItemHoeAA extends ItemHoe{ @@ -46,7 +47,11 @@ public class ItemHoeAA extends ItemHoe{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java index 9a063fa29..ea8a11b27 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemPickaxeAA.java @@ -10,13 +10,14 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; public class ItemPickaxeAA extends ItemPickaxe{ @@ -45,7 +46,11 @@ public class ItemPickaxeAA extends ItemPickaxe{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java index fbb380d8a..eab2eed72 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemShovelAA.java @@ -10,14 +10,15 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; public class ItemShovelAA extends ItemSpade{ @@ -46,7 +47,11 @@ public class ItemShovelAA extends ItemSpade{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java index 06183f132..6f19ca07c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java @@ -10,14 +10,15 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.GameRegistry; public class ItemSwordAA extends ItemSword{ @@ -46,7 +47,11 @@ public class ItemSwordAA extends ItemSword{ this.setCreativeTab(null); } - Util.ITEMS_AND_BLOCKS.add(this); + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index 8b76e26b8..012f45116 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -22,28 +22,30 @@ import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit; import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentClientData; -import net.minecraft.block.Block; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.ItemModelMesher; +import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import java.io.File; -import java.util.ArrayList; import java.util.Calendar; -import java.util.List; +import java.util.HashMap; +import java.util.Map; @SuppressWarnings("unused") public class ClientProxy implements IProxy{ + private static Map modelLocationsForRegistering = new HashMap(); + private static Map modelVariantsForRegistering = new HashMap(); + public static boolean pumpkinBlurPumpkinBlur; public static boolean jingleAllTheWay; public static boolean bulletForMyValentine; @@ -63,6 +65,10 @@ public class ClientProxy implements IProxy{ } PersistentClientData.setTheFile(new File(Minecraft.getMinecraft().mcDataDir, ModUtil.MOD_ID+"Data.dat")); + + for(Map.Entry entry : modelVariantsForRegistering.entrySet()){ + ModelBakery.registerItemVariants(entry.getKey(), entry.getValue()); + } } @Override @@ -84,27 +90,8 @@ public class ClientProxy implements IProxy{ //TODO Fix villager //VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png")); - for(Object o : Util.ITEMS_AND_BLOCKS){ - - ItemStack stack = null; - if(o instanceof Item){ - stack = new ItemStack((Item)o); - } - else if(o instanceof Block){ - stack = new ItemStack((Block)o); - } - - if(stack != null){ - ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); - String name = stack.getItem().getRegistryName(); - - List subItems = new ArrayList(); - stack.getItem().getSubItems(stack.getItem(), null, subItems); - - for(ItemStack aStack : subItems){ - mesher.register(aStack.getItem(), aStack.getItemDamage(), new ModelResourceLocation(name, "inventory")); - } - } + for(Map.Entry entry : modelLocationsForRegistering.entrySet()){ + Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(entry.getKey().getItem(), entry.getKey().getItemDamage(), new ModelResourceLocation(entry.getValue(), "inventory")); } } @@ -115,6 +102,16 @@ public class ClientProxy implements IProxy{ SpecialRenderInit.init(); } + @Override + public void addRenderRegister(ItemStack stack, ResourceLocation location){ + modelLocationsForRegistering.put(stack, location); + } + + @Override + public void addRenderVariant(Item item, ResourceLocation[] location){ + modelVariantsForRegistering.put(item, location); + } + private static void registerRenderer(Class tileClass, RenderTileEntity tileRender, int renderID){ ClientRegistry.bindTileEntitySpecialRenderer(tileClass, tileRender); //TODO Fix inventory rendering diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java index 7ad5c04c1..dbe269822 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java @@ -10,6 +10,9 @@ package de.ellpeck.actuallyadditions.mod.proxy; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -21,4 +24,8 @@ public interface IProxy{ void init(FMLInitializationEvent event); void postInit(FMLPostInitializationEvent event); + + void addRenderRegister(ItemStack stack, ResourceLocation location); + + void addRenderVariant(Item item, ResourceLocation[] location); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java index 46fe08e15..f11427f56 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java @@ -11,6 +11,9 @@ package de.ellpeck.actuallyadditions.mod.proxy; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -32,4 +35,14 @@ public class ServerProxy implements IProxy{ public void postInit(FMLPostInitializationEvent event){ ModUtil.LOGGER.info("PostInitializing ServerProxy..."); } + + @Override + public void addRenderRegister(ItemStack stack, ResourceLocation location){ + + } + + @Override + public void addRenderVariant(Item item, ResourceLocation[] location){ + + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java index 36ff8f015..fff61d9e6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java @@ -24,15 +24,12 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.oredict.OreDictionary; -import java.util.ArrayList; import java.util.List; import java.util.Random; @SuppressWarnings("unused") public class Util{ - public static final List ITEMS_AND_BLOCKS = new ArrayList(); - public static final Random RANDOM = new Random(); public static final int WILDCARD = OreDictionary.WILDCARD_VALUE; diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockAtomicReconstructor.json b/src/main/resources/assets/actuallyadditions/blockstates/blockAtomicReconstructor.json new file mode 100644 index 000000000..661455b79 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockAtomicReconstructor.json @@ -0,0 +1,10 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockAtomicReconstructor", "x": 90 }, + "meta=1": { "model": "actuallyadditions:blockAtomicReconstructor", "x": -90 }, + "meta=2": { "model": "actuallyadditions:blockAtomicReconstructor", "y": 0 }, + "meta=3": { "model": "actuallyadditions:blockAtomicReconstructor", "y": 180 }, + "meta=4": { "model": "actuallyadditions:blockAtomicReconstructor", "y": 270 }, + "meta=5": { "model": "actuallyadditions:blockAtomicReconstructor", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockColoredLamp.json b/src/main/resources/assets/actuallyadditions/blockstates/blockColoredLamp.json new file mode 100644 index 000000000..243dff666 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockColoredLamp.json @@ -0,0 +1,20 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockColoredLampWhite" }, + "meta=1": { "model": "actuallyadditions:blockColoredLampOrange" }, + "meta=2": { "model": "actuallyadditions:blockColoredLampMagenta" }, + "meta=3": { "model": "actuallyadditions:blockColoredLampLightBlue" }, + "meta=4": { "model": "actuallyadditions:blockColoredLampYellow" }, + "meta=5": { "model": "actuallyadditions:blockColoredLampLime" }, + "meta=6": { "model": "actuallyadditions:blockColoredLampPink" }, + "meta=7": { "model": "actuallyadditions:blockColoredLampGray" }, + "meta=8": { "model": "actuallyadditions:blockColoredLampLightGray" }, + "meta=9": { "model": "actuallyadditions:blockColoredLampCyan" }, + "meta=10": { "model": "actuallyadditions:blockColoredLampPurple" }, + "meta=11": { "model": "actuallyadditions:blockColoredLampBlue" }, + "meta=12": { "model": "actuallyadditions:blockColoredLampBrown" }, + "meta=13": { "model": "actuallyadditions:blockColoredLampGreen" }, + "meta=14": { "model": "actuallyadditions:blockColoredLampRed" }, + "meta=15": { "model": "actuallyadditions:blockColoredLampBlack" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockColoredLampOn.json b/src/main/resources/assets/actuallyadditions/blockstates/blockColoredLampOn.json new file mode 100644 index 000000000..d798a5dd6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockColoredLampOn.json @@ -0,0 +1,20 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockColoredLampWhiteOn" }, + "meta=1": { "model": "actuallyadditions:blockColoredLampOrangeOn" }, + "meta=2": { "model": "actuallyadditions:blockColoredLampMagentaOn" }, + "meta=3": { "model": "actuallyadditions:blockColoredLampLightBlueOn" }, + "meta=4": { "model": "actuallyadditions:blockColoredLampYellowOn" }, + "meta=5": { "model": "actuallyadditions:blockColoredLampLimeOn" }, + "meta=6": { "model": "actuallyadditions:blockColoredLampPinkOn" }, + "meta=7": { "model": "actuallyadditions:blockColoredLampGrayOn" }, + "meta=8": { "model": "actuallyadditions:blockColoredLampLightGrayOn" }, + "meta=9": { "model": "actuallyadditions:blockColoredLampCyanOn" }, + "meta=10": { "model": "actuallyadditions:blockColoredLampPurpleOn" }, + "meta=11": { "model": "actuallyadditions:blockColoredLampBlueOn" }, + "meta=12": { "model": "actuallyadditions:blockColoredLampBrownOn" }, + "meta=13": { "model": "actuallyadditions:blockColoredLampGreenOn" }, + "meta=14": { "model": "actuallyadditions:blockColoredLampRedOn" }, + "meta=15": { "model": "actuallyadditions:blockColoredLampBlackOn" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockFireworkBox.json b/src/main/resources/assets/actuallyadditions/blockstates/blockFireworkBox.json new file mode 100644 index 000000000..3e27a417c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockFireworkBox.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockFireworkBox" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockInputter.json b/src/main/resources/assets/actuallyadditions/blockstates/blockInputter.json new file mode 100644 index 000000000..f61d3273e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockInputter.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockInputter" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockInputterAdvanced.json b/src/main/resources/assets/actuallyadditions/blockstates/blockInputterAdvanced.json new file mode 100644 index 000000000..e886cf707 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockInputterAdvanced.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockInputterAdvanced" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomBreaker.json b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomBreaker.json new file mode 100644 index 000000000..06951250e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomBreaker.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockPhantomBreaker" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomEnergyface.json b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomEnergyface.json new file mode 100644 index 000000000..8de3a8d69 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomEnergyface.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockPhantomEnergyface" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomLiquiface.json b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomLiquiface.json new file mode 100644 index 000000000..897bc9bab --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomLiquiface.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockPhantomLiquiface" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomPlacer.json b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomPlacer.json new file mode 100644 index 000000000..f3820bf15 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomPlacer.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockPhantomPlacer" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomface.json b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomface.json new file mode 100644 index 000000000..f4a049588 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomface.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockPhantomface" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockAtomicReconstructor.json b/src/main/resources/assets/actuallyadditions/models/block/blockAtomicReconstructor.json new file mode 100644 index 000000000..fc39cc403 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockAtomicReconstructor.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockAtomicReconstructor", + "down": "actuallyadditions:blocks/blockAtomicReconstructorTop", + "up": "actuallyadditions:blocks/blockAtomicReconstructorTop", + "north": "actuallyadditions:blocks/blockAtomicReconstructorFront", + "east": "actuallyadditions:blocks/blockAtomicReconstructor", + "south": "actuallyadditions:blocks/blockAtomicReconstructor", + "west": "actuallyadditions:blocks/blockAtomicReconstructor" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlack.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlack.json new file mode 100644 index 000000000..b58a07632 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlack.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampBlack" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlackOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlackOn.json new file mode 100644 index 000000000..3f389fa3e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlackOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnBlack" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlue.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlue.json new file mode 100644 index 000000000..f7340b8aa --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlue.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampBlue" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlueOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlueOn.json new file mode 100644 index 000000000..d6be052d4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBlueOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnBlue" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBrown.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBrown.json new file mode 100644 index 000000000..be1970d85 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBrown.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampBrown" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBrownOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBrownOn.json new file mode 100644 index 000000000..9a9eaaa59 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampBrownOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnBrown" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampCyan.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampCyan.json new file mode 100644 index 000000000..06e8bd035 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampCyan.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampCyan" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampCyanOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampCyanOn.json new file mode 100644 index 000000000..73872bd4a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampCyanOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnCyan" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGray.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGray.json new file mode 100644 index 000000000..8d50ff038 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGray.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampGray" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGrayOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGrayOn.json new file mode 100644 index 000000000..366e9f866 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGrayOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnGray" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGreen.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGreen.json new file mode 100644 index 000000000..b4458a516 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGreen.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampGreen" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGreenOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGreenOn.json new file mode 100644 index 000000000..97ef2a9be --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampGreenOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnGreen" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightBlue.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightBlue.json new file mode 100644 index 000000000..879a1db86 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightBlue.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampLightBlue" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightBlueOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightBlueOn.json new file mode 100644 index 000000000..5efb5a904 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightBlueOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnLightBlue" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightGray.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightGray.json new file mode 100644 index 000000000..5a5f401c6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightGray.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampLightGray" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightGrayOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightGrayOn.json new file mode 100644 index 000000000..d9a17201d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLightGrayOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnLightGray" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLime.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLime.json new file mode 100644 index 000000000..df04b90e5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLime.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampLime" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLimeOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLimeOn.json new file mode 100644 index 000000000..963a9b4f2 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampLimeOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnLime" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampMagenta.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampMagenta.json new file mode 100644 index 000000000..200bdbf98 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampMagenta.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampMagenta" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampMagentaOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampMagentaOn.json new file mode 100644 index 000000000..9971c4b0c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampMagentaOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnMagenta" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampOrange.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampOrange.json new file mode 100644 index 000000000..13041fc16 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampOrange.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOrange" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampOrangeOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampOrangeOn.json new file mode 100644 index 000000000..90ba5c811 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampOrangeOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnOrange" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPink.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPink.json new file mode 100644 index 000000000..b4c9148cd --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPink.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampPink" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPinkOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPinkOn.json new file mode 100644 index 000000000..c4e998ce2 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPinkOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnPink" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPurple.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPurple.json new file mode 100644 index 000000000..610b96d42 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPurple.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampPurple" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPurpleOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPurpleOn.json new file mode 100644 index 000000000..018618f74 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampPurpleOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnPurple" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampRed.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampRed.json new file mode 100644 index 000000000..b17078a13 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampRed.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampRed" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampRedOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampRedOn.json new file mode 100644 index 000000000..13bca6d0d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampRedOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnRed" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampWhite.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampWhite.json new file mode 100644 index 000000000..35ee994b2 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampWhite.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampWhite" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampWhiteOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampWhiteOn.json new file mode 100644 index 000000000..565ed6b5e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampWhiteOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnWhite" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampYellow.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampYellow.json new file mode 100644 index 000000000..dcc68f867 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampYellow.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampYellow" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampYellowOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampYellowOn.json new file mode 100644 index 000000000..5f8c85c54 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockColoredLampYellowOn.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockColoredLampOnYellow" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFireworkBox.json b/src/main/resources/assets/actuallyadditions/models/block/blockFireworkBox.json new file mode 100644 index 000000000..92d6f0d11 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFireworkBox.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockFireworkBox", + "down": "actuallyadditions:blocks/blockFireworkBox", + "up": "actuallyadditions:blocks/blockFireworkBoxTop", + "north": "actuallyadditions:blocks/blockFireworkBox", + "east": "actuallyadditions:blocks/blockFireworkBox", + "south": "actuallyadditions:blocks/blockFireworkBox", + "west": "actuallyadditions:blocks/blockFireworkBox" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockInputter.json b/src/main/resources/assets/actuallyadditions/models/block/blockInputter.json new file mode 100644 index 000000000..7bc5b2f9a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockInputter.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockInputter" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockInputterAdvanced.json b/src/main/resources/assets/actuallyadditions/models/block/blockInputterAdvanced.json new file mode 100644 index 000000000..20dc95824 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockInputterAdvanced.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockInputterAdvanced" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPhantomBreaker.json b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomBreaker.json new file mode 100644 index 000000000..2f6b1a6b6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomBreaker.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockPhantomBreaker" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPhantomEnergyface.json b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomEnergyface.json new file mode 100644 index 000000000..28f93699d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomEnergyface.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockPhantomEnergyface" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPhantomLiquiface.json b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomLiquiface.json new file mode 100644 index 000000000..94c4530e4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomLiquiface.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockPhantomLiquiface" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPhantomPlacer.json b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomPlacer.json new file mode 100644 index 000000000..35eab12dd --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomPlacer.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockPhantomPlacer" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPhantomface.json b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomface.json new file mode 100644 index 000000000..71b522ba9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomface.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockPhantomface" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockAtomicReconstructor.json b/src/main/resources/assets/actuallyadditions/models/item/blockAtomicReconstructor.json new file mode 100644 index 000000000..e545878e7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockAtomicReconstructor.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockAtomicReconstructor", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBlack.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBlack.json new file mode 100644 index 000000000..5be359866 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBlack.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampBlack", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBlue.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBlue.json new file mode 100644 index 000000000..958223edf --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBlue.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampBlue", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBrown.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBrown.json new file mode 100644 index 000000000..9d37f0f76 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampBrown.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampBrown", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampCyan.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampCyan.json new file mode 100644 index 000000000..d373eedf1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampCyan.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampCyan", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampGray.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampGray.json new file mode 100644 index 000000000..5eba54608 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampGray.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampGray", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampGreen.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampGreen.json new file mode 100644 index 000000000..076706160 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampGreen.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampGreen", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightBlue.json new file mode 100644 index 000000000..f42814555 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightBlue.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampLightBlue", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightGray.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightGray.json new file mode 100644 index 000000000..5eba54608 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightGray.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampGray", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLime.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLime.json new file mode 100644 index 000000000..8ef419c6a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLime.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampLime", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampMagenta.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampMagenta.json new file mode 100644 index 000000000..3eda300af --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampMagenta.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampMagenta", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOrange.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOrange.json new file mode 100644 index 000000000..ae7be2a4b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOrange.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampOrange", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampPink.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampPink.json new file mode 100644 index 000000000..59f04fa4b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampPink.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampPink", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampPurple.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampPurple.json new file mode 100644 index 000000000..ac0e31648 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampPurple.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampPurple", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampWhite.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampWhite.json new file mode 100644 index 000000000..5a8626d73 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampWhite.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampWhite-", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampYellow.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampYellow.json new file mode 100644 index 000000000..ed7c96c03 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampYellow.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampYellow", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockFireworkBox.json b/src/main/resources/assets/actuallyadditions/models/item/blockFireworkBox.json new file mode 100644 index 000000000..0de756c02 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockFireworkBox.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockFireworkBox", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockInputter.json b/src/main/resources/assets/actuallyadditions/models/item/blockInputter.json new file mode 100644 index 000000000..3b1bbc2b4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockInputter.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockInputter", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockInputterAdvanced.json b/src/main/resources/assets/actuallyadditions/models/item/blockInputterAdvanced.json new file mode 100644 index 000000000..1bbd8209b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockInputterAdvanced.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockInputterAdvanced", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockPhantomBreaker.json b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomBreaker.json new file mode 100644 index 000000000..151d4b516 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomBreaker.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockPhantomBreaker", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockPhantomEnergyface.json b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomEnergyface.json new file mode 100644 index 000000000..9b1dd5ae4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomEnergyface.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockPhantomEnergyface", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockPhantomLiquiface.json b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomLiquiface.json new file mode 100644 index 000000000..3c723cb29 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomLiquiface.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockPhantomLiquiface", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockPhantomPlacer.json b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomPlacer.json new file mode 100644 index 000000000..9264444be --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomPlacer.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockPhantomPlacer", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockPhantomface.json b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomface.json new file mode 100644 index 000000000..ee53fe295 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomface.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockPhantomface", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file From 8f959c92aa25ce599e0a0d4b554e4c4c128b3f83 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 21:55:39 +0100 Subject: [PATCH 17/58] =?UTF-8?q?More=20Fixes=20=C2=B0~=C2=B0=20Continuing?= =?UTF-8?q?=20some=20other=20time.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mod/blocks/BlockCoffeeMachine.java | 26 ++++++++--------- .../mod/blocks/BlockColoredLamp.java | 29 ++++++++++--------- .../mod/booklet/BookletUtils.java | 17 ++++++++++- .../mod/booklet/entry/BookletEntry.java | 5 ---- .../booklet/entry/BookletEntryAllSearch.java | 4 +-- .../mod/creative/CreativeTab.java | 1 + .../tile/TileEntityDirectionalBreaker.java | 2 +- .../actuallyadditions/mod/util/WorldUtil.java | 2 +- .../item/blockColoredLampLightGray.json | 2 +- .../models/item/blockColoredLampOnBlack.json | 10 +++++++ .../models/item/blockColoredLampOnBlue.json | 10 +++++++ .../models/item/blockColoredLampOnBrown.json | 10 +++++++ .../models/item/blockColoredLampOnCyan.json | 10 +++++++ .../models/item/blockColoredLampOnGray.json | 10 +++++++ .../models/item/blockColoredLampOnGreen.json | 10 +++++++ .../item/blockColoredLampOnLightBlue.json | 10 +++++++ .../item/blockColoredLampOnLightGray.json | 10 +++++++ .../models/item/blockColoredLampOnLime.json | 10 +++++++ .../item/blockColoredLampOnMagenta.json | 10 +++++++ .../models/item/blockColoredLampOnOrange.json | 10 +++++++ .../models/item/blockColoredLampOnPink.json | 10 +++++++ .../models/item/blockColoredLampOnPurple.json | 10 +++++++ .../models/item/blockColoredLampOnRed.json | 10 +++++++ .../models/item/blockColoredLampOnWhite.json | 10 +++++++ .../models/item/blockColoredLampOnYellow.json | 10 +++++++ .../models/item/blockColoredLampRed.json | 10 +++++++ .../models/item/blockColoredLampWhite.json | 2 +- 27 files changed, 221 insertions(+), 39 deletions(-) create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBrown.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnCyan.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnGray.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLightGray.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLime.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnMagenta.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnOrange.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnPink.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnPurple.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnYellow.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockColoredLampRed.json diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java index c27be20aa..f11a14ab0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java @@ -19,14 +19,13 @@ import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockCoffeeMachine extends BlockContainerBase{ @@ -88,22 +87,21 @@ public class BlockCoffeeMachine extends BlockContainerBase{ } @Override - public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ - int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; + public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos){ + int meta = PosUtil.getMetadata(pos, world); + float f = 0.0625F; - if(rotation == 0){ - PosUtil.setMetadata(pos, world, 0, 2); + if(meta == 0){ + this.setBlockBounds(0F, 0F, 0F, 1F, 1F, 1F-f*3F); } - if(rotation == 1){ - PosUtil.setMetadata(pos, world, 3, 2); + if(meta == 1){ + this.setBlockBounds(0F, 0F, 0F, 1F-f*3F, 1F, 1F); } - if(rotation == 2){ - PosUtil.setMetadata(pos, world, 1, 2); + if(meta == 2){ + this.setBlockBounds(0F, 0F, f*3F, 1F, 1F, 1F); } - if(rotation == 3){ - PosUtil.setMetadata(pos, world, 2, 2); + if(meta == 3){ + this.setBlockBounds(f*3F, 0F, 0F, 1F, 1F, 1F); } - - super.onBlockPlacedBy(world, pos, state, player, stack); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java index 8ae5cfd8b..267c23653 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java @@ -78,21 +78,24 @@ public class BlockColoredLamp extends BlockBase{ return true; } - //Changing Colors - int[] oreIDs = OreDictionary.getOreIDs(player.getCurrentEquippedItem()); - if(oreIDs.length > 0){ - for(int oreID : oreIDs){ - String name = OreDictionary.getOreName(oreID); - TheColoredLampColors color = TheColoredLampColors.getColorFromDyeName(name); - if(color != null){ - if(PosUtil.getMetadata(pos, world) != color.ordinal()){ - if(!world.isRemote){ - PosUtil.setMetadata(pos, world, color.ordinal(), 2); - if(!player.capabilities.isCreativeMode){ - player.inventory.decrStackSize(player.inventory.currentItem, 1); + ItemStack stack = player.getCurrentEquippedItem(); + if(stack != null){ + //Changing Colors + int[] oreIDs = OreDictionary.getOreIDs(stack); + if(oreIDs.length > 0){ + for(int oreID : oreIDs){ + String name = OreDictionary.getOreName(oreID); + TheColoredLampColors color = TheColoredLampColors.getColorFromDyeName(name); + if(color != null){ + if(PosUtil.getMetadata(pos, world) != color.ordinal()){ + if(!world.isRemote){ + PosUtil.setMetadata(pos, world, color.ordinal(), 2); + if(!player.capabilities.isCreativeMode){ + player.inventory.decrStackSize(player.inventory.currentItem, 1); + } } + return true; } - return true; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java index a1705812f..2e970c778 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java @@ -206,7 +206,8 @@ public class BookletUtils{ currentEntry.chapters.clear(); for(IBookletChapter chapter : currentEntry.allChapters){ - if(chapter.getLocalizedName().toLowerCase(Locale.ROOT).contains(booklet.searchField.getText().toLowerCase(Locale.ROOT))){ + String searchFieldText = booklet.searchField.getText().toLowerCase(Locale.ROOT); + if(chapter.getLocalizedName().toLowerCase(Locale.ROOT).contains(searchFieldText) || getChapterStacksContainString(searchFieldText, chapter)){ currentEntry.chapters.add(chapter); } } @@ -218,6 +219,20 @@ public class BookletUtils{ } } + private static boolean getChapterStacksContainString(String text, IBookletChapter chapter){ + for(BookletPage page : chapter.getPages()){ + ItemStack[] pageStacks = page.getItemStacksForPage(); + if(pageStacks != null){ + for(ItemStack stack : pageStacks){ + if(stack.getDisplayName().toLowerCase(Locale.ROOT).contains(text)){ + return true; + } + } + } + } + return false; + } + @SuppressWarnings("unchecked") public static void openIndexEntry(GuiBooklet booklet, IBookletEntry entry, int page, boolean resetTextField){ booklet.searchField.setVisible(entry instanceof BookletEntryAllSearch); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntry.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntry.java index 6792f02bc..e28709ee5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntry.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntry.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.entry; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; -import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapter; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.util.EnumChatFormatting; @@ -44,10 +43,6 @@ public class BookletEntry implements IBookletEntry{ return this.chapters; } - public void addChapter(BookletChapter chapter){ - this.chapters.add(chapter); - } - @Override public String getLocalizedNameWithFormatting(){ return this.color+this.getLocalizedName(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntryAllSearch.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntryAllSearch.java index ba7e20adb..89611c055 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntryAllSearch.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/entry/BookletEntryAllSearch.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.entry; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; -import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapter; import java.util.ArrayList; import java.util.List; @@ -26,7 +25,7 @@ public class BookletEntryAllSearch extends BookletEntry{ @SuppressWarnings("unchecked") @Override - public void addChapter(BookletChapter chapter){ + public void addChapter(IBookletChapter chapter){ this.allChapters.add(chapter); this.chapters = (ArrayList)this.allChapters.clone(); } @@ -34,5 +33,6 @@ public class BookletEntryAllSearch extends BookletEntry{ @Override public void setChapters(List chapters){ this.allChapters = (ArrayList)chapters; + this.chapters = (ArrayList)this.allChapters.clone(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java b/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java index 3db5c496e..19370cc0f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java @@ -118,6 +118,7 @@ public class CreativeTab extends CreativeTabs{ add(InitBlocks.blockPillarQuartzSlab); add(InitBlocks.blockColoredLamp); + add(InitBlocks.blockColoredLampOn); add(InitBlocks.blockLampPowerer); add(InitBlocks.blockTreasureChest); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java index b5c37fb0d..255b62b43 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDirectionalBreaker.java @@ -76,7 +76,7 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock, worldObj.getBlockState(coordsBlock), 0)); if(WorldUtil.addToInventory(this, drops, false, true)){ - worldObj.playAuxSFX(2001, this.getPos(), Block.getIdFromBlock(blockToBreak)+(meta << 12)); + worldObj.playAuxSFX(2001, coordsBlock, Block.getIdFromBlock(blockToBreak)+(meta << 12)); WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.getPos(), i); WorldUtil.addToInventory(this, drops, true, true); this.storage.extractEnergy(ENERGY_USE, false); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index 73ddb426c..f4f8f69f5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -46,7 +46,7 @@ public class WorldUtil{ public static void breakBlockAtSide(EnumFacing side, World world, BlockPos pos, int offset){ BlockPos c = getCoordsFromSide(side, pos, offset); if(c != null){ - world.setBlockToAir(pos); + world.setBlockToAir(c); } } diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightGray.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightGray.json index 5eba54608..993687c00 100644 --- a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightGray.json +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampLightGray.json @@ -1,5 +1,5 @@ { - "parent": "actuallyadditions:block/blockColoredLampGray", + "parent": "actuallyadditions:block/blockColoredLampLightGray", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBlack.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBlack.json new file mode 100644 index 000000000..6a7c7f02a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBlack.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampBlackOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBlue.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBlue.json new file mode 100644 index 000000000..5b0982dec --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBlue.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampBlueOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBrown.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBrown.json new file mode 100644 index 000000000..f2dedc045 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnBrown.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampBrownOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnCyan.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnCyan.json new file mode 100644 index 000000000..69b37a498 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnCyan.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampCyanOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnGray.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnGray.json new file mode 100644 index 000000000..61bd6f1ec --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnGray.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampGrayOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnGreen.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnGreen.json new file mode 100644 index 000000000..f9c60d055 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnGreen.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampGreenOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLightBlue.json new file mode 100644 index 000000000..d59eba11b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLightBlue.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampLightBlueOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLightGray.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLightGray.json new file mode 100644 index 000000000..bd587fe0a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLightGray.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampLightGrayOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLime.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLime.json new file mode 100644 index 000000000..1d834b89c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnLime.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampLimeOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnMagenta.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnMagenta.json new file mode 100644 index 000000000..5516a153e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnMagenta.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampMagentaOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnOrange.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnOrange.json new file mode 100644 index 000000000..6b2e9eff8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnOrange.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampOrangeOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnPink.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnPink.json new file mode 100644 index 000000000..560285709 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnPink.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampPinkOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnPurple.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnPurple.json new file mode 100644 index 000000000..6d2245850 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnPurple.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampPurpleOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnRed.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnRed.json new file mode 100644 index 000000000..ac2177757 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnRed.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampRedOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnWhite.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnWhite.json new file mode 100644 index 000000000..70f0afd56 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnWhite.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampWhiteOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnYellow.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnYellow.json new file mode 100644 index 000000000..a09562909 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampOnYellow.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampYellowOn", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampRed.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampRed.json new file mode 100644 index 000000000..6970acda8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampRed.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockColoredLampRed", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampWhite.json b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampWhite.json index 5a8626d73..4467915d8 100644 --- a/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampWhite.json +++ b/src/main/resources/assets/actuallyadditions/models/item/blockColoredLampWhite.json @@ -1,5 +1,5 @@ { - "parent": "actuallyadditions:block/blockColoredLampWhite-", + "parent": "actuallyadditions:block/blockColoredLampWhite", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], From 6db479f94eaafa45ee1304a4bd512e7018aafbca Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 23:36:35 +0100 Subject: [PATCH 18/58] More stuff & special render fix testing --- specialPeopleStuff.properties | 2 +- .../render/RenderReconstructorLens.java | 2 +- .../mod/misc/cloud/SmileyCloudEasterEggs.java | 2 +- .../mod/misc/special/RenderSpecial.java | 24 ++++++++++++------- .../mod/misc/special/SpecialRenderInit.java | 3 +-- .../actuallyadditions/mod/util/AssetUtil.java | 24 +++++++++---------- 6 files changed, 31 insertions(+), 26 deletions(-) diff --git a/specialPeopleStuff.properties b/specialPeopleStuff.properties index 6425701a3..2ac022d8c 100644 --- a/specialPeopleStuff.properties +++ b/specialPeopleStuff.properties @@ -1,4 +1,4 @@ -ellpeck=ActuallyAdditions:blockMiner@0 +ellpeck=ActuallyAdditions:itemBooklet@0 dqmhose=minecraft:torch@0 twoofeight=ActuallyAdditions:blockHeatCollector@0 larixine=ActuallyAdditions:blockBlackLotus@0 \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java index 92b0645a4..f728a533b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java @@ -69,7 +69,7 @@ public class RenderReconstructorLens extends TileEntitySpecialRenderer{ } GlStateManager.scale(0.5F, 0.5F, 0.5F); - AssetUtil.renderItemInWorld(stack, 0); + AssetUtil.renderItemInWorld(stack); GlStateManager.popMatrix(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/cloud/SmileyCloudEasterEggs.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/cloud/SmileyCloudEasterEggs.java index a9d33c467..6907bb2ac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/cloud/SmileyCloudEasterEggs.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/cloud/SmileyCloudEasterEggs.java @@ -385,7 +385,7 @@ public class SmileyCloudEasterEggs{ GlStateManager.translate(-0.5F, 0.2F, leftHand ? 0.55F : -0.5F); GlStateManager.scale(0.75F, 0.75F, 0.75F); - AssetUtil.renderItemInWorld(stack, 0); + AssetUtil.renderItemInWorld(stack); GlStateManager.popMatrix(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java index c22f3a5e3..afe50f1b1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java @@ -20,6 +20,7 @@ import net.minecraft.entity.player.EnumPlayerModelParts; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraft.util.Vec3; import java.util.Calendar; @@ -32,18 +33,18 @@ public class RenderSpecial{ this.theThingToRender = stack; } - public void render(EntityPlayer player){ - if(player.isInvisible() || player.isWearing(EnumPlayerModelParts.CAPE)){ + public void render(EntityPlayer player, float partialTicks){ + if(player.isInvisible() || !player.isWearing(EnumPlayerModelParts.CAPE)){ return; } boolean isBlock = this.theThingToRender.getItem() instanceof ItemBlock; - float size = isBlock ? 0.3F : 0.4F; + float size = isBlock ? 0.5F : 0.6F; double offsetUp = isBlock ? 0F : 0.2F; if(ClientProxy.pumpkinBlurPumpkinBlur){ this.theThingToRender = new ItemStack(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)%2 == 0 ? Blocks.lit_pumpkin : Blocks.pumpkin); - size = 0.3F; + size = 0.5F; offsetUp = 0; } @@ -56,15 +57,20 @@ public class RenderSpecial{ } GlStateManager.pushMatrix(); - GlStateManager.translate(0D, -0.775D+offsetUp, 0D); + + Vec3 currentPos = Minecraft.getMinecraft().thePlayer.getPositionEyes(partialTicks); + Vec3 playerPos = player.getPositionEyes(partialTicks); + GlStateManager.translate(playerPos.xCoord-currentPos.xCoord, playerPos.yCoord-currentPos.yCoord-(player.isSneaking() || Minecraft.getMinecraft().thePlayer.isSneaking() ? 0.125D : 0D), playerPos.zCoord-currentPos.zCoord); + + GlStateManager.translate(0D, 2.535D+offsetUp, 0D); GlStateManager.rotate(180F, 1.0F, 0.0F, 1.0F); GlStateManager.scale(size, size, size); if(time-(bobHeight/2) >= lastTimeForBobbing){ - GlStateManager.translate(0, (time-this.lastTimeForBobbing)/100, 0); + GlStateManager.translate(0D, (time-this.lastTimeForBobbing)/100D, 0D); } else{ - GlStateManager.translate(0, -(time-lastTimeForBobbing)/100+bobHeight/100, 0); + GlStateManager.translate(0D, -(time-lastTimeForBobbing)/100D+bobHeight/100D, 0D); } GlStateManager.rotate((float)(theTime/20), 0, 1, 0); @@ -75,8 +81,8 @@ public class RenderSpecial{ AssetUtil.renderBlockInWorld(Block.getBlockFromItem(this.theThingToRender.getItem()), this.theThingToRender.getItemDamage()); } else{ - GlStateManager.translate(-0.5F, 0F, 0F); - AssetUtil.renderItemInWorld(this.theThingToRender, 0); + GlStateManager.translate(-0.5D, 0D, 0D); + AssetUtil.renderItemInWorld(this.theThingToRender); } } GlStateManager.enableLighting(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index e86f3323f..3bf0f506e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -68,14 +68,13 @@ public class SpecialRenderInit{ } @SubscribeEvent(priority = EventPriority.HIGHEST) - //TODO Fix floating item public void onPlayerRender(RenderPlayerEvent.Pre event){ if(!specialList.isEmpty()){ for(Map.Entry entry : specialList.entrySet()){ //Does the player have one of the names from the list? if(StringUtil.equalsToLowerCase(entry.getKey(), event.entityPlayer.getName())){ //Render the special Item/Block - entry.getValue().render(event.entityPlayer); + entry.getValue().render(event.entityPlayer, event.partialRenderTick); break; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index a448d5ed0..4870fa947 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -18,6 +18,7 @@ import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; @@ -53,22 +54,21 @@ public class AssetUtil{ } @SideOnly(Side.CLIENT) - public static void renderItemInWorld(ItemStack stack, int renderPass){ - //TODO Fix rendering items in world - /*IIcon icon = stack.getItem().getIcon(stack, renderPass); - float f = icon.getMinU(); - float f1 = icon.getMaxU(); - float f2 = icon.getMinV(); - float f3 = icon.getMaxV(); - Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); - ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F/16F);*/ + public static void renderItemInWorld(ItemStack stack){ + GlStateManager.pushMatrix(); + GlStateManager.disableLighting(); + GlStateManager.pushAttrib(); + RenderHelper.enableStandardItemLighting(); + Minecraft.getMinecraft().getRenderItem().renderItem(stack, TransformType.FIXED); + RenderHelper.disableStandardItemLighting(); + GlStateManager.popAttrib(); + GlStateManager.enableLighting(); + GlStateManager.popMatrix(); } @SideOnly(Side.CLIENT) public static void renderBlockInWorld(Block block, int meta){ - //TODO Fix rendering blocks in world - /*Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); - RenderBlocks.getInstance().renderBlockAsItem(block, meta, 1F);*/ + renderItemInWorld(new ItemStack(block, 1, meta)); } @SideOnly(Side.CLIENT) From 2babb6cf0b57bbeaedb8b94973df14bfc9528490 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 9 Jan 2016 00:04:30 +0100 Subject: [PATCH 19/58] Some more texture work, fixed Special Render for items --- .../mod/blocks/render/RenderInventory.java | 48 ------------------- .../mod/misc/special/RenderSpecial.java | 15 +++--- .../mod/misc/special/SpecialRenderInit.java | 1 + .../mod/proxy/ClientProxy.java | 24 ++++------ .../mod/tile/TileEntityXPSolidifier.java | 1 + .../actuallyadditions/mod/util/AssetUtil.java | 9 ---- .../actuallyadditions/mod/util/WorldUtil.java | 1 - .../blockstates/blockXPSolidifier.json | 8 ++++ .../models/block/blockXPSolidifier.json | 12 +++++ .../models/item/blockXPSolidifier.json | 10 ++++ 10 files changed, 48 insertions(+), 81 deletions(-) delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockXPSolidifier.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockXPSolidifier.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockXPSolidifier.json diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java deleted file mode 100644 index a24babb8f..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderInventory.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This file ("RenderInventory.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render; - -//TODO Fix the rendering handler -public class RenderInventory{ - - private RenderTileEntity tileRender; - private int renderID; - - public RenderInventory(RenderTileEntity tileRender, int renderID){ - this.tileRender = tileRender; - this.renderID = renderID; - } - - /*@Override - public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer){ - GlStateManager.glPushMatrix(); - Minecraft.getMinecraft().renderEngine.bindTexture(this.tileRender.resLoc); - GlStateManager.glTranslatef(0F, 1F, 0F); - GlStateManager.glRotatef(180F, 1F, 0F, 0F); - this.tileRender.theModel.render(0.0625F); - GlStateManager.glPopMatrix(); - } - - @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 this.renderID; - }*/ -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java index afe50f1b1..e37be527d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java @@ -38,16 +38,14 @@ public class RenderSpecial{ return; } - boolean isBlock = this.theThingToRender.getItem() instanceof ItemBlock; - float size = isBlock ? 0.5F : 0.6F; - double offsetUp = isBlock ? 0F : 0.2F; - if(ClientProxy.pumpkinBlurPumpkinBlur){ this.theThingToRender = new ItemStack(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)%2 == 0 ? Blocks.lit_pumpkin : Blocks.pumpkin); - size = 0.5F; - offsetUp = 0; } + boolean isBlock = this.theThingToRender.getItem() instanceof ItemBlock; + float size = isBlock ? 0.5F : 0.4F; + double offsetUp = isBlock ? 0D : 0.1875D; + double bobHeight = 70; double theTime = Minecraft.getSystemTime(); double time = theTime/50; @@ -81,8 +79,11 @@ public class RenderSpecial{ AssetUtil.renderBlockInWorld(Block.getBlockFromItem(this.theThingToRender.getItem()), this.theThingToRender.getItemDamage()); } else{ - GlStateManager.translate(-0.5D, 0D, 0D); + GlStateManager.pushMatrix(); + GlStateManager.translate(0D, 0.5D, 0D); + GlStateManager.rotate(180F, 1F, 0F, 0F); AssetUtil.renderItemInWorld(this.theThingToRender); + GlStateManager.popMatrix(); } } GlStateManager.enableLighting(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index 3bf0f506e..9fffe9530 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -62,6 +62,7 @@ public class SpecialRenderInit{ //Add a new Special Renderer to the list if(stack != null){ specialList.put(key, new RenderSpecial(stack)); + System.out.println(stack.toString()); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index 012f45116..713ef1337 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -20,7 +20,6 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.event.InitEvents; import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit; import de.ellpeck.actuallyadditions.mod.tile.*; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentClientData; import net.minecraft.client.Minecraft; @@ -28,7 +27,6 @@ import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @@ -77,14 +75,14 @@ public class ClientProxy implements IProxy{ InitEvents.initClient(); - registerRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost()), AssetUtil.compostRenderId); - registerRenderer(TileEntityFishingNet.class, new RenderTileEntity(new ModelFishingNet()), AssetUtil.fishingNetRenderId); - registerRenderer(TileEntityFurnaceSolar.class, new RenderTileEntity(new ModelFurnaceSolar()), AssetUtil.furnaceSolarRenderId); - registerRenderer(TileEntityCoffeeMachine.class, new RenderTileEntity(new ModelCoffeeMachine()), AssetUtil.coffeeMachineRenderId); - registerRenderer(TileEntityPhantomBooster.class, new RenderTileEntity(new ModelPhantomBooster()), AssetUtil.phantomBoosterRenderId); - registerRenderer(TileEntitySmileyCloud.class, new RenderSmileyCloud(new ModelSmileyCloud()), AssetUtil.smileyCloudRenderId); - registerRenderer(TileEntityLaserRelay.class, new RenderLaserRelay(new ModelLaserRelay()), AssetUtil.laserRelayRenderId); - registerRenderer(TileEntityBookletStand.class, new RenderTileEntity(new ModelBookletStand()), AssetUtil.bookletStandRenderId); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost())); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFishingNet.class, new RenderTileEntity(new ModelFishingNet())); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFurnaceSolar.class, new RenderTileEntity(new ModelFurnaceSolar())); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCoffeeMachine.class, new RenderTileEntity(new ModelCoffeeMachine())); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPhantomBooster.class, new RenderTileEntity(new ModelPhantomBooster())); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmileyCloud.class, new RenderSmileyCloud(new ModelSmileyCloud())); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLaserRelay.class, new RenderLaserRelay(new ModelLaserRelay())); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBookletStand.class, new RenderTileEntity(new ModelBookletStand())); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAtomicReconstructor.class, new RenderReconstructorLens()); //TODO Fix villager @@ -111,10 +109,4 @@ public class ClientProxy implements IProxy{ public void addRenderVariant(Item item, ResourceLocation[] location){ modelVariantsForRegistering.put(item, location); } - - private static void registerRenderer(Class tileClass, RenderTileEntity tileRender, int renderID){ - ClientRegistry.bindTileEntitySpecialRenderer(tileClass, tileRender); - //TODO Fix inventory rendering - //RenderingRegistry.registerBlockHandler(new RenderInventory(tileRender, renderID)); - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java index 124dd30eb..8561761f6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java @@ -95,6 +95,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I } } + //TODO Fix XP System to fit points needed in 1.8 (OpenBlocks?) /** * Gets the Player's XP * (Excerpted from OpenBlocks' XP system with permission, thanks guys!) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 4870fa947..3eee47264 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -31,15 +31,6 @@ public class AssetUtil{ public static final ResourceLocation GUI_INVENTORY_LOCATION = getGuiLocation("guiInventory"); public static final int TESR_RENDER_ID = 2; - public static int compostRenderId; - public static int fishingNetRenderId; - public static int furnaceSolarRenderId; - public static int coffeeMachineRenderId; - public static int phantomBoosterRenderId; - public static int smileyCloudRenderId; - public static int laserRelayRenderId; - public static int bookletStandRenderId; - public static ResourceLocation getGuiLocation(String file){ return new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/gui/"+file+".png"); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index f4f8f69f5..17cc3c5d8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -398,7 +398,6 @@ public class WorldUtil{ } else{ //Check the Server if a Block that changed on the Client really changed, if not, revert the change - //TODO Check if this is the right action Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.STOP_DESTROY_BLOCK, pos, Minecraft.getMinecraft().objectMouseOver.sideHit)); } return removed; diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockXPSolidifier.json b/src/main/resources/assets/actuallyadditions/blockstates/blockXPSolidifier.json new file mode 100644 index 000000000..2f4234c7a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockXPSolidifier.json @@ -0,0 +1,8 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockXPSolidifier", "y": 0 }, + "meta=1": { "model": "actuallyadditions:blockXPSolidifier", "y": 180 }, + "meta=2": { "model": "actuallyadditions:blockXPSolidifier", "y": -90 }, + "meta=3": { "model": "actuallyadditions:blockXPSolidifier", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockXPSolidifier.json b/src/main/resources/assets/actuallyadditions/models/block/blockXPSolidifier.json new file mode 100644 index 000000000..e4b14ae63 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockXPSolidifier.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockXPSolidifier", + "down": "actuallyadditions:blocks/blockXPSolidifierTop", + "up": "actuallyadditions:blocks/blockXPSolidifierTop", + "north": "actuallyadditions:blocks/blockXPSolidifierFront", + "east": "actuallyadditions:blocks/blockXPSolidifier", + "south": "actuallyadditions:blocks/blockXPSolidifier", + "west": "actuallyadditions:blocks/blockXPSolidifier" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockXPSolidifier.json b/src/main/resources/assets/actuallyadditions/models/item/blockXPSolidifier.json new file mode 100644 index 000000000..25c5378a7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockXPSolidifier.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockXPSolidifier", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file From fec10edbc2707c1310204bed752ab39fd553dd9c Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 9 Jan 2016 02:36:43 +0100 Subject: [PATCH 20/58] Loooots more texture work. Okay, I'm done for today. --- .../mod/blocks/BlockGreenhouseGlass.java | 18 ++++++++++++++++++ .../mod/blocks/BlockMisc.java | 14 ++++++++++++++ .../render/RenderReconstructorLens.java | 6 ------ .../mod/items/ItemDrill.java | 17 +++++++++++++---- .../mod/items/base/ItemAllToolAA.java | 3 ++- .../mod/misc/special/SpecialRenderInit.java | 1 - .../mod/proxy/ClientProxy.java | 2 +- .../actuallyadditions/mod/proxy/IProxy.java | 2 +- .../mod/proxy/ServerProxy.java | 2 +- .../blockstates/blockBreaker.json | 10 ++++++++++ .../blockstates/blockCanolaPress.json | 5 +++++ .../blockstates/blockCoalGenerator.json | 6 ++++++ .../blockstates/blockDirectionalBreaker.json | 10 ++++++++++ .../blockstates/blockDropper.json | 10 ++++++++++ .../blockstates/blockEnergizer.json | 5 +++++ .../blockstates/blockEnervator.json | 5 +++++ .../blockstates/blockFeeder.json | 5 +++++ .../blockstates/blockFermentingBarrel.json | 5 +++++ .../blockstates/blockFluidCollector.json | 10 ++++++++++ .../blockstates/blockFluidPlacer.json | 10 ++++++++++ .../blockstates/blockFurnaceDouble.json | 12 ++++++++++++ .../blockstates/blockGiantChest.json | 5 +++++ .../blockstates/blockGreenhouseGlass.json | 5 +++++ .../blockstates/blockGrinderDouble.json | 6 ++++++ .../blockstates/blockHeatCollector.json | 5 +++++ .../blockstates/blockItemRepairer.json | 5 +++++ .../blockstates/blockLampPowerer.json | 10 ++++++++++ .../blockLavaFactoryController.json | 5 +++++ .../blockstates/blockLeafGenerator.json | 5 +++++ .../blockstates/blockMiner.json | 5 +++++ .../blockstates/blockMisc.json | 14 ++++++++++++++ .../blockstates/blockOilGenerator.json | 6 ++++++ .../blockstates/blockPlacer.json | 10 ++++++++++ .../blockstates/blockRangedCollector.json | 5 +++++ .../blockTestifiBucksGreenWall.json | 5 +++++ .../blockTestifiBucksWhiteWall.json | 5 +++++ .../blockstates/blockTreasureChest.json | 8 ++++++++ .../models/block/blockBreaker.json | 12 ++++++++++++ .../models/block/blockCanolaPress.json | 12 ++++++++++++ .../models/block/blockCoalGenerator.json | 12 ++++++++++++ .../models/block/blockDirectionalBreaker.json | 12 ++++++++++++ .../models/block/blockDropper.json | 12 ++++++++++++ .../models/block/blockEnergizer.json | 12 ++++++++++++ .../models/block/blockEnervator.json | 12 ++++++++++++ .../models/block/blockFeeder.json | 12 ++++++++++++ .../models/block/blockFermentingBarrel.json | 12 ++++++++++++ .../models/block/blockFluidCollector.json | 12 ++++++++++++ .../models/block/blockFluidPlacer.json | 12 ++++++++++++ .../models/block/blockFurnaceDouble.json | 12 ++++++++++++ .../models/block/blockFurnaceDoubleOn.json | 12 ++++++++++++ .../models/block/blockGiantChest.json | 12 ++++++++++++ .../models/block/blockGreenhouseGlass.json | 6 ++++++ .../models/block/blockGrinderDouble.json | 12 ++++++++++++ .../models/block/blockGrinderDoubleOn.json | 12 ++++++++++++ .../models/block/blockHeatCollector.json | 12 ++++++++++++ .../models/block/blockItemRepairer.json | 12 ++++++++++++ .../models/block/blockLampPowerer.json | 12 ++++++++++++ .../block/blockLavaFactoryController.json | 12 ++++++++++++ .../models/block/blockLeafGenerator.json | 12 ++++++++++++ .../models/block/blockMiner.json | 12 ++++++++++++ .../models/block/blockMiscBlackQuartz.json | 6 ++++++ .../block/blockMiscBlackQuartzChiseled.json | 6 ++++++ .../block/blockMiscBlackQuartzPillar.json | 6 ++++++ .../models/block/blockMiscCharcoal.json | 6 ++++++ .../models/block/blockMiscEnderCasing.json | 6 ++++++ .../models/block/blockMiscEnderpearl.json | 6 ++++++ .../models/block/blockMiscIronCasing.json | 6 ++++++ .../block/blockMiscLavaFactoryCase.json | 6 ++++++ .../models/block/blockMiscOreBlackQuartz.json | 6 ++++++ .../models/block/blockMiscWoodCasing.json | 6 ++++++ .../models/block/blockOilGenerator.json | 12 ++++++++++++ .../models/block/blockPlacer.json | 12 ++++++++++++ .../models/block/blockRangedCollector.json | 6 ++++++ .../block/blockTestifiBucksGreenWall.json | 6 ++++++ .../block/blockTestifiBucksWhiteWall.json | 6 ++++++ .../models/block/blockTreasureChest.json | 12 ++++++++++++ .../models/item/blockBreaker.json | 10 ++++++++++ .../models/item/blockCanolaPress.json | 10 ++++++++++ .../models/item/blockCoalGenerator.json | 10 ++++++++++ .../models/item/blockDirectionalBreaker.json | 10 ++++++++++ .../models/item/blockDropper.json | 10 ++++++++++ .../models/item/blockEnergizer.json | 10 ++++++++++ .../models/item/blockEnervator.json | 10 ++++++++++ .../models/item/blockFeeder.json | 10 ++++++++++ .../models/item/blockFermentingBarrel.json | 10 ++++++++++ .../models/item/blockFluidCollector.json | 10 ++++++++++ .../models/item/blockFluidPlacer.json | 10 ++++++++++ .../models/item/blockFurnaceDouble.json | 10 ++++++++++ .../models/item/blockGiantChest.json | 10 ++++++++++ .../models/item/blockGreenhouseGlass.json | 10 ++++++++++ .../models/item/blockGrinderDouble.json | 10 ++++++++++ .../models/item/blockHeatCollector.json | 10 ++++++++++ .../models/item/blockItemRepairer.json | 10 ++++++++++ .../models/item/blockLampPowerer.json | 10 ++++++++++ .../item/blockLavaFactoryController.json | 10 ++++++++++ .../models/item/blockLeafGenerator.json | 10 ++++++++++ .../models/item/blockMiner.json | 10 ++++++++++ .../models/item/blockMiscBlackQuartz.json | 10 ++++++++++ .../item/blockMiscBlackQuartzChiseled.json | 10 ++++++++++ .../item/blockMiscBlackQuartzPillar.json | 10 ++++++++++ .../models/item/blockMiscCharcoal.json | 10 ++++++++++ .../models/item/blockMiscEnderCasing.json | 10 ++++++++++ .../models/item/blockMiscEnderpearl.json | 10 ++++++++++ .../models/item/blockMiscIronCasing.json | 10 ++++++++++ .../models/item/blockMiscLavaFactoryCase.json | 10 ++++++++++ .../models/item/blockMiscOreBlackQuartz.json | 10 ++++++++++ .../models/item/blockMiscWoodCasing.json | 10 ++++++++++ .../models/item/blockOilGenerator.json | 10 ++++++++++ .../models/item/blockPlacer.json | 10 ++++++++++ .../models/item/blockRangedCollector.json | 10 ++++++++++ .../item/blockTestifiBucksGreenWall.json | 10 ++++++++++ .../item/blockTestifiBucksWhiteWall.json | 10 ++++++++++ .../models/item/blockTreasureChest.json | 10 ++++++++++ .../models/item/itemChestToCrateUpgrade.json | 18 ++++++++++++++++++ .../models/item/itemColorLens.json | 18 ++++++++++++++++++ .../models/item/itemCrateKeeper.json | 18 ++++++++++++++++++ .../models/item/itemDamageLens.json | 18 ++++++++++++++++++ .../models/item/itemDrillBlack.json | 18 ++++++++++++++++++ .../models/item/itemDrillBlue.json | 18 ++++++++++++++++++ .../models/item/itemDrillBrown.json | 18 ++++++++++++++++++ .../models/item/itemDrillCyan.json | 18 ++++++++++++++++++ .../models/item/itemDrillGray.json | 18 ++++++++++++++++++ .../models/item/itemDrillGreen.json | 18 ++++++++++++++++++ .../models/item/itemDrillLightBlue.json | 18 ++++++++++++++++++ .../models/item/itemDrillLightGray.json | 18 ++++++++++++++++++ .../models/item/itemDrillLime.json | 18 ++++++++++++++++++ .../models/item/itemDrillMagenta.json | 18 ++++++++++++++++++ .../models/item/itemDrillOrange.json | 18 ++++++++++++++++++ .../models/item/itemDrillPink.json | 18 ++++++++++++++++++ .../models/item/itemDrillPurple.json | 18 ++++++++++++++++++ .../models/item/itemDrillRed.json | 18 ++++++++++++++++++ .../item/itemDrillUpgradeBlockPlacing.json | 18 ++++++++++++++++++ .../item/itemDrillUpgradeFiveByFive.json | 18 ++++++++++++++++++ .../models/item/itemDrillUpgradeFortune.json | 18 ++++++++++++++++++ .../item/itemDrillUpgradeFortuneII.json | 18 ++++++++++++++++++ .../item/itemDrillUpgradeSilkTouch.json | 18 ++++++++++++++++++ .../models/item/itemDrillUpgradeSpeed.json | 18 ++++++++++++++++++ .../models/item/itemDrillUpgradeSpeedII.json | 18 ++++++++++++++++++ .../models/item/itemDrillUpgradeSpeedIII.json | 18 ++++++++++++++++++ .../item/itemDrillUpgradeThreeByThree.json | 18 ++++++++++++++++++ .../models/item/itemDrillWhite.json | 18 ++++++++++++++++++ .../models/item/itemDrillYellow.json | 18 ++++++++++++++++++ .../models/item/itemExplosionLens.json | 18 ++++++++++++++++++ .../models/item/itemLaserWrench.json | 18 ++++++++++++++++++ .../models/item/itemPaxel.json | 19 +++++++++++++++++++ 145 files changed, 1578 insertions(+), 15 deletions(-) create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockBreaker.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockCanolaPress.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockCoalGenerator.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockDirectionalBreaker.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockDropper.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockEnergizer.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockEnervator.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockFeeder.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockFermentingBarrel.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockFluidCollector.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockFluidPlacer.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockFurnaceDouble.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockGiantChest.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockGreenhouseGlass.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockGrinderDouble.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockHeatCollector.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockItemRepairer.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockLampPowerer.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockLavaFactoryController.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockLeafGenerator.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockMiner.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockMisc.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockOilGenerator.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockPlacer.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockRangedCollector.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenWall.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteWall.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockTreasureChest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockBreaker.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCanolaPress.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCoalGenerator.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockDirectionalBreaker.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockDropper.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockEnergizer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockEnervator.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFeeder.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFermentingBarrel.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFluidCollector.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFluidPlacer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFurnaceDouble.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFurnaceDoubleOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockGiantChest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockGreenhouseGlass.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockGrinderDouble.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockGrinderDoubleOn.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockHeatCollector.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockItemRepairer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockLampPowerer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockLavaFactoryController.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockLeafGenerator.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiner.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartzChiseled.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartzPillar.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiscCharcoal.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiscEnderCasing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiscEnderpearl.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiscIronCasing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiscLavaFactoryCase.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiscOreBlackQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockMiscWoodCasing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockOilGenerator.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPlacer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockRangedCollector.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenWall.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteWall.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTreasureChest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockBreaker.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCanolaPress.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCoalGenerator.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockDirectionalBreaker.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockDropper.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockEnergizer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockEnervator.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockFeeder.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockFermentingBarrel.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockFluidCollector.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockFluidPlacer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockFurnaceDouble.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockGiantChest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockGreenhouseGlass.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockGrinderDouble.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockHeatCollector.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockItemRepairer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockLampPowerer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockLavaFactoryController.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockLeafGenerator.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiner.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartzChiseled.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartzPillar.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiscCharcoal.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiscEnderCasing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiscEnderpearl.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiscIronCasing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiscLavaFactoryCase.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiscOreBlackQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockMiscWoodCasing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockOilGenerator.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockPlacer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockRangedCollector.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenWall.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteWall.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockTreasureChest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemChestToCrateUpgrade.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemColorLens.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCrateKeeper.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDamageLens.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillBrown.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillCyan.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillGray.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillLightGray.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillLime.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillMagenta.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillOrange.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillPink.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillPurple.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeBlockPlacing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFiveByFive.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFortune.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFortuneII.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSilkTouch.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeedII.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeedIII.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeThreeByThree.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDrillYellow.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemExplosionLens.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemLaserWrench.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPaxel.json diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java index db6347c23..4812e0bd0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java @@ -12,11 +12,16 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGreenhouseGlass; +import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumWorldBlockLayer; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -37,6 +42,11 @@ public class BlockGreenhouseGlass extends BlockContainerBase{ return EnumWorldBlockLayer.CUTOUT; } + @Override + public boolean isFullCube(){ + return false; + } + @Override public boolean isOpaqueCube(){ return false; @@ -52,4 +62,12 @@ public class BlockGreenhouseGlass extends BlockContainerBase{ return new TileEntityGreenhouseGlass(); } + @Override + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockAccess worldIn, BlockPos pos, EnumFacing side){ + IBlockState state = worldIn.getBlockState(pos); + Block block = state.getBlock(); + return worldIn.getBlockState(pos.offset(side.getOpposite())) != state || block != this && block != this && super.shouldSideBeRendered(worldIn, pos, side); + + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java index 52106f979..df65d4e48 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java @@ -10,9 +10,11 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -22,6 +24,7 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -49,6 +52,17 @@ public class BlockMisc extends BlockBase{ return this.getMetaFromState(state); } + @Override + protected void registerRendering(){ + ResourceLocation[] resLocs = new ResourceLocation[allMiscBlocks.length]; + for(int i = 0; i < allMiscBlocks.length; i++){ + String name = this.getBaseName()+allMiscBlocks[i].name; + resLocs[i] = new ResourceLocation(ModUtil.MOD_ID_LOWER, name); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, name)); + } + ActuallyAdditions.proxy.addRenderVariant(Item.getItemFromBlock(this), resLocs); + } + @SuppressWarnings("all") @SideOnly(Side.CLIENT) public void getSubBlocks(Item item, CreativeTabs tab, List list){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java index f728a533b..012edb494 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java @@ -37,34 +37,28 @@ public class RenderReconstructorLens extends TileEntitySpecialRenderer{ int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); if(meta == 0){ GlStateManager.translate(0F, -0.5F, 0F); - GlStateManager.translate(-0.25F, 0F, -0.25F); GlStateManager.rotate(90F, 1F, 0F, 0F); } if(meta == 1){ GlStateManager.translate(0F, -1.5F-0.5F/16F, 0F); - GlStateManager.translate(-0.25F, 0F, -0.25F); GlStateManager.rotate(90F, 1F, 0F, 0F); } if(meta == 2){ GlStateManager.translate(0F, -1F, 0F); GlStateManager.translate(0F, 0F, -0.5F); - GlStateManager.translate(-0.25F, -0.25F, 0F); } if(meta == 3){ GlStateManager.translate(0F, -1F, 0F); GlStateManager.translate(0F, 0F, 0.5F+0.5F/16F); - GlStateManager.translate(-0.25F, -0.25F, 0F); } if(meta == 4){ GlStateManager.translate(0F, -1F, 0F); GlStateManager.translate(0.5F+0.5F/16F, 0F, 0F); - GlStateManager.translate(0F, -0.25F, 0.25F); GlStateManager.rotate(90F, 0F, 1F, 0F); } if(meta == 5){ GlStateManager.translate(0F, -1F, 0F); GlStateManager.translate(-0.5F, 0F, 0F); - GlStateManager.translate(0F, -0.25F, 0.25F); GlStateManager.rotate(90F, 0F, 1F, 0F); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java index bc072ef5f..556d45123 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items; import cofh.api.energy.IEnergyContainerItem; import com.google.common.collect.Multimap; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; @@ -37,10 +38,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.BlockPos; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.fml.relauncher.Side; @@ -109,6 +107,17 @@ public class ItemDrill extends ItemEnergy{ return false; } + @Override + protected void registerRendering(){ + ResourceLocation[] resLocs = new ResourceLocation[16]; + for(int i = 0; i < 16; i++){ + String name = this.getBaseName()+TheColoredLampColors.values()[i].name; + resLocs[i] = new ResourceLocation(ModUtil.MOD_ID_LOWER, name); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, name)); + } + ActuallyAdditions.proxy.addRenderVariant(this, resLocs); + } + /** * Checks if a certain Upgrade is installed and returns it as an ItemStack * diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java index 4c70b1aac..44c7469df 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java @@ -81,7 +81,8 @@ public class ItemAllToolAA extends ItemTool{ } protected void registerRendering(){ - ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, "itemPaxel")); + ActuallyAdditions.proxy.addRenderVariant(this, new ResourceLocation(ModUtil.MOD_ID_LOWER, "itemPaxel")); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index 9fffe9530..3bf0f506e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -62,7 +62,6 @@ public class SpecialRenderInit{ //Add a new Special Renderer to the list if(stack != null){ specialList.put(key, new RenderSpecial(stack)); - System.out.println(stack.toString()); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index 713ef1337..7b51a382a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -106,7 +106,7 @@ public class ClientProxy implements IProxy{ } @Override - public void addRenderVariant(Item item, ResourceLocation[] location){ + public void addRenderVariant(Item item, ResourceLocation... location){ modelVariantsForRegistering.put(item, location); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java index dbe269822..e15121884 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/IProxy.java @@ -27,5 +27,5 @@ public interface IProxy{ void addRenderRegister(ItemStack stack, ResourceLocation location); - void addRenderVariant(Item item, ResourceLocation[] location); + void addRenderVariant(Item item, ResourceLocation... location); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java index f11427f56..cd4b73a1c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ServerProxy.java @@ -42,7 +42,7 @@ public class ServerProxy implements IProxy{ } @Override - public void addRenderVariant(Item item, ResourceLocation[] location){ + public void addRenderVariant(Item item, ResourceLocation... location){ } } diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockBreaker.json b/src/main/resources/assets/actuallyadditions/blockstates/blockBreaker.json new file mode 100644 index 000000000..396b125a6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockBreaker.json @@ -0,0 +1,10 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockBreaker", "x": 90 }, + "meta=1": { "model": "actuallyadditions:blockBreaker", "x": -90 }, + "meta=2": { "model": "actuallyadditions:blockBreaker", "y": 0 }, + "meta=3": { "model": "actuallyadditions:blockBreaker", "y": 180 }, + "meta=4": { "model": "actuallyadditions:blockBreaker", "y": 270 }, + "meta=5": { "model": "actuallyadditions:blockBreaker", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockCanolaPress.json b/src/main/resources/assets/actuallyadditions/blockstates/blockCanolaPress.json new file mode 100644 index 000000000..81b6bb56e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockCanolaPress.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockCanolaPress" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockCoalGenerator.json b/src/main/resources/assets/actuallyadditions/blockstates/blockCoalGenerator.json new file mode 100644 index 000000000..629168a6e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockCoalGenerator.json @@ -0,0 +1,6 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockCoalGenerator" }, + "meta=1": { "model": "actuallyadditions:blockCoalGenerator" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockDirectionalBreaker.json b/src/main/resources/assets/actuallyadditions/blockstates/blockDirectionalBreaker.json new file mode 100644 index 000000000..56bb9e166 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockDirectionalBreaker.json @@ -0,0 +1,10 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockDirectionalBreaker", "x": 90 }, + "meta=1": { "model": "actuallyadditions:blockDirectionalBreaker", "x": -90 }, + "meta=2": { "model": "actuallyadditions:blockDirectionalBreaker", "y": 0 }, + "meta=3": { "model": "actuallyadditions:blockDirectionalBreaker", "y": 180 }, + "meta=4": { "model": "actuallyadditions:blockDirectionalBreaker", "y": 270 }, + "meta=5": { "model": "actuallyadditions:blockDirectionalBreaker", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockDropper.json b/src/main/resources/assets/actuallyadditions/blockstates/blockDropper.json new file mode 100644 index 000000000..fe8697b5b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockDropper.json @@ -0,0 +1,10 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockDropper", "x": 90 }, + "meta=1": { "model": "actuallyadditions:blockDropper", "x": -90 }, + "meta=2": { "model": "actuallyadditions:blockDropper", "y": 0 }, + "meta=3": { "model": "actuallyadditions:blockDropper", "y": 180 }, + "meta=4": { "model": "actuallyadditions:blockDropper", "y": 270 }, + "meta=5": { "model": "actuallyadditions:blockDropper", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockEnergizer.json b/src/main/resources/assets/actuallyadditions/blockstates/blockEnergizer.json new file mode 100644 index 000000000..37a15905b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockEnergizer.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockEnergizer" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockEnervator.json b/src/main/resources/assets/actuallyadditions/blockstates/blockEnervator.json new file mode 100644 index 000000000..e8bae04d1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockEnervator.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockEnervator" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockFeeder.json b/src/main/resources/assets/actuallyadditions/blockstates/blockFeeder.json new file mode 100644 index 000000000..aa07fa7dc --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockFeeder.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockFeeder" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockFermentingBarrel.json b/src/main/resources/assets/actuallyadditions/blockstates/blockFermentingBarrel.json new file mode 100644 index 000000000..3f6c9ff84 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockFermentingBarrel.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockFermentingBarrel" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockFluidCollector.json b/src/main/resources/assets/actuallyadditions/blockstates/blockFluidCollector.json new file mode 100644 index 000000000..b6b6a8108 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockFluidCollector.json @@ -0,0 +1,10 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockFluidCollector", "x": 90 }, + "meta=1": { "model": "actuallyadditions:blockFluidCollector", "x": -90 }, + "meta=2": { "model": "actuallyadditions:blockFluidCollector", "y": 0 }, + "meta=3": { "model": "actuallyadditions:blockFluidCollector", "y": 180 }, + "meta=4": { "model": "actuallyadditions:blockFluidCollector", "y": 270 }, + "meta=5": { "model": "actuallyadditions:blockFluidCollector", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockFluidPlacer.json b/src/main/resources/assets/actuallyadditions/blockstates/blockFluidPlacer.json new file mode 100644 index 000000000..de0a72aba --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockFluidPlacer.json @@ -0,0 +1,10 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockFluidPlacer", "x": 90 }, + "meta=1": { "model": "actuallyadditions:blockFluidPlacer", "x": -90 }, + "meta=2": { "model": "actuallyadditions:blockFluidPlacer", "y": 0 }, + "meta=3": { "model": "actuallyadditions:blockFluidPlacer", "y": 180 }, + "meta=4": { "model": "actuallyadditions:blockFluidPlacer", "y": 270 }, + "meta=5": { "model": "actuallyadditions:blockFluidPlacer", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockFurnaceDouble.json b/src/main/resources/assets/actuallyadditions/blockstates/blockFurnaceDouble.json new file mode 100644 index 000000000..bd12b0819 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockFurnaceDouble.json @@ -0,0 +1,12 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockFurnaceDouble", "y": 0 }, + "meta=1": { "model": "actuallyadditions:blockFurnaceDouble", "y": 180 }, + "meta=2": { "model": "actuallyadditions:blockFurnaceDouble", "y": -90 }, + "meta=3": { "model": "actuallyadditions:blockFurnaceDouble", "y": 90 }, + "meta=4": { "model": "actuallyadditions:blockFurnaceDoubleOn", "y": 0 }, + "meta=5": { "model": "actuallyadditions:blockFurnaceDoubleOn", "y": 180 }, + "meta=6": { "model": "actuallyadditions:blockFurnaceDoubleOn", "y": -90 }, + "meta=7": { "model": "actuallyadditions:blockFurnaceDoubleOn", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockGiantChest.json b/src/main/resources/assets/actuallyadditions/blockstates/blockGiantChest.json new file mode 100644 index 000000000..00ab60b35 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockGiantChest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockGiantChest" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockGreenhouseGlass.json b/src/main/resources/assets/actuallyadditions/blockstates/blockGreenhouseGlass.json new file mode 100644 index 000000000..efe19b072 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockGreenhouseGlass.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockGreenhouseGlass" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockGrinderDouble.json b/src/main/resources/assets/actuallyadditions/blockstates/blockGrinderDouble.json new file mode 100644 index 000000000..1611b66d6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockGrinderDouble.json @@ -0,0 +1,6 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockGrinderDouble" }, + "meta=1": { "model": "actuallyadditions:blockGrinderDoubleOn" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockHeatCollector.json b/src/main/resources/assets/actuallyadditions/blockstates/blockHeatCollector.json new file mode 100644 index 000000000..ba42dd650 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockHeatCollector.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockHeatCollector" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockItemRepairer.json b/src/main/resources/assets/actuallyadditions/blockstates/blockItemRepairer.json new file mode 100644 index 000000000..e5eb85b3d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockItemRepairer.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockItemRepairer" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockLampPowerer.json b/src/main/resources/assets/actuallyadditions/blockstates/blockLampPowerer.json new file mode 100644 index 000000000..6d850ae98 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockLampPowerer.json @@ -0,0 +1,10 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockLampPowerer", "x": 90 }, + "meta=1": { "model": "actuallyadditions:blockLampPowerer", "x": -90 }, + "meta=2": { "model": "actuallyadditions:blockLampPowerer", "y": 0 }, + "meta=3": { "model": "actuallyadditions:blockLampPowerer", "y": 180 }, + "meta=4": { "model": "actuallyadditions:blockLampPowerer", "y": 270 }, + "meta=5": { "model": "actuallyadditions:blockLampPowerer", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockLavaFactoryController.json b/src/main/resources/assets/actuallyadditions/blockstates/blockLavaFactoryController.json new file mode 100644 index 000000000..4b1b03844 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockLavaFactoryController.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockLavaFactoryController" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockLeafGenerator.json b/src/main/resources/assets/actuallyadditions/blockstates/blockLeafGenerator.json new file mode 100644 index 000000000..437f4a868 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockLeafGenerator.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockLeafGenerator" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockMiner.json b/src/main/resources/assets/actuallyadditions/blockstates/blockMiner.json new file mode 100644 index 000000000..58ca07bcb --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockMiner.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockMiner" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockMisc.json b/src/main/resources/assets/actuallyadditions/blockstates/blockMisc.json new file mode 100644 index 000000000..20d2f94a2 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockMisc.json @@ -0,0 +1,14 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockMiscBlackQuartzPillar" }, + "meta=1": { "model": "actuallyadditions:blockMiscBlackQuartzChiseled" }, + "meta=2": { "model": "actuallyadditions:blockMiscBlackQuartz" }, + "meta=3": { "model": "actuallyadditions:blockMiscOreBlackQuartz" }, + "meta=4": { "model": "actuallyadditions:blockMiscWoodCasing" }, + "meta=5": { "model": "actuallyadditions:blockMiscCharcoal" }, + "meta=6": { "model": "actuallyadditions:blockMiscEnderpearl" }, + "meta=7": { "model": "actuallyadditions:blockMiscLavaFactoryCase" }, + "meta=8": { "model": "actuallyadditions:blockMiscEnderCasing" }, + "meta=9": { "model": "actuallyadditions:blockMiscIronCasing" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockOilGenerator.json b/src/main/resources/assets/actuallyadditions/blockstates/blockOilGenerator.json new file mode 100644 index 000000000..80d532bf9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockOilGenerator.json @@ -0,0 +1,6 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockOilGenerator" }, + "meta=1": { "model": "actuallyadditions:blockOilGenerator" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockPlacer.json b/src/main/resources/assets/actuallyadditions/blockstates/blockPlacer.json new file mode 100644 index 000000000..7e296e649 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockPlacer.json @@ -0,0 +1,10 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockPlacer", "x": 90 }, + "meta=1": { "model": "actuallyadditions:blockPlacer", "x": -90 }, + "meta=2": { "model": "actuallyadditions:blockPlacer", "y": 0 }, + "meta=3": { "model": "actuallyadditions:blockPlacer", "y": 180 }, + "meta=4": { "model": "actuallyadditions:blockPlacer", "y": 270 }, + "meta=5": { "model": "actuallyadditions:blockPlacer", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockRangedCollector.json b/src/main/resources/assets/actuallyadditions/blockstates/blockRangedCollector.json new file mode 100644 index 000000000..52e736d3f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockRangedCollector.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockRangedCollector" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenWall.json b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenWall.json new file mode 100644 index 000000000..a586e7ad0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenWall.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockTestifiBucksGreenWall" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteWall.json b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteWall.json new file mode 100644 index 000000000..940c4a6f0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteWall.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockTestifiBucksWhiteWall" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockTreasureChest.json b/src/main/resources/assets/actuallyadditions/blockstates/blockTreasureChest.json new file mode 100644 index 000000000..bc6bcfa6e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockTreasureChest.json @@ -0,0 +1,8 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockTreasureChest", "y": 0 }, + "meta=1": { "model": "actuallyadditions:blockTreasureChest", "y": 180 }, + "meta=2": { "model": "actuallyadditions:blockTreasureChest", "y": -90 }, + "meta=3": { "model": "actuallyadditions:blockTreasureChest", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockBreaker.json b/src/main/resources/assets/actuallyadditions/models/block/blockBreaker.json new file mode 100644 index 000000000..893606b7a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockBreaker.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockBreaker", + "down": "actuallyadditions:blocks/blockBreakerTop", + "up": "actuallyadditions:blocks/blockBreakerTop", + "north": "actuallyadditions:blocks/blockBreakerFront", + "east": "actuallyadditions:blocks/blockBreaker", + "south": "actuallyadditions:blocks/blockBreaker", + "west": "actuallyadditions:blocks/blockBreaker" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCanolaPress.json b/src/main/resources/assets/actuallyadditions/models/block/blockCanolaPress.json new file mode 100644 index 000000000..a2a0b20fc --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCanolaPress.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockCanolaPress", + "down": "actuallyadditions:blocks/blockCanolaPressTop", + "up": "actuallyadditions:blocks/blockCanolaPressTop", + "north": "actuallyadditions:blocks/blockCanolaPress", + "east": "actuallyadditions:blocks/blockCanolaPress", + "south": "actuallyadditions:blocks/blockCanolaPress", + "west": "actuallyadditions:blocks/blockCanolaPress" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCoalGenerator.json b/src/main/resources/assets/actuallyadditions/models/block/blockCoalGenerator.json new file mode 100644 index 000000000..c25db6ec0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCoalGenerator.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockCoalGenerator", + "down": "actuallyadditions:blocks/blockCoalGeneratorBottom", + "up": "actuallyadditions:blocks/blockCoalGeneratorTop", + "north": "actuallyadditions:blocks/blockCoalGenerator", + "east": "actuallyadditions:blocks/blockCoalGenerator", + "south": "actuallyadditions:blocks/blockCoalGenerator", + "west": "actuallyadditions:blocks/blockCoalGenerator" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockDirectionalBreaker.json b/src/main/resources/assets/actuallyadditions/models/block/blockDirectionalBreaker.json new file mode 100644 index 000000000..6bba02c3a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockDirectionalBreaker.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockDirectionalBreaker", + "down": "actuallyadditions:blocks/blockDirectionalBreakerTop", + "up": "actuallyadditions:blocks/blockDirectionalBreakerTop", + "north": "actuallyadditions:blocks/blockDirectionalBreakerFront", + "east": "actuallyadditions:blocks/blockDirectionalBreaker", + "south": "actuallyadditions:blocks/blockDirectionalBreaker", + "west": "actuallyadditions:blocks/blockDirectionalBreaker" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockDropper.json b/src/main/resources/assets/actuallyadditions/models/block/blockDropper.json new file mode 100644 index 000000000..7d34fb454 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockDropper.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockDropper", + "down": "actuallyadditions:blocks/blockDropperTop", + "up": "actuallyadditions:blocks/blockDropperTop", + "north": "actuallyadditions:blocks/blockDropperFront", + "east": "actuallyadditions:blocks/blockDropper", + "south": "actuallyadditions:blocks/blockDropper", + "west": "actuallyadditions:blocks/blockDropper" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockEnergizer.json b/src/main/resources/assets/actuallyadditions/models/block/blockEnergizer.json new file mode 100644 index 000000000..82542d8ee --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockEnergizer.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockEnergizer", + "down": "actuallyadditions:blocks/blockEnergizer", + "up": "actuallyadditions:blocks/blockEnergizerTop", + "north": "actuallyadditions:blocks/blockEnergizerSide", + "east": "actuallyadditions:blocks/blockEnergizerSide", + "south": "actuallyadditions:blocks/blockEnergizerSide", + "west": "actuallyadditions:blocks/blockEnergizerSide" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockEnervator.json b/src/main/resources/assets/actuallyadditions/models/block/blockEnervator.json new file mode 100644 index 000000000..51c2005b9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockEnervator.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockEnervator", + "down": "actuallyadditions:blocks/blockEnervator", + "up": "actuallyadditions:blocks/blockEnervatorTop", + "north": "actuallyadditions:blocks/blockEnervatorSide", + "east": "actuallyadditions:blocks/blockEnervatorSide", + "south": "actuallyadditions:blocks/blockEnervatorSide", + "west": "actuallyadditions:blocks/blockEnervatorSide" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFeeder.json b/src/main/resources/assets/actuallyadditions/models/block/blockFeeder.json new file mode 100644 index 000000000..086701edd --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFeeder.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockFeeder", + "down": "actuallyadditions:blocks/blockFeederTop", + "up": "actuallyadditions:blocks/blockFeederTop", + "north": "actuallyadditions:blocks/blockFeeder", + "east": "actuallyadditions:blocks/blockFeeder", + "south": "actuallyadditions:blocks/blockFeeder", + "west": "actuallyadditions:blocks/blockFeeder" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFermentingBarrel.json b/src/main/resources/assets/actuallyadditions/models/block/blockFermentingBarrel.json new file mode 100644 index 000000000..30cc9d9ac --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFermentingBarrel.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockFermentingBarrel", + "down": "actuallyadditions:blocks/blockFermentingBarrelTop", + "up": "actuallyadditions:blocks/blockFermentingBarrelTop", + "north": "actuallyadditions:blocks/blockFermentingBarrel", + "east": "actuallyadditions:blocks/blockFermentingBarrel", + "south": "actuallyadditions:blocks/blockFermentingBarrel", + "west": "actuallyadditions:blocks/blockFermentingBarrel" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFluidCollector.json b/src/main/resources/assets/actuallyadditions/models/block/blockFluidCollector.json new file mode 100644 index 000000000..d5eefafac --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFluidCollector.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockFluidCollector", + "down": "actuallyadditions:blocks/blockFluidCollectorTop", + "up": "actuallyadditions:blocks/blockFluidCollectorTop", + "north": "actuallyadditions:blocks/blockFluidCollectorFront", + "east": "actuallyadditions:blocks/blockFluidCollector", + "south": "actuallyadditions:blocks/blockFluidCollector", + "west": "actuallyadditions:blocks/blockFluidCollector" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFluidPlacer.json b/src/main/resources/assets/actuallyadditions/models/block/blockFluidPlacer.json new file mode 100644 index 000000000..19a1cd4de --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFluidPlacer.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockFluidPlacer", + "down": "actuallyadditions:blocks/blockFluidPlacerTop", + "up": "actuallyadditions:blocks/blockFluidPlacerTop", + "north": "actuallyadditions:blocks/blockFluidPlacerFront", + "east": "actuallyadditions:blocks/blockFluidPlacer", + "south": "actuallyadditions:blocks/blockFluidPlacer", + "west": "actuallyadditions:blocks/blockFluidPlacer" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceDouble.json b/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceDouble.json new file mode 100644 index 000000000..596d67036 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceDouble.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockFurnaceDouble", + "down": "actuallyadditions:blocks/blockFurnaceDouble", + "up": "actuallyadditions:blocks/blockFurnaceDoubleTop", + "north": "actuallyadditions:blocks/blockFurnaceDoubleFront", + "east": "actuallyadditions:blocks/blockFurnaceDouble", + "south": "actuallyadditions:blocks/blockFurnaceDouble", + "west": "actuallyadditions:blocks/blockFurnaceDouble" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceDoubleOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceDoubleOn.json new file mode 100644 index 000000000..9ecfaccf4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceDoubleOn.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockFurnaceDouble", + "down": "actuallyadditions:blocks/blockFurnaceDouble", + "up": "actuallyadditions:blocks/blockFurnaceDoubleTop", + "north": "actuallyadditions:blocks/blockFurnaceDoubleOn", + "east": "actuallyadditions:blocks/blockFurnaceDouble", + "south": "actuallyadditions:blocks/blockFurnaceDouble", + "west": "actuallyadditions:blocks/blockFurnaceDouble" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockGiantChest.json b/src/main/resources/assets/actuallyadditions/models/block/blockGiantChest.json new file mode 100644 index 000000000..9a2f67dd7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockGiantChest.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockGiantChest", + "down": "actuallyadditions:blocks/blockGiantChestBottom", + "up": "actuallyadditions:blocks/blockGiantChestTop", + "north": "actuallyadditions:blocks/blockGiantChest", + "east": "actuallyadditions:blocks/blockGiantChest", + "south": "actuallyadditions:blocks/blockGiantChest", + "west": "actuallyadditions:blocks/blockGiantChest" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockGreenhouseGlass.json b/src/main/resources/assets/actuallyadditions/models/block/blockGreenhouseGlass.json new file mode 100644 index 000000000..d5e181ffe --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockGreenhouseGlass.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockGreenhouseGlass" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockGrinderDouble.json b/src/main/resources/assets/actuallyadditions/models/block/blockGrinderDouble.json new file mode 100644 index 000000000..7c956d566 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockGrinderDouble.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockGrinderDouble", + "down": "actuallyadditions:blocks/blockGrinderBottom", + "up": "actuallyadditions:blocks/blockGrinderTop", + "north": "actuallyadditions:blocks/blockGrinderDouble", + "east": "actuallyadditions:blocks/blockGrinderDouble", + "south": "actuallyadditions:blocks/blockGrinderDouble", + "west": "actuallyadditions:blocks/blockGrinderDouble" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockGrinderDoubleOn.json b/src/main/resources/assets/actuallyadditions/models/block/blockGrinderDoubleOn.json new file mode 100644 index 000000000..29a9657d3 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockGrinderDoubleOn.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockGrinderDouble", + "down": "actuallyadditions:blocks/blockGrinderBottom", + "up": "actuallyadditions:blocks/blockGrinderOn", + "north": "actuallyadditions:blocks/blockGrinderDouble", + "east": "actuallyadditions:blocks/blockGrinderDouble", + "south": "actuallyadditions:blocks/blockGrinderDouble", + "west": "actuallyadditions:blocks/blockGrinderDouble" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockHeatCollector.json b/src/main/resources/assets/actuallyadditions/models/block/blockHeatCollector.json new file mode 100644 index 000000000..694df70ec --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockHeatCollector.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockHeatCollectorSide", + "down": "actuallyadditions:blocks/blockHeatCollectorBottom", + "up": "actuallyadditions:blocks/blockHeatCollectorTop", + "north": "actuallyadditions:blocks/blockHeatCollectorSide", + "east": "actuallyadditions:blocks/blockHeatCollectorSide", + "south": "actuallyadditions:blocks/blockHeatCollectorSide", + "west": "actuallyadditions:blocks/blockHeatCollectorSide" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockItemRepairer.json b/src/main/resources/assets/actuallyadditions/models/block/blockItemRepairer.json new file mode 100644 index 000000000..bb1be012a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockItemRepairer.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockItemRepairer", + "down": "actuallyadditions:blocks/blockItemRepairerBottom", + "up": "actuallyadditions:blocks/blockItemRepairerTop", + "north": "actuallyadditions:blocks/blockItemRepairer", + "east": "actuallyadditions:blocks/blockItemRepairer", + "south": "actuallyadditions:blocks/blockItemRepairer", + "west": "actuallyadditions:blocks/blockItemRepairer" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockLampPowerer.json b/src/main/resources/assets/actuallyadditions/models/block/blockLampPowerer.json new file mode 100644 index 000000000..430ed6006 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockLampPowerer.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockLampPowerer", + "down": "actuallyadditions:blocks/blockLampPowerer", + "up": "actuallyadditions:blocks/blockLampPowerer", + "north": "actuallyadditions:blocks/blockLampPowererFront", + "east": "actuallyadditions:blocks/blockLampPowerer", + "south": "actuallyadditions:blocks/blockLampPowerer", + "west": "actuallyadditions:blocks/blockLampPowerer" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockLavaFactoryController.json b/src/main/resources/assets/actuallyadditions/models/block/blockLavaFactoryController.json new file mode 100644 index 000000000..9097991cb --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockLavaFactoryController.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockLavaFactoryController", + "down": "actuallyadditions:blocks/blockLavaFactoryController", + "up": "actuallyadditions:blocks/blockLavaFactoryControllerTop", + "north": "actuallyadditions:blocks/blockLavaFactoryController", + "east": "actuallyadditions:blocks/blockLavaFactoryController", + "south": "actuallyadditions:blocks/blockLavaFactoryController", + "west": "actuallyadditions:blocks/blockLavaFactoryController" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockLeafGenerator.json b/src/main/resources/assets/actuallyadditions/models/block/blockLeafGenerator.json new file mode 100644 index 000000000..56ed86737 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockLeafGenerator.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockLeafGenerator", + "down": "actuallyadditions:blocks/blockLeafGeneratorBottom", + "up": "actuallyadditions:blocks/blockLeafGeneratorTop", + "north": "actuallyadditions:blocks/blockLeafGenerator", + "east": "actuallyadditions:blocks/blockLeafGenerator", + "south": "actuallyadditions:blocks/blockLeafGenerator", + "west": "actuallyadditions:blocks/blockLeafGenerator" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiner.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiner.json new file mode 100644 index 000000000..2872bf56a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiner.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockMiner", + "down": "actuallyadditions:blocks/blockMinerFront", + "up": "actuallyadditions:blocks/blockMinerTop", + "north": "actuallyadditions:blocks/blockMiner", + "east": "actuallyadditions:blocks/blockMiner", + "south": "actuallyadditions:blocks/blockMiner", + "west": "actuallyadditions:blocks/blockMiner" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartz.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartz.json new file mode 100644 index 000000000..9f80a8b37 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartz.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartzChiseled.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartzChiseled.json new file mode 100644 index 000000000..239abd6a4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartzChiseled.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartzPillar.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartzPillar.json new file mode 100644 index 000000000..a393fdfd1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiscBlackQuartzPillar.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiscCharcoal.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiscCharcoal.json new file mode 100644 index 000000000..e7b2c34bc --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiscCharcoal.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockMiscCharcoal" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiscEnderCasing.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiscEnderCasing.json new file mode 100644 index 000000000..2b00aaaaf --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiscEnderCasing.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockMiscEnderCasing" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiscEnderpearl.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiscEnderpearl.json new file mode 100644 index 000000000..ecf04eb87 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiscEnderpearl.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockMiscEnderpearl" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiscIronCasing.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiscIronCasing.json new file mode 100644 index 000000000..fbc4d7b2f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiscIronCasing.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockMiscIronCasing" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiscLavaFactoryCase.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiscLavaFactoryCase.json new file mode 100644 index 000000000..a1db96568 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiscLavaFactoryCase.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockMiscLavaFactoryCase" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiscOreBlackQuartz.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiscOreBlackQuartz.json new file mode 100644 index 000000000..a622e44fa --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiscOreBlackQuartz.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockMiscOreBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockMiscWoodCasing.json b/src/main/resources/assets/actuallyadditions/models/block/blockMiscWoodCasing.json new file mode 100644 index 000000000..176cf159b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockMiscWoodCasing.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockMiscWoodCasing" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockOilGenerator.json b/src/main/resources/assets/actuallyadditions/models/block/blockOilGenerator.json new file mode 100644 index 000000000..46923c44c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockOilGenerator.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockOilGenerator", + "down": "actuallyadditions:blocks/blockOilGeneratorBottom", + "up": "actuallyadditions:blocks/blockOilGeneratorTop", + "north": "actuallyadditions:blocks/blockOilGenerator", + "east": "actuallyadditions:blocks/blockOilGenerator", + "south": "actuallyadditions:blocks/blockOilGenerator", + "west": "actuallyadditions:blocks/blockOilGenerator" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPlacer.json b/src/main/resources/assets/actuallyadditions/models/block/blockPlacer.json new file mode 100644 index 000000000..882cdec95 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPlacer.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockPlacer", + "down": "actuallyadditions:blocks/blockPlacerTop", + "up": "actuallyadditions:blocks/blockPlacerTop", + "north": "actuallyadditions:blocks/blockPlacerFront", + "east": "actuallyadditions:blocks/blockPlacer", + "south": "actuallyadditions:blocks/blockPlacer", + "west": "actuallyadditions:blocks/blockPlacer" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockRangedCollector.json b/src/main/resources/assets/actuallyadditions/models/block/blockRangedCollector.json new file mode 100644 index 000000000..e3d4dfa63 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockRangedCollector.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockRangedCollector" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenWall.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenWall.json new file mode 100644 index 000000000..0d7d410ff --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenWall.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteWall.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteWall.json new file mode 100644 index 000000000..1875b9000 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteWall.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTreasureChest.json b/src/main/resources/assets/actuallyadditions/models/block/blockTreasureChest.json new file mode 100644 index 000000000..98bc9b1d1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTreasureChest.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "actuallyadditions:blocks/blockTreasureChest", + "down": "actuallyadditions:blocks/blockTreasureChestBottom", + "up": "actuallyadditions:blocks/blockTreasureChestBottom", + "north": "actuallyadditions:blocks/blockTreasureChestFront", + "east": "actuallyadditions:blocks/blockTreasureChest", + "south": "actuallyadditions:blocks/blockTreasureChest", + "west": "actuallyadditions:blocks/blockTreasureChest" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockBreaker.json b/src/main/resources/assets/actuallyadditions/models/item/blockBreaker.json new file mode 100644 index 000000000..1062c675d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockBreaker.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockBreaker", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCanolaPress.json b/src/main/resources/assets/actuallyadditions/models/item/blockCanolaPress.json new file mode 100644 index 000000000..938a9c7fe --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCanolaPress.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockCanolaPress", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCoalGenerator.json b/src/main/resources/assets/actuallyadditions/models/item/blockCoalGenerator.json new file mode 100644 index 000000000..aa2c5b92b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCoalGenerator.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockCoalGenerator", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockDirectionalBreaker.json b/src/main/resources/assets/actuallyadditions/models/item/blockDirectionalBreaker.json new file mode 100644 index 000000000..193b3216f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockDirectionalBreaker.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockDirectionalBreaker", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockDropper.json b/src/main/resources/assets/actuallyadditions/models/item/blockDropper.json new file mode 100644 index 000000000..f13edae78 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockDropper.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockDropper", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockEnergizer.json b/src/main/resources/assets/actuallyadditions/models/item/blockEnergizer.json new file mode 100644 index 000000000..3194c6643 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockEnergizer.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockEnergizer", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockEnervator.json b/src/main/resources/assets/actuallyadditions/models/item/blockEnervator.json new file mode 100644 index 000000000..b6a0649e1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockEnervator.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockEnervator", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockFeeder.json b/src/main/resources/assets/actuallyadditions/models/item/blockFeeder.json new file mode 100644 index 000000000..dc79d942c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockFeeder.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockFeeder", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockFermentingBarrel.json b/src/main/resources/assets/actuallyadditions/models/item/blockFermentingBarrel.json new file mode 100644 index 000000000..56972a14f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockFermentingBarrel.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockFermentingBarrel", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockFluidCollector.json b/src/main/resources/assets/actuallyadditions/models/item/blockFluidCollector.json new file mode 100644 index 000000000..c5b34ac75 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockFluidCollector.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockFluidCollector", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockFluidPlacer.json b/src/main/resources/assets/actuallyadditions/models/item/blockFluidPlacer.json new file mode 100644 index 000000000..83b6b5832 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockFluidPlacer.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockFluidPlacer", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockFurnaceDouble.json b/src/main/resources/assets/actuallyadditions/models/item/blockFurnaceDouble.json new file mode 100644 index 000000000..1c7332972 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockFurnaceDouble.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockFurnaceDouble", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockGiantChest.json b/src/main/resources/assets/actuallyadditions/models/item/blockGiantChest.json new file mode 100644 index 000000000..01c08a12c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockGiantChest.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockGiantChest", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockGreenhouseGlass.json b/src/main/resources/assets/actuallyadditions/models/item/blockGreenhouseGlass.json new file mode 100644 index 000000000..2e826075f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockGreenhouseGlass.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockGreenhouseGlass", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockGrinderDouble.json b/src/main/resources/assets/actuallyadditions/models/item/blockGrinderDouble.json new file mode 100644 index 000000000..28f414787 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockGrinderDouble.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockGrinderDouble", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockHeatCollector.json b/src/main/resources/assets/actuallyadditions/models/item/blockHeatCollector.json new file mode 100644 index 000000000..1de6350d3 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockHeatCollector.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockHeatCollector", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockItemRepairer.json b/src/main/resources/assets/actuallyadditions/models/item/blockItemRepairer.json new file mode 100644 index 000000000..7b1d319f8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockItemRepairer.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockItemRepairer", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockLampPowerer.json b/src/main/resources/assets/actuallyadditions/models/item/blockLampPowerer.json new file mode 100644 index 000000000..8f487c814 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockLampPowerer.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockLampPowerer", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockLavaFactoryController.json b/src/main/resources/assets/actuallyadditions/models/item/blockLavaFactoryController.json new file mode 100644 index 000000000..c172cd72e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockLavaFactoryController.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockLavaFactoryController", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockLeafGenerator.json b/src/main/resources/assets/actuallyadditions/models/item/blockLeafGenerator.json new file mode 100644 index 000000000..6ffffa7f9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockLeafGenerator.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockLeafGenerator", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiner.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiner.json new file mode 100644 index 000000000..8a27fb3d7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiner.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiner", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartz.json new file mode 100644 index 000000000..9ce42ed6c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartz.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiscBlackQuartz", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartzChiseled.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartzChiseled.json new file mode 100644 index 000000000..c4e3ea9c2 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartzChiseled.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiscBlackQuartzChiseled", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartzPillar.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartzPillar.json new file mode 100644 index 000000000..3594855f7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiscBlackQuartzPillar.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiscBlackQuartzPillar", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiscCharcoal.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiscCharcoal.json new file mode 100644 index 000000000..db375243d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiscCharcoal.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiscCharcoal", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiscEnderCasing.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiscEnderCasing.json new file mode 100644 index 000000000..d3df49bfc --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiscEnderCasing.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiscEnderCasing", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiscEnderpearl.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiscEnderpearl.json new file mode 100644 index 000000000..ad2d80cfb --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiscEnderpearl.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiscEnderpearl", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiscIronCasing.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiscIronCasing.json new file mode 100644 index 000000000..4fb8d60ba --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiscIronCasing.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiscIronCasing", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiscLavaFactoryCase.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiscLavaFactoryCase.json new file mode 100644 index 000000000..ea47a42bf --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiscLavaFactoryCase.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiscLavaFactoryCase", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiscOreBlackQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiscOreBlackQuartz.json new file mode 100644 index 000000000..e38c15ff1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiscOreBlackQuartz.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiscOreBlackQuartz", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockMiscWoodCasing.json b/src/main/resources/assets/actuallyadditions/models/item/blockMiscWoodCasing.json new file mode 100644 index 000000000..f5dc8b9fd --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockMiscWoodCasing.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockMiscWoodCasing", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockOilGenerator.json b/src/main/resources/assets/actuallyadditions/models/item/blockOilGenerator.json new file mode 100644 index 000000000..02299a829 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockOilGenerator.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockOilGenerator", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockPlacer.json b/src/main/resources/assets/actuallyadditions/models/item/blockPlacer.json new file mode 100644 index 000000000..6154ccbec --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockPlacer.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockPlacer", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockRangedCollector.json b/src/main/resources/assets/actuallyadditions/models/item/blockRangedCollector.json new file mode 100644 index 000000000..d69bc18c8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockRangedCollector.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockRangedCollector", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenWall.json b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenWall.json new file mode 100644 index 000000000..acc151c04 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenWall.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockTestifiBucksGreenWall", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteWall.json b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteWall.json new file mode 100644 index 000000000..3dac81292 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteWall.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockTestifiBucksWhiteWall", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockTreasureChest.json b/src/main/resources/assets/actuallyadditions/models/item/blockTreasureChest.json new file mode 100644 index 000000000..86c743016 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockTreasureChest.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockTreasureChest", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemChestToCrateUpgrade.json b/src/main/resources/assets/actuallyadditions/models/item/itemChestToCrateUpgrade.json new file mode 100644 index 000000000..995f4ec8b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemChestToCrateUpgrade.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemChestToCrateUpgrade" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemColorLens.json b/src/main/resources/assets/actuallyadditions/models/item/itemColorLens.json new file mode 100644 index 000000000..febf4f546 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemColorLens.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemColorLens" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCrateKeeper.json b/src/main/resources/assets/actuallyadditions/models/item/itemCrateKeeper.json new file mode 100644 index 000000000..3c716ea09 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCrateKeeper.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCrateKeeper" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDamageLens.json b/src/main/resources/assets/actuallyadditions/models/item/itemDamageLens.json new file mode 100644 index 000000000..7562af40d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDamageLens.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDamageLens" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillBlack.json new file mode 100644 index 000000000..681c54fea --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillBlue.json new file mode 100644 index 000000000..f1c323f28 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillBrown.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillBrown.json new file mode 100644 index 000000000..5848ed5ca --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillBrown.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillBrown" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillCyan.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillCyan.json new file mode 100644 index 000000000..54f1e58b6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillCyan.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillCyan" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillGray.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillGray.json new file mode 100644 index 000000000..6d151a083 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillGray.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillGray" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillGreen.json new file mode 100644 index 000000000..b59b23bf2 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillLightBlue.json new file mode 100644 index 000000000..79cf0516d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillLightBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillLightGray.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillLightGray.json new file mode 100644 index 000000000..826c31cb2 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillLightGray.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillLightGray" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillLime.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillLime.json new file mode 100644 index 000000000..cf6f8c952 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillLime.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillLime" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillMagenta.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillMagenta.json new file mode 100644 index 000000000..b07f6b08e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillMagenta.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillMagenta" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillOrange.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillOrange.json new file mode 100644 index 000000000..4de274a3f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillOrange.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillOrange" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillPink.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillPink.json new file mode 100644 index 000000000..e90ef690e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillPink.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillPink" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillPurple.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillPurple.json new file mode 100644 index 000000000..fa524fa85 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillPurple.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillPurple" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillRed.json new file mode 100644 index 000000000..e0a420b9b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeBlockPlacing.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeBlockPlacing.json new file mode 100644 index 000000000..380ff4691 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeBlockPlacing.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillUpgradeBlockPlacing" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFiveByFive.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFiveByFive.json new file mode 100644 index 000000000..06edaa9a1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFiveByFive.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillUpgradeFiveByFive" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFortune.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFortune.json new file mode 100644 index 000000000..40d8a06b7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFortune.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillUpgradeFortune" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFortuneII.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFortuneII.json new file mode 100644 index 000000000..897775de5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeFortuneII.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillUpgradeFortuneII" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSilkTouch.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSilkTouch.json new file mode 100644 index 000000000..c3a1030e5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSilkTouch.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillUpgradeSilkTouch" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeed.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeed.json new file mode 100644 index 000000000..93eb3981f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillUpgradeSpeed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeedII.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeedII.json new file mode 100644 index 000000000..6a9cfcd6b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeedII.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillUpgradeSpeedII" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeedIII.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeedIII.json new file mode 100644 index 000000000..b871fd200 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeSpeedIII.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillUpgradeSpeedIII" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeThreeByThree.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeThreeByThree.json new file mode 100644 index 000000000..1e6a9663d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillUpgradeThreeByThree.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillUpgradeThreeByThree" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillWhite.json new file mode 100644 index 000000000..d753d890c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDrillYellow.json b/src/main/resources/assets/actuallyadditions/models/item/itemDrillYellow.json new file mode 100644 index 000000000..fc7a27e1f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDrillYellow.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDrillYellow" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemExplosionLens.json b/src/main/resources/assets/actuallyadditions/models/item/itemExplosionLens.json new file mode 100644 index 000000000..bbb387e76 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemExplosionLens.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemExplosionLens" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemLaserWrench.json b/src/main/resources/assets/actuallyadditions/models/item/itemLaserWrench.json new file mode 100644 index 000000000..1019bdcd4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemLaserWrench.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemLaserWrench" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPaxel.json b/src/main/resources/assets/actuallyadditions/models/item/itemPaxel.json new file mode 100644 index 000000000..ff9925e9e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPaxel.json @@ -0,0 +1,19 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPaxel", + "layer1": "actuallyadditions:items/itemPaxelOverlay" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} From 61b921b2dd61d47a282164a8b73f311c9ec07565 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 9 Jan 2016 14:35:04 +0100 Subject: [PATCH 21/58] Some more texture work. Done for now. Hahah. Good joke. --- .../mod/blocks/BlockLaserRelay.java | 2 +- .../mod/blocks/base/BlockBushBase.java | 1 + .../mod/blocks/base/BlockWallAA.java | 150 +++++++++++++----- .../blockstates/blockBlackLotus.json | 5 + .../blockTestifiBucksGreenFence.json | 36 +++++ .../blockTestifiBucksGreenSlab.json | 6 + .../blockTestifiBucksGreenStairs.json | 44 +++++ .../blockTestifiBucksWhiteFence.json | 36 +++++ .../blockTestifiBucksWhiteSlab.json | 6 + .../blockTestifiBucksWhiteStairs.json | 44 +++++ .../models/block/blockBlackLotus.json | 6 + .../blockTestifiBucksGreenFenceInventory.json | 6 + .../blockTestifiBucksGreenFenceNorth.json | 6 + .../blockTestifiBucksGreenFenceNorthEast.json | 6 + ...blockTestifiBucksGreenFenceNorthSouth.json | 6 + ...TestifiBucksGreenFenceNorthSouthAbove.json | 6 + ...kTestifiBucksGreenFenceNorthSouthEast.json | 6 + ...tifiBucksGreenFenceNorthSouthEastWest.json | 6 + .../blockTestifiBucksGreenFencePost.json | 6 + .../blockTestifiBucksGreenSlabBottom.json | 8 + .../block/blockTestifiBucksGreenSlabTop.json | 8 + .../block/blockTestifiBucksGreenStairs.json | 8 + .../blockTestifiBucksGreenStairsInner.json | 8 + .../blockTestifiBucksGreenStairsOuter.json | 8 + .../blockTestifiBucksWhiteFenceInventory.json | 6 + .../blockTestifiBucksWhiteFenceNorth.json | 6 + .../blockTestifiBucksWhiteFenceNorthEast.json | 6 + ...blockTestifiBucksWhiteFenceNorthSouth.json | 6 + ...TestifiBucksWhiteFenceNorthSouthAbove.json | 6 + ...kTestifiBucksWhiteFenceNorthSouthEast.json | 6 + ...tifiBucksWhiteFenceNorthSouthEastWest.json | 6 + .../blockTestifiBucksWhiteFencePost.json | 6 + .../blockTestifiBucksWhiteSlabBottom.json | 8 + .../block/blockTestifiBucksWhiteSlabTop.json | 8 + .../block/blockTestifiBucksWhiteStairs.json | 8 + .../blockTestifiBucksWhiteStairsInner.json | 8 + .../blockTestifiBucksWhiteStairsOuter.json | 8 + .../models/item/blockBlackLotus.json | 18 +++ .../item/blockTestifiBucksGreenFence.json | 10 ++ .../item/blockTestifiBucksGreenSlab.json | 10 ++ .../item/blockTestifiBucksGreenStairs.json | 13 ++ .../item/blockTestifiBucksWhiteFence.json | 10 ++ .../item/blockTestifiBucksWhiteSlab.json | 10 ++ .../item/blockTestifiBucksWhiteStairs.json | 13 ++ .../models/item/itemBattery.json | 18 +++ .../models/item/itemBatteryDouble.json | 18 +++ .../models/item/itemBatteryQuadruple.json | 18 +++ .../models/item/itemBatteryQuintuple.json | 18 +++ .../models/item/itemBatteryTriple.json | 18 +++ .../models/item/itemBucketCanolaOil.json | 18 +++ .../models/item/itemBucketOil.json | 18 +++ .../models/item/itemCoffeeBeans.json | 18 +++ .../models/item/itemGrowthRing.json | 18 +++ .../models/item/itemPhantomConnector.json | 18 +++ .../models/item/itemRiceSeed.json | 18 +++ .../models/item/itemSuctionRing.json | 18 +++ .../models/item/itemTeleStaff.json | 18 +++ .../models/item/itemWaterRemovalRing.json | 18 +++ .../models/item/itemWingsOfTheBats.json | 18 +++ 59 files changed, 822 insertions(+), 44 deletions(-) create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockBlackLotus.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenFence.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenSlab.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenStairs.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteFence.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteSlab.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteStairs.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockBlackLotus.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceInventory.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorth.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthEast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouth.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthAbove.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthEast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthEastWest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFencePost.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenSlabBottom.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenSlabTop.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairs.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairsInner.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairsOuter.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceInventory.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorth.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthEast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouth.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthAbove.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthEast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthEastWest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFencePost.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteSlabBottom.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteSlabTop.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairs.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairsInner.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairsOuter.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockBlackLotus.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenFence.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenSlab.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenStairs.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteFence.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteSlab.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteStairs.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBattery.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBatteryDouble.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBatteryQuadruple.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBatteryQuintuple.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBatteryTriple.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBucketCanolaOil.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBucketOil.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCoffeeBeans.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemGrowthRing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPhantomConnector.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemRiceSeed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSuctionRing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemTeleStaff.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemWaterRemovalRing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemWingsOfTheBats.json diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index 73d95fa11..7fb20b93c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -65,7 +65,7 @@ public class BlockLaserRelay extends BlockContainerBase{ @Override public IBlockState onBlockPlaced(World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, int meta, EntityLivingBase base){ - return this.getStateFromMeta(meta); + return this.getStateFromMeta(side.ordinal()); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java index 11bc17dc2..ded9017f7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java @@ -28,6 +28,7 @@ public class BlockBushBase extends BlockBush{ public BlockBushBase(String name){ this.name = name; + this.setStepSound(soundTypeGrass); this.register(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java index 601cc4444..64270b3b3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockWallAA.java @@ -10,26 +10,28 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.Block; +import net.minecraft.block.BlockFenceGate; import net.minecraft.block.BlockWall; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumRarity; +import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; -public class BlockWallAA extends BlockWall{ +public class BlockWallAA extends BlockBase{ - private String name; private int meta; public BlockWallAA(String name, Block base){ @@ -37,44 +39,14 @@ public class BlockWallAA extends BlockWall{ } public BlockWallAA(String name, Block base, int meta){ - super(base); - this.name = name; + super(base.getMaterial(), name); this.meta = meta; - this.register(); - } + this.setHardness(1.5F); + this.setResistance(10F); + this.setStepSound(base.stepSound); - private void register(){ - this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); - GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName()); - if(this.shouldAddCreative()){ - this.setCreativeTab(CreativeTab.instance); - } - else{ - this.setCreativeTab(null); - } - - this.registerRendering(); - } - - protected void registerRendering(){ - ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); - } - - protected String getBaseName(){ - return this.name; - } - - protected Class getItemBlock(){ - return ItemBlockBase.class; - } - - public boolean shouldAddCreative(){ - return true; - } - - public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.COMMON; + this.setDefaultState(this.blockState.getBaseState().withProperty(BlockWall.UP, false).withProperty(BlockWall.NORTH, false).withProperty(BlockWall.EAST, false).withProperty(BlockWall.SOUTH, false).withProperty(BlockWall.WEST, false)); } @SuppressWarnings("unchecked") @@ -88,4 +60,96 @@ public class BlockWallAA extends BlockWall{ public int damageDropped(IBlockState state){ return meta; } + + @Override + public boolean isFullCube(){ + return false; + } + + @Override + public boolean isPassable(IBlockAccess worldIn, BlockPos pos){ + return false; + } + + @Override + public boolean isOpaqueCube(){ + return false; + } + + @Override + public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos){ + boolean flag = this.canConnectTo(worldIn, pos.north()); + boolean flag1 = this.canConnectTo(worldIn, pos.south()); + boolean flag2 = this.canConnectTo(worldIn, pos.west()); + boolean flag3 = this.canConnectTo(worldIn, pos.east()); + float f = 0.25F; + float f1 = 0.75F; + float f2 = 0.25F; + float f3 = 0.75F; + float f4 = 1.0F; + + if(flag){ + f2 = 0.0F; + } + if(flag1){ + f3 = 1.0F; + } + if(flag2){ + f = 0.0F; + } + if(flag3){ + f1 = 1.0F; + } + + if(flag && flag1 && !flag2 && !flag3){ + f4 = 0.8125F; + f = 0.3125F; + f1 = 0.6875F; + } + else if(!flag && !flag1 && flag2 && flag3){ + f4 = 0.8125F; + f2 = 0.3125F; + f3 = 0.6875F; + } + + this.setBlockBounds(f, 0.0F, f2, f1, f4, f3); + } + + @Override + public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state){ + this.setBlockBoundsBasedOnState(worldIn, pos); + this.maxY = 1.5D; + return super.getCollisionBoundingBox(worldIn, pos, state); + } + + public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos){ + Block block = worldIn.getBlockState(pos).getBlock(); + return block != Blocks.barrier && (!(block != this && !(block instanceof BlockFenceGate)) || ((block.getMaterial().isOpaque() && block.isFullCube()) && block.getMaterial() != Material.gourd)); + } + + @Override + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockAccess worldIn, BlockPos pos, EnumFacing side){ + return side != EnumFacing.DOWN || super.shouldSideBeRendered(worldIn, pos, side); + } + + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos){ + return state.withProperty(BlockWall.UP, !worldIn.isAirBlock(pos.up())).withProperty(BlockWall.NORTH, this.canConnectTo(worldIn, pos.north())).withProperty(BlockWall.EAST, this.canConnectTo(worldIn, pos.east())).withProperty(BlockWall.SOUTH, this.canConnectTo(worldIn, pos.south())).withProperty(BlockWall.WEST, this.canConnectTo(worldIn, pos.west())); + } + + @Override + protected BlockState createBlockState(){ + return new BlockState(this, BlockWall.UP, BlockWall.NORTH, BlockWall.EAST, BlockWall.WEST, BlockWall.SOUTH); + } + + @Override + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState(); + } + + @Override + public int getMetaFromState(IBlockState state){ + return 0; + } } diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockBlackLotus.json b/src/main/resources/assets/actuallyadditions/blockstates/blockBlackLotus.json new file mode 100644 index 000000000..5f66277c0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockBlackLotus.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockBlackLotus" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenFence.json b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenFence.json new file mode 100644 index 000000000..be640a579 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenFence.json @@ -0,0 +1,36 @@ +{ + "variants": { + "east=false,north=false,south=false,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFencePost" }, + "east=false,north=true,south=false,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorth" }, + "east=true,north=false,south=false,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorth", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorth", "y": 180, "uvlock": true }, + "east=false,north=false,south=false,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorth", "y": 270, "uvlock": true }, + "east=true,north=true,south=false,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthEast" }, + "east=true,north=false,south=true,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthEast", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthEast", "y": 180, "uvlock": true }, + "east=false,north=true,south=false,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthEast", "y": 270, "uvlock": true }, + "east=false,north=true,south=true,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouth" }, + "east=true,north=false,south=false,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouth", "y": 90, "uvlock": true }, + "east=true,north=true,south=true,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthEast" }, + "east=true,north=false,south=true,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthEast", "y": 90, "uvlock": true }, + "east=false,north=true,south=true,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthEast", "y": 180, "uvlock": true }, + "east=true,north=true,south=false,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthEast", "y": 270, "uvlock": true }, + "east=true,north=true,south=true,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthEastWest" }, + "east=false,north=false,south=false,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFencePost" }, + "east=false,north=true,south=false,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorth" }, + "east=true,north=false,south=false,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorth", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorth", "y": 180, "uvlock": true }, + "east=false,north=false,south=false,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorth", "y": 270, "uvlock": true }, + "east=true,north=true,south=false,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthEast" }, + "east=true,north=false,south=true,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthEast", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthEast", "y": 180, "uvlock": true }, + "east=false,north=true,south=false,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthEast", "y": 270, "uvlock": true }, + "east=false,north=true,south=true,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthAbove" }, + "east=true,north=false,south=false,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthAbove", "y": 90, "uvlock": true }, + "east=true,north=true,south=true,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthEast" }, + "east=true,north=false,south=true,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthEast", "y": 90, "uvlock": true }, + "east=false,north=true,south=true,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthEast", "y": 180, "uvlock": true }, + "east=true,north=true,south=false,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthEast", "y": 270, "uvlock": true }, + "east=true,north=true,south=true,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksGreenFenceNorthSouthEastWest" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenSlab.json b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenSlab.json new file mode 100644 index 000000000..7a6348718 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenSlab.json @@ -0,0 +1,6 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockTestifiBucksGreenSlabBottom" }, + "meta=1": { "model": "actuallyadditions:blockTestifiBucksGreenSlabTop" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenStairs.json b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenStairs.json new file mode 100644 index 000000000..97b65d1aa --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksGreenStairs.json @@ -0,0 +1,44 @@ +{ + "variants": { + "facing=east,half=bottom,shape=straight": { "model": "actuallyadditions:blockTestifiBucksGreenStairs" }, + "facing=west,half=bottom,shape=straight": { "model": "actuallyadditions:blockTestifiBucksGreenStairs", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=straight": { "model": "actuallyadditions:blockTestifiBucksGreenStairs", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=straight": { "model": "actuallyadditions:blockTestifiBucksGreenStairs", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter" }, + "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "y": 270, "uvlock": true }, + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "y": 90, "uvlock": true }, + "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter" }, + "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "y": 180, "uvlock": true }, + "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner" }, + "facing=west,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "y": 270, "uvlock": true }, + "facing=west,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "y": 90, "uvlock": true }, + "facing=south,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner" }, + "facing=north,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "y": 180, "uvlock": true }, + "facing=east,half=top,shape=straight": { "model": "actuallyadditions:blockTestifiBucksGreenStairs", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=straight": { "model": "actuallyadditions:blockTestifiBucksGreenStairs", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=straight": { "model": "actuallyadditions:blockTestifiBucksGreenStairs", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=straight": { "model": "actuallyadditions:blockTestifiBucksGreenStairs", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "x": 180, "y": 90, "uvlock": true }, + "facing=west,half=top,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "x": 180, "y": 270, "uvlock": true }, + "facing=south,half=top,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "x": 180, "y": 180, "uvlock": true }, + "facing=north,half=top,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsOuter", "x": 180, "uvlock": true }, + "facing=east,half=top,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "x": 180, "y": 90, "uvlock": true }, + "facing=west,half=top,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "x": 180, "y": 270, "uvlock": true }, + "facing=south,half=top,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "x": 180, "y": 180, "uvlock": true }, + "facing=north,half=top,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksGreenStairsInner", "x": 180, "uvlock": true } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteFence.json b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteFence.json new file mode 100644 index 000000000..4cf3b6c82 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteFence.json @@ -0,0 +1,36 @@ +{ + "variants": { + "east=false,north=false,south=false,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFencePost" }, + "east=false,north=true,south=false,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorth" }, + "east=true,north=false,south=false,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorth", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorth", "y": 180, "uvlock": true }, + "east=false,north=false,south=false,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorth", "y": 270, "uvlock": true }, + "east=true,north=true,south=false,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthEast" }, + "east=true,north=false,south=true,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthEast", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthEast", "y": 180, "uvlock": true }, + "east=false,north=true,south=false,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthEast", "y": 270, "uvlock": true }, + "east=false,north=true,south=true,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouth" }, + "east=true,north=false,south=false,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouth", "y": 90, "uvlock": true }, + "east=true,north=true,south=true,up=false,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthEast" }, + "east=true,north=false,south=true,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthEast", "y": 90, "uvlock": true }, + "east=false,north=true,south=true,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthEast", "y": 180, "uvlock": true }, + "east=true,north=true,south=false,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthEast", "y": 270, "uvlock": true }, + "east=true,north=true,south=true,up=false,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthEastWest" }, + "east=false,north=false,south=false,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFencePost" }, + "east=false,north=true,south=false,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorth" }, + "east=true,north=false,south=false,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorth", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorth", "y": 180, "uvlock": true }, + "east=false,north=false,south=false,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorth", "y": 270, "uvlock": true }, + "east=true,north=true,south=false,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthEast" }, + "east=true,north=false,south=true,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthEast", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthEast", "y": 180, "uvlock": true }, + "east=false,north=true,south=false,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthEast", "y": 270, "uvlock": true }, + "east=false,north=true,south=true,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthAbove" }, + "east=true,north=false,south=false,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthAbove", "y": 90, "uvlock": true }, + "east=true,north=true,south=true,up=true,west=false": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthEast" }, + "east=true,north=false,south=true,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthEast", "y": 90, "uvlock": true }, + "east=false,north=true,south=true,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthEast", "y": 180, "uvlock": true }, + "east=true,north=true,south=false,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthEast", "y": 270, "uvlock": true }, + "east=true,north=true,south=true,up=true,west=true": { "model": "actuallyadditions:blockTestifiBucksWhiteFenceNorthSouthEastWest" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteSlab.json b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteSlab.json new file mode 100644 index 000000000..b499d5a6a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteSlab.json @@ -0,0 +1,6 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockTestifiBucksWhiteSlabBottom" }, + "meta=1": { "model": "actuallyadditions:blockTestifiBucksWhiteSlabTop" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteStairs.json b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteStairs.json new file mode 100644 index 000000000..d15addf59 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockTestifiBucksWhiteStairs.json @@ -0,0 +1,44 @@ +{ + "variants": { + "facing=east,half=bottom,shape=straight": { "model": "actuallyadditions:blockTestifiBucksWhiteStairs" }, + "facing=west,half=bottom,shape=straight": { "model": "actuallyadditions:blockTestifiBucksWhiteStairs", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=straight": { "model": "actuallyadditions:blockTestifiBucksWhiteStairs", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=straight": { "model": "actuallyadditions:blockTestifiBucksWhiteStairs", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter" }, + "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "y": 270, "uvlock": true }, + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "y": 90, "uvlock": true }, + "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter" }, + "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "y": 180, "uvlock": true }, + "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner" }, + "facing=west,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "y": 270, "uvlock": true }, + "facing=west,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "y": 90, "uvlock": true }, + "facing=south,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner" }, + "facing=north,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "y": 180, "uvlock": true }, + "facing=east,half=top,shape=straight": { "model": "actuallyadditions:blockTestifiBucksWhiteStairs", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=straight": { "model": "actuallyadditions:blockTestifiBucksWhiteStairs", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=straight": { "model": "actuallyadditions:blockTestifiBucksWhiteStairs", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=straight": { "model": "actuallyadditions:blockTestifiBucksWhiteStairs", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=outer_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "x": 180, "y": 90, "uvlock": true }, + "facing=west,half=top,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "x": 180, "y": 270, "uvlock": true }, + "facing=south,half=top,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "x": 180, "y": 180, "uvlock": true }, + "facing=north,half=top,shape=outer_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsOuter", "x": 180, "uvlock": true }, + "facing=east,half=top,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=inner_right": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "x": 180, "y": 90, "uvlock": true }, + "facing=west,half=top,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "x": 180, "y": 270, "uvlock": true }, + "facing=south,half=top,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "x": 180, "y": 180, "uvlock": true }, + "facing=north,half=top,shape=inner_left": { "model": "actuallyadditions:blockTestifiBucksWhiteStairsInner", "x": 180, "uvlock": true } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockBlackLotus.json b/src/main/resources/assets/actuallyadditions/models/block/blockBlackLotus.json new file mode 100644 index 000000000..2cd8f388a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockBlackLotus.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockBlackLotus" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceInventory.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceInventory.json new file mode 100644 index 000000000..824957db3 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceInventory.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_inventory", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorth.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorth.json new file mode 100644 index 000000000..8b4fb26d0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorth.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_n", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthEast.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthEast.json new file mode 100644 index 000000000..e4997d19c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthEast.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ne", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouth.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouth.json new file mode 100644 index 000000000..a55a8ca94 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouth.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ns", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthAbove.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthAbove.json new file mode 100644 index 000000000..3e7fd28e2 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthAbove.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ns_above", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthEast.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthEast.json new file mode 100644 index 000000000..5be16b169 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthEast.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nse", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthEastWest.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthEastWest.json new file mode 100644 index 000000000..ea710119d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFenceNorthSouthEastWest.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nsew", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFencePost.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFencePost.json new file mode 100644 index 000000000..4932d58c6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenFencePost.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_post", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenSlabBottom.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenSlabBottom.json new file mode 100644 index 000000000..d25414b47 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenSlabBottom.json @@ -0,0 +1,8 @@ +{ + "parent": "block/half_slab", + "textures": { + "bottom": "actuallyadditions:blocks/blockTestifiBucksGreenWall", + "top": "actuallyadditions:blocks/blockTestifiBucksGreenWall", + "side": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenSlabTop.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenSlabTop.json new file mode 100644 index 000000000..4d4bf4417 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenSlabTop.json @@ -0,0 +1,8 @@ +{ + "parent": "block/upper_slab", + "textures": { + "bottom": "actuallyadditions:blocks/blockTestifiBucksGreenWall", + "top": "actuallyadditions:blocks/blockTestifiBucksGreenWall", + "side": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairs.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairs.json new file mode 100644 index 000000000..f06aa8039 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairs.json @@ -0,0 +1,8 @@ +{ + "parent": "block/stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockTestifiBucksGreenWall", + "top": "actuallyadditions:blocks/blockTestifiBucksGreenWall", + "side": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairsInner.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairsInner.json new file mode 100644 index 000000000..34b5b94e7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairsInner.json @@ -0,0 +1,8 @@ +{ + "parent": "block/inner_stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockTestifiBucksGreenWall", + "top": "actuallyadditions:blocks/blockTestifiBucksGreenWall", + "side": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairsOuter.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairsOuter.json new file mode 100644 index 000000000..96ce69aa6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksGreenStairsOuter.json @@ -0,0 +1,8 @@ +{ + "parent": "block/outer_stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockTestifiBucksGreenWall", + "top": "actuallyadditions:blocks/blockTestifiBucksGreenWall", + "side": "actuallyadditions:blocks/blockTestifiBucksGreenWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceInventory.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceInventory.json new file mode 100644 index 000000000..0a5bfad64 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceInventory.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_inventory", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorth.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorth.json new file mode 100644 index 000000000..49f70eb52 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorth.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_n", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthEast.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthEast.json new file mode 100644 index 000000000..d5762b020 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthEast.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ne", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouth.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouth.json new file mode 100644 index 000000000..9679dae9d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouth.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ns", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthAbove.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthAbove.json new file mode 100644 index 000000000..bf166b510 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthAbove.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ns_above", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthEast.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthEast.json new file mode 100644 index 000000000..96659843c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthEast.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nse", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthEastWest.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthEastWest.json new file mode 100644 index 000000000..1223badcf --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFenceNorthSouthEastWest.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nsew", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFencePost.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFencePost.json new file mode 100644 index 000000000..18244230d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteFencePost.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_post", + "textures": { + "wall": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteSlabBottom.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteSlabBottom.json new file mode 100644 index 000000000..b25b04fd4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteSlabBottom.json @@ -0,0 +1,8 @@ +{ + "parent": "block/half_slab", + "textures": { + "bottom": "actuallyadditions:blocks/blockTestifiBucksWhiteWall", + "top": "actuallyadditions:blocks/blockTestifiBucksWhiteWall", + "side": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteSlabTop.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteSlabTop.json new file mode 100644 index 000000000..941ae9448 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteSlabTop.json @@ -0,0 +1,8 @@ +{ + "parent": "block/upper_slab", + "textures": { + "bottom": "actuallyadditions:blocks/blockTestifiBucksWhiteWall", + "top": "actuallyadditions:blocks/blockTestifiBucksWhiteWall", + "side": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairs.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairs.json new file mode 100644 index 000000000..cda06026f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairs.json @@ -0,0 +1,8 @@ +{ + "parent": "block/stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockTestifiBucksWhiteWall", + "top": "actuallyadditions:blocks/blockTestifiBucksWhiteWall", + "side": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairsInner.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairsInner.json new file mode 100644 index 000000000..ebd3ee1df --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairsInner.json @@ -0,0 +1,8 @@ +{ + "parent": "block/inner_stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockTestifiBucksWhiteWall", + "top": "actuallyadditions:blocks/blockTestifiBucksWhiteWall", + "side": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairsOuter.json b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairsOuter.json new file mode 100644 index 000000000..e3d36bcdf --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTestifiBucksWhiteStairsOuter.json @@ -0,0 +1,8 @@ +{ + "parent": "block/outer_stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockTestifiBucksWhiteWall", + "top": "actuallyadditions:blocks/blockTestifiBucksWhiteWall", + "side": "actuallyadditions:blocks/blockTestifiBucksWhiteWall" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockBlackLotus.json b/src/main/resources/assets/actuallyadditions/models/item/blockBlackLotus.json new file mode 100644 index 000000000..448efa27a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockBlackLotus.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:blocks/blockBlackLotus" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenFence.json b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenFence.json new file mode 100644 index 000000000..c10464080 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenFence.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockTestifiBucksGreenFenceInventory", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenSlab.json b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenSlab.json new file mode 100644 index 000000000..9dab993f8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenSlab.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockTestifiBucksGreenSlabBottom", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenStairs.json b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenStairs.json new file mode 100644 index 000000000..a9fb38819 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksGreenStairs.json @@ -0,0 +1,13 @@ +{ + "parent": "actuallyadditions:block/blockTestifiBucksGreenStairs", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "gui": { + "rotation": [ 0, 180, 0 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteFence.json b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteFence.json new file mode 100644 index 000000000..2a487daf3 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteFence.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockTestifiBucksWhiteFenceInventory", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteSlab.json b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteSlab.json new file mode 100644 index 000000000..f323b337e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteSlab.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockTestifiBucksWhiteSlabBottom", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteStairs.json b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteStairs.json new file mode 100644 index 000000000..37460dfd7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockTestifiBucksWhiteStairs.json @@ -0,0 +1,13 @@ +{ + "parent": "actuallyadditions:block/blockTestifiBucksWhiteStairs", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "gui": { + "rotation": [ 0, 180, 0 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBattery.json b/src/main/resources/assets/actuallyadditions/models/item/itemBattery.json new file mode 100644 index 000000000..5b11ee9ce --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBattery.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBattery" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBatteryDouble.json b/src/main/resources/assets/actuallyadditions/models/item/itemBatteryDouble.json new file mode 100644 index 000000000..13ed302b6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBatteryDouble.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBatteryDouble" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBatteryQuadruple.json b/src/main/resources/assets/actuallyadditions/models/item/itemBatteryQuadruple.json new file mode 100644 index 000000000..327a98ddb --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBatteryQuadruple.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBatteryQuadruple" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBatteryQuintuple.json b/src/main/resources/assets/actuallyadditions/models/item/itemBatteryQuintuple.json new file mode 100644 index 000000000..cf16d5de9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBatteryQuintuple.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBatteryQuintuple" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBatteryTriple.json b/src/main/resources/assets/actuallyadditions/models/item/itemBatteryTriple.json new file mode 100644 index 000000000..eff130296 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBatteryTriple.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBatteryTriple" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBucketCanolaOil.json b/src/main/resources/assets/actuallyadditions/models/item/itemBucketCanolaOil.json new file mode 100644 index 000000000..9d4cc28c8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBucketCanolaOil.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBucketCanolaOil" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBucketOil.json b/src/main/resources/assets/actuallyadditions/models/item/itemBucketOil.json new file mode 100644 index 000000000..75c941074 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBucketOil.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBucketOil" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCoffeeBeans.json b/src/main/resources/assets/actuallyadditions/models/item/itemCoffeeBeans.json new file mode 100644 index 000000000..2677e5f3e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCoffeeBeans.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCoffeeBeans" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemGrowthRing.json b/src/main/resources/assets/actuallyadditions/models/item/itemGrowthRing.json new file mode 100644 index 000000000..6a168e784 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemGrowthRing.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemGrowthRing" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPhantomConnector.json b/src/main/resources/assets/actuallyadditions/models/item/itemPhantomConnector.json new file mode 100644 index 000000000..bbc5cf49a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPhantomConnector.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPhantomConnector" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemRiceSeed.json b/src/main/resources/assets/actuallyadditions/models/item/itemRiceSeed.json new file mode 100644 index 000000000..723b390dd --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemRiceSeed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemRiceSeed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSuctionRing.json b/src/main/resources/assets/actuallyadditions/models/item/itemSuctionRing.json new file mode 100644 index 000000000..5fc36c5bb --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSuctionRing.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemSuctionRing" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemTeleStaff.json b/src/main/resources/assets/actuallyadditions/models/item/itemTeleStaff.json new file mode 100644 index 000000000..2488f5e93 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemTeleStaff.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemTeleStaff" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemWaterRemovalRing.json b/src/main/resources/assets/actuallyadditions/models/item/itemWaterRemovalRing.json new file mode 100644 index 000000000..e833b971a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemWaterRemovalRing.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemWaterRemovalRing" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemWingsOfTheBats.json b/src/main/resources/assets/actuallyadditions/models/item/itemWingsOfTheBats.json new file mode 100644 index 000000000..16ce4d11b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemWingsOfTheBats.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemWingsOfTheBats" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} From 0d00143298d39def7e73ef7a24bd226d97feb342 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 9 Jan 2016 17:30:24 +0100 Subject: [PATCH 22/58] Maybe fixed a bug caused by desync that would cause blocks to have ridiculous amounts of energy/luqiuid --- .../actuallyadditions/mod/blocks/base/BlockContainerBase.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index d2497bbf1..f2c3b0ac4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -159,16 +159,19 @@ public abstract class BlockContainerBase extends BlockContainer{ if(tile instanceof IEnergySaver){ ((IEnergySaver)tile).setEnergy(stack.getTagCompound().getInteger("Energy")); + stack.getTagCompound().removeTag("Energy"); } if(tile instanceof IFluidSaver){ int amount = stack.getTagCompound().getInteger("FluidAmount"); + stack.getTagCompound().removeTag("FluidAmount"); if(amount > 0){ FluidStack[] fluids = new FluidStack[amount]; for(int i = 0; i < amount; i++){ NBTTagCompound compound = stack.getTagCompound().getCompoundTag("Fluid"+i); + stack.getTagCompound().removeTag("Fluid"+i); if(compound != null){ fluids[i] = FluidStack.loadFluidStackFromNBT(compound); } From 4ed17950b9fdeab7f6b9270f531f37584e3f5be2 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 9 Jan 2016 17:53:06 +0100 Subject: [PATCH 23/58] Removed TESRs for the most part and added a "not complete"-disclaimer for the upcoming 1.8.9 beta releases ~ --- .../mod/blocks/render/RenderLaserRelay.java | 61 ------ .../render/RenderReconstructorLens.java | 11 +- .../mod/blocks/render/RenderSmileyCloud.java | 28 +-- .../mod/blocks/render/RenderTileEntity.java | 58 ------ .../mod/blocks/render/model/ModelBaseAA.java | 33 ---- .../render/model/ModelBookletStand.java | 115 ----------- .../render/model/ModelCoffeeMachine.java | 151 -------------- .../mod/blocks/render/model/ModelCompost.java | 20 +- .../blocks/render/model/ModelFishingNet.java | 119 ----------- .../render/model/ModelFurnaceSolar.java | 36 ---- .../blocks/render/model/ModelLaserRelay.java | 187 ------------------ .../render/model/ModelPhantomBooster.java | 163 --------------- .../blocks/render/model/ModelSmileyCloud.java | 171 ---------------- .../mod/booklet/BookletUtils.java | 3 + .../mod/booklet/InitBooklet.java | 8 +- .../mod/booklet/button/IndexButton.java | 10 + .../mod/booklet/chapter/BookletChapter.java | 7 + .../mod/proxy/ClientProxy.java | 12 +- .../assets/actuallyadditions/lang/en_US.lang | 1 + 19 files changed, 44 insertions(+), 1150 deletions(-) delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelBaseAA.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelBookletStand.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCoffeeMachine.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelFishingNet.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelFurnaceSolar.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelLaserRelay.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelPhantomBooster.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelSmileyCloud.java diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java deleted file mode 100644 index 1df707eaf..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file ("RenderLaserRelay.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render; - -import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; -import de.ellpeck.actuallyadditions.mod.util.PosUtil; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.tileentity.TileEntity; - - -public class RenderLaserRelay extends RenderTileEntity{ - - public RenderLaserRelay(ModelBaseAA model){ - super(model); - } - - @Override - public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int par6){ - GlStateManager.pushMatrix(); - GlStateManager.translate((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); - GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); - GlStateManager.translate(0.0F, -2.0F, 0.0F); - this.bindTexture(resLoc); - - int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); - if(meta == 0){ - GlStateManager.rotate(180F, 1F, 0F, 0F); - GlStateManager.translate(0F, -2F, 0F); - } - else if(meta == 3){ - GlStateManager.rotate(-90, 1F, 0F, 0F); - GlStateManager.translate(0F, -1F, 1F); - } - else if(meta == 2){ - GlStateManager.rotate(90, 1F, 0F, 0F); - GlStateManager.translate(0F, -1F, -1F); - } - else if(meta == 4){ - GlStateManager.rotate(90, 0F, 0F, 1F); - GlStateManager.translate(1F, -1F, 0F); - } - else if(meta == 5){ - GlStateManager.rotate(90, 0F, 0F, -1F); - GlStateManager.translate(-1F, -1F, 0F); - } - - GlStateManager.scale(0.85F, 0.85F, 0.85F); - GlStateManager.translate(0F, 0.2657F, 0F); - theModel.render(0.0625F); - GlStateManager.popMatrix(); - } - -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java index 012edb494..627119a37 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderReconstructorLens.java @@ -11,20 +11,15 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import de.ellpeck.actuallyadditions.api.lens.ILensItem; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import de.ellpeck.actuallyadditions.mod.util.PosUtil; -import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +//TODO Fix Reconstructor Lens rendering public class RenderReconstructorLens extends TileEntitySpecialRenderer{ @Override public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int par6){ - if(!(tile instanceof TileEntityAtomicReconstructor)){ + /*if(!(tile instanceof TileEntityAtomicReconstructor)){ return; } ItemStack stack = ((TileEntityAtomicReconstructor)tile).getStackInSlot(0); @@ -66,6 +61,6 @@ public class RenderReconstructorLens extends TileEntitySpecialRenderer{ AssetUtil.renderItemInWorld(stack); GlStateManager.popMatrix(); - } + }*/ } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java index 180784f49..36ded7504 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java @@ -10,30 +10,17 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; -import de.ellpeck.actuallyadditions.mod.misc.cloud.ISmileyCloudEasterEgg; -import de.ellpeck.actuallyadditions.mod.misc.cloud.SmileyCloudEasterEggs; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; -import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.PosUtil; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -public class RenderSmileyCloud extends RenderTileEntity{ +//TODO Fix Smiley Cloud +public class RenderSmileyCloud extends TileEntitySpecialRenderer{ - private static final ResourceLocation resLocValentine = new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/models/modelPinkFluffyUnicloud.png"); - - public RenderSmileyCloud(ModelBaseAA model){ - super(model); - } + //private static final ResourceLocation resLocValentine = new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/models/modelPinkFluffyUnicloud.png"); @Override public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int partial){ - if(!(tile instanceof TileEntitySmileyCloud)){ + /*if(!(tile instanceof TileEntitySmileyCloud)){ return; } TileEntitySmileyCloud theCloud = (TileEntitySmileyCloud)tile; @@ -122,7 +109,7 @@ public class RenderSmileyCloud extends RenderTileEntity{ GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); //TODO Fix nameplate with Smiley Cloud - /*Tessellator tessellator = Tessellator.getInstance(); + Tessellator tessellator = Tessellator.getInstance(); GlStateManager.glDisable(GlStateManager.GL_TEXTURE_2D); tessellator.startDrawingQuads(); int i = Minecraft.getMinecraft().fontRendererObj.getStringWidth(theCloud.name)/2; @@ -132,7 +119,7 @@ public class RenderSmileyCloud extends RenderTileEntity{ tessellator.addVertex(i+1, 8.0D, 0.0D); tessellator.addVertex(i+1, -1.0D, 0.0D); tessellator.draw(); - GlStateManager.glEnable(GlStateManager.GL_TEXTURE_2D);*/ + GlStateManager.glEnable(GlStateManager.GL_TEXTURE_2D); GlStateManager.depthMask(true); Minecraft.getMinecraft().fontRendererObj.drawString(theCloud.name, -Minecraft.getMinecraft().fontRendererObj.getStringWidth(theCloud.name)/2, 0, StringUtil.DECIMAL_COLOR_WHITE); @@ -146,6 +133,7 @@ public class RenderSmileyCloud extends RenderTileEntity{ } } GlStateManager.popMatrix(); + */ } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java deleted file mode 100644 index fa0e46756..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTileEntity.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file ("RenderTileEntity.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render; - -import de.ellpeck.actuallyadditions.mod.blocks.render.model.ModelBaseAA; -import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.PosUtil; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; - -public class RenderTileEntity extends TileEntitySpecialRenderer{ - - public ModelBaseAA theModel; - public ResourceLocation resLoc; - - public RenderTileEntity(ModelBaseAA model){ - this.theModel = model; - this.resLoc = new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/models/"+this.theModel.getName()+".png"); - } - - @Override - public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int i){ - GlStateManager.pushMatrix(); - GlStateManager.translate((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); - GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); - GlStateManager.translate(0.0F, -2.0F, 0.0F); - this.bindTexture(resLoc); - - if(theModel.doesRotate()){ - int meta = PosUtil.getMetadata(tile.getPos(), tile.getWorld()); - if(meta == 0){ - GlStateManager.rotate(180F, 0F, 1F, 0F); - } - if(meta == 1){ - GlStateManager.rotate(90F, 0F, 1F, 0F); - } - if(meta == 3){ - GlStateManager.rotate(270F, 0F, 1F, 0F); - } - } - - theModel.render(0.0625F); - theModel.renderExtra(0.0625F, tile); - - GlStateManager.popMatrix(); - } - -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelBaseAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelBaseAA.java deleted file mode 100644 index 3596c5699..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelBaseAA.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file ("ModelBaseAA.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.tileentity.TileEntity; - -public class ModelBaseAA extends ModelBase{ - - public void render(float f){ - - } - - public String getName(){ - return null; - } - - public void renderExtra(float f, TileEntity tile){ - - } - - public boolean doesRotate(){ - return false; - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelBookletStand.java deleted file mode 100644 index dd369ab4d..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelBookletStand.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * This file ("ModelBookletStand.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render.model; - -import net.minecraft.client.model.ModelRenderer; - -public class ModelBookletStand extends ModelBaseAA{ - - ModelRenderer body1; - ModelRenderer bottom1; - ModelRenderer bottom2; - ModelRenderer body2; - ModelRenderer body3; - ModelRenderer book1; - ModelRenderer book2; - ModelRenderer book3; - ModelRenderer book4; - - public ModelBookletStand(){ - textureWidth = 64; - textureHeight = 64; - - body1 = new ModelRenderer(this, 0, 0); - body1.addBox(0F, 0F, 0F, 14, 8, 1); - body1.setRotationPoint(-7F, 17F, 1F); - body1.setTextureSize(64, 64); - body1.mirror = true; - setRotation(body1, -0.7853982F, 0F, 0F); - bottom1 = new ModelRenderer(this, 25, 6); - bottom1.addBox(0F, 0F, 0F, 1, 1, 8); - bottom1.setRotationPoint(-5F, 23F, -5F); - bottom1.setTextureSize(64, 64); - bottom1.mirror = true; - setRotation(bottom1, 0F, 0F, 0F); - bottom2 = new ModelRenderer(this, 25, 6); - bottom2.addBox(0F, 0F, 0F, 1, 1, 8); - bottom2.setRotationPoint(4F, 23F, -5F); - bottom2.setTextureSize(64, 64); - bottom2.mirror = true; - setRotation(bottom2, 0F, 0F, 0F); - body2 = new ModelRenderer(this, 0, 10); - body2.addBox(0F, 0F, 0F, 14, 1, 2); - body2.setRotationPoint(-7F, 20.91F, -5F); - body2.setTextureSize(64, 64); - body2.mirror = true; - setRotation(body2, -0.7853982F, 0F, 0F); - body3 = new ModelRenderer(this, 0, 14); - body3.addBox(0F, 0F, 0F, 10, 3, 1); - body3.setRotationPoint(-5F, 20F, -1F); - body3.setTextureSize(64, 64); - body3.mirror = true; - setRotation(body3, 0F, 0F, 0F); - book1 = new ModelRenderer(this, 36, 0); - book1.addBox(0F, 0F, 0F, 8, 10, 0); - book1.setRotationPoint(0F, 15F, 3.1F); - book1.setTextureSize(64, 64); - book1.mirror = true; - setRotation(book1, -0.837758F, 0.0872665F, 0F); - book2 = new ModelRenderer(this, 36, 0); - book2.addBox(0F, 0F, 0F, 8, 10, 0); - book2.setRotationPoint(-8F, 15F, 3.1F); - book2.setTextureSize(64, 64); - book2.mirror = true; - setRotation(book2, -0.837758F, 0F, 0F); - book3 = new ModelRenderer(this, 0, 19); - book3.addBox(0F, 0F, 0F, 7, 8, 1); - book3.setRotationPoint(7F, 16F, 1.2F); - book3.setTextureSize(64, 64); - book3.mirror = true; - setRotation(book3, 0.837758F, -3.054326F, 0F); - book4 = new ModelRenderer(this, 0, 19); - book4.addBox(0F, 0F, 0F, 7, 8, 1); - book4.setRotationPoint(-7F, 15.3F, 1.2F); - book4.setTextureSize(64, 64); - book4.mirror = true; - setRotation(book4, -0.837758F, 0F, 0F); - } - - private void setRotation(ModelRenderer model, float x, float y, float z){ - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override - public void render(float f){ - body1.render(f); - bottom1.render(f); - bottom2.render(f); - body2.render(f); - body3.render(f); - book1.render(f); - book2.render(f); - book3.render(f); - book4.render(f); - } - - @Override - public String getName(){ - return "modelBookletStand"; - } - - @Override - public boolean doesRotate(){ - return true; - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCoffeeMachine.java deleted file mode 100644 index 858e5a85d..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCoffeeMachine.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * This file ("ModelCoffeeMachine.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render.model; - -import net.minecraft.client.model.ModelRenderer; - -/** - * Made by Canitzp. - * Thanks. - */ -public class ModelCoffeeMachine extends ModelBaseAA{ - - ModelRenderer p1; - ModelRenderer p2; - ModelRenderer p3; - ModelRenderer p4; - ModelRenderer p5; - ModelRenderer p6; - ModelRenderer p7; - ModelRenderer p8; - ModelRenderer p9; - ModelRenderer p10; - ModelRenderer p11; - ModelRenderer p12; - ModelRenderer p13; - - public ModelCoffeeMachine(){ - textureWidth = 128; - textureHeight = 128; - - p1 = new ModelRenderer(this, 0, 0); - p1.addBox(0F, 0F, 0F, 10, 1, 14); - p1.setRotationPoint(-5F, 23F, -7F); - p1.setTextureSize(128, 128); - p1.mirror = true; - setRotation(p1, 0F, 0F, 0F); - p2 = new ModelRenderer(this, 49, 0); - p2.addBox(0F, 0F, 0F, 10, 8, 6); - p2.setRotationPoint(-5F, 15F, 1F); - p2.setTextureSize(128, 128); - p2.mirror = true; - setRotation(p2, 0F, 0F, 0F); - p3 = new ModelRenderer(this, 0, 16); - p3.addBox(0F, 0F, 0F, 10, 2, 11); - p3.setRotationPoint(-5F, 13F, -4F); - p3.setTextureSize(128, 128); - p3.mirror = true; - setRotation(p3, 0F, 0F, 0F); - p4 = new ModelRenderer(this, 43, 16); - p4.addBox(0F, 0F, 0F, 8, 3, 8); - p4.setRotationPoint(-4F, 10F, -1F); - p4.setTextureSize(128, 128); - p4.mirror = true; - setRotation(p4, 0F, 0F, 0F); - p5 = new ModelRenderer(this, 0, 30); - p5.addBox(0F, 0F, 0F, 2, 1, 2); - p5.setRotationPoint(-1F, 15F, -3.5F); - p5.setTextureSize(128, 128); - p5.mirror = true; - setRotation(p5, 0F, 0F, 0F); - p6 = new ModelRenderer(this, 82, 0); - p6.addBox(0F, 0F, 0F, 4, 5, 1); - p6.setRotationPoint(-2F, 17F, -1F); - p6.setTextureSize(128, 128); - p6.mirror = true; - setRotation(p6, 0F, 0F, 0F); - p7 = new ModelRenderer(this, 82, 0); - p7.addBox(0F, 0F, 0F, 4, 5, 1); - p7.setRotationPoint(-2F, 17F, -6F); - p7.setTextureSize(128, 128); - p7.mirror = true; - setRotation(p7, 0F, 0F, 0F); - p8 = new ModelRenderer(this, 82, 0); - p8.addBox(0F, 0F, 0F, 4, 5, 1); - p8.setRotationPoint(2F, 17F, -1F); - p8.setTextureSize(128, 128); - p8.mirror = true; - setRotation(p8, 0F, 1.570796F, 0F); - p9 = new ModelRenderer(this, 82, 0); - p9.addBox(0F, 0F, 0F, 4, 5, 1); - p9.setRotationPoint(-3F, 17F, -1F); - p9.setTextureSize(128, 128); - p9.mirror = true; - setRotation(p9, 0F, 1.570796F, 0F); - p10 = new ModelRenderer(this, 93, 0); - p10.addBox(0F, 0F, 0F, 4, 1, 4); - p10.setRotationPoint(-2F, 22F, -5F); - p10.setTextureSize(128, 128); - p10.mirror = true; - setRotation(p10, 0F, 0F, 0F); - p11 = new ModelRenderer(this, 82, 7); - p11.addBox(0F, 0F, 0F, 1, 1, 2); - p11.setRotationPoint(-4F, 18F, -4F); - p11.setTextureSize(128, 128); - p11.mirror = true; - setRotation(p11, 0F, 0F, 0F); - p12 = new ModelRenderer(this, 82, 7); - p12.addBox(0F, 0F, 0F, 1, 1, 2); - p12.setRotationPoint(-4F, 21F, -4F); - p12.setTextureSize(128, 128); - p12.mirror = true; - setRotation(p12, 0F, 0F, 0F); - p13 = new ModelRenderer(this, 89, 7); - p13.addBox(0F, 0F, 0F, 1, 2, 2); - p13.setRotationPoint(-5F, 19F, -4F); - p13.setTextureSize(128, 128); - p13.mirror = true; - setRotation(p13, 0F, 0F, 0F); - } - - private void setRotation(ModelRenderer model, float x, float y, float z){ - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override - public void render(float f){ - p1.render(f); - p2.render(f); - p3.render(f); - p4.render(f); - p5.render(f); - p6.render(f); - p7.render(f); - p8.render(f); - p9.render(f); - p10.render(f); - p11.render(f); - p12.render(f); - p13.render(f); - } - - @Override - public String getName(){ - return "modelCoffeeMachine"; - } - - @Override - public boolean doesRotate(){ - return true; - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java index 9804bf28d..685bbff99 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelCompost.java @@ -10,17 +10,12 @@ package de.ellpeck.actuallyadditions.mod.blocks.render.model; -import de.ellpeck.actuallyadditions.mod.items.InitItems; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost; -import net.minecraft.client.Minecraft; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; +import net.minecraft.client.model.ModelBase; -public class ModelCompost extends ModelBaseAA{ +//TODO Fix compost rendering +public class ModelCompost extends ModelBase{ - public ModelRenderer floor; + /*public ModelRenderer floor; public ModelRenderer wallOne; public ModelRenderer wallTwo; public ModelRenderer wallThree; @@ -67,11 +62,6 @@ public class ModelCompost extends ModelBaseAA{ this.floor.render(f); } - @Override - public String getName(){ - return "modelCompost"; - } - @Override public void renderExtra(float f, TileEntity tile){ //Hehe @@ -95,5 +85,5 @@ public class ModelCompost extends ModelBaseAA{ } } } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelFishingNet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelFishingNet.java deleted file mode 100644 index a7747ea78..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelFishingNet.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * This file ("ModelFishingNet.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render.model; - -import net.minecraft.client.model.ModelRenderer; - -public class ModelFishingNet extends ModelBaseAA{ - - public ModelRenderer s1; - public ModelRenderer s2; - public ModelRenderer s3; - public ModelRenderer s4; - public ModelRenderer s5; - public ModelRenderer s6; - public ModelRenderer s7; - public ModelRenderer s8; - public ModelRenderer s9; - public ModelRenderer s10; - public ModelRenderer s11; - public ModelRenderer s12; - public ModelRenderer s13; - public ModelRenderer s14; - public ModelRenderer s15; - public ModelRenderer s16; - - public ModelFishingNet(){ - this.textureWidth = 64; - this.textureHeight = 64; - this.s11 = new ModelRenderer(this, 0, 0); - this.s11.mirror = true; - this.s11.setRotationPoint(-3.5F, 23.0F, -8.0F); - this.s11.addBox(0.0F, 0.0F, 0.0F, 1, 1, 16, 0.0F); - this.s9 = new ModelRenderer(this, 0, 0); - this.s9.mirror = true; - this.s9.setRotationPoint(-7.5F, 23.0F, -8.0F); - this.s9.addBox(0.0F, 0.0F, 0.0F, 1, 1, 16, 0.0F); - this.s8 = new ModelRenderer(this, 0, 0); - this.s8.setRotationPoint(-8.0F, 23.0F, 6.5F); - this.s8.addBox(0.0F, 0.0F, 0.0F, 16, 1, 1, 0.0F); - this.s3 = new ModelRenderer(this, 0, 0); - this.s3.setRotationPoint(-8.0F, 23.0F, -3.5F); - this.s3.addBox(0.0F, 0.0F, 0.0F, 16, 1, 1, 0.0F); - this.s1 = new ModelRenderer(this, 0, 0); - this.s1.setRotationPoint(-8.0F, 23.0F, -7.5F); - this.s1.addBox(0.0F, 0.0F, 0.0F, 16, 1, 1, 0.0F); - this.s14 = new ModelRenderer(this, 0, 0); - this.s14.mirror = true; - this.s14.setRotationPoint(2.5F, 23.0F, -8.0F); - this.s14.addBox(0.0F, 0.0F, 0.0F, 1, 1, 16, 0.0F); - this.s15 = new ModelRenderer(this, 0, 0); - this.s15.mirror = true; - this.s15.setRotationPoint(4.5F, 23.0F, -8.0F); - this.s15.addBox(0.0F, 0.0F, 0.0F, 1, 1, 16, 0.0F); - this.s4 = new ModelRenderer(this, 0, 0); - this.s4.setRotationPoint(-8.0F, 23.0F, -1.5F); - this.s4.addBox(0.0F, 0.0F, 0.0F, 16, 1, 1, 0.0F); - this.s13 = new ModelRenderer(this, 0, 0); - this.s13.mirror = true; - this.s13.setRotationPoint(0.5F, 23.0F, -8.0F); - this.s13.addBox(0.0F, 0.0F, 0.0F, 1, 1, 16, 0.0F); - this.s5 = new ModelRenderer(this, 0, 0); - this.s5.setRotationPoint(-8.0F, 23.0F, 0.5F); - this.s5.addBox(0.0F, 0.0F, 0.0F, 16, 1, 1, 0.0F); - this.s6 = new ModelRenderer(this, 0, 0); - this.s6.setRotationPoint(-8.0F, 23.0F, 2.5F); - this.s6.addBox(0.0F, 0.0F, 0.0F, 16, 1, 1, 0.0F); - this.s12 = new ModelRenderer(this, 0, 0); - this.s12.mirror = true; - this.s12.setRotationPoint(-1.5F, 23.0F, -8.0F); - this.s12.addBox(0.0F, 0.0F, 0.0F, 1, 1, 16, 0.0F); - this.s16 = new ModelRenderer(this, 0, 0); - this.s16.mirror = true; - this.s16.setRotationPoint(6.5F, 23.0F, -8.0F); - this.s16.addBox(0.0F, 0.0F, 0.0F, 1, 1, 16, 0.0F); - this.s2 = new ModelRenderer(this, 0, 0); - this.s2.setRotationPoint(-8.0F, 23.0F, -5.5F); - this.s2.addBox(0.0F, 0.0F, 0.0F, 16, 1, 1, 0.0F); - this.s7 = new ModelRenderer(this, 0, 0); - this.s7.setRotationPoint(-8.0F, 23.0F, 4.5F); - this.s7.addBox(0.0F, 0.0F, 0.0F, 16, 1, 1, 0.0F); - this.s10 = new ModelRenderer(this, 0, 0); - this.s10.mirror = true; - this.s10.setRotationPoint(-5.5F, 23.0F, -8.0F); - this.s10.addBox(0.0F, 0.0F, 0.0F, 1, 1, 16, 0.0F); - } - - @Override - public void render(float f){ - this.s11.render(f); - this.s9.render(f); - this.s8.render(f); - this.s3.render(f); - this.s1.render(f); - this.s14.render(f); - this.s15.render(f); - this.s4.render(f); - this.s13.render(f); - this.s5.render(f); - this.s6.render(f); - this.s12.render(f); - this.s16.render(f); - this.s2.render(f); - this.s7.render(f); - this.s10.render(f); - } - - @Override - public String getName(){ - return "modelFishingNet"; - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelFurnaceSolar.java deleted file mode 100644 index 2b1ad9242..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelFurnaceSolar.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file ("ModelFurnaceSolar.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render.model; - -import net.minecraft.client.model.ModelRenderer; - -public class ModelFurnaceSolar extends ModelBaseAA{ - - public ModelRenderer s; - - public ModelFurnaceSolar(){ - this.textureWidth = 64; - this.textureHeight = 32; - this.s = new ModelRenderer(this, 0, 0); - this.s.setRotationPoint(-8.0F, 21.0F, -8.0F); - this.s.addBox(0.0F, 0.0F, 0.0F, 16, 3, 16, 0.0F); - } - - @Override - public void render(float f){ - this.s.render(f); - } - - @Override - public String getName(){ - return "modelFurnaceSolar"; - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelLaserRelay.java deleted file mode 100644 index d44cce4ea..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelLaserRelay.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * This file ("ModelLaserRelay.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render.model; - -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.client.renderer.GlStateManager; -import org.lwjgl.opengl.GL11; - -/** - * Made by Canitzp. - * Thanks. Seriously. It looks really awesome. I don't think I could do this. - */ -public class ModelLaserRelay extends ModelBaseAA{ - - ModelRenderer bottom; - ModelRenderer laserPillar; - ModelRenderer laserBase; - ModelRenderer covering1; - ModelRenderer covering2; - ModelRenderer covering3; - ModelRenderer covering4; - ModelRenderer covering5; - ModelRenderer covering6; - ModelRenderer covering7; - ModelRenderer covering8; - ModelRenderer top; - ModelRenderer covering9; - ModelRenderer covering10; - ModelRenderer covering11; - ModelRenderer covering12; - ModelRenderer energyBall; - - public ModelLaserRelay(){ - textureWidth = 64; - textureHeight = 64; - - bottom = new ModelRenderer(this, 0, 0); - bottom.addBox(0F, 0F, 0F, 8, 1, 8); - bottom.setRotationPoint(-4F, 23F, -4F); - bottom.setTextureSize(64, 64); - bottom.mirror = true; - setRotation(bottom, 0F, 0F, 0F); - laserPillar = new ModelRenderer(this, 54, 0); - laserPillar.addBox(0F, 0F, 0F, 2, 11, 2); - laserPillar.setRotationPoint(-1F, 10F, -1F); - laserPillar.setTextureSize(64, 64); - laserPillar.mirror = true; - setRotation(laserPillar, 0F, 0F, 0F); - laserBase = new ModelRenderer(this, 33, 0); - laserBase.addBox(0F, 0F, 0F, 5, 2, 5); - laserBase.setRotationPoint(-2.5F, 21F, -2.5F); - laserBase.setTextureSize(64, 64); - laserBase.mirror = true; - setRotation(laserBase, 0F, 0F, 0F); - covering1 = new ModelRenderer(this, 0, 10); - covering1.addBox(0F, 0F, 0F, 8, 3, 1); - covering1.setRotationPoint(-4F, 20F, -5F); - covering1.setTextureSize(64, 64); - covering1.mirror = true; - setRotation(covering1, 0F, 0F, 0F); - covering2 = new ModelRenderer(this, 0, 10); - covering2.addBox(0F, 0F, 0F, 8, 3, 1); - covering2.setRotationPoint(-4F, 20F, 4F); - covering2.setTextureSize(64, 64); - covering2.mirror = true; - setRotation(covering2, 0F, 0F, 0F); - covering3 = new ModelRenderer(this, 0, 10); - covering3.addBox(0F, 0F, 0F, 8, 3, 1); - covering3.setRotationPoint(-5F, 20F, 4F); - covering3.setTextureSize(64, 64); - covering3.mirror = true; - setRotation(covering3, 0F, 1.579523F, 0F); - covering4 = new ModelRenderer(this, 0, 10); - covering4.addBox(0F, 0F, 0F, 8, 3, 1); - covering4.setRotationPoint(4F, 20F, 4F); - covering4.setTextureSize(64, 64); - covering4.mirror = true; - setRotation(covering4, 0F, 1.579523F, 0F); - covering5 = new ModelRenderer(this, 0, 10); - covering5.addBox(0F, 0F, 0F, 8, 3, 1); - covering5.setRotationPoint(-4F, 10F, -5F); - covering5.setTextureSize(64, 64); - covering5.mirror = true; - setRotation(covering5, 0F, 0F, 0F); - covering6 = new ModelRenderer(this, 0, 10); - covering6.addBox(0F, 0F, 0F, 8, 3, 1); - covering6.setRotationPoint(-4F, 10F, 4F); - covering6.setTextureSize(64, 64); - covering6.mirror = true; - setRotation(covering6, 0F, 0F, 0F); - covering7 = new ModelRenderer(this, 0, 10); - covering7.addBox(0F, 0F, 0F, 8, 3, 1); - covering7.setRotationPoint(-5F, 10F, 4F); - covering7.setTextureSize(64, 64); - covering7.mirror = true; - setRotation(covering7, 0F, 1.579523F, 0F); - covering8 = new ModelRenderer(this, 0, 10); - covering8.addBox(0F, 0F, 0F, 8, 3, 1); - covering8.setRotationPoint(4F, 10F, 4F); - covering8.setTextureSize(64, 64); - covering8.mirror = true; - setRotation(covering8, 0F, 1.579523F, 0F); - top = new ModelRenderer(this, 0, 0); - top.addBox(0F, 0F, 0F, 8, 1, 8); - top.setRotationPoint(-4F, 9F, -4F); - top.setTextureSize(64, 64); - top.mirror = true; - setRotation(top, 0F, 0F, 0F); - covering9 = new ModelRenderer(this, 19, 10); - covering9.addBox(0F, 0F, 0F, 8, 7, 1); - covering9.setRotationPoint(-4F, 13F, 5F); - covering9.setTextureSize(64, 64); - covering9.mirror = true; - setRotation(covering9, 0F, 0F, 0F); - covering10 = new ModelRenderer(this, 19, 10); - covering10.addBox(0F, 0F, 0F, 8, 7, 1); - covering10.setRotationPoint(-4F, 13F, -6F); - covering10.setTextureSize(64, 64); - covering10.mirror = true; - setRotation(covering10, 0F, 0F, 0F); - covering11 = new ModelRenderer(this, 19, 10); - covering11.addBox(0F, 0F, 0F, 8, 7, 1); - covering11.setRotationPoint(-6F, 13F, 4F); - covering11.setTextureSize(64, 64); - covering11.mirror = true; - setRotation(covering11, 0F, 1.579523F, 0F); - covering12 = new ModelRenderer(this, 19, 10); - covering12.addBox(0F, 0F, 0F, 8, 7, 1); - covering12.setRotationPoint(5F, 13F, 4F); - covering12.setTextureSize(64, 64); - covering12.mirror = true; - setRotation(covering12, 0F, 1.579523F, 0F); - energyBall = new ModelRenderer(this, 0, 15); - energyBall.addBox(0F, 0F, 0F, 3, 3, 3); - energyBall.setRotationPoint(-1.5F, 15F, -1.5F); - energyBall.setTextureSize(64, 64); - energyBall.mirror = true; - setRotation(energyBall, 0F, 0F, 0F); - } - - private void setRotation(ModelRenderer model, float x, float y, float z){ - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override - public void render(float f){ - GlStateManager.enableBlend(); - GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - bottom.render(f); - laserPillar.render(f); - laserBase.render(f); - energyBall.render(f); - top.render(f); - covering1.render(f); - covering2.render(f); - covering3.render(f); - covering4.render(f); - covering5.render(f); - covering6.render(f); - covering7.render(f); - covering8.render(f); - covering9.render(f); - covering10.render(f); - covering11.render(f); - covering12.render(f); - } - - @Override - public String getName(){ - return "modelLaserRelay"; - } - - @Override - public boolean doesRotate(){ - return true; - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelPhantomBooster.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelPhantomBooster.java deleted file mode 100644 index b96beda9f..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelPhantomBooster.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * This file ("ModelPhantomBooster.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render.model; - -import net.minecraft.client.model.ModelRenderer; - -public class ModelPhantomBooster extends ModelBaseAA{ - - ModelRenderer s1; - ModelRenderer s2; - ModelRenderer s3; - ModelRenderer s4; - ModelRenderer s5; - ModelRenderer s6; - ModelRenderer s7; - ModelRenderer s8; - ModelRenderer s9; - ModelRenderer s10; - ModelRenderer s11; - ModelRenderer s12; - ModelRenderer s13; - ModelRenderer s14; - ModelRenderer s15; - - public ModelPhantomBooster(){ - textureWidth = 128; - textureHeight = 128; - - s1 = new ModelRenderer(this, 0, 0); - s1.addBox(0F, 0F, 0F, 4, 16, 4); - s1.setRotationPoint(-2F, 8F, -2F); - s1.setTextureSize(128, 128); - s1.mirror = true; - setRotation(s1, 0F, 0F, 0F); - s2 = new ModelRenderer(this, 17, 0); - s2.addBox(0F, 0F, 0F, 6, 1, 6); - s2.setRotationPoint(-3F, 9F, -3F); - s2.setTextureSize(128, 128); - s2.mirror = true; - setRotation(s2, 0F, 0F, 0F); - s3 = new ModelRenderer(this, 17, 0); - s3.addBox(0F, 0F, 0F, 6, 1, 6); - s3.setRotationPoint(-3F, 22F, -3F); - s3.setTextureSize(128, 128); - s3.mirror = true; - setRotation(s3, 0F, 0F, 0F); - s4 = new ModelRenderer(this, 17, 8); - s4.addBox(0F, 0F, 0F, 6, 2, 1); - s4.setRotationPoint(-3F, 10F, -4F); - s4.setTextureSize(128, 128); - s4.mirror = true; - setRotation(s4, 0F, 0F, 0F); - s5 = new ModelRenderer(this, 17, 8); - s5.addBox(0F, 0F, 0F, 6, 2, 1); - s5.setRotationPoint(-3F, 10F, 3F); - s5.setTextureSize(128, 128); - s5.mirror = true; - setRotation(s5, 0F, 0F, 0F); - s6 = new ModelRenderer(this, 17, 8); - s6.addBox(0F, 0F, 0F, 6, 2, 1); - s6.setRotationPoint(-4F, 10F, 3F); - s6.setTextureSize(128, 128); - s6.mirror = true; - setRotation(s6, 0F, 1.579523F, 0F); - s7 = new ModelRenderer(this, 17, 8); - s7.addBox(0F, 0F, 0F, 6, 2, 1); - s7.setRotationPoint(3F, 10F, 3F); - s7.setTextureSize(128, 128); - s7.mirror = true; - setRotation(s7, 0F, 1.579523F, 0F); - s8 = new ModelRenderer(this, 17, 12); - s8.addBox(0F, 0F, 0F, 6, 8, 1); - s8.setRotationPoint(-3F, 12F, -5F); - s8.setTextureSize(128, 128); - s8.mirror = true; - setRotation(s8, 0F, 0F, 0F); - s9 = new ModelRenderer(this, 17, 12); - s9.addBox(0F, 0F, 0F, 6, 8, 1); - s9.setRotationPoint(-3F, 12F, 4F); - s9.setTextureSize(128, 128); - s9.mirror = true; - setRotation(s9, 0F, 0F, 0F); - s10 = new ModelRenderer(this, 17, 12); - s10.addBox(0F, 0F, 0F, 6, 8, 1); - s10.setRotationPoint(-5F, 12F, 3F); - s10.setTextureSize(128, 128); - s10.mirror = true; - setRotation(s10, 0F, 1.579523F, 0F); - s11 = new ModelRenderer(this, 17, 12); - s11.addBox(0F, 0F, 0F, 6, 8, 1); - s11.setRotationPoint(4F, 12F, 3F); - s11.setTextureSize(128, 128); - s11.mirror = true; - setRotation(s11, 0F, 1.579523F, 0F); - s12 = new ModelRenderer(this, 17, 8); - s12.addBox(0F, 0F, 0F, 6, 2, 1); - s12.setRotationPoint(-4F, 20F, 3F); - s12.setTextureSize(128, 128); - s12.mirror = true; - setRotation(s12, 0F, 1.579523F, 0F); - s13 = new ModelRenderer(this, 17, 8); - s13.addBox(0F, 0F, 0F, 6, 2, 1); - s13.setRotationPoint(-3F, 20F, 3F); - s13.setTextureSize(128, 128); - s13.mirror = true; - setRotation(s13, 0F, 0F, 0F); - s14 = new ModelRenderer(this, 17, 8); - s14.addBox(0F, 0F, 0F, 6, 2, 1); - s14.setRotationPoint(3F, 20F, 3F); - s14.setTextureSize(128, 128); - s14.mirror = true; - setRotation(s14, 0F, 1.579523F, 0F); - s15 = new ModelRenderer(this, 17, 8); - s15.addBox(0F, 0F, 0F, 6, 2, 1); - s15.setRotationPoint(-3F, 20F, -4F); - s15.setTextureSize(128, 128); - s15.mirror = true; - setRotation(s15, 0F, 0F, 0F); - } - - private void setRotation(ModelRenderer model, float x, float y, float z){ - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override - public void render(float f){ - s1.render(f); - s2.render(f); - s3.render(f); - s4.render(f); - s5.render(f); - s6.render(f); - s7.render(f); - s8.render(f); - s9.render(f); - s10.render(f); - s11.render(f); - s12.render(f); - s13.render(f); - s14.render(f); - s15.render(f); - } - - @Override - public String getName(){ - return "modelPhantomBooster"; - } - - @Override - public boolean doesRotate(){ - return true; - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelSmileyCloud.java deleted file mode 100644 index d15218459..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/model/ModelSmileyCloud.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * This file ("ModelSmileyCloud.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.render.model; - -import net.minecraft.client.model.ModelRenderer; - -public class ModelSmileyCloud extends ModelBaseAA{ - - ModelRenderer s1; - ModelRenderer s2; - ModelRenderer s3; - ModelRenderer s4; - ModelRenderer s5; - ModelRenderer s6; - ModelRenderer s7; - ModelRenderer s8; - ModelRenderer s9; - ModelRenderer s10; - ModelRenderer s11; - ModelRenderer s12; - ModelRenderer s13; - ModelRenderer s14; - ModelRenderer s15; - ModelRenderer s16; - - public ModelSmileyCloud(){ - textureWidth = 64; - textureHeight = 64; - - s1 = new ModelRenderer(this, 0, 0); - s1.addBox(0F, 0F, 0F, 12, 10, 10); - s1.setRotationPoint(-6F, 14F, -4F); - s1.setTextureSize(64, 64); - s1.mirror = true; - setRotation(s1, 0F, 0F, 0F); - s2 = new ModelRenderer(this, 45, 0); - s2.addBox(0F, 0F, 0F, 1, 8, 8); - s2.setRotationPoint(-7F, 15F, -3F); - s2.setTextureSize(64, 64); - s2.mirror = true; - setRotation(s2, 0F, 0F, 0F); - s3 = new ModelRenderer(this, 45, 0); - s3.addBox(0F, 0F, 0F, 1, 8, 8); - s3.setRotationPoint(6F, 15F, -3F); - s3.setTextureSize(64, 64); - s3.mirror = true; - setRotation(s3, 0F, 0F, 0F); - s4 = new ModelRenderer(this, 0, 21); - s4.addBox(0F, 0F, 0F, 10, 8, 1); - s4.setRotationPoint(-5F, 15F, 6F); - s4.setTextureSize(64, 64); - s4.mirror = true; - setRotation(s4, 0F, 0F, 0F); - s5 = new ModelRenderer(this, 23, 27); - s5.addBox(0F, 0F, 0F, 10, 1, 8); - s5.setRotationPoint(-5F, 13F, -3F); - s5.setTextureSize(64, 64); - s5.mirror = true; - setRotation(s5, 0F, 0F, 0F); - s6 = new ModelRenderer(this, 23, 21); - s6.addBox(0F, 0F, 0F, 6, 1, 4); - s6.setRotationPoint(-3F, 12F, -1F); - s6.setTextureSize(64, 64); - s6.mirror = true; - setRotation(s6, 0F, 0F, 0F); - s7 = new ModelRenderer(this, 45, 16); - s7.addBox(0F, 0F, 0F, 6, 6, 1); - s7.setRotationPoint(-3F, 16F, 7F); - s7.setTextureSize(64, 64); - s7.mirror = true; - setRotation(s7, 0F, 0F, 0F); - s8 = new ModelRenderer(this, 0, 31); - s8.addBox(0F, 0F, 0F, 1, 6, 6); - s8.setRotationPoint(-8F, 16F, -2F); - s8.setTextureSize(64, 64); - s8.mirror = true; - setRotation(s8, 0F, 0F, 0F); - s9 = new ModelRenderer(this, 0, 31); - s9.addBox(0F, 0F, 0F, 1, 6, 6); - s9.setRotationPoint(7F, 16F, -2F); - s9.setTextureSize(64, 64); - s9.mirror = true; - setRotation(s9, 0F, 0F, 0F); - s10 = new ModelRenderer(this, 15, 37); - s10.addBox(0F, 0F, 0F, 6, 1, 1); - s10.setRotationPoint(-3F, 20F, -5F); - s10.setTextureSize(64, 64); - s10.mirror = true; - setRotation(s10, 0F, 0F, 0F); - s11 = new ModelRenderer(this, 15, 31); - s11.addBox(0F, 1F, 0F, 1, 1, 1); - s11.setRotationPoint(-4F, 18F, -5F); - s11.setTextureSize(64, 64); - s11.mirror = true; - setRotation(s11, 0F, 0F, 0F); - s12 = new ModelRenderer(this, 15, 31); - s12.addBox(0F, 1F, 0F, 1, 1, 1); - s12.setRotationPoint(3F, 18F, -5F); - s12.setTextureSize(64, 64); - s12.mirror = true; - setRotation(s12, 0F, 0F, 0F); - s13 = new ModelRenderer(this, 15, 40); - s13.addBox(0F, 0F, 0F, 2, 2, 1); - s13.setRotationPoint(-3F, 15F, -4.5F); - s13.setTextureSize(64, 64); - s13.mirror = true; - setRotation(s13, 0F, 0F, 0F); - s14 = new ModelRenderer(this, 15, 40); - s14.addBox(0F, 0F, 0F, 2, 2, 1); - s14.setRotationPoint(1F, 15F, -4.5F); - s14.setTextureSize(64, 64); - s14.mirror = true; - setRotation(s14, 0F, 0F, 0F); - s15 = new ModelRenderer(this, 30, 37); - s15.addBox(0F, 0F, 0F, 1, 1, 1); - s15.setRotationPoint(-2.5F, 15.5F, -4.7F); - s15.setTextureSize(64, 64); - s15.mirror = true; - setRotation(s15, 0F, 0F, 0F); - s16 = new ModelRenderer(this, 30, 37); - s16.addBox(0F, 0F, 0F, 1, 1, 1); - s16.setRotationPoint(1.5F, 15.5F, -4.7F); - s16.setTextureSize(64, 64); - s16.mirror = true; - setRotation(s16, 0F, 0F, 0F); - } - - private void setRotation(ModelRenderer model, float x, float y, float z){ - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override - public void render(float f){ - s1.render(f); - s2.render(f); - s3.render(f); - s4.render(f); - s5.render(f); - s6.render(f); - s7.render(f); - s8.render(f); - s9.render(f); - s10.render(f); - s11.render(f); - s12.render(f); - s13.render(f); - s14.render(f); - s15.render(f); - s16.render(f); - } - - @Override - public String getName(){ - return "modelSmileyCloud"; - } - - @Override - public boolean doesRotate(){ - return true; - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java index 2e970c778..ba58fcf10 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java @@ -191,6 +191,9 @@ public class BookletUtils{ else if(button instanceof TexturedButton){ booklet.drawHoveringText(((TexturedButton)button).textList, mouseX, mouseY); } + else if(button instanceof IndexButton){ + ((IndexButton)button).drawHover(mouseX, mouseY); + } } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index b17442a64..01d82845f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -65,7 +65,7 @@ public class InitBooklet{ //Getting Started chapterIntro = new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3)); new BookletChapter("bookTutorial", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeBook)); - new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setNoText().setPageStacksWildcard(), new PageCrafting(7, MiscCrafting.recipesCrystals).setNoText(), new PageCrafting(8, MiscCrafting.recipesCrystalBlocks).setNoText(), new PageReconstructor(9, LensNoneRecipeHandler.mainPageRecipes).setNoText()).setSpecial(); + new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setNoText().setPageStacksWildcard(), new PageCrafting(7, MiscCrafting.recipesCrystals).setNoText(), new PageCrafting(8, MiscCrafting.recipesCrystalBlocks).setNoText(), new PageReconstructor(9, LensNoneRecipeHandler.mainPageRecipes).setNoText()).setSpecial().setIncomplete(); new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("", TileEntityCoalGenerator.PRODUCE)); new BookletChapter("craftingIngs", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(7, ItemCrafting.recipeRing).setNoText(), new PageCrafting(8, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(11, ItemCrafting.recipeDough).setNoText(), new PageCrafting(12, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(13, BlockCrafting.recipeIronCase).setNoText()).setImportant(); new BookletChapter("rf", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.redstone), new PageTextOnly(1)); @@ -75,7 +75,7 @@ public class InitBooklet{ new BookletChapter("miscDecorStuffsAndThings", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, LensNoneRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensNoneRecipeHandler.recipeGreenWall).setNoText()); new BookletChapter("bookStand", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockBookletStand), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBookStand).setPageStacksWildcard()); new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("", OreGen.QUARTZ_MIN).addTextReplacement("", OreGen.QUARTZ_MAX), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText()); - new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setNoText()).setSpecial(); + new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setNoText()).setSpecial().setIncomplete(); new BookletChapter("coalStuff", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText()); ArrayList lampPages = new ArrayList(); lampPages.add(new PageTextOnly(lampPages.size()+1)); @@ -99,7 +99,7 @@ public class InitBooklet{ new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGreenhouseGlass), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass)); new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText()); new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText()); - new BookletChapter("compost", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemFertilizer)).addTextReplacement("", TileEntityCompost.AMOUNT), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageCrafting(3, ItemCrafting.recipesMashedFood)); + new BookletChapter("compost", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemFertilizer)).addTextReplacement("", TileEntityCompost.AMOUNT), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageCrafting(3, ItemCrafting.recipesMashedFood)).setIncomplete(); new BookletChapter("crate", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, ItemCrafting.recipeCrateKeeper), new PageCrafting(3, ItemCrafting.recipeChestToCrateUpgrade)); new BookletChapter("rangedCollector", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockRangedCollector), new PageTextOnly(1).addTextReplacement("", TileEntityRangedCollector.RANGE), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText()); @@ -132,7 +132,7 @@ public class InitBooklet{ } new BookletChapter("aiots", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.emeraldPaxel), aiotPages.toArray(new BookletPage[aiotPages.size()])).setImportant(); - new BookletChapter("jams", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemJams), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemJams, 1, Util.WILDCARD)), new PagePicture(2, "pageJamHouse", 150), new PageTextOnly(3)); + new BookletChapter("jams", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemJams), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemJams, 1, Util.WILDCARD)), new PagePicture(2, "pageJamHouse", 150), new PageTextOnly(3)).setIncomplete(); ArrayList potionRingPages = new ArrayList(); potionRingPages.add(new PageTextOnly(potionRingPages.size()+1)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java index 0767fd902..8107169ab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/IndexButton.java @@ -12,10 +12,14 @@ package de.ellpeck.actuallyadditions.mod.booklet.button; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; +import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapter; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.util.EnumChatFormatting; public class IndexButton extends GuiButton{ @@ -56,4 +60,10 @@ public class IndexButton extends GuiButton{ this.gui.getFontRenderer().drawString(this.displayString, this.xPosition+textOffsetX, this.yPosition+(this.height-8)/2, 0); } } + + public void drawHover(int mouseX, int mouseY){ + if(this.chap instanceof BookletChapter && ((BookletChapter)this.chap).isIncomplete){ + this.gui.drawHoveringText(this.gui.getFontRenderer().listFormattedStringToWidth(EnumChatFormatting.RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".unavailable"), 250), mouseX, mouseY); + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapter.java index 25a989431..62c0e29a9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapter.java @@ -27,6 +27,8 @@ public class BookletChapter implements IBookletChapter{ private final String unlocalizedName; public EnumChatFormatting color; + public boolean isIncomplete; + public BookletChapter(String unlocalizedName, IBookletEntry entry, ItemStack displayStack, BookletPage... pages){ this.pages = pages.clone(); @@ -48,6 +50,11 @@ public class BookletChapter implements IBookletChapter{ return this.pages; } + public BookletChapter setIncomplete(){ + this.isIncomplete = true; + return this; + } + @Override public String getUnlocalizedName(){ return this.unlocalizedName; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index 7b51a382a..7abe85c17 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -11,15 +11,9 @@ package de.ellpeck.actuallyadditions.mod.proxy; -import de.ellpeck.actuallyadditions.mod.blocks.render.RenderLaserRelay; -import de.ellpeck.actuallyadditions.mod.blocks.render.RenderReconstructorLens; -import de.ellpeck.actuallyadditions.mod.blocks.render.RenderSmileyCloud; -import de.ellpeck.actuallyadditions.mod.blocks.render.RenderTileEntity; -import de.ellpeck.actuallyadditions.mod.blocks.render.model.*; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.event.InitEvents; import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit; -import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentClientData; import net.minecraft.client.Minecraft; @@ -28,7 +22,6 @@ import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -75,7 +68,8 @@ public class ClientProxy implements IProxy{ InitEvents.initClient(); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost())); + //TODO Fix Tile rendering + /*ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCompost.class, new RenderTileEntity(new ModelCompost())); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFishingNet.class, new RenderTileEntity(new ModelFishingNet())); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFurnaceSolar.class, new RenderTileEntity(new ModelFurnaceSolar())); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCoffeeMachine.class, new RenderTileEntity(new ModelCoffeeMachine())); @@ -83,7 +77,7 @@ public class ClientProxy implements IProxy{ ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmileyCloud.class, new RenderSmileyCloud(new ModelSmileyCloud())); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLaserRelay.class, new RenderLaserRelay(new ModelLaserRelay())); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBookletStand.class, new RenderTileEntity(new ModelBookletStand())); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAtomicReconstructor.class, new RenderReconstructorLens()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAtomicReconstructor.class, new RenderReconstructorLens());*/ //TODO Fix villager //VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png")); diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 77758ceff..afc832ca2 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -534,6 +534,7 @@ booklet.actuallyadditions.indexEntry.itemsRF.name=Items that use RF #Booklet Info booklet.actuallyadditions.recipeDisabled=The crafting recipe for this item is disabled in the Config File! If you're on a server, ask the server author to enable it in the config. If you're on a client, press the 'Open Config'-Button on the top right and enable the recipe! +booklet.actuallyadditions.unavailable=Parts of this feature are currently disabled or incomplete due to the not fully complete 1.8.9 Port. You may experience something that's missing or doesn't fully work. Please use this item with caution! booklet.actuallyadditions.clickToSeeRecipe=Click to see more Information booklet.actuallyadditions.amountOfWords=%s words in total booklet.actuallyadditions.amountOfChars=%s characters in total From 8efe5482f8d35c90eae810991dc186091613db69 Mon Sep 17 00:00:00 2001 From: canitzp Date: Sat, 9 Jan 2016 18:07:18 +0100 Subject: [PATCH 24/58] -Coffee Machine JSON \o/ --- .../blockstates/blockCoffeeMachine.json | 8 + .../models/block/blockCoffeeMachine.json | 459 ++++++++++++++++++ .../models/item/blockCoffeeMachine.json | 10 + .../blocks/models/modelCoffeeMachine.png | Bin 552 -> 475 bytes 4 files changed, 477 insertions(+) create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockCoffeeMachine.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCoffeeMachine.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCoffeeMachine.json diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockCoffeeMachine.json b/src/main/resources/assets/actuallyadditions/blockstates/blockCoffeeMachine.json new file mode 100644 index 000000000..a511e2211 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockCoffeeMachine.json @@ -0,0 +1,8 @@ +{ + "variants": { + "meta=1": { "model": "actuallyadditions:blockCoffeeMachine", "y": 0 }, + "meta=0": { "model": "actuallyadditions:blockCoffeeMachine", "y": 180 }, + "meta=3": { "model": "actuallyadditions:blockCoffeeMachine", "y": 270 }, + "meta=2": { "model": "actuallyadditions:blockCoffeeMachine", "y": 90 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeMachine.json b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeMachine.json new file mode 100644 index 000000000..1788a503b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeMachine.json @@ -0,0 +1,459 @@ +{ + "__createdwith": "opl's Model Creator", + "ambientocclusion": false, + "textures": { + "coffeeMachine": "actuallyadditions:blocks/models/modelCoffeeMachine" + }, + "elements": [ + { + "from": [3,0,1], + "to": [13,1,15], + "faces": { + "up": { + "uv": [2.1052632,0.26315784,2.7368422,1.5263159], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [2.999999,0.6842098,5.631579,2.68421], + "texture": "#coffeeMachine" + }, + "west": { + "uv": [4.105262,1.3684217,5.052636,2.6315799], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [2.9473686,0.68421054,6.4210534,1.5263159], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [0,1.3400855,6.8,2.6], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [4.2105265,0.84210527,4.5263147,1.5263158], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [3,1,1], + "to": [13,10,7], + "faces": { + "up": { + "uv": [0.0,0.0,10.0,6.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,10.0,6.0], + "texture": "missingtexture" + }, + "west": { + "uv": [1.3684201,0.47368407,4.105262,1.5263153], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [1.5789478,0.31578958,5.157894,2.8421037], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [2,0,6,3], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [2,0,4,2], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [3,9,1], + "to": [13,11,12], + "faces": { + "up": { + "uv": [9.094739,1.0421052,10.568425,2.094737], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [2.3157897,0.21052635,6.000002,2.9999995], + "texture": "#coffeeMachine" + }, + "west": { + "uv": [8.2,2.6,11.2,3], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [7.6,2.6,9,3], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [7.2,2.6,9,3], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [8.6,2.6,10,3], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [4,11,1], + "to": [12,14,9], + "faces": { + "up": { + "uv": [1.6,3,3.2,4.6], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [0.0,0.0,8.0,8.0], + "texture": "missingtexture" + }, + "west": { + "uv": [10.315789,1,10.4,1.6842105], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [9.684211,1.4736842,10.736842,1.8947369], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [9.326308,1.1271291,10.957892,1.4631579], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [10.2,0.6,10.8,1.2], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [7,8,9.5], + "to": [9,9,11.5], + "faces": { + "up": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "down": { + "uv": [9.684211,1.2631578,10.526316,1.8947369], + "texture": "#coffeeMachine" + }, + "west": { + "uv": [9.7263155,1.2736838,10.357892,1.4842103], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [9.7263155,1.0526314,10.357892,2.1052628], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [10.105263,0.84210527,10.526316,1.8947369], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [10.105263,1.0526316,10.526316,1.6842105], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [6,1,9], + "to": [10,2,13], + "faces": { + "up": { + "uv": [7.368421,3.5789473,8,4.2], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [0.0,0.0,4.0,4.0], + "texture": "missingtexture" + }, + "west": { + "uv": [6.947369,3.3684208,7.7894735,4.157895], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [7.3684196,3.2105274,7.999996,4], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [7.578948,3.5789473,8.210525,4.2105265], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [6.968419,3.210528,8.021048,4], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [6,2,8], + "to": [10,7,9], + "faces": { + "up": { + "uv": [7.105263,3.6315806,8.15789,4.2105265], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [7.38947,3.3789477,7.810521,4.1684194], + "texture": "#coffeeMachine" + }, + "west": { + "uv": [7.368421,3.6315784,8,4], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [7.2105265,3.4210534,7.8,4], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [6.915793,3.221051,7.8,4], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [7.526315,3.421054,8,4], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [6,2,13], + "to": [10,7,14], + "faces": { + "up": { + "uv": [7.5789475,3.7894738,8,4], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [6.999999,3.6,7.631578,3.9684215], + "texture": "#coffeeMachine" + }, + "west": { + "uv": [7.368421,3.5789473,8,4], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [7.7894735,3.368421,8,3.7894738], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [7.157894,3.4210515,7.8,4], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [7.2,3.8,8,4], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [5,2,9], + "to": [6,7,13], + "faces": { + "up": { + "uv": [7.2105265,3.157895,7.999999,3.9999993], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [6.7894745,3.578949,7.842106,4], + "texture": "#coffeeMachine" + }, + "west": { + "uv": [6.7684236,3.789474,8.242098,4.000001], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [7.7368455,3.578947,8,4.2], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [7.526315,3.368423,8,4], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [7.5789504,3.3684218,8,4], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [10,2,9], + "to": [11,7,13], + "faces": { + "up": { + "uv": [7.1578946,3.5789473,7.7894735,4], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [7.368421,3.7894738,7.5789475,4], + "texture": "#coffeeMachine" + }, + "west": { + "uv": [7.1578946,3.4210515,7.6,3.8], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [6.9789453,3.2210534,8.031565,4.0105267], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [7.3684235,3.421053,8.210532,3.9999993], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [7.421055,3.210527,7.999999,4], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [4,2,10], + "to": [5,3,12], + "faces": { + "up": { + "uv": [6.778949,3.1894736,7.4105287,3.821053], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [7.2105265,3.210527,7.7894735,4.1578965], + "texture": "#coffeeMachine" + }, + "west": { + "uv": [6.9473686,3.5789473,7.5789475,4], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [0.0,0.0,2.0,1.0], + "texture": "missingtexture" + }, + "north": { + "uv": [7.0000014,3.4210515,7.8,4], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [7.3684244,3.3684216,7.8,4], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [4,5,10], + "to": [5,6,12], + "faces": { + "up": { + "uv": [7.5789456,3.7894752,8.210522,4.2105274], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [7.5789475,3.7894738,8,4], + "texture": "#coffeeMachine" + }, + "west": { + "uv": [6.8947353,3.5789483,7.5263157,3.9999993], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [0.0,0.0,2.0,1.0], + "texture": "missingtexture" + }, + "north": { + "uv": [7.2105207,3.2105284,8.210525,4.2105293], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [7.5789475,3.7894752,8.210524,4.2105284], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [3,3,10], + "to": [4,5,12], + "faces": { + "up": { + "uv": [7.421055,3.4736857,8.000004,4.000002], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [7.368421,3.5789473,8,3.7894738], + "texture": "#coffeeMachine" + }, + "west": { + "uv": [7.5789475,3.5789473,8,3.7894738], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [7.4736843,3.4736855,8.2105255,4.2105255], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [6.9684157,3.178948,7.3894744,4.021053], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [6.978949,3.5999997,7.610526,4.0210524], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [6,10.2,10.8], + "to": [7,11.2,11.8], + "faces": { + "up": { + "uv": [10.315789,2.4,10.4,2.6], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [9.4,2.2,9.8,2.6], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [9.4,2.4,9.6,2.6], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [9.4,2.2,9.8,2.6], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [9.4,2.2,9.8,2.6], + "texture": "#coffeeMachine" + } + } + }, + { + "from": [9,10.2,10.8], + "to": [10,11.2,11.8], + "faces": { + "up": { + "uv": [9.4,2.2,9.8,2.6], + "texture": "#coffeeMachine" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [9.4,2.2,9.8,2.6], + "texture": "#coffeeMachine" + }, + "east": { + "uv": [9.4,2.2,9.8,2.6], + "texture": "#coffeeMachine" + }, + "north": { + "uv": [9.4,2.2,9.8,2.6], + "texture": "#coffeeMachine" + }, + "south": { + "uv": [9.4,2.2,9.8,2.6], + "texture": "#coffeeMachine" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCoffeeMachine.json b/src/main/resources/assets/actuallyadditions/models/item/blockCoffeeMachine.json new file mode 100644 index 000000000..7afa59601 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCoffeeMachine.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockCoffeeMachine", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelCoffeeMachine.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelCoffeeMachine.png index 99aac9c1904b465985155970547ef36edc675b9c..c8dcd6915400c3e9190ad8050da91855878b9f0b 100644 GIT binary patch delta 418 zcmV;T0bTy61lt24iBL{Q4GJ0x0000DNk~Le0000`0000`2nGNE0FDvzt&t%xf8YTL z5H}DDZp1hM00C%8L_t(|+U?gpZi6rw#_@-$3`VMg7!X4{xKmb+;LG%UJwq?Rnki9~ zp;1*uOc|0&?GjLjLS6Aui2lDNiXe)4cx}H9)WBN%sS#~9n?N&kBXn{*$3f?L?ln8g zvK+knsX(SM0nU339DBE=0zrTTe@K7?I0?=wLzc1>-8k!bJNrEL#y>pl9WWD4#%^SDAaR#-+2JPg;3oy zMi_%_BCGXI%f|;LQK-AcLXzrF+89r7`@Igwvy3s4r0wfF>G@9KBnp*gT$$2KkaZ<) z#~rNCbZ@(Vh-JWg7p~U8N}8F`-}V&OL9YO-O`}@-j4_u$?Nx@-dw?$|E1jx_t$y@D zrsq$Awq5)80K4{iUHeF%K5_OHIOfLiz1rHY5#W`qfs^q885jQQ3xXhZuUKE7EdT%j M07*qoM6N<$f)b3pH~;_u delta 502 zcmcc3yn;osGr-TCmrII^fq{Y7)59eQNH>5m2OE$)Y?pX?qM||leKu|$3C(?e{i_%l z7`J-5IEGZ*dV9mrkI7Ml;lh5mE>%M{krt=!t(%^5R7;+JF1d$c?NsUHg@$bbkt;aO z)@@`AbQ3GTmwjRrv*e8Z_5bE8)va8$Dplo*iLYSi+p0d_%R2jK`cM2+tSQ5?vMG6H z(wTLf4QGHz_80fJ;@uJT=60#R3Jg{srn}zt7mfbYvG*lY(D_t(D+$vB_I~eI2mRSq z&BWlEFrRDpw_U4NCEc}UT(Ciyp~;!IfnmYq;)ZqAFXmJiys%^blk%a&>aIq#j##(f zynDXSx1Y)}JFPeS%R25I7WLh)XYcOlklndIcU2C)2TB3ndKru%sEwg{9g*WBSIOycXm05G#W8Z-pD9C`2Zse eE-b$H17A8bg=d#Wzp$P!2Zr8>D From f18dfa97c8d11dace92152ac881fae0bcc2a39c9 Mon Sep 17 00:00:00 2001 From: canitzp Date: Sat, 9 Jan 2016 18:37:21 +0100 Subject: [PATCH 25/58] FurnaceSolar/Solar Panel JSON --- .../models/block/blockFurnaceSolar.json | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFurnaceSolar.json diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceSolar.json b/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceSolar.json new file mode 100644 index 000000000..4b8783955 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceSolar.json @@ -0,0 +1,39 @@ +{ + "__createdwith": "opl's Model Creator", + "ambientocclusion": false, + "textures": { + "furnaceSolar": "actuallyadditions:blocks/models/modelFurnaceSolar" + }, + "elements": [ + { + "from": [0,0,0], + "to": [16,6,16], + "faces": { + "up": { + "uv": [4,0,8,4], + "texture": "#furnaceSolar" + }, + "down": { + "uv": [8,0,12,4], + "texture": "#furnaceSolar" + }, + "west": { + "uv": [4,4,8,4.75], + "texture": "#furnaceSolar" + }, + "east": { + "uv": [0,4,4,4.75], + "texture": "#furnaceSolar" + }, + "north": { + "uv": [0,4,4,4.75], + "texture": "#furnaceSolar" + }, + "south": { + "uv": [0,4,4,4.75], + "texture": "#furnaceSolar" + } + } + } + ] +} \ No newline at end of file From 15c03f2a43495251e83ac22b1ed7d3b6d5e640d2 Mon Sep 17 00:00:00 2001 From: canitzp Date: Sat, 9 Jan 2016 18:37:30 +0100 Subject: [PATCH 26/58] FurnaceSolar/Solar Panel JSON --- .../blockstates/blockFurnaceSolar.json | 5 +++++ .../models/item/blockFurnaceSolar.json | 15 +++++++++++++++ .../blocks/models/modelFurnaceSolar.png | Bin 1146 -> 1178 bytes 3 files changed, 20 insertions(+) create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockFurnaceSolar.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockFurnaceSolar.json diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockFurnaceSolar.json b/src/main/resources/assets/actuallyadditions/blockstates/blockFurnaceSolar.json new file mode 100644 index 000000000..5ce3fe382 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockFurnaceSolar.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockFurnaceSolar" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockFurnaceSolar.json b/src/main/resources/assets/actuallyadditions/models/item/blockFurnaceSolar.json new file mode 100644 index 000000000..4490e4593 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockFurnaceSolar.json @@ -0,0 +1,15 @@ +{ + "parent": "actuallyadditions:block/blockFurnaceSolar", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson": { + "rotation": [0, 0, 0 ], + "translation": [0, 4, 2 ], + "scale": [1.2, 1.2, 1.2] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelFurnaceSolar.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelFurnaceSolar.png index 8f7871c3f1bb421b0931207479c0a9f49b6d3fe4..9350d457949b94406ef7a7c74c910b71e3edc3f2 100644 GIT binary patch delta 1126 zcmV-s1eyE#2$~6y7YaZK1^@s6s%dfFks&aD-~kB{8ZC0}xbXl01Sd&EK~#9!?U+An zl8+0v8A=?ZU1M0h4c$U^fd1j(y&j!T2Y|BvtZUQ%o3tp3*x1+*^E`hzZvdhw;>)jpM#v?MdBWuH zP~wh4{y`8dV=?5}14{hG58XeJ!3tPIuHW+euipW1e}7+VQ)^9A;#vTPJ*R>ktRZ{(FEbA2%%g60ajO6iQ||!j!{bS=FJ;- zAICAklvd5Ug$1A-Sa~hW)?{D}LIi*q{~lm%fiW2}SfaXgwAKJ9rChnZS4!3H%WE0D zg)RYrB7a26m_k2dttJp)iuVNSGxF@gX+@qQ!ETaDBSN_ z>u1S;xdYJa^-$stZ26S%+sTi-{^ong$0;^L>-BoInXL|XeSMw5U{D)ytJQK^H5=y2 z-gz6iy1KGoy#5J*AY38O9tgRmkgo`WWsJ!v@<)`o!vvor$Ak zTC191Im=bUD^0Mfw^}VOFE4BL7jA<6e&2re?Jw@$6z|77!B?X-CKW}V5^_5-L7@;b zL_Z}THNnfv%UVC{>+4)!U)QqX;NXDG&CSJ{;LOO%@rDSCkZL^h5`+M2kaDTEhMP=q zZ*R}da+wYL`}@x_^Uu0}6KvicN`wfIQcY<>DrB%Sa}7@}iKdOxi!s46?I+2zAu?FO zjtwsmkn6X|AjTSvwR+|Nsxw@cwbqTh!xym;svc#_-Qo83cFpBaPfy)(xOyaRx-XBu zRlVsr4b1NW{eIt8(`oYTT^&@X)0xuF&dzAJ+fJK2ub1V?!%NwJkJg$_r&IeLptW}8 z$z?Lx|MBs$ofWL6piX|HkWm!T?RFUshYW{9k|aTE?X)yaNsOzQ9UZwgOYNWful|3sZgou6dZPM8XYz|oHLA0+0&vm(FBud? z5oc#-08@3V{Z|iBUDYMz4q{5NwYBxHzDSkJvRcpM@pwEQkH_Qjcsw4D$K&yMJRXn7 sb6C4WlvvB6!WFlK=n!07*qoM6N<$f;GY@EC2ui delta 1094 zcmV-M1iAZ~3Hk_-7YZN<1^@s6qMd$(ks&aD-vb^1Cl2MO!9)N61P4h(K~!ko?U+Gp z<3<$6e>2i3iCUU3kT0-3`4D3W&Ly|@QrJT2F*zisKq2&7v^W<-3;hI}LNC4NVq2V1j}EN@#JaG-vdnfYrpPxI!zzup_cf-)EkY!Cz_N#d}7 z;c!T+)glN20For3-|y3Iw*koK&ui=6ufu{MV0(L8Eb{&Sq6P?pfG@xP86np&<_VL& zLy0>w`3Ii2j>V8B4=C{$KXm^@dK+L3sea4vzkUb6{r!DuO|3Oi6wTX5{F|nzTKE|dKCEnV91QR~iXgvQ@giy|a0GpeegkeY+hA5?Y^X82k zhhYdXgB87QX$HtQmbZD|ngpyt2oDg`=N{H(7?U8qHHx95wFW>b<@)(pDODQhZEn1! zh5$g8J|bmErXR6Z;|Va?dpz|SY4YH(ERB(VNU9&OM%SL8)*7W0LWq)KCI%FL?zz_b zSv+821N8fSl(++%e=dmHp!NPXKuS25Itu&n=mJh3BnfOhT4EqQo7>`y3(Hz-A>9jG~CMvop75v)Sb0 z;-Yl&b=b+t$@2dKNs=I>kM!1m!Dd*iL3|)VA$>=9)@De+3IWIx2kh_fyOX}TxdGtd z;K1n_jYbZ8&Jb9b1cM+z2#L*}Fh;x0V$HNkOJte<87Ab&47q)*U#ENN9FQalnSO_m zJ|HHonG&NH0@iuO1lz!v6l=9hW~yYDyZG$iMwGbXMUdcdIK<}`%m>VW5#AK@#4J`M z!TgkqgqM?G5pOn|TwY$5<}aND2ZMqA>f2x3*ktdgnc%BQj7de7#`xS$NKhz*^wCez zM@jJV^0K6-(P(geeO>Z~%d$ zI0p;{16y>bYVBRzRJ+}t!Fs(Otyarn)p|YeSBsZikJg%YyIs0}571h>el<+0`cF?! z?L1@E8MS&xA%h^G+wC$Qj~S20L{Ws++F@}V6Gah9sag!6+wBs^F>xHb+P-ehPNy@2 z~Mfir{mVlv47HEe7`!kxToSgQM}Qq-pCZKI?pQrXYK#uK|v7E>-7L;<`(rA zi>_h_xk5}Sc6WC%|J99D9+t& Date: Sun, 10 Jan 2016 01:17:17 +0100 Subject: [PATCH 27/58] Some more texture work & fixing. Nothing special. Well, lots of special stuff actually. --- .../mod/blocks/BlockBookletStand.java | 5 -- .../mod/blocks/BlockCoffeeMachine.java | 37 +++++++------- .../mod/blocks/BlockCompost.java | 5 -- .../mod/blocks/BlockCrystal.java | 15 ------ .../mod/blocks/BlockFishingNet.java | 6 --- .../mod/blocks/BlockFurnaceSolar.java | 6 --- .../mod/blocks/BlockLaserRelay.java | 6 --- .../mod/blocks/BlockPhantomBooster.java | 6 --- .../mod/blocks/BlockSmileyCloud.java | 6 --- .../actuallyadditions/mod/blocks/FluidAA.java | 2 +- .../mod/blocks/base/BlockFluidFlowing.java | 10 +--- .../mod/booklet/InitBooklet.java | 4 +- .../actuallyadditions/mod/items/ItemDust.java | 10 ++++ .../mod/items/ItemFoods.java | 18 ++++--- .../actuallyadditions/mod/items/ItemMisc.java | 14 +++++ .../mod/items/{ => base}/ItemSeed.java | 10 +++- .../mod/items/metalists/TheCrystals.java | 16 +++--- .../mod/proxy/ClientProxy.java | 20 ++++++++ .../actuallyadditions/mod/util/AssetUtil.java | 2 +- .../mod/util/CompatUtil.java | 2 +- .../mod/util/FluidStateMapper.java | 48 ++++++++++++++++++ .../actuallyadditions/mod/util/KeyUtil.java | 3 ++ .../actuallyadditions/blockstates/fluids.json | 13 +++++ .../models/block/blockCoffeeMachine.json | 1 + .../models/item/itemCanolaSeed.json | 18 +++++++ .../models/item/itemCoffee.json | 18 +++++++ .../models/item/itemCoffeeSeed.json | 18 +++++++ .../models/item/itemCrafterOnAStick.json | 18 +++++++ .../models/item/itemDust.json | 18 +++++++ .../models/item/itemFertilizer.json | 18 +++++++ .../models/item/itemFlaxSeed.json | 18 +++++++ .../models/item/itemFoodBacon.json | 18 +++++++ .../models/item/itemFoodBaguette.json | 18 +++++++ .../models/item/itemFoodBigCookie.json | 18 +++++++ .../models/item/itemFoodCarrotJuice.json | 18 +++++++ .../models/item/itemFoodCheese.json | 18 +++++++ .../models/item/itemFoodChocolate.json | 18 +++++++ .../models/item/itemFoodChocolateCake.json | 18 +++++++ .../models/item/itemFoodChocolateToast.json | 18 +++++++ .../models/item/itemFoodDoughnut.json | 18 +++++++ .../models/item/itemFoodFishNChips.json | 18 +++++++ .../models/item/itemFoodFrenchFries.json | 18 +++++++ .../models/item/itemFoodFrenchFry.json | 18 +++++++ .../models/item/itemFoodHamburger.json | 18 +++++++ .../models/item/itemFoodNoodle.json | 18 +++++++ .../models/item/itemFoodPizza.json | 18 +++++++ .../models/item/itemFoodPumpkinStew.json | 18 +++++++ .../models/item/itemFoodRice.json | 18 +++++++ .../models/item/itemFoodRiceBread.json | 18 +++++++ .../models/item/itemFoodSpaghetti.json | 18 +++++++ .../item/itemFoodSubmarineSandwich.json | 18 +++++++ .../models/item/itemFoodToast.json | 18 +++++++ .../models/item/itemHairyBall.json | 18 +++++++ .../models/item/itemKnife.json | 18 +++++++ .../models/item/itemMiscBatWing.json | 18 +++++++ .../models/item/itemMiscBlackDye.json | 18 +++++++ .../models/item/itemMiscBlackQuartz.json | 18 +++++++ .../models/item/itemMiscCanola.json | 18 +++++++ .../models/item/itemMiscCoil.json | 18 +++++++ .../models/item/itemMiscCoilAdvanced.json | 18 +++++++ .../models/item/itemMiscCup.json | 18 +++++++ .../models/item/itemMiscDough.json | 18 +++++++ .../models/item/itemMiscDrillCore.json | 18 +++++++ .../models/item/itemMiscKnifeBlade.json | 18 +++++++ .../models/item/itemMiscKnifeHandle.json | 18 +++++++ .../models/item/itemMiscLens.json | 18 +++++++ .../models/item/itemMiscMashedFood.json | 18 +++++++ .../models/item/itemMiscPaperCone.json | 18 +++++++ .../models/item/itemMiscRiceDough.json | 18 +++++++ .../models/item/itemMiscRiceSlime.json | 18 +++++++ .../models/item/itemMiscRing.json | 18 +++++++ .../models/item/itemMiscTinyCharcoal.json | 18 +++++++ .../models/item/itemMiscTinyCoal.json | 18 +++++++ .../models/item/itemResonantRice.json | 18 +++++++ .../textures/items/itemEllspeck.png | Bin 990 -> 0 bytes 75 files changed, 1058 insertions(+), 107 deletions(-) rename src/main/java/de/ellpeck/actuallyadditions/mod/items/{ => base}/ItemSeed.java (85%) create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/util/FluidStateMapper.java create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/fluids.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCanolaSeed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCoffee.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCoffeeSeed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCrafterOnAStick.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemDust.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFertilizer.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFlaxSeed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodBacon.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodBaguette.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodBigCookie.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodCarrotJuice.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodCheese.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolate.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolateCake.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolateToast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodDoughnut.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodFishNChips.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodFrenchFries.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodFrenchFry.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodHamburger.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodNoodle.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodPizza.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodPumpkinStew.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodRice.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodRiceBread.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodSpaghetti.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodSubmarineSandwich.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemFoodToast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHairyBall.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemKnife.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscBatWing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscBlackDye.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscBlackQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscCanola.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscCoil.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscCoilAdvanced.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscCup.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscDough.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscDrillCore.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscKnifeBlade.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscKnifeHandle.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscLens.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscMashedFood.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscPaperCone.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscRiceDough.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscRiceSlime.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscRing.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscTinyCharcoal.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemMiscTinyCoal.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemResonantRice.json delete mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemEllspeck.png diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java index f8e5be1f1..fcf7c5a4f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java @@ -56,11 +56,6 @@ public class BlockBookletStand extends BlockContainerBase implements IHudDisplay return META; } - @Override - public int getRenderType(){ - return AssetUtil.TESR_RENDER_ID; - } - @Override public boolean isOpaqueCube(){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java index f11a14ab0..0bd4b2af7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java @@ -14,18 +14,18 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; -import net.minecraft.world.IBlockAccess; +import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class BlockCoffeeMachine extends BlockContainerBase{ @@ -39,8 +39,9 @@ public class BlockCoffeeMachine extends BlockContainerBase{ this.setResistance(10.0F); this.setStepSound(soundTypeStone); - float f = 1/16F; - this.setBlockBounds(f, 0F, f, 1F-f, 1F-2*f, 1F-f); + //TODO Fix bounding box + //float f = 1/16F; + //this.setBlockBounds(f, 0F, f, 1F-f, 1F-2*f, 1F-f); } @Override @@ -48,11 +49,6 @@ public class BlockCoffeeMachine extends BlockContainerBase{ return META; } - @Override - public int getRenderType(){ - return AssetUtil.TESR_RENDER_ID; - } - @Override public boolean isOpaqueCube(){ return false; @@ -87,21 +83,22 @@ public class BlockCoffeeMachine extends BlockContainerBase{ } @Override - public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos){ - int meta = PosUtil.getMetadata(pos, world); - float f = 0.0625F; + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ + int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - if(meta == 0){ - this.setBlockBounds(0F, 0F, 0F, 1F, 1F, 1F-f*3F); + if(rotation == 0){ + PosUtil.setMetadata(pos, world, 0, 2); } - if(meta == 1){ - this.setBlockBounds(0F, 0F, 0F, 1F-f*3F, 1F, 1F); + if(rotation == 1){ + PosUtil.setMetadata(pos, world, 3, 2); } - if(meta == 2){ - this.setBlockBounds(0F, 0F, f*3F, 1F, 1F, 1F); + if(rotation == 2){ + PosUtil.setMetadata(pos, world, 1, 2); } - if(meta == 3){ - this.setBlockBounds(f*3F, 0F, 0F, 1F, 1F, 1F); + if(rotation == 3){ + PosUtil.setMetadata(pos, world, 2, 2); } + + super.onBlockPlacedBy(world, pos, state, player, stack); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java index b6bd79a05..105d54e16 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java @@ -47,11 +47,6 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ this.setBlockBoundsForItemRender(); } - @Override - public int getRenderType(){ - return AssetUtil.TESR_RENDER_ID; - } - @Override public void addCollisionBoxesToList(World world, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity){ this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3125F, 1.0F); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java index 46a0263f5..8c7b2ad22 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java @@ -22,8 +22,6 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -51,19 +49,6 @@ public class BlockCrystal extends BlockBase{ return this.getMetaFromState(state); } - @Override - @SideOnly(Side.CLIENT) - public int getRenderColor(IBlockState state){ - int meta = this.getMetaFromState(state); - return meta >= allCrystals.length ? super.getRenderColor(state) : allCrystals[meta].color; - } - - @Override - @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess world, BlockPos pos, int renderPass){ - return this.getRenderColor(world.getBlockState(pos)); - } - @SuppressWarnings("all") @SideOnly(Side.CLIENT) public void getSubBlocks(Item item, CreativeTabs tab, List list){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java index 62ac87c7c..e4aa6604f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFishingNet.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFishingNet; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.material.Material; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; @@ -35,11 +34,6 @@ public class BlockFishingNet extends BlockContainerBase{ return new TileEntityFishingNet(); } - @Override - public int getRenderType(){ - return AssetUtil.TESR_RENDER_ID; - } - @Override public boolean isOpaqueCube(){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java index 0e4621239..27b1e48da 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.material.Material; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; @@ -35,11 +34,6 @@ public class BlockFurnaceSolar extends BlockContainerBase{ return new TileEntityFurnaceSolar(); } - @Override - public int getRenderType(){ - return AssetUtil.TESR_RENDER_ID; - } - @Override public boolean isOpaqueCube(){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index 7fb20b93c..4b3dedbbb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; @@ -53,11 +52,6 @@ public class BlockLaserRelay extends BlockContainerBase{ super.addCollisionBoxesToList(world, pos, state, axis, list, entity); } - @Override - public int getRenderType(){ - return AssetUtil.TESR_RENDER_ID; - } - @Override public boolean isOpaqueCube(){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java index 0ae6f218a..3f56a5a01 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBooster; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.material.Material; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; @@ -32,11 +31,6 @@ public class BlockPhantomBooster extends BlockContainerBase{ this.setBlockBounds(3*f, 0F, 3*f, 1-3*f, 1F, 1-3*f); } - @Override - public int getRenderType(){ - return AssetUtil.TESR_RENDER_ID; - } - @Override public boolean isOpaqueCube(){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java index 3afb1cc05..7f2b2c829 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java @@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.material.Material; @@ -53,11 +52,6 @@ public class BlockSmileyCloud extends BlockContainerBase{ return META; } - @Override - public int getRenderType(){ - return AssetUtil.TESR_RENDER_ID; - } - @Override public boolean isOpaqueCube(){ return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/FluidAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/FluidAA.java index 8f81a2617..e38856c67 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/FluidAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/FluidAA.java @@ -17,7 +17,7 @@ import net.minecraftforge.fluids.Fluid; public class FluidAA extends Fluid{ public FluidAA(String fluidName, String textureName){ - super(fluidName, new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/"+textureName+"Still.png"), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/"+textureName+"Flowing.png")); + super(fluidName, new ResourceLocation(ModUtil.MOD_ID_LOWER, "blocks/"+textureName+"Still"), new ResourceLocation(ModUtil.MOD_ID_LOWER, "blocks/"+textureName+"Flowing")); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java index 5c27d120c..d4705287f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; @@ -19,7 +18,6 @@ import net.minecraft.block.material.Material; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; -import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; @@ -33,7 +31,7 @@ public class BlockFluidFlowing extends BlockFluidClassic{ public BlockFluidFlowing(Fluid fluid, Material material, String unlocalizedName){ super(fluid, material); this.name = unlocalizedName; - displacements.put(this, false); + this.displacements.put(this, false); this.register(); } @@ -47,12 +45,6 @@ public class BlockFluidFlowing extends BlockFluidClassic{ else{ this.setCreativeTab(null); } - - this.registerRendering(); - } - - protected void registerRendering(){ - ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index 01d82845f..06d0a3333 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -75,7 +75,7 @@ public class InitBooklet{ new BookletChapter("miscDecorStuffsAndThings", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, LensNoneRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensNoneRecipeHandler.recipeGreenWall).setNoText()); new BookletChapter("bookStand", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockBookletStand), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBookStand).setPageStacksWildcard()); new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("", OreGen.QUARTZ_MIN).addTextReplacement("", OreGen.QUARTZ_MAX), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText()); - new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setNoText()).setSpecial().setIncomplete(); + new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setNoText().setPageStacksWildcard()).setSpecial().setIncomplete(); new BookletChapter("coalStuff", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText()); ArrayList lampPages = new ArrayList(); lampPages.add(new PageTextOnly(lampPages.size()+1)); @@ -95,7 +95,7 @@ public class InitBooklet{ new BookletChapter("phantomfaces", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomLiquiface), new PageTextOnly(1).addTextReplacement("", TileEntityPhantomface.RANGE), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipePhantomface), new PageCrafting(4, BlockCrafting.recipeLiquiface), new PageCrafting(5, BlockCrafting.recipeEnergyface), new PageCrafting(6, ItemCrafting.recipePhantomConnector).setNoText(), new PageCrafting(7, BlockCrafting.recipePhantomBooster)).setImportant(); new BookletChapter("phantomBreaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomBreaker), new PageTextOnly(1).addTextReplacement("", TileEntityPhantomPlacer.RANGE), new PageCrafting(2, BlockCrafting.recipePhantomPlacer).setNoText(), new PageCrafting(3, BlockCrafting.recipePhantomBreaker).setNoText()); new BookletChapter("esd", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockInputterAdvanced), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial(); - new BookletChapter("xpSolidifier", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemSolidifiedExperience)), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setSpecial(); + new BookletChapter("xpSolidifier", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemSolidifiedExperience)), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setSpecial().setIncomplete(); new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGreenhouseGlass), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass)); new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText()); new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java index 507da0834..1ba612d18 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDust.java @@ -10,13 +10,16 @@ package de.ellpeck.actuallyadditions.mod.items; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheDusts; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -59,4 +62,11 @@ public class ItemDust extends ItemBase{ list.add(new ItemStack(this, 1, j)); } } + + @Override + protected void registerRendering(){ + for(int i = 0; i < allDusts.length; i++){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java index a9c786362..43448210e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFoods.java @@ -10,10 +10,11 @@ package de.ellpeck.actuallyadditions.mod.items; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.Minecraft; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -21,6 +22,7 @@ import net.minecraft.item.EnumAction; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -31,8 +33,6 @@ public class ItemFoods extends ItemFoodBase{ public static final TheFoods[] allFoods = TheFoods.values(); - private static final String ELLSPECK = "ellspeck"; - public ItemFoods(String name){ super(0, 0.0F, false, name); this.setHasSubtypes(true); @@ -100,11 +100,13 @@ public class ItemFoods extends ItemFoodBase{ } @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ - if(stack.getItemDamage() == TheFoods.BACON.ordinal() && StringUtil.equalsToLowerCase(stack.getDisplayName(), ELLSPECK)){ - String strg = "Yes, this is an ugly texture of bacon with its legs behind its head. This is an homage to Ellpeck, the mod author, being able to put his legs behind his head. Wasn't my idea, so don't judge me."; - list.addAll(Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strg, 200)); + protected void registerRendering(){ + ResourceLocation[] resLocs = new ResourceLocation[allFoods.length]; + for(int i = 0; i < allFoods.length; i++){ + String name = this.getBaseName()+allFoods[i].name; + resLocs[i] = new ResourceLocation(ModUtil.MOD_ID_LOWER, name); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, name)); } + ActuallyAdditions.proxy.addRenderVariant(this, resLocs); } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java index 981cc862a..474e97826 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMisc.java @@ -10,13 +10,16 @@ package de.ellpeck.actuallyadditions.mod.items; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -53,4 +56,15 @@ public class ItemMisc extends ItemBase{ list.add(new ItemStack(this, 1, j)); } } + + @Override + protected void registerRendering(){ + ResourceLocation[] resLocs = new ResourceLocation[allMiscItems.length]; + for(int i = 0; i < allMiscItems.length; i++){ + String name = this.getBaseName()+allMiscItems[i].name; + resLocs[i] = new ResourceLocation(ModUtil.MOD_ID_LOWER, name); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, name)); + } + ActuallyAdditions.proxy.addRenderVariant(this, resLocs); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java similarity index 85% rename from src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java rename to src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java index 137030382..6ade78b73 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSeed.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java @@ -8,8 +8,9 @@ * © 2016 Ellpeck */ -package de.ellpeck.actuallyadditions.mod.items; +package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -21,6 +22,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemSeeds; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -51,6 +53,12 @@ public class ItemSeed extends ItemSeeds{ if(this.shouldAddCreative()){ this.setCreativeTab(CreativeTab.instance); } + + this.registerRendering(); + } + + protected void registerRendering(){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); } protected String getBaseName(){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheCrystals.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheCrystals.java index eb285b9d5..ab719ca13 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheCrystals.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheCrystals.java @@ -15,20 +15,18 @@ import net.minecraft.item.EnumRarity; public enum TheCrystals{ - REDSTONE("Red", Util.CRYSTAL_RED_RARITY, 16318464), - LAPIS("Blue", Util.CRYSTAL_BLUE_RARITY, 131437), - DIAMOND("LightBlue", Util.CRYSTAL_LIGHT_BLUE_RARITY, 9211636), - COAL("Black", Util.CRYSTAL_BLACK_RARITY, 986895), - EMERALD("Green", Util.CRYSTAL_GREEN_RARITY, 382466), - IRON("White", Util.CRYSTAL_WHITE_RARITY, 11053224); + REDSTONE("Red", Util.CRYSTAL_RED_RARITY), + LAPIS("Blue", Util.CRYSTAL_BLUE_RARITY), + DIAMOND("LightBlue", Util.CRYSTAL_LIGHT_BLUE_RARITY), + COAL("Black", Util.CRYSTAL_BLACK_RARITY), + EMERALD("Green", Util.CRYSTAL_GREEN_RARITY), + IRON("White", Util.CRYSTAL_WHITE_RARITY); public final String name; public final EnumRarity rarity; - public final int color; - TheCrystals(String name, EnumRarity rarity, int color){ + TheCrystals(String name, EnumRarity rarity){ this.name = name; this.rarity = rarity; - this.color = color; } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index 7abe85c17..f57ca9330 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -11,17 +11,22 @@ package de.ellpeck.actuallyadditions.mod.proxy; +import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.event.InitEvents; import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit; +import de.ellpeck.actuallyadditions.mod.util.FluidStateMapper; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentClientData; +import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -60,6 +65,21 @@ public class ClientProxy implements IProxy{ for(Map.Entry entry : modelVariantsForRegistering.entrySet()){ ModelBakery.registerItemVariants(entry.getKey(), entry.getValue()); } + + this.registerCustomFluidBlockRenderer(InitBlocks.fluidCanolaOil); + this.registerCustomFluidBlockRenderer(InitBlocks.fluidOil); + } + + /** + * (Excerpted from Tinkers' Construct with permission, thanks guys!) + */ + private void registerCustomFluidBlockRenderer(Fluid fluid){ + Block block = fluid.getBlock(); + Item item = Item.getItemFromBlock(block); + FluidStateMapper mapper = new FluidStateMapper(fluid); + ModelLoader.registerItemVariants(item); + ModelLoader.setCustomMeshDefinition(item, mapper); + ModelLoader.setCustomStateMapper(block, mapper); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 3eee47264..a9b5e8b64 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -26,10 +26,10 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; +@SideOnly(Side.CLIENT) public class AssetUtil{ public static final ResourceLocation GUI_INVENTORY_LOCATION = getGuiLocation("guiInventory"); - public static final int TESR_RENDER_ID = 2; public static ResourceLocation getGuiLocation(String file){ return new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/gui/"+file+".png"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java index 16d4cb058..6a3a9e63e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/CompatUtil.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.util; -import de.ellpeck.actuallyadditions.mod.items.ItemSeed; +import de.ellpeck.actuallyadditions.mod.items.base.ItemSeed; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/FluidStateMapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/FluidStateMapper.java new file mode 100644 index 000000000..78b6a624c --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/FluidStateMapper.java @@ -0,0 +1,48 @@ +/* + * This file ("FluidStateMapper.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense/ + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.util; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.ItemMeshDefinition; +import net.minecraft.client.renderer.block.statemap.StateMapperBase; +import net.minecraft.client.resources.model.ModelResourceLocation; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +/** + * (Excerpted from Tinkers' Construct with permission, thanks guys!) + */ +@SideOnly(Side.CLIENT) +public class FluidStateMapper extends StateMapperBase implements ItemMeshDefinition{ + + public final Fluid fluid; + public final ModelResourceLocation location; + + public FluidStateMapper(Fluid fluid){ + this.fluid = fluid; + + // have each block hold its fluid per nbt? hm + this.location = new ModelResourceLocation(new ResourceLocation(ModUtil.MOD_ID_LOWER, "fluids"), fluid.getName()); + } + + @Override + protected ModelResourceLocation getModelResourceLocation(IBlockState state){ + return location; + } + + @Override + public ModelResourceLocation getModelLocation(ItemStack stack){ + return location; + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/KeyUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/KeyUtil.java index 171bfe554..33cb3886c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/KeyUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/KeyUtil.java @@ -10,8 +10,11 @@ package de.ellpeck.actuallyadditions.mod.util; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; +@SideOnly(Side.CLIENT) public class KeyUtil{ public static boolean isShiftPressed(){ diff --git a/src/main/resources/assets/actuallyadditions/blockstates/fluids.json b/src/main/resources/assets/actuallyadditions/blockstates/fluids.json new file mode 100644 index 000000000..f7b6199fd --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/fluids.json @@ -0,0 +1,13 @@ +{ + "forge_marker": 1, + "variants": { + "canolaoil": { + "model": "forge:fluid", + "custom": { "fluid": "canolaoil" } + }, + "oil": { + "model": "forge:fluid", + "custom": { "fluid": "oil" } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeMachine.json b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeMachine.json index 1788a503b..64fc6e863 100644 --- a/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeMachine.json +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeMachine.json @@ -2,6 +2,7 @@ "__createdwith": "opl's Model Creator", "ambientocclusion": false, "textures": { + "particle": "actuallyadditions:blocks/models/modelCoffeeMachine", "coffeeMachine": "actuallyadditions:blocks/models/modelCoffeeMachine" }, "elements": [ diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCanolaSeed.json b/src/main/resources/assets/actuallyadditions/models/item/itemCanolaSeed.json new file mode 100644 index 000000000..abdbde44c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCanolaSeed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCanolaSeed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCoffee.json b/src/main/resources/assets/actuallyadditions/models/item/itemCoffee.json new file mode 100644 index 000000000..0779c17c6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCoffee.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCoffee" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCoffeeSeed.json b/src/main/resources/assets/actuallyadditions/models/item/itemCoffeeSeed.json new file mode 100644 index 000000000..7ac254b06 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCoffeeSeed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCoffeeSeed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCrafterOnAStick.json b/src/main/resources/assets/actuallyadditions/models/item/itemCrafterOnAStick.json new file mode 100644 index 000000000..81db3445f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCrafterOnAStick.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCrafterOnAStick" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemDust.json b/src/main/resources/assets/actuallyadditions/models/item/itemDust.json new file mode 100644 index 000000000..c97b4b7d1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemDust.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemDust" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFertilizer.json b/src/main/resources/assets/actuallyadditions/models/item/itemFertilizer.json new file mode 100644 index 000000000..21e5e68d3 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFertilizer.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFertilizer" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFlaxSeed.json b/src/main/resources/assets/actuallyadditions/models/item/itemFlaxSeed.json new file mode 100644 index 000000000..0087d9527 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFlaxSeed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFlaxSeed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodBacon.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodBacon.json new file mode 100644 index 000000000..5eed1f061 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodBacon.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodBacon" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodBaguette.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodBaguette.json new file mode 100644 index 000000000..b9d80c5f0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodBaguette.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodBaguette" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodBigCookie.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodBigCookie.json new file mode 100644 index 000000000..b2d339305 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodBigCookie.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodBigCookie" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodCarrotJuice.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodCarrotJuice.json new file mode 100644 index 000000000..a493df9f4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodCarrotJuice.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodCarrotJuice" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodCheese.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodCheese.json new file mode 100644 index 000000000..b6fb363ac --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodCheese.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodCheese" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolate.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolate.json new file mode 100644 index 000000000..458ceb6ac --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolate.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodChocolate" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolateCake.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolateCake.json new file mode 100644 index 000000000..6d68ecd01 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolateCake.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodChocolateCake" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolateToast.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolateToast.json new file mode 100644 index 000000000..79f80256a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodChocolateToast.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodChocolateToast" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodDoughnut.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodDoughnut.json new file mode 100644 index 000000000..c1192cfca --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodDoughnut.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodDoughnut" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodFishNChips.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodFishNChips.json new file mode 100644 index 000000000..09b781a3b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodFishNChips.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodFishNChips" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodFrenchFries.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodFrenchFries.json new file mode 100644 index 000000000..9e854d5a3 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodFrenchFries.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodFrenchFries" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodFrenchFry.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodFrenchFry.json new file mode 100644 index 000000000..0670a6565 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodFrenchFry.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodFrenchFry" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodHamburger.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodHamburger.json new file mode 100644 index 000000000..400e7218e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodHamburger.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodHamburger" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodNoodle.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodNoodle.json new file mode 100644 index 000000000..4b6894d91 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodNoodle.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodNoodle" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodPizza.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodPizza.json new file mode 100644 index 000000000..a6b4c00d0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodPizza.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodPizza" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodPumpkinStew.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodPumpkinStew.json new file mode 100644 index 000000000..2f2a0ec88 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodPumpkinStew.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodPumpkinStew" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodRice.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodRice.json new file mode 100644 index 000000000..7a28939c8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodRice.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodRice" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodRiceBread.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodRiceBread.json new file mode 100644 index 000000000..f8ce8ddc9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodRiceBread.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodRiceBread" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodSpaghetti.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodSpaghetti.json new file mode 100644 index 000000000..c198d5688 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodSpaghetti.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodSpaghetti" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodSubmarineSandwich.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodSubmarineSandwich.json new file mode 100644 index 000000000..11b9c1390 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodSubmarineSandwich.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodSubmarineSandwich" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemFoodToast.json b/src/main/resources/assets/actuallyadditions/models/item/itemFoodToast.json new file mode 100644 index 000000000..ec7d7d946 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemFoodToast.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemFoodToast" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHairyBall.json b/src/main/resources/assets/actuallyadditions/models/item/itemHairyBall.json new file mode 100644 index 000000000..1b6d96ec5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHairyBall.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHairyBall" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemKnife.json b/src/main/resources/assets/actuallyadditions/models/item/itemKnife.json new file mode 100644 index 000000000..81ffc94b6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemKnife.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemKnife" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscBatWing.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscBatWing.json new file mode 100644 index 000000000..dd74c149c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscBatWing.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscBatWing" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscBlackDye.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscBlackDye.json new file mode 100644 index 000000000..253063d7e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscBlackDye.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscBlackDye" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscBlackQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscBlackQuartz.json new file mode 100644 index 000000000..aa5416518 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscBlackQuartz.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscBlackQuartz" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscCanola.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscCanola.json new file mode 100644 index 000000000..26df9bc37 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscCanola.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscCanola" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscCoil.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscCoil.json new file mode 100644 index 000000000..9ea7a8ed8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscCoil.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscCoil" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscCoilAdvanced.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscCoilAdvanced.json new file mode 100644 index 000000000..4f695ffd7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscCoilAdvanced.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscCoilAdvanced" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscCup.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscCup.json new file mode 100644 index 000000000..ae0e7b67b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscCup.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscCup" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscDough.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscDough.json new file mode 100644 index 000000000..ae5b963cf --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscDough.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscDough" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscDrillCore.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscDrillCore.json new file mode 100644 index 000000000..06b4afe88 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscDrillCore.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscDrillCore" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscKnifeBlade.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscKnifeBlade.json new file mode 100644 index 000000000..022ef9ef2 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscKnifeBlade.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscKnifeBlade" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscKnifeHandle.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscKnifeHandle.json new file mode 100644 index 000000000..a32e370c1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscKnifeHandle.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscKnifeHandle" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscLens.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscLens.json new file mode 100644 index 000000000..1ae2e96f0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscLens.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscLens" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscMashedFood.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscMashedFood.json new file mode 100644 index 000000000..b3b778f22 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscMashedFood.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscMashedFood" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscPaperCone.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscPaperCone.json new file mode 100644 index 000000000..24b378ed8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscPaperCone.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscPaperCone" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscRiceDough.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscRiceDough.json new file mode 100644 index 000000000..4123b88da --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscRiceDough.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscRiceDough" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscRiceSlime.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscRiceSlime.json new file mode 100644 index 000000000..f20e1520f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscRiceSlime.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscRiceSlime" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscRing.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscRing.json new file mode 100644 index 000000000..ded1c493e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscRing.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscRing" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscTinyCharcoal.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscTinyCharcoal.json new file mode 100644 index 000000000..430bb6df2 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscTinyCharcoal.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscTinyCharcoal" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemMiscTinyCoal.json b/src/main/resources/assets/actuallyadditions/models/item/itemMiscTinyCoal.json new file mode 100644 index 000000000..065e3d543 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemMiscTinyCoal.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemMiscTinyCoal" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemResonantRice.json b/src/main/resources/assets/actuallyadditions/models/item/itemResonantRice.json new file mode 100644 index 000000000..2454d8596 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemResonantRice.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemResonantRice" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemEllspeck.png b/src/main/resources/assets/actuallyadditions/textures/items/itemEllspeck.png deleted file mode 100644 index e2ae5d1aa383072de01b65595c590f3b127ffa8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 990 zcmV<410np0P)N2bZe?^J zG%heMHvEiZ-v9suTuDShR9HvFmD@{HQ5eM)iJp5DdMSwhg`P&7G}EXob-d*0q~iti z0!oTvB_ULz8I*-WMw(!#nU_pQtuQqS!@}}XikKMDg&=zAX|=zt`?TGDGwMS&@WYw4 zzrEHvd(IjC0Q^^2aXVqf?SvJ#6IS%be)lMdeaQpjZ&`)8rC0J2M58oTxCZrXe3UnsgL;)K->7kacN~j`A z_XaEK=;6fodxiMjS_&%gIK_@fu3)^bOqQQ%jb^rTKd_<>ndspJg-u+F$4KD`^rjuc zY+Z)bsMwkk&h__-2`l5C&TORwE1E3V=Yt^g?idkLlYyzLN$5)r#gMoUzP1lA#HU`2upA3vKVjy(iZH7<;o zC&>Q;FN&ftU6G8QI6E2~@{#=OBld4}66*wu)o_K?u zAQKKUeqWV>m&LK@I%UJNoTFH7KaY-x18WK>d|f@kiiB>Wqe5n@Gh~5@@^~!W$z{XU zyy>mOiVD+Ahm5Jfc$vd%xSBJ4by!is8EzHR(}WduDar=PZA7A#W#l;hT`v3p{ M07*qoM6N<$f_TozDgXcg From 860ef3d0ef3cfa513ddcd030b6e50d77f4ecfdfc Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 10 Jan 2016 02:51:31 +0100 Subject: [PATCH 28/58] Moooooar texture work ~ --- .../mod/items/ItemCrystal.java | 14 ++++++ .../blockstates/blockChiseledQuartzSlab.json | 6 +++ .../blockstates/blockChiseledQuartzStair.json | 44 +++++++++++++++++++ .../blockstates/blockChiseledQuartzWall.json | 36 +++++++++++++++ .../blockstates/blockPillarQuartzSlab.json | 6 +++ .../blockstates/blockPillarQuartzStair.json | 44 +++++++++++++++++++ .../blockstates/blockPillarQuartzWall.json | 36 +++++++++++++++ .../blockstates/blockQuartzSlab.json | 6 +++ .../blockstates/blockQuartzStair.json | 44 +++++++++++++++++++ .../blockstates/blockQuartzWall.json | 36 +++++++++++++++ .../block/blockChiseledQuartzSlabBottom.json | 8 ++++ .../block/blockChiseledQuartzSlabTop.json | 8 ++++ .../block/blockChiseledQuartzStairs.json | 8 ++++ .../block/blockChiseledQuartzStairsInner.json | 8 ++++ .../block/blockChiseledQuartzStairsOuter.json | 8 ++++ .../blockChiseledQuartzWallInventory.json | 6 +++ .../block/blockChiseledQuartzWallNorth.json | 6 +++ .../blockChiseledQuartzWallNorthEast.json | 6 +++ ...kChiseledQuartzWallNorthEastSouthWest.json | 6 +++ .../blockChiseledQuartzWallNorthSouth.json | 6 +++ ...lockChiseledQuartzWallNorthSouthAbove.json | 6 +++ ...blockChiseledQuartzWallNorthSouthEast.json | 6 +++ ...kChiseledQuartzWallNorthSouthEastWest.json | 6 +++ .../block/blockChiseledQuartzWallPost.json | 6 +++ .../block/blockPillarQuartzSlabBottom.json | 8 ++++ .../block/blockPillarQuartzSlabTop.json | 8 ++++ .../models/block/blockPillarQuartzStairs.json | 8 ++++ .../block/blockPillarQuartzStairsInner.json | 8 ++++ .../block/blockPillarQuartzStairsOuter.json | 8 ++++ .../block/blockPillarQuartzWallInventory.json | 6 +++ .../block/blockPillarQuartzWallNorth.json | 6 +++ .../block/blockPillarQuartzWallNorthEast.json | 6 +++ .../blockPillarQuartzWallNorthSouth.json | 6 +++ .../blockPillarQuartzWallNorthSouthAbove.json | 6 +++ .../blockPillarQuartzWallNorthSouthEast.json | 6 +++ ...ockPillarQuartzWallNorthSouthEastWest.json | 6 +++ .../block/blockPillarQuartzWallPost.json | 6 +++ .../models/block/blockQuartzSlabBottom.json | 8 ++++ .../models/block/blockQuartzSlabTop.json | 8 ++++ .../models/block/blockQuartzStairs.json | 8 ++++ .../models/block/blockQuartzStairsInner.json | 8 ++++ .../models/block/blockQuartzStairsOuter.json | 8 ++++ .../block/blockQuartzWallInventory.json | 6 +++ .../models/block/blockQuartzWallNorth.json | 6 +++ .../block/blockQuartzWallNorthEast.json | 6 +++ .../block/blockQuartzWallNorthSouth.json | 6 +++ .../block/blockQuartzWallNorthSouthAbove.json | 6 +++ .../block/blockQuartzWallNorthSouthEast.json | 6 +++ .../blockQuartzWallNorthSouthEastWest.json | 6 +++ .../models/block/blockQuartzWallPost.json | 6 +++ .../models/item/blockChiseledQuartzSlab.json | 10 +++++ .../models/item/blockChiseledQuartzStair.json | 13 ++++++ .../models/item/blockChiseledQuartzWall.json | 10 +++++ .../models/item/blockPillarQuartzSlab.json | 10 +++++ .../models/item/blockPillarQuartzStair.json | 13 ++++++ .../models/item/blockPillarQuartzWall.json | 10 +++++ .../models/item/blockQuartzSlab.json | 10 +++++ .../models/item/blockQuartzStair.json | 13 ++++++ .../models/item/blockQuartzWall.json | 10 +++++ .../models/item/itemCrystalBlack.json | 18 ++++++++ .../models/item/itemCrystalBlue.json | 18 ++++++++ .../models/item/itemCrystalGreen.json | 18 ++++++++ .../models/item/itemCrystalLightBLue.json | 18 ++++++++ .../models/item/itemCrystalRed.json | 18 ++++++++ .../models/item/itemCrystalWhite.json | 18 ++++++++ .../models/item/itemLeafBlower.json | 18 ++++++++ .../models/item/itemLeafBlowerAdvanced.json | 18 ++++++++ .../models/item/itemSolidifiedExperience.json | 18 ++++++++ 68 files changed, 803 insertions(+) create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzSlab.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzStair.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzWall.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzSlab.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzStair.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzWall.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockQuartzSlab.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockQuartzStair.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockQuartzWall.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzSlabBottom.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzSlabTop.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairs.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairsInner.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairsOuter.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallInventory.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorth.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthEast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthEastSouthWest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouth.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthAbove.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthEast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthEastWest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallPost.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzSlabBottom.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzSlabTop.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairs.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairsInner.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairsOuter.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallInventory.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorth.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthEast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouth.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthAbove.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthEast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthEastWest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallPost.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzSlabBottom.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzSlabTop.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairs.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairsInner.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairsOuter.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallInventory.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorth.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthEast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouth.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthAbove.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthEast.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthEastWest.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallPost.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzSlab.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzStair.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzWall.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzSlab.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzStair.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzWall.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockQuartzSlab.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockQuartzStair.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockQuartzWall.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCrystalLightBLue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemLeafBlower.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemLeafBlowerAdvanced.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSolidifiedExperience.json diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java index 130e352a2..0dd4a3aa8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java @@ -10,13 +10,16 @@ package de.ellpeck.actuallyadditions.mod.items; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.BlockCrystal; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -45,6 +48,17 @@ public class ItemCrystal extends ItemBase{ return stack.getItemDamage() >= BlockCrystal.allCrystals.length ? EnumRarity.COMMON : BlockCrystal.allCrystals[stack.getItemDamage()].rarity; } + @Override + protected void registerRendering(){ + ResourceLocation[] resLocs = new ResourceLocation[BlockCrystal.allCrystals.length]; + for(int i = 0; i < BlockCrystal.allCrystals.length; i++){ + String name = this.getBaseName()+BlockCrystal.allCrystals[i].name; + resLocs[i] = new ResourceLocation(ModUtil.MOD_ID_LOWER, name); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, name)); + } + ActuallyAdditions.proxy.addRenderVariant(this, resLocs); + } + @SuppressWarnings("all") @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tab, List list){ diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzSlab.json b/src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzSlab.json new file mode 100644 index 000000000..47f319371 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzSlab.json @@ -0,0 +1,6 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockChiseledQuartzSlabBottom" }, + "meta=1": { "model": "actuallyadditions:blockChiseledQuartzSlabTop" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzStair.json b/src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzStair.json new file mode 100644 index 000000000..059ecea9b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzStair.json @@ -0,0 +1,44 @@ +{ + "variants": { + "facing=east,half=bottom,shape=straight": { "model": "actuallyadditions:blockChiseledQuartzStairs" }, + "facing=west,half=bottom,shape=straight": { "model": "actuallyadditions:blockChiseledQuartzStairs", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=straight": { "model": "actuallyadditions:blockChiseledQuartzStairs", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=straight": { "model": "actuallyadditions:blockChiseledQuartzStairs", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter" }, + "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "y": 270, "uvlock": true }, + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "y": 90, "uvlock": true }, + "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter" }, + "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "y": 180, "uvlock": true }, + "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockChiseledQuartzStairsInner" }, + "facing=west,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "y": 270, "uvlock": true }, + "facing=west,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "y": 90, "uvlock": true }, + "facing=south,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockChiseledQuartzStairsInner" }, + "facing=north,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "y": 180, "uvlock": true }, + "facing=east,half=top,shape=straight": { "model": "actuallyadditions:blockChiseledQuartzStairs", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=straight": { "model": "actuallyadditions:blockChiseledQuartzStairs", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=straight": { "model": "actuallyadditions:blockChiseledQuartzStairs", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=straight": { "model": "actuallyadditions:blockChiseledQuartzStairs", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=outer_right": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=outer_right": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=outer_right": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "x": 180, "y": 90, "uvlock": true }, + "facing=west,half=top,shape=outer_left": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "x": 180, "y": 270, "uvlock": true }, + "facing=south,half=top,shape=outer_left": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "x": 180, "y": 180, "uvlock": true }, + "facing=north,half=top,shape=outer_left": { "model": "actuallyadditions:blockChiseledQuartzStairsOuter", "x": 180, "uvlock": true }, + "facing=east,half=top,shape=inner_right": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=inner_right": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=inner_right": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=inner_right": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=inner_left": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "x": 180, "y": 90, "uvlock": true }, + "facing=west,half=top,shape=inner_left": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "x": 180, "y": 270, "uvlock": true }, + "facing=south,half=top,shape=inner_left": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "x": 180, "y": 180, "uvlock": true }, + "facing=north,half=top,shape=inner_left": { "model": "actuallyadditions:blockChiseledQuartzStairsInner", "x": 180, "uvlock": true } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzWall.json b/src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzWall.json new file mode 100644 index 000000000..a52a6b713 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockChiseledQuartzWall.json @@ -0,0 +1,36 @@ +{ + "variants": { + "east=false,north=false,south=false,up=false,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallPost" }, + "east=false,north=true,south=false,up=false,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorth" }, + "east=true,north=false,south=false,up=false,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorth", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=false,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorth", "y": 180, "uvlock": true }, + "east=false,north=false,south=false,up=false,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorth", "y": 270, "uvlock": true }, + "east=true,north=true,south=false,up=false,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorthEast" }, + "east=true,north=false,south=true,up=false,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorthEast", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=false,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthEast", "y": 180, "uvlock": true }, + "east=false,north=true,south=false,up=false,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthEast", "y": 270, "uvlock": true }, + "east=false,north=true,south=true,up=false,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouth" }, + "east=true,north=false,south=false,up=false,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouth", "y": 90, "uvlock": true }, + "east=true,north=true,south=true,up=false,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthEast" }, + "east=true,north=false,south=true,up=false,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthEast", "y": 90, "uvlock": true }, + "east=false,north=true,south=true,up=false,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthEast", "y": 180, "uvlock": true }, + "east=true,north=true,south=false,up=false,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthEast", "y": 270, "uvlock": true }, + "east=true,north=true,south=true,up=false,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthEastWest" }, + "east=false,north=false,south=false,up=true,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallPost" }, + "east=false,north=true,south=false,up=true,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorth" }, + "east=true,north=false,south=false,up=true,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorth", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=true,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorth", "y": 180, "uvlock": true }, + "east=false,north=false,south=false,up=true,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorth", "y": 270, "uvlock": true }, + "east=true,north=true,south=false,up=true,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorthEast" }, + "east=true,north=false,south=true,up=true,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorthEast", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=true,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthEast", "y": 180, "uvlock": true }, + "east=false,north=true,south=false,up=true,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthEast", "y": 270, "uvlock": true }, + "east=false,north=true,south=true,up=true,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthAbove" }, + "east=true,north=false,south=false,up=true,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthAbove", "y": 90, "uvlock": true }, + "east=true,north=true,south=true,up=true,west=false": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthEast" }, + "east=true,north=false,south=true,up=true,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthEast", "y": 90, "uvlock": true }, + "east=false,north=true,south=true,up=true,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthEast", "y": 180, "uvlock": true }, + "east=true,north=true,south=false,up=true,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthEast", "y": 270, "uvlock": true }, + "east=true,north=true,south=true,up=true,west=true": { "model": "actuallyadditions:blockChiseledQuartzWallNorthSouthEastWest" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzSlab.json b/src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzSlab.json new file mode 100644 index 000000000..e6fadc3d4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzSlab.json @@ -0,0 +1,6 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockPillarQuartzSlabBottom" }, + "meta=1": { "model": "actuallyadditions:blockPillarQuartzSlabTop" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzStair.json b/src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzStair.json new file mode 100644 index 000000000..90fe870ec --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzStair.json @@ -0,0 +1,44 @@ +{ + "variants": { + "facing=east,half=bottom,shape=straight": { "model": "actuallyadditions:blockPillarQuartzStairs" }, + "facing=west,half=bottom,shape=straight": { "model": "actuallyadditions:blockPillarQuartzStairs", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=straight": { "model": "actuallyadditions:blockPillarQuartzStairs", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=straight": { "model": "actuallyadditions:blockPillarQuartzStairs", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockPillarQuartzStairsOuter" }, + "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "y": 270, "uvlock": true }, + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "y": 90, "uvlock": true }, + "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockPillarQuartzStairsOuter" }, + "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "y": 180, "uvlock": true }, + "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockPillarQuartzStairsInner" }, + "facing=west,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "y": 270, "uvlock": true }, + "facing=west,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "y": 90, "uvlock": true }, + "facing=south,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockPillarQuartzStairsInner" }, + "facing=north,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "y": 180, "uvlock": true }, + "facing=east,half=top,shape=straight": { "model": "actuallyadditions:blockPillarQuartzStairs", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=straight": { "model": "actuallyadditions:blockPillarQuartzStairs", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=straight": { "model": "actuallyadditions:blockPillarQuartzStairs", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=straight": { "model": "actuallyadditions:blockPillarQuartzStairs", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=outer_right": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=outer_right": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=outer_right": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "x": 180, "y": 90, "uvlock": true }, + "facing=west,half=top,shape=outer_left": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "x": 180, "y": 270, "uvlock": true }, + "facing=south,half=top,shape=outer_left": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "x": 180, "y": 180, "uvlock": true }, + "facing=north,half=top,shape=outer_left": { "model": "actuallyadditions:blockPillarQuartzStairsOuter", "x": 180, "uvlock": true }, + "facing=east,half=top,shape=inner_right": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=inner_right": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=inner_right": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=inner_right": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=inner_left": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "x": 180, "y": 90, "uvlock": true }, + "facing=west,half=top,shape=inner_left": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "x": 180, "y": 270, "uvlock": true }, + "facing=south,half=top,shape=inner_left": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "x": 180, "y": 180, "uvlock": true }, + "facing=north,half=top,shape=inner_left": { "model": "actuallyadditions:blockPillarQuartzStairsInner", "x": 180, "uvlock": true } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzWall.json b/src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzWall.json new file mode 100644 index 000000000..53375efd9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockPillarQuartzWall.json @@ -0,0 +1,36 @@ +{ + "variants": { + "east=false,north=false,south=false,up=false,west=false": { "model": "actuallyadditions:blockPillarQuartzWallPost" }, + "east=false,north=true,south=false,up=false,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorth" }, + "east=true,north=false,south=false,up=false,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorth", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=false,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorth", "y": 180, "uvlock": true }, + "east=false,north=false,south=false,up=false,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorth", "y": 270, "uvlock": true }, + "east=true,north=true,south=false,up=false,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorthEast" }, + "east=true,north=false,south=true,up=false,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorthEast", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=false,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthEast", "y": 180, "uvlock": true }, + "east=false,north=true,south=false,up=false,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthEast", "y": 270, "uvlock": true }, + "east=false,north=true,south=true,up=false,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouth" }, + "east=true,north=false,south=false,up=false,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouth", "y": 90, "uvlock": true }, + "east=true,north=true,south=true,up=false,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthEast" }, + "east=true,north=false,south=true,up=false,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthEast", "y": 90, "uvlock": true }, + "east=false,north=true,south=true,up=false,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthEast", "y": 180, "uvlock": true }, + "east=true,north=true,south=false,up=false,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthEast", "y": 270, "uvlock": true }, + "east=true,north=true,south=true,up=false,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthEastWest" }, + "east=false,north=false,south=false,up=true,west=false": { "model": "actuallyadditions:blockPillarQuartzWallPost" }, + "east=false,north=true,south=false,up=true,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorth" }, + "east=true,north=false,south=false,up=true,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorth", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=true,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorth", "y": 180, "uvlock": true }, + "east=false,north=false,south=false,up=true,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorth", "y": 270, "uvlock": true }, + "east=true,north=true,south=false,up=true,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorthEast" }, + "east=true,north=false,south=true,up=true,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorthEast", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=true,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthEast", "y": 180, "uvlock": true }, + "east=false,north=true,south=false,up=true,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthEast", "y": 270, "uvlock": true }, + "east=false,north=true,south=true,up=true,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthAbove" }, + "east=true,north=false,south=false,up=true,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthAbove", "y": 90, "uvlock": true }, + "east=true,north=true,south=true,up=true,west=false": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthEast" }, + "east=true,north=false,south=true,up=true,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthEast", "y": 90, "uvlock": true }, + "east=false,north=true,south=true,up=true,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthEast", "y": 180, "uvlock": true }, + "east=true,north=true,south=false,up=true,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthEast", "y": 270, "uvlock": true }, + "east=true,north=true,south=true,up=true,west=true": { "model": "actuallyadditions:blockPillarQuartzWallNorthSouthEastWest" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockQuartzSlab.json b/src/main/resources/assets/actuallyadditions/blockstates/blockQuartzSlab.json new file mode 100644 index 000000000..ec18e935b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockQuartzSlab.json @@ -0,0 +1,6 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockQuartzSlabBottom" }, + "meta=1": { "model": "actuallyadditions:blockQuartzSlabTop" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockQuartzStair.json b/src/main/resources/assets/actuallyadditions/blockstates/blockQuartzStair.json new file mode 100644 index 000000000..bd2db7cda --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockQuartzStair.json @@ -0,0 +1,44 @@ +{ + "variants": { + "facing=east,half=bottom,shape=straight": { "model": "actuallyadditions:blockQuartzStairs" }, + "facing=west,half=bottom,shape=straight": { "model": "actuallyadditions:blockQuartzStairs", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=straight": { "model": "actuallyadditions:blockQuartzStairs", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=straight": { "model": "actuallyadditions:blockQuartzStairs", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockQuartzStairsOuter" }, + "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockQuartzStairsOuter", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockQuartzStairsOuter", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=outer_right": { "model": "actuallyadditions:blockQuartzStairsOuter", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockQuartzStairsOuter", "y": 270, "uvlock": true }, + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockQuartzStairsOuter", "y": 90, "uvlock": true }, + "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockQuartzStairsOuter" }, + "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:blockQuartzStairsOuter", "y": 180, "uvlock": true }, + "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockQuartzStairsInner" }, + "facing=west,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockQuartzStairsInner", "y": 180, "uvlock": true }, + "facing=south,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockQuartzStairsInner", "y": 90, "uvlock": true }, + "facing=north,half=bottom,shape=inner_right": { "model": "actuallyadditions:blockQuartzStairsInner", "y": 270, "uvlock": true }, + "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockQuartzStairsInner", "y": 270, "uvlock": true }, + "facing=west,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockQuartzStairsInner", "y": 90, "uvlock": true }, + "facing=south,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockQuartzStairsInner" }, + "facing=north,half=bottom,shape=inner_left": { "model": "actuallyadditions:blockQuartzStairsInner", "y": 180, "uvlock": true }, + "facing=east,half=top,shape=straight": { "model": "actuallyadditions:blockQuartzStairs", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=straight": { "model": "actuallyadditions:blockQuartzStairs", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=straight": { "model": "actuallyadditions:blockQuartzStairs", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=straight": { "model": "actuallyadditions:blockQuartzStairs", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=outer_right": { "model": "actuallyadditions:blockQuartzStairsOuter", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=outer_right": { "model": "actuallyadditions:blockQuartzStairsOuter", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:blockQuartzStairsOuter", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=outer_right": { "model": "actuallyadditions:blockQuartzStairsOuter", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:blockQuartzStairsOuter", "x": 180, "y": 90, "uvlock": true }, + "facing=west,half=top,shape=outer_left": { "model": "actuallyadditions:blockQuartzStairsOuter", "x": 180, "y": 270, "uvlock": true }, + "facing=south,half=top,shape=outer_left": { "model": "actuallyadditions:blockQuartzStairsOuter", "x": 180, "y": 180, "uvlock": true }, + "facing=north,half=top,shape=outer_left": { "model": "actuallyadditions:blockQuartzStairsOuter", "x": 180, "uvlock": true }, + "facing=east,half=top,shape=inner_right": { "model": "actuallyadditions:blockQuartzStairsInner", "x": 180, "uvlock": true }, + "facing=west,half=top,shape=inner_right": { "model": "actuallyadditions:blockQuartzStairsInner", "x": 180, "y": 180, "uvlock": true }, + "facing=south,half=top,shape=inner_right": { "model": "actuallyadditions:blockQuartzStairsInner", "x": 180, "y": 90, "uvlock": true }, + "facing=north,half=top,shape=inner_right": { "model": "actuallyadditions:blockQuartzStairsInner", "x": 180, "y": 270, "uvlock": true }, + "facing=east,half=top,shape=inner_left": { "model": "actuallyadditions:blockQuartzStairsInner", "x": 180, "y": 90, "uvlock": true }, + "facing=west,half=top,shape=inner_left": { "model": "actuallyadditions:blockQuartzStairsInner", "x": 180, "y": 270, "uvlock": true }, + "facing=south,half=top,shape=inner_left": { "model": "actuallyadditions:blockQuartzStairsInner", "x": 180, "y": 180, "uvlock": true }, + "facing=north,half=top,shape=inner_left": { "model": "actuallyadditions:blockQuartzStairsInner", "x": 180, "uvlock": true } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockQuartzWall.json b/src/main/resources/assets/actuallyadditions/blockstates/blockQuartzWall.json new file mode 100644 index 000000000..36eed4bdd --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockQuartzWall.json @@ -0,0 +1,36 @@ +{ + "variants": { + "east=false,north=false,south=false,up=false,west=false": { "model": "actuallyadditions:blockQuartzWallPost" }, + "east=false,north=true,south=false,up=false,west=false": { "model": "actuallyadditions:blockQuartzWallNorth" }, + "east=true,north=false,south=false,up=false,west=false": { "model": "actuallyadditions:blockQuartzWallNorth", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=false,west=false": { "model": "actuallyadditions:blockQuartzWallNorth", "y": 180, "uvlock": true }, + "east=false,north=false,south=false,up=false,west=true": { "model": "actuallyadditions:blockQuartzWallNorth", "y": 270, "uvlock": true }, + "east=true,north=true,south=false,up=false,west=false": { "model": "actuallyadditions:blockQuartzWallNorthEast" }, + "east=true,north=false,south=true,up=false,west=false": { "model": "actuallyadditions:blockQuartzWallNorthEast", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=false,west=true": { "model": "actuallyadditions:blockQuartzWallNorthEast", "y": 180, "uvlock": true }, + "east=false,north=true,south=false,up=false,west=true": { "model": "actuallyadditions:blockQuartzWallNorthEast", "y": 270, "uvlock": true }, + "east=false,north=true,south=true,up=false,west=false": { "model": "actuallyadditions:blockQuartzWallNorthSouth" }, + "east=true,north=false,south=false,up=false,west=true": { "model": "actuallyadditions:blockQuartzWallNorthSouth", "y": 90, "uvlock": true }, + "east=true,north=true,south=true,up=false,west=false": { "model": "actuallyadditions:blockQuartzWallNorthSouthEast" }, + "east=true,north=false,south=true,up=false,west=true": { "model": "actuallyadditions:blockQuartzWallNorthSouthEast", "y": 90, "uvlock": true }, + "east=false,north=true,south=true,up=false,west=true": { "model": "actuallyadditions:blockQuartzWallNorthSouthEast", "y": 180, "uvlock": true }, + "east=true,north=true,south=false,up=false,west=true": { "model": "actuallyadditions:blockQuartzWallNorthSouthEast", "y": 270, "uvlock": true }, + "east=true,north=true,south=true,up=false,west=true": { "model": "actuallyadditions:blockQuartzWallNorthSouthEastWest" }, + "east=false,north=false,south=false,up=true,west=false": { "model": "actuallyadditions:blockQuartzWallPost" }, + "east=false,north=true,south=false,up=true,west=false": { "model": "actuallyadditions:blockQuartzWallNorth" }, + "east=true,north=false,south=false,up=true,west=false": { "model": "actuallyadditions:blockQuartzWallNorth", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=true,west=false": { "model": "actuallyadditions:blockQuartzWallNorth", "y": 180, "uvlock": true }, + "east=false,north=false,south=false,up=true,west=true": { "model": "actuallyadditions:blockQuartzWallNorth", "y": 270, "uvlock": true }, + "east=true,north=true,south=false,up=true,west=false": { "model": "actuallyadditions:blockQuartzWallNorthEast" }, + "east=true,north=false,south=true,up=true,west=false": { "model": "actuallyadditions:blockQuartzWallNorthEast", "y": 90, "uvlock": true }, + "east=false,north=false,south=true,up=true,west=true": { "model": "actuallyadditions:blockQuartzWallNorthEast", "y": 180, "uvlock": true }, + "east=false,north=true,south=false,up=true,west=true": { "model": "actuallyadditions:blockQuartzWallNorthEast", "y": 270, "uvlock": true }, + "east=false,north=true,south=true,up=true,west=false": { "model": "actuallyadditions:blockQuartzWallNorthSouthAbove" }, + "east=true,north=false,south=false,up=true,west=true": { "model": "actuallyadditions:blockQuartzWallNorthSouthAbove", "y": 90, "uvlock": true }, + "east=true,north=true,south=true,up=true,west=false": { "model": "actuallyadditions:blockQuartzWallNorthSouthEast" }, + "east=true,north=false,south=true,up=true,west=true": { "model": "actuallyadditions:blockQuartzWallNorthSouthEast", "y": 90, "uvlock": true }, + "east=false,north=true,south=true,up=true,west=true": { "model": "actuallyadditions:blockQuartzWallNorthSouthEast", "y": 180, "uvlock": true }, + "east=true,north=true,south=false,up=true,west=true": { "model": "actuallyadditions:blockQuartzWallNorthSouthEast", "y": 270, "uvlock": true }, + "east=true,north=true,south=true,up=true,west=true": { "model": "actuallyadditions:blockQuartzWallNorthSouthEastWest" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzSlabBottom.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzSlabBottom.json new file mode 100644 index 000000000..b4a7eaf35 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzSlabBottom.json @@ -0,0 +1,8 @@ +{ + "parent": "block/half_slab", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled", + "top": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled", + "side": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzSlabTop.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzSlabTop.json new file mode 100644 index 000000000..ddf83e692 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzSlabTop.json @@ -0,0 +1,8 @@ +{ + "parent": "block/upper_slab", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled", + "top": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled", + "side": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairs.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairs.json new file mode 100644 index 000000000..0fbfe8c44 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairs.json @@ -0,0 +1,8 @@ +{ + "parent": "block/stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled", + "top": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled", + "side": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairsInner.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairsInner.json new file mode 100644 index 000000000..612463832 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairsInner.json @@ -0,0 +1,8 @@ +{ + "parent": "block/inner_stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled", + "top": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled", + "side": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairsOuter.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairsOuter.json new file mode 100644 index 000000000..828f36336 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzStairsOuter.json @@ -0,0 +1,8 @@ +{ + "parent": "block/outer_stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled", + "top": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled", + "side": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallInventory.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallInventory.json new file mode 100644 index 000000000..6bd5ceffd --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallInventory.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_inventory", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorth.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorth.json new file mode 100644 index 000000000..84e67485f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorth.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_n", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthEast.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthEast.json new file mode 100644 index 000000000..6fa69c0be --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthEast.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ne", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthEastSouthWest.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthEastSouthWest.json new file mode 100644 index 000000000..d9c658e20 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthEastSouthWest.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nsew", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouth.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouth.json new file mode 100644 index 000000000..ba012904e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouth.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ns", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthAbove.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthAbove.json new file mode 100644 index 000000000..efbea0d33 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthAbove.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ns_above", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthEast.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthEast.json new file mode 100644 index 000000000..332d8f22a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthEast.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nse", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthEastWest.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthEastWest.json new file mode 100644 index 000000000..d9c658e20 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallNorthSouthEastWest.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nsew", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallPost.json b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallPost.json new file mode 100644 index 000000000..47dbbfc69 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockChiseledQuartzWallPost.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_post", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzSlabBottom.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzSlabBottom.json new file mode 100644 index 000000000..415d0574b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzSlabBottom.json @@ -0,0 +1,8 @@ +{ + "parent": "block/half_slab", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartzPillar", + "top": "actuallyadditions:blocks/blockMiscBlackQuartzPillar", + "side": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzSlabTop.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzSlabTop.json new file mode 100644 index 000000000..d52c000ef --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzSlabTop.json @@ -0,0 +1,8 @@ +{ + "parent": "block/upper_slab", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartzPillar", + "top": "actuallyadditions:blocks/blockMiscBlackQuartzPillar", + "side": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairs.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairs.json new file mode 100644 index 000000000..07163fad5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairs.json @@ -0,0 +1,8 @@ +{ + "parent": "block/stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartzPillar", + "top": "actuallyadditions:blocks/blockMiscBlackQuartzPillar", + "side": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairsInner.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairsInner.json new file mode 100644 index 000000000..6a1759043 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairsInner.json @@ -0,0 +1,8 @@ +{ + "parent": "block/inner_stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartzPillar", + "top": "actuallyadditions:blocks/blockMiscBlackQuartzPillar", + "side": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairsOuter.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairsOuter.json new file mode 100644 index 000000000..90bbad865 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzStairsOuter.json @@ -0,0 +1,8 @@ +{ + "parent": "block/outer_stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartzPillar", + "top": "actuallyadditions:blocks/blockMiscBlackQuartzPillar", + "side": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallInventory.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallInventory.json new file mode 100644 index 000000000..8e69ec192 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallInventory.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_inventory", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorth.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorth.json new file mode 100644 index 000000000..742554c85 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorth.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_n", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthEast.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthEast.json new file mode 100644 index 000000000..db512c7d9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthEast.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ne", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouth.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouth.json new file mode 100644 index 000000000..f17ac45b7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouth.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ns", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthAbove.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthAbove.json new file mode 100644 index 000000000..a2ea2f739 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthAbove.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ns_above", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthEast.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthEast.json new file mode 100644 index 000000000..e10c5ad81 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthEast.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nse", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthEastWest.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthEastWest.json new file mode 100644 index 000000000..56dc3196a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallNorthSouthEastWest.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nsew", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallPost.json b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallPost.json new file mode 100644 index 000000000..05317206d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPillarQuartzWallPost.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_post", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartzPillar" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzSlabBottom.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzSlabBottom.json new file mode 100644 index 000000000..717a87efa --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzSlabBottom.json @@ -0,0 +1,8 @@ +{ + "parent": "block/half_slab", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartz", + "top": "actuallyadditions:blocks/blockMiscBlackQuartz", + "side": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzSlabTop.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzSlabTop.json new file mode 100644 index 000000000..430db9102 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzSlabTop.json @@ -0,0 +1,8 @@ +{ + "parent": "block/upper_slab", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartz", + "top": "actuallyadditions:blocks/blockMiscBlackQuartz", + "side": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairs.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairs.json new file mode 100644 index 000000000..c081a302e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairs.json @@ -0,0 +1,8 @@ +{ + "parent": "block/stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartz", + "top": "actuallyadditions:blocks/blockMiscBlackQuartz", + "side": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairsInner.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairsInner.json new file mode 100644 index 000000000..3c8e7df37 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairsInner.json @@ -0,0 +1,8 @@ +{ + "parent": "block/inner_stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartz", + "top": "actuallyadditions:blocks/blockMiscBlackQuartz", + "side": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairsOuter.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairsOuter.json new file mode 100644 index 000000000..72e09ad90 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzStairsOuter.json @@ -0,0 +1,8 @@ +{ + "parent": "block/outer_stairs", + "textures": { + "bottom": "actuallyadditions:blocks/blockMiscBlackQuartz", + "top": "actuallyadditions:blocks/blockMiscBlackQuartz", + "side": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallInventory.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallInventory.json new file mode 100644 index 000000000..e4aaa41bb --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallInventory.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_inventory", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorth.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorth.json new file mode 100644 index 000000000..b83186dd7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorth.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_n", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthEast.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthEast.json new file mode 100644 index 000000000..3ac0fbd99 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthEast.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ne", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouth.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouth.json new file mode 100644 index 000000000..5dbd6b513 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouth.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ns", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthAbove.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthAbove.json new file mode 100644 index 000000000..000276842 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthAbove.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_ns_above", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthEast.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthEast.json new file mode 100644 index 000000000..1d5a986ab --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthEast.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nse", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthEastWest.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthEastWest.json new file mode 100644 index 000000000..557e78d48 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallNorthSouthEastWest.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_nsew", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallPost.json b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallPost.json new file mode 100644 index 000000000..a531634ea --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockQuartzWallPost.json @@ -0,0 +1,6 @@ +{ + "parent": "block/wall_post", + "textures": { + "wall": "actuallyadditions:blocks/blockMiscBlackQuartz" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzSlab.json b/src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzSlab.json new file mode 100644 index 000000000..7170d3c54 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzSlab.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockChiseledQuartzSlabBottom", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzStair.json b/src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzStair.json new file mode 100644 index 000000000..062500635 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzStair.json @@ -0,0 +1,13 @@ +{ + "parent": "actuallyadditions:block/blockChiseledQuartzStairs", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "gui": { + "rotation": [ 0, 180, 0 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzWall.json b/src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzWall.json new file mode 100644 index 000000000..4436078c7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockChiseledQuartzWall.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockChiseledQuartzWallInventory", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzSlab.json b/src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzSlab.json new file mode 100644 index 000000000..00e998edc --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzSlab.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockPillarQuartzSlabBottom", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzStair.json b/src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzStair.json new file mode 100644 index 000000000..6dc54675a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzStair.json @@ -0,0 +1,13 @@ +{ + "parent": "actuallyadditions:block/blockPillarQuartzStairs", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "gui": { + "rotation": [ 0, 180, 0 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzWall.json b/src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzWall.json new file mode 100644 index 000000000..d71f42a72 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockPillarQuartzWall.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockPillarQuartzWallInventory", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockQuartzSlab.json b/src/main/resources/assets/actuallyadditions/models/item/blockQuartzSlab.json new file mode 100644 index 000000000..fb84a03ab --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockQuartzSlab.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockQuartzSlabBottom", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockQuartzStair.json b/src/main/resources/assets/actuallyadditions/models/item/blockQuartzStair.json new file mode 100644 index 000000000..bf66153e9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockQuartzStair.json @@ -0,0 +1,13 @@ +{ + "parent": "actuallyadditions:block/blockQuartzStairs", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "gui": { + "rotation": [ 0, 180, 0 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockQuartzWall.json b/src/main/resources/assets/actuallyadditions/models/item/blockQuartzWall.json new file mode 100644 index 000000000..1766d401f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockQuartzWall.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockQuartzWallInventory", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalBlack.json new file mode 100644 index 000000000..d5f4a00d0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCrystalBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalBlue.json new file mode 100644 index 000000000..af3722fea --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCrystalBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalGreen.json new file mode 100644 index 000000000..4749bb6b5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCrystalGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCrystalLightBLue.json b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalLightBLue.json new file mode 100644 index 000000000..e56c5bf1f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalLightBLue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCrystalLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalRed.json new file mode 100644 index 000000000..891e69014 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCrystalRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalWhite.json new file mode 100644 index 000000000..89b94e961 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemCrystalWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemCrystalWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemLeafBlower.json b/src/main/resources/assets/actuallyadditions/models/item/itemLeafBlower.json new file mode 100644 index 000000000..f8cd64808 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemLeafBlower.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemLeafBlower" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemLeafBlowerAdvanced.json b/src/main/resources/assets/actuallyadditions/models/item/itemLeafBlowerAdvanced.json new file mode 100644 index 000000000..069eb24a7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemLeafBlowerAdvanced.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemLeafBlowerAdvanced" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSolidifiedExperience.json b/src/main/resources/assets/actuallyadditions/models/item/itemSolidifiedExperience.json new file mode 100644 index 000000000..01c06e5d9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSolidifiedExperience.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemSolidifiedExperience" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} From 0b68b7e296d7f2eb0b49a551bdf0f57fbd274ce4 Mon Sep 17 00:00:00 2001 From: canitzp Date: Sun, 10 Jan 2016 15:12:20 +0100 Subject: [PATCH 29/58] More JSONs --- .../actuallyadditions/models/item/blockCompost.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCompost.json diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCompost.json b/src/main/resources/assets/actuallyadditions/models/item/blockCompost.json new file mode 100644 index 000000000..48378bad5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCompost.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockCompost", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file From 0cb9d6f8c9f81042da8fa9b00508a9b1f91608c7 Mon Sep 17 00:00:00 2001 From: canitzp Date: Sun, 10 Jan 2016 15:12:48 +0100 Subject: [PATCH 30/58] More JSONs --- .../blockstates/blockCompost.json | 5 + .../blockstates/blockFishingNet.json | 5 + .../models/block/blockCompost.json | 520 +++++++++++ .../models/block/blockFishingNet.json | 850 ++++++++++++++++++ .../models/block/blockFurnaceSolar.json | 3 +- .../models/item/blockFishingNet.json | 15 + .../textures/blocks/models/modelCompost.png | Bin 2065 -> 2474 bytes .../blocks/models/modelFishingNet.png | Bin 222 -> 231 bytes 8 files changed, 1397 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockCompost.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockFishingNet.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCompost.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFishingNet.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockFishingNet.json diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockCompost.json b/src/main/resources/assets/actuallyadditions/blockstates/blockCompost.json new file mode 100644 index 000000000..9c31ecfa9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockCompost.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockCompost"} + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockFishingNet.json b/src/main/resources/assets/actuallyadditions/blockstates/blockFishingNet.json new file mode 100644 index 000000000..bb9ce51ee --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockFishingNet.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockFishingNet"} + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCompost.json b/src/main/resources/assets/actuallyadditions/models/block/blockCompost.json new file mode 100644 index 000000000..cfbf9d3b0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCompost.json @@ -0,0 +1,520 @@ +{ + "__createdBy": "canitzp", + "ambientocclusion": true, + "textures": { + "particle": "blocks/planks_oak", + "compost": "actuallyadditions:blocks/models/modelCompost" + }, + "elements": [ + { + "from": [1,1,1], + "to": [3,11,3], + "faces": { + "up": { + "uv": [7.8,0,8.4,0.6], + "texture": "#compost" + }, + "down": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "east": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "north": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "south": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + } + } + }, + { + "from": [13,1,1], + "to": [15,11,3], + "faces": { + "up": { + "uv": [7.8,0,8.4,0.6], + "texture": "#compost" + }, + "down": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0.4,1.2,3.625], + "texture": "#compost" + }, + "east": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "north": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "south": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + } + } + }, + { + "from": [13,1,13], + "to": [15,11,15], + "faces": { + "up": { + "uv": [7.8,0,8.4,0.6], + "texture": "#compost" + }, + "down": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "east": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "north": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "south": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + } + } + }, + { + "from": [1,1,13], + "to": [3,11,15], + "faces": { + "up": { + "uv": [7.8,0,8.4,0.6], + "texture": "#compost" + }, + "down": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "east": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "north": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + }, + "south": { + "uv": [0,0.2,1.2,3.625], + "texture": "#compost" + } + } + }, + { + "from": [1,1,3], + "to": [2,3,13], + "faces": { + "up": { + "uv": [0,0.125,0.5,3.625], + "texture": "#compost" + }, + "down": { + "uv": [0.0,0.0,1.0,10.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0.6,8.4,1.6], + "texture": "#compost" + }, + "east": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "north": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "south": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + } + } + }, + { + "from": [3,1,1], + "to": [13,3,2], + "faces": { + "up": { + "uv": [0,0.8,8.4,1.2], + "texture": "#compost" + }, + "down": { + "uv": [0.0,0.0,10.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "east": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "north": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "south": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + } + } + }, + { + "from": [14,1,3], + "to": [15,3,13], + "faces": { + "up": { + "uv": [0,0.125,0.5,3.625], + "texture": "#compost" + }, + "down": { + "uv": [0.0,0.0,1.0,10.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "east": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "north": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "south": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + } + } + }, + { + "from": [3,1,14], + "to": [13,3,15], + "faces": { + "up": { + "uv": [0,0.25,8.4,0.6], + "texture": "#compost" + }, + "down": { + "uv": [0.0,0.0,10.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "east": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "north": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "south": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + } + } + }, + { + "from": [3,4,1], + "to": [13,6,2], + "faces": { + "up": { + "uv": [0,0.8,8.4,1.2], + "texture": "#compost" + }, + "down": { + "uv": [0,0.8,8.4,1.2], + "texture": "#compost" + }, + "west": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "east": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "north": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "south": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + } + } + }, + { + "from": [1,0,1], + "to": [15,1,15], + "faces": { + "up": { + "uv": [0.25,0.125,6,5.8], + "texture": "#compost" + }, + "down": { + "uv": [0,0.2,6,5.8], + "texture": "#compost" + }, + "west": { + "uv": [0,0.25,8.4,0.6], + "texture": "#compost" + }, + "east": { + "uv": [0,0.25,8.4,0.6], + "texture": "#compost" + }, + "north": { + "uv": [0,0.25,8.4,0.6], + "texture": "#compost" + }, + "south": { + "uv": [0,0.25,8.4,0.6], + "texture": "#compost" + } + } + }, + { + "from": [1,4,3], + "to": [2,6,13], + "faces": { + "up": { + "uv": [0,0.125,0.5,3.625], + "texture": "#compost" + }, + "down": { + "uv": [0,0.125,0.5,3.625], + "texture": "#compost" + }, + "west": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "east": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "north": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "south": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + } + } + }, + { + "from": [3,4,14], + "to": [13,6,15], + "faces": { + "up": { + "uv": [0,0.8,8.4,1.2], + "texture": "#compost" + }, + "down": { + "uv": [0,0.8,8.4,1.2], + "texture": "#compost" + }, + "west": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "east": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "north": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "south": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + } + } + }, + { + "from": [14,4,3], + "to": [15,6,13], + "faces": { + "up": { + "uv": [0,0.125,0.5,3.625], + "texture": "#compost" + }, + "down": { + "uv": [0,0.125,0.5,3.625], + "texture": "#compost" + }, + "west": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "east": { + "uv": [0,1.375,7.5,2.125], + "texture": "#compost" + }, + "north": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "south": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + } + } + }, + { + "from": [1,7,3], + "to": [2,9,13], + "faces": { + "up": { + "uv": [0,0.125,0.5,3.625], + "texture": "#compost" + }, + "down": { + "uv": [0,0.125,0.5,3.625], + "texture": "#compost" + }, + "west": { + "uv": [0,1.375,7.5,2], + "texture": "#compost" + }, + "east": { + "uv": [0,1.375,7.5,2], + "texture": "#compost" + }, + "north": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "south": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + } + } + }, + { + "from": [3,7,1], + "to": [13,9,2], + "faces": { + "up": { + "uv": [0,0.8,8.4,1.2], + "texture": "#compost" + }, + "down": { + "uv": [0,0.8,8.4,1.2], + "texture": "#compost" + }, + "west": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "east": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "north": { + "uv": [0,1.375,7.5,2], + "texture": "#compost" + }, + "south": { + "uv": [0,1.375,7.5,2], + "texture": "#compost" + } + } + }, + { + "from": [3,7,14], + "to": [13,9,15], + "faces": { + "up": { + "uv": [0,0.8,8.4,1.2], + "texture": "#compost" + }, + "down": { + "uv": [0,0.8,8.4,1.2], + "texture": "#compost" + }, + "west": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "east": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "north": { + "uv": [0,1.375,7.5,2], + "texture": "#compost" + }, + "south": { + "uv": [0,1.375,7.5,2], + "texture": "#compost" + } + } + }, + { + "from": [14,7,3], + "to": [15,9,13], + "faces": { + "up": { + "uv": [0,0.125,0.5,3.625], + "texture": "#compost" + }, + "down": { + "uv": [0,0.125,0.5,3.625], + "texture": "#compost" + }, + "west": { + "uv": [0,1.375,7.5,2], + "texture": "#compost" + }, + "east": { + "uv": [0,1.375,7.5,2], + "texture": "#compost" + }, + "north": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + }, + "south": { + "uv": [0.0,0.0,1.0,2.0], + "texture": "missingtexture" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFishingNet.json b/src/main/resources/assets/actuallyadditions/models/block/blockFishingNet.json new file mode 100644 index 000000000..676b4db0e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFishingNet.json @@ -0,0 +1,850 @@ +{ + "__createdBy": "canitzp", + "ambientocclusion": false, + "textures": { + "particle": "blocks/planks_oak", + "fishingNet": "actuallyadditions:blocks/models/modelFishingNet" + }, + "elements": [ + { + "from": [1,0.1,1.25], + "to": [15,0.6,1.8000001], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,2.25], + "to": [15,0.6,2.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,3.25], + "to": [15,0.6,3.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,4.25], + "to": [15,0.6,4.85], + "faces": { + "up": { + "uv": [0.3333335,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,5.25], + "to": [15,0.6,5.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,6.25], + "to": [15,0.6,6.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,7.25], + "to": [15,0.6,7.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,8.25], + "to": [15,0.6,8.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,9.25], + "to": [15,0.6,9.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,10.25], + "to": [15,0.6,10.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,11.25], + "to": [15,0.6,11.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,12.25], + "to": [15,0.6,12.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,13.25], + "to": [15,0.6,13.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1,0.1,14.25], + "to": [15,0.7,14.85], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,14.0,0.6], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + } + } + }, + { + "from": [1.2,0,1], + "to": [1.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [2.2,0,1], + "to": [2.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [3.2,0,1], + "to": [3.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [4.2,0,1], + "to": [4.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [5.2,0,1], + "to": [5.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [6.2,0,1], + "to": [6.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [7.2,0,1], + "to": [7.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [8.2,0,1], + "to": [8.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [9.2,0,1], + "to": [9.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [10.2,0,1], + "to": [10.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [11.2,0,1], + "to": [11.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [12.2,0,1], + "to": [12.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [13.2,0,1], + "to": [13.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + }, + { + "from": [14.2,0,1], + "to": [14.8,0.5,15], + "faces": { + "up": { + "uv": [0.33333334,0,11,0.6666667], + "texture": "#fishingNet" + }, + "down": { + "uv": [0.0,0.0,0.6,14.0], + "texture": "#fishingNet" + }, + "west": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "east": { + "uv": [0.0,0.0,14.0,0.5], + "texture": "#fishingNet" + }, + "north": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + }, + "south": { + "uv": [0.0,0.0,0.6,0.5], + "texture": "#fishingNet" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceSolar.json b/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceSolar.json index 4b8783955..dd764ffa5 100644 --- a/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceSolar.json +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFurnaceSolar.json @@ -1,7 +1,8 @@ { - "__createdwith": "opl's Model Creator", + "__createdBy": "canitzp", "ambientocclusion": false, "textures": { + "particle": "blocks/iron_block", "furnaceSolar": "actuallyadditions:blocks/models/modelFurnaceSolar" }, "elements": [ diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockFishingNet.json b/src/main/resources/assets/actuallyadditions/models/item/blockFishingNet.json new file mode 100644 index 000000000..8dd27a76a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockFishingNet.json @@ -0,0 +1,15 @@ +{ + "parent": "actuallyadditions:block/blockFishingNet", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson": { + "rotation": [0, 0, 0 ], + "translation": [0, 4, 2 ], + "scale": [1.2, 1.2, 1.2] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelCompost.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelCompost.png index 5f8316a13b3d95b06909d3c40b6ba287272acc86..611d72ba86feb4da443cb317692ac430b327a226 100644 GIT binary patch literal 2474 zcmV;b303xqP)VGd000McNliru-~kE_2@12s2de-82{%bZ zK~#9! z$8d+c>$P`g7khT5S3=so_gvq(-<vTGo{h_tqU#Wxn_T%kJ2v=7-Ry0f|g`Dri zmY!eB{m0IXRAdO-9^3QT6*(xMqsGE4x_34zcEpp`Ykx%oSm<&*&nuVXc^*NJ7XZ+` z)2r|j0D$_u9{Vd2K$@HA2dBA-TySq^D?$bMYd!W?EC+tSze6g-QTd#-5{Ip{ez*5m zEC=rGY+W|_?(jI;S^_!sSUzvj9JL<%kDVE*Y!0Ny-p*F=Jg*e8G*9jAY|SC{_1s^v z99YOh@*h0t@uGXDH;2@TN?4Em6${|I!{bOM1r>D}TX20W%&yb^3I(tb2NtT|+FAmN zCplNhq-(jqVgV#PL->gIa$vKt20` zrscr(=m(mG12t#DtKacT|8U)l1I`=x*84u3^v^>2f(s`mHsgay4jtQlIQJfl?e|rq ze`6e4ZJ#;zp`o&~MeBw$F(39dB(c@sh=dMCF>0OU)YALhd#lMpVrEWC0s@ve{PGbw(Xj9VE4FS z{t$lnGd}6kbHBuiYcHUFbOOJXYVdSAgq8@0i{Fq?KRSUwZP#A)MYHh!IC61+xgqPl!F%*EBlZZD440bGH z?C2KEbn`g)%{mM$`D6(P0OCA;Hxzx&=MiXimNN z@R$!<{f(Mz$vn&s;J$_=&iB8JNXH`De*7`QAvbWg77*t#aPAszby?BZ6~Mr`Ynp7y zyy*diI1ljO!^M9tVE1Xe0?viu6dwD!3)4dj_+XO5jrJx@wq)LLWsFvBJ2{uY@Q@!P zbrPJ{c|6cpi_9Mri0yJ>dT0R+-8BeDQgB}9@!hWos%<~-av`?MiH_|)LuqG=R=wK$ zr8>O$GY?`<)#E{{4@(&dFCG$b;JzgIW+(3P$a(33zFPdnS_g5D2bZ4pVrHNj%y}N- z9uHpYiR0y`s}PQ)@L;PKe6tg_N4&VlV>6s~wrSC}M6bSbE2!H3NH1$@?aXM=wnVSC z4g5s4{jbwgFtc{Hl&V+N+M8WFGg`DQ(W_%ex2U%7d6QAChmEM687$Qj z(jJ4EwX;o&wk3MCE~wuASFxC>wX?OQw`HJVDhWs0k1t=5Q2Wpv(o-(%<|Q1doyF9M z5Bo8Xe{aj+2XpfL47;S-eqvJ)YXAOLe@QxGI~792U{gU4u_Ix^w2$+LNKhUdyvQdKUU- z;q#9}(xO+Nd?Jgr{9QPFdQOveKKah9z5r_7@KDGuaY7aVkV?z{J2>FBg3P%c7Ob{T z=8}ShY6qjNvz&;4+lu!hX>!(Sr+2v??~ScV**r+%PQeW!nfEu31zp#qP!G3){6<1|)%DvM7jF48327sSv8|NwCBP6b zBLI-K)z)2hIk|B5Y>rnGJ~Vv@lZz6bBc4XWwAgwoEh(Hxuf@1rThn@=O#Hb;F_|Nt zM!=%?q|zc9YHT?r4DG2bL_>PvT`#1I70RSG47jawC<|F7W0&HAk|dS&PZudiKuijf z;#E0GhWbuCk=W(Sx}+e7H2EA^lo+i5mIVM)p4T(Qv~4l%N@_T|P^J?@DlIAVg*>d# zSz6Bj>$Je=381CikR*k2p-a0R7P#z84tO*-5+LZajHaELazm12X5w*lq3p6Va62rR zUdZHlDD9O5B%+Q+oj(&$&M~NgK7tZh8mmVZG`;GZ6cI< zenn*Aa%l#CulKuChmEmw8YrK$L#I&H&Qo2mNrQw8($(LfW+u zSXzOg>qD*QS41-*zn@3fX$>_tg}aCc5wFWIcG#q}l3mMr5v823dm;U~O;(9qj9kR+ zuqd9C|1)L2b|v0Z?O<}G8_juzfFRyT&MNi%=|oo7LYn#128%>LRQ@Ga>r9jIrFCzq oK$LpE-ddQs8!a6pk8%P0A6=~uz2sPRV*mgE07*qoM6N<$f(9bFQUCw| literal 2065 zcmc&#`9Is)8jf~a+w@|rlcX0lifU6_v0St$wagW@rk2`cZ6y&?v`I|0v}mXiRivRP z+AGP&Hl&ucwXYea(v~I_MAZ^Y?ZJH0e(v9Je|XRPd7pEh=XuY2emLou5Dv#=z%n2Z z=$MnEojZ`Nf%skOD6lr)LPrBh0_W~v3!)D}=YZme2pbn05U3_wRup^$sHHKEJ~$BQ zAMN6h=tftC0iasE{pENMba;G1a2yJR366@5hsC1eHH={fFgPmJ2n7O3ra0NzcqRtS zJhb`maeMjH;tc0s+>Aq1oJ@`?d!{@f*^EAw9fWDvVH7Y=nq*UgCYW)WSgqL6^Cb}M z9IHnT%rkwqX2zi1 z`&YVp>eB0$cdcx6R+&trJi7-hs`FKk%Quydly#OW^)JWMu*v!J7nW8xW)>m0t!rGC zE!l%jKT>CzKj&*s!_e8N6fpZX_K1jUD9o| z5J%{_!j(TNx-!7+y;gIYE4Z48S~1Z9MD{z5$gGaSIq(5Q&+Kd1*xiX4lI~|&vCJhx6*dR5Wlq}=)B|oJN`~2H-t7{HaOUotGdM7`}BD)SBMo9 zw;b%aWp!Jl2xK0s!IfQHLa!8@QCe%DvaX3CC;1R_?TgZAO==E&3&(NT-YWw4bQ~&N zJvkFY+Ra;cBOX*F{7DG(OQg<*`yXW=27rf;sR*aGMDTF$PSh#be|*$uHqixUa7iKb z5;613jxH;CBuYYB^%s@DfDw6)0h*B4*1K7UI%}J{YZHq`x=Ka+gRb`029*`ez+m(!_FScYfM!3(5B75$5D84kHT}(#R!Xw*({o?UV`K zx_}D{%WE@}i|RaR8*6!0ms%0|sePWEjqBPizLKP*FSuBsJU*#+4nOn3Ei^joq8cHf z*UGo<`i1G`e)JT4e@*ZzG4H1ow=JtE{NJwrW?He2ZSVbo@2pvLEH|byR zVtmK!;(TvJ{Pw~>0z7tLMbt*($vzCtH_3wzP--axnH;f|=fC0>-kRpP*MKc0zS!~8 zN(<~&R!5D+-1~uYy0TKR-?sPpUz=sKRP*TSLRodx&`{HjMT>MbJ3|g!a5ux>j(Bq= zwMG;C>39T!4tB5pL%*#wHL2c^C*l+&yh(nn&`ohm_LypbO~<&P4xD4_u`)#~tpUA^ zh4T)-#vAh9mGAto0!X9sLPh(;gL-phcB#}-n)HZt8r04dsHEZ%Fctgd9RAo!I$QQtnU-VU-x za{0<>SKO>*Tl9G7q@8Ue2fj%x-&WpDfLX!$q5CVMY7LhPty(isyXt`T3isWBhx~U zF3CSZ(pzu zKJk_e_Bb3J;^%MPmn)a30la912X1)DmDDVhI|Z102p5$fFXC@49#fDj9k@YLUMvHT zt8gaPEL8x%_s_y9EM5m8{$+Xu0nm4U;R06mN}GkoDY7? zA@b|9cb|VW@$7uYFn(YrjiXv(w~D~GVm7^~?7XvW0K)18JQ+Z*iN7ti{$xs~;YL58)s= z!YT63wF_S5Jc+Gy2~{?D>6jyZ9J8l6%=PiK=VmuRi-P;hQVQ9OljMX&e%(|RL16MG z?!Lztpr;iU@}+71*?%HVOz-Ljq|CGzkKP-z&QMCf_c&=b{0_4#4|1t)?^Y z#z1lylxJdH$6o4#KddyhZ`wL<+#xSW>%CWWuhl6JbNxSW5DlOr$>j*mC+{VE#h*XO M$sS=xw+%}98zcoB9smFU diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelFishingNet.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelFishingNet.png index 57361be8efb59bb5d5fe358920e785460992017c..60f68d1e6647cd28a663920115850f78bc6ff1b4 100644 GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DinK$vl=HlH+5kS)pE-G$*l2rk&Wd@@jky~NYkmHh!D7q6kz z?p30>K%sC?7srqc=eOrK@-`R<95~Sac2ksCqEE(+haxAh@A&rh&DV1W-|au1<&aH0 dJTU7gL)ts0n-TM8qyep9@O1TaS?83{1OVpLOHu#; delta 205 zcmaFPc#l!BGr-TCmrII^fq{Y7)59eQNIQTq2OE%Fm05UiqMmg9AqED%LyV#tUJXD& zi4xa{lHmNblJdl&REC1Y%)Ao4ywnl}6Fmbx)6`a@RG^v|PZ!6KinzBIHu4@&;Bj?a ze>_WPl3{1Z96j0A)Te$$j^8Uc#ul$RRqYn?Q!1p;a{2sk@)oKM3``sfAY#J#|AGz- oj8*Iv_5rn)?8-nBVZcJPkXd52&4in2nsFd8Pgg&ebxsLQ0HcUJDF6Tf From 3f165f897e6af2fa1ba732d961b5006a871e49b4 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 10 Jan 2016 15:29:44 +0100 Subject: [PATCH 31/58] ALL OF THE JSONS DONE. Now I just need to wait for canitzp to finish the special models~ --- .../mod/blocks/BlockCrystal.java | 14 +++++++++++++ .../mod/blocks/BlockWildPlant.java | 14 +++++++++++++ .../mod/blocks/base/BlockPlant.java | 2 +- .../mod/event/WorldDecorationEvent.java | 17 +++++++--------- .../actuallyadditions/mod/items/ItemJams.java | 10 +++++++++ .../mod/items/ItemPotionRing.java | 10 +++++++++ .../mod/material/InitArmorMaterials.java | 18 ++++++++--------- .../blockstates/blockCanola.json | 12 +++++++++++ .../blockstates/blockCoffee.json | 12 +++++++++++ .../blockstates/blockCrystal.json | 10 +++++++++ .../blockstates/blockFlax.json | 12 +++++++++++ .../blockstates/blockRice.json | 12 +++++++++++ .../blockstates/blockWild.json | 8 ++++++++ .../models/block/blockCanolaStage1.json | 6 ++++++ .../models/block/blockCanolaStage2.json | 6 ++++++ .../models/block/blockCanolaStage3.json | 6 ++++++ .../models/block/blockCanolaStage4.json | 6 ++++++ .../models/block/blockCoffeeStage1.json | 6 ++++++ .../models/block/blockCoffeeStage2.json | 6 ++++++ .../models/block/blockCoffeeStage3.json | 6 ++++++ .../models/block/blockCoffeeStage4.json | 6 ++++++ .../models/block/blockCoffeeStage5.json | 6 ++++++ .../models/block/blockCoffeeStage6.json | 6 ++++++ .../models/block/blockCrystalBlack.json | 6 ++++++ .../models/block/blockCrystalBlue.json | 6 ++++++ .../models/block/blockCrystalGreen.json | 6 ++++++ .../models/block/blockCrystalLightBlue.json | 6 ++++++ .../models/block/blockCrystalRed.json | 6 ++++++ .../models/block/blockCrystalWhite.json | 6 ++++++ .../models/block/blockFlaxStage1.json | 6 ++++++ .../models/block/blockFlaxStage2.json | 6 ++++++ .../models/block/blockFlaxStage3.json | 6 ++++++ .../models/block/blockFlaxStage4.json | 6 ++++++ .../models/block/blockFlaxStage5.json | 6 ++++++ .../models/block/blockFlaxStage6.json | 6 ++++++ .../models/block/blockRiceStage1.json | 6 ++++++ .../models/block/blockRiceStage2.json | 6 ++++++ .../models/block/blockRiceStage3.json | 6 ++++++ .../models/block/blockRiceStage4.json | 6 ++++++ .../models/block/blockRiceStage5.json | 6 ++++++ .../models/block/blockRiceStage6.json | 6 ++++++ .../models/item/blockCanola.json | 18 +++++++++++++++++ .../models/item/blockCoffee.json | 18 +++++++++++++++++ .../models/item/blockCrystalBlack.json | 10 +++++++++ .../models/item/blockCrystalBlue.json | 10 +++++++++ .../models/item/blockCrystalGreen.json | 10 +++++++++ .../models/item/blockCrystalLightBlue.json | 10 +++++++++ .../models/item/blockCrystalRed.json | 10 +++++++++ .../models/item/blockCrystalWhite.json | 10 +++++++++ .../models/item/blockFlax.json | 18 +++++++++++++++++ .../models/item/blockRice.json | 18 +++++++++++++++++ .../models/item/blockWildCanola.json | 18 +++++++++++++++++ .../models/item/blockWildCoffee.json | 18 +++++++++++++++++ .../models/item/blockWildFlax.json | 18 +++++++++++++++++ .../models/item/blockWildRice.json | 18 +++++++++++++++++ .../models/item/itemAxeCrystalBlack.json | 18 +++++++++++++++++ .../models/item/itemAxeCrystalBlue.json | 18 +++++++++++++++++ .../models/item/itemAxeCrystalGreen.json | 18 +++++++++++++++++ .../models/item/itemAxeCrystalLightBlue.json | 18 +++++++++++++++++ .../models/item/itemAxeCrystalRed.json | 18 +++++++++++++++++ .../models/item/itemAxeCrystalWhite.json | 18 +++++++++++++++++ .../models/item/itemAxeEmerald.json | 18 +++++++++++++++++ .../models/item/itemAxeObsidian.json | 18 +++++++++++++++++ .../models/item/itemAxeQuartz.json | 18 +++++++++++++++++ .../models/item/itemBootsCrystalBlack.json | 18 +++++++++++++++++ .../models/item/itemBootsCrystalBlue.json | 18 +++++++++++++++++ .../models/item/itemBootsCrystalGreen.json | 18 +++++++++++++++++ .../item/itemBootsCrystalLightBlue.json | 18 +++++++++++++++++ .../models/item/itemBootsCrystalRed.json | 18 +++++++++++++++++ .../models/item/itemBootsCrystalWhite.json | 18 +++++++++++++++++ .../models/item/itemBootsEmerald.json | 18 +++++++++++++++++ .../models/item/itemBootsObsidian.json | 18 +++++++++++++++++ .../models/item/itemBootsQuartz.json | 18 +++++++++++++++++ .../models/item/itemChestCrystalBlack.json | 18 +++++++++++++++++ .../models/item/itemChestCrystalBlue.json | 18 +++++++++++++++++ .../models/item/itemChestCrystalGreen.json | 18 +++++++++++++++++ .../item/itemChestCrystalLightBlue.json | 18 +++++++++++++++++ .../models/item/itemChestCrystalRed.json | 18 +++++++++++++++++ .../models/item/itemChestCrystalWhite.json | 18 +++++++++++++++++ .../models/item/itemChestEmerald.json | 18 +++++++++++++++++ .../models/item/itemChestObsidian.json | 18 +++++++++++++++++ .../models/item/itemChestQuartz.json | 18 +++++++++++++++++ .../models/item/itemHelmCrystalBlack.json | 18 +++++++++++++++++ .../models/item/itemHelmCrystalBlue.json | 18 +++++++++++++++++ .../models/item/itemHelmCrystalGreen.json | 18 +++++++++++++++++ .../models/item/itemHelmCrystalLightBlue.json | 18 +++++++++++++++++ .../models/item/itemHelmCrystalRed.json | 18 +++++++++++++++++ .../models/item/itemHelmCrystalWhite.json | 18 +++++++++++++++++ .../models/item/itemHelmEmerald.json | 18 +++++++++++++++++ .../models/item/itemHelmObsidian.json | 18 +++++++++++++++++ .../models/item/itemHelmQuartz.json | 18 +++++++++++++++++ .../models/item/itemHoeCrystalBlack.json | 18 +++++++++++++++++ .../models/item/itemHoeCrystalGreen.json | 18 +++++++++++++++++ .../models/item/itemHoeCrystalLightBlue.json | 18 +++++++++++++++++ .../models/item/itemHoeCrystalRed.json | 18 +++++++++++++++++ .../models/item/itemHoeCrystalWhite.json | 18 +++++++++++++++++ .../models/item/itemHoeCrystalblue.json | 18 +++++++++++++++++ .../models/item/itemHoeEmerald.json | 18 +++++++++++++++++ .../models/item/itemHoeObsidian.json | 18 +++++++++++++++++ .../models/item/itemHoeQuartz.json | 18 +++++++++++++++++ .../models/item/itemJam.json | 19 ++++++++++++++++++ .../models/item/itemPantsCrystalBlack.json | 18 +++++++++++++++++ .../models/item/itemPantsCrystalBlue.json | 18 +++++++++++++++++ .../models/item/itemPantsCrystalGreen.json | 18 +++++++++++++++++ .../item/itemPantsCrystalLightBlue.json | 18 +++++++++++++++++ .../models/item/itemPantsCrystalRed.json | 18 +++++++++++++++++ .../models/item/itemPantsCrystalWhite.json | 18 +++++++++++++++++ .../models/item/itemPantsEmerald.json | 18 +++++++++++++++++ .../models/item/itemPantsObsidian.json | 18 +++++++++++++++++ .../models/item/itemPantsQuartz.json | 18 +++++++++++++++++ .../models/item/itemPickaxeCrystalBlack.json | 18 +++++++++++++++++ .../models/item/itemPickaxeCrystalBlue.json | 18 +++++++++++++++++ .../models/item/itemPickaxeCrystalGreen.json | 18 +++++++++++++++++ .../item/itemPickaxeCrystalLightBlue.json | 18 +++++++++++++++++ .../models/item/itemPickaxeCrystalRed.json | 18 +++++++++++++++++ .../models/item/itemPickaxeCrystalWhite.json | 18 +++++++++++++++++ .../models/item/itemPickaxeEmerald.json | 18 +++++++++++++++++ .../models/item/itemPickaxeObsidian.json | 18 +++++++++++++++++ .../models/item/itemPickaxeQuartz.json | 18 +++++++++++++++++ .../models/item/itemPotionRIng.json | 18 +++++++++++++++++ .../models/item/itemPotionRingAdvanced.json | 18 +++++++++++++++++ .../models/item/itemShovelCrystalBlack.json | 18 +++++++++++++++++ .../models/item/itemShovelCrystalBlue.json | 18 +++++++++++++++++ .../models/item/itemShovelCrystalGreen.json | 18 +++++++++++++++++ .../item/itemShovelCrystalLightBlue.json | 18 +++++++++++++++++ .../models/item/itemShovelCrystalRed.json | 18 +++++++++++++++++ .../models/item/itemShovelCrystalWhite.json | 18 +++++++++++++++++ .../models/item/itemShovelEmerald.json | 18 +++++++++++++++++ .../models/item/itemShovelObsidian.json | 18 +++++++++++++++++ .../models/item/itemShovelQuartz.json | 18 +++++++++++++++++ .../models/item/itemSwordCrystalBlack.json | 18 +++++++++++++++++ .../models/item/itemSwordCrystalBlue.json | 18 +++++++++++++++++ .../models/item/itemSwordCrystalGreen.json | 18 +++++++++++++++++ .../item/itemSwordCrystalLightBlue.json | 18 +++++++++++++++++ .../models/item/itemSwordCrystalRed.json | 18 +++++++++++++++++ .../models/item/itemSwordCrystalWhite.json | 18 +++++++++++++++++ .../models/item/itemSwordEmerald.json | 18 +++++++++++++++++ .../models/item/itemSwordObsidian.json | 18 +++++++++++++++++ .../models/item/itemSwordQuartz.json | 18 +++++++++++++++++ .../textures/blocks/blockCrystalBlack.png | Bin 0 -> 251 bytes .../textures/blocks/blockCrystalBlue.png | Bin 0 -> 781 bytes .../textures/blocks/blockCrystalGreen.png | Bin 0 -> 864 bytes .../textures/blocks/blockCrystalLightBlue.png | Bin 0 -> 809 bytes .../textures/blocks/blockCrystalRed.png | Bin 0 -> 777 bytes ...blockCrystal.png => blockCrystalWhite.png} | Bin .../armor/armorCrystalBlack_layer_1.png} | Bin .../armor/armorCrystalBlack_layer_2.png} | Bin .../armor/armorCrystalBlue_layer_1.png} | Bin .../armor/armorCrystalBlue_layer_2.png} | Bin .../armor/armorCrystalGreen_layer_1.png} | Bin .../armor/armorCrystalGreen_layer_2.png} | Bin .../armor/armorCrystalLightBlue_layer_1.png} | Bin .../armor/armorCrystalLightBlue_layer_2.png} | Bin .../armor/armorCrystalRed_layer_1.png} | Bin .../armor/armorCrystalRed_layer_2.png} | Bin .../armor/armorCrystalWhite_layer_1.png} | Bin .../armor/armorCrystalWhite_layer_2.png} | Bin .../armor/armorEmerald_layer_1.png} | Bin .../armor/armorEmerald_layer_2.png} | Bin .../armor/armorObsidian_layer_1.png} | Bin .../armor/armorObsidian_layer_2.png} | Bin .../armor/armorQuartz_layer_1.png} | Bin .../armor/armorQuartz_layer_2.png} | Bin 163 files changed, 2016 insertions(+), 20 deletions(-) create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockCanola.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockCoffee.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockCrystal.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockFlax.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockRice.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockWild.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage1.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage2.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage3.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage4.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage1.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage2.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage3.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage4.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage5.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage6.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage1.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage2.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage3.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage4.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage5.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage6.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockRiceStage1.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockRiceStage2.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockRiceStage3.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockRiceStage4.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockRiceStage5.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockRiceStage6.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCanola.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCoffee.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockFlax.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockRice.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockWildCanola.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockWildCoffee.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockWildFlax.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockWildRice.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemAxeEmerald.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemAxeObsidian.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemAxeQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBootsEmerald.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBootsObsidian.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemBootsQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemChestEmerald.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemChestObsidian.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemChestQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHelmEmerald.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHelmObsidian.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHelmQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalblue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHoeEmerald.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHoeObsidian.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemHoeQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemJam.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPantsEmerald.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPantsObsidian.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPantsQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPickaxeEmerald.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPickaxeObsidian.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPickaxeQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPotionRIng.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemPotionRingAdvanced.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemShovelEmerald.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemShovelObsidian.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemShovelQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalBlack.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalGreen.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalLightBlue.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalRed.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalWhite.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSwordEmerald.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSwordObsidian.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/itemSwordQuartz.json create mode 100644 src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalBlack.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalBlue.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalGreen.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalLightBlue.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalRed.png rename src/main/resources/assets/actuallyadditions/textures/blocks/{blockCrystal.png => blockCrystalWhite.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalBlack1.png => models/armor/armorCrystalBlack_layer_1.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalBlack2.png => models/armor/armorCrystalBlack_layer_2.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalBlue1.png => models/armor/armorCrystalBlue_layer_1.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalBlue2.png => models/armor/armorCrystalBlue_layer_2.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalGreen1.png => models/armor/armorCrystalGreen_layer_1.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalGreen2.png => models/armor/armorCrystalGreen_layer_2.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalLightBlue1.png => models/armor/armorCrystalLightBlue_layer_1.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalLightBlue2.png => models/armor/armorCrystalLightBlue_layer_2.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalRed1.png => models/armor/armorCrystalRed_layer_1.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalRed2.png => models/armor/armorCrystalRed_layer_2.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalWhite1.png => models/armor/armorCrystalWhite_layer_1.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorCrystalWhite2.png => models/armor/armorCrystalWhite_layer_2.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorEmerald1.png => models/armor/armorEmerald_layer_1.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorEmerald2.png => models/armor/armorEmerald_layer_2.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorObsidian1.png => models/armor/armorObsidian_layer_1.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorObsidian2.png => models/armor/armorObsidian_layer_2.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorQuartz1.png => models/armor/armorQuartz_layer_1.png} (100%) rename src/main/resources/assets/actuallyadditions/textures/{armor/armorQuartz2.png => models/armor/armorQuartz_layer_2.png} (100%) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java index 8c7b2ad22..68cc30514 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java @@ -10,9 +10,11 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -22,6 +24,7 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -67,6 +70,17 @@ public class BlockCrystal extends BlockBase{ return stack.getItemDamage() >= allCrystals.length ? EnumRarity.COMMON : allCrystals[stack.getItemDamage()].rarity; } + @Override + protected void registerRendering(){ + ResourceLocation[] resLocs = new ResourceLocation[allCrystals.length]; + for(int i = 0; i < allCrystals.length; i++){ + String name = this.getBaseName()+allCrystals[i].name; + resLocs[i] = new ResourceLocation(ModUtil.MOD_ID_LOWER, name); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, name)); + } + ActuallyAdditions.proxy.addRenderVariant(Item.getItemFromBlock(this), resLocs); + } + public static class TheItemBlock extends ItemBlockBase{ public TheItemBlock(Block block){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index 0174093bc..d3cc8f963 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -11,10 +11,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheWildPlants; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; @@ -28,6 +30,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; @@ -91,6 +94,17 @@ public class BlockWildPlant extends BlockBushBase{ } } + @Override + protected void registerRendering(){ + ResourceLocation[] resLocs = new ResourceLocation[allWildPlants.length]; + for(int i = 0; i < allWildPlants.length; i++){ + String name = this.getBaseName()+allWildPlants[i].name; + resLocs[i] = new ResourceLocation(ModUtil.MOD_ID_LOWER, name); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, name)); + } + ActuallyAdditions.proxy.addRenderVariant(Item.getItemFromBlock(this), resLocs); + } + @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ int metadata = PosUtil.getMetadata(pos, world); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java index a7de0e08c..02657734a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java @@ -70,7 +70,7 @@ public class BlockPlant extends BlockCrops{ } public boolean shouldAddCreative(){ - return true; + return false; } public EnumRarity getRarity(ItemStack stack){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java index 0f83e2734..2b5f9da86 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/WorldDecorationEvent.java @@ -20,7 +20,6 @@ import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; -import net.minecraft.block.BlockBush; import net.minecraft.block.material.Material; import net.minecraft.util.BlockPos; import net.minecraft.world.biome.BiomeGenOcean; @@ -69,13 +68,13 @@ public class WorldDecorationEvent{ if(event.rand.nextInt(50) == 0){ BlockPos randomPos = new BlockPos(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); randomPos = event.world.getTopSolidOrLiquidBlock(randomPos); - if(PosUtil.getMaterial(randomPos, event.world) == Material.water){ ArrayList blocksAroundBottom = WorldUtil.getMaterialsAround(event.world, randomPos); - ArrayList blocksAroundTop = WorldUtil.getMaterialsAround(event.world, PosUtil.offset(randomPos, 0, 1, 0)); + BlockPos posToGenAt = PosUtil.offset(randomPos, 0, 1, 0); + ArrayList blocksAroundTop = WorldUtil.getMaterialsAround(event.world, posToGenAt); if(blocksAroundBottom.contains(Material.grass) || blocksAroundBottom.contains(Material.ground) || blocksAroundBottom.contains(Material.rock) || blocksAroundBottom.contains(Material.sand)){ - if(!blocksAroundTop.contains(Material.water) && PosUtil.getMaterial(randomPos, event.world) == Material.air){ - PosUtil.setBlock(PosUtil.offset(randomPos, 0, 1, 0), event.world, InitBlocks.blockWildPlant, TheWildPlants.RICE.ordinal(), 2); + if(!blocksAroundTop.contains(Material.water) && PosUtil.getMaterial(posToGenAt, event.world) == Material.air){ + PosUtil.setBlock(posToGenAt, event.world, InitBlocks.blockWildPlant, TheWildPlants.RICE.ordinal(), 2); } } } @@ -91,11 +90,9 @@ public class WorldDecorationEvent{ BlockPos randomPos = new BlockPos(event.pos.getX()+event.rand.nextInt(16)+8, 0, event.pos.getZ()+event.rand.nextInt(16)+8); randomPos = event.world.getTopSolidOrLiquidBlock(randomPos); - if(PosUtil.getMaterial(randomPos, event.world) == blockBelow){ - BlockPos top = PosUtil.offset(randomPos, 0, 1, 0); - PosUtil.setBlock(top, event.world, plant, meta, 2); - if(plant instanceof BlockBush && !((BlockBush)plant).canBlockStay(event.world, top, event.world.getBlockState(top))){ - event.world.setBlockToAir(top); + if(PosUtil.getMaterial(PosUtil.offset(randomPos, 0, -1, 0), event.world) == blockBelow){ + if(plant.canPlaceBlockAt(event.world, randomPos)){ + PosUtil.setBlock(randomPos, event.world, plant, meta, 2); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java index bea7bca7a..f64c2eea5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemJams.java @@ -10,8 +10,10 @@ package de.ellpeck.actuallyadditions.mod.items; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheJams; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; @@ -21,6 +23,7 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -97,4 +100,11 @@ public class ItemJams extends ItemFoodBase{ public float getSaturationModifier(ItemStack stack){ return stack.getItemDamage() >= allJams.length ? 0 : allJams[stack.getItemDamage()].saturation; } + + @Override + protected void registerRendering(){ + for(int i = 0; i < allJams.length; i++){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); + } + } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java index cc8b88ee3..5728b0a3b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPotionRing.java @@ -10,8 +10,10 @@ package de.ellpeck.actuallyadditions.mod.items; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.ThePotionRings; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; @@ -20,6 +22,7 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -102,4 +105,11 @@ public class ItemPotionRing extends ItemBase{ list.add(new ItemStack(this, 1, j)); } } + + @Override + protected void registerRendering(){ + for(int i = 0; i < allRings.length; i++){ + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID_LOWER, this.getBaseName())); + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/material/InitArmorMaterials.java b/src/main/java/de/ellpeck/actuallyadditions/mod/material/InitArmorMaterials.java index a44e8d511..7157377b7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/material/InitArmorMaterials.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/material/InitArmorMaterials.java @@ -31,15 +31,15 @@ public class InitArmorMaterials{ ModUtil.LOGGER.info("Initializing Armor Materials..."); //TODO Fix armor textures - armorMaterialEmerald = EnumHelper.addArmorMaterial("armorMaterialEmerald", "TODO", 50, new int[]{5, 9, 8, 5}, 15); - armorMaterialObsidian = EnumHelper.addArmorMaterial("armorMaterialObsidian", "TODO", 120, new int[]{3, 4, 3, 1}, 10); - armorMaterialQuartz = EnumHelper.addArmorMaterial("armorMaterialQuartz", "TODO", 20, new int[]{3, 6, 5, 3}, 8); + armorMaterialEmerald = EnumHelper.addArmorMaterial("armorMaterialEmerald", ModUtil.MOD_ID_LOWER+":armorEmerald", 50, new int[]{5, 9, 8, 5}, 15); + armorMaterialObsidian = EnumHelper.addArmorMaterial("armorMaterialObsidian", ModUtil.MOD_ID_LOWER+":armorObsidian", 120, new int[]{3, 4, 3, 1}, 10); + armorMaterialQuartz = EnumHelper.addArmorMaterial("armorMaterialQuartz", ModUtil.MOD_ID_LOWER+":armorQuartz", 20, new int[]{3, 6, 5, 3}, 8); - armorMaterialCrystalRed = EnumHelper.addArmorMaterial("armorMaterialCrystalRed", "TODO", 18, new int[]{3, 7, 6, 3}, 9); - armorMaterialCrystalBlue = EnumHelper.addArmorMaterial("armorMaterialCrystalBlue", "TODO", 18, new int[]{3, 7, 6, 3}, 10); - armorMaterialCrystalLightBlue = EnumHelper.addArmorMaterial("armorMaterialCrystalLightBlue", "TODO", 35, new int[]{7, 9, 7, 5}, 12); - armorMaterialCrystalBlack = EnumHelper.addArmorMaterial("armorMaterialCrystalBlack", "TODO", 12, new int[]{1, 4, 3, 1}, 13); - armorMaterialCrystalGreen = EnumHelper.addArmorMaterial("armorMaterialCrystalGreen", "TODO", 60, new int[]{7, 10, 9, 6}, 18); - armorMaterialCrystalWhite = EnumHelper.addArmorMaterial("armorMaterialCrystalWhite", "TODO", 18, new int[]{4, 7, 6, 4}, 11); + armorMaterialCrystalRed = EnumHelper.addArmorMaterial("armorMaterialCrystalRed", ModUtil.MOD_ID_LOWER+":armorCrystalRed", 18, new int[]{3, 7, 6, 3}, 9); + armorMaterialCrystalBlue = EnumHelper.addArmorMaterial("armorMaterialCrystalBlue", ModUtil.MOD_ID_LOWER+":armorCrystalBlue", 18, new int[]{3, 7, 6, 3}, 10); + armorMaterialCrystalLightBlue = EnumHelper.addArmorMaterial("armorMaterialCrystalLightBlue", ModUtil.MOD_ID_LOWER+":armorCrystalLightBlue", 35, new int[]{7, 9, 7, 5}, 12); + armorMaterialCrystalBlack = EnumHelper.addArmorMaterial("armorMaterialCrystalBlack", ModUtil.MOD_ID_LOWER+":armorCrystalBlack", 12, new int[]{1, 4, 3, 1}, 13); + armorMaterialCrystalGreen = EnumHelper.addArmorMaterial("armorMaterialCrystalGreen", ModUtil.MOD_ID_LOWER+":armorCrystalGreen", 60, new int[]{7, 10, 9, 6}, 18); + armorMaterialCrystalWhite = EnumHelper.addArmorMaterial("armorMaterialCrystalWhite", ModUtil.MOD_ID_LOWER+":armorCrystalWhite", 18, new int[]{4, 7, 6, 4}, 11); } } diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockCanola.json b/src/main/resources/assets/actuallyadditions/blockstates/blockCanola.json new file mode 100644 index 000000000..2e1a8012b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockCanola.json @@ -0,0 +1,12 @@ +{ + "variants": { + "age=0": { "model": "actuallyadditions:blockCanolaStage1" }, + "age=1": { "model": "actuallyadditions:blockCanolaStage1" }, + "age=2": { "model": "actuallyadditions:blockCanolaStage2" }, + "age=3": { "model": "actuallyadditions:blockCanolaStage2" }, + "age=4": { "model": "actuallyadditions:blockCanolaStage2" }, + "age=5": { "model": "actuallyadditions:blockCanolaStage3" }, + "age=6": { "model": "actuallyadditions:blockCanolaStage3" }, + "age=7": { "model": "actuallyadditions:blockCanolaStage4" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockCoffee.json b/src/main/resources/assets/actuallyadditions/blockstates/blockCoffee.json new file mode 100644 index 000000000..337a81e62 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockCoffee.json @@ -0,0 +1,12 @@ +{ + "variants": { + "age=0": { "model": "actuallyadditions:blockCoffeeStage1" }, + "age=1": { "model": "actuallyadditions:blockCoffeeStage2" }, + "age=2": { "model": "actuallyadditions:blockCoffeeStage2" }, + "age=3": { "model": "actuallyadditions:blockCoffeeStage3" }, + "age=4": { "model": "actuallyadditions:blockCoffeeStage4" }, + "age=5": { "model": "actuallyadditions:blockCoffeeStage4" }, + "age=6": { "model": "actuallyadditions:blockCoffeeStage5" }, + "age=7": { "model": "actuallyadditions:blockCoffeeStage6" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockCrystal.json b/src/main/resources/assets/actuallyadditions/blockstates/blockCrystal.json new file mode 100644 index 000000000..c08e793eb --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockCrystal.json @@ -0,0 +1,10 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockCrystalRed" }, + "meta=1": { "model": "actuallyadditions:blockCrystalBlue" }, + "meta=2": { "model": "actuallyadditions:blockCrystalLightBlue" }, + "meta=3": { "model": "actuallyadditions:blockCrystalBlack" }, + "meta=4": { "model": "actuallyadditions:blockCrystalGreen" }, + "meta=5": { "model": "actuallyadditions:blockCrystalWhite" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockFlax.json b/src/main/resources/assets/actuallyadditions/blockstates/blockFlax.json new file mode 100644 index 000000000..649965b40 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockFlax.json @@ -0,0 +1,12 @@ +{ + "variants": { + "age=0": { "model": "actuallyadditions:blockFlaxStage1" }, + "age=1": { "model": "actuallyadditions:blockFlaxStage2" }, + "age=2": { "model": "actuallyadditions:blockFlaxStage2" }, + "age=3": { "model": "actuallyadditions:blockFlaxStage3" }, + "age=4": { "model": "actuallyadditions:blockFlaxStage4" }, + "age=5": { "model": "actuallyadditions:blockFlaxStage4" }, + "age=6": { "model": "actuallyadditions:blockFlaxStage5" }, + "age=7": { "model": "actuallyadditions:blockFlaxStage6" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockRice.json b/src/main/resources/assets/actuallyadditions/blockstates/blockRice.json new file mode 100644 index 000000000..a4195413a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockRice.json @@ -0,0 +1,12 @@ +{ + "variants": { + "age=0": { "model": "actuallyadditions:blockRiceStage1" }, + "age=1": { "model": "actuallyadditions:blockRiceStage2" }, + "age=2": { "model": "actuallyadditions:blockRiceStage2" }, + "age=3": { "model": "actuallyadditions:blockRiceStage3" }, + "age=4": { "model": "actuallyadditions:blockRiceStage4" }, + "age=5": { "model": "actuallyadditions:blockRiceStage4" }, + "age=6": { "model": "actuallyadditions:blockRiceStage5" }, + "age=7": { "model": "actuallyadditions:blockRiceStage6" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockWild.json b/src/main/resources/assets/actuallyadditions/blockstates/blockWild.json new file mode 100644 index 000000000..5f05e40d5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockWild.json @@ -0,0 +1,8 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockCanolaStage4" }, + "meta=1": { "model": "actuallyadditions:blockFlaxStage6" }, + "meta=2": { "model": "actuallyadditions:blockRiceStage6" }, + "meta=3": { "model": "actuallyadditions:blockCoffeeStage6" } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage1.json b/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage1.json new file mode 100644 index 000000000..701445f89 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage1.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockCanolaStage1" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage2.json b/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage2.json new file mode 100644 index 000000000..d369d5d30 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage2.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockCanolaStage2" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage3.json b/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage3.json new file mode 100644 index 000000000..e2a41155c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage3.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockCanolaStage3" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage4.json b/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage4.json new file mode 100644 index 000000000..e53ff1a48 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCanolaStage4.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockCanolaStage4" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage1.json b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage1.json new file mode 100644 index 000000000..418a1ae50 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage1.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockCoffeeStage1" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage2.json b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage2.json new file mode 100644 index 000000000..0c406180e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage2.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockCoffeeStage2" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage3.json b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage3.json new file mode 100644 index 000000000..217d6a18c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage3.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockCoffeeStage3" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage4.json b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage4.json new file mode 100644 index 000000000..4ce34a28c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage4.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockCoffeeStage4" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage5.json b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage5.json new file mode 100644 index 000000000..aa93e5649 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage5.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockCoffeeStage5" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage6.json b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage6.json new file mode 100644 index 000000000..c3754df6c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCoffeeStage6.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockCoffeeStage6" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalBlack.json new file mode 100644 index 000000000..454d2d55b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalBlack.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockCrystalBlack" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalBlue.json new file mode 100644 index 000000000..51a0f7f6d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalBlue.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockCrystalBlue" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalGreen.json new file mode 100644 index 000000000..4c5a94584 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalGreen.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockCrystalGreen" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalLightBlue.json new file mode 100644 index 000000000..3fb518176 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalLightBlue.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockCrystalLightBlue" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalRed.json new file mode 100644 index 000000000..e4279898b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalRed.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockCrystalRed" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalWhite.json new file mode 100644 index 000000000..041e81265 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockCrystalWhite.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "actuallyadditions:blocks/blockCrystalWhite" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage1.json b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage1.json new file mode 100644 index 000000000..47d690d32 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage1.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockFlaxStage1" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage2.json b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage2.json new file mode 100644 index 000000000..6380ad351 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage2.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockFlaxStage2" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage3.json b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage3.json new file mode 100644 index 000000000..fb00402fd --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage3.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockFlaxStage3" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage4.json b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage4.json new file mode 100644 index 000000000..c51f298c1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage4.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockFlaxStage4" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage5.json b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage5.json new file mode 100644 index 000000000..b3f41a5ce --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage5.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockFlaxStage5" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage6.json b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage6.json new file mode 100644 index 000000000..92b7294f1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockFlaxStage6.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockFlaxStage6" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage1.json b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage1.json new file mode 100644 index 000000000..8e49402c6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage1.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockRiceStage1" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage2.json b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage2.json new file mode 100644 index 000000000..505ad42ef --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage2.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockRiceStage2" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage3.json b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage3.json new file mode 100644 index 000000000..e3d655adb --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage3.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockRiceStage3" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage4.json b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage4.json new file mode 100644 index 000000000..b18a4e8c1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage4.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockRiceStage4" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage5.json b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage5.json new file mode 100644 index 000000000..85f9d0c35 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage5.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockRiceStage5" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage6.json b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage6.json new file mode 100644 index 000000000..b9bc34d0a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockRiceStage6.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "actuallyadditions:blocks/blockRiceStage6" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCanola.json b/src/main/resources/assets/actuallyadditions/models/item/blockCanola.json new file mode 100644 index 000000000..b04563dbe --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCanola.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:blocks/blockCanolaStage1" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCoffee.json b/src/main/resources/assets/actuallyadditions/models/item/blockCoffee.json new file mode 100644 index 000000000..37a181523 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCoffee.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:blocks/blockCoffeeStage1" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalBlack.json new file mode 100644 index 000000000..202cadb3c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalBlack.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockCrystalBlack", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalBlue.json new file mode 100644 index 000000000..31adfb56e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalBlue.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockCrystalBlue", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalGreen.json new file mode 100644 index 000000000..6237d6dad --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalGreen.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockCrystalGreen", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalLightBlue.json new file mode 100644 index 000000000..278da0baa --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalLightBlue.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockCrystalLightBlue", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalRed.json new file mode 100644 index 000000000..a035b7348 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalRed.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockCrystalRed", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalWhite.json new file mode 100644 index 000000000..2b04b06b4 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockCrystalWhite.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockCrystalWhite", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockFlax.json b/src/main/resources/assets/actuallyadditions/models/item/blockFlax.json new file mode 100644 index 000000000..42effaf85 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockFlax.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:blocks/blockFlaxStage1" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockRice.json b/src/main/resources/assets/actuallyadditions/models/item/blockRice.json new file mode 100644 index 000000000..fec824365 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockRice.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:blocks/blockRiceStage1" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockWildCanola.json b/src/main/resources/assets/actuallyadditions/models/item/blockWildCanola.json new file mode 100644 index 000000000..b04563dbe --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockWildCanola.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:blocks/blockCanolaStage1" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockWildCoffee.json b/src/main/resources/assets/actuallyadditions/models/item/blockWildCoffee.json new file mode 100644 index 000000000..37a181523 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockWildCoffee.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:blocks/blockCoffeeStage1" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockWildFlax.json b/src/main/resources/assets/actuallyadditions/models/item/blockWildFlax.json new file mode 100644 index 000000000..42effaf85 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockWildFlax.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:blocks/blockFlaxStage1" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockWildRice.json b/src/main/resources/assets/actuallyadditions/models/item/blockWildRice.json new file mode 100644 index 000000000..fec824365 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockWildRice.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:blocks/blockRiceStage1" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalBlack.json new file mode 100644 index 000000000..4f98f4397 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeCrystalBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalBlue.json new file mode 100644 index 000000000..4c212b4ef --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeCrystalBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalGreen.json new file mode 100644 index 000000000..556a66efd --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeCrystalGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalLightBlue.json new file mode 100644 index 000000000..89f49fe1e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalLightBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeCrystalLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalRed.json new file mode 100644 index 000000000..1cb650176 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeCrystalRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalWhite.json new file mode 100644 index 000000000..bee2a16b1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemAxeCrystalWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeCrystalWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemAxeEmerald.json b/src/main/resources/assets/actuallyadditions/models/item/itemAxeEmerald.json new file mode 100644 index 000000000..7e6cdc255 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemAxeEmerald.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeEmerald" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemAxeObsidian.json b/src/main/resources/assets/actuallyadditions/models/item/itemAxeObsidian.json new file mode 100644 index 000000000..eec9cf3bf --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemAxeObsidian.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeObsidian" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemAxeQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemAxeQuartz.json new file mode 100644 index 000000000..f4d64c458 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemAxeQuartz.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeQuartz" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalBlack.json new file mode 100644 index 000000000..4cfd6f455 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBootsCrystalBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalBlue.json new file mode 100644 index 000000000..ddfedf1f6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBootsCrystalBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalGreen.json new file mode 100644 index 000000000..1f3e64b4f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBootsCrystalGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalLightBlue.json new file mode 100644 index 000000000..9c6a3a15e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalLightBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBootsCrystalLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalRed.json new file mode 100644 index 000000000..9c5979db9 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBootsCrystalRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalWhite.json new file mode 100644 index 000000000..6be621781 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBootsCrystalWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBootsCrystalWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBootsEmerald.json b/src/main/resources/assets/actuallyadditions/models/item/itemBootsEmerald.json new file mode 100644 index 000000000..d9af82c78 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBootsEmerald.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBootsEmerald" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBootsObsidian.json b/src/main/resources/assets/actuallyadditions/models/item/itemBootsObsidian.json new file mode 100644 index 000000000..8ec9c0b17 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBootsObsidian.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBootsObsidian" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemBootsQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemBootsQuartz.json new file mode 100644 index 000000000..a41b54462 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemBootsQuartz.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemBootsQuartz" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalBlack.json new file mode 100644 index 000000000..9d2639e78 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemChestCrystalBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalBlue.json new file mode 100644 index 000000000..28a716282 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemChestCrystalBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalGreen.json new file mode 100644 index 000000000..71934a0ec --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemChestCrystalGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalLightBlue.json new file mode 100644 index 000000000..6df7a6501 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalLightBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemChestCrystalLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalRed.json new file mode 100644 index 000000000..98cf258ba --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemChestCrystalRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalWhite.json new file mode 100644 index 000000000..d3b38ef5a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemChestCrystalWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemChestCrystalWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemChestEmerald.json b/src/main/resources/assets/actuallyadditions/models/item/itemChestEmerald.json new file mode 100644 index 000000000..37fbe2d88 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemChestEmerald.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemChestEmerald" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemChestObsidian.json b/src/main/resources/assets/actuallyadditions/models/item/itemChestObsidian.json new file mode 100644 index 000000000..62d8ab777 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemChestObsidian.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemChestObsidian" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemChestQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemChestQuartz.json new file mode 100644 index 000000000..79b4a4c5f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemChestQuartz.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemChestQuartz" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalBlack.json new file mode 100644 index 000000000..9105de89c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHelmCrystalBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalBlue.json new file mode 100644 index 000000000..9fc307f23 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHelmCrystalBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalGreen.json new file mode 100644 index 000000000..1d2d9075c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHelmCrystalGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalLightBlue.json new file mode 100644 index 000000000..e8f611e5c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalLightBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHelmCrystalLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalRed.json new file mode 100644 index 000000000..f745d5a15 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHelmCrystalRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalWhite.json new file mode 100644 index 000000000..2991fdc1d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHelmCrystalWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHelmCrystalWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHelmEmerald.json b/src/main/resources/assets/actuallyadditions/models/item/itemHelmEmerald.json new file mode 100644 index 000000000..632f5f331 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHelmEmerald.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHelmEmerald" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHelmObsidian.json b/src/main/resources/assets/actuallyadditions/models/item/itemHelmObsidian.json new file mode 100644 index 000000000..1733d7047 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHelmObsidian.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHelmObsidian" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHelmQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemHelmQuartz.json new file mode 100644 index 000000000..de80e361e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHelmQuartz.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHelmQuartz" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalBlack.json new file mode 100644 index 000000000..083f0244f --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHoeCrystalBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalGreen.json new file mode 100644 index 000000000..38502c282 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHoeCrystalGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalLightBlue.json new file mode 100644 index 000000000..c47310bd7 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalLightBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHoeCrystalLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalRed.json new file mode 100644 index 000000000..3abdd74ad --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHoeCrystalRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalWhite.json new file mode 100644 index 000000000..f68baefa5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHoeCrystalWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalblue.json b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalblue.json new file mode 100644 index 000000000..e79636060 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHoeCrystalblue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHoeCrystalBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHoeEmerald.json b/src/main/resources/assets/actuallyadditions/models/item/itemHoeEmerald.json new file mode 100644 index 000000000..62747b29b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHoeEmerald.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHoeEmerald" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHoeObsidian.json b/src/main/resources/assets/actuallyadditions/models/item/itemHoeObsidian.json new file mode 100644 index 000000000..8f6a3b766 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHoeObsidian.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHoeObsidian" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemHoeQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemHoeQuartz.json new file mode 100644 index 000000000..74f38d03a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemHoeQuartz.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemHoeQuartz" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemJam.json b/src/main/resources/assets/actuallyadditions/models/item/itemJam.json new file mode 100644 index 000000000..de9a01f4d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemJam.json @@ -0,0 +1,19 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemJam", + "layer1": "actuallyadditions:items/itemJamOverlay" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalBlack.json new file mode 100644 index 000000000..e4521de3b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPantsCrystalBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalBlue.json new file mode 100644 index 000000000..6ed1bcbb5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPantsCrystalBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalGreen.json new file mode 100644 index 000000000..0e50de466 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPantsCrystalGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalLightBlue.json new file mode 100644 index 000000000..db3718cc6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalLightBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPantsCrystalLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalRed.json new file mode 100644 index 000000000..f3f48adac --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPantsCrystalRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalWhite.json new file mode 100644 index 000000000..adbd3061b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPantsCrystalWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPantsCrystalWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPantsEmerald.json b/src/main/resources/assets/actuallyadditions/models/item/itemPantsEmerald.json new file mode 100644 index 000000000..35b1f272d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPantsEmerald.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPantsEmerald" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPantsObsidian.json b/src/main/resources/assets/actuallyadditions/models/item/itemPantsObsidian.json new file mode 100644 index 000000000..0597eca71 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPantsObsidian.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPantsObsidian" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPantsQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemPantsQuartz.json new file mode 100644 index 000000000..5a955c125 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPantsQuartz.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPantsQuartz" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalBlack.json new file mode 100644 index 000000000..a0712b0a0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPickaxeCrystalBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalBlue.json new file mode 100644 index 000000000..b63d3202b --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPickaxeCrystalBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalGreen.json new file mode 100644 index 000000000..48c186437 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPickaxeCrystalGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalLightBlue.json new file mode 100644 index 000000000..9e8fd0fc8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalLightBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPickaxeCrystalLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalRed.json new file mode 100644 index 000000000..ab913e50d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPickaxeCrystalRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalWhite.json new file mode 100644 index 000000000..fb7d66be8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeCrystalWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPickaxeCrystalWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeEmerald.json b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeEmerald.json new file mode 100644 index 000000000..d6278082d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeEmerald.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPickaxeEmerald" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeObsidian.json b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeObsidian.json new file mode 100644 index 000000000..131104662 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeObsidian.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPickaxeObsidian" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeQuartz.json new file mode 100644 index 000000000..ffd45f524 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPickaxeQuartz.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPickaxeQuartz" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPotionRIng.json b/src/main/resources/assets/actuallyadditions/models/item/itemPotionRIng.json new file mode 100644 index 000000000..7cf725f15 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPotionRIng.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPotionRing" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPotionRingAdvanced.json b/src/main/resources/assets/actuallyadditions/models/item/itemPotionRingAdvanced.json new file mode 100644 index 000000000..501577231 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPotionRingAdvanced.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemPotionRingAdvanced" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalBlack.json new file mode 100644 index 000000000..ac520e37c --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemShovelCrystalBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalBlue.json new file mode 100644 index 000000000..da7eb699e --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemShovelCrystalBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalGreen.json new file mode 100644 index 000000000..615b9a346 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemShovelCrystalGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalLightBlue.json new file mode 100644 index 000000000..2c8303371 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalLightBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemShovelCrystalLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalRed.json new file mode 100644 index 000000000..bdba83a91 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemShovelCrystalRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalWhite.json new file mode 100644 index 000000000..28d29b841 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemShovelCrystalWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemShovelCrystalWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemShovelEmerald.json b/src/main/resources/assets/actuallyadditions/models/item/itemShovelEmerald.json new file mode 100644 index 000000000..f20613711 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemShovelEmerald.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemShovelEmerald" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemShovelObsidian.json b/src/main/resources/assets/actuallyadditions/models/item/itemShovelObsidian.json new file mode 100644 index 000000000..46fc160b3 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemShovelObsidian.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemShovelObsidian" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemShovelQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemShovelQuartz.json new file mode 100644 index 000000000..f4d64c458 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemShovelQuartz.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeQuartz" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalBlack.json b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalBlack.json new file mode 100644 index 000000000..b72ce7100 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalBlack.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemSwordCrystalBlack" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalBlue.json new file mode 100644 index 000000000..3db1d6962 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemSwordCrystalBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalGreen.json b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalGreen.json new file mode 100644 index 000000000..dacd56119 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalGreen.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemSwordCrystalGreen" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalLightBlue.json b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalLightBlue.json new file mode 100644 index 000000000..5145fb179 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalLightBlue.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemSwordCrystalLightBlue" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalRed.json b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalRed.json new file mode 100644 index 000000000..6c05bcefc --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalRed.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemSwordCrystalRed" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalWhite.json b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalWhite.json new file mode 100644 index 000000000..1aae51b75 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSwordCrystalWhite.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemSwordCrystalWhite" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSwordEmerald.json b/src/main/resources/assets/actuallyadditions/models/item/itemSwordEmerald.json new file mode 100644 index 000000000..78805d798 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSwordEmerald.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemSwordEmerald" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSwordObsidian.json b/src/main/resources/assets/actuallyadditions/models/item/itemSwordObsidian.json new file mode 100644 index 000000000..bd1439eb6 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSwordObsidian.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemSwordObsidian" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSwordQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemSwordQuartz.json new file mode 100644 index 000000000..f4d64c458 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSwordQuartz.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "actuallyadditions:items/itemAxeQuartz" + }, + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalBlack.png b/src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalBlack.png new file mode 100644 index 0000000000000000000000000000000000000000..d14b1400d23edacdad0c8b17c0a3583e8c493b64 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=G_YAk0{w5<>&kwgn_1XO(|FOrnLr_l64!{5;QX|b^2DN4hJwV*yb`^< z)Di^~Jp(6aGFBV+r;n6dSI-?WE+W70L zg9~%RgXilUUDTAK7d7Z#ecH8~!8rfpjX;Oc#Yy)z-!c82(6VmEgA?XqkJol^*d6?R rb@{67Z_OO*UfIm;zVI;F{(#=zzezQ7|CaItZDjCt^>bP0l+XkKHVj$l literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalBlue.png b/src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalBlue.png new file mode 100644 index 0000000000000000000000000000000000000000..24e9ab0e7078eb5eaaac5183f432d951ae24bbff GIT binary patch literal 781 zcmV+o1M>WdP)rWa%6vg>3Y^ubF zB8s92h&*;#c6oz{im8v*N3D(8HtpYR`lU(Jf{Ja@27W!mrU^;=;bdlK=bn4+xpxA= z(jCFd9W&l%g7z0e`L9Im9!u7})_cP41CiQ*HSd9h(_^dhh}9V2?))H9yeE)qf2Vs2 z?L%nnK)tH9B9yfkDnhLeO`X?DP4Qin4td;K~))QwokOJtSzZA0{4$r#Kg`aVHhmrS4uDyG59_!yHI zCHij&OmJ!)5+X2&WTjxE)Tg8R>IGQSp+R0UtrXaXEDt3qDoeg0E$GbNgskpFvQiMs zePh=c=M2X|1}SCACMHOfy^t8;s07QDAr;1l`HUgR_BfRL?V2C(SH&bY6cCS&*j$l` zsy!ZsuuPoW6v4XF=V%vB_I!fNx}7G0jNOQwi=~e;jaq?!%}s zFu|rQQ{GWmt<*536&$sPgzewVt7|h=m5^)pIhKiss{2KIG~OH8#tW0Rv+ci+r0R}J z_M)($0SoE-dF_EfLUkBpYC0(ChbNTH-tixfE2*}=SA~!UYC1pSS$@crJz`2z99YRc zv78;SoExxYU=4^^kA$6{gzP64ih8!*FG6~ea|R8yP-X_DEZBiRa6f!>3s4CU00000 LNkvXXu0mjfh=N}M literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalGreen.png b/src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalGreen.png new file mode 100644 index 0000000000000000000000000000000000000000..6d7ae57a6c58bbd5d09148e49981523b588bc729 GIT binary patch literal 864 zcmV-m1E2hfP)5Rs;qSH}YlfC!x%{uMaX+ONP zvwP<}_kGVf>$uM^5R=>&7Z`pyK;*X}+>VFmkKy`JqHjl-_OmTnyEsLX$FET&KkX>lC<2p4wMHs*~Y1kN&0k zpv^+CL#emJqEzm`3p&dhS-VW4S0>smGT>hlz|Z~%P%yW-#qV@V}66<@NGJ{!BC28PFd1S2g8Bwd-LBsPhvwyH8bpS+ctJr?Xp-VU^lTBe{%`tuy|zfweBDMGhPHJMAM z3k(rd1_-r4OABqG@~+6-{)lbgmc?Z+Dr`iJFEa~LTI#poez!Q|vVC~MZ8_)Zx#yl6 zT8O{HLgFnJ6YsIK`2owxLqxOR5X+tL_ZX4f5hBtN*0%>p%0pz75hU#tvT=?m{|hAw zUt#xdVRdg|wkEK495RJjBQ_Dw%_*$9%e9LN-)okGlIhF^oB3nx@B4pY7)&sk%pi-w zR?UG~b)g$BikbtdI7UVqVmy6!NzVA~$ccClTW1Sq--m6RwHWtX`nz0AGq zQ+~jKN)*P4Mu!sFBiL+Ar7{VU1j4Q`_(4KcWde<5D~f}H%0BQpvUN-WEzPEfDkUP} zPZf`mi6oC9%PhS(g_NHlvpq&Q%^qyJV+( z8;xmzShqWVfcWYT?}2Ia6w1GlD&1g1xkf^{LYzFwP>{?I=Zz7=VmK&UoC(goxHN(? zFO*hg=d~LqT_Y@=VkI}ivNXct%Z~`HbCHmK1jME9Sd)f`kyWlExdC2qy_O$gRl7h` nyF^sKM7VU0=jthz)e(LJXbBooxB6#N00000NkvXXu0mjf^#)-} literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalRed.png b/src/main/resources/assets/actuallyadditions/textures/blocks/blockCrystalRed.png new file mode 100644 index 0000000000000000000000000000000000000000..a4ea4dd4c1e674b07d5369f1ecd27c958007614a GIT binary patch literal 777 zcmV+k1NQuhP)E7B(Y0DxzrLvW>lx>hLC}7+*E;0I76TcXZwAiZg=edp=jD9$I^WMCB?z!jQ8Q)oV zp0n;E@4EVU-<9S=D9(8#MKcno=_L3Z&eC=YTx4>b=W|>P6lskP)1DgF`!v2!{bS&+ zLVW>NXJC6;n1royVFK2LO`W+@T6I<*h3XJ2lztK9i}2L_8(TL-G9u{mjtE>4+I~fM z=W;L>gTWq}on81EeT9Ds)&`VWS&Yb4R#zl7-J8uoB`qYO9HY@45P>OhRfYvxP%RJ3 z{mP~Q+nWj_F#-!Nr(jA1Lep{ZHFFBMC5aoulBO4i#jNVQF7(M4saYG;TJngObY}17 zvoxFtzK>b4?wUa&_!%UWb*2k{NK8#t`vsLSZ)He@d}#JWWnxAd?<~TeoVI}9DlTJE z0h1A!7G`9iJ(of>f?;`(y#^;sa9Z;S9&i1h Date: Sun, 10 Jan 2016 17:00:07 +0100 Subject: [PATCH 32/58] More JSONs --- .../blockstates/blockLaserRelay.json | 10 + .../blockstates/blockPhantomBooster.json | 5 + .../models/block/blockLaserRelay.json | 880 +++++++++++++++ .../block/blockLaserRelayWithWindow.json | 999 ++++++++++++++++++ .../models/block/blockPhantomBooster.json | 460 ++++++++ .../models/item/blockLaserRelay.json | 10 + .../models/item/blockPhantomBooster.json | 10 + .../blocks/models/modelLaserRelay.png | Bin 385 -> 233 bytes .../blocks/models/modelPhantomBooster.png | Bin 343 -> 175 bytes 9 files changed, 2374 insertions(+) create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockLaserRelay.json create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockPhantomBooster.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockLaserRelay.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockLaserRelayWithWindow.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockPhantomBooster.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockLaserRelay.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockPhantomBooster.json diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockLaserRelay.json b/src/main/resources/assets/actuallyadditions/blockstates/blockLaserRelay.json new file mode 100644 index 000000000..d5417dfcb --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockLaserRelay.json @@ -0,0 +1,10 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockLaserRelay", "x": 180 }, + "meta=1": { "model": "actuallyadditions:blockLaserRelay"}, + "meta=2": { "model": "actuallyadditions:blockLaserRelay", "x": 90 }, + "meta=3": { "model": "actuallyadditions:blockLaserRelay", "x": 270 }, + "meta=4": { "model": "actuallyadditions:blockLaserRelay", "x": 90, "y": 270 }, + "meta=5": { "model": "actuallyadditions:blockLaserRelay", "x": 90, "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomBooster.json b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomBooster.json new file mode 100644 index 000000000..a7ba983ed --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockPhantomBooster.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "actuallyadditions:blockPhantomBooster"} + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelay.json b/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelay.json new file mode 100644 index 000000000..1911382be --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelay.json @@ -0,0 +1,880 @@ +{ + "__createdBy": "canitzp", + "ambientocclusion": false, + "textures": { + "particle": "actuallyadditions:blocks/models/modelLaserRelay", + "laserRelay": "actuallyadditions:blocks/models/modelLaserRelay" + }, + "elements": [ + { + "from": [4,0,4], + "to": [12,1,12], + "faces": { + "up": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,1,3], + "to": [12,4,4], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,1,12], + "to": [12,4,13], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,11,12], + "to": [12,14,13], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,11,3], + "to": [12,14,4], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,4,2], + "to": [12,5,3], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,10,2], + "to": [12,11,3], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,10,13], + "to": [12,11,14], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,4,13], + "to": [12,5,14], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [5.5,1,5.5], + "to": [10.5,3,10.5], + "faces": { + "up": { + "uv": [13.5,13.5,16,16], + "texture": "#laserRelay" + }, + "down": { + "uv": [0.0,0.0,5.0,5.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + } + } + }, + { + "from": [7,3,7], + "to": [9,14,9], + "faces": { + "up": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "west": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "east": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "north": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "south": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,14,4], + "to": [12,15,12], + "faces": { + "up": { + "uv": [1,12,5,15], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [6.5,6.5,6.5], + "to": [9.5,9.5,9.5], + "faces": { + "up": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "down": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "west": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "east": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "north": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "south": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,5,2], + "to": [5,10,3], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [11,5,2], + "to": [12,10,3], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [11,5,13], + "to": [12,10,14], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,5,13], + "to": [5,10,14], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [3,1,4], + "to": [4,4,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [12,1,4], + "to": [13,4,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [12,11,4], + "to": [13,14,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [3,11,4], + "to": [4,14,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,4,4], + "to": [3,5,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,10,4], + "to": [3,11,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,10,4], + "to": [14,11,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,4,4], + "to": [14,5,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,5,4], + "to": [3,10,5], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,5,11], + "to": [3,10,12], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,5,11], + "to": [14,10,12], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,5,4], + "to": [14,10,5], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelayWithWindow.json b/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelayWithWindow.json new file mode 100644 index 000000000..b933ad9c0 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelayWithWindow.json @@ -0,0 +1,999 @@ +{ + "__createdwith": "opl's Model Creator", + "ambientocclusion": false, + "textures": { + "laserRelay": "actuallyadditions:blocks/models/modelLaserRelay" + }, + "elements": [ + { + "from": [4,0,4], + "to": [12,1,12], + "faces": { + "up": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,1,3], + "to": [12,4,4], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,1,12], + "to": [12,4,13], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,11,12], + "to": [12,14,13], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,11,3], + "to": [12,14,4], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,4,2], + "to": [12,5,3], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,10,2], + "to": [12,11,3], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,10,13], + "to": [12,11,14], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,4,13], + "to": [12,5,14], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [5.5,1,5.5], + "to": [10.5,3,10.5], + "faces": { + "up": { + "uv": [13.5,13.5,16,16], + "texture": "#laserRelay" + }, + "down": { + "uv": [0.0,0.0,5.0,5.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + } + } + }, + { + "from": [7,3,7], + "to": [9,14,9], + "faces": { + "up": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "west": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "east": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "north": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "south": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,14,4], + "to": [12,15,12], + "faces": { + "up": { + "uv": [1,12,5,15], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [6.5,6.5,6.5], + "to": [9.5,9.5,9.5], + "faces": { + "up": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "down": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "west": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "east": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "north": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "south": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,5,2], + "to": [5,10,3], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [11,5,2], + "to": [12,10,3], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [11,5,13], + "to": [12,10,14], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,5,13], + "to": [5,10,14], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [5,5,2], + "to": [11,10,3], + "faces": { + "up": { + "uv": [0.0,0.0,6.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,6.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0.0,0.0,1.0,5.0], + "texture": "missingtexture" + }, + "east": { + "uv": [0.0,0.0,1.0,5.0], + "texture": "missingtexture" + }, + "north": { + "uv": [12.5,8,15.5,10.5], + "texture": "#laserRelay" + }, + "south": { + "uv": [12.5,8,15.5,10.5], + "texture": "#laserRelay" + } + } + }, + { + "from": [5,5,13], + "to": [11,10,14], + "faces": { + "up": { + "uv": [0.0,0.0,6.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,6.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0.0,0.0,1.0,5.0], + "texture": "missingtexture" + }, + "east": { + "uv": [0.0,0.0,1.0,5.0], + "texture": "missingtexture" + }, + "north": { + "uv": [12.5,8,15.5,10.5], + "texture": "#laserRelay" + }, + "south": { + "uv": [12.5,8,15.5,10.5], + "texture": "#laserRelay" + } + } + }, + { + "from": [3,1,4], + "to": [4,4,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [12,1,4], + "to": [13,4,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [12,11,4], + "to": [13,14,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [3,11,4], + "to": [4,14,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,4,4], + "to": [3,5,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,10,4], + "to": [3,11,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,10,4], + "to": [14,11,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,4,4], + "to": [14,5,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,5,4], + "to": [3,10,5], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,5,11], + "to": [3,10,12], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,5,11], + "to": [14,10,12], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,5,4], + "to": [14,10,5], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,5,5], + "to": [3,10,11], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,6.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,6.0], + "texture": "missingtexture" + }, + "west": { + "uv": [12.5,8,15.5,10.5], + "texture": "#laserRelay" + }, + "east": { + "uv": [12.5,8,15.5,10.5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0.0,0.0,1.0,5.0], + "texture": "missingtexture" + }, + "south": { + "uv": [0.0,0.0,1.0,5.0], + "texture": "missingtexture" + } + } + }, + { + "from": [13,5,5], + "to": [14,10,11], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,6.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,6.0], + "texture": "missingtexture" + }, + "west": { + "uv": [12.5,8,15.5,10.5], + "texture": "#laserRelay" + }, + "east": { + "uv": [12.5,8,15.5,10.5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0.0,0.0,1.0,5.0], + "texture": "missingtexture" + }, + "south": { + "uv": [0.0,0.0,1.0,5.0], + "texture": "missingtexture" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockPhantomBooster.json b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomBooster.json new file mode 100644 index 000000000..3031ebb9d --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockPhantomBooster.json @@ -0,0 +1,460 @@ +{ + "__createdBy": "canitzp", + "ambientocclusion": false, + "textures": { + "particle": "actuallyadditions:blocks/models/modelPhantomBooster", + "phantomBooster": "actuallyadditions:blocks/models/modelPhantomBooster" + }, + "elements": [ + { + "from": [6,0,6], + "to": [10,16,10], + "faces": { + "up": { + "uv": [4,0,8,4], + "texture": "#phantomBooster" + }, + "down": { + "uv": [4,0,8,4], + "texture": "#phantomBooster" + }, + "west": { + "uv": [0,0,4,16], + "texture": "#phantomBooster" + }, + "east": { + "uv": [0,0,4,16], + "texture": "#phantomBooster" + }, + "north": { + "uv": [0,0,4,16], + "texture": "#phantomBooster" + }, + "south": { + "uv": [0,0,4,16], + "texture": "#phantomBooster" + } + } + }, + { + "from": [5,1,5], + "to": [11,2,11], + "faces": { + "up": { + "uv": [10,0,16,6], + "texture": "#phantomBooster" + }, + "down": { + "uv": [10,0,16,6], + "texture": "#phantomBooster" + }, + "west": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "east": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "north": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "south": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + } + } + }, + { + "from": [5,2,4], + "to": [11,4,5], + "faces": { + "up": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "down": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "west": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "east": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "north": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "south": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + } + } + }, + { + "from": [5,2,11], + "to": [11,4,12], + "faces": { + "up": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "down": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "west": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "east": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "north": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "south": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + } + } + }, + { + "from": [4,2,5], + "to": [5,4,11], + "faces": { + "up": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "down": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "west": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "east": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "north": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "south": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + } + } + }, + { + "from": [11,2,5], + "to": [12,4,11], + "faces": { + "up": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "down": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "west": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "east": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "north": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "south": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + } + } + }, + { + "from": [5,4,3], + "to": [11,12,4], + "faces": { + "up": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "down": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "west": { + "uv": [15,0,16,8], + "texture": "#phantomBooster" + }, + "east": { + "uv": [15,0,16,8], + "texture": "#phantomBooster" + }, + "north": { + "uv": [10,0,16,8], + "texture": "#phantomBooster" + }, + "south": { + "uv": [10,0,16,8], + "texture": "#phantomBooster" + } + } + }, + { + "from": [5,4,12], + "to": [11,12,13], + "faces": { + "up": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "down": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "west": { + "uv": [15,0,16,8], + "texture": "#phantomBooster" + }, + "east": { + "uv": [15,0,16,8], + "texture": "#phantomBooster" + }, + "north": { + "uv": [10,0,16,8], + "texture": "#phantomBooster" + }, + "south": { + "uv": [10,0,16,8], + "texture": "#phantomBooster" + } + } + }, + { + "from": [3,4,5], + "to": [4,12,11], + "faces": { + "up": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "down": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "west": { + "uv": [10,0,16,8], + "texture": "#phantomBooster" + }, + "east": { + "uv": [10,0,16,8], + "texture": "#phantomBooster" + }, + "north": { + "uv": [15,0,16,8], + "texture": "#phantomBooster" + }, + "south": { + "uv": [15,0,16,8], + "texture": "#phantomBooster" + } + } + }, + { + "from": [12,4,5], + "to": [13,12,11], + "faces": { + "up": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "down": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "west": { + "uv": [10,0,16,8], + "texture": "#phantomBooster" + }, + "east": { + "uv": [10,0,16,8], + "texture": "#phantomBooster" + }, + "north": { + "uv": [15,0,16,8], + "texture": "#phantomBooster" + }, + "south": { + "uv": [15,0,16,8], + "texture": "#phantomBooster" + } + } + }, + { + "from": [11,12,5], + "to": [12,14,11], + "faces": { + "up": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "down": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "west": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "east": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "north": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "south": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + } + } + }, + { + "from": [4,12,5], + "to": [5,14,11], + "faces": { + "up": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "down": { + "uv": [15,0,16,6], + "texture": "#phantomBooster" + }, + "west": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "east": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "north": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "south": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + } + } + }, + { + "from": [5,12,11], + "to": [11,14,12], + "faces": { + "up": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "down": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "west": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "east": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "north": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "south": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + } + } + }, + { + "from": [5,12,4], + "to": [11,14,5], + "faces": { + "up": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "down": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "west": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "east": { + "uv": [15,0,16,2], + "texture": "#phantomBooster" + }, + "north": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + }, + "south": { + "uv": [10,0,16,2], + "texture": "#phantomBooster" + } + } + }, + { + "from": [5,14,5], + "to": [11,15,11], + "faces": { + "up": { + "uv": [10,0,16,6], + "texture": "#phantomBooster" + }, + "down": { + "uv": [10,0,16,6], + "texture": "#phantomBooster" + }, + "west": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "east": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "north": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + }, + "south": { + "uv": [10,0,16,1], + "texture": "#phantomBooster" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockLaserRelay.json b/src/main/resources/assets/actuallyadditions/models/item/blockLaserRelay.json new file mode 100644 index 000000000..914b5d169 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockLaserRelay.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockLaserRelay", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockPhantomBooster.json b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomBooster.json new file mode 100644 index 000000000..705390fc8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockPhantomBooster.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockPhantomBooster", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelay.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelay.png index 96135d6b80fff65de92a1e533101bb607881fe80..f6c3976c8832d6a37b5bf2573beaa377522df15a 100644 GIT binary patch delta 195 zcmZoERLtq!mDzgAGU)S5YCV;lgdF(-$=)N)N1Hc9S)D#b9#4jVmT||U stQ#qZH+$4NCo3<$I7zbL!DdB<%tERLtq#Zz*gAGWo$}GG$QPH6OK9>-`GWTBVENcb^ zMm|p$$B>F!Z?9eCJY*oy@X-4u+qwnZF7xLc6m5BwptPgu0bA38nJ$GbzZAr}CLS}p zIOEU#;0sj?KfWvSvdUPSEqOp<@vlGUO7E}xk+m`B=*sfj*FG*&9aV$!;LrOdYBQu*TFSD)Mnf4G=so?*?gU$516 z+{;PZc0N3`^w*P_IeCo^%zeR{Q}^#_S~Q!PFW>69&BNPDzdZwfo?(cW{WCjtr4gSj nv-7K`6KXkA>Vctx0vr~-YY7OM5j*8`Fi70f)z4*}Q$iB}zWJ8q diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelPhantomBooster.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelPhantomBooster.png index cd01ff0ab4d941c6d76e8a62b6605677cfd4517f..714dbcea74e1bf64ef5d3994e3adbdf5c4c9564e 100644 GIT binary patch delta 136 zcmcc4w4PD1Gr-TCmrII^fq{Y7)59eQNDF{42OE%-|NK93qM||E14b@B1D+6NeHEaf zji-xah{fsTlrNos&o{73*zNA}pVipe=yX8h#{>H=ZnGyxE?#HVS@LVq>Y91I^k_)m-WZ9N7whr!d;&t;ucLK6U5IV|P? literal 343 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSY)RhkE)4%caKYZ?lYt_f1s;*b z3=DjSL74G){)!Z!AbW|YuPgg~Hf|wdvA-!_)qp}zJY5_^DsH{KwUPIbfdFfOyiyWx z+6fsG9tPnJqRbPTERC467lQIEb#JgtAaGh`4=h#O+*wh=q^#2FTjO2-z zdi7%64Yc?hc%v#9WWICPv+gNoJyV+dK(d3c0RkBm7&sW14opc;D7Tt*XcBY4r{nxU d_mU2@zA${NG%ex`C^`qy?CI*~vd$@?2>`tuXV(A# From ed833be2894c5775065a9ef25c46216d4acf6365 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 10 Jan 2016 19:32:21 +0100 Subject: [PATCH 33/58] Finished 1.8.9 port for the most part. Some stuff to fix yet though. --- .../mod/ActuallyAdditions.java | 4 +- .../mod/blocks/BlockBookletStand.java | 137 ------ .../mod/blocks/BlockFurnaceSolar.java | 2 +- .../mod/blocks/BlockSmileyCloud.java | 14 +- .../mod/blocks/InitBlocks.java | 2 - .../mod/blocks/base/BlockContainerBase.java | 1 - .../mod/booklet/GuiBookletStand.java | 71 --- .../mod/booklet/InitBooklet.java | 1 - .../mod/crafting/BlockCrafting.java | 5 - .../mod/crafting/ItemCrafting.java | 2 +- .../mod/creative/CreativeTab.java | 1 - .../mod/inventory/GuiHandler.java | 4 - .../mod/items/ItemWaterRemovalRing.java | 31 +- .../mod/network/PacketBookletStandButton.java | 109 ----- .../mod/network/PacketHandler.java | 1 - .../mod/tile/TileEntityBase.java | 1 - .../mod/tile/TileEntityBookletStand.java | 41 -- .../mod/tile/TileEntityInventoryBase.java | 2 +- .../actuallyadditions/mod/util/AssetUtil.java | 1 - .../blockstates/blockSmileyCloud.json | 8 + .../assets/actuallyadditions/lang/en_US.lang | 5 - .../models/block/blockSmileyCloud.json | 411 ++++++++++++++++++ .../models/item/blockSmileyCloud.json | 10 + .../blocks/models/modelBookletStand.png | Bin 575 -> 0 bytes 24 files changed, 456 insertions(+), 408 deletions(-) delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBookletStand.java create mode 100644 src/main/resources/assets/actuallyadditions/blockstates/blockSmileyCloud.json create mode 100644 src/main/resources/assets/actuallyadditions/models/block/blockSmileyCloud.json create mode 100644 src/main/resources/assets/actuallyadditions/models/item/blockSmileyCloud.json delete mode 100644 src/main/resources/assets/actuallyadditions/textures/blocks/models/modelBookletStand.png diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java index 7210477e1..3df0cc7b9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java @@ -133,10 +133,10 @@ public class ActuallyAdditions{ @EventHandler public void missingMapping(FMLMissingMappingsEvent event){ - for(FMLMissingMappingsEvent.MissingMapping mapping : event.get()){ + for(FMLMissingMappingsEvent.MissingMapping mapping : event.getAll()){ //Ignore removal of foreign paxels if(mapping.name != null && mapping.name.toLowerCase(Locale.ROOT).startsWith(ModUtil.MOD_ID_LOWER+":")){ - if(mapping.name.contains("paxel") || mapping.name.contains("itemSpecial")){ + if(mapping.name.contains("paxel") || mapping.name.contains("itemSpecial") || mapping.name.contains("blockBookStand")){ mapping.ignore(); ModUtil.LOGGER.info("Missing Mapping "+mapping.name+" is getting ignored. This is intentional."); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java deleted file mode 100644 index fcf7c5a4f..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBookletStand.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * This file ("BlockBookletStand.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks; - -import de.ellpeck.actuallyadditions.api.block.IHudDisplay; -import de.ellpeck.actuallyadditions.api.internal.EntrySet; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; -import de.ellpeck.actuallyadditions.mod.items.InitItems; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBookletStand; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import de.ellpeck.actuallyadditions.mod.util.PosUtil; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyInteger; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.profiler.Profiler; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.*; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class BlockBookletStand extends BlockContainerBase implements IHudDisplay{ - - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); - - public BlockBookletStand(String name){ - super(Material.wood, name); - this.setHarvestLevel("axe", 0); - this.setHardness(1.0F); - this.setResistance(4.0F); - this.setStepSound(soundTypeWood); - - float f = 1/16F; - this.setBlockBounds(f, 0F, f, 1F-f, 1F-4*f, 1F-f); - } - - @Override - protected PropertyInteger getMetaProperty(){ - return META; - } - - @Override - public boolean isOpaqueCube(){ - return false; - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BOOK_STAND.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - return true; - } - - @Override - public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.RARE; - } - - @Override - public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ - int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - - if(rotation == 0){ - PosUtil.setMetadata(pos, world, 2, 2); - } - if(rotation == 1){ - PosUtil.setMetadata(pos, world, 1, 2); - } - if(rotation == 2){ - PosUtil.setMetadata(pos, world, 0, 2); - } - if(rotation == 3){ - PosUtil.setMetadata(pos, world, 3, 2); - } - - TileEntityBookletStand tile = (TileEntityBookletStand)world.getTileEntity(pos); - if(tile != null){ - //Assign a UUID - if(tile.assignedPlayer == null){ - tile.assignedPlayer = player.getName(); - tile.markDirty(); - tile.sendUpdate(); - } - } - - super.onBlockPlacedBy(world, pos, state, player, stack); - } - - @Override - public TileEntity createNewTileEntity(World world, int i){ - return new TileEntityBookletStand(); - } - - @Override - @SideOnly(Side.CLIENT) - public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, MovingObjectPosition posHit, Profiler profiler, ScaledResolution resolution){ - TileEntity tile = minecraft.theWorld.getTileEntity(posHit.getBlockPos()); - if(tile instanceof TileEntityBookletStand){ - EntrySet set = ((TileEntityBookletStand)tile).assignedEntry; - - String strg1; - String strg2; - if(set.entry == null){ - strg1 = "No entry saved! Save one if"; - strg2 = "you are the player who placed it!"; - } - else if(set.chapter == null){ - strg1 = set.entry.getLocalizedName(); - strg2 = "Page "+set.pageInIndex; - } - else{ - strg1 = set.chapter.getLocalizedName(); - strg2 = "Page "+set.page.getID(); - - AssetUtil.renderStackToGui(set.chapter.getDisplayItemStack() != null ? set.chapter.getDisplayItemStack() : new ItemStack(InitItems.itemBooklet), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+10, 1F); - } - minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg1, resolution.getScaledWidth()/2+25, resolution.getScaledHeight()/2+8, StringUtil.DECIMAL_COLOR_WHITE); - minecraft.fontRendererObj.drawStringWithShadow(EnumChatFormatting.YELLOW+""+EnumChatFormatting.ITALIC+strg2, resolution.getScaledWidth()/2+25, resolution.getScaledHeight()/2+18, StringUtil.DECIMAL_COLOR_WHITE); - } - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java index 27b1e48da..a6831a0d3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceSolar.java @@ -26,7 +26,7 @@ public class BlockFurnaceSolar extends BlockContainerBase{ this.setHardness(1.5F); this.setResistance(10.0F); this.setStepSound(soundTypeStone); - this.setBlockBounds(0F, 0F, 0F, 1F, 3F/16F, 1F); + this.setBlockBounds(0F, 0F, 0F, 1F, 6F/16F, 1F); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java index 7f2b2c829..3c5f2d85f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java @@ -129,17 +129,17 @@ public class BlockSmileyCloud extends BlockContainerBase{ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; if(rotation == 0){ - PosUtil.setMetadata(pos, world, 2, 2); - } - if(rotation == 1){ - PosUtil.setMetadata(pos, world, 1, 2); - } - if(rotation == 2){ PosUtil.setMetadata(pos, world, 0, 2); } - if(rotation == 3){ + if(rotation == 1){ PosUtil.setMetadata(pos, world, 3, 2); } + if(rotation == 2){ + PosUtil.setMetadata(pos, world, 1, 2); + } + if(rotation == 3){ + PosUtil.setMetadata(pos, world, 2, 2); + } super.onBlockPlacedBy(world, pos, state, player, stack); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java index 54f252f67..358e51ba8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java @@ -108,7 +108,6 @@ public class InitBlocks{ public static Block blockCrystal; public static Block blockAtomicReconstructor; - public static Block blockBookletStand; public static Block blockMiner; public static Block blockFireworkBox; @@ -128,7 +127,6 @@ public class InitBlocks{ blockFireworkBox = new BlockFireworkBox("blockFireworkBox"); blockMiner = new BlockMiner("blockMiner"); - blockBookletStand = new BlockBookletStand("blockBookStand"); blockAtomicReconstructor = new BlockAtomicReconstructor("blockAtomicReconstructor"); blockCrystal = new BlockCrystal("blockCrystal"); blockBlackLotus = new BlockBlackLotus("blockBlackLotus"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index f2c3b0ac4..2090ac41c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -115,7 +115,6 @@ public abstract class BlockContainerBase extends BlockContainer{ entityItem.motionZ = Util.RANDOM.nextGaussian()*factor; world.spawnEntityInWorld(entityItem); } - tile.setInventorySlotContents(i, null); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java deleted file mode 100644 index 07c5ad3e4..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * This file ("GuiBookletStand.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.booklet; - -import de.ellpeck.actuallyadditions.mod.network.PacketBookletStandButton; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBookletStand; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.Objects; - -@SideOnly(Side.CLIENT) -public class GuiBookletStand extends GuiBooklet{ - - private GuiButton buttonSetPage; - - private TileEntityBookletStand theStand; - - public GuiBookletStand(TileEntityBase theStand){ - super(null, false, false); - this.theStand = (TileEntityBookletStand)theStand; - } - - @Override - public void actionPerformed(GuiButton button){ - if(button == this.buttonSetPage){ - PacketHandler.theNetwork.sendToServer(new PacketBookletStandButton(this.theStand.getPos().getX(), this.theStand.getPos().getY(), this.theStand.getPos().getZ(), this.theStand.getWorld(), Minecraft.getMinecraft().thePlayer, this.currentEntrySet)); - } - super.actionPerformed(button); - } - - @SuppressWarnings("unchecked") - @Override - public void initGui(){ - super.initGui(); - - //Remove Bookmark Buttons - for(GuiButton bookmarkButton : this.bookmarkButtons){ - bookmarkButton.visible = false; - } - - this.buttonSetPage = new GuiButton(-100, this.guiLeft+this.xSize+10, this.guiTop+10, 100, 20, "Set Page"){ - @Override - public void drawButton(Minecraft mc, int x, int y){ - boolean unicodeBefore = mc.fontRendererObj.getUnicodeFlag(); - mc.fontRendererObj.setUnicodeFlag(false); - super.drawButton(mc, x, y); - mc.fontRendererObj.setUnicodeFlag(unicodeBefore); - } - }; - this.buttonList.add(this.buttonSetPage); - - this.buttonSetPage.visible = Objects.equals(Minecraft.getMinecraft().thePlayer.getName(), this.theStand.assignedPlayer); - - //Open the pages the book was assigned - BookletUtils.openIndexEntry(this, this.theStand.assignedEntry.entry, this.theStand.assignedEntry.pageInIndex, true); - BookletUtils.openChapter(this, this.theStand.assignedEntry.chapter, this.theStand.assignedEntry.page); - } -} \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index 06d0a3333..42445c6a5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -73,7 +73,6 @@ public class InitBooklet{ //Miscellaneous new BookletChapter("reconstructorLenses", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLens).setNoText(), new PageReconstructor(3, LensNoneRecipeHandler.recipeColorLens), new PageReconstructor(4, LensNoneRecipeHandler.recipeExplosionLens), new PageReconstructor(5, LensNoneRecipeHandler.recipeDamageLens), new PageReconstructor(6, LensNoneRecipeHandler.recipeSoulSand).setNoText(), new PageReconstructor(7, LensNoneRecipeHandler.recipeLeather).setNoText()).setImportant(); new BookletChapter("miscDecorStuffsAndThings", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, LensNoneRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensNoneRecipeHandler.recipeGreenWall).setNoText()); - new BookletChapter("bookStand", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockBookletStand), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBookStand).setPageStacksWildcard()); new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("", OreGen.QUARTZ_MIN).addTextReplacement("", OreGen.QUARTZ_MAX), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText()); new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setNoText().setPageStacksWildcard()).setSpecial().setIncomplete(); new BookletChapter("coalStuff", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java index 1e92a2ba2..43ec404e7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java @@ -78,16 +78,11 @@ public class BlockCrafting{ public static IRecipe recipeRangedCollector; public static IRecipe recipeLaserRelay; public static IRecipe recipeAtomicReconstructor; - public static IRecipe recipeBookStand; public static IRecipe recipeMiner; public static IRecipe recipeFireworkBox; public static void init(){ - //Book Stand - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockBookletStand), new ItemStack(InitItems.itemBooklet), "plankWood")); - recipeBookStand = Util.GetRecipes.lastIRecipe(); - //Firework Box if(ConfigCrafting.FIREWORK_BOX.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFireworkBox), diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java index 1ab666667..29b70ebd4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java @@ -320,7 +320,7 @@ public class ItemCrafting{ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWaterRemovalRing), "BIB", "IOI", "BIB", 'B', new ItemStack(Items.water_bucket), - 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), + 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()))); recipeWaterRing = Util.GetRecipes.lastIRecipe(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java b/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java index 19370cc0f..1c0dc34f6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java @@ -49,7 +49,6 @@ public class CreativeTab extends CreativeTabs{ add(InitItems.itemBooklet); add(InitBlocks.blockSmileyCloud); - add(InitBlocks.blockBookletStand); add(InitBlocks.blockFireworkBox); add(InitBlocks.blockLaserRelay); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java index 6f5180775..3ce88f5d0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; -import de.ellpeck.actuallyadditions.mod.booklet.GuiBookletStand; import de.ellpeck.actuallyadditions.mod.inventory.gui.*; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -148,8 +147,6 @@ public class GuiHandler implements IGuiHandler{ return new GuiSmileyCloud(tile, x, y, z, world); case BOOK: return new GuiBooklet(null, true, true); - case BOOK_STAND: - return new GuiBookletStand(tile); case DIRECTIONAL_BREAKER: return new GuiDirectionalBreaker(entityPlayer.inventory, tile); case RANGED_COLLECTOR: @@ -186,7 +183,6 @@ public class GuiHandler implements IGuiHandler{ XP_SOLIDIFIER, CLOUD, BOOK(false), - BOOK_STAND, DIRECTIONAL_BREAKER, RANGED_COLLECTOR, MINER; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java index 2678bc041..4609a552b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java @@ -38,7 +38,7 @@ public class ItemWaterRemovalRing extends ItemEnergy{ EntityPlayer player = (EntityPlayer)entity; ItemStack equipped = player.getCurrentEquippedItem(); - int energyUse = 30; + int energyUse = 350; if(equipped != null && equipped == stack && this.getEnergyStored(stack) >= energyUse){ //Setting everything to air @@ -49,24 +49,23 @@ public class ItemWaterRemovalRing extends ItemEnergy{ int theX = MathHelper.floor_double(player.posX+x); int theY = MathHelper.floor_double(player.posY+y); int theZ = MathHelper.floor_double(player.posZ+z); - if(this.getEnergyStored(stack) >= energyUse){ - //Remove Water - BlockPos pos = new BlockPos(theX, theY, theZ); - Block block = PosUtil.getBlock(pos, world); - if(block == Blocks.water || block == Blocks.flowing_water){ - world.setBlockToAir(pos); - if(!player.capabilities.isCreativeMode){ - this.extractEnergy(stack, energyUse, false); - } + //Remove Water + BlockPos pos = new BlockPos(theX, theY, theZ); + Block block = PosUtil.getBlock(pos, world); + if((block == Blocks.water || block == Blocks.flowing_water) && this.getEnergyStored(stack) >= energyUse){ + world.setBlockToAir(pos); + + if(!player.capabilities.isCreativeMode){ + this.extractEnergy(stack, energyUse, false); } - //Remove Lava - else if(block == Blocks.lava || block == Blocks.flowing_lava){ - world.setBlockToAir(pos); + } + //Remove Lava + else if((block == Blocks.lava || block == Blocks.flowing_lava) && this.getEnergyStored(stack) >= energyUse*2){ + world.setBlockToAir(pos); - if(!player.capabilities.isCreativeMode){ - this.extractEnergy(stack, energyUse*2, false); - } + if(!player.capabilities.isCreativeMode){ + this.extractEnergy(stack, energyUse*2, false); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java deleted file mode 100644 index ab30f892a..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketBookletStandButton.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * This file ("PacketBookletStandButton.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.network; - -import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import de.ellpeck.actuallyadditions.api.internal.EntrySet; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBookletStand; -import io.netty.buffer.ByteBuf; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; - -import java.util.Objects; - -public class PacketBookletStandButton implements IMessage{ - - private int tileX; - private int tileY; - private int tileZ; - private int worldID; - private int playerID; - - private int entryID; - private int chapterID; - private int pageID; - private int pageInIndex; - - @SuppressWarnings("unused") - public PacketBookletStandButton(){ - - } - - public PacketBookletStandButton(int x, int y, int z, World world, EntityPlayer player, EntrySet set){ - this.tileX = x; - this.tileY = y; - this.tileZ = z; - this.worldID = world.provider.getDimensionId(); - this.playerID = player.getEntityId(); - - this.entryID = set.entry == null ? -1 : ActuallyAdditionsAPI.bookletEntries.indexOf(set.entry); - this.chapterID = set.entry == null || set.chapter == null ? -1 : set.entry.getChapters().indexOf(set.chapter); - this.pageID = set.page == null ? -1 : set.page.getID(); - this.pageInIndex = set.pageInIndex; - } - - @Override - public void fromBytes(ByteBuf buf){ - this.tileX = buf.readInt(); - this.tileY = buf.readInt(); - this.tileZ = buf.readInt(); - this.worldID = buf.readInt(); - this.playerID = buf.readInt(); - - this.chapterID = buf.readInt(); - this.pageID = buf.readInt(); - this.entryID = buf.readInt(); - this.pageInIndex = buf.readInt(); - } - - @Override - public void toBytes(ByteBuf buf){ - buf.writeInt(this.tileX); - buf.writeInt(this.tileY); - buf.writeInt(this.tileZ); - buf.writeInt(this.worldID); - buf.writeInt(this.playerID); - - buf.writeInt(this.chapterID); - buf.writeInt(this.pageID); - buf.writeInt(this.entryID); - buf.writeInt(this.pageInIndex); - } - - public static class Handler implements IMessageHandler{ - - @Override - public IMessage onMessage(PacketBookletStandButton message, MessageContext ctx){ - World world = DimensionManager.getWorld(message.worldID); - TileEntity tile = world.getTileEntity(new BlockPos(message.tileX, message.tileY, message.tileZ)); - EntityPlayer player = (EntityPlayer)world.getEntityByID(message.playerID); - - if(tile instanceof TileEntityBookletStand){ - if(Objects.equals(player.getName(), ((TileEntityBookletStand)tile).assignedPlayer)){ - EntrySet theSet = ((TileEntityBookletStand)tile).assignedEntry; - theSet.entry = message.entryID == -1 ? null : ActuallyAdditionsAPI.bookletEntries.get(message.entryID); - theSet.chapter = message.chapterID == -1 || message.entryID == -1 || theSet.entry.getChapters().size() <= message.chapterID ? null : theSet.entry.getChapters().get(message.chapterID); - theSet.page = message.chapterID == -1 || theSet.chapter == null || theSet.chapter.getPages().length <= message.pageID-1 ? null : theSet.chapter.getPages()[message.pageID-1]; - theSet.pageInIndex = message.pageInIndex; - ((TileEntityBookletStand)tile).sendUpdate(); - } - } - - return null; - } - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java index b92c6468e..7d5c5fb26 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java @@ -29,6 +29,5 @@ public class PacketHandler{ theNetwork.registerMessage(PacketGuiNumber.Handler.class, PacketGuiNumber.class, 1, Side.SERVER); theNetwork.registerMessage(PacketGuiString.Handler.class, PacketGuiString.class, 2, Side.SERVER); theNetwork.registerMessage(PacketParticle.Handler.class, PacketParticle.class, 3, Side.CLIENT); - theNetwork.registerMessage(PacketBookletStandButton.Handler.class, PacketBookletStandButton.class, 4, Side.SERVER); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java index 5a0bc7eb8..2309c7621 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java @@ -71,7 +71,6 @@ public abstract class TileEntityBase extends TileEntity implements ITickable{ GameRegistry.registerTileEntity(TileEntityRangedCollector.class, ModUtil.MOD_ID_LOWER+":tileEntityRangedCollector"); GameRegistry.registerTileEntity(TileEntityLaserRelay.class, ModUtil.MOD_ID_LOWER+":tileEntityLaserRelay"); GameRegistry.registerTileEntity(TileEntityAtomicReconstructor.class, ModUtil.MOD_ID_LOWER+":tileEntityAtomicReconstructor"); - GameRegistry.registerTileEntity(TileEntityBookletStand.class, ModUtil.MOD_ID_LOWER+":tileEntityBookletStand"); GameRegistry.registerTileEntity(TileEntityMiner.class, ModUtil.MOD_ID_LOWER+":tileEntityMiner"); GameRegistry.registerTileEntity(TileEntityFireworkBox.class, ModUtil.MOD_ID_LOWER+":tileEntityFireworkBox"); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBookletStand.java deleted file mode 100644 index 5d4f027e1..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBookletStand.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file ("TileEntityBookletStand.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense/ - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2016 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.tile; - -import de.ellpeck.actuallyadditions.api.internal.EntrySet; -import net.minecraft.nbt.NBTTagCompound; - -public class TileEntityBookletStand extends TileEntityBase{ - - public EntrySet assignedEntry = new EntrySet(null); - public String assignedPlayer; - - @Override - public void writeSyncableNBT(NBTTagCompound compound, boolean isForSync){ - super.writeSyncableNBT(compound, isForSync); - compound.setTag("SavedEntry", this.assignedEntry.writeToNBT()); - - if(this.assignedPlayer != null){ - compound.setString("Player", this.assignedPlayer); - } - } - - @Override - public void readSyncableNBT(NBTTagCompound compound, boolean isForSync){ - super.readSyncableNBT(compound, isForSync); - this.assignedEntry = EntrySet.readFromNBT(compound.getCompoundTag("SavedEntry")); - - String player = compound.getString("Player"); - if(player != null){ - this.assignedPlayer = player; - } - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java index 3f09a4094..17b84f55c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java @@ -86,7 +86,7 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements @Override public boolean isUseableByPlayer(EntityPlayer player){ - return player.getDistanceSq(this.getPos().getX()+0.5D, this.pos.getY()+0.5D, this.pos.getZ()+0.5D) <= 64; + return player.getDistanceSq(this.getPos().getX()+0.5D, this.pos.getY()+0.5D, this.pos.getZ()+0.5D) <= 64 && !this.isInvalid() && this.worldObj.getTileEntity(this.pos) == this; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index a9b5e8b64..4b3593340 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -26,7 +26,6 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; -@SideOnly(Side.CLIENT) public class AssetUtil{ public static final ResourceLocation GUI_INVENTORY_LOCATION = getGuiLocation("guiInventory"); diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockSmileyCloud.json b/src/main/resources/assets/actuallyadditions/blockstates/blockSmileyCloud.json new file mode 100644 index 000000000..c4508ef62 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockSmileyCloud.json @@ -0,0 +1,8 @@ +{ + "variants": { + "meta=0": { "model": "actuallyadditions:blockSmileyCloud", "y": 0 }, + "meta=1": { "model": "actuallyadditions:blockSmileyCloud", "y": 180 }, + "meta=2": { "model": "actuallyadditions:blockSmileyCloud", "y": -90 }, + "meta=3": { "model": "actuallyadditions:blockSmileyCloud", "y": 90 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index afc832ca2..4d2917b53 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -124,7 +124,6 @@ tile.actuallyadditions.blockCrystalLightBlue.name=Diamatine Crystal Block tile.actuallyadditions.blockCrystalGreen.name=Emeradic Crystal Block tile.actuallyadditions.blockCrystalBlack.name=Void Crystal Block tile.actuallyadditions.blockCrystalWhite.name=Enori Crystal Block -tile.actuallyadditions.blockBookStand.name=Manual Stand tile.actuallyadditions.blockMiner.name=Vertical Digger tile.actuallyadditions.blockFireworkBox.name=Firework Box tile.actuallyadditions.blockQuartzWall.name=Black Quartz Wall @@ -717,10 +716,6 @@ booklet.actuallyadditions.chapter.bookTutorial.text.1=The Actually Additio booklet.actuallyadditions.chapter.bookTutorial.text.2=The Buttons at the top right lead you to the Achievements or Configuration Screen. When looking at a chapter that is somehow connected to an achievement, a speech bubble that you can hover over to see the Achievement in question will point to the Achievements Button. The Buttons on the top left can be used to be directed to various Webpages that have to do with the mod. When an update is available, a button to download it will also show up on the top left. booklet.actuallyadditions.chapter.bookTutorial.text.3=If you, for some reason, want to craft this book again, just take a piece of paper and a canola seed which you can find randomly generated and craft them together! -booklet.actuallyadditions.chapter.bookStand.name=Manual Stand -booklet.actuallyadditions.chapter.bookStand.text.1=The Manual Stand is a block that is supposed to mainly be used on Servers. You can, provided you are the person who placed it down, set a page in the GUI that will open when someone else accesses it by pressing the "Set Page"-button while being on the desired page. The Manual Stand does not save pages another player navigated to, meaing re-accessing the Stand will cause it to always end up on the page speficied by the placer. -booklet.actuallyadditions.chapter.bookStand.text.2=Stand on it - booklet.actuallyadditions.chapter.reconstructorLenses.name=Reconstructor Lenses & Misc booklet.actuallyadditions.chapter.reconstructorLenses.text.1=The Atomic Reconstructor, by default, can only convert some blocks. This can be changed, however, with Lenses. They can be, once crafted, attached to the Reconstructor via right-clicking the Reconstructor with them in hand. To remove them, right-click it with an empty hand. Lenses have lots of different features and uses, as you can see on the following pages. However, there is also some other useful recipes to be found there too. booklet.actuallyadditions.chapter.reconstructorLenses.text.3=The Lens of Color changes the color of Stained Glass and Panes, Stained Clay, Carpetet, Dye, Lamps, Wool in its sight. Contrary to using no lens, it goes through blocks and only converts blocks it touches. diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockSmileyCloud.json b/src/main/resources/assets/actuallyadditions/models/block/blockSmileyCloud.json new file mode 100644 index 000000000..6d2b06fc5 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockSmileyCloud.json @@ -0,0 +1,411 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "actuallyadditions:blocks/models/modelSmileyCloud", + "smileycloud": "actuallyadditions:blocks/models/modelSmileyCloud" + }, + "elements": [ + { + "from": [2,0,3], + "to": [14,10,13], + "faces": { + "up": { + "uv": [5,0.75,8,3.25], + "texture": "#smileycloud" + }, + "down": { + "uv": [3.5,1.5,6.5,4], + "texture": "#smileycloud" + }, + "west": { + "uv": [0,2.5,2.5,5], + "texture": "#smileycloud" + }, + "east": { + "uv": [8.5,2.5,11,5], + "texture": "#smileycloud" + }, + "north": { + "uv": [2.75,0.25,5.75,2.75], + "texture": "#smileycloud" + }, + "south": { + "uv": [5.25,0.25,8.25,2.75], + "texture": "#smileycloud" + } + } + }, + { + "from": [1,1,4], + "to": [15,9,12], + "faces": { + "up": { + "uv": [6.5,2,7,4], + "texture": "#smileycloud" + }, + "down": { + "uv": [1.25,2.75,1.75,4.75], + "texture": "#smileycloud" + }, + "west": { + "uv": [13.75,2,15.75,4], + "texture": "#smileycloud" + }, + "east": { + "uv": [11.25,2,13.25,4], + "texture": "#smileycloud" + }, + "north": { + "uv": [13.75,2.75,14.25,4.75], + "texture": "#smileycloud" + }, + "south": { + "uv": [6.25,1.5,6.75,3.5], + "texture": "#smileycloud" + } + } + }, + { + "from": [0,2,5], + "to": [16,8,11], + "faces": { + "up": { + "uv": [12.75,2.25,13.25,3.75], + "texture": "#smileycloud" + }, + "down": { + "uv": [13.5,2.5,14,4], + "texture": "#smileycloud" + }, + "west": { + "uv": [13.25,4.25,14.75,5.75], + "texture": "#smileycloud" + }, + "east": { + "uv": [11.5,4,13,5.5], + "texture": "#smileycloud" + }, + "north": { + "uv": [13.75,3,14.25,4.5], + "texture": "#smileycloud" + }, + "south": { + "uv": [6.25,1.75,6.75,3.25], + "texture": "#smileycloud" + } + } + }, + { + "from": [3,9,4], + "to": [13,11,12], + "faces": { + "up": { + "uv": [0.25,2.75,2.75,4.75], + "texture": "#smileycloud" + }, + "west": { + "uv": [4,3,6,3.5], + "texture": "#smileycloud" + }, + "east": { + "uv": [0.75,10,2.75,10.5], + "texture": "#smileycloud" + }, + "north": { + "uv": [8.75,7.5,11.25,8], + "texture": "#smileycloud" + }, + "south": { + "uv": [7,5.75,9.5,6.25], + "texture": "#smileycloud" + } + } + }, + { + "from": [4,10,5], + "to": [12,12,11], + "faces": { + "up": { + "uv": [8.75,7,10.75,8.5], + "texture": "#smileycloud" + }, + "west": { + "uv": [8,5.5,9.5,6], + "texture": "#smileycloud" + }, + "east": { + "uv": [7,5.5,8.5,6], + "texture": "#smileycloud" + }, + "north": { + "uv": [12,5,14.25,5.5], + "texture": "#smileycloud" + }, + "south": { + "uv": [3,3.25,5,3.75], + "texture": "#smileycloud" + } + } + }, + { + "from": [3,1,12], + "to": [13,9,14], + "faces": { + "up": { + "uv": [11.75,3.75,14.25,4.25], + "texture": "#smileycloud" + }, + "down": { + "uv": [7.75,3.25,10.25,3.75], + "texture": "#smileycloud" + }, + "west": { + "uv": [13.25,2.5,13.75,4.5], + "texture": "#smileycloud" + }, + "east": { + "uv": [6.75,2,7.25,4], + "texture": "#smileycloud" + }, + "south": { + "uv": [3.75,1,6.25,3], + "texture": "#smileycloud" + } + } + }, + { + "from": [4,2,13], + "to": [12,8,15], + "faces": { + "up": { + "uv": [2,6.25,4,6.75], + "texture": "#smileycloud" + }, + "down": { + "uv": [9.5,7.75,11.5,8.25], + "texture": "#smileycloud" + }, + "west": { + "uv": [14.75,2.25,15.25,3.75], + "texture": "#smileycloud" + }, + "east": { + "uv": [13.25,2.5,13.75,4], + "texture": "#smileycloud" + }, + "south": { + "uv": [3,5.5,5,7], + "texture": "#smileycloud" + } + } + }, + { + "from": [5,3,14], + "to": [11,7,16], + "faces": { + "up": { + "uv": [7.25,5.5,8.75,6], + "texture": "#smileycloud" + }, + "down": { + "uv": [12.75,3,14.25,3.5], + "texture": "#smileycloud" + }, + "west": { + "uv": [8.25,7.25,8.75,8.25], + "texture": "#smileycloud" + }, + "east": { + "uv": [10.75,7,11.25,8], + "texture": "#smileycloud" + }, + "south": { + "uv": [12.5,2.75,14,3.75], + "texture": "#smileycloud" + } + } + }, + { + "from": [5,3,2.5], + "to": [11,4,4.5], + "faces": { + "up": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "down": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "west": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "east": { + "uv": [4.5,10.25,4.75,10.5], + "texture": "#smileycloud" + }, + "north": { + "uv": [4.25,10.25,4.75,10.5], + "texture": "#smileycloud" + } + } + }, + { + "from": [11,4,2.5], + "to": [12,5,4.5], + "faces": { + "up": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "down": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "west": { + "uv": [4.5,10.25,4.75,10.5], + "texture": "#smileycloud" + }, + "east": { + "uv": [4.5,10.25,4.75,10.5], + "texture": "#smileycloud" + }, + "north": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + } + } + }, + { + "from": [4,4,2.5], + "to": [5,5,4.5], + "faces": { + "up": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "down": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "west": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "east": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "north": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + } + } + }, + { + "from": [9,7,2.75], + "to": [11,9,3.75], + "faces": { + "up": { + "uv": [7.75,9.25,8.25,9.5], + "texture": "#smileycloud" + }, + "down": { + "uv": [7.75,9.5,8.25,9.75], + "texture": "#smileycloud" + }, + "west": { + "uv": [7.75,9.25,8,9.75], + "texture": "#smileycloud" + }, + "east": { + "uv": [7.75,9.25,8,9.75], + "texture": "#smileycloud" + }, + "north": { + "uv": [7.75,9.25,8.25,9.75], + "texture": "#smileycloud" + } + } + }, + { + "from": [5,7,2.75], + "to": [7,9,3.75], + "faces": { + "up": { + "uv": [7.75,9.5,8.25,9.75], + "texture": "#smileycloud" + }, + "down": { + "uv": [7.75,9.5,8.25,9.75], + "texture": "#smileycloud" + }, + "west": { + "uv": [8,9.25,8.25,9.75], + "texture": "#smileycloud" + }, + "east": { + "uv": [7.75,9.25,8,9.75], + "texture": "#smileycloud" + }, + "north": { + "uv": [7.75,9.25,8.25,9.75], + "texture": "#smileycloud" + } + } + }, + { + "from": [9.5,7.5,2.5], + "to": [10.5,8.5,3.5], + "faces": { + "up": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "down": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "west": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "east": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "north": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + } + } + }, + { + "from": [5.5,7.5,2.5], + "to": [6.5,8.5,3.5], + "faces": { + "up": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "down": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "west": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "east": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + }, + "north": { + "uv": [4.25,10.25,4.5,10.5], + "texture": "#smileycloud" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockSmileyCloud.json b/src/main/resources/assets/actuallyadditions/models/item/blockSmileyCloud.json new file mode 100644 index 000000000..e60244b81 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockSmileyCloud.json @@ -0,0 +1,10 @@ +{ + "parent": "actuallyadditions:block/blockSmileyCloud", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelBookletStand.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelBookletStand.png deleted file mode 100644 index 822ab5dfa050ad360b0876641c8626c42ba5f36d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 575 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enkiEpy*OmP~w}g-)(}qu;uYf`lC9V-A!TD(= z<%vb93~dIoxCe|nPd1MQjX>Eakt5%+fT*}x+PJgvn`7_1(+2+CwM z3ahW1^Rj_YBi-85TJhTpR@Z4}*0b+gsJ)+EnH;_8>-L*^AOHTe%2_$b$07_Mos z?`eB!eAi==*<$tp-t{M{y)LD#;$t|O?Rk9yx0TXW_6DXrRZeTepLX;9hv~lEUbc05 z!S+YP_y0-L<(ANom%l9DyieNW(EIt3pSNv1!8d#AF71b&!gKtV zKa@K8d7EeNms^G2#`PBb= z+e7gMb%|>Ntn_~#- Date: Sun, 10 Jan 2016 20:16:19 +0100 Subject: [PATCH 34/58] Final fixes~ --- build.gradle | 16 +++++----------- .../mod/items/base/ItemAllToolAA.java | 3 +-- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index 6c8599a08..baab5e001 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { } apply plugin: 'net.minecraftforge.gradle.forge' -version = "1.7.10-r20" +version = "1.8.9-r21" group = "de.ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions" @@ -21,6 +21,7 @@ minecraft { runDir = "idea" mappings = "stable_20" + makeObfSourceJar = false replaceIn "ModUtil.java" replace "@VERSION@", project.version.toString() @@ -28,20 +29,14 @@ minecraft { repositories { maven { - name "Mobius" - url "http://mobiusstrip.eu/maven" - } - maven { - name "ChickenBones" url "http://chickenbones.net/maven/" } } dependencies { - //compile "mcp.mobius.waila:Waila:1.5.10_1.7.10" - //compile "codechicken:CodeChickenLib:1.7.10-1.1.3.138:dev" - //compile "codechicken:CodeChickenCore:1.7.10-1.0.7.46:dev" - //compile "codechicken:NotEnoughItems:1.7.10-1.0.5.110:dev" + compile "codechicken:CodeChickenLib:1.8-1.1.2.139:dev" + compile "codechicken:CodeChickenCore:1.8-1.0.5.36:dev" + compile "codechicken:NotEnoughItems:1.8-1.0.5.104:dev" } processResources { @@ -59,7 +54,6 @@ processResources { } } -// Why is OpenComputers one of the only mods that has a readable build.gradle? (Thank you Sangar!) :D jar {} task deobfJar(type: Jar) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java index 44c7469df..58f30faa6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemAllToolAA.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import com.google.common.collect.Sets; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; @@ -49,7 +48,7 @@ public class ItemAllToolAA extends ItemTool{ private String repairOredict; public ItemAllToolAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, EnumRarity rarity, int color){ - super(4.0F, toolMat, Sets.newHashSet()); + super(4.0F, toolMat, new HashSet()); this.repairItem = repairItem; this.name = unlocalizedName; From 2620687e2d99cdbb447673792e4cedb554431350 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 10 Jan 2016 20:59:13 +0100 Subject: [PATCH 35/58] Added the new update checker for 1.8 as well --- .../mod/config/values/ConfigBoolValues.java | 4 +- .../mod/update/ThreadUpdateChecker.java | 41 +++++++++++++++---- .../mod/update/UpdateChecker.java | 5 ++- update/updateVersion.txt | 3 +- update/updateVersions.properties | 2 + 5 files changed, 42 insertions(+), 13 deletions(-) create mode 100644 update/updateVersions.properties diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java index 617d3f79d..be7b70a34 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java @@ -23,6 +23,8 @@ public enum ConfigBoolValues{ GENERATE_QUARTZ("Black Quartz", ConfigCategories.WORLD_GEN, true, "If the Black Quartz generates in the world"), DO_UPDATE_CHECK("Do Update Check", ConfigCategories.OTHER, true, "If Actually Additions should check for an Update on joining a World"), + UPDATE_CHECK_VERSION_SPECIFIC("Version Specific Update Checker", ConfigCategories.OTHER, false, "If Actually Additions' Update Check should only search for updates for the Minecraft Version you currently have"), + DO_CAT_DROPS("Do Cat Drops", ConfigCategories.OTHER, true, "If Cats drop Hairy Balls on Occasion"), TF_PAXELS("Thermal Foundation Paxels", ConfigCategories.OTHER, true, "If Paxels made of Thermal Foundation Materials should exist"), @@ -73,4 +75,4 @@ public enum ConfigBoolValues{ return this.currentValue; } -} +} \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java index f82eab39c..2d6bff7b0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java @@ -10,11 +10,12 @@ package de.ellpeck.actuallyadditions.mod.update; +import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; +import java.util.Properties; public class ThreadUpdateChecker extends Thread{ @@ -28,14 +29,36 @@ public class ThreadUpdateChecker extends Thread{ public void run(){ ModUtil.LOGGER.info("Starting Update Check..."); try{ - URL newestURL = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/update/updateVersion.txt"); - BufferedReader newestReader = new BufferedReader(new InputStreamReader(newestURL.openStream())); - UpdateChecker.updateVersion = newestReader.readLine(); - newestReader.close(); + URL newestURL = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/update/updateVersions.properties"); + Properties updateProperties = new Properties(); + updateProperties.load(new InputStreamReader(newestURL.openStream())); - int updateVersion = Integer.parseInt(UpdateChecker.updateVersion.replace("-", "").replace(".", "").replace("r", "")); - int clientVersion = Integer.parseInt(ModUtil.VERSION.replace("-", "").replace(".", "").replace("r", "")); - if(updateVersion > clientVersion){ + String currentMcVersion = ModUtil.VERSION.split("-")[0]; + if(ConfigBoolValues.UPDATE_CHECK_VERSION_SPECIFIC.isEnabled()){ + String newestVersionProp = updateProperties.getProperty(currentMcVersion); + + UpdateChecker.updateVersionInt = Integer.parseInt(newestVersionProp); + UpdateChecker.updateVersionString = currentMcVersion+"-r"+newestVersionProp; + } + else{ + int highest = 0; + String highestString = ""; + + for(String updateMC : updateProperties.stringPropertyNames()){ + String updateVersion = updateProperties.getProperty(updateMC); + int update = Integer.parseInt(updateVersion); + if(highest < update){ + highest = update; + highestString = updateMC+"-r"+updateVersion; + } + } + + UpdateChecker.updateVersionInt = highest; + UpdateChecker.updateVersionString = highestString; + } + + int clientVersion = Integer.parseInt(ModUtil.VERSION.substring(ModUtil.VERSION.indexOf("r")+1)); + if(UpdateChecker.updateVersionInt > clientVersion){ UpdateChecker.needsUpdateNotify = true; } @@ -49,7 +72,7 @@ public class ThreadUpdateChecker extends Thread{ if(!UpdateChecker.checkFailed){ if(UpdateChecker.needsUpdateNotify){ ModUtil.LOGGER.info("There is an Update for "+ModUtil.NAME+" available!"); - ModUtil.LOGGER.info("Current Version: "+ModUtil.VERSION+", newest Version: "+UpdateChecker.updateVersion+"!"); + ModUtil.LOGGER.info("Current Version: "+ModUtil.VERSION+", newest Version: "+UpdateChecker.updateVersionString+"!"); ModUtil.LOGGER.info("View the Changelog at "+UpdateChecker.CHANGELOG_LINK); ModUtil.LOGGER.info("Download at "+UpdateChecker.DOWNLOAD_LINK); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateChecker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateChecker.java index 046bcaca7..75cab1a33 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateChecker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateChecker.java @@ -20,7 +20,8 @@ public class UpdateChecker{ public static final String CHANGELOG_LINK = "http://ellpeck.de/actaddchangelog/"; public static boolean checkFailed; public static boolean needsUpdateNotify; - public static String updateVersion; + public static int updateVersionInt; + public static String updateVersionString; public static void init(){ if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled() && !Util.isDevVersion()){ @@ -28,4 +29,4 @@ public class UpdateChecker{ new ThreadUpdateChecker(); } } -} +} \ No newline at end of file diff --git a/update/updateVersion.txt b/update/updateVersion.txt index 42392d70f..7d90cb450 100644 --- a/update/updateVersion.txt +++ b/update/updateVersion.txt @@ -1 +1,2 @@ -1.7.10-r20 \ No newline at end of file +1.7.10-r21 +(This is a fallback for old versions which don't have the new update checker. Don't change.) \ No newline at end of file diff --git a/update/updateVersions.properties b/update/updateVersions.properties new file mode 100644 index 000000000..0ec2048c7 --- /dev/null +++ b/update/updateVersions.properties @@ -0,0 +1,2 @@ +1.7.10=21 +1.8.9=22 \ No newline at end of file From e15d1fa882fc4f94fb051d4e432cc7836a169fb0 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 10 Jan 2016 21:00:12 +0100 Subject: [PATCH 36/58] Actually fix the new update checker --- .../de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java | 2 +- .../mod/update/UpdateCheckerClientNotificationEvent.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java index ee11aa458..75424b4d9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java @@ -289,7 +289,7 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ } else if(UpdateChecker.needsUpdateNotify){ updateHover.add(IChatComponent.Serializer.jsonToComponent(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.generic")).getFormattedText()); - updateHover.add(IChatComponent.Serializer.jsonToComponent(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersion)).getFormattedText()); + updateHover.add(IChatComponent.Serializer.jsonToComponent(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersionString)).getFormattedText()); updateHover.add(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.buttonOptions")); } this.buttonUpdate = new TexturedButton(4, this.guiLeft-11, this.guiTop-11, 245, 0, 11, 11, updateHover); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java index b98ad9c36..372f29bd5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateCheckerClientNotificationEvent.java @@ -36,7 +36,7 @@ public class UpdateCheckerClientNotificationEvent{ } else if(UpdateChecker.needsUpdateNotify){ player.addChatComponentMessage(IChatComponent.Serializer.jsonToComponent(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.generic"))); - player.addChatComponentMessage(IChatComponent.Serializer.jsonToComponent(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersion))); + player.addChatComponentMessage(IChatComponent.Serializer.jsonToComponent(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersionString))); player.addChatComponentMessage(IChatComponent.Serializer.jsonToComponent(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.buttons", UpdateChecker.CHANGELOG_LINK, UpdateChecker.DOWNLOAD_LINK))); notified = true; } From b8b94b91f187166de853e0a1f4bf3625045f94e5 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 11 Jan 2016 18:27:47 +0100 Subject: [PATCH 37/58] Fixed some more bugs, update the update checker to check for betas as well~ --- build.gradle | 2 +- .../ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java | 5 +++++ .../ellpeck/actuallyadditions/mod/booklet/InitBooklet.java | 2 +- .../actuallyadditions/mod/misc/special/RenderSpecial.java | 1 + .../actuallyadditions/mod/update/ThreadUpdateChecker.java | 3 ++- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index baab5e001..c838ee7b2 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { } apply plugin: 'net.minecraftforge.gradle.forge' -version = "1.8.9-r21" +version = "1.8.9-r22_beta2" group = "de.ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions" diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index d3cc8f963..f092a600a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -48,6 +48,11 @@ public class BlockWildPlant extends BlockBushBase{ this.setStepSound(soundTypeGrass); } + @Override + public int damageDropped(IBlockState state){ + return this.getMetaFromState(state); + } + @Override protected PropertyInteger getMetaProperty(){ return META; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index 42445c6a5..910f6fcf0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -66,7 +66,7 @@ public class InitBooklet{ chapterIntro = new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3)); new BookletChapter("bookTutorial", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeBook)); new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setNoText().setPageStacksWildcard(), new PageCrafting(7, MiscCrafting.recipesCrystals).setNoText(), new PageCrafting(8, MiscCrafting.recipesCrystalBlocks).setNoText(), new PageReconstructor(9, LensNoneRecipeHandler.mainPageRecipes).setNoText()).setSpecial().setIncomplete(); - new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("", TileEntityCoalGenerator.PRODUCE)); + new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("", TileEntityCoalGenerator.PRODUCE).setPageStacksWildcard()); new BookletChapter("craftingIngs", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(7, ItemCrafting.recipeRing).setNoText(), new PageCrafting(8, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(11, ItemCrafting.recipeDough).setNoText(), new PageCrafting(12, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(13, BlockCrafting.recipeIronCase).setNoText()).setImportant(); new BookletChapter("rf", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.redstone), new PageTextOnly(1)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java index e37be527d..3a2f43a67 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java @@ -76,6 +76,7 @@ public class RenderSpecial{ GlStateManager.disableLighting(); if(this.theThingToRender != null){ if(isBlock){ + GlStateManager.rotate(180F, 1F, 0F, 0F); AssetUtil.renderBlockInWorld(Block.getBlockFromItem(this.theThingToRender.getItem()), this.theThingToRender.getItemDamage()); } else{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java index 2d6bff7b0..c8e10ebeb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java @@ -57,7 +57,8 @@ public class ThreadUpdateChecker extends Thread{ UpdateChecker.updateVersionString = highestString; } - int clientVersion = Integer.parseInt(ModUtil.VERSION.substring(ModUtil.VERSION.indexOf("r")+1)); + String clientVersionString = ModUtil.VERSION.substring(ModUtil.VERSION.indexOf("r")+1); + int clientVersion = Integer.parseInt(clientVersionString.substring(0, clientVersionString.indexOf("_"))); if(UpdateChecker.updateVersionInt > clientVersion){ UpdateChecker.needsUpdateNotify = true; } From d3950d257ca5b1b6c1bf052aea348b6e1e24df65 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 11 Jan 2016 18:55:39 +0100 Subject: [PATCH 38/58] Fixed wild plants dropping the wrong seeds. --- .../actuallyadditions/mod/blocks/BlockWildPlant.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index f092a600a..ac790f06f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -48,11 +48,6 @@ public class BlockWildPlant extends BlockBushBase{ this.setStepSound(soundTypeGrass); } - @Override - public int damageDropped(IBlockState state){ - return this.getMetaFromState(state); - } - @Override protected PropertyInteger getMetaProperty(){ return META; @@ -112,7 +107,7 @@ public class BlockWildPlant extends BlockBushBase{ @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ - int metadata = PosUtil.getMetadata(pos, world); + int metadata = state.getBlock().getMetaFromState(state); return metadata >= allWildPlants.length ? null : allWildPlants[metadata].wildVersionOf.getDrops(world, pos, allWildPlants[metadata].wildVersionOf.getStateFromMeta(7), fortune); } From 013518a57c174f7cd3641f13e83bfb67a5760b5a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 11 Jan 2016 19:01:55 +0100 Subject: [PATCH 39/58] r22 ~ --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c838ee7b2..4b864f0ae 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { } apply plugin: 'net.minecraftforge.gradle.forge' -version = "1.8.9-r22_beta2" +version = "1.8.9-r22" group = "de.ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions" From 5b166a784f14392809be30ebf1c2671e2ecd7459 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 11 Jan 2016 21:56:01 +0100 Subject: [PATCH 40/58] Fixed a ginormous bug that fucked up crafting. I hope. --- .../mod/event/PlayerObtainEvents.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java index 1069e1f94..cf813a2e3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java @@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.misc.WorldData; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentServerData; -import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -25,8 +24,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent; -import java.util.Locale; - public class PlayerObtainEvents{ @SubscribeEvent @@ -34,12 +31,10 @@ public class PlayerObtainEvents{ checkAchievements(event.crafting, event.player, InitAchievements.Type.CRAFTING); if(ConfigBoolValues.GIVE_BOOKLET_ON_FIRST_CRAFT.isEnabled()){ - if(!event.player.worldObj.isRemote && event.crafting.getItem() != InitItems.itemBooklet){ + if(!event.player.worldObj.isRemote && event.crafting != null && event.crafting.getItem() != null && event.crafting.getItem() != InitItems.itemBooklet){ - String itemName = event.crafting.getItem().getRegistryName(); - String blockName = Block.getBlockFromItem(event.crafting.getItem()).getRegistryName(); - - if((itemName != null && itemName.toLowerCase(Locale.ROOT).contains(ModUtil.MOD_ID_LOWER)) || (blockName != null && blockName.toLowerCase(Locale.ROOT).contains(ModUtil.MOD_ID_LOWER))){ + String name = event.crafting.getItem().getRegistryName(); + if(name != null && name.toLowerCase().contains(ModUtil.MOD_ID_LOWER)){ NBTTagCompound compound = PersistentServerData.getDataFromPlayer(event.player); if(compound != null && !compound.getBoolean("BookGottenAlready")){ compound.setBoolean("BookGottenAlready", true); From f014b1af57d3ba4c14a8b2d1986a5937f6e2d8e3 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 11 Jan 2016 22:02:41 +0100 Subject: [PATCH 41/58] r23 ~ --- build.gradle | 2 +- .../actuallyadditions/mod/event/PlayerObtainEvents.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 4b864f0ae..5d4467b58 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { } apply plugin: 'net.minecraftforge.gradle.forge' -version = "1.8.9-r22" +version = "1.8.9-r23" group = "de.ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions" diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java index cf813a2e3..1ca2eefd8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/PlayerObtainEvents.java @@ -24,6 +24,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent; +import java.util.Locale; + public class PlayerObtainEvents{ @SubscribeEvent @@ -34,7 +36,7 @@ public class PlayerObtainEvents{ if(!event.player.worldObj.isRemote && event.crafting != null && event.crafting.getItem() != null && event.crafting.getItem() != InitItems.itemBooklet){ String name = event.crafting.getItem().getRegistryName(); - if(name != null && name.toLowerCase().contains(ModUtil.MOD_ID_LOWER)){ + if(name != null && name.toLowerCase(Locale.ROOT).contains(ModUtil.MOD_ID_LOWER)){ NBTTagCompound compound = PersistentServerData.getDataFromPlayer(event.player); if(compound != null && !compound.getBoolean("BookGottenAlready")){ compound.setBoolean("BookGottenAlready", true); From dbf8093ea0f305e70e0eb95d5a67c686f6f6442d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 11 Jan 2016 22:15:50 +0100 Subject: [PATCH 42/58] fml --- .../actuallyadditions/mod/update/ThreadUpdateChecker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java index c8e10ebeb..9535467f1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java @@ -58,7 +58,7 @@ public class ThreadUpdateChecker extends Thread{ } String clientVersionString = ModUtil.VERSION.substring(ModUtil.VERSION.indexOf("r")+1); - int clientVersion = Integer.parseInt(clientVersionString.substring(0, clientVersionString.indexOf("_"))); + int clientVersion = Integer.parseInt(clientVersionString.contains("_") ? clientVersionString.substring(0, clientVersionString.indexOf("_")) : clientVersionString); if(UpdateChecker.updateVersionInt > clientVersion){ UpdateChecker.needsUpdateNotify = true; } From 85428e885dbea9a0cf203a479c24597bae51d21d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 11 Jan 2016 22:33:54 +0100 Subject: [PATCH 43/58] Workaround for a bug that broke the packet handling --- .../tile/TileEntityAtomicReconstructor.java | 17 ++++-- .../mod/tile/TileEntityInventoryBase.java | 56 ++++++++++--------- 2 files changed, 43 insertions(+), 30 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java index 89a7a6276..6e482c98b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java @@ -39,6 +39,8 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple private boolean activateOnceWithSignal; private int oldEnergy; + public boolean syncSlotsNextTime; + public TileEntityAtomicReconstructor(){ super(1, "reconstructor"); } @@ -109,11 +111,12 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple super.writeSyncableNBT(compound, sync); compound.setInteger("CurrentTime", this.currentTime); this.storage.writeToNBT(compound); - } - @Override - public boolean shouldSyncSlots(){ - return true; + if(this.syncSlotsNextTime){ + this.writeSlotsToCompound(compound); + compound.setBoolean("ShouldSync", true); + this.syncSlotsNextTime = false; + } } @Override @@ -121,16 +124,22 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple super.readSyncableNBT(compound, sync); this.currentTime = compound.getInteger("CurrentTime"); this.storage.readFromNBT(compound); + + if(compound.getBoolean("ShouldSync")){ + this.readSlotsFromCompound(compound); + } } @Override public void setInventorySlotContents(int i, ItemStack stack){ super.setInventorySlotContents(i, stack); + this.syncSlotsNextTime = true; this.sendUpdate(); } @Override public ItemStack decrStackSize(int i, int j){ + this.syncSlotsNextTime = true; this.sendUpdate(); return super.decrStackSize(i, j); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java index 17b84f55c..8f70acaf7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java @@ -41,38 +41,42 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements @Override public void writeSyncableNBT(NBTTagCompound compound, boolean isForSync){ super.writeSyncableNBT(compound, isForSync); - if(!isForSync || this.shouldSyncSlots()){ - if(this.slots.length > 0){ - NBTTagList tagList = new NBTTagList(); - for(int currentIndex = 0; currentIndex < slots.length; currentIndex++){ - NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setByte("Slot", (byte)currentIndex); - if(slots[currentIndex] != null){ - slots[currentIndex].writeToNBT(tagCompound); - } - tagList.appendTag(tagCompound); - } - compound.setTag("Items", tagList); - } + if(!isForSync){ + this.writeSlotsToCompound(compound); } } - public boolean shouldSyncSlots(){ - return false; - } - @Override public void readSyncableNBT(NBTTagCompound compound, boolean isForSync){ super.readSyncableNBT(compound, isForSync); - if(!isForSync || this.shouldSyncSlots()){ - if(this.slots.length > 0){ - NBTTagList tagList = compound.getTagList("Items", 10); - for(int i = 0; i < tagList.tagCount(); i++){ - NBTTagCompound tagCompound = tagList.getCompoundTagAt(i); - byte slotIndex = tagCompound.getByte("Slot"); - if(slotIndex >= 0 && slotIndex < slots.length){ - slots[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound); - } + if(!isForSync){ + this.readSlotsFromCompound(compound); + } + } + + public void writeSlotsToCompound(NBTTagCompound compound){ + if(this.slots.length > 0){ + NBTTagList tagList = new NBTTagList(); + for(int currentIndex = 0; currentIndex < slots.length; currentIndex++){ + NBTTagCompound tagCompound = new NBTTagCompound(); + tagCompound.setByte("Slot", (byte)currentIndex); + if(slots[currentIndex] != null){ + slots[currentIndex].writeToNBT(tagCompound); + } + tagList.appendTag(tagCompound); + } + compound.setTag("Items", tagList); + } + } + + public void readSlotsFromCompound(NBTTagCompound compound){ + if(this.slots.length > 0){ + NBTTagList tagList = compound.getTagList("Items", 10); + for(int i = 0; i < tagList.tagCount(); i++){ + NBTTagCompound tagCompound = tagList.getCompoundTagAt(i); + byte slotIndex = tagCompound.getByte("Slot"); + if(slotIndex >= 0 && slotIndex < slots.length){ + slots[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound); } } } From ab0adfa25b6b0f93b6393a27c1c94920aeadfee1 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 11 Jan 2016 22:41:33 +0100 Subject: [PATCH 44/58] Revert the fix, tried to fix it another way --- .../mod/network/VanillaPacketSyncer.java | 4 +- .../tile/TileEntityAtomicReconstructor.java | 17 ++---- .../mod/tile/TileEntityInventoryBase.java | 56 +++++++++---------- 3 files changed, 33 insertions(+), 44 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/VanillaPacketSyncer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/VanillaPacketSyncer.java index 07d531664..05e2b0feb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/VanillaPacketSyncer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/VanillaPacketSyncer.java @@ -33,6 +33,8 @@ public class VanillaPacketSyncer{ } public static void sendTileToPlayer(TileEntity tile, EntityPlayerMP player){ - player.playerNetServerHandler.sendPacket(tile.getDescriptionPacket()); + if(player.getEntityWorld().getTileEntity(tile.getPos()) == tile){ + player.playerNetServerHandler.sendPacket(tile.getDescriptionPacket()); + } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java index 6e482c98b..89a7a6276 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java @@ -39,8 +39,6 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple private boolean activateOnceWithSignal; private int oldEnergy; - public boolean syncSlotsNextTime; - public TileEntityAtomicReconstructor(){ super(1, "reconstructor"); } @@ -111,12 +109,11 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple super.writeSyncableNBT(compound, sync); compound.setInteger("CurrentTime", this.currentTime); this.storage.writeToNBT(compound); + } - if(this.syncSlotsNextTime){ - this.writeSlotsToCompound(compound); - compound.setBoolean("ShouldSync", true); - this.syncSlotsNextTime = false; - } + @Override + public boolean shouldSyncSlots(){ + return true; } @Override @@ -124,22 +121,16 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple super.readSyncableNBT(compound, sync); this.currentTime = compound.getInteger("CurrentTime"); this.storage.readFromNBT(compound); - - if(compound.getBoolean("ShouldSync")){ - this.readSlotsFromCompound(compound); - } } @Override public void setInventorySlotContents(int i, ItemStack stack){ super.setInventorySlotContents(i, stack); - this.syncSlotsNextTime = true; this.sendUpdate(); } @Override public ItemStack decrStackSize(int i, int j){ - this.syncSlotsNextTime = true; this.sendUpdate(); return super.decrStackSize(i, j); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java index 8f70acaf7..17b84f55c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java @@ -41,42 +41,38 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements @Override public void writeSyncableNBT(NBTTagCompound compound, boolean isForSync){ super.writeSyncableNBT(compound, isForSync); - if(!isForSync){ - this.writeSlotsToCompound(compound); + if(!isForSync || this.shouldSyncSlots()){ + if(this.slots.length > 0){ + NBTTagList tagList = new NBTTagList(); + for(int currentIndex = 0; currentIndex < slots.length; currentIndex++){ + NBTTagCompound tagCompound = new NBTTagCompound(); + tagCompound.setByte("Slot", (byte)currentIndex); + if(slots[currentIndex] != null){ + slots[currentIndex].writeToNBT(tagCompound); + } + tagList.appendTag(tagCompound); + } + compound.setTag("Items", tagList); + } } } + public boolean shouldSyncSlots(){ + return false; + } + @Override public void readSyncableNBT(NBTTagCompound compound, boolean isForSync){ super.readSyncableNBT(compound, isForSync); - if(!isForSync){ - this.readSlotsFromCompound(compound); - } - } - - public void writeSlotsToCompound(NBTTagCompound compound){ - if(this.slots.length > 0){ - NBTTagList tagList = new NBTTagList(); - for(int currentIndex = 0; currentIndex < slots.length; currentIndex++){ - NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setByte("Slot", (byte)currentIndex); - if(slots[currentIndex] != null){ - slots[currentIndex].writeToNBT(tagCompound); - } - tagList.appendTag(tagCompound); - } - compound.setTag("Items", tagList); - } - } - - public void readSlotsFromCompound(NBTTagCompound compound){ - if(this.slots.length > 0){ - NBTTagList tagList = compound.getTagList("Items", 10); - for(int i = 0; i < tagList.tagCount(); i++){ - NBTTagCompound tagCompound = tagList.getCompoundTagAt(i); - byte slotIndex = tagCompound.getByte("Slot"); - if(slotIndex >= 0 && slotIndex < slots.length){ - slots[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound); + if(!isForSync || this.shouldSyncSlots()){ + if(this.slots.length > 0){ + NBTTagList tagList = compound.getTagList("Items", 10); + for(int i = 0; i < tagList.tagCount(); i++){ + NBTTagCompound tagCompound = tagList.getCompoundTagAt(i); + byte slotIndex = tagCompound.getByte("Slot"); + if(slotIndex >= 0 && slotIndex < slots.length){ + slots[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound); + } } } } From dbebafb1e583c8f71df0d7e44d490a8405c2a0f0 Mon Sep 17 00:00:00 2001 From: Patrick Walker Date: Mon, 11 Jan 2016 18:33:40 -0500 Subject: [PATCH 45/58] Update itemSwordQuartz.json --- .../assets/actuallyadditions/models/item/itemSwordQuartz.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemSwordQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemSwordQuartz.json index f4d64c458..7cc679035 100644 --- a/src/main/resources/assets/actuallyadditions/models/item/itemSwordQuartz.json +++ b/src/main/resources/assets/actuallyadditions/models/item/itemSwordQuartz.json @@ -1,7 +1,7 @@ { "parent": "builtin/generated", "textures": { - "layer0": "actuallyadditions:items/itemAxeQuartz" + "layer0": "actuallyadditions:items/itemSwordQuartz" }, "display": { "thirdperson": { From 0629b53d30e8d95bb2e6b4eb37d517b7d630948c Mon Sep 17 00:00:00 2001 From: Patrick Walker Date: Mon, 11 Jan 2016 18:34:06 -0500 Subject: [PATCH 46/58] Fixed texture name --- .../assets/actuallyadditions/models/item/itemShovelQuartz.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemShovelQuartz.json b/src/main/resources/assets/actuallyadditions/models/item/itemShovelQuartz.json index f4d64c458..ef1374004 100644 --- a/src/main/resources/assets/actuallyadditions/models/item/itemShovelQuartz.json +++ b/src/main/resources/assets/actuallyadditions/models/item/itemShovelQuartz.json @@ -1,7 +1,7 @@ { "parent": "builtin/generated", "textures": { - "layer0": "actuallyadditions:items/itemAxeQuartz" + "layer0": "actuallyadditions:items/itemShovelQuartz" }, "display": { "thirdperson": { From 352604aac193890084ec400093caaf53f1fdb945 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 13 Jan 2016 21:48:48 +0100 Subject: [PATCH 47/58] Updated the stuff to the other stuff. In layman's terms: Made 1.8 the master branch. --- specialPeopleStuff.properties | 10 +- .../assets/actuallyadditions/lang/de_DE.lang | 741 ++++++++++++++++++ update/changelog.md | 19 + update/updateVersions.properties | 2 +- 4 files changed, 770 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/actuallyadditions/lang/de_DE.lang diff --git a/specialPeopleStuff.properties b/specialPeopleStuff.properties index 2ac022d8c..8d03c5a99 100644 --- a/specialPeopleStuff.properties +++ b/specialPeopleStuff.properties @@ -1,4 +1,12 @@ +#Because he's me ellpeck=ActuallyAdditions:itemBooklet@0 +#Because he submitted tons of ideas for the mod dqmhose=minecraft:torch@0 +#Because he does all of the textures twoofeight=ActuallyAdditions:blockHeatCollector@0 -larixine=ActuallyAdditions:blockBlackLotus@0 \ No newline at end of file +#Because she is awesome and squids are cool +larixine=ActuallyAdditions:blockBlackLotus@0 +#Because he helps me with models and stuff +canitzp=ActuallyAdditions:blockCoffeeMachine@0 +#Because he's an awesome guy and helps with lots of stuff +xdjackiexd=ActuallyAdditions:itemDrill@14 diff --git a/src/main/resources/assets/actuallyadditions/lang/de_DE.lang b/src/main/resources/assets/actuallyadditions/lang/de_DE.lang new file mode 100644 index 000000000..1498e20f8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/lang/de_DE.lang @@ -0,0 +1,741 @@ +#General / Allgemein +itemGroup.actuallyadditions=Actually Additions +achievement.page.actuallyadditions=Actually Additions +actuallyadditions.lolWutHowUDoDis.name=This is bugged. Throw it away. Please. + +#Fluids / Flüssigkeiten +fluid.actuallyadditions.oil=Öl +fluid.actuallyadditions.canolaoil=Rapsöl + +#NEI Integration / NEI Integration +container.nei.actuallyadditions.crushing.name=Brecher +container.nei.actuallyadditions.crushingDouble.name=Doppelter Brecher +container.nei.actuallyadditions.ballOfHair.name=Haarknäuel +container.nei.actuallyadditions.compost.name=Kompost +container.nei.actuallyadditions.furnaceDouble.name=Doppelter Ofen +container.nei.actuallyadditions.treasureChest.name=Schatzkiste +container.nei.actuallyadditions.treasureChest.info=Gegenstände zu +container.nei.actuallyadditions.coffee.name=Kaffeemaschine +container.nei.actuallyadditions.coffee.special=Spezialfunktion +container.nei.actuallyadditions.coffee.maxAmount=Maximale Menge +container.nei.actuallyadditions.coffee.shift=[UMSCHALT]! +container.nei.actuallyadditions.coffee.extra.milk=+01:00, -1 Level +container.nei.actuallyadditions.reconstructor.name=Atomarer Umwandler + +container.nei.actuallyadditions.booklet.name=ActAdd Handbuch +container.nei.actuallyadditions.booklet.header=The Actually Additions Handbuch liest: +container.nei.actuallyadditions.booklet.noText=Offensichtlich nichts! Aber das macht nichts. Klicke einfach auf den Button am Ende, um die Gegenstände im Buch zu sehen, und blättere in ihm, um viele fantastische Sachen zu sehen! + +#Damage Sources / Schadensquellen +death.actuallyadditions.atomicReconstructor.1=%s wurde atomar umgewandelt. +death.actuallyadditions.atomicReconstructor.2=%s stand dem Atomaren Umwandler im Weg. +death.actuallyadditions.atomicReconstructor.3=Scheinbar funktioniert es nicht, Leute wie %s atomar umzuwandeln. +death.actuallyadditions.atomicReconstructor.4=%s sollte in Zukunft keine Atomaren Umwandler mehr essen. +death.actuallyadditions.atomicReconstructor.5=%s hätte Umwandlungs-Schaum verwenden sollen. + +#Blocks / Blöcke +tile.actuallyadditions.blockCompost.name=Kompost +tile.actuallyadditions.blockMiscOreBlackQuartz.name=Schwarzes Quarzerz +tile.actuallyadditions.blockMiscBlackQuartz.name=Schwarzer Quarzblock +tile.actuallyadditions.blockMiscBlackQuartzChiseled.name=Gemeißelter Block aus Schwarzem Quarz +tile.actuallyadditions.blockMiscBlackQuartzPillar.name=Schwarze Quarzsäule +tile.actuallyadditions.blockFeeder.name=Automatischer Fütterer +tile.actuallyadditions.blockGiantChest.name=Lagerkiste +tile.actuallyadditions.blockGrinder.name=Brecher +tile.actuallyadditions.blockGrinderDouble.name=Doppelter Brecher +tile.actuallyadditions.blockFurnaceDouble.name=Doppelter Ofen +tile.actuallyadditions.blockFishingNet.name=Fischernetz +tile.actuallyadditions.blockFurnaceSolar.name=Solarkollektor +tile.actuallyadditions.blockHeatCollector.name=Hitzekollektor +tile.actuallyadditions.blockItemRepairer.name=Reparierer +tile.actuallyadditions.blockMiscWoodCasing.name=Holzgehäuse +tile.actuallyadditions.blockGreenhouseGlass.name=Gewächshausglas +tile.actuallyadditions.blockEnergizer.name=Energetisierer +tile.actuallyadditions.blockEnervator.name=Schwächer +tile.actuallyadditions.blockRice.name=Reispflanze +tile.actuallyadditions.blockMiscCharcoal.name=Holzkohleblock +tile.actuallyadditions.blockCoalGenerator.name=Kohlegenerator +tile.actuallyadditions.blockLampPowerer.name=Lampenregler +tile.actuallyadditions.blockColoredLampWhite.name=Weiße Lampe +tile.actuallyadditions.blockColoredLampOrange.name=Orangene Lampe +tile.actuallyadditions.blockColoredLampMagenta.name=Magenta Lampe +tile.actuallyadditions.blockColoredLampYellow.name=Gelbe Lampe +tile.actuallyadditions.blockColoredLampLightBlue.name=Hellblaue Lampe +tile.actuallyadditions.blockColoredLampBlue.name=Blaue Lampe +tile.actuallyadditions.blockColoredLampGray.name=Graue Lampe +tile.actuallyadditions.blockColoredLampLightGray.name=Hellgraue Lampe +tile.actuallyadditions.blockColoredLampGreen.name=Grüne Lampe +tile.actuallyadditions.blockColoredLampBlack.name=Schwarze Lampe +tile.actuallyadditions.blockColoredLampBrown.name=Braune Lampe +tile.actuallyadditions.blockColoredLampRed.name=Rote Lampe +tile.actuallyadditions.blockColoredLampLime.name=Hellgrüne Lampe +tile.actuallyadditions.blockColoredLampPink.name=Rosa Lampe +tile.actuallyadditions.blockColoredLampCyan.name=Hellblaue Lampe +tile.actuallyadditions.blockColoredLampPurple.name=Violette Lampe +tile.actuallyadditions.blockPhantomface.name=Phantom Oberfläche +tile.actuallyadditions.blockPhantomEnergyface.name=Phantom Energie-Oberfläche +tile.actuallyadditions.blockPhantomLiquiface.name=Phantom Liqui-Oberfläche +tile.actuallyadditions.blockPhantomPlacer.name=Phantom Platzierer +tile.actuallyadditions.blockPhantomBreaker.name=Phantom Abbauer +tile.actuallyadditions.blockLavaFactoryController.name=Lavafabrik-Kollektor +tile.actuallyadditions.blockMiscLavaFactoryCase.name=Gehäuse +tile.actuallyadditions.blockFluidPlacer.name=Flüssigkeitenplatzierer +tile.actuallyadditions.blockFluidCollector.name=Flüssigkeitenkollektor +tile.actuallyadditions.blockPhantomBooster.name=Phantom-Booster +tile.actuallyadditions.blockCoffee.name=Kaffeepflanze +tile.actuallyadditions.blockWildCanola.name=Wilder Raps +tile.actuallyadditions.blockWildRice.name=Wilder Reis +tile.actuallyadditions.blockWildCoffee.name=Wilder Kaffee +tile.actuallyadditions.blockWildFlax.name=Wilder Flachs +tile.actuallyadditions.blockTestifiBucksGreenWall.name=Ethetischer Grüner Block +tile.actuallyadditions.blockTestifiBucksWhiteWall.name=Ethetischer Quarz +tile.actuallyadditions.blockTestifiBucksGreenStairs.name=Ethetische Grüne Treppe +tile.actuallyadditions.blockTestifiBucksWhiteStairs.name=Ethetische Quarztreppe +tile.actuallyadditions.blockTestifiBucksGreenSlab.name=Ethetische Grüne Stufe +tile.actuallyadditions.blockTestifiBucksWhiteSlab.name=Ethetische Quarzstufe +tile.actuallyadditions.blockCanola.name=Rapspflanze +tile.actuallyadditions.blockTreasureChest.name=Schatzkiste +tile.actuallyadditions.blockCanolaPress.name=Rapspresse +tile.actuallyadditions.blockFermentingBarrel.name=Fermentierungsfass +tile.actuallyadditions.blockCanolaOil.name=Rapspflanze +tile.actuallyadditions.blockOil.name=Öl +tile.actuallyadditions.blockMiscEnderpearl.name=Enderperlenblock +tile.actuallyadditions.blockOilGenerator.name=Ölgenerator +tile.actuallyadditions.blockBreaker.name=Automatischer Abbauer +tile.actuallyadditions.blockPlacer.name=Automatischer Platzierer +tile.actuallyadditions.blockDropper.name=Automatischer Präzisionsspender +tile.actuallyadditions.blockMiscEnderCasing.name=Endergehäuse +tile.actuallyadditions.blockFlax.name=Flachspflanze +tile.actuallyadditions.blockCoffeeMachine.name=Kaffeemaschine +tile.actuallyadditions.blockXPSolidifier.name=Erfahrungsverdichter +tile.actuallyadditions.blockSmileyCloud.name=Smiley-Wolke +tile.actuallyadditions.blockLeafGenerator.name=Blätteressender Generator +tile.actuallyadditions.blockDirectionalBreaker.name=Abbauer (große Reichweite) +tile.actuallyadditions.blockRangedCollector.name=Kollektor (große Reichweite) +tile.actuallyadditions.blockLaserRelay.name=Laserrelais +tile.actuallyadditions.blockMiscIronCasing.name=Eisengehäuse +tile.actuallyadditions.blockBlackLotus.name=Schwarze Lotos +tile.actuallyadditions.blockTestifiBucksWhiteFence.name=Ethetische Quarz Wand +tile.actuallyadditions.blockTestifiBucksGreenFence.name=Ethetische Grüne Wand +tile.actuallyadditions.blockAtomicReconstructor.name=Atomarer Umwandler +tile.actuallyadditions.blockCrystalRed.name=Restonia Kristallblock +tile.actuallyadditions.blockCrystalBlue.name=Palis Kristallblock +tile.actuallyadditions.blockCrystalLightBlue.name=Diamatin Kristallblock +tile.actuallyadditions.blockCrystalGreen.name=Emeradik Kristallblock +tile.actuallyadditions.blockCrystalBlack.name=Void Kristallblock +tile.actuallyadditions.blockCrystalWhite.name=Enori Kristallblock +tile.actuallyadditions.blockBookStand.name=Handbuchständer +tile.actuallyadditions.blockMiner.name=Senkrechter Diggah +tile.actuallyadditions.blockFireworkBox.name=Feuerwerkskiste +tile.actuallyadditions.blockQuartzWall.name=Schwarze Quarzwand +tile.actuallyadditions.blockQuartzStair.name=Schwarze Quarztreppe +tile.actuallyadditions.blockQuartzSlab.name=Schwarze Quarzstufe +tile.actuallyadditions.blockChiseledQuartzWall.name=Gemeißelte Schwarze Quarzwand +tile.actuallyadditions.blockChiseledQuartzStair.name=Gemeißelte Schwarze Quarztreppe +tile.actuallyadditions.blockChiseledQuartzSlab.name=Gemeißelte Schwarze Quarzstufe +tile.actuallyadditions.blockPillarQuartzWall.name=Schwarze Quarz-Säulenwand +tile.actuallyadditions.blockPillarQuartzStair.name=Schwarze Quarz-Säulentreppe +tile.actuallyadditions.blockPillarQuartzSlab.name=Schwarze Quarz-Säulenstufe + +#ESD / ESG +tile.actuallyadditions.blockInputter.name=ESG +tile.actuallyadditions.blockInputterAdvanced.name=Hochwertiger ESG +tile.actuallyadditions.blockInputter.add.1.name=Ellpeck's Slot Gerät +tile.actuallyadditions.blockInputter.add.2.name=Entstellter Sack-Gouda +tile.actuallyadditions.blockInputter.add.3.name=Episches System-Gadget +tile.actuallyadditions.blockInputter.add.4.name=Einmaliges Scheingeschäft +tile.actuallyadditions.blockInputter.add.5.name=Ein Surreales Gänseblümchen +tile.actuallyadditions.blockInputter.add.6.name=Elektronischer Sachen-Gegenstand +tile.actuallyadditions.blockInputter.add.7.name=Einmachglas Saurer Gurken +tile.actuallyadditions.blockInputter.add.8.name=Eigenartig-Schräger Giraffenhals +tile.actuallyadditions.blockInputter.add.9.name=Einfach Schlechter Gartenarchitekt +tile.actuallyadditions.blockInputter.add.10.name=Eindringlich Schauender Gaffer +tile.actuallyadditions.blockInputter.add.11.name=Einarmig Schaffender Gastarbeiter +tile.actuallyadditions.blockInputter.add.12.name=Einfältig Spielender Gaukler +tile.actuallyadditions.blockInputter.add.13.name=Eingelaugtes Salz-Gebäck +tile.actuallyadditions.blockInputter.add.14.name=Eierlegendes Schreck-Gebilde +tile.actuallyadditions.blockInputter.add.15.name=Exzellentes Spaghetti-Gericht + +#Items / Gegenstände +item.actuallyadditions.itemDrill.name=Bohrer +item.actuallyadditions.itemFoodRice.name=Reis +item.actuallyadditions.itemFoodDoughnut.name=Krapfen +item.actuallyadditions.itemMiscRiceDough.name=Reisteig +item.actuallyadditions.itemFoodRiceBread.name=Reisbrot +item.actuallyadditions.itemRiceSeed.name=Reissaat +item.actuallyadditions.itemMiscTinyCoal.name=Winzige Kohle +item.actuallyadditions.itemMiscTinyCharcoal.name=Winzige Holzkohle +item.actuallyadditions.itemMiscRiceSlime.name=Reisschleimball +item.actuallyadditions.itemBattery.name=Einzelne Batterie +item.actuallyadditions.itemBatteryDouble.name=Zweifache Batterie +item.actuallyadditions.itemBatteryTriple.name=Dreifache Batterie +item.actuallyadditions.itemBatteryQuadruple.name=Vierfache Batterie +item.actuallyadditions.itemBatteryQuintuple.name=Fünffache Batterie +item.actuallyadditions.itemGrowthRing.name=Ring des Wachstums +item.actuallyadditions.itemWaterRemovalRing.name=Ring der Flüssigkeitsverbannung +item.actuallyadditions.itemSuctionRing.name=Ring der Magnetisierung +item.actuallyadditions.itemBucketCanolaOil.name=Rapsöleimer +item.actuallyadditions.itemBucketOil.name=Öleimer +item.actuallyadditions.itemWingsOfTheBats.name=Flügel der Fledermäuse +item.actuallyadditions.itemMiscBatWing.name=Fledermausflügel +item.actuallyadditions.woodenPaxel.name=Holz-AIEW +item.actuallyadditions.stonePaxel.name=Stein-AIEW +item.actuallyadditions.ironPaxel.name=Eisen-AIEW +item.actuallyadditions.goldPaxel.name=Gold-AIEW +item.actuallyadditions.diamondPaxel.name=Diamant-AIEW +item.actuallyadditions.emeraldPaxel.name=Smaragd-AIEW +item.actuallyadditions.obsidianPaxel.name=Obsidian-AIEW +item.actuallyadditions.quartzPaxel.name=Schwarzes Quarz-AIEW +item.actuallyadditions.paxelTFCopper.name=Kupfer-AIEW (TF) +item.actuallyadditions.paxelTFTin.name=Zinn-AIEW (TF) +item.actuallyadditions.paxelTFLead.name=Blei-AIEW (TF) +item.actuallyadditions.paxelTFSilver.name=Silber-AIEW (TF) +item.actuallyadditions.paxelTFElectrum.name=Elektrum-AIEW (TF) +item.actuallyadditions.paxelTFNickel.name=Eisen-AIEW (TF) +item.actuallyadditions.paxelTFBronze.name=Bronze-AIEW (TF) +item.actuallyadditions.paxelTFPlatinum.name=Glänzendes AIEW (TF) +item.actuallyadditions.paxelTFInvar.name=Invar-AIEW (TF) +item.actuallyadditions.paxelMTObsidian.name=Obsidian-AIEW (MT) +item.actuallyadditions.paxelMTGlowstone.name=Glowstone-AIEW (MT) +item.actuallyadditions.paxelMTLapisLazuli.name=Lapis Lazuli-AIEW (MT) +item.actuallyadditions.paxelMTOsmium.name=Osmium-AIEW (MT) +item.actuallyadditions.paxelMTBronze.name=Bronze-AIEW (MT) +item.actuallyadditions.paxelMTSteel.name=Stahl-AIEW (MT) +item.actuallyadditions.paxelSOadamantium.name=Adamantium-AIEW (SO) +item.actuallyadditions.paxelSOcopper.name=Kupfer-AIEW (SO) +item.actuallyadditions.paxelSOtin.name=Zinn-AIEW (SO) +item.actuallyadditions.paxelSOonyx.name=Onyx-AIEW (SO) +item.actuallyadditions.paxelSOmythril.name=Mythril-AIEW (SO) +item.actuallyadditions.itemPhantomConnector.name=Phantom-Verbinder +item.actuallyadditions.itemMiscCup.name=Leere Tasse +item.actuallyadditions.itemCoffee.name=Tasse Kaffee +item.actuallyadditions.itemCoffeeSeed.name=Kaffeesaat +item.actuallyadditions.itemCoffeeBeans.name=Kaffeebohnen +item.actuallyadditions.itemCanolaSeed.name=Rapssaat +item.actuallyadditions.itemMiscCanola.name=Raps +item.actuallyadditions.itemResonantRice.name=Resonanz-Reis +item.actuallyadditions.itemDrillUpgradeSpeed.name=Bohrerverbesserung: Effizienz I +item.actuallyadditions.itemDrillUpgradeSpeedII.name=Bohrerverbesserung: Effizienz II +item.actuallyadditions.itemDrillUpgradeSpeedIII.name=Bohrerverbesserung: Effizienz III +item.actuallyadditions.itemDrillUpgradeSilkTouch.name=Bohrerverbesserung: Behutsamkeit +item.actuallyadditions.itemDrillUpgradeFortune.name=Bohrerverbesserung: Glück I +item.actuallyadditions.itemDrillUpgradeFortuneII.name=Bohrerverbesserung: Glück II (Gibt Glück III!) +item.actuallyadditions.itemDrillUpgradeBlockPlacing.name=Bohrerverbesserung: Blockplazierung +item.actuallyadditions.itemDrillUpgradeThreeByThree.name=Bohrerverbesserung: Abbau I +item.actuallyadditions.itemDrillUpgradeFiveByFive.name=Bohrerverbesserung: Abbau II +item.actuallyadditions.itemMiscMashedFood.name=Püriertes Essen +item.actuallyadditions.itemFertilizer.name=Düngemaschine +item.actuallyadditions.itemMiscDough.name=Teig +item.actuallyadditions.itemMiscPaperCone.name=Papierhut +item.actuallyadditions.itemMiscKnifeBlade.name=Messerklinge +item.actuallyadditions.itemMiscKnifeHandle.name=Messerheft +item.actuallyadditions.itemMiscBlackQuartz.name=Schwarzer Quarz +item.actuallyadditions.itemMiscRing.name=Ring +item.actuallyadditions.itemTeleStaff.name=Teleportations-Zauberstab +item.actuallyadditions.itemJamCuBaRa.name=JoBaHi-Marmelade +item.actuallyadditions.itemJamGraKiBa.name=WeiKiBa-Marmelade +item.actuallyadditions.itemJamPlApLe.name=PfApZit-Marmelade +item.actuallyadditions.itemJamChApCi.name=KirApZi-Marmelade +item.actuallyadditions.itemJamHoMeKi.name=HoMeKi-Marmelade +item.actuallyadditions.itemJamHoMeCo.name=HoMeKo-Marmelade +item.actuallyadditions.itemJamPiCo.name=AnKo-Marmelade +item.actuallyadditions.itemHairyBall.name=Haarknäuel +item.actuallyadditions.itemLeafBlower.name=Laubbläser +item.actuallyadditions.itemLeafBlowerAdvanced.name=Hochwertiger Laubbläser +item.actuallyadditions.itemKnife.name=Messer +item.actuallyadditions.itemPickaxeEmerald.name=Smaragdspitzhacke +item.actuallyadditions.itemAxeEmerald.name=Smaragdaxt +item.actuallyadditions.itemShovelEmerald.name=Smaragdschaufel +item.actuallyadditions.itemHoeEmerald.name=Smaragdhacke +item.actuallyadditions.itemSwordEmerald.name=Smaragdschwert +item.actuallyadditions.itemPickaxeQuartz.name=Schwarze Quarzspitzhacke +item.actuallyadditions.itemAxeQuartz.name=Schwarze Quarzaxt +item.actuallyadditions.itemShovelQuartz.name=Schwarze Quarzschaufel +item.actuallyadditions.itemHoeQuartz.name=Schwarze Quarzhacke +item.actuallyadditions.itemSwordQuartz.name=Schwarzes Quarzschwert +item.actuallyadditions.itemPickaxeObsidian.name=Obsidianspitzhacke +item.actuallyadditions.itemAxeObsidian.name=Obsidianaxt +item.actuallyadditions.itemShovelObsidian.name=Obsidianschaufel +item.actuallyadditions.itemHoeObsidian.name=Obsidianhacke +item.actuallyadditions.itemSwordObsidian.name=Obsidianschwert +item.actuallyadditions.itemCrafterOnAStick.name=Mobile Werkbank +item.actuallyadditions.itemFoodBaguette.name=Baguette +item.actuallyadditions.itemFoodPizza.name=Pizza +item.actuallyadditions.itemFoodHamburger.name=Hamburger +item.actuallyadditions.itemFoodBigCookie.name=Großer Keks +item.actuallyadditions.itemFoodSubmarineSandwich.name=U-Boot-Sandwich +item.actuallyadditions.itemFoodToast.name=Toastbrot +item.actuallyadditions.itemFoodChocolateToast.name=Arme Ritter mit Schokolade +item.actuallyadditions.itemFoodChocolate.name=Schokolade +item.actuallyadditions.itemFoodChocolateCake.name=Schokoladenkuchen +item.actuallyadditions.itemFoodNoodle.name=Nudel +item.actuallyadditions.itemFoodSpaghetti.name=Spaghetti +item.actuallyadditions.itemFoodFrenchFry.name=Pomme frite +item.actuallyadditions.itemFoodFrenchFries.name=Pommes frites +item.actuallyadditions.itemFoodFishNChips.name=Bratfisch mit Pommes frites +item.actuallyadditions.itemFoodCarrotJuice.name=Karottensaft +item.actuallyadditions.itemFoodPumpkinStew.name=Kürbiseintopf +item.actuallyadditions.itemFoodCheese.name=Käse +item.actuallyadditions.itemMiscCoil.name=Spule +item.actuallyadditions.itemMiscCoilAdvanced.name=Hochwertige Spule +item.actuallyadditions.itemPotionRing.name=Ring der #this line may cause grammatical issues +item.actuallyadditions.itemPotionRingAdvanced.name=Hochwertiger Ring der #this line may cause grammatical issues +item.actuallyadditions.itemSolidifiedExperience.name=Verdichtete Erfahrung +item.actuallyadditions.itemDustIron.name=Gebrochenes Eisen +item.actuallyadditions.itemDustGold.name=Gebrochenes Gold +item.actuallyadditions.itemDustDiamond.name=Gebrochener Diamant +item.actuallyadditions.itemDustLapis.name=Gebrochener Lapislazuli +item.actuallyadditions.itemDustEmerald.name=Gebrochener Smaragd +item.actuallyadditions.itemDustQuartz.name=Gebrochener Quarz +item.actuallyadditions.itemDustCoal.name=Gebrochene Kohle +item.actuallyadditions.itemDustQuartzBlack.name=Gebrochener Schwarzer Quarz +item.actuallyadditions.itemFlaxSeed.name=Flachssaat +item.actuallyadditions.itemHelmObsidian.name=Obsidianhelm +item.actuallyadditions.itemChestObsidian.name=Obsidianbrustpanzer +item.actuallyadditions.itemPantsObsidian.name=Obsidianbeinschutz +item.actuallyadditions.itemBootsObsidian.name=Obsidianstiefel +item.actuallyadditions.itemHelmEmerald.name=Smaragdhelm +item.actuallyadditions.itemChestEmerald.name=Smaragdbrustpanzer +item.actuallyadditions.itemPantsEmerald.name=Smaragdbeinschutz +item.actuallyadditions.itemBootsEmerald.name=Smaragdstiefel +item.actuallyadditions.itemHelmQuartz.name=Schwarzer Quarzhelm +item.actuallyadditions.itemChestQuartz.name=Schwarzer Quarzbrustpanzer +item.actuallyadditions.itemPantsQuartz.name=Schwarzer Quarzbeinschutz +item.actuallyadditions.itemBootsQuartz.name=Schwarze Quarzstiefel +item.actuallyadditions.itemBooklet.name=Actually Additions Handbuch +item.actuallyadditions.itemLaserWrench.name=Laser-Schraubenschlüssel +item.actuallyadditions.itemChestToCrateUpgrade.name=Kiste auch Lagerkiste aufwerten +item.actuallyadditions.itemMiscDrillCore.name=Bohrerkern +item.actuallyadditions.itemMiscBlackDye.name=Schwarzer Farbstoff +item.actuallyadditions.itemCrystalRed.name=Restoniakristall +item.actuallyadditions.itemCrystalBlue.name=Paliskristall +item.actuallyadditions.itemCrystalLightBlue.name=Diamatinkristall +item.actuallyadditions.itemCrystalGreen.name=Emeradikkristall +item.actuallyadditions.itemCrystalBlack.name=Voidkristall +item.actuallyadditions.itemCrystalWhite.name=Enorikristall +item.actuallyadditions.itemMiscLens.name=Linse +item.actuallyadditions.itemColorLens.name=Farblinse +item.actuallyadditions.itemExplosionLens.name=Detonationslinse +item.actuallyadditions.itemDamageLens.name=Linse des sicheren Todes +item.actuallyadditions.itemCrateKeeper.name=Lagerkistenhalter +item.actuallyadditions.itemPickaxeCrystalRed.name=Restoniakristallspitzhacke +item.actuallyadditions.itemAxeCrystalRed.name=Restoniakristallaxt +item.actuallyadditions.itemShovelCrystalRed.name=Restoniakristallschaufel +item.actuallyadditions.itemSwordCrystalRed.name=Restoniakristallschwert +item.actuallyadditions.itemHoeCrystalRed.name=Restoniakristallhacke +item.actuallyadditions.itemHelmCrystalRed.name=Restoniakristallhelm +item.actuallyadditions.itemChestCrystalRed.name=Restoniakristallbrustpanzer +item.actuallyadditions.itemPantsCrystalRed.name=Restoniakristallbeinschutz +item.actuallyadditions.itemBootsCrystalRed.name=Restoniakristallstiefel +item.actuallyadditions.itemPickaxeCrystalBlue.name=Paliskristallspitzhacke +item.actuallyadditions.itemAxeCrystalBlue.name=Paliskristallaxt +item.actuallyadditions.itemShovelCrystalBlue.name=Paliskristallschaufel +item.actuallyadditions.itemSwordCrystalBlue.name=Paliskristallschwert +item.actuallyadditions.itemHoeCrystalBlue.name=Paliskristallhacke +item.actuallyadditions.itemHelmCrystalBlue.name=Paliskristallhelm +item.actuallyadditions.itemChestCrystalBlue.name=Paliskristallbrustpanzer +item.actuallyadditions.itemPantsCrystalBlue.name=Paliskristallbeinschutz +item.actuallyadditions.itemBootsCrystalBlue.name=Paliskristallstiefel +item.actuallyadditions.itemPickaxeCrystalLightBlue.name=Diamatinkristallspitzhacke +item.actuallyadditions.itemAxeCrystalLightBlue.name=Diamatinkristallaxt +item.actuallyadditions.itemShovelCrystalLightBlue.name=Diamatinkristallschaufel +item.actuallyadditions.itemSwordCrystalLightBlue.name=Diamatinkristallschwert +item.actuallyadditions.itemHoeCrystalLightBlue.name=Diamatinkristallhacke +item.actuallyadditions.itemHelmCrystalLightBlue.name=Diamatinkristallhelm +item.actuallyadditions.itemChestCrystalLightBlue.name=Diamatinkristallbrustpanzer +item.actuallyadditions.itemPantsCrystalLightBlue.name=Diamatinkristallbeinschutz +item.actuallyadditions.itemBootsCrystalLightBlue.name=Diamatinkristallstiefel +item.actuallyadditions.itemPickaxeCrystalBlack.name=Voidkristallspitzhacke +item.actuallyadditions.itemAxeCrystalBlack.name=Voidkristallaxt +item.actuallyadditions.itemShovelCrystalBlack.name=Voidkristallschaufel +item.actuallyadditions.itemSwordCrystalBlack.name=Voidkristallschwert +item.actuallyadditions.itemHoeCrystalBlack.name=Voidkristallhacke +item.actuallyadditions.itemHelmCrystalBlack.name=Voidkristallhelm +item.actuallyadditions.itemChestCrystalBlack.name=Voidkristallbrustpanzer +item.actuallyadditions.itemPantsCrystalBlack.name=Voidkristallbeinschutz +item.actuallyadditions.itemBootsCrystalBlack.name=Voidkristallstiefel +item.actuallyadditions.itemPickaxeCrystalGreen.name=Emeradikkristallspitzhacke +item.actuallyadditions.itemAxeCrystalGreen.name=Emeradikkristallaxt +item.actuallyadditions.itemShovelCrystalGreen.name=Emeradikkristallschaufel +item.actuallyadditions.itemSwordCrystalGreen.name=Emeradikkristallschwert +item.actuallyadditions.itemHoeCrystalGreen.name=Emeradikkristallhacke +item.actuallyadditions.itemHelmCrystalGreen.name=Emeradikkristallhelm +item.actuallyadditions.itemChestCrystalGreen.name=Emeradikkristallbrustpanzer +item.actuallyadditions.itemPantsCrystalGreen.name=Emeradikkristallbeinschutz +item.actuallyadditions.itemBootsCrystalGreen.name=Emeradikkristallstiefel +item.actuallyadditions.itemPickaxeCrystalWhite.name=Enorikristallspitzhacke +item.actuallyadditions.itemAxeCrystalWhite.name=Enorikristallaxt +item.actuallyadditions.itemShovelCrystalWhite.name=Enorikristallschaufel +item.actuallyadditions.itemSwordCrystalWhite.name=Enorikristallschwert +item.actuallyadditions.itemHoeCrystalWhite.name=Enorikristallhacke +item.actuallyadditions.itemHelmCrystalWhite.name=Enorikristallhelm +item.actuallyadditions.itemChestCrystalWhite.name=Enorikristallbrustpanzer +item.actuallyadditions.itemPantsCrystalWhite.name=Enorikristallbeinschutz +item.actuallyadditions.itemBootsCrystalWhite.name=Enorikristallstiefel +item.actuallyadditions.itemPaxelCrystalRed.name=Restoniakristall-AIEW +item.actuallyadditions.itemPaxelCrystalBlue.name=Paliskristall-AIEW +item.actuallyadditions.itemPaxelCrystalLightBlue.name=Diamatinkristall-AIEW +item.actuallyadditions.itemPaxelCrystalBlack.name=Voidkristall-AIEW +item.actuallyadditions.itemPaxelCrystalWhite.name=Enorikristall-AIEW +item.actuallyadditions.itemPaxelCrystalGreen.name=Emeradikkristall-AIEW +item.actuallyadditions.itemFoodBacon.name=Speck + +#Tooltips +tooltip.actuallyadditions.onSuffix.desc=An +tooltip.actuallyadditions.phantom.connected.desc= +tooltip.actuallyadditions.phantom.stored.desc= +tooltip.actuallyadditions.phantom.unbound.desc=Die Verbindung wurde aufgelöst! +tooltip.actuallyadditions.boundTo.desc=Verbunden mit +tooltip.actuallyadditions.clearStorage.desc=Plaziere es in einer Werkbank, um den Speicher zu leeren! +tooltip.actuallyadditions.phantom.connectedRange.desc=Die Verbindung ist ausgezeichnet und funktioniert. +tooltip.actuallyadditions.phantom.connectedNoRange.desc=Die Verbindung ist blockiert: Es ist entweder zu weit entfernt, in nicht-geladenen Chunks oder nicht der richtige Blocktyp für dieses Phantom. +tooltip.actuallyadditions.phantom.notConnected.desc=Es besteht keine Verbindung! +tooltip.actuallyadditions.phantom.blockInfo.desc=Der verbundene Block ist %s bei %s, %s, %s in %s Blöcken Entfernung. +tooltip.actuallyadditions.factory.notPart.desc=Der Regler ist kein Teil des richtigen Multi-Blocks! Siehe dir die Regler-Beschreibung an! +tooltip.actuallyadditions.factory.works.desc=Diese Lavafabrik ist komplett und kann nun Lava produzieren! +tooltip.actuallyadditions.oredictName.desc=OreDictionary-Einträge +tooltip.actuallyadditions.noOredictNameAvail.desc=Keine +tooltip.actuallyadditions.codeName.desc=Codename +tooltip.actuallyadditions.baseUnlocName.desc=Unlokalisierter Name des Gegenstands +tooltip.actuallyadditions.unlocName.desc=Unlokalisierter Name der Meta +tooltip.actuallyadditions.disablingInfo.desc=Wenn du diese Informationen nicht sehen möchtest, deaktiviere sie in den Actually Additions-Einstellungen! +tooltip.actuallyadditions.ctrlForMoreInfo.desc=Drücke STRG für weitere Informationen +tooltip.actuallyadditions.extraInfo.desc=Erweiterte Informationen +tooltip.actuallyadditions.blockPhantomRange.desc=Reichweite +tooltip.actuallyadditions.laser.stored.desc= +tooltip.actuallyadditions.laser.connected.desc= +tooltip.actuallyadditions.laser.cantConnect.desc=Kann nicht verbunden werden: Die Relais sind entweder nicht im selben Netzwerk, das gespeicherte Relais existiert nicht mehr oder es ist zu weit entfernt! +tooltip.actuallyadditions.itemBooklet.desc=Oder "Heft", wenn man möchte + +#Gui Information +info.actuallyadditions.gui.animals=Tiere +info.actuallyadditions.gui.enoughToBreed=Genügend um zu vermehren! +info.actuallyadditions.gui.tooMany=Zu viel, um vermehren zu können! +info.actuallyadditions.gui.notEnough=Nicht genügend, um zu vermehren! +info.actuallyadditions.gui.disabled=Deaktiviert +info.actuallyadditions.gui.up=Oben +info.actuallyadditions.gui.down=Unten +info.actuallyadditions.gui.north=Norden +info.actuallyadditions.gui.east=Osten +info.actuallyadditions.gui.south=Süden +info.actuallyadditions.gui.west=Westen +info.actuallyadditions.gui.all=Alle +info.actuallyadditions.gui.put=Put #line couldn't be translatet for grammatical reasons +info.actuallyadditions.gui.pull=Pull #line couldn't be translatet for grammatical reasons +info.actuallyadditions.gui.whitelist=Whitelist +info.actuallyadditions.gui.blacklist=Blacklist +info.actuallyadditions.gui.coffee=Kaffee +info.actuallyadditions.gui.ok=Ok +info.actuallyadditions.gui.the=the #line couldn't be translatet for grammatical reasons +info.actuallyadditions.inputter.info.1=This is the first Slot in the connected Inventory to

at. #line couldn't be translatet for grammatical reasons +info.actuallyadditions.inputter.info.2=This is the slot after the last Slot in the connected Inventory to

at. What that means: If you, for example, write 2 in the field to the left and 5 in this one, it will

at Slot 2, 3, and 4. #line couldn't be translatet for grammatical reasons +info.actuallyadditions.inputter.whitelistInfo=This applies for this part of the white-/blacklist. The other side applies as well, so you can have some Items whitelisted and some blacklisted. Note that, if you have an empty blacklist or an item whitelisted on at least one side, it will always go through. #line couldn't be translatet for grammatical reasons +info.actuallyadditions.noLens=Keine Neigungen +info.actuallyadditions.booklet.manualName.1=Actually Additions +info.actuallyadditions.booklet.manualName.2=Handbuch +info.actuallyadditions.booklet.edition=Auflage + +#Container Names / Container-Namen +container.actuallyadditions.inputter.name=ESG +container.actuallyadditions.inputterAdvanced.name=Advanced ESG +container.actuallyadditions.grinder.name=Brecher +container.actuallyadditions.grinderDouble.name=Doppelter Brecher +container.actuallyadditions.furnaceDouble.name=Doppelter Ofen +container.actuallyadditions.feeder.name=Automatischer Füterer +container.actuallyadditions.giantChest.name=Lagerkiste +container.actuallyadditions.repairer.name=Reparierer +container.actuallyadditions.placer.name=Platzierer +container.actuallyadditions.breaker.name=Abbauer +container.actuallyadditions.dropper.name=Prezisionsspender +container.actuallyadditions.crafting.name=Mobile Werkbank +container.actuallyadditions.canolaPress.name=Rapspresse +container.actuallyadditions.fermentingBarrel.name=Fermentierungsfass +container.actuallyadditions.coalGenerator.name=Kohlegenerator +container.actuallyadditions.oilGenerator.name=Ölgenerator +container.actuallyadditions.phantomPlacer.name=Phantomplatzierer +container.actuallyadditions.phantomBreaker.name=Phantomabbauer +container.actuallyadditions.phantomface.name=Phantomoberfläche +container.actuallyadditions.liquiface.name=Liqui-Oberfläche +container.actuallyadditions.energyface.name=Energieoberfläche +container.actuallyadditions.fluidPlacer.name=Flüssigkeitenplatzierer +container.actuallyadditions.fluidCollector.name=Flüssigkeitenkollektor +container.actuallyadditions.coffeeMachine.name=Kaffeemaschine +container.actuallyadditions.drill.name=Bohrer +container.actuallyadditions.energizer.name=Energetisierer +container.actuallyadditions.enervator.name=Schwächer +container.actuallyadditions.xpSolidifier.name=Erfahrungsverdichter +container.actuallyadditions.cloud.name=Smiley-Wolke +container.actuallyadditions.directionalBreaker.name=Brecher (große Reichweite) +container.actuallyadditions.rangedCollector.name=Kollektor (große Reichweite) +container.actuallyadditions.miner.name=Senkrechter Diggah + +#Update Information / Update-Informationen +info.actuallyadditions.update.generic=[{"text":"Es ist ein "},{"text":"Actually Additions","color":"dark_green"},{"text":"-Update verfügbar!","color":"none"}] +info.actuallyadditions.update.versionCompare=[{"text":"Verwendete Version: "},{"text":"%s","color":"dark_red"},{"text":", neuste Version: ","color":"none"},{"text":"%s","color":"dark_green"}] +info.actuallyadditions.update.buttons=[{"text":"["},{"text":"Klicke hier für den Changelog","color":"green","clickEvent":{"action":"open_url","value":"%s"}},{"text":"] [","color":"none"},{"text":"Klicke hier für den Download","color":"green","clickEvent":{"action":"open_url","value":"%s"}},{"text":"]","color":"none"}] +info.actuallyadditions.update.buttonOptions=Klick: Changelog, [Umschalt]-Klick: Download! (Im Browser) +info.actuallyadditions.update.failed=[{"text":"Die Überprüfung nach "},{"text":"Actually Additions","color":"dark_green"},{"text":"-Updates ist fehlgeschlagen! In den Logs findest du weite Informationen!","color":"none"}] + +#Achievements / Erfolge +achievement.actuallyadditions.openBooklet=Geschrei des Wissens +achievement.actuallyadditions.openBooklet.desc=Öffne ein Actually Additions-Handbuch + +achievement.actuallyadditions.nameSmileyCloud=Dein bester Freund +achievement.actuallyadditions.nameSmileyCloud.desc=Benenne eine Smiley-Wolke + +achievement.actuallyadditions.craftPhantomface=Zoom, Zoom, Gegenstände! +achievement.actuallyadditions.craftPhantomface.desc=Fertige eine Phantomoberfläche an. + +achievement.actuallyadditions.openTreasureChest=Verlies unter Wasser +achievement.actuallyadditions.openTreasureChest.desc=Offne eine Schatzkiste + +achievement.actuallyadditions.craftLiquiface=Zoom, Zoom, Flüssigkeiten! +achievement.actuallyadditions.craftLiquiface.desc=Fertige eine Liqui-Oberfläche an. + +achievement.actuallyadditions.craftEnergyface=Zoom, Zoom, RF! +achievement.actuallyadditions.craftEnergyface.desc=Fertige eine Phantom-Energie-Oberfläche an. + +achievement.actuallyadditions.craftCoalGen=Furnace for cools +achievement.actuallyadditions.craftCoalGen.desc=Fertige einen Kohle-Generator an. + +achievement.actuallyadditions.craftLeafGen=Mampf, Alter! +achievement.actuallyadditions.craftLeafGen.desc=Fertige einen blätterfressenden Generator an. + +achievement.actuallyadditions.craftReconstructor=Bzrrrr etwas anderes +achievement.actuallyadditions.craftReconstructor.desc=Fertige einen Atomaren Umwandler an. + +achievement.actuallyadditions.craftLaserRelay=Weitergeschoben, nicht aufgeschoben! +achievement.actuallyadditions.craftLaserRelay.desc=Fertige ein Laser-Relais an. + +achievement.actuallyadditions.craftCrusher=Verdoppeln! +achievement.actuallyadditions.craftCrusher.desc=Fertige einen Brecher an. + +achievement.actuallyadditions.pickUpCoffee=Macht dich süchtig +achievement.actuallyadditions.pickUpCoffee.desc=Ernte etwas Kaffee + +achievement.actuallyadditions.craftCoffeeMachine=Sucht in Tassen +achievement.actuallyadditions.craftCoffeeMachine.desc=Fertige eine Kaffeemaschine an. + +#Booklet Recipe Names / Rezept-Namen (Büchlein) +booklet.actuallyadditions.shapelessRecipe=Formloses Rezept +booklet.actuallyadditions.shapedRecipe=Geformtes Rezept +booklet.actuallyadditions.shapelessOreRecipe=Formloses OreDictionary-Rezept +booklet.actuallyadditions.shapedOreRecipe=Geformtes OreDictionary-Rezept + +#Booklet Entries / Handbuch-Einträge +booklet.actuallyadditions.indexEntry.gettingStarted.name=Erste Schritte +booklet.actuallyadditions.indexEntry.misc.name=Verschiedenes +booklet.actuallyadditions.indexEntry.functionalNoRF.name=Blöcke, die nicht RF benutzen +booklet.actuallyadditions.indexEntry.allAndSearch.name=Alle Gegenstände und Suche +booklet.actuallyadditions.indexEntry.functionalRF.name=Blöcke, die RF benutzen +booklet.actuallyadditions.indexEntry.generatingRF.name=Blöcke, die RF herstellen +booklet.actuallyadditions.indexEntry.itemsNoRF.name=Gegenstände, die nicht RF benutzen +booklet.actuallyadditions.indexEntry.itemsRF.name=Gegenstände, die RF benutzen + +#Booklet Info / Handbuch-Informationen +booklet.actuallyadditions.recipeDisabled=Das Rezept für diesen Gegenstand ist deaktiviert! Wenn du dich auf einem Server befindest, frage den Besitzer, es für dich zu aktivieren. Im Einzelspieler-Modus, kannst du einfach oben rechts auf 'Config öffnen' klicken und das Rezept aktivieren! +booklet.actuallyadditions.clickToSeeRecipe=Klicke, um weitere Informationen zu erhalten. +booklet.actuallyadditions.amountOfWords=%s Wörter insgesamt +booklet.actuallyadditions.amountOfChars=%s Zeichen insgesamt + +#Booklet Chapters +booklet.actuallyadditions.chapter.intro.name=An Introduction to ActAdd +booklet.actuallyadditions.chapter.intro.text.1=For too long have the people of Minecraftia toiled under a relentless whip. A whip more hurtful and more injurious than that of any slave-master: inconvenience. Aye, the thousand million inconveniences that make up the grind, that force players to waste hours- nay, days!- chopping wood and farming wheat and other such mundane tasks, just to momentarily escape the remorseless tedium and experience the true joys of Minecraftia, building, caving and adventuring into the beautiful uncharted abundance +booklet.actuallyadditions.chapter.intro.text.2=of the world. Yet no sooner has one immersed oneself in this creative enterprise than the inconveniences return, like millions of furious bees pestering, stinging, swarming all over you until the game ceases to be enjoyable, and you are driven away from it forever. To that end, a certain Ellpeck has created this Actual Addition to the world of Minecraft, that will allow the player to better engage with the core experiences of the game- building and adventuring- by automating and streamlining the monotony that +booklet.actuallyadditions.chapter.intro.text.3=is grinding in Minecraft. Therefore, Ellpeck humbly presents to you this Actually Additions Manual, that shall teach you the ways of this modification and, ultimately, allow you to transcend inconvenience and attain enlightenment. ~by Tulkas + +booklet.actuallyadditions.chapter.craftingIngs.name=Crafting Ingredients +booklet.actuallyadditions.chapter.craftingIngs.text.1=Actually Additions has lots of items that use certain basic crafting items to be crafted. This chapter has all of these basic items grouped up so that you can see all of them at once. + +booklet.actuallyadditions.chapter.quartz.name=Black Quartz +booklet.actuallyadditions.chapter.quartz.text.1=Black Quartz is an Ore that generates in the world between layer and . When broken, it can be smelted in a furnace or crushed in a crusher to get broken down into Black Quartz. +booklet.actuallyadditions.chapter.quartz.text.2=Black Quartz items are used in lots of Crafting Recipes in Actually Additions. They are very important for most of the Items and, thus, should be mined when found in the world. They can be crafted into a couple of different Decorative Blocks shown on the following pages. Every variant can also be crafted into Stairs, Slabs and Walls using the well-known recipes. Nether Quartz, but deadlier + +booklet.actuallyadditions.chapter.cloud.name=Smiley Cloud +booklet.actuallyadditions.chapter.cloud.text.1=The Smiley Cloud is a magical floating cloud which is getting put to life through the piece of Solidified Experience inside it. It hovers up and down in its place all jolly and fun, and when right-clicking, you can give it a name. When giving it certain special names like "Ellpeck" or "AcidBlues", it will have some special items it carries! + +booklet.actuallyadditions.chapter.coalStuff.name=Coal Stuff +booklet.actuallyadditions.chapter.coalStuff.text.1=Sometimes your Coal just burns for too long or too short, you know what I mean? For that, you can now craft Tiny Coal, Tiny Charcoal and Blocks of Charcoal for using them in a furnace. While the Block of Charcoal burns for as long as a Block of Coal, the Tiny Coal and Tiny Charcoal will burn for one eighth of a piece of coal, meaning it will smelt one item in a normal furnace. + +booklet.actuallyadditions.chapter.lamps.name=Lamps +booklet.actuallyadditions.chapter.lamps.text.1=Lamps are a block providing lots of light, similar to the mystic Glowstone or Torches, but they can be dyed with all of the 16 different colors either by crafting them or by placing them on the ground and right-clicking them with a piece of dye. When right-clicking them with an empty hand, they will turn on and off. If you want them, however, to be toggled using Redstone Power, just place a Lamp Controller next to one. + +booklet.actuallyadditions.chapter.treasureChest.name=Treasure Chests +booklet.actuallyadditions.chapter.treasureChest.text.1=A Treasure Chest found underwater. +booklet.actuallyadditions.chapter.treasureChest.text.2=Treasure Chests are a semi-uncommon occurence in Ocean Biomes. They appear on the bottom of the sea, probably left there by bypassing Ships who threw off or lost some load. These Chests however, hold some valuable items, if you're lucky. Breaking them won't yield you anything, though, you just have to right-click them to receive some amazing goodies. + +booklet.actuallyadditions.chapter.breaker.name=Breakers and Placers +booklet.actuallyadditions.chapter.breaker.text.1=The Breaker breaks blocks in front of it. It can be oriented in every direction. When right-clicking it with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. +booklet.actuallyadditions.chapter.breaker.text.2=The Placer places blocks in front of it. It can be oriented in every direction. When right-clicking it with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. +booklet.actuallyadditions.chapter.breaker.text.3=The Liquid Placer places liquids you supply it with. It needs 1000mB to place one block. When right-clicking it with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. +booklet.actuallyadditions.chapter.breaker.text.4=The Liquid Collector will collect 1000mB of liquids in front of it, that's a filled bucket. When right-clicking it with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. + +booklet.actuallyadditions.chapter.phantomfaces.name=Phantomfaces +booklet.actuallyadditions.chapter.phantomfaces.text.1=Phantomfaces are a simple way to connect inventories together, they have a very important twist however: Instead of just connecting two inventories, a Phantomface simulates the inventory it is connected to, meaning you can put items into and pull out of the Phantomface itself. A Phantomface has a default range of blocks, but it can be upgraded with a Phantom Booster. Phantomfaces are connected by right-clicking an inventory with a Phantom Connector and then right-clicking the Phantomface. +booklet.actuallyadditions.chapter.phantomfaces.text.2=Important Information:It should be noted that the Phantomface is not supposed to be used as a wireless transport system. The Phantomface should be used when, for example, wanting to input items into a machine that doesn't have enough space for the amount of cables you need around it, or when you want it to look nice in a room without needing any cables or other blocks around it. It's not a short-range Tesseract. +booklet.actuallyadditions.chapter.phantomfaces.text.3=The default Phantomface works for items, like described on the first page. +booklet.actuallyadditions.chapter.phantomfaces.text.4=The Phantom Liquiface acts exactly like the normal Phantomface, but it works for liquid containing blocks. When given a Redstone Signal, it can be set to Auto-Output. Be careful with this though, as it could cause infinte loops and lag under certain conditions! +booklet.actuallyadditions.chapter.phantomfaces.text.5=The Phantom Energyface acts exactly like the normal Phantomface, but it works for RF, meaning you can connect it to things like Generators and Crushers. +booklet.actuallyadditions.chapter.phantomfaces.text.7=The Phantom Booster, as explained on the first page, ups the range of Phantomfaces by being placed on top of them. The maximum amount above one Phantomface is 3. + +booklet.actuallyadditions.chapter.phantomBreaker.name=Phantom Breakers & Placers +booklet.actuallyadditions.chapter.phantomBreaker.text.1=Phantom Breakers and Placers work similarly to the normal Phantomfaces, except that they are used to break and place blocks from a distance. Their default range is Blocks. To connect them to blocks to break, do as described in the Phantomface Chapter. When connecting them to air spaces, just place a block, store it and then break it again. When right-clicking it with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. + +booklet.actuallyadditions.chapter.esd.name=ESDs +booklet.actuallyadditions.chapter.esd.text.1=The ESD is a block that works similar to a Hopper but has a lot more functionality. You can choose the sides to input and output and you can precisely configure the range of slots to look at! For more precise information about ESDs, craft one and hover over the elements in their GUI! Its actual name is + +booklet.actuallyadditions.chapter.xpSolidifier.name=Experience Solidifier +booklet.actuallyadditions.chapter.xpSolidifier.text.1=The Experience Solidifer uses the player's experience and turns it into Solidified Experience which can later be used by right-clicking to get the experience you stored into Item form back onto your character. This is a safe and easy way to store your experience so that it isn't getting lost when you die. Solidified Experience also drops from Monsters sometimes as an Extra. + +booklet.actuallyadditions.chapter.greenhouseGlass.name=Greenhouse Glass +booklet.actuallyadditions.chapter.greenhouseGlass.text.1=Greenhouse Glass is a very effective way to speed up the growth of your plants! When placed anywhere above the plant, as long as there are no blocks below obstructing the path, and there is sunlight above the glass, it will significantly speed up the growth of the plant! It obviously has to be daytime, too. Thought that was obvious. +booklet.actuallyadditions.chapter.greenhouseGlass.text.2=Greenhouse Gas + +booklet.actuallyadditions.chapter.fishingNet.name=Fishing Net +booklet.actuallyadditions.chapter.fishingNet.text.1=The Fishing Net is a block that makes fishing a lot easier! Just place it above some water and it will, given a little bit of time, automatically catch fish for you! To store the fish, just place a chest above the Fishing Net or let the items spew out of the top and collect them manually. For the impatient + +booklet.actuallyadditions.chapter.feeder.name=Feeder +booklet.actuallyadditions.chapter.feeder.text.1=The Feeder is a good alternative to a manual animal farm. Place it in the middle of an animal pen and supply it with some wheat, seeds or carrots, depending on the animal you want to feed, and just wait. It will automatically feed the animals and if there is enough animals near it, it will shut off on its own to prevent lag or animal overflow. Greenpeace approves + +booklet.actuallyadditions.chapter.compost.name=Compost and Fertilizer +booklet.actuallyadditions.chapter.compost.text.1=The Compost is used to make Fertilizier from Mashed Food. Fertilizer acts just like Bone Meal, but can be crafted in a much simpler manner just by crafting Mashed Food and then putting of those inside of a Compost and waiting for a bit. When the mashed food is composted, just take it out by right-clicking again. +booklet.actuallyadditions.chapter.compost.text.3=Mashed Food can be crafted from any type of food or plantable item. + +booklet.actuallyadditions.chapter.crate.name=Storage Crates +booklet.actuallyadditions.chapter.crate.text.1=Storage Crates are big. Really big. They hold tons of items, more than 4 chests worth of them. +booklet.actuallyadditions.chapter.crate.text.2=Placing a Storage Crate Keeper inside the Storage Crate before breaking it will cause it to keep all of its items, however the Keeper will be destroyed upon placing the Crate back down. +booklet.actuallyadditions.chapter.crate.text.3=The Chest To Storage Crate Upgrade allows you to convert any chest into a Storage Crate, retaining its items! Just shift-right-click onto the chest to apply it. + +booklet.actuallyadditions.chapter.coffeeMachine.name=Coffee Machine +booklet.actuallyadditions.chapter.coffeeMachine.text.1=The Coffee Machine is a block used to make Coffee, a potion-like item that gives the user several buffs. To use the coffee machine, you need a Empty Cup, Coffee Beans, which can be found in the wild, harvested and planted on farmland again, RF/t and mB of Water per cup brewed. On the coffee machine recipe pages at the back, to see what the item does, just hover over the Cup of Coffee. +booklet.actuallyadditions.chapter.coffeeMachine.text.2=To actually give your coffee some buffs, put some of the items shown on the later pages into the slots on the right. The more slots are filled up with one item, the higher the Amplifier of the effect will be. The Maximum Amplifier is the max amount of items to be put into one coffee. Order matters: When using, for example, Milk (to see what it does exactly, go to a later page), you are going to have to plan the items out inside the numbered slots in such a way that it brews the coffee you want. +booklet.actuallyadditions.chapter.coffeeMachine.text.3=This is an example of a recipe making a coffee containing Fire Resistance 1 for 0:20 and Speed 1 for 2:30. +booklet.actuallyadditions.chapter.coffeeMachine.text.6=Milk is an important item when brewing coffee: It adds 2 minutes to all effects of items in slots with lower numbers while removing 1 amplifier. When the amplifier of an effect is 1, however, it will remove the effect. +booklet.actuallyadditions.chapter.coffeeMachine.text.7=The fact that you're reading this means that you either have HarvestCraft installed, or that you're looking at the lang file. This does the same thing as Milk, but for veggie guys. + +booklet.actuallyadditions.chapter.crusher.name=Crusher and Double Crusher +booklet.actuallyadditions.chapter.crusher.text.1=The Crusher turns every ore, ingot and gem into its corresponding dust using RF/t. When you put in Ores however, they will yield 2 pieces of dust. The Double Crusher basically does the same, however it can crush two ores at a time and uses RF/t. On the following pages, you can see some additional useful recipes for inside the crusher. He's my crush + +booklet.actuallyadditions.chapter.furnaceDouble.name=Double Furnace +booklet.actuallyadditions.chapter.furnaceDouble.text.1=The Double Furnace works like a furnace, however, it uses RF/t and can smelt two items at a time. + +booklet.actuallyadditions.chapter.lavaFactory.name=Lava Factory +booklet.actuallyadditions.chapter.lavaFactory.text.1=The Lava Factory can produce blocks of lava given RF/block. The Block above it has to be surrounded with 4 Casing Blocks, otherwise it won't be able to produce Lava. Right-Clicking on the Lava Factory will show you if it's able to produce Lava in its current setup. Lava, for a fact. ory + +booklet.actuallyadditions.chapter.energizer.name=Energizer and Enervator +booklet.actuallyadditions.chapter.energizer.text.1=The Energizer charges items that hold RF using its energy supply. +booklet.actuallyadditions.chapter.energizer.text.2=The Enervator discharges items that hold RF and stores the energy in its energy supply. + +booklet.actuallyadditions.chapter.repairer.name=Item Repairer +booklet.actuallyadditions.chapter.repairer.text.1=The Item Repairer uses RF/t to repair items that can be repaired in an Anvil without needing any materials! + +booklet.actuallyadditions.chapter.coalGen.name=Coal Generator +booklet.actuallyadditions.chapter.coalGen.text.1=The Coal Generator generates RF/t through the use of everything that can be put into a furnace. Note that it only starts burning something up if there's enough space for the energy generated. + +booklet.actuallyadditions.chapter.solarPanel.name=Solar Panel +booklet.actuallyadditions.chapter.solarPanel.text.1=The Solar Panel produces RF/t when it has direct daylight above it and it is daytime. Panelled walls + +booklet.actuallyadditions.chapter.heatCollector.name=Heat Collector +booklet.actuallyadditions.chapter.heatCollector.text.1=The Heat Collector is a block that produces RF/t. To do that, it needs to be surrounded with at least Lava Blocks directly around it on any side except the top one. But watch out, it sometimes destroys some of these Lava Blocks! + +booklet.actuallyadditions.chapter.canola.name=Everything Canola +booklet.actuallyadditions.chapter.canola.text.1=There is lots of stuff that can be produced from Canola (which can be found in the wild and then planted and harvested!): You can make Canola Oil, Oil and produce RF from it. The way to do that is to take some Canola, put it into a Canola Press which uses RF/t. That creates mB of Canola Oil. Put that into a Fermenting Barrel, let it sit there for a while before it converts into Oil. That oil can then be used in a Oil Generator to create RF/t. + +booklet.actuallyadditions.chapter.wings.name=Wings Of The Bats +booklet.actuallyadditions.chapter.wings.text.1=Sometimes, bats will drop Wings. These wings can't really be used to fly, but that's just because they're not powerful enough. To make them more powerful, you can craft Wings Of The Bats. When you have these in your inventory, they will allow you to fly like in creative mode. + +booklet.actuallyadditions.chapter.foods.name=Foodstuffs +booklet.actuallyadditions.chapter.foods.text.1=Yes, this is Bacon. Don't try naming it Ellspeck. Please, just don't. + +booklet.actuallyadditions.chapter.leafBlower.name=Leaf Blowers +booklet.actuallyadditions.chapter.leafBlower.text.1=The Leaf Blower can blow away tall grass, flowers and other stuff around you when you hold right-click. There is an Advanced Leaf Blower, which works like the basic one, except that it operates much faster and also breaks Leaves. + +booklet.actuallyadditions.chapter.aiots.name=All-In-One-Tools (AIOTs) +booklet.actuallyadditions.chapter.aiots.text.1=An All-In-One-Tool is a tool that is Pickaxe, Axe, Shovel, Sword and Hoe in one. They are available in every material and if you have Thermal Foundation or MekanismTools installed, there are even AIOTs made of their materials! + +booklet.actuallyadditions.chapter.jams.name=Jams +booklet.actuallyadditions.chapter.jams.text.1=Once, there was a Kitty who really wanted some Jam. So I made some Jam. Seriously, this is Jam. You can find it in Village Houses or buy it from the Jam Villager. Every Jam gives you two different potion effects! +booklet.actuallyadditions.chapter.jams.text.2=A Jam House and its inhabitant +booklet.actuallyadditions.chapter.jams.text.3=So. You're probably wondering what the names of the jams mean. Now, let me tell you: -Honeydew Melon and Kiwi -Honeydew Melon and Coconut -Pineapple and Coconut -Cherry, Apple and Cinnamon -Plum, Apple and Lemon -Grape, Kiwi and Banana -Currant, Banana and Raspberry Now, which one is which, you may ask? Figure it out yourself. + +booklet.actuallyadditions.chapter.potionRings.name=Potion Rings +booklet.actuallyadditions.chapter.potionRings.text.1=The Potion Rings have two versions: A normal version and an advanced version. The normal version, when you have it in your hand, will give you a Potion Effect of Level 1. The advanced version can be anywhere in your inventory and gives you an effect of Level 2! + +booklet.actuallyadditions.chapter.drill.name=Drills +booklet.actuallyadditions.chapter.drill.text.1=The Drill works like a Pickaxe and a Shovel. It uses RF per block. It can be charged in an Energizer and upgraded by right-clicking with it in your hand. There is a lot of upgrades, but here is an explanation of some of them: The Mining Uprgades enlarge the hole which the Drill digs. The Placement Upgrade, after you right-click it in any slot of your hotbar, will make the Drill able to place a block from that slot by right-clicking. You can also put a Battery inside the Drill to give it more charge. +booklet.actuallyadditions.chapter.drill.text.3=The Drill can also be dyed in Minecraft's 16 colors. It's only cosmetic and won't have any effect other than it looking different, however. + +booklet.actuallyadditions.chapter.staff.name=Staff +booklet.actuallyadditions.chapter.staff.text.1=The Teleport Staff, when charged in an Energizer, can be right-clicked to teleport you to where you're looking. When you are looking at a block, it will teleport you there, however, when you aren't looking at a block, you can only be looking upwards up to 5 degrees, otherwise the teleport will fail. + +booklet.actuallyadditions.chapter.magnetRing.name=Ring Of Magnetism +booklet.actuallyadditions.chapter.magnetRing.text.1=The Ring Of Magnetism, when it is charged in an Energizer and inside your inventory, uses RF to suck up items that are farther away than you can pick up by yourself. + +booklet.actuallyadditions.chapter.growthRing.name=Ring Of Growth +booklet.actuallyadditions.chapter.growthRing.text.1=The Ring Of Growth, when it is charged in an Energizer and in your hand, uses RF to make plants around you grow much faster. + +booklet.actuallyadditions.chapter.waterRemovalRing.name=Ring Of Liquid Banning +booklet.actuallyadditions.chapter.waterRemovalRing.text.1=The Ring Of Liquid Banning, when it is charged in an Energizer and in your hand, uses RF to remove Lava and Water. + +booklet.actuallyadditions.chapter.batteries.name=Batteries +booklet.actuallyadditions.chapter.batteries.text.1=Batteries are a good way to store RF to move around. They can be charged in an Energizer and discharged in an Enervator. + +booklet.actuallyadditions.chapter.leafGen.name=Leaf-Eating Generator +booklet.actuallyadditions.chapter.leafGen.text.1=The Leaf Generator can generate RF just by being placed alongside some Leaves. It will destroy the leaves, generating RF per leaf broken in the process. By right-clicking the generator, you can see how much RF it has stored. It has a range of blocks. +booklet.actuallyadditions.chapter.leafGen.text.2=Munchy + +booklet.actuallyadditions.chapter.longRangeBreaker.name=Long-Range Breaker +booklet.actuallyadditions.chapter.longRangeBreaker.text.1=The Long-Range Breaker works like a normal Breaker, but it can break up to blocks in front of it. Per block broken, it uses RF. When right-clicking it with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. Breaking the th wall +booklet.actuallyadditions.chapter.longRangeBreaker.text.2=Sequence Breaking + +booklet.actuallyadditions.chapter.dropper.name=Automatic Precision Dropper +booklet.actuallyadditions.chapter.dropper.text.1=The Automatic Precision Dropper works much like a normal dropper, but it will drop items without needing a Redstone Signal. It also won't spit them out all over the ground, but it will drop them straight into the direction you point it at! When right-clicking it with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. + +booklet.actuallyadditions.chapter.rangedCollector.name=Ranged Collector +booklet.actuallyadditions.chapter.rangedCollector.text.1=The Ranged Collector works much like a hopper, in that it collects items around it, having the power, however, to pick up items that are in an area of blocks around it. It has a filter that can be set to white- or blacklist. This comes with a disadvantage, however: It doesn't auto-output its items. + +booklet.actuallyadditions.chapter.hairBalls.name=Ball of Fur-s +booklet.actuallyadditions.chapter.hairBalls.text.1=Balls of Fur dropped by live cats. More information on the next page. +booklet.actuallyadditions.chapter.hairBalls.text.2=Balls of Fur are an item rarely dropped by cats which have been tamed by the player. Cats are very mysterious creatures as they appear to get everything stuck in their fur. Balls of Fur may seem disgusting at first, but when removing all of the hair by right-clicking, they will reveal some valuable items. Or just some String. FUURRRRRR!! + +booklet.actuallyadditions.chapter.laserRelays.name=Laser Relays +booklet.actuallyadditions.chapter.laserRelays.text.1=The Laser Relay is a block that can wirelessly transfer RF just by being connected with a Laser Wrench, generating a network. When placing a Power Generator or Receiver next to the relay, it can receive Power from any other relay in the network. Two relays can be at most blocks apart. During an energy transfer, they have an Energy Loss of %. + +booklet.actuallyadditions.chapter.blackLotus.name=Black Lotus +booklet.actuallyadditions.chapter.blackLotus.text.1=Think of this: You need to craft black wool, black clay or anything else that needs black dye but you are just guilty about killing so many innocent squids? Well, the Black Lotus is exactly the thing you need! Just look around in the wild a bit, and you will find one, then being able to craft some Black Dye that can be used instead of Ink Sacs so that you don't need to kill poor squids and L any longer. +booklet.actuallyadditions.chapter.blackLotus.text.2=No, not that one, Vaz + +booklet.actuallyadditions.chapter.crystals.name=Crystals and Reconstructor +booklet.actuallyadditions.chapter.crystals.text.1=The Atomic Reconstructor is used to craft Crystals, which are the main crafting ingredient in most items from Actually Additions. Upon being supplied with power, it shoots out a Laser. When the Laser hits a block, it will convert all surrounding items and blocks, provided they can be converted. When shooting a laser, it uses RF, but additional rates vary depending on the conversion. +booklet.actuallyadditions.chapter.crystals.text.2=There are various Lenses that can be attached to the Reconstructor that don't all follow the default behavior of the Reconstructor and are able to do some neat things. See the "Reconstructor Lenses & Misc" chapter in the booklet's Miscellaneous section for more information. When right-clicking the Reconstructor with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. +booklet.actuallyadditions.chapter.crystals.text.3=It should be noted that any recipes listed without information about Lenses don't use one. I thought that was obvious. +booklet.actuallyadditions.chapter.crystals.text.5=When you have crafted a couple of items, you might want to find a way to automate this. There is a very simple way to do accomplish this: Place the Atomic Reconstructor down facing into a Precision Dropper (to find it, look it up in the All Items and Search Entry!). Next, place a Ranged Collector in the area that has the converted items set as a whitelist. Now you can just chuck your raw materials into the Dropper to convert them! + +booklet.actuallyadditions.chapter.bookTutorial.name=Intro to the Manual +booklet.actuallyadditions.chapter.bookTutorial.text.1=The Actually Additions Manual is very versatile. Here is a quick overview: Entries & ChaptersAn Entry is a general topic while a Chapter is almost always pointed to a specific item. When closing a chapter, the index opens, when closing that, the front page will. BookmarksBookmarks, as seen on the bottom of the booklet, store the current page when clicked and can restore said page when clicked again. This can be very useful for easy navigation. +booklet.actuallyadditions.chapter.bookTutorial.text.2=The Buttons at the top right lead you to the Achievements or Configuration Screen. When looking at a chapter that is somehow connected to an achievement, a speech bubble that you can hover over to see the Achievement in question will point to the Achievements Button. The Buttons on the top left can be used to be directed to various Webpages that have to do with the mod. When an update is available, a button to download it will also show up on the top left. +booklet.actuallyadditions.chapter.bookTutorial.text.3=If you, for some reason, want to craft this book again, just take a piece of paper and a canola seed which you can find randomly generated and craft them together! + +booklet.actuallyadditions.chapter.bookStand.name=Manual Stand +booklet.actuallyadditions.chapter.bookStand.text.1=The Manual Stand is a block that is supposed to mainly be used on Servers. You can, provided you are the person who placed it down, set a page in the GUI that will open when someone else accesses it by pressing the "Set Page"-button while being on the desired page. The Manual Stand does not save pages another player navigated to, meaing re-accessing the Stand will cause it to always end up on the page speficied by the placer. +booklet.actuallyadditions.chapter.bookStand.text.2=Stand on it + +booklet.actuallyadditions.chapter.reconstructorLenses.name=Reconstructor Lenses & Misc +booklet.actuallyadditions.chapter.reconstructorLenses.text.1=The Atomic Reconstructor, by default, can only convert some blocks. This can be changed, however, with Lenses. They can be, once crafted, attached to the Reconstructor via right-clicking the Reconstructor with them in hand. To remove them, right-click it with an empty hand. Lenses have lots of different features and uses, as you can see on the following pages. However, there is also some other useful recipes to be found there too. +booklet.actuallyadditions.chapter.reconstructorLenses.text.3=The Lens of Color changes the color of Stained Glass and Panes, Stained Clay, Carpetet, Dye, Lamps, Wool in its sight. Contrary to using no lens, it goes through blocks and only converts blocks it touches. +booklet.actuallyadditions.chapter.reconstructorLenses.text.4=The Lens of Detonation will create a firey explosion around the block the laser hits. Be careful with this. Seriously. (With this lens, the laser also goes 3 times as far!) +booklet.actuallyadditions.chapter.reconstructorLenses.text.5=The Lens of Certain Death will, deal lots of damage to whatever steps into it, enough, in fact, to kill a player in a single hit. + +booklet.actuallyadditions.chapter.miscDecorStuffsAndThings.name=Some Decor +booklet.actuallyadditions.chapter.miscDecorStuffsAndThings.text.1=Sometimes, when you build, you notice there is just not enough decor blocks. Well, we present to you: Ethetic Blocks! These are some quartz-like decor blocks with lovely patterns that can also be converted into Stairs, Slabs and Walls using the usual, well-known recipe patterns. + +booklet.actuallyadditions.chapter.miner.name=Vertical Digger +booklet.actuallyadditions.chapter.miner.text.1=The Vertical Digger can be used to automatically mine blocks from the world. It has two modes: It can either only mine ores or mine everything. When mining a block, it uses about RF. Mined items get stored in an internal buffer that can be accessed through right-clicking. Its default radius is , but much like Phantomfaces, the Digger's range can be upgraded by placing 3 or less Phantom Boosters above it. +booklet.actuallyadditions.chapter.miner.text.2=(Works with any colored Drill) I dig it + +booklet.actuallyadditions.chapter.fireworkBox.name=Firework Box +booklet.actuallyadditions.chapter.fireworkBox.text.1=The Firework Box is a perfect thing for New Year's! When placed down and supplied with some RF, it will shoot out some randomly generated Fireworks around it. For each shot, it uses RF. You know, Vanilla Fireworks are just too bloody annoying to craft, but too awesome not to use. So here's the solution. +booklet.actuallyadditions.chapter.fireworkBox.text.2=When right-clicking it with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. + +booklet.actuallyadditions.chapter.rf.name=RF (Redstone Flux) +booklet.actuallyadditions.chapter.rf.text.1=For anyone who hasn't used much of a mod that uses RF yet, here's a quick explanation. Redstone Flux, or RF for short, is a power system used by many mods. The basic concept is is that lots of machines generate or use it every game tick. That's what RF/t means. To connect a power generating (thus, outputting) machine to one that needs (thus, receives) power, just place it next to it. What's a fourth wall? diff --git a/update/changelog.md b/update/changelog.md index 8bcdfa910..08ac19511 100644 --- a/update/changelog.md +++ b/update/changelog.md @@ -1,3 +1,22 @@ +# 1.8.9-r23 +* Fixed a ginormous bug that screwed over crafting +#### DON'T EXPECT EVERYTHING TO WORK PERFECTLY. Seriously, I break lots of stuff probably. + +# 1.8.9-r22 +* 1.8.9 PORT! +#### DON'T EXPECT EVERYTHING TO WORK PERFECTLY. THIS IS A BETA. Also: If you look through the booklet, you will see a hover text on some chapters' buttons saying the item or block doesn't fully work. RESPECT THAT. Thanks. + +# 1.7.10-r21 +* Made looking up the double furnace in the booklet possible +* The magnet ring now only uses RF when actually sucking up items +* The growth ring now only uses RF when growing stuff +* Made the growth ring a little more expensive +* Balanced the magnet a bit +* Made the solar panel thing cheaper +* German translation started (Kristian295) +* New update checker +#### This will probably the last 1.7.10 version before I move on to 1.8.9. The port is almost done and will be coming out soon. There will be an update notification that shows the update, but if you only want to be notified for further 1.7.10 patches, change the config option for the update checker to be version-specific. + # 1.7.10-r20 * Fixed another stupid obfuscation bug. Great. /shrugs diff --git a/update/updateVersions.properties b/update/updateVersions.properties index 0ec2048c7..9d48179ec 100644 --- a/update/updateVersions.properties +++ b/update/updateVersions.properties @@ -1,2 +1,2 @@ 1.7.10=21 -1.8.9=22 \ No newline at end of file +1.8.9=23 From ddc1ab7ce57338a26d16aedba99447862ecb3d67 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 15 Jan 2016 22:05:36 +0100 Subject: [PATCH 48/58] Molecular Transformilator --- .../de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java | 2 +- src/main/resources/assets/actuallyadditions/lang/en_US.lang | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index 910f6fcf0..5d74c5106 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -65,7 +65,7 @@ public class InitBooklet{ //Getting Started chapterIntro = new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3)); new BookletChapter("bookTutorial", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeBook)); - new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setNoText().setPageStacksWildcard(), new PageCrafting(7, MiscCrafting.recipesCrystals).setNoText(), new PageCrafting(8, MiscCrafting.recipesCrystalBlocks).setNoText(), new PageReconstructor(9, LensNoneRecipeHandler.mainPageRecipes).setNoText()).setSpecial().setIncomplete(); + new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setPageStacksWildcard(), new PageCrafting(7, MiscCrafting.recipesCrystals).setNoText(), new PageCrafting(8, MiscCrafting.recipesCrystalBlocks).setNoText(), new PageReconstructor(9, LensNoneRecipeHandler.mainPageRecipes).setNoText()).setSpecial().setIncomplete(); new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("", TileEntityCoalGenerator.PRODUCE).setPageStacksWildcard()); new BookletChapter("craftingIngs", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(7, ItemCrafting.recipeRing).setNoText(), new PageCrafting(8, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(11, ItemCrafting.recipeDough).setNoText(), new PageCrafting(12, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(13, BlockCrafting.recipeIronCase).setNoText()).setImportant(); new BookletChapter("rf", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.redstone), new PageTextOnly(1)); diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 4d2917b53..de1a040bd 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -710,6 +710,7 @@ booklet.actuallyadditions.chapter.crystals.text.1=The Atomic Reconstructor booklet.actuallyadditions.chapter.crystals.text.2=There are various Lenses that can be attached to the Reconstructor that don't all follow the default behavior of the Reconstructor and are able to do some neat things. See the "Reconstructor Lenses & Misc" chapter in the booklet's Miscellaneous section for more information. When right-clicking the Reconstructor with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. booklet.actuallyadditions.chapter.crystals.text.3=It should be noted that any recipes listed without information about Lenses don't use one. I thought that was obvious. booklet.actuallyadditions.chapter.crystals.text.5=When you have crafted a couple of items, you might want to find a way to automate this. There is a very simple way to do accomplish this: Place the Atomic Reconstructor down facing into a Precision Dropper (to find it, look it up in the All Items and Search Entry!). Next, place a Ranged Collector in the area that has the converted items set as a whitelist. Now you can just chuck your raw materials into the Dropper to convert them! +booklet.actuallyadditions.chapter.crystals.text.6=Molecular Transformilator booklet.actuallyadditions.chapter.bookTutorial.name=Intro to the Manual booklet.actuallyadditions.chapter.bookTutorial.text.1=The Actually Additions Manual is very versatile. Here is a quick overview: Entries & ChaptersAn Entry is a general topic while a Chapter is almost always pointed to a specific item. When closing a chapter, the index opens, when closing that, the front page will. BookmarksBookmarks, as seen on the bottom of the booklet, store the current page when clicked and can restore said page when clicked again. This can be very useful for easy navigation. From 95970617f45773a86432cfc293e7940e3f930037 Mon Sep 17 00:00:00 2001 From: Kristian295 Date: Fri, 15 Jan 2016 23:08:16 +0100 Subject: [PATCH 49/58] Molecular Transformilator Just added line 713 from en_US. There will be more translating going on later this weekend! --- src/main/resources/assets/actuallyadditions/lang/de_DE.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/assets/actuallyadditions/lang/de_DE.lang b/src/main/resources/assets/actuallyadditions/lang/de_DE.lang index 1498e20f8..ae56c8e0d 100644 --- a/src/main/resources/assets/actuallyadditions/lang/de_DE.lang +++ b/src/main/resources/assets/actuallyadditions/lang/de_DE.lang @@ -710,6 +710,7 @@ booklet.actuallyadditions.chapter.crystals.text.1=The Atomic Reconstructor booklet.actuallyadditions.chapter.crystals.text.2=There are various Lenses that can be attached to the Reconstructor that don't all follow the default behavior of the Reconstructor and are able to do some neat things. See the "Reconstructor Lenses & Misc" chapter in the booklet's Miscellaneous section for more information. When right-clicking the Reconstructor with a Redstone Torch in hand, it will change between a mode where it gets deactivated by Redstone and a mode where it responds to pulses. booklet.actuallyadditions.chapter.crystals.text.3=It should be noted that any recipes listed without information about Lenses don't use one. I thought that was obvious. booklet.actuallyadditions.chapter.crystals.text.5=When you have crafted a couple of items, you might want to find a way to automate this. There is a very simple way to do accomplish this: Place the Atomic Reconstructor down facing into a Precision Dropper (to find it, look it up in the All Items and Search Entry!). Next, place a Ranged Collector in the area that has the converted items set as a whitelist. Now you can just chuck your raw materials into the Dropper to convert them! +booklet.actuallyadditions.chapter.crystals.text.6=Molecular Transformilator booklet.actuallyadditions.chapter.bookTutorial.name=Intro to the Manual booklet.actuallyadditions.chapter.bookTutorial.text.1=The Actually Additions Manual is very versatile. Here is a quick overview: Entries & ChaptersAn Entry is a general topic while a Chapter is almost always pointed to a specific item. When closing a chapter, the index opens, when closing that, the front page will. BookmarksBookmarks, as seen on the bottom of the booklet, store the current page when clicked and can restore said page when clicked again. This can be very useful for easy navigation. From 62a4b04e6f0426976229bef6a188ad6890ef5769 Mon Sep 17 00:00:00 2001 From: Patrick Emery Date: Fri, 15 Jan 2016 21:39:38 -0500 Subject: [PATCH 50/58] Added right-click harvest functionality to all crops. --- .../mod/blocks/base/BlockPlant.java | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java index 02657734a..f3814f160 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java @@ -10,23 +10,27 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; +import java.util.List; +import java.util.Random; + import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.block.BlockCrops; import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.fml.common.registry.GameRegistry; -import java.util.Random; - public class BlockPlant extends BlockCrops{ public Item seedItem; @@ -40,10 +44,24 @@ public class BlockPlant extends BlockCrops{ this.name = name; this.minDropAmount = minDropAmount; this.addDropAmount = addDropAmount; - this.register(); } - + public boolean onBlockActivated(World w, BlockPos p, IBlockState s, EntityPlayer ep, EnumFacing f, float hitX, float hitY, float hitZ){ + if(getMetaFromState(s)>=7){ + if(w.isRemote)return true; + List isa = getDrops(w, p, s, 0); + for(ItemStack i:isa){ + if(i!=null&&i.getItem()==this.getSeed()){ + i.stackSize--; + } + EntityItem ei = new EntityItem(w, p.getX()+.5,p.getY()+.5,p.getZ()+.5,i); + w.spawnEntityInWorld(ei); + } + w.setBlockState(p, getStateFromMeta(0)); + return true; + } + return false; + } private void register(){ this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName()); @@ -91,7 +109,6 @@ public class BlockPlant extends BlockCrops{ public Item getCrop(){ return this.returnItem; } - @Override public Item getItemDropped(IBlockState state, Random rand, int par3){ return this.getMetaFromState(state) >= 7 ? this.getCrop() : this.getSeed(); From 07c24cf8dca6415bbe7456da40a905876d6a0bb3 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 16 Jan 2016 14:14:39 +0100 Subject: [PATCH 51/58] Fixed the mess blur created --- .../mod/blocks/base/BlockPlant.java | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java index f3814f160..5ef231662 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import java.util.List; -import java.util.Random; - import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.creative.CreativeTab; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -31,6 +28,9 @@ import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.fml.common.registry.GameRegistry; +import java.util.List; +import java.util.Random; + public class BlockPlant extends BlockCrops{ public Item seedItem; @@ -46,22 +46,28 @@ public class BlockPlant extends BlockCrops{ this.addDropAmount = addDropAmount; this.register(); } - public boolean onBlockActivated(World w, BlockPos p, IBlockState s, EntityPlayer ep, EnumFacing f, float hitX, float hitY, float hitZ){ - if(getMetaFromState(s)>=7){ - if(w.isRemote)return true; - List isa = getDrops(w, p, s, 0); - for(ItemStack i:isa){ - if(i!=null&&i.getItem()==this.getSeed()){ - i.stackSize--; - } - EntityItem ei = new EntityItem(w, p.getX()+.5,p.getY()+.5,p.getZ()+.5,i); - w.spawnEntityInWorld(ei); - } - w.setBlockState(p, getStateFromMeta(0)); - return true; - } - return false; + + @Override + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing facing, float hitX, float hitY, float hitZ){ + if(getMetaFromState(state) >= 7){ + if(!world.isRemote){ + + List drops = getDrops(world, pos, state, 0); + for(ItemStack stack : drops){ + if(stack != null && stack.getItem() == this.getSeed()){ + stack.stackSize--; + } + EntityItem entity = new EntityItem(world, pos.getX()+.5, pos.getY()+.5, pos.getZ()+.5, stack); + world.spawnEntityInWorld(entity); + } + + world.setBlockState(pos, getStateFromMeta(0)); + } + return true; + } + return false; } + private void register(){ this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName()); GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName()); @@ -109,6 +115,7 @@ public class BlockPlant extends BlockCrops{ public Item getCrop(){ return this.returnItem; } + @Override public Item getItemDropped(IBlockState state, Random rand, int par3){ return this.getMetaFromState(state) >= 7 ? this.getCrop() : this.getSeed(); From 3397632e8791ff0ff4e7633137bd037d90f3d677 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 16 Jan 2016 20:06:25 +0100 Subject: [PATCH 52/58] Started JEI Implementation. --- build.gradle | 8 +- .../mod/booklet/GuiAAAchievements.java | 8 +- .../mod/booklet/page/PageCrafting.java | 9 +- .../mod/jei/JEIActuallyAdditionsPlugin.java | 50 +++++++++++ .../jei/booklet/BookletRecipeCategory.java | 70 +++++++++++++++ .../mod/jei/booklet/BookletRecipeHandler.java | 44 ++++++++++ .../mod/jei/booklet/BookletRecipeWrapper.java | 87 +++++++++++++++++++ .../mod/nei/NEIScreenEvents.java | 6 +- 8 files changed, 275 insertions(+), 7 deletions(-) create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeCategory.java create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeHandler.java create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java diff --git a/build.gradle b/build.gradle index 5d4467b58..0ccb18688 100644 --- a/build.gradle +++ b/build.gradle @@ -17,11 +17,12 @@ group = "de.ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions" minecraft { - version = "1.8.9-11.15.0.1684" + version = "1.8.9-11.15.0.1697" runDir = "idea" mappings = "stable_20" makeObfSourceJar = false + useDepAts = true replaceIn "ModUtil.java" replace "@VERSION@", project.version.toString() @@ -31,12 +32,17 @@ repositories { maven { url "http://chickenbones.net/maven/" } + maven { + url "http://dvs1.progwml6.com/files/maven" + } } dependencies { compile "codechicken:CodeChickenLib:1.8-1.1.2.139:dev" compile "codechicken:CodeChickenCore:1.8-1.0.5.36:dev" compile "codechicken:NotEnoughItems:1.8-1.0.5.104:dev" + + deobfCompile "mezz.jei:jei_1.8.9:2.18.1.88" } processResources { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java index 82e10c8a6..ccbae9e75 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiAAAchievements.java @@ -11,6 +11,7 @@ package de.ellpeck.actuallyadditions.mod.booklet; import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.achievement.GuiAchievements; import net.minecraft.stats.StatFileWriter; @@ -23,7 +24,12 @@ public class GuiAAAchievements extends GuiAchievements{ public GuiAAAchievements(GuiScreen screen, StatFileWriter writer){ super(screen, writer); - ReflectionHelper.setPrivateValue(GuiAchievements.class, this, InitAchievements.pageNumber, 20); + try{ + ReflectionHelper.setPrivateValue(GuiAchievements.class, this, InitAchievements.pageNumber, 20); + } + catch(Exception e){ + ModUtil.LOGGER.error("Something went wrong trying to open the Achievements GUI!", e); + } } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java index bc3b388db..a731d02a6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java @@ -120,8 +120,13 @@ public class PageCrafting extends BookletPageAA{ } else if(recipe instanceof ShapedOreRecipe){ ShapedOreRecipe shaped = (ShapedOreRecipe)recipe; - width = ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 4); - height = ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 5); + try{ + width = ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 4); + height = ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 5); + } + catch(Exception e){ + ModUtil.LOGGER.error("Something went wrong trying to get the Crafting Recipe in the booklet to display!", e); + } for(int i = 0; i < shaped.getInput().length; i++){ Object input = shaped.getInput()[i]; if(input != null){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java new file mode 100644 index 000000000..697a25326 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java @@ -0,0 +1,50 @@ +/* + * This file ("JEIActuallyAdditionsPlugin.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense/ + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.jei; + +import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeCategory; +import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeHandler; +import mezz.jei.api.*; + +@JEIPlugin +public class JEIActuallyAdditionsPlugin implements IModPlugin{ + + private IJeiHelpers helpers; + + @Override + public void onJeiHelpersAvailable(IJeiHelpers jeiHelpers){ + this.helpers = jeiHelpers; + } + + @Override + public void onItemRegistryAvailable(IItemRegistry itemRegistry){ + + } + + @Override + public void register(IModRegistry registry){ + registry.addRecipeCategories( + new BookletRecipeCategory(this.helpers.getGuiHelper()) + ); + + registry.addRecipeHandlers( + new BookletRecipeHandler() + ); + + registry.addRecipes(ActuallyAdditionsAPI.bookletPagesWithItemStackData); + } + + @Override + public void onRecipeRegistryAvailable(IRecipeRegistry recipeRegistry){ + + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeCategory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeCategory.java new file mode 100644 index 000000000..f103cf149 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeCategory.java @@ -0,0 +1,70 @@ +/* + * This file ("BookletRecipeCategory.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense/ + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.jei.booklet; + +import de.ellpeck.actuallyadditions.mod.nei.NEIBookletRecipe; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import mezz.jei.api.IGuiHelper; +import mezz.jei.api.gui.IDrawable; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.recipe.IRecipeCategory; +import mezz.jei.api.recipe.IRecipeWrapper; +import net.minecraft.client.Minecraft; + +import javax.annotation.Nonnull; +import java.util.Arrays; + +public class BookletRecipeCategory implements IRecipeCategory{ + + private IDrawable background; + + public BookletRecipeCategory(IGuiHelper helper){ + this.background = helper.createBlankDrawable(150, 256); + } + + @Nonnull + @Override + public String getUid(){ + return NEIBookletRecipe.NAME; + } + + @Nonnull + @Override + public String getTitle(){ + return StringUtil.localize("container.nei."+NEIBookletRecipe.NAME+".name"); + } + + @Nonnull + @Override + public IDrawable getBackground(){ + return this.background; + } + + @Override + public void drawExtras(Minecraft minecraft){ + + } + + @Override + public void drawAnimations(Minecraft minecraft){ + + } + + @Override + public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper){ + if(recipeWrapper instanceof BookletRecipeWrapper){ + BookletRecipeWrapper wrapper = (BookletRecipeWrapper)recipeWrapper; + + recipeLayout.getItemStacks().init(0, true, 62, 23); + recipeLayout.getItemStacks().set(0, Arrays.asList(wrapper.thePage.getItemStacksForPage())); + } + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeHandler.java new file mode 100644 index 000000000..ddae626ff --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeHandler.java @@ -0,0 +1,44 @@ +/* + * This file ("BookletRecipeHandler.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense/ + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.jei.booklet; + +import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.mod.nei.NEIBookletRecipe; +import mezz.jei.api.recipe.IRecipeHandler; +import mezz.jei.api.recipe.IRecipeWrapper; + +import javax.annotation.Nonnull; + +public class BookletRecipeHandler implements IRecipeHandler{ + + @Nonnull + @Override + public Class getRecipeClass(){ + return BookletPage.class; + } + + @Nonnull + @Override + public String getRecipeCategoryUid(){ + return NEIBookletRecipe.NAME; + } + + @Nonnull + @Override + public IRecipeWrapper getRecipeWrapper(@Nonnull BookletPage recipe){ + return new BookletRecipeWrapper(recipe); + } + + @Override + public boolean isRecipeValid(@Nonnull BookletPage recipe){ + return true; + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java new file mode 100644 index 000000000..eca11683c --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java @@ -0,0 +1,87 @@ +/* + * This file ("BookletRecipeWrapper.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense/ + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.jei.booklet; + +import com.google.common.collect.ImmutableList; +import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; +import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import mezz.jei.api.recipe.IRecipeWrapper; +import net.minecraft.client.Minecraft; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.FluidStack; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.Arrays; +import java.util.List; + +public class BookletRecipeWrapper implements IRecipeWrapper{ + + public BookletPage thePage; + + public BookletRecipeWrapper(BookletPage page){ + this.thePage = page; + } + + @Override + public List getInputs(){ + return Arrays.asList(this.thePage.getItemStacksForPage()); + } + + @Override + public List getOutputs(){ + return Arrays.asList(this.thePage.getItemStacksForPage()); + } + + @Override + public List getFluidInputs(){ + return ImmutableList.of(); + } + + @Override + public List getFluidOutputs(){ + return ImmutableList.of(); + } + + @Override + public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight){ + int yOffset = 30; + + List header = minecraft.fontRendererObj.listFormattedStringToWidth(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".booklet.header").replaceAll("", EnumChatFormatting.BLUE+"").replaceAll("", EnumChatFormatting.BLACK+""), 150); + for(int i = 0; i < header.size(); i++){ + minecraft.fontRendererObj.drawString((String)header.get(i), 0, yOffset+18+i*(minecraft.fontRendererObj.FONT_HEIGHT+1), 0, false); + } + + int maxLines = 5; + IBookletChapter chapter = this.thePage.getChapter(); + String aText = (chapter.getPages()[0] instanceof PagePicture && chapter.getPages().length > 1 ? chapter.getPages()[1] : chapter.getPages()[0]).getText(); + List text = minecraft.fontRendererObj.listFormattedStringToWidth(aText != null ? aText : EnumChatFormatting.DARK_RED+StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".booklet.noText"), 150); + for(int i = 0; i < Math.min(maxLines, text.size()); i++){ + minecraft.fontRendererObj.drawString(text.get(i)+(i == maxLines-1 && text.size() > maxLines ? EnumChatFormatting.RESET+""+EnumChatFormatting.BLACK+"..." : ""), 0, yOffset+18+25+i*(minecraft.fontRendererObj.FONT_HEIGHT+1), 0, false); + } + minecraft.fontRendererObj.drawString(EnumChatFormatting.ITALIC+chapter.getLocalizedName(), 0, yOffset+97, 0, false); + minecraft.fontRendererObj.drawString(EnumChatFormatting.ITALIC+"Page "+this.thePage.getID(), 0, yOffset+107, 0, false); + } + + @Override + public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight){ + + } + + @Nullable + @Override + public List getTooltipStrings(int mouseX, int mouseY){ + return null; + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java index 4ed8915ba..6f869d14d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java @@ -33,8 +33,6 @@ public class NEIScreenEvents{ @SubscribeEvent public void onInitGuiForNEI(GuiScreenEvent.InitGuiEvent event){ if(event.gui instanceof GuiRecipe){ - GuiRecipe theGui = (GuiRecipe)event.gui; - int xSize = 176; int ySize = 166; int guiLeft = (event.gui.width-xSize)/2; @@ -50,8 +48,10 @@ public class NEIScreenEvents{ } } }; - event.buttonList.add(this.neiButton); + + GuiRecipe theGui = (GuiRecipe)event.gui; + IRecipeHandler handler = theGui.getCurrentRecipeHandlers().get(theGui.recipetype); this.neiButton.visible = handler instanceof INEIRecipeHandler && ((INEIRecipeHandler)handler).getPageForInfo(theGui.page) != null; } From 720f80160bc0c1ce4b5ab0759fe5b16c939929be Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 16 Jan 2016 23:14:10 +0100 Subject: [PATCH 53/58] Made word count reload when reloadoing resources --- .../mod/booklet/BookletUtils.java | 5 ++- .../mod/booklet/InitBooklet.java | 23 ---------- .../mod/proxy/ClientProxy.java | 44 ++++++++++++++++++- 3 files changed, 45 insertions(+), 27 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java index ba58fcf10..94558417a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java @@ -19,6 +19,7 @@ import de.ellpeck.actuallyadditions.mod.booklet.button.BookmarkButton; import de.ellpeck.actuallyadditions.mod.booklet.button.IndexButton; import de.ellpeck.actuallyadditions.mod.booklet.button.TexturedButton; import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryAllSearch; +import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.util.*; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; @@ -169,10 +170,10 @@ public class BookletUtils{ } //Renders the amount of words and chars the book has else{ - String wordCountString = StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID_LOWER+".amountOfWords", InitBooklet.wordCount); + String wordCountString = StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID_LOWER+".amountOfWords", ClientProxy.bookletWordCount); booklet.getFontRenderer().drawString(EnumChatFormatting.ITALIC+wordCountString, booklet.guiLeft+booklet.xSize-booklet.getFontRenderer().getStringWidth(wordCountString)-15, booklet.guiTop+booklet.ySize-18-booklet.getFontRenderer().FONT_HEIGHT, 0); - String charCountString = StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID_LOWER+".amountOfChars", InitBooklet.charCount); + String charCountString = StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID_LOWER+".amountOfChars", ClientProxy.bookletCharCount); booklet.getFontRenderer().drawString(EnumChatFormatting.ITALIC+charCountString, booklet.guiLeft+booklet.xSize-booklet.getFontRenderer().getStringWidth(charCountString)-15, booklet.guiTop+booklet.ySize-18, 0); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index 5d74c5106..a70d268ee 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -12,8 +12,6 @@ package de.ellpeck.actuallyadditions.mod.booklet; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; -import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; @@ -40,9 +38,6 @@ import java.util.ArrayList; public class InitBooklet{ - public static int wordCount; - public static int charCount; - public static BookletChapter chapterIntro; public static void preInit(){ @@ -58,7 +53,6 @@ public class InitBooklet{ public static void postInit(){ initChapters(); - countWords(); } private static void initChapters(){ @@ -148,21 +142,4 @@ public class InitBooklet{ new BookletChapter("waterRemovalRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemWaterRemovalRing), new PageCrafting(1, ItemCrafting.recipeWaterRing)); new BookletChapter("batteries", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemBatteryTriple), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeBattery).setNoText(), new PageCrafting(3, ItemCrafting.recipeBatteryDouble).setNoText(), new PageCrafting(4, ItemCrafting.recipeBatteryTriple).setNoText(), new PageCrafting(5, ItemCrafting.recipeBatteryQuadruple).setNoText(), new PageCrafting(6, ItemCrafting.recipeBatteryQuintuple).setNoText()); } - - private static void countWords(){ - for(IBookletEntry entry : ActuallyAdditionsAPI.bookletEntries){ - for(IBookletChapter chapter : entry.getChapters()){ - for(BookletPage page : chapter.getPages()){ - if(page.getText() != null){ - wordCount += page.getText().split(" ").length; - charCount += page.getText().length(); - } - } - wordCount += chapter.getLocalizedName().split(" ").length; - charCount += chapter.getLocalizedName().length(); - } - wordCount += entry.getLocalizedName().split(" ").length; - charCount += entry.getLocalizedName().length(); - } - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index f57ca9330..1cd95e0d5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -11,6 +11,10 @@ package de.ellpeck.actuallyadditions.mod.proxy; +import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; +import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.event.InitEvents; @@ -20,6 +24,9 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentClientData; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.IReloadableResourceManager; +import net.minecraft.client.resources.IResourceManager; +import net.minecraft.client.resources.IResourceManagerReloadListener; import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; @@ -36,7 +43,6 @@ import java.util.Calendar; import java.util.HashMap; import java.util.Map; -@SuppressWarnings("unused") public class ClientProxy implements IProxy{ private static Map modelLocationsForRegistering = new HashMap(); @@ -46,6 +52,9 @@ public class ClientProxy implements IProxy{ public static boolean jingleAllTheWay; public static boolean bulletForMyValentine; + public static int bookletWordCount; + public static int bookletCharCount; + @Override public void preInit(FMLPreInitializationEvent event){ ModUtil.LOGGER.info("PreInitializing ClientProxy..."); @@ -65,9 +74,18 @@ public class ClientProxy implements IProxy{ for(Map.Entry entry : modelVariantsForRegistering.entrySet()){ ModelBakery.registerItemVariants(entry.getKey(), entry.getValue()); } - this.registerCustomFluidBlockRenderer(InitBlocks.fluidCanolaOil); this.registerCustomFluidBlockRenderer(InitBlocks.fluidOil); + + IResourceManager manager = Minecraft.getMinecraft().getResourceManager(); + if(manager instanceof IReloadableResourceManager){ + ((IReloadableResourceManager)manager).registerReloadListener(new IResourceManagerReloadListener(){ + @Override + public void onResourceManagerReload(IResourceManager resourceManager){ + countBookletWords(); + } + }); + } } /** @@ -112,6 +130,8 @@ public class ClientProxy implements IProxy{ ModUtil.LOGGER.info("PostInitializing ClientProxy..."); SpecialRenderInit.init(); + + countBookletWords(); } @Override @@ -123,4 +143,24 @@ public class ClientProxy implements IProxy{ public void addRenderVariant(Item item, ResourceLocation... location){ modelVariantsForRegistering.put(item, location); } + + private static void countBookletWords(){ + bookletWordCount = 0; + bookletCharCount = 0; + + for(IBookletEntry entry : ActuallyAdditionsAPI.bookletEntries){ + for(IBookletChapter chapter : entry.getChapters()){ + for(BookletPage page : chapter.getPages()){ + if(page.getText() != null){ + bookletWordCount += page.getText().split(" ").length; + bookletCharCount += page.getText().length(); + } + } + bookletWordCount += chapter.getLocalizedName().split(" ").length; + bookletCharCount += chapter.getLocalizedName().length(); + } + bookletWordCount += entry.getLocalizedName().split(" ").length; + bookletCharCount += entry.getLocalizedName().length(); + } + } } From b76d96c3034ebce58639d76fea2a11c523b27c58 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 16 Jan 2016 23:47:06 +0100 Subject: [PATCH 54/58] removed INEIRecipeHandler away from the API. I don't know why it was there. API version 5 --- .../ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java | 2 +- .../{api/booklet => mod/nei}/INEIRecipeHandler.java | 4 +++- .../ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java | 1 - .../actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java | 1 - .../ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java | 1 - .../ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java | 1 - .../actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java | 1 - .../ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java | 1 - .../actuallyadditions/mod/nei/NEIReconstructorRecipe.java | 1 - .../de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java | 1 - .../actuallyadditions/mod/nei/NEITreasureChestRecipe.java | 1 - 11 files changed, 4 insertions(+), 11 deletions(-) rename src/main/java/de/ellpeck/actuallyadditions/{api/booklet => mod/nei}/INEIRecipeHandler.java (85%) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java index 8e2da7f6e..9806c98aa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java @@ -28,7 +28,7 @@ public class ActuallyAdditionsAPI{ public static final String MOD_ID = "ActuallyAdditions"; public static final String API_ID = MOD_ID+"API"; - public static final String API_VERSION = "4"; + public static final String API_VERSION = "5"; public static List crusherRecipes = new ArrayList(); public static List ballOfFurReturnItems = new ArrayList(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/INEIRecipeHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/INEIRecipeHandler.java similarity index 85% rename from src/main/java/de/ellpeck/actuallyadditions/api/booklet/INEIRecipeHandler.java rename to src/main/java/de/ellpeck/actuallyadditions/mod/nei/INEIRecipeHandler.java index 10061a2db..223b8de07 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/INEIRecipeHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/INEIRecipeHandler.java @@ -8,7 +8,9 @@ * © 2016 Ellpeck */ -package de.ellpeck.actuallyadditions.api.booklet; +package de.ellpeck.actuallyadditions.mod.nei; + +import de.ellpeck.actuallyadditions.api.booklet.BookletPage; /** * Make an NEI Recipe Handler implement this to make a button show up on the page diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java index cbf3493e6..dcffa7320 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java @@ -17,7 +17,6 @@ import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; -import de.ellpeck.actuallyadditions.api.booklet.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java index 582721ddc..f2adf5b5a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java @@ -17,7 +17,6 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.booklet.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeBrewing; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeIngredient; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java index db1abbd42..fc7eab9e5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java @@ -16,7 +16,6 @@ import codechicken.nei.PositionedStack; import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.booklet.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.items.InitItems; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java index 4bb30a127..23e12ffd9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java @@ -16,7 +16,6 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.booklet.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java index 6251087af..fd65dcc97 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java @@ -16,7 +16,6 @@ import codechicken.nei.PositionedStack; import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.booklet.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java index f77fc5656..f25599559 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java @@ -17,7 +17,6 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.booklet.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.items.InitItems; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java index 0174ff111..2abe18254 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java @@ -16,7 +16,6 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.booklet.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.LensNoneRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java index 6f869d14d..99f2729ac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java @@ -14,7 +14,6 @@ import codechicken.nei.recipe.GuiRecipe; import codechicken.nei.recipe.IRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.booklet.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.booklet.button.TexturedButton; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java index f6c90cfce..58486bd8d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java @@ -17,7 +17,6 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.booklet.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; From e130f89296fe1e5da90bb105ca0a08e07857879a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 17 Jan 2016 01:09:36 +0100 Subject: [PATCH 55/58] Added proper JEI Handler for booklet Added RecipeWrapperWithButton to API --- .../api/ActuallyAdditionsAPI.java | 2 +- .../integration}/INEIRecipeHandler.java | 2 +- .../integration/RecipeWrapperWithButton.java | 73 +++++++++++++++++++ .../jei/booklet/BookletRecipeCategory.java | 4 +- .../mod/jei/booklet/BookletRecipeWrapper.java | 30 ++++++-- .../mod/nei/NEIBookletRecipe.java | 1 + .../mod/nei/NEICoffeeMachineRecipe.java | 1 + .../mod/nei/NEICompostRecipe.java | 1 + .../mod/nei/NEICrusherRecipe.java | 1 + .../mod/nei/NEIFurnaceDoubleRecipe.java | 1 + .../mod/nei/NEIHairyBallRecipe.java | 1 + .../mod/nei/NEIReconstructorRecipe.java | 1 + .../mod/nei/NEIScreenEvents.java | 1 + .../mod/nei/NEITreasureChestRecipe.java | 1 + 14 files changed, 109 insertions(+), 11 deletions(-) rename src/main/java/de/ellpeck/actuallyadditions/{mod/nei => api/integration}/INEIRecipeHandler.java (92%) create mode 100644 src/main/java/de/ellpeck/actuallyadditions/api/integration/RecipeWrapperWithButton.java diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java index 9806c98aa..bd53a91e8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java @@ -28,7 +28,7 @@ public class ActuallyAdditionsAPI{ public static final String MOD_ID = "ActuallyAdditions"; public static final String API_ID = MOD_ID+"API"; - public static final String API_VERSION = "5"; + public static final String API_VERSION = "6"; public static List crusherRecipes = new ArrayList(); public static List ballOfFurReturnItems = new ArrayList(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/INEIRecipeHandler.java b/src/main/java/de/ellpeck/actuallyadditions/api/integration/INEIRecipeHandler.java similarity index 92% rename from src/main/java/de/ellpeck/actuallyadditions/mod/nei/INEIRecipeHandler.java rename to src/main/java/de/ellpeck/actuallyadditions/api/integration/INEIRecipeHandler.java index 223b8de07..97b851ef1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/INEIRecipeHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/integration/INEIRecipeHandler.java @@ -8,7 +8,7 @@ * © 2016 Ellpeck */ -package de.ellpeck.actuallyadditions.mod.nei; +package de.ellpeck.actuallyadditions.api.integration; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/integration/RecipeWrapperWithButton.java b/src/main/java/de/ellpeck/actuallyadditions/api/integration/RecipeWrapperWithButton.java new file mode 100644 index 000000000..8abd9bbce --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/api/integration/RecipeWrapperWithButton.java @@ -0,0 +1,73 @@ +/* + * This file ("RecipeWrapperWithButton.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense/ + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.api.integration; + +import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; +import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; +import de.ellpeck.actuallyadditions.mod.booklet.button.TexturedButton; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import net.minecraft.client.Minecraft; + +/** + * Make a JEI Recipe Wrapper extend this to make a button show up on the page + * You still need to make it implement IRecipeWrapper! + */ +public abstract class RecipeWrapperWithButton{ + + protected TexturedButton theButton; + + public RecipeWrapperWithButton(){ + this.theButton = new TexturedButton(23782, 0, 84, 146, 154, 20, 20){ + @Override + public void drawButton(Minecraft minecraft, int x, int y){ + super.drawButton(minecraft, x, y); + if(this.visible && this.hovered){ + String text = StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".clickToSeeRecipe"); + Minecraft.getMinecraft().fontRendererObj.drawString(text, this.xPosition-Minecraft.getMinecraft().fontRendererObj.getStringWidth(text)-1, this.yPosition+this.height/2-Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT/2, StringUtil.DECIMAL_COLOR_WHITE, true); + } + } + }; + } + + /** + * Handles a click. Return this on IRecipeWrapper's handleClick() method + */ + public boolean handleClick(Minecraft mc, int mouseX, int mouseY){ + if(this.theButton.mousePressed(mc, mouseX, mouseY)){ + this.theButton.playPressSound(mc.getSoundHandler()); + + BookletPage page = this.getPage(); + if(page != null){ + GuiBooklet book = new GuiBooklet(Minecraft.getMinecraft().currentScreen, false, true); + Minecraft.getMinecraft().displayGuiScreen(book); + BookletUtils.openIndexEntry(book, page.getChapter().getEntry(), ActuallyAdditionsAPI.bookletEntries.indexOf(page.getChapter().getEntry())/GuiBooklet.CHAPTER_BUTTONS_AMOUNT+1, true); + BookletUtils.openChapter(book, page.getChapter(), page); + return true; + } + } + return false; + } + + /** + * Updates the button's rendering. Call this on IRecipeWrapper's drawInfo() method + */ + public void updateButton(Minecraft mc, int mouseX, int mouseY){ + this.theButton.drawButton(mc, mouseX, mouseY); + } + + /** + * The booklet page that will be opened when clicking the button + */ + public abstract BookletPage getPage(); +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeCategory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeCategory.java index f103cf149..fc456a852 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeCategory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeCategory.java @@ -27,7 +27,7 @@ public class BookletRecipeCategory implements IRecipeCategory{ private IDrawable background; public BookletRecipeCategory(IGuiHelper helper){ - this.background = helper.createBlankDrawable(150, 256); + this.background = helper.createBlankDrawable(160, 100); } @Nonnull @@ -63,7 +63,7 @@ public class BookletRecipeCategory implements IRecipeCategory{ if(recipeWrapper instanceof BookletRecipeWrapper){ BookletRecipeWrapper wrapper = (BookletRecipeWrapper)recipeWrapper; - recipeLayout.getItemStacks().init(0, true, 62, 23); + recipeLayout.getItemStacks().init(0, true, 62, -3); recipeLayout.getItemStacks().set(0, Arrays.asList(wrapper.thePage.getItemStacksForPage())); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java index eca11683c..ce8124033 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.jei.booklet; import com.google.common.collect.ImmutableList; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; +import de.ellpeck.actuallyadditions.api.integration.RecipeWrapperWithButton; import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; @@ -26,7 +27,7 @@ import javax.annotation.Nullable; import java.util.Arrays; import java.util.List; -public class BookletRecipeWrapper implements IRecipeWrapper{ +public class BookletRecipeWrapper extends RecipeWrapperWithButton implements IRecipeWrapper{ public BookletPage thePage; @@ -56,22 +57,27 @@ public class BookletRecipeWrapper implements IRecipeWrapper{ @Override public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight){ - int yOffset = 30; + } + + @Override + public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY){ List header = minecraft.fontRendererObj.listFormattedStringToWidth(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".booklet.header").replaceAll("", EnumChatFormatting.BLUE+"").replaceAll("", EnumChatFormatting.BLACK+""), 150); for(int i = 0; i < header.size(); i++){ - minecraft.fontRendererObj.drawString((String)header.get(i), 0, yOffset+18+i*(minecraft.fontRendererObj.FONT_HEIGHT+1), 0, false); + minecraft.fontRendererObj.drawString((String)header.get(i), 0, 17+i*(minecraft.fontRendererObj.FONT_HEIGHT+1), 0, false); } - int maxLines = 5; + int maxLines = 4; IBookletChapter chapter = this.thePage.getChapter(); String aText = (chapter.getPages()[0] instanceof PagePicture && chapter.getPages().length > 1 ? chapter.getPages()[1] : chapter.getPages()[0]).getText(); List text = minecraft.fontRendererObj.listFormattedStringToWidth(aText != null ? aText : EnumChatFormatting.DARK_RED+StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".booklet.noText"), 150); for(int i = 0; i < Math.min(maxLines, text.size()); i++){ - minecraft.fontRendererObj.drawString(text.get(i)+(i == maxLines-1 && text.size() > maxLines ? EnumChatFormatting.RESET+""+EnumChatFormatting.BLACK+"..." : ""), 0, yOffset+18+25+i*(minecraft.fontRendererObj.FONT_HEIGHT+1), 0, false); + minecraft.fontRendererObj.drawString(text.get(i)+(i == maxLines-1 && text.size() > maxLines ? EnumChatFormatting.RESET+""+EnumChatFormatting.BLACK+"..." : ""), 0, 16+25+i*(minecraft.fontRendererObj.FONT_HEIGHT+1), 0, false); } - minecraft.fontRendererObj.drawString(EnumChatFormatting.ITALIC+chapter.getLocalizedName(), 0, yOffset+97, 0, false); - minecraft.fontRendererObj.drawString(EnumChatFormatting.ITALIC+"Page "+this.thePage.getID(), 0, yOffset+107, 0, false); + minecraft.fontRendererObj.drawString(EnumChatFormatting.ITALIC+chapter.getLocalizedName(), 25, 85, 0, false); + minecraft.fontRendererObj.drawString(EnumChatFormatting.ITALIC+"Page "+this.thePage.getID(), 25, 95, 0, false); + + this.updateButton(minecraft, mouseX, mouseY); } @Override @@ -84,4 +90,14 @@ public class BookletRecipeWrapper implements IRecipeWrapper{ public List getTooltipStrings(int mouseX, int mouseY){ return null; } + + @Override + public boolean handleClick(@Nonnull Minecraft minecraft, int mouseX, int mouseY, int mouseButton){ + return this.handleClick(minecraft, mouseX, mouseY); + } + + @Override + public BookletPage getPage(){ + return this.thePage; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java index dcffa7320..ccefcd865 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java @@ -17,6 +17,7 @@ import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; +import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java index f2adf5b5a..2bcbe51eb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java @@ -17,6 +17,7 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeBrewing; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeIngredient; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java index fc7eab9e5..b1ab6a3af 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java @@ -16,6 +16,7 @@ import codechicken.nei.PositionedStack; import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.items.InitItems; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java index 23e12ffd9..293bb981d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java @@ -16,6 +16,7 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java index fd65dcc97..c6c862a6e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java @@ -16,6 +16,7 @@ import codechicken.nei.PositionedStack; import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java index f25599559..287f8bf2c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java @@ -17,6 +17,7 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.items.InitItems; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java index 2abe18254..c2a107ee8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java @@ -16,6 +16,7 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.LensNoneRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java index 99f2729ac..3cbf8c8d3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java @@ -14,6 +14,7 @@ import codechicken.nei.recipe.GuiRecipe; import codechicken.nei.recipe.IRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.booklet.button.TexturedButton; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java index 58486bd8d..c0990ff50 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java @@ -17,6 +17,7 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; From a4f2251ff68f835468f5c5bb8a9ac160699dcae0 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 17 Jan 2016 01:14:30 +0100 Subject: [PATCH 56/58] Removed INEIRecipeHandler and RecipeWrapperWithButton from the API. They won't work that way. /shrugs --- .../jei}/RecipeWrapperWithButton.java | 15 +-------------- .../mod/jei/booklet/BookletRecipeWrapper.java | 2 +- .../nei}/INEIRecipeHandler.java | 9 +-------- .../mod/nei/NEIBookletRecipe.java | 1 - .../mod/nei/NEICoffeeMachineRecipe.java | 1 - .../mod/nei/NEICompostRecipe.java | 1 - .../mod/nei/NEICrusherRecipe.java | 1 - .../mod/nei/NEIFurnaceDoubleRecipe.java | 1 - .../mod/nei/NEIHairyBallRecipe.java | 1 - .../mod/nei/NEIReconstructorRecipe.java | 1 - .../mod/nei/NEIScreenEvents.java | 1 - .../mod/nei/NEITreasureChestRecipe.java | 1 - 12 files changed, 3 insertions(+), 32 deletions(-) rename src/main/java/de/ellpeck/actuallyadditions/{api/integration => mod/jei}/RecipeWrapperWithButton.java (84%) rename src/main/java/de/ellpeck/actuallyadditions/{api/integration => mod/nei}/INEIRecipeHandler.java (63%) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/integration/RecipeWrapperWithButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/RecipeWrapperWithButton.java similarity index 84% rename from src/main/java/de/ellpeck/actuallyadditions/api/integration/RecipeWrapperWithButton.java rename to src/main/java/de/ellpeck/actuallyadditions/mod/jei/RecipeWrapperWithButton.java index 8abd9bbce..9d4b50515 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/integration/RecipeWrapperWithButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/RecipeWrapperWithButton.java @@ -8,7 +8,7 @@ * © 2016 Ellpeck */ -package de.ellpeck.actuallyadditions.api.integration; +package de.ellpeck.actuallyadditions.mod.jei; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; @@ -19,10 +19,6 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; -/** - * Make a JEI Recipe Wrapper extend this to make a button show up on the page - * You still need to make it implement IRecipeWrapper! - */ public abstract class RecipeWrapperWithButton{ protected TexturedButton theButton; @@ -40,9 +36,6 @@ public abstract class RecipeWrapperWithButton{ }; } - /** - * Handles a click. Return this on IRecipeWrapper's handleClick() method - */ public boolean handleClick(Minecraft mc, int mouseX, int mouseY){ if(this.theButton.mousePressed(mc, mouseX, mouseY)){ this.theButton.playPressSound(mc.getSoundHandler()); @@ -59,15 +52,9 @@ public abstract class RecipeWrapperWithButton{ return false; } - /** - * Updates the button's rendering. Call this on IRecipeWrapper's drawInfo() method - */ public void updateButton(Minecraft mc, int mouseX, int mouseY){ this.theButton.drawButton(mc, mouseX, mouseY); } - /** - * The booklet page that will be opened when clicking the button - */ public abstract BookletPage getPage(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java index ce8124033..5d0eca838 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java @@ -13,8 +13,8 @@ package de.ellpeck.actuallyadditions.mod.jei.booklet; import com.google.common.collect.ImmutableList; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; -import de.ellpeck.actuallyadditions.api.integration.RecipeWrapperWithButton; import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture; +import de.ellpeck.actuallyadditions.mod.jei.RecipeWrapperWithButton; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import mezz.jei.api.recipe.IRecipeWrapper; diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/integration/INEIRecipeHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/INEIRecipeHandler.java similarity index 63% rename from src/main/java/de/ellpeck/actuallyadditions/api/integration/INEIRecipeHandler.java rename to src/main/java/de/ellpeck/actuallyadditions/mod/nei/INEIRecipeHandler.java index 97b851ef1..d4c570a6e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/integration/INEIRecipeHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/INEIRecipeHandler.java @@ -8,18 +8,11 @@ * © 2016 Ellpeck */ -package de.ellpeck.actuallyadditions.api.integration; +package de.ellpeck.actuallyadditions.mod.nei; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -/** - * Make an NEI Recipe Handler implement this to make a button show up on the page - */ public interface INEIRecipeHandler{ - /** - * The page that will be opened when clicking the button - * @param neiIndex the page variable in NEI's GuiRecipe - */ BookletPage getPageForInfo(int neiIndex); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java index ccefcd865..dcffa7320 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIBookletRecipe.java @@ -17,7 +17,6 @@ import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; -import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java index 2bcbe51eb..f2adf5b5a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java @@ -17,7 +17,6 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeBrewing; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeIngredient; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java index b1ab6a3af..fc7eab9e5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICompostRecipe.java @@ -16,7 +16,6 @@ import codechicken.nei.PositionedStack; import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.items.InitItems; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java index 293bb981d..23e12ffd9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICrusherRecipe.java @@ -16,7 +16,6 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java index c6c862a6e..fd65dcc97 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIFurnaceDoubleRecipe.java @@ -16,7 +16,6 @@ import codechicken.nei.PositionedStack; import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java index 287f8bf2c..f25599559 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIHairyBallRecipe.java @@ -17,7 +17,6 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.items.InitItems; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java index c2a107ee8..2abe18254 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIReconstructorRecipe.java @@ -16,7 +16,6 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.LensNoneRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java index 3cbf8c8d3..99f2729ac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEIScreenEvents.java @@ -14,7 +14,6 @@ import codechicken.nei.recipe.GuiRecipe; import codechicken.nei.recipe.IRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.booklet.button.TexturedButton; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java index c0990ff50..58486bd8d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEITreasureChestRecipe.java @@ -17,7 +17,6 @@ import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; -import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler; import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; From 957acd8ab8ab3efe070840680f7f264265b48813 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 17 Jan 2016 01:50:35 +0100 Subject: [PATCH 57/58] Fixed lenses not syncing correctly on the server when converting Item entities --- .../mod/items/lens/LensColor.java | 16 ++++++++++++---- .../mod/items/lens/LensNone.java | 8 ++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java index 89e6d898d..5bab22e1e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java @@ -20,6 +20,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; @@ -71,15 +72,22 @@ public class LensColor extends Lens{ ArrayList items = (ArrayList)tile.getWorldObject().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.fromBounds(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX()+1, hitBlock.getY()+1, hitBlock.getZ()+1)); for(EntityItem item : items){ - if(item.getEntityItem() != null && tile.getEnergy() >= ENERGY_USE){ + if(!item.isDead && item.getEntityItem() != null && tile.getEnergy() >= ENERGY_USE){ if(Util.arrayContains(CONVERTABLE_BLOCKS, item.getEntityItem().getItem()) >= 0 || Util.arrayContains(CONVERTABLE_BLOCKS, Block.getBlockFromItem(item.getEntityItem().getItem())) >= 0){ - int meta = item.getEntityItem().getItemDamage(); + ItemStack newStack = item.getEntityItem().copy(); + int meta = newStack.getItemDamage(); if(meta >= 15){ - item.getEntityItem().setItemDamage(0); + newStack.setItemDamage(0); } else{ - item.getEntityItem().setItemDamage(meta+1); + newStack.setItemDamage(meta+1); } + + item.setDead(); + + EntityItem newItem = new EntityItem(tile.getWorldObject(), item.posX, item.posY, item.posZ, newStack); + tile.getWorldObject().spawnEntityInWorld(newItem); + tile.extractEnergy(ENERGY_USE); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java index d4f270fa8..d5e6ece46 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNone.java @@ -65,7 +65,7 @@ public class LensNone extends Lens{ ArrayList items = (ArrayList)tile.getWorldObject().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.fromBounds(hitBlock.getX()-range, hitBlock.getY()-range, hitBlock.getZ()-range, hitBlock.getX()+range, hitBlock.getY()+range, hitBlock.getZ()+range)); for(EntityItem item : items){ ItemStack stack = item.getEntityItem(); - if(stack != null){ + if(!item.isDead && stack != null){ List recipes = LensNoneRecipeHandler.getRecipesFor(stack); for(LensNoneRecipe recipe : recipes){ if(recipe != null && tile.getEnergy() >= recipe.energyUse){ @@ -73,7 +73,11 @@ public class LensNone extends Lens{ if(outputs != null && !outputs.isEmpty()){ ItemStack outputCopy = outputs.get(0).copy(); outputCopy.stackSize = stack.stackSize; - item.setEntityItemStack(outputCopy); + + item.setDead(); + + EntityItem newItem = new EntityItem(tile.getWorldObject(), item.posX, item.posY, item.posZ, outputCopy); + tile.getWorldObject().spawnEntityInWorld(newItem); tile.extractEnergy(recipe.energyUse); break; From 59d835ed4f43dacc54881a89c44db2621c60eb90 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 17 Jan 2016 12:17:24 +0100 Subject: [PATCH 58/58] Added Coffee Machine JEI recipe Removed some stuff from the API that doesn't really belong there --- .../api/ActuallyAdditionsAPI.java | 2 +- .../mod/blocks/BlockAtomicReconstructor.java | 1 - .../mod/blocks/BlockCompost.java | 1 - .../blocks/BlockLavaFactoryController.java | 1 - .../mod/blocks/BlockMiner.java | 1 - .../mod/blocks/BlockPhantom.java | 1 - .../block => mod/blocks}/IHudDisplay.java | 5 +- .../actuallyadditions/mod/event/HudEvent.java | 4 +- .../mod/items/ItemBooklet.java | 2 +- .../mod/jei/JEIActuallyAdditionsPlugin.java | 9 +- .../mod/jei/RecipeWrapperWithButton.java | 5 +- .../mod/jei/booklet/BookletRecipeWrapper.java | 10 ++ .../coffee/CoffeeMachineRecipeCategory.java | 79 ++++++++++++ .../coffee/CoffeeMachineRecipeHandler.java | 44 +++++++ .../coffee/CoffeeMachineRecipeWrapper.java | 120 ++++++++++++++++++ .../mod/nei/NEICoffeeMachineRecipe.java | 1 - .../{api => mod}/tile/IEnergyDisplay.java | 5 +- .../tile/TileEntityAtomicReconstructor.java | 1 - .../mod/tile/TileEntityFireworkBox.java | 1 - .../mod/tile/TileEntityFurnaceSolar.java | 1 - .../mod/tile/TileEntityHeatCollector.java | 1 - .../tile/TileEntityLavaFactoryController.java | 1 - .../mod/tile/TileEntityLeafGenerator.java | 1 - .../mod/tile/TileEntityMiner.java | 1 - .../assets/actuallyadditions/lang/en_US.lang | 1 - 25 files changed, 270 insertions(+), 29 deletions(-) rename src/main/java/de/ellpeck/actuallyadditions/{api/block => mod/blocks}/IHudDisplay.java (86%) create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeCategory.java create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeHandler.java create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeWrapper.java rename src/main/java/de/ellpeck/actuallyadditions/{api => mod}/tile/IEnergyDisplay.java (78%) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java index bd53a91e8..82acde7b5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java @@ -28,7 +28,7 @@ public class ActuallyAdditionsAPI{ public static final String MOD_ID = "ActuallyAdditions"; public static final String API_ID = MOD_ID+"API"; - public static final String API_VERSION = "6"; + public static final String API_VERSION = "7"; public static List crusherRecipes = new ArrayList(); public static List ballOfFurReturnItems = new ArrayList(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index bbf510513..f2438606d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java index 105d54e16..b872af821 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.items.ItemFertilizer; import de.ellpeck.actuallyadditions.mod.items.ItemMisc; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java index a67f97a10..6788bc528 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController; import de.ellpeck.actuallyadditions.mod.util.ModUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java index fa39e5b0f..8b66b8363 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMiner.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java index 97ec0e515..d5234313e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/block/IHudDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java similarity index 86% rename from src/main/java/de/ellpeck/actuallyadditions/api/block/IHudDisplay.java rename to src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java index 21f043dc7..1cce30d2f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/block/IHudDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java @@ -8,7 +8,7 @@ * © 2016 Ellpeck */ -package de.ellpeck.actuallyadditions.api.block; +package de.ellpeck.actuallyadditions.mod.blocks; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; @@ -19,9 +19,6 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -/** - * Extending this will cause displayHud() to be called when hovering over it in-world - */ public interface IHudDisplay{ @SideOnly(Side.CLIENT) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java index 359e4e2d3..ceb691ded 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/HudEvent.java @@ -10,8 +10,8 @@ package de.ellpeck.actuallyadditions.mod.event; -import de.ellpeck.actuallyadditions.api.block.IHudDisplay; -import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; +import de.ellpeck.actuallyadditions.mod.blocks.IHudDisplay; +import de.ellpeck.actuallyadditions.mod.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.tile.IRedstoneToggle; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.PosUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java index d5b3ab558..3d57e3ae7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java @@ -11,11 +11,11 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import de.ellpeck.actuallyadditions.api.block.IHudDisplay; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.internal.EntrySet; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; +import de.ellpeck.actuallyadditions.mod.blocks.IHudDisplay; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java index 697a25326..c5b3ac905 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java @@ -13,6 +13,8 @@ package de.ellpeck.actuallyadditions.mod.jei; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeCategory; import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeHandler; +import de.ellpeck.actuallyadditions.mod.jei.coffee.CoffeeMachineRecipeCategory; +import de.ellpeck.actuallyadditions.mod.jei.coffee.CoffeeMachineRecipeHandler; import mezz.jei.api.*; @JEIPlugin @@ -33,14 +35,17 @@ public class JEIActuallyAdditionsPlugin implements IModPlugin{ @Override public void register(IModRegistry registry){ registry.addRecipeCategories( - new BookletRecipeCategory(this.helpers.getGuiHelper()) + new BookletRecipeCategory(this.helpers.getGuiHelper()), + new CoffeeMachineRecipeCategory(this.helpers.getGuiHelper()) ); registry.addRecipeHandlers( - new BookletRecipeHandler() + new BookletRecipeHandler(), + new CoffeeMachineRecipeHandler() ); registry.addRecipes(ActuallyAdditionsAPI.bookletPagesWithItemStackData); + registry.addRecipes(ActuallyAdditionsAPI.coffeeMachineIngredients); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/RecipeWrapperWithButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/RecipeWrapperWithButton.java index 9d4b50515..df015a254 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/RecipeWrapperWithButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/RecipeWrapperWithButton.java @@ -24,7 +24,7 @@ public abstract class RecipeWrapperWithButton{ protected TexturedButton theButton; public RecipeWrapperWithButton(){ - this.theButton = new TexturedButton(23782, 0, 84, 146, 154, 20, 20){ + this.theButton = new TexturedButton(23782, this.getButtonX(), this.getButtonY(), 146, 154, 20, 20){ @Override public void drawButton(Minecraft minecraft, int x, int y){ super.drawButton(minecraft, x, y); @@ -57,4 +57,7 @@ public abstract class RecipeWrapperWithButton{ } public abstract BookletPage getPage(); + + public abstract int getButtonX(); + public abstract int getButtonY(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java index 5d0eca838..757edbea0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java @@ -100,4 +100,14 @@ public class BookletRecipeWrapper extends RecipeWrapperWithButton implements IRe public BookletPage getPage(){ return this.thePage; } + + @Override + public int getButtonX(){ + return 0; + } + + @Override + public int getButtonY(){ + return 84; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeCategory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeCategory.java new file mode 100644 index 000000000..95c20d762 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeCategory.java @@ -0,0 +1,79 @@ +/* + * This file ("CoffeeMachineRecipeCategory.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense/ + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.jei.coffee; + +import de.ellpeck.actuallyadditions.mod.nei.NEICoffeeMachineRecipe; +import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import mezz.jei.api.IGuiHelper; +import mezz.jei.api.gui.IDrawable; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.recipe.IRecipeCategory; +import mezz.jei.api.recipe.IRecipeWrapper; +import net.minecraft.client.Minecraft; + +import javax.annotation.Nonnull; + +public class CoffeeMachineRecipeCategory implements IRecipeCategory{ + + private IDrawable background; + + public CoffeeMachineRecipeCategory(IGuiHelper helper){ + this.background = helper.createDrawable(AssetUtil.getGuiLocation("guiNEICoffeeMachine"), 0, 0, 126, 88); + } + + @Nonnull + @Override + public String getUid(){ + return NEICoffeeMachineRecipe.NAME; + } + + @Nonnull + @Override + public String getTitle(){ + return StringUtil.localize("container.nei."+NEICoffeeMachineRecipe.NAME+".name"); + } + + @Nonnull + @Override + public IDrawable getBackground(){ + return this.background; + } + + @Override + public void drawExtras(Minecraft minecraft){ + + } + + @Override + public void drawAnimations(Minecraft minecraft){ + + } + + @Override + public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper){ + if(recipeWrapper instanceof CoffeeMachineRecipeWrapper){ + CoffeeMachineRecipeWrapper wrapper = (CoffeeMachineRecipeWrapper)recipeWrapper; + + recipeLayout.getItemStacks().init(0, true, 89, 20); + recipeLayout.getItemStacks().set(0, wrapper.theIngredient.ingredient); + + recipeLayout.getItemStacks().init(1, true, 44, 38); + recipeLayout.getItemStacks().set(1, wrapper.cup); + + recipeLayout.getItemStacks().init(2, true, 1, 38); + recipeLayout.getItemStacks().set(2, wrapper.coffeeBeans); + + recipeLayout.getItemStacks().init(3, false, 44, 69); + recipeLayout.getItemStacks().set(3, wrapper.theOutput); + } + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeHandler.java new file mode 100644 index 000000000..04f208f1b --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeHandler.java @@ -0,0 +1,44 @@ +/* + * This file ("CoffeeMachineRecipeHandler.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense/ + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.jei.coffee; + +import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeIngredient; +import de.ellpeck.actuallyadditions.mod.nei.NEICoffeeMachineRecipe; +import mezz.jei.api.recipe.IRecipeHandler; +import mezz.jei.api.recipe.IRecipeWrapper; + +import javax.annotation.Nonnull; + +public class CoffeeMachineRecipeHandler implements IRecipeHandler{ + + @Nonnull + @Override + public Class getRecipeClass(){ + return CoffeeIngredient.class; + } + + @Nonnull + @Override + public String getRecipeCategoryUid(){ + return NEICoffeeMachineRecipe.NAME; + } + + @Nonnull + @Override + public IRecipeWrapper getRecipeWrapper(@Nonnull CoffeeIngredient recipe){ + return new CoffeeMachineRecipeWrapper(recipe); + } + + @Override + public boolean isRecipeValid(@Nonnull CoffeeIngredient recipe){ + return true; + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeWrapper.java new file mode 100644 index 000000000..7b2215f3f --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeWrapper.java @@ -0,0 +1,120 @@ +/* + * This file ("CoffeeMachineRecipeWrapper.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense/ + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.jei.coffee; + +import com.google.common.collect.ImmutableList; +import de.ellpeck.actuallyadditions.api.booklet.BookletPage; +import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeBrewing; +import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeIngredient; +import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; +import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; +import de.ellpeck.actuallyadditions.mod.items.InitItems; +import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; +import de.ellpeck.actuallyadditions.mod.jei.RecipeWrapperWithButton; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import mezz.jei.api.recipe.IRecipeWrapper; +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class CoffeeMachineRecipeWrapper extends RecipeWrapperWithButton implements IRecipeWrapper{ + + public CoffeeIngredient theIngredient; + public ItemStack theOutput; + public ItemStack cup = new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()); + public ItemStack coffeeBeans = new ItemStack(InitItems.itemCoffeeBean); + + public CoffeeMachineRecipeWrapper(CoffeeIngredient ingredient){ + this.theIngredient = ingredient; + + this.theOutput = new ItemStack(InitItems.itemCoffee); + CoffeeBrewing.addEffectToStack(this.theOutput, this.theIngredient); + } + + @Override + public List getInputs(){ + List list = new ArrayList(); + list.add(this.theIngredient.ingredient); + list.add(this.cup); + list.add(this.coffeeBeans); + return list; + } + + @Override + public List getOutputs(){ + return Collections.singletonList(this.theOutput); + } + + @Override + public List getFluidInputs(){ + return ImmutableList.of(); + } + + @Override + public List getFluidOutputs(){ + return ImmutableList.of(); + } + + @Override + public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight){ + if(this.theIngredient.getExtraText() != null){ + Minecraft.getMinecraft().fontRendererObj.drawString(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".coffee.special")+":", 2, 4, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false); + Minecraft.getMinecraft().fontRendererObj.drawString(this.theIngredient.getExtraText(), 2, 16, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false); + } + + if(this.theIngredient.maxAmplifier > 0){ + Minecraft.getMinecraft().fontRendererObj.drawString(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".coffee.maxAmount")+": "+this.theIngredient.maxAmplifier, 2, 28, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false); + } + } + + @Override + public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY){ + this.updateButton(minecraft, mouseX, mouseY); + } + + @Override + public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight){ + + } + + @Nullable + @Override + public List getTooltipStrings(int mouseX, int mouseY){ + return null; + } + + @Override + public boolean handleClick(@Nonnull Minecraft minecraft, int mouseX, int mouseY, int mouseButton){ + return this.handleClick(minecraft, mouseX, mouseY); + } + + @Override + public BookletPage getPage(){ + return BookletUtils.getFirstPageForStack(new ItemStack(InitBlocks.blockCoffeeMachine)); + } + + @Override + public int getButtonX(){ + return 0; + } + + @Override + public int getButtonY(){ + return 70; + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java index f2adf5b5a..c4235ef86 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/nei/NEICoffeeMachineRecipe.java @@ -113,7 +113,6 @@ public class NEICoffeeMachineRecipe extends TemplateRecipeHandler implements INE GuiDraw.drawString(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".coffee.special")+":", 2, 4, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false); GuiDraw.drawString(cache.extraText, 2, 16, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false); } - GuiDraw.drawString(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".coffee.shift"), 1, 75, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false); if(cache.maxAmp > 0){ GuiDraw.drawString(StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".coffee.maxAmount")+": "+cache.maxAmp, 2, 28, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false); diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/tile/IEnergyDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/IEnergyDisplay.java similarity index 78% rename from src/main/java/de/ellpeck/actuallyadditions/api/tile/IEnergyDisplay.java rename to src/main/java/de/ellpeck/actuallyadditions/mod/tile/IEnergyDisplay.java index c08e67987..59113953f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/tile/IEnergyDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/IEnergyDisplay.java @@ -8,14 +8,11 @@ * © 2016 Ellpeck */ -package de.ellpeck.actuallyadditions.api.tile; +package de.ellpeck.actuallyadditions.mod.tile; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -/** - * Extending this will cause a block to show "getEnergy()/maxEnergy() RF" when hovering over it in-world - */ public interface IEnergyDisplay{ @SideOnly(Side.CLIENT) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java index 89a7a6276..0bd966982 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java @@ -15,7 +15,6 @@ import cofh.api.energy.IEnergyReceiver; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.api.lens.Lens; -import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.items.lens.Lenses; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketParticle; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java index f22f8c960..7b1dd60b5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.entity.item.EntityFireworkRocket; import net.minecraft.init.Items; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java index 03ef5752a..356acf99f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.nbt.NBTTagCompound; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java index 7d538d2a2..9f0dfb8d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.util.PosUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java index f57699ca6..0396749c7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; import de.ellpeck.actuallyadditions.mod.util.PosUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java index 4018ccf7f..c112a7cec 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; -import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketParticle; import de.ellpeck.actuallyadditions.mod.util.PosUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java index 15d81844a..dd12287a0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyReceiver; -import de.ellpeck.actuallyadditions.api.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketParticle; diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index de1a040bd..4aa2e9db2 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -18,7 +18,6 @@ container.nei.actuallyadditions.treasureChest.info=Items at container.nei.actuallyadditions.coffee.name=Coffee Machine container.nei.actuallyadditions.coffee.special=Special Feature container.nei.actuallyadditions.coffee.maxAmount=Max Amount -container.nei.actuallyadditions.coffee.shift=[SHIFT]! container.nei.actuallyadditions.coffee.extra.milk=+01:00, -1 Level container.nei.actuallyadditions.reconstructor.name=Atomic Reconstructor