Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/16/18 in all areas

  1. it seems you need to use RenderGameOverlayEvent.Text to render text. So you may need both RenderGameOverlayEvent.Pre to cancel the item tooltips, and RenderGameOverlayEvent.Text to actually render.
    1 point
  2. The most important thing to understand is that in Minecraft, both Item and Block classes are used as "singletons". This means there is only one instance created for each (e.g. new ItemAxe()) in the entire game. But of course while playing the game it seems like there are lots of items and lots of blocks, so how does that happen? Well, items and blocks do it differently... Items always exist in an ItemStack instance (which adds quantity, damage, other NBT data to make the stack unique). So there is only one ItemAxe instance but there could be lots of ItemStack(ItemAxe) instances. Even for a single item there is an item stack with quantity 1. So each Item class (which is what gets registered) has only one instance, and all item stacks related to that item point to that one instance. Blocks use a different way of propagating in the world. The presence of a block in the world is stored very compactly in the chunk/world data. There is not a new Block instance created for each block placed, instead the chunk just gets a reference that says "in this BlockPos there is this type of block". Additionally, the same block can have somewhat different behavior/looks though so each block is allowed 4 bits (16 values) of "metadata". The metadata represents a Property of the block at that location -- for example, the direction a furnace is facing would be stored in the metadata. Back to the registries: My point then is that there is only one instance of each Item class and each Block class in the entire game. The registries contain these. This is important because it means that you can do a full comparison using Java == and otherwise it keeps the memory and disk space more compact. Tip: You don't have to use the registries to access the instances. There are constants that represent them for vanilla, and you should do the same. For example, Blocks.VINE or Items.SWORD. Note that Entity classes do not work that way -- a new instance is created every time. So the entity registry works a bit differently and is more like a factory. This is okay because there are a lot less entities in the world than blocks (a single chunk can have 65,536 blocks!).
    1 point
  3. They can't, but that mob looks pretty easy to rebuild as a model in one of them. Looks like the model could be done in *counts* 13 cuboids. Once for the central body and then 4 for each of the 3 axises (they'd be long, so rather than 24 spikes, you'd make 12 rods).
    1 point
  4. You may be able to change it by launching the client with the argument: -Dfml.readTimeout=60 Although I don't recommend it because if it is taking that long to connect if you do it will be almost unplayable.
    1 point
×
×
  • Create New...

Important Information

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