Jump to content

cdkrot

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by cdkrot

  1. Experimentaly, i founded that following code works, but i think it is not the right way.
  2. (Using latest Minecraft forge v10.12.0.1034). I am registering textures in registerBlockIcons(IIconRegister), but in fact tests shows that it isn't invoked during initializations. P.S. i see strange output in console, like forge trying to load mods from java's rt.jar file.
  3. I'd consider this overkill. It's really just one single byte (the 0 termination for the empty NBTTagCompound). Yes. The bigger problem creates loading. If it finds an empty element it will log like this: WARNING "Skipping TileEntity with id "
  4. I founded that TileEntity is more useful and handy way for timering a single block; You may want to look at save procedure in AnvilChunkLoader while (iterator.hasNext()) { TileEntity tileentity = (TileEntity)iterator.next(); nbttagcompound1 = new NBTTagCompound(); try { tileentity.writeToNBT(nbttagcompound1); nbttaglist2.appendTag(nbttagcompound1); } catch (Exception e) { FMLLog.log.... } } Here in tileentity just given a tagCompounded inconnected with main tree and referenced from The Save Method. So you can't remove it, and it will leave an empty tagCompound if you don't write id,x,y,z here; A solution can be creating a method such as "boolean doSave()" in TileEntity and to skip saving if returned false After relaunching server [mod/world loader] can scan world for BlockContainers unattended with Tile Entity, and create a new empty ones for those. * This work is performed while saving. Yes of course, But why should we always save this garbage to save? It is really don't needed often.
  5. No. I am suggesting to create a same callback, but not for random, for static ticking. This can be as follows: Block.setNeedsTicking(enum E) enum E can be 1. FALSE 2. RANDOM 3. STABLE with using tickRate() and updateTick() as input and callback Maybe. Anyway as I said before it is impossible to create a tileentity without saving function. And even if you want to use it just as a tick handler you need to save - load it. So the other way(also unavailable currently without modifying game src) can be creating "unsaveable" tileentities. Without saving function; And recreating completely new instance Using BlockContainer.createNewTileEntity after relaunching server.
  6. Sometimes it is required to have stable block update ticks. Here we can use Block.updateTick, Block.setRandomTick(true) and tickRate(world) But it gives unstable, random updates. So we are using tile entities, but they was designed to store data. So we have to add mapping for it and store in saves dummy structures like {id, x, y, z} (created by Tileentity.writeToNBT method), just to recreate timer after relaunching server. And i am suggesting to add an api to Block class which will be like Random Tick, but stable; with fixed intervals.
  7. Hello. I have compiled and packed mod, but Forge fails loading it: IllegalAccesException Mod: CrashReport FML log
×
×
  • Create New...

Important Information

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