Jump to content

Slexom

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by Slexom

  1. I've put this as solved but I forgot that my problems are not 100% solved. Still the overlay not apply. I've put the texture also in modid/textures/block/overlay.png because the vanilla water_overaly.png is in assets\minecraft\textures\block . But not work that way. Do I have to generate the whole fluid in another way?
  2. I have a custom fluid, it have to flow slower than water, like lava but not to that level. I've read the docs on FluidAttributes.java and it say: /** * Viscosity ("thickness") of the fluid - completely arbitrary; negative values are not * permissible. * * Default value is approximately the real-life density of water in m/s^2 (x10^-3). * * Higher viscosity means that a fluid flows more slowly, like molasses. * Lower viscosity means that a fluid flows more quickly, like helium. * */ I'm at 100000 now and still no difference with water. Here the initElements(). Also overlay not set correctly, maybe misplaced texture? ... public void initElements() { fluidproperties = new ForgeFlowingFluid.Properties( () -> still, () -> flowing, FluidAttributes.builder( new ResourceLocation("modid", "/fluids/still"), new ResourceLocation("modid", "/fluids/flow") ) .luminosity(0) .density(1800) .viscosity(100000) .overlay(new ResourceLocation("modid", "/fluids/overlay")) //.overlay(new ResourceLocation("modid", "/fluids/overlay.png")) ) .bucket(() -> bucket) .block(() -> block); still = (FlowingFluid) new FluidSource(fluidproperties).setRegistryName("my_fluid"); flowing = (FlowingFluid) new ForgeFlowingFluid.Flowing(fluidproperties).setRegistryName("my_fluid_flowing"); elements.blocks.add(() -> new FlowingFluidBlock(still, Block.Properties.create(Material.WATER)) { }.setRegistryName("my_fluid")); elements.items.add(() -> new BucketItem(still, new Item.Properties().containerItem(Items.BUCKET).maxStackSize(1).group(ItemGroup.MISC)) .setRegistryName("my_fluid_bucket")); } ...
  3. A simple question that come to my mind while setting spawn properties of an entity. If I want a creature spawn in, for example, ocean biome and all the variants(deep_ocean, warm_ocean, and so on) I've to register all of them or just ocean cover the main biome and all the variants?
  4. Ok, I'll look for that and change the code. I've seen other forum posts saying to avoid use it. I'll not use anymore if is so bad. And yes, I was missing writeAdditional and readAdditional functions. Thank you for the reply, I've learned a lot.
  5. Hi to all. I like the Wooly Cow from MCE and want to port it on my game. The particular mechanic this cow have is that can be sheared for brown wool. I've set up the model, the texture(it change correctly from sheared to not sheared based on status), eat grass, copyed the shear code from the SheepEntity and all work fine until I save the game and close it. When I reload the game the cow is not sheared, also if I've did it just before saving and closing the game. It don't save the status. I've initially modified the shear code using boolean value instead of byte(I understand better boolean) for the DataParameter and I was thinking it was the problem so I've changed back to Byte type, but the issue is still here. I hope someone can help. Here the WoolyCowEntity class. Forge 31.2.0 Minecraft 1.15.2 MCP 20200515.085601
×
×
  • Create New...

Important Information

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