-
Dimension- bed sleeps, but no night into day
I made a Dimension (or two), and they look ok. If you hang out, the day cycles to night and back to day just fine as time passes. If you try to use a bed to sleep to the next day, it will let you sleep - dims and fades and waits... and then you wake up. But it is still dark. If you then warp back to Overworld and sleep the overworld turns to day just fine. Quick warp back to Dimension and its day (the bed in Overworld works the cycle for both). Doing a command ~ Time Set 0 ~ will change the time in both worlds. How do I get the beds to work in my Dimension? I tried forcing some overrides in my WorldProvider, worth a shot, but no joy. public class DimensionProv extends WorldProvider{ @Override public String getDimensionName() { return "Bimbieville"; } @Override public double getMovementFactor() { return 4.0; } @Override public boolean canRespawnHere() { return true; } @Override public boolean isSurfaceWorld() { return true; } public boolean isHellWorld = false; @Override public int getRespawnDimension(EntityPlayerMP player){ return modinfo.DimensoinID +1 ; } I very much doubted pulling the boolean IsHell would help, but I was running out of ideas. I tried tracking something called UpdateAllPlayersSleeping laying around a few classes in Minecraft, but got lost as to where I could do something about that
-
[1.7.2] Teleporting to where your cursor is at?
using the CoolAlias ~shoot something there & tp~ way you could (like a bow) fire a ghosty hi-speed-fwoosh modelBiped across to where you look and then tp when it collides ... I'd think that would be a cool effect
-
How to use metadata effectively?
I had a similar situation when doing colored stairs.. I could meta the color, OR the facing, and I didnt want to TE because a ton of them would be in a chunk or 2 when building a castle / player home town. I cheesed out and went with vanilla stairs meta for a bunch of colored stairblocks. (I am using meta subtypes for my ore blocks, and again for some deco blocks, so I feel a little better about trying not to make a gajllion blocks) Good to hear the reminder about CanUpdate() will definitely put that to use later... may even rethink my colored stairs configuration with that in mind- Maybe a couple hundred dataTE wont lag so bad if they get no ticks
-
why does it have the same name?
public class RedstoneClothItem extends ItemBlock idk if this is related to the names problem, but shouldnt that be ItemBlockWithMetadata for the subtyping of the items? I was having issues with block subtypes not long ago and after reading a CoolAlias post elsewhere about IBWMD a bunch of my problems cleared up with proper metadata passing between Block form and Item form of the thing maybe this will help, maybe not but it sounds like you are having Subtype issues (name in particular) and the IBWMD helps take care of meta/subtype issues
-
[Solved] [1.7.2] Custom Recipes For Custom Furnace
@Override public int computeHashCode(ItemStack stack) { // not the most efficient hashCode probably int result = stack.getItem().hashCode(); result = 31 * result + stack.getItemDamage(); return result; } Why the 31x in the packing? I would have figured a bitshift to pack the two values, which would be a 2power multiplier, but with that 31 you have the low 5 bits all set, but followed with a + instead of an AND to pack.... also, while block Metadata has the 16 limit, cant Items have far more 'damage' subtypes than would fit in a 31x& pack? I am not using the code, I just want to understand it better. If you just picked 31x cause it looked good, ok, I can live with that, but I am wondering if there is some reason, some significance to using 31x that I am missing
-
onBlockActivated opengui i got tilenentity = null
Just had a similar problem with Null TE in guihandler. I did register the TE, I did set MyTE as the block te, but I didnt set the blocks HasTileEntity... once I told the block HasTileEntity the nulls stopped for me
-
Teleporting a Player to a new Dimension
Got my No-Portal DIMtp working with a stripped tiny "Extends Teleporter" subclass in my block class.... using OnActivated() for my code atm, but will change that to the onWalkedOn() trigger probably. Cutting out all the portal stuff got it to work good, only features are a single block get to get the new dimension to gen the destination chunk PRIOR to calling the transfer, and the CoolAlias/CJCutrone9 code for the transfer and post-elevation-fix. Dont have to worry about slow world gens anymore if(pWorld.isRemote) return false; if (pEPlayer instanceof EntityPlayerMP) { EntityPlayerMP EMPlayer = (EntityPlayerMP) pEPlayer; int goDim = (pEPlayer.dimension == 0)? modinfo.DimensoinID : 0; WorldServer ws = EMPlayer.mcServer.worldServerForDimension(goDim); Teleporter telep = new Teleporto(ws);//ws.getDefaultTeleporter(); if (goDim != 0) { // dummy grab a block to maybe gen destination Dim chunk aj.ajOut("++BimBug+++ DimTP: grabbed world block- " // aj.out() is my simple console println +ws.getBlock( (int)EMPlayer.posX, 4, (int)EMPlayer.posZ).getUnlocalizedName() ); } EMPlayer.mcServer.getConfigurationManager().transferPlayerToDimension( EMPlayer, goDim, telep); // CoolAlias - CJCutrone9 forum post code +++++++++++ //get the height value so you don't get stuck in solid blocks or worse, in the void double dy = EMPlayer.worldObj.getHeightValue( MathHelper.floor_double(EMPlayer.posX), MathHelper.floor_double(EMPlayer.posZ)); // still seem to need to set the position, +1 so you don't get in the void EMPlayer.setPositionAndUpdate(EMPlayer.posX, dy + 1, EMPlayer.posZ); // ++++++++++++++++++++++++++++++++++++++++++++++++++ } return true; } //================================================= //======== subclass inside myblock file====== public class Teleporto extends Teleporter{ private final WorldServer worldServerInstance; public Teleporto(WorldServer par1WorldServer) { super(par1WorldServer); this.worldServerInstance = par1WorldServer; } @Override public void placeInPortal(Entity pEntity, double p2, double p3, double p4, float p5) { int i = MathHelper.floor_double(pEntity.posX); int j = MathHelper.floor_double(pEntity.posY); int k = MathHelper.floor_double(pEntity.posZ); this.worldServerInstance.getBlock(i, j, k); //dummy load to maybe gen chunk int height = this.worldServerInstance.getHeightValue(i, k); pEntity.setPosition( i, height, k ); return; } // dont do ANY portal junk, just grab a dummy block then SHOVE the player setPosition() at height } [code]
-
Teleporting a Player to a new Dimension
using the CoolAlias code, when the generation takes too long I still end up in the nether, because I still have that Nether Portal being built around me as the gen churns
-
Modder status/subforum requests
ohhh, I like that goal.... Once my mod gets 1000 dl, then I will pursue the FORGE MODDER title. Until then, arent we really just FORGE HOBBYIST. I can live without status symbols till then. As for the SubForum.. isnt that really just a matter of how much traffic is going on in your existing thread.
-
How To make a tooltip display damage
Think of it this way- STACKS get damaged & repaired, not items. so you want to add info to the stack inside AddInfo(), not the item of the class.
-
[1.7.2] Packet Troubles
wasnt there another example though... at bottom page1 of http://www.minecraftforge.net/forum/index.php/topic,15403.msg81874.html#msg81874 Noppes did an alternative to the DynamicClassPacket netty handler in the Tutorials . I am not running it, I'm doing the NettyTut dynamic class, but the alternative from Noppes looks like the old way jazzed up for 17x
-
[SOLVED][1.7.2] MinecraftForge.EVENT_BUS vs. FMLCommonHandler.instance().bus()
doh! That would explain why one way works with my event handler, and the other way dont It was one of those things I wondered about when upgrading from 164, but didnt care too much since I got one way to work
-
[1.7.2]what to use instead of onInventoryChanged() method
Tried MarkDirty() my TE Inv works and its hard to argue with success
-
[1.7.2] .OBJ loading problem
if you are concerned about the OBJ format, I had problems until I stopped it from exporting Material info. The UVs are ok, but not Material info lines in the file. My OBJs load ok with V VT VN S off F types of lines
-
[1.7.2]what to use instead of onInventoryChanged() method
I too wonder what to use. I was following a tutorial ( curse:MrrGingerNinja TE inv) and onInventoryChange() was called to commit the stuff done in 2 of the required TE IInv methods. ex derived from tut: @Override public void setInventorySlotContents(int pSlot, ItemStack pStack) { inventory[pSlot] = pStack; if(pStack != null && pStack.stackSize > getInventoryStackLimit()) { pStack.stackSize = getInventoryStackLimit(); } onInventoryChanged(); } it seems like it is just committing the change, and the choices of remaining talk about chunkloading and refreshing from read etc (I want to commit, not read) MarkDirty sounded like it will do stuff at some later point beyond this control ... no, Commit Now! whats the way other folks are committing setInventorySlotContents() TE IInv changes now, if not onInventoryChanged()?
IPS spam blocked by CleanTalk.