From 3eb1119c5598d90e0f57fa10fbf7d0dab20077d5 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 25 Jan 2019 21:35:07 +0100 Subject: [PATCH] finished the aura attraction cart --- .../entities/render/RenderMoverMinecart.java | 29 ++++++++++++++++++ .../naturesaura/models/item/mover_cart.json | 6 ++++ .../naturesaura/recipes/mover_cart.json | 5 ++- .../naturesaura/textures/items/mover_cart.png | Bin 0 -> 358 bytes .../textures/models/mover_cart.png | Bin 0 -> 1206 bytes 5 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/assets/naturesaura/models/item/mover_cart.json create mode 100644 src/main/resources/assets/naturesaura/textures/items/mover_cart.png create mode 100644 src/main/resources/assets/naturesaura/textures/models/mover_cart.png diff --git a/src/main/java/de/ellpeck/naturesaura/entities/render/RenderMoverMinecart.java b/src/main/java/de/ellpeck/naturesaura/entities/render/RenderMoverMinecart.java index 1f457d72..51345d57 100644 --- a/src/main/java/de/ellpeck/naturesaura/entities/render/RenderMoverMinecart.java +++ b/src/main/java/de/ellpeck/naturesaura/entities/render/RenderMoverMinecart.java @@ -1,17 +1,46 @@ package de.ellpeck.naturesaura.entities.render; +import de.ellpeck.naturesaura.NaturesAura; import de.ellpeck.naturesaura.entities.EntityMoverMinecart; import net.minecraft.block.state.IBlockState; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.entity.RenderMinecart; +import net.minecraft.util.ResourceLocation; public class RenderMoverMinecart extends RenderMinecart { + + private static final ResourceLocation RES = new ResourceLocation(NaturesAura.MOD_ID, "textures/models/mover_cart.png"); + private final ModelMoverMinecart model = new ModelMoverMinecart(); + public RenderMoverMinecart(RenderManager renderManagerIn) { super(renderManagerIn); } @Override protected void renderCartContents(EntityMoverMinecart cart, float partialTicks, IBlockState state) { + GlStateManager.pushMatrix(); + GlStateManager.translate(0, 22 / 16F, 0); + GlStateManager.rotate(180, 1, 0, 0); + this.bindTexture(RES); + this.model.render(); + GlStateManager.popMatrix(); + } + private static class ModelMoverMinecart extends ModelBase { + + private final ModelRenderer box; + + public ModelMoverMinecart() { + this.box = new ModelRenderer(this, 0, 0); + this.box.setTextureSize(64, 64); + this.box.addBox(0, 0, 0, 16, 24, 16); + } + + public void render() { + this.box.render(1 / 16F); + } } } diff --git a/src/main/resources/assets/naturesaura/models/item/mover_cart.json b/src/main/resources/assets/naturesaura/models/item/mover_cart.json new file mode 100644 index 00000000..898e65a6 --- /dev/null +++ b/src/main/resources/assets/naturesaura/models/item/mover_cart.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "naturesaura:items/mover_cart" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/recipes/mover_cart.json b/src/main/resources/assets/naturesaura/recipes/mover_cart.json index 467d35c7..e6b0fbb9 100644 --- a/src/main/resources/assets/naturesaura/recipes/mover_cart.json +++ b/src/main/resources/assets/naturesaura/recipes/mover_cart.json @@ -3,7 +3,7 @@ "pattern": [ "EBE", "SIS", - " C " + "XCX" ], "key": { "B": { @@ -24,6 +24,9 @@ }, "C": { "item": "minecraft:minecart" + }, + "X": { + "item": "naturesaura:infused_brick" } }, "result": { diff --git a/src/main/resources/assets/naturesaura/textures/items/mover_cart.png b/src/main/resources/assets/naturesaura/textures/items/mover_cart.png new file mode 100644 index 0000000000000000000000000000000000000000..946561468cbbeb605e54b25a3ff016c5bcd7a2a3 GIT binary patch literal 358 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DkxL735kHCP2GC{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QJXCmy7aRjL5iKmNW zh=qUeWJ9h)4g#**d-txq64epsbg4o_&^1R#bj=zTUWp40jyg6oo=5z2PMbM5cCoyj zwA$}`OFB1R+x2RVnDpsfH(634p!-Hi)Y#ha|TXY4P; zT>jfx<3ND7!h{DkJC{{kFf%4-UX)htF%~e;QI(psT-{+y%B1Ik65l5+d3;z#v(X{n zh4FD*b4wy;z2j}SpYoNAS6=hi<;}U)`jbJXa(0}nZu1GCe;GVo{an^LB{Ts5$nJw+ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/naturesaura/textures/models/mover_cart.png b/src/main/resources/assets/naturesaura/textures/models/mover_cart.png new file mode 100644 index 0000000000000000000000000000000000000000..be81c41aac3686692fe6f2afcb88c986833cb1f5 GIT binary patch literal 1206 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjGK$vmro+3}6phSslL`iUdT1k0gQ7S`0VrE{6US4X6f{C7?o{6wS#u1=7CY~;i zAr*0NXZq&{yNewCDa2cNXUQgyKYyNE3LJ7@;c%CwtkpwjL5@~PXYADgp^GYuI)VZ@ zg{}x)>TGvwFiftc@A2t-6 z*<~O1M|JXt+xq%XkEPF_UHsUge%A4B%_@f(;`{$wKDl}Mx$^OL`#-Bb%;J4u^WoQJ zn>e3~%wh);80Pah3uSzi_#7c2ZP06f_VG~>+XP0A!ygI{%%}+5!7n9!;HT%GOga5! zFBrKU6j*v1ryX*AAT^cu!5x)QXw5MEZK;oQ7fq5Ram zhnasNnicydft5G-7l?3VynJlb2eGW6x+wZnPf@p0N>!Pz+SlckduA+RZ+R@~mJ!1C zj7ef1cZayiT8Ppk4|hn!C};fPOe*}S-cxzNaK@4O&psw~$w{yr;dY47JHVA^*a=Z; zP$H!h=dj0Mb(1I5e#hVq3@zUFj(U3g{PrGr?EksK(3PK~a>|m*J$t^|{xjRaDtKU) zbbI;H^}H2-KHQvOefxf|%=oa;ndJ*a^y7Jf-n1okTh>fflRA0l zxNheAD^U*{&CB=yn{lu*V#lRP2k&jVHj#hFmqwkuFIx^Bws$Z7_PSqk&cdIobzjy* zXZQLV_HHd`%L|M8sN1#wB+$_Jl{~Xvb6@&rRpZ!lDfmr#kglf2e!w z@%Yc14~#p1x4SPWTqtQ}{yl%IwM8-CtvP4vOcu+P*aMw9@3^%g+ueiP4y|UoKkb4+ z+d0cJgYy3q|If3}`trWP^T4&k%xiWQR)qh##W08UP<`E|V>gT%uJatIoG?3H`T%Fc zxesbgx^l^KuxQKZ%kSuv@A|#Kkl}gpmuzN*2W=7=nl&8j0wo)YEq}GUE9~nuKlWi> z#Tf?6-}i4Y?(o~r*STG2d%(MY|NrxC__uk1iqA&Mk<61D+1*}`IM?Q