
tyker1
Members-
Posts
33 -
Joined
-
Last visited
Everything posted by tyker1
-
[1.7.10] MineCraft terminated at load screen with no crash report
tyker1 replied to tyker1's topic in Modder Support
yep...and that's why i have no idea about whats going wrong -
[1.7.10] MineCraft terminated at load screen with no crash report
tyker1 replied to tyker1's topic in Modder Support
i have posted already, there are 2 links, one for server one for client...check it here:http://pastebin.com/zRkTR9iF -
[1.7.10] MineCraft terminated at load screen with no crash report
tyker1 replied to tyker1's topic in Modder Support
i tried to do that... but it dosent help.. also i'm now only running client, so i think theres nothing to do with fml-server-latest also, i remember the first time i installed forge with gradle, i met this problem 2..and i tried to install forge in my .minecraft folder and then it works...but now..it happens again... -
[1.7.10] MineCraft terminated at load screen with no crash report
tyker1 replied to tyker1's topic in Modder Support
i though so. but when i checked in it: @SidedProxy(clientSide="com.redintegrated.RedIntegratedMod.proxy.ClientProxy", serverSide="com.redintegrated.RedIntegratedMod.proxy.CommonProxy") public static CommonProxy proxy; and there my CommonProxy is: package com.redintegrated.RedIntegratedMod.proxy; public class CommonProxy { public void initSounds() { // TODO Auto-generated method stub } public void initRanderers() { // TODO Auto-generated method stub } } it's not wrong...also i have ran this mod for more than 30times before and never terminated like this time.(i havent modified anything since last time i edited and ran it successfully)...[/code] -
[1.7.10] MineCraft terminated at load screen with no crash report
tyker1 replied to tyker1's topic in Modder Support
ok, here is the fml-server-latest.log http://pastebin.com/uWMJAgxS and here is the fml-client-latest.log http://pastebin.com/zRkTR9iF -
Hi there... i just paused my Mod for a while and now wanted to go on with it. but then i met this **** problem, when i click "run client" in eclipse, it do start the minecraft for me, but client will terminate at the load screen(for loading 7/7) and gives no information about y it terminated. In order to make sure that it is not the problem with my jre, i tried to start the official one with minecraft.exe, it works. Also i'm sure that my mod code dose nothing wrong(cause i tried to remove it from the mod folder and run mc in eclipse without custom mods, it also not work)... maybe someone has met the same problem? how u solve it? thx a lot for help
-
[1.7.10] Force Interface(GUI) to update within tileentity
tyker1 replied to tyker1's topic in Modder Support
of course: so firstly on the server side: @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if (!world.isRemote) { TileEntity te = world.getTileEntity(x, y, z); if (te != null && te instanceof TileEntityProcessorHolder) { if(((TileEntityProcessorHolder)te).isUseableByPlayer(player)) ((TileEntityProcessorHolder)te).openInventory(); } FMLNetworkHandler.openGui(player, RedIntegrate.instance, GuiInfos.GUI_ProcessorHolder, world, x, y, z); } return true; } PS: te.openInventory() is only to set a flag for keeping search for some special block when gui is opened and here is the interface: @SideOnly(Side.CLIENT) public class GuiProcessorHolder extends GuiContainer { private TileEntityProcessorHolder holder; public GuiProcessorHolder(InventoryPlayer invPlayer, TileEntityProcessorHolder TE_ProcessorHolder) { super(new ContainerProcessorHolder(invPlayer, TE_ProcessorHolder)); xSize = 176; ySize = 201; // TODO Auto-generated constructor stub } private static final ResourceLocation texture = new ResourceLocation(GuiInfos.RESOURCE_LOCATION, "textures/gui/GuiProcessorHolder.png"); @Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { // TODO Auto-generated method stub GL11.glColor4f(1, 1, 1, 1); this.mc.getMinecraft().renderEngine.bindTexture(texture); this.drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); } @Override protected void drawGuiContainerForegroundLayer(int x, int y) { this.fontRendererObj.drawString("Processor Holder", 8, 6, 0x404040); } @Override public void initGui() { super.initGui(); buttonList.clear(); buttonList.add(new GuiButton(GuiInfos.GUI_ProcessorHolder_BTN_FORMAT, guiLeft + xSize, guiTop, 60, 20, "Format")); } @Override public void actionPerformed(GuiButton button) { RedIntegrate.msgWrapper.sendToServer(new ButtonMessage((byte)button.id)); } } -
[1.7.10] Force Interface(GUI) to update within tileentity
tyker1 replied to tyker1's topic in Modder Support
yep...it seems so..but there must be something wrong..or maybe my MC is wrong? cause i always get "faild to init device" when starting MC -
[1.7.10] Force Interface(GUI) to update within tileentity
tyker1 replied to tyker1's topic in Modder Support
my container is like this: public class ContainerProcessorHolder extends Container{ private TileEntityProcessorHolder holder; public ContainerProcessorHolder(InventoryPlayer invPlayer, TileEntityProcessorHolder TE_ProcessorHolder) { this.holder = TE_ProcessorHolder; // linking hotbar into interface for (int x = 0; x < 9; ++x) { this.addSlotToContainer(new Slot(invPlayer, x, 8 + 18*x, 178)); } // linking player inventory to interface for (int y = 0; y < 3; ++y) for (int x = 0; x < 9; ++x) { this.addSlotToContainer(new Slot(invPlayer, x + y * 9 + 9, 8 + 18 * x, 120 + y*18)); } // linking 3 ProcessorHolderSlot to interface // gray one this.addSlotToContainer(new SlotProcessor(TE_ProcessorHolder, 0, 77, 39)); // orange one this.addSlotToContainer(new SlotProcessor(TE_ProcessorHolder, 1, 53, 77)); // green one this.addSlotToContainer(new SlotProcessor(TE_ProcessorHolder, 2, 105, 77)); } @Override public boolean canInteractWith(EntityPlayer player) { return holder.isUseableByPlayer(player); } @Override public ItemStack transferStackInSlot(EntityPlayer player, int i) { Slot slot = getSlot(i); if(slot != null && slot.getHasStack()) { ItemStack stack = slot.getStack(); ItemStack result = stack.copy(); if (i >= 36) { // transfer item from the Machine's Inventory if (!mergeItemStack(stack, 0, 36, false)) { return null; } } else { // transfer item from players inventory if (!stack.getItem().equals(IntegratedItems.itemFPGA) || !mergeItemStack(stack, 36, 36 + holder.getSizeInventory(), false)) { return null; } } slot.putStack(null); // because FPGA's stack limit = 1 slot.onPickupFromSlot(player, stack); return result; } return null; } @Override public void onContainerClosed(EntityPlayer player) { holder.closeInventory(); } public TileEntityProcessorHolder getProcessorHolder() { return holder; } } do i need to implement method to make that work? -
[1.7.10] Force Interface(GUI) to update within tileentity
tyker1 replied to tyker1's topic in Modder Support
but in fact it made the change in tileentity, but gui is not refreshed unless i click that slot(slot 1 in this case), and i'm confused about this for almost the whole week -
[1.7.10] Force Interface(GUI) to update within tileentity
tyker1 replied to tyker1's topic in Modder Support
Sry, im just kinda stupid maybe. But i still can't find out why my gui doesn't refresh. here is what i have done: firstly a MessageHandler is registered on the server side: msgWrapper.registerMessage(ButtonMessageHandler.class, ButtonMessage.class, MessageInfo.BTN_MESSAGE, Side.SERVER); then in my Gui i have this one: @Override public void actionPerformed(GuiButton button) { RedIntegrate.msgWrapper.sendToServer(new ButtonMessage((byte)button.id)); } so in my opinion, i have sent the button click message to the server. and the server will process it like: public class ButtonMessageHandler implements IMessageHandler<ButtonMessage, IMessage>{ @Override public IMessage onMessage(ButtonMessage message, MessageContext ctx) { switch (message.btnID) { case GuiInfos.GUI_ProcessorHolder_BTN_FORMAT: Container container = ctx.getServerHandler().playerEntity.openContainer; if (container != null && container instanceof ContainerProcessorHolder) { TileEntityProcessorHolder holder = ((ContainerProcessorHolder)container).getProcessorHolder(); holder.FormatChip(); } break; } return null; } } and in TE's FormatChip method, i wrote: public void FormatChip() { ItemStack item = items[1].copy(); items[1] = null; if (item != null && items[2] == null && item.getItem().equals(IntegratedItems.itemFPGA)) { if(item.stackTagCompound == null) { item.stackTagCompound = new NBTTagCompound(); } item.stackTagCompound.setBoolean("formatted", true); item.stackTagCompound.setIntArray("outputs", outPorts); item.stackTagCompound.setIntArray("inputs", inPorts); items[2] = item; } } i have read some where that the Inventory will sync automaticly, so i think the content of this tileentity on client side will then sync automaticly with the one on server side. Am i wrong? -
[1.7.10] Force Interface(GUI) to update within tileentity
tyker1 replied to tyker1's topic in Modder Support
anyone know why this happens and how to fix it? -
[1.7.10] Force Interface(GUI) to update within tileentity
tyker1 replied to tyker1's topic in Modder Support
i have registered messagehandler for doing this, when the button is clicked, a message is sent to MessageHandler (on server side) and in the messagehandler the method "FormatItem" will be called. also the tileentity is get through getServerHandler().playerEntity.openContainer like follow: Container container = ctx.getServerHandler().playerEntity.openContainer; if (container != null && container instanceof ContainerMachine) { TileEntityMachine machine = ((ContainerMachine)container).getMachine(); machine.FormatItem(input, output); } so i think i have done changes to slot and items at server side...but the problem is client-side Gui is not refreshed when i done these changes to slot and item -
Hi, i was trying to make a machine, which(when click the button)write stackTagCompound of an itemstack in one slot and then output the result in the other slot. but the problem i met is when i use something like following code to do that, the "formatted" itemstack still "stay" at where it used to be, until i click it. and my question is, how to do that automaticly? public class TileEntityMachin extends TileEntity implements IInventory{ private ItemStack[] items; ..... public void FormatItem(int input, int output) { ItemStack item = items[input].copy(); items[input] = null; // because i have set the maxStackLimit to 1 if (item != null && item.stackTagCompound != null) { ....format that item.... } items[output] = item; } } PS: i have also tried to use setInventorySlotContents, but its also not get fixed.
-
ah...ok firstly sry for my poor english. and for the second thing...my fault, i have wrongly understand the "locking function" of repeater here: http://minecraft.gamepedia.com/Redstone_Repeater
-
yes it is, but both 4 sides are able to connect with redstone, and it will work like a normal diode or a flip-flop. what i want is let only 2 side to connect( i mean graphic) i
-
Hello, it's me again Orz First of all, Sry for my poor english, and i have wrongly explained my question theres something about my question: 1. i have an array to store sides of my block that are able to connect with redstone wire.(for receiving redstone signal and give out redstone signal). 2. the block should be rendered as a normal block, and i don't want to copy any codes from vanilla blocks, because its almost unreadable(as for forge 10.13.4.1448, almost all parameters and variables in forgeSrc are randomly named, like i0, f0, p_149727_2_ etc.) 3. as far as i know(yes, sry that i just started to learn MC-Modding in the last 2 weeks, so i'm someway ,in your opinion, stupid) if i want a block to provide redstone signal, i should override "canProvidePower" method and let it returns true: @Override public boolean canProvidePower() { return true; } but then all sides of my block are able to connect with redstone wire(redstone wire change thier appearance when placed near this block), for instance, i have a block and i only want redstone wire only able to connect on its side 2 and side 3. how can i do that? So i have figured it out by myself. it takes a little bit time to realize that because there's no enough document in internet or in forge source. the trick is using int isProvidingWeakPower(int side, int meta) and isProvidingStrongPower, if u want to prevent specific side from connecting with redstone wire, just add: switch (side) { case No_Connection_Side: return 0; }
-
ill have a try thx for helping
-
yep, i figured out the actual problem... this tileentity is not synchronized after server restart lol... client side always get a new tileentity with new compound so its always blank... well, so its actually the problem, how to synchronize tileentity after server restart lol
-
what i get from worldObj.markBlockForUpdate() is only 3 parameter, which ,i guess, is the coordinate of the block to update...how can i set flag? also another question is, where should i put this command? when i put it at the end of readFromNBT, it throws a NullPointerException, should i use a flag and then put this command in updateEntity? or maybe use worldObj.scheduledBlockUpdate? have tried these in updateEntity, and nothing happens(well it do be called each tick, but block is not re-rendered)
-
Hello, it's me again just now i have finished an ISBRH to render my block(in order to make it always point to the direction it was placed), cause this block itself has 8 states(each has one unique icon), i have decided to use metadata for these 8 icon and make a TileEntity to store the blocks orientation and other infos. So there comes the problem. The block dose get rendered correctly when i place them, but after i restarted the server, its orientation get reset. I have figured out, that minecraft will render a block before its tileentity read the infos from NBT, so that i always get 0(orientation -- south) after restarted the server. Are there anyway that i can force my block to re-render after its tileentity has loaded all the infos from NBT? i have tried updateTick method in my block class, but it seems it never be called. i also tried to use worldObj.markBlockForUpdate() as well as MineCraft.getMinecraft().renderGlobal.markBlockForRenderUpdate() at the end of readFromNBT method in my tileentity, but all i've got is nullPointerException are there anyway to do this? or i must put orientation info in metadata in order to get it work? Thx for help.
-
[Solved] TileEntity Type xxx has throw an exception trying to write state?
tyker1 replied to tyker1's topic in Modder Support
tyvm.... just figured out that i have forgot to register it Orz. and thx for the hint -
[Solved] TileEntity Type xxx has throw an exception trying to write state?
tyker1 replied to tyker1's topic in Modder Support
For sure, here is the class using this TileEntity: package com.redintegrated.RedIntegratedMod.Blocks; import java.util.Random; import com.redintegrated.RedIntegratedMod.TileEntities.TileEntityPin; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class blockPin extends Block implements ITileEntityProvider{ @SideOnly(Side.CLIENT) private IIcon[] topIcons; @SideOnly(Side.CLIENT) private IIcon sideIcon; public blockPin(int id, Material mat) { super(mat); this.setHardness(7.0F); this.setResistance(2000.0F); this.setCreativeTab(IntegratedBlocks.tabIntegratedBlocks); this.setBlockName(BlockInfo.PIN_UNLOCALIZED_NAME); this.setHarvestLevel("pickaxe", 2); this.setLightLevel(0.3F); } @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister reg) { topIcons = new IIcon[blockInfo.PIN_TOPICON.length]; for(int i = 0; i < topIcons.length; ++i) { topIcons[i] = reg.registerIcon(BlockInfo.RESOURCE_LOCATION + ":" + BlockInfo.PIN_TOPICON[i]); } sideIcon = reg.registerIcon(BlockInfo.RESOURCE_LOCATION + ":" + BlockInfo.PIN_SIDEICON); } @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack item) { TileEntity te = world.getTileEntity(x, y, z); if (te != null && te instanceof TileEntityPin) { TileEntityPin te_Pin = (TileEntityPin)te; int dir = ((MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3) + 2) % 4; te_Pin.setOrientation(dir); } } @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta) { switch (side) { case 0: return sideIcon; case 1: return topIcons[0]; default: return sideIcon; } } @Override public boolean canProvidePower() { return true; } @Override public int isProvidingStrongPower(IBlockAccess ba, int x, int y, int z, int meta) { if (meta / BlockInfo.PIN_TYPE_MOD == 1) { return 1; } else { return 0; } } @Override public Item getItemDropped(int meta, Random rand, int fortune) { return BlockInfo.PIN_DROP; } public boolean isOutPut(int meta) { return (meta > 3); } @Override public TileEntity createNewTileEntity(World world, int meta) { return new TileEntityPin(); } @Override public int getRenderType() { return BlockInfo.Pin_RenderID; } } -
Hello, i was trying to add a TileEntity for my new block in order to store more informations, but when trying to save the world, i always got this exception: [server thread/ERROR] [FML]: A TileEntity type com.redintegrated.RedIntegratedMod.TileEntities.TileEntityPin has throw an exception trying to write state. It will not persist. Report this to the mod author java.lang.RuntimeException: class com.redintegrated.RedIntegratedMod.TileEntities.TileEntityPin is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96) ~[TileEntity.class:?] at com.redintegrated.RedIntegratedMod.TileEntities.TileEntityPin.writeToNBT(TileEntityPin.java:35) ~[TileEntityPin.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:395) [AnvilChunkLoader.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:204) [AnvilChunkLoader.class:?] at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:287) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:340) [ChunkProviderServer.class:?] at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:863) [WorldServer.class:?] at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:370) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:113) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] Thanks for Choonster's help, i forgot to register the tileentity. what a silly mistake Orz
-
yeah, because of 32(in fact 2*4*4, 2 groups and 4 states for 4 directions) states i need a TE to store them. thank you again for the help, its solved now