Jump to content

Eetmorchikn

Forge Modder
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Eetmorchikn

  1. So I've just read that Forge for 1.8 does not yet support custom fluid rendering... oops!
  2. Ok so I've figured out why the error was happening... but the fluid still renders invisible... inside my assets/mymod/blockstates/fluid_custom.json, I added all of the variants that a fluid block looks for: { "variants": { "normal": { "model": "mymod:fluid_custom" }, "level=0": { "model": "mymod:fluid_custom" }, "level=1": { "model": "mymod:fluid_custom" }, "level=2": { "model": "mymod:fluid_custom" }, "level=3": { "model": "mymod:fluid_custom" }, "level=4": { "model": "mymod:fluid_custom" }, "level=5": { "model": "mymod:fluid_custom" }, "level=6": { "model": "mymod:fluid_custom" }, "level=7": { "model": "mymod:fluid_custom" }, "level=8": { "model": "mymod:fluid_custom" }, "level=9": { "model": "mymod:fluid_custom" }, "level=10": { "model": "mymod:fluid_custom" }, "level=11": { "model": "mymod:fluid_custom" }, "level=12": { "model": "mymod:fluid_custom" }, "level=13": { "model": "mymod:fluid_custom" }, "level=14": { "model": "mymod:fluid_custom" } } } I appreciate anyone who is trying to help with this issue, as I haven't seen anyone else implement custom fluids in Forge for 1.8!!
  3. I having difficulty setting up textures for a custom fluid in Forge 1.8... The fluid works fine, except it is invisible. Boats will rise to the top of the invisible fluid and it removes grass blocks as it spreads, though I very much would like to add my own custom texture!! I've noticed that these errors come up as my mod gets pre-initialized: [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=8 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=9 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=4 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=5 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=6 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=7 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=0 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=1 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=2 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=3 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=14 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=13 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=15 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=10 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=12 not found [14:25:22] [Client thread/ERROR] [FML]: Model definition for location mymod:fluid_custom#level=11 not found I have a block model JSON file in "assets/mymod/models/block" set up as follows, and I'm not sure what i need to change/add.... { "parent": "block/cube_all", "textures": { "all": "mymod:blocks/fluid_custom" } } I also have my 16x16 texture here: "assets/mymod/textures/blocks/fluid_custom.png" How do I get a basic 16x16 texture to wrap like the water texture does?? (just with the same texture for each block, and no animations) My class setup: In my MainRegistry class: @EventHandler public void preInit(FMLPreInitializationEvent event) { fluidCustom = new FluidCustom("Custom Fluid"); FluidRegistry.registerFluid(fluidCustom); blockFluidCustom = new BlockFluidCustom().setUnlocalizedName("blockFluidCustom"); GameRegistry.registerBlock(blockFluidCustom, ((BlockFluidCustom) blockFluidCustom).name ); } FluidCustom: public class FluidCustom extends Fluid { public FluidCustom(String fluidName) { super(fluidName); this.setDensity(100); this.setViscosity(3000); } } BlockFluidCustom: public class BlockFluidCustom extends BlockFluidClassic { public static final String name = "fluid_custom"; public BlockFluidCustom() { super(MainRegistry.fluidCustom, Material.water); } } I've also noticed that there is the method setIcons(TextureAtlasSprite arg0) in the Fluid class.. would I need to use that to set my texture?? helpppp plissss
  4. I FOUND A SOLUTION!! Turns out theres this nifty thing called the Render Player API (RPAPI) that gives you access to the Render Player, and Model Player classes! You can download the API here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1283669-1-8-api-render-player-api I'm using the 1.8 "core" version and it seems to be working fine with forge. To make the player render standing while mounted, I simply copied and overrode the setRotationAngles method, commenting out the part where the rotations are added to the player's legs. public class SMModelPlayerBase extends ModelPlayerBase { public SMModelPlayerBase(ModelPlayerAPI arg0) { super(arg0); } @Override public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) { if(modelPlayer != null){ this.modelPlayer.bipedHead.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); this.modelPlayer.bipedHead.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); this.modelPlayer.bipedRightArm.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F + (float)Math.PI) * 2.0F * p_78087_2_ * 0.5F; this.modelPlayer.bipedLeftArm.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F) * 2.0F * p_78087_2_ * 0.5F; this.modelPlayer.bipedRightArm.rotateAngleZ = 0.0F; this.modelPlayer.bipedLeftArm.rotateAngleZ = 0.0F; this.modelPlayer.bipedRightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F) * 1.4F * p_78087_2_; this.modelPlayer.bipedLeftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F + (float)Math.PI) * 1.4F * p_78087_2_; this.modelPlayer.bipedRightLeg.rotateAngleY = 0.0F; this.modelPlayer.bipedLeftLeg.rotateAngleY = 0.0F; /* > HEHEHEHEH! if (this.modelPlayer.isRiding) { this.modelPlayer.bipedRightArm.rotateAngleX += -((float)Math.PI / 5F); this.modelPlayer.bipedLeftArm.rotateAngleX += -((float)Math.PI / 5F); this.modelPlayer.bipedRightLeg.rotateAngleX = -((float)Math.PI * 2F / 5F); this.modelPlayer.bipedLeftLeg.rotateAngleX = -((float)Math.PI * 2F / 5F); this.modelPlayer.bipedRightLeg.rotateAngleY = ((float)Math.PI / 10F); this.modelPlayer.bipedLeftLeg.rotateAngleY = -((float)Math.PI / 10F); } */ ..... *rest of the original code* } } Theres also a nasty Nullpointer that gets thrown by gradle when someone else views your player or you view yourself in third person, so make sure you also add that != null check surrounding the original code, like I did. Thanks for the reply! good luck.
  5. Forgot to mention: I tried BlockFluidClassic and I couldn't figure out how to put the texture on the block. Every time I placed it minecraft crashed, giving me a NullPointer..Something about Texture Atlas and a setIcons() method... How would I Implement that method in the liquid classes I have? It that what you are talking about?
  6. Trying to make a custom liquid, and when I instantiate the BlockLiquid I get an "InvalidMaterial" error... This happens every time I place the liquid from my custom item bucket class. Whats happening is this: I have my Custom Liquid/Fluid class that is constructed using a custom material: public class BlockFluidCustom extends BlockLiquid { public static final String name = "fluid_snow"; public BlockFluidCustom() { super(Mod.customMaterial); } } And whenever I try to place the custom liquid, this method gets invoked... public static BlockDynamicLiquid getFlowingBlock(Material materialIn) { if (materialIn == Material.water) { return Blocks.flowing_water; } else if (materialIn == Material.lava) { return Blocks.flowing_lava; } else { throw new IllegalArgumentException("Invalid material"); } } THUS, the error is thrown. http://minecraftforge.net/forum/Smileys/default/cry.gif Stacktrace: java.lang.IllegalArgumentException: Invalid material at net.minecraft.block.BlockLiquid.getFlowingBlock(BlockLiquid.java:383) at net.minecraft.block.BlockLiquid.getFlowDirection(BlockLiquid.java:292) at net.minecraft.client.renderer.BlockFluidRenderer.renderFluid(BlockFluidRenderer.java:82) at net.minecraft.client.renderer.BlockRendererDispatcher.renderBlock(BlockRendererDispatcher.java:72) at net.minecraft.client.renderer.chunk.RenderChunk.rebuildChunk(RenderChunk.java:178) at net.minecraft.client.renderer.chunk.ChunkRenderWorker.processTask(ChunkRenderWorker.java:100) at net.minecraft.client.renderer.chunk.ChunkRenderDispatcher.updateChunkNow(ChunkRenderDispatcher.java:144) at net.minecraft.client.renderer.RenderGlobal.setupTerrain(RenderGlobal.java:882) at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1264) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1207) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1032) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1048) at net.minecraft.client.Minecraft.run(Minecraft.java:345) at net.minecraft.client.main.Main.main(Main.java:117) Is there a way around this?!? Could I just change the texture of the fluid, but construct it with Material.water? heeeelllp plis.
  7. This is more of a question of possibility than a question about the code, but I seem to have reached an impasse in creating an entity that we will call EntityBetterBoat. I have the class EntityBetterBoat extend Entity, and I slapped the code from the EntityBoat class in there for easy modification to physics elements and such. And now for the question: Can an EntityPlayer mount and ride a boat, with all of the same characteristics of movement, except EntityPlayer is standing....?? @Override public boolean shouldRiderSit() { return false;} Overriding the shouldRiderSit() method makes the Entity riding it stand, but the movement is not registered.. Tying to move the boat while riding and standing makes the EntityPlayer try to walk, instead of doing what it normally does, moving the boat.. Thus, the entities shake while trying to move and even the Yaw and Pitch of the camera are stuck, only updating on large movements of the mouse. I'm guessing that what's going is: The EntityPlayer class is updating its position based on the position of the boat. The boat is waiting for action from the Player Pressing WASD keys is still trying to move the player and not checking for a ridden Entity.. "I'm guessing" SO.... Does fixing this problem involve modifying base classes? How should I approach this...? Should you need code for reference I will supply it.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.