Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by lerrific

  1. Figured so, thanks. just a bit odd having an inconsistency between the creative menu and the crafting / brewing
  2. that's only for when you drink a potion, and it changes the particle effects, no? I want to be able to set the colour of the potion bottle, the splash potion, and the tipped arrows
  3. I have a potion that has two vanilla effects, and in PotionUtils#getColor (mcp mappings) you can see that all the potion effects colours are combined together to get the resulting colour for the bottle, tipped arrow, etc. Is there a way to override that somehow? There's also a CustomPotionColor nbt tag, but I don't know how to set that on initialization? EDIT: I believe I finally found a hack-y work around, I created my own class extending Effect and overrode shouldRender, shouldRenderInvText, and shouldRenderHUD to false. Then I added a new EffectInstance to my potion with said custom effect, setting the duration to whatever the highest of the other effects are, and making the amplifier some big number like 100. PotionUtils#getPotionColorFromEffectList calculates the resulting colour based on each potions own colour + the amplifier, so setting the amplifier very high forces the colour to be your effects liquid colour. Finally I got rid of the potion tooltip line with the ItemTooltipEvent: @SubscribeEvent public static void hideToolTip(ItemTooltipEvent event) { CompoundNBT tag = event.getItemStack().getTag(); if (tag != null && tag.getString("Potion").contains("your_potion_id")) { event.getToolTip().removeIf(textComponent -> textComponent.getString().contains("your_effect_id")); } } Hopefully this helps someone who had the same problem as me
  4. I have a block that i'd like to act as a light source, eg it still sets the blocklight of nearby blocks, keeps mobs from spawning, ice melts etc, just without visually lighting up the surroundings. Would this be possible? I'm not sure where I should start
  5. Thx for the reply, I couldn't figure out how to get the chunk data's skylight value, but just copying the code from World#calculateInitialSkylight() seems to give an accurate value for the skylight private boolean isDayTime() { double d0 = 1.0D - (double)(this.world.getRainStrength(1.0F) * 5.0F) / 16.0D; double d1 = 1.0D - (double)(this.world.getThunderStrength(1.0F) * 5.0F) / 16.0D; double d2 = 0.5D + 2.0D * MathHelper.clamp(MathHelper.cos(this.world.func_242415_f(1.0F) * ((float)Math.PI * 2F)), -0.25D, 0.25D); int skylightSubtracted = (int)((1.0D - d2 * d0 * d1) * 11.0D); return !this.world.getDimensionType().doesFixedTimeExist() && skylightSubtracted < 4; }
  6. I want to have the current biome & time of day, among other things on the server affect how my entity renders. I'm currently using DataParameter's, because they sync the server and client, but since multiple are being read and written to every tick by each instance of my entity, I can't imagine it's the most performance friendly solution, packets probably out of the question. And they're updated every tick because it's an animation that's supposed to play out smoothly. Is there a proper solution to my problem that doesn't kill servers? Thanks relevant code: https://github.com/Okolytes/Fireflies/blob/master/src/main/java/fireflies/entity/firefly/FireflyEntity.java
  7. Thanks! I think that method was renamed to isInRangeToRenderDist
  8. My fairly small mob pops out of existence at around 30-40 blocks, but I'd like the distance to be further I think vanilla mobs set the trackingRange field in the EntityType builder, but that doesn't appear to do anything for me
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.