Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by DavidM

  1. It works when I try it. How are you calling EntityPlayer#addExperienceLevel? And also how does your method do the reduction?
  2. You have to include them via gradlew. Most IDEs have a package manager that can be used to install libraries like JavaFX, and you probably installed JavaFX with Eclipse’ package manager; however, Minecraft will not recognize such libraries added by IDE package managers.
  3. Try passing in a negative value to EntityPlayer#addExperienceLevel or EntityPlayer#addExperience.
  4. Not really. IIRC caching values in a static variable and using it to look up values is faster than using values() from an enum.
  5. EntityPlayer#onUpdate sets EntityPlayer#noClip to EntityPlayer#isSpectator right after PlayerTickEvent is fired, so setting EntityPlayer#noClip to true in an event subscriber of PlayerTickEvent does not work. It does work in an event subscriber of LivingUpdateEvent though.
  6. I am creating a creative building utilities mod. One feature I would like to add is to make the player able to clip through blocks like in spectator mode while building. How would I achieve this?
  7. Your class is never used. You cannot override a concept from Minecraft with a new class and expect the game to use it. Your block has to override it; Block inherits IForgeBlock, and therefore its method of checking the enchanting power of that position. In your block you want to make into a bookshelf, override IForgeBlock#getEnchantPowerBonus and return the value you desire.
  8. 1. Do you know Java? 2. Use for loop to iterate through the array. 3. EntityPlayerSP is for client only. Getting player with Minecraft.getMinecraft().player will crash on a dedicated server. 4. Instead of creating another variable for seconds, you could just check whether ticks is larger than 3000.
  9. Items are singleton; you cannot just create a new instance of it. You should create a new ItemStack and save your BlockPos in the NBTTag.
  10. Please do not make duplicate threads. MCreator tho -.-
  11. That is not a valid event subscriber. An event subscriber can have only one parameter: the event. Check out https://mcforge.readthedocs.io/en/latest/events/intro/.
  12. Draco18s is joking around. Override glass' registry with a new instance of BlockGlass but override Block#getRenderLayer to return the layer you desire.
  13. Your code is not going to work as intended. Your code will run whenever a skeleton dies instead of when killed by a zombie. Oops I missed that. Also, might as will move the getting of the World instance inside your if.
  14. You might want to use string concatenation instead of the large bulk of ifs.
  15. Thanks. Does the model itself affect whether sides should be culled though? If I have a model that does not take up the entire block, but make Block#isOpaque return true, does the game still tries to cull the sides?
  16. The game does not render faces (covered by other solid blocks) that the player cannot see. If a side of a block is covered with another solid block, then that side will be culled, as the player cannot see that side. I am wondering how the game determine whether a side should be rendered when the model is not a simple cube. If the model of a block is not cube_all, but rather a complex model created by the modder, does the game still culls the sides?
  17. Do not use 1.12. Use 1.12.2. @Hosam20101 You probably don’t. Please make your own thread and provide your log.
  18. Not possible. This has already been asked before. The parallel mod loading in 1.14 would increase the loading speed a lot though.
  19. What launcher are you using? Please provide a screenshot. Do not hijack other’s thread; please make your own thread.
  20. That should be impossible. Show your code. Note that NULL_AABB might had been renamed to INFINITE_EXTENT_AABB.
  21. I suppose OP is referring to the (rather badly named) OreSpawn mod in 1.7.10, not MMD OreSpawn. MMD OreSpawn is a mod that controls the generation of ores. It does not add anything apart from configurations.
  22. I thought World#getCombinedLight uses which ever is larger, the passed in value or the neighbor block light.
  23. RenderPlayerEvent is fired when a player is rendered. This includes the rendering of other players in multiplayer. You will have fetch data from the player in the event and determine the color of the aura.
  24. Subscribe toRenderPlayerEvent.Post and do your render there. You might want to look up on OpenGL basics in order to do the rendering, then check out Minecraft’s Tessellator and BufferBuilder.
  25. Override TileEntity#getRenderBoundingBox and return NULL_AABB to make the tile entity render at all times (when you are not looking at it).
×
×
  • Create New...

Important Information

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