Jump to content

UserMC123

Members
  • Posts

    43
  • Joined

  • Last visited

Recent Profile Visitors

2210 profile views

UserMC123's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. when I change the methods/classes to the 1.17 mappings @SubscribeEvent public void onFogColor(EntityViewRenderEvent.FogColors event) { Camera info = event.getInfo(); FogType state = info.getFluidInCamera(); if (state instanceof OilFluid) { event.setRed(0.02F); event.setGreen(0.01F); event.setBlue(0.0F); } } @SubscribeEvent public void onFogDensity(EntityViewRenderEvent.FogDensity event) { Camera info = event.getInfo(); FogType state = info.getFluidInCamera(); if (state instanceof OilFluid) { GlStateManager._blendEquation(2048); event.setDensity(1.0F); event.setCanceled(true); } } the error says the OilFluid is not a FogType (obviously)
  2. It's not because of the new FogType class
  3. I need help with fluid fog in 1.17.1 I know in 1.16.5 I would use @SubscribeEvent @OnlyIn(Dist.CLIENT) public void onFogColor(EntityViewRenderEvent.FogColors event) { ActiveRenderInfo info = event.getInfo(); FluidState state = info.getFluidInCamera(); if (state.getType() instanceof OilFluid) { event.setRed(0.02F); event.setGreen(0.01F); event.setBlue(0.0F); } } @SubscribeEvent @OnlyIn(Dist.CLIENT) public void onFogDensity(EntityViewRenderEvent.FogDensity event) { ActiveRenderInfo info = event.getInfo(); FluidState state = info.getFluidInCamera(); if (state.getType() instanceof OilFluid) { GlStateManager._fogMode(2048); event.setDensity(1.0F); event.setCanceled(true); } } how do I do it in 1.17.1?
  4. Ok Here is the Updated Code: The Model Class: My Renderer class: And the updated Main Class: Also, I realized that the Main Class Events shouldn't be static and now the game runs but the model isn't rendering.
  5. I assume by the stacktrace you mean this: If I am incorrect just tell me. Also I have made changes to my code.
  6. Also, I tried to extend from PlayerModel to get the same crash.
  7. Ok so I need getParentModel().copyPropertiesTo(suitModel); And I ran to game to see no change. looking back at the armor layer code I saw the copyPropertiesTo was in HumanoidModel So I made my model extend HumanoidModel instead of AgeableListModel and I added: but now the game won't run and I'm getting Description: Rendering overlay net.minecraftforge.fml.ModLoadingException: TestMod (test) encountered an error during the done event phase §7java.util.NoSuchElementException: Can't find part head What have I done wrong?
  8. Ah! ok... The model is showing in game now. How do I set the rotations to be the ones on the player.
  9. Update: I found one issue. I was not registering to ModEventBus but now I get: What do I do about this?
  10. I've made a custom layer for the player but its not showing in game. Here is my model class Here is my Layer class And the registry in the main class What have I done wrong?
  11. Sorry for the slow response. I have solve the problems Thanks.
  12. Ok here is my capability classes My Capability: My Provider: And my IAstroInv just extends IItemHandlerModifiable And it works... Until I quit the game and the items are no longer in the slots. How do I fix the items disappearing after I quit the game? Edit: I'm an idiot and I forgot to add super.serializeNBT(); and super.deserializeNBT(nbt); . And last question how do I have the player drop all the items on death?
  13. Edit Again I got it working with public static Capability<IItemHandler> ITEM_HANDLER_CAPABILITY = CapabilityManager.get(new CapabilityToken<>(){}); but now the slots are filled with items in the hotbar slots.
  14. Look into the GlowLichenBlock class (And subclasses ) and see how it works as well as the jsons.
×
×
  • Create New...

Important Information

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