
BinaryCPG
Forge Modder-
Posts
23 -
Joined
-
Last visited
Everything posted by BinaryCPG
-
Well, back to the testing grounds. Thank you, although. EDIT: Playing with the Scale seems to work fine
-
No. If you got Vanilla Minecraft, you got a resolution of 16*16 mpx per Block Surface. (mpx = Minecraft Standard pixel size, resolution of 16*16 means a pixeldensity of 1 px / 1 mpx) What i want is a model, that pixeldensity is higher, like 8 px / 1 mpx. On a mod block it is simple: insert a texture file that has got a resolution of 128*128 pixels. It gets automaticly scaled. But its not the same on a custom model. Someone who understood that?
-
Is there a way to change the resolution of a custom model? I am not referring to the size of the texture file, but the resolution the model is rendered in-game. Is there a (simple) way to do this?
-
This is probaby what you are searching for: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571597-forge-1-6-4-1-8-custom-inventories-in-items-and
-
You need an Event Listener for a World getting loaded. Try it like this: ExampleMod Class: @EventHandler public void init(FMLInitializationEvent event){ MinecraftForge.EVENT_BUS.register(new WorldEventListener()); } WorldEventListener Class: @SubscribeEvent public void worldLoaded(WorldEvent.Load event){ event.world.setBlock(0, 70, 0, Blocks.cactus, 1, 2); // every time a world gets loaded this method is gonna get called }
-
EntityItem entityitem = new EntityItem(world, x, y, z, new ItemStack(item, amount, damage)); if (!world.isRemote) { world.spawnEntityInWorld(entityitem); }
-
If you are referring to the variables "textureWidth" and "textureHeight", then you should read the description of both these variables: "The size of the texture FILE'S width/height in pixels." and not of the texture to be shown in the model segment.
-
Is there a way to change the resolution of a block model? (E.g.: A model surface with 16x16 pixels size in standard minecraft resolution, but the textures resolution for that part is 64x64 pixels in size)
-
[1.7.10] Differentiate Client/Server Method Calls
BinaryCPG replied to BinaryCPG's topic in Modder Support
That was exactly what i needed, thx -
I am currently working on a part of my code that requires, that the called method knows, if it was called by Server Side (Side.Server) or Client Side (Side.Client). Is there any universal way to check which side is calling the method? (By universal i mean u do not need an additional parameter in the method declaration, you just call a persistent method like "FMLClientHandler.instance().getServer().getEntityWorld()" and get the result)
-
[1.7.10] Problems with TileEntity - Slots/ItemStacks and NBT
BinaryCPG replied to BinaryCPG's topic in Modder Support
i tried it like that: https://github.com/BinaryCPG/MM/blob/master/src/main/java/de/binarycpg/mm/gui/inventory/gui/GuiATM.java https://github.com/BinaryCPG/MM/tree/master/src/main/java/de/binarycpg/mm/network -
[1.7.10] Problems with TileEntity - Slots/ItemStacks and NBT
BinaryCPG replied to BinaryCPG's topic in Modder Support
Take a look at GuiATM.mouseClicked() and TileEntityATM.updateEntity(). I use the variable 'buttonClicked_ID' -
[1.7.10] Problems with TileEntity - Slots/ItemStacks and NBT
BinaryCPG replied to BinaryCPG's topic in Modder Support
I don't use the GuiScreen to perform the action. My gui provides an integer to handle in the 'updateEntity()' method, synchronized by the container (works). But my problem is: after the action is performed in the updateEntity() (works): if i reopen the gui the ItemStacks are reset. (correct me please if i am completely false) EDIT: I think the problem might be in the 'importMoney()' Method (look TileEntityATM) -
Problems: 1) Slots/ItemStacks Got a TileEntity with functioning GUI and Container. If the player clicks on a spot looking like a button in the GUI (buttonID=13, triggering 'importMoney()') the money (items) from slot with index 0 (TileEntityATM.inventory[0]) should get set to 'null' and the variable holding the amount of money the currently using player has (moneyBankBalance) should get added up by the amount of money inserted (til here works fine). But after reopening the GUI the ItemStack reappears in slot 0 and the variable 'moneyBankBalance' is set to 0. 2) NBT By using the (entityPlayer.)getEntityData().set/getInteger(<parameter>)-command i want to write and read the variable 'moneyBankBalance' to the player data. That doesn't seem to work at all. What did i forget/make wrong? Please help! All related files: TileEntityATM GuiATM ContainerATM
-
I have 2 Problems: 1) I've got two methods to interact with the slots in my TileEntity: The Methods work, but the items in the input-slot don't disappear correctly & the items in the output-slot don't appear correctly. What did i forgot? 2) I am using the EntityPlayer.getEntityData() to get an double: & later to set it: It works as long as i don't reload the world. On re-log the var "bankBalance" is 0. is this because of the development environment (like i can't take screenshots) or did i miss something?
-
The Problem is: a chest got an TileEntity storeing the data. items don't seem to have something like that. also: if i store the data in the MyItem.class the itemstacks stored in there apply globally to all items created from MyItem.class
-
Item with Inventory I want to create an Item that contains 9 ItemStacks. The Item shouldn't have an GUI. These ItemStacks should get filled if the item was in an specific machine with specific Items that did get put in into the machine. If the Item gets sneaked+rightclicked the ItemStacks should drop on the ground or get transferred into the players inventory rightclicking. There also should be a craftable variant of the item that's empty. I got the basic Item class structure already. Just don't know how to store the ItemStacks properly. Any ideas? Thx
-
Got a block that, placed, adds an other block above it to the world & rotates it. Now, what it want is: if the bottom Block gets broken the other block gets removed/broken. I tried to call breakBlock(...) in the breakBlock(...) method of the bottom block: public void breakBlock(World world, int x, int y, int z, Block block, int p_149749_6_) { Block block1 = world.getBlock(x, y+1, z); block1.breakBlock(world, x, y+1, z, MinecraftMoney.instance.moneyExchangeDown, this.blockRotationIndex); super.breakBlock(world, x, y, z, block, p_149749_6_); } To control, if the breakBlock(...) of the top block gets called I wrote a console output with the given variables for the top block breakBlock(...). The output confused me even more: Called by breakBlock(...) of bottom block: 'breakBlock()' called with: [net.minecraft.world.WorldServer@8baf6a][401][80][339][de.binarycpg.mm.block.BlockMoneyExchangeDown@defb8][4] Called in the Moment i broke the block 'breakBlock()' called with: [net.minecraft.world.WorldServer@8baf6a][401][80][339][de.binarycpg.mm.block.BlockMoneyExchangeDown@defb8][4] Help? What do i need to check or add so it workes?