Everything posted by Abastro
-
[1.8] how to detect a tileentity calls markDirty()?
In case the blocks are nearby blocks, In Block#onNeighborChange get the changed TileEntity. If the tileentity is what you are looking for, then do what you want. That's how you detect markdirty call.
-
[1.8][SOLVED] Attribute Modifier Help
It's not good that using CommonProxy as the GUI Handler, but anyway.. This problem is not related with gui. In the entity's writeEntityToNBT code, you saves this.getOwner().getName() when getOwner() can be null. Then. Please post your current readEntityfromNBT and writeEntityToNBT code, I think you should change many codes from the methods to fix this issue.
-
[1.7.10] World#rand not so random?
It is really simply this (other variations yield similar results). public EntityBirdOfPrey(parWorld) { super(parWorld); System.out.println("Rand ="+parWorld.rand.nextInt(6)); } Oh, and how did you created the multiple instances of the EntityBirdOfPrey?
-
[1.7.10] Trouble with Auto Repair
- [1.8][SOLVED] Attribute Modifier Help
Then, the GuiHandler code is also needed.- [1.7.10] World#rand not so random?
You missed the point of this issue. Randoms with same seed gives same values in same time, but in this case it gives same values for different times!- [1.8] how to detect a tileentity calls markDirty()?
No. It only changes nearby blocks. So it can only be detected by nearby blocks or tileentities.- [1.8][SOLVED] Attribute Modifier Help
Yes.- [1.7.10] World#rand not so random?
The whole code in the entity constructor is needed.- CoFH RF API Transmit RF Wirelessly (using mod block)
You also need to override Block#hasTileEntity(int metadata) and Block#createTileEntity(World world, int metadata). In hasTileEntity you should return true(if it is not meta-block), and in Block#createTileEntity you should return the instance of the tileentity.- [1.8][SOLVED] Attribute Modifier Help
No, I mean where you call the constructor of the Gui. The gui should be constructed and opened there.- Render a bufferedImage in gui.
Do not use drawTexturedModalRect. It has several problems with texture size, etc. Make your custom implementation replacing that. (Texture u,v should be 0,1 -> 1,1 -> 1,0 -> 0,0)- [1.7.10] URL to ResourceLocation
Yes, you're right. I might see illusion or something... (I saw something setting ResourceLocation in DynamicTexture code) Anyway, Dynamic Texture will be needed to do what OP wanted to do. EDIT: I'd upse my previous admission, see TextureManager#getDynamicTextureLocation code. It registers the DynamicTexture with key 'ResourceLocation'. So in this case ResourceLocation is actually an abstract expression of resource location, as key for the resource- [1.7.10] World#rand not so random?
To analyze why random class gives same value there, it is needed that when and where the Random#nexInt() is called. So please post the code.- [1.7.10] URL to ResourceLocation
He wanted to transform Image to ResourceLocation, which is not possible. ResourceLocation is just reference, "path", to resource with modid and internal path. What he needed to use, you said above... No. It is actually possible. Think about skin, it is also from URL! So, Look into the class 'DynamicTexture'. It will give you a hint. + This thread will also help you: http://www.minecraftforge.net/forum/index.php/topic,25161.msg127886.html#msg127886- Render a bufferedImage in gui.
That's simply size problem. Please post the rendering code.- [1.8] Client tick hook
Just @SubscribeEvent the ClientTickEvent, for client tick checking. (in your case WorldTickEvent might be better.)- [1.8][SOLVED] Attribute Modifier Help
Where is the code for opening Gui, 'cause it is related with this crash.- Tile Entity Not Saving Data
TGG already said how to do it. You need to send the value of the field using icrafting.sendProgressBarUpdate in Container#detectAndSendChanges, and override Contaier#updateProgressBar to update the field.- [1.8][SOLVED] Attribute Modifier Help
So where do you opens the dog gui? I cannot find one.- Render a bufferedImage in gui.
That means your texture is too big. How big is it?- [1.8] Rendering an item "placed" on top of a TileEntity
You need TESR for that. There is RenderItemFrame#renderItem(EntityItemFrame) which would be useful to understand how to render item.- Render a bufferedImage in gui.
Use DynamicTexture. You can easily construct a DynamicTexture with BufferedImage, and get its ResourceLocation from TextureManager#getDynamicTextureLocation(String key, BufferedImage img);- CoFH RF API Transmit RF Wirelessly (using mod block)
What is your forge version and how did you registered the block and tileentity?- [1.7.10] How to get the XP of a Furnace Recipe?
That's really strange. Try printing the block's name, to make sure that it is gold ore. - [1.8][SOLVED] Attribute Modifier Help
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.