Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Awesome_Spider

Forge Modder
  • Posts

    892
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Awesome_Spider

  1. Someone will probably correct me if I'm wrong, I'm still learning models myself, but I think when you define the textures in a model you have to tell it your modid too. So instead of: "main": "blocks/fan_on" you have to put: "main": "modid:blocks/fan_on". Also keep in mind that your modid has to be lowercase for textures to work. I learned that the hard way. Hope this helps.
  2. So this isn't an issue about ease of use. Like Animefan said we would need a log. It is not an ease of use issue, rather it is an error that can probably be fixed.
  3. I am still learning the changes between 1.7.10 to 1.11 too, but what I do know is an item is rendered via a json file model, if that helps. Edit: So you have looked at the vanilla code already?
  4. I have a block that overrides randomDisplayTick() in which I would like to spawn a custom particle. In past versions I think it had something to do with EntityFX, but I can't find that now. Am supposed to implement IParticleFactory? What do I do to create a custom particle?
  5. Ok, thanks. I changed them all to ItemStack.EMPTY and it works fine now. The item even stays in when I log out. I recall having trouble with that before...
  6. I am most likely doing something wrong here, as I am trying to follow 2 tutorials at once on this, but I'm not sure. I made a tile entity with an inventory and a Gui and when I tested it by placing the block in the world and clicking it, Minecraft froze up, turned unresponsive, but didn't crash completely although it said as much in the logs. Oddly enough, there is a crash report and it told me there was a nullpointer exception, but the stack trace doesn't seem to point to any of my classes. Here is some information: [spoiler=Crash Report] ---- Minecraft Crash Report ---- // Daisy, daisy... Time: 1/28/17 2:55 PM Description: Ticking player java.lang.NullPointerException: Ticking player at net.minecraft.item.ItemStack.areItemStacksEqual(ItemStack.java:442) at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:89) at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:292) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2138) at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:879) at net.minecraft.world.World.updateEntity(World.java:2105) at net.minecraft.world.WorldServer.tickPlayers(WorldServer.java:676) at net.minecraft.world.World.updateEntities(World.java:1894) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:647) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:794) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:698) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:547) at java.lang.Thread.run(Thread.java:745) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Server thread Stacktrace: at net.minecraft.item.ItemStack.areItemStacksEqual(ItemStack.java:442) at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:89) at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:292) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2138) at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:879) at net.minecraft.world.World.updateEntity(World.java:2105) -- Player being ticked -- Details: Entity Type: null (net.minecraft.entity.player.EntityPlayerMP) Entity ID: 240 Entity Name: Awesome_Spider Entity's Exact location: 65.19, 63.00, -52.49 Entity's Block location: World: (65,63,-53), Chunk: (at 1,3,11 in 4,-4; contains blocks 64,0,-64 to 79,255,-49), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Entity's Momentum: 0.00, -0.08, 0.00 Entity's Passengers: [] Entity's Vehicle: ~~ERROR~~ NullPointerException: null Stacktrace: at net.minecraft.world.WorldServer.tickPlayers(WorldServer.java:676) at net.minecraft.world.World.updateEntities(World.java:1894) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:647) -- Affected level -- Details: Level name: test world All players: 1 total; [EntityPlayerMP['Awesome_Spider'/240, l='test world', x=65.19, y=63.00, z=-52.49]] Chunk stats: ServerChunkCache: 625 Drop: 0 Level seed: 4328687399279554201 Level generator: ID 00 - default, ver 1. Features enabled: true Level generator options: Level spawn location: World: (72,64,-36), Chunk: (at 8,4,12 in 4,-3; contains blocks 64,0,-48 to 79,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 19166 game time, 7208 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 108385 (now: false), thunder time: 1406 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:794) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:698) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:547) at java.lang.Thread.run(Thread.java:745) -- System Details -- Details: Minecraft Version: 1.11 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_60, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 461760664 bytes (440 MB) / 935329792 bytes (892 MB) up to 1415053312 bytes (1349 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP 9.35 Powered by Forge 13.19.1.2189 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.11-13.19.1.2189.jar) UCHIJAAAA forge{13.19.1.2189} [Minecraft Forge] (forgeSrc-1.11-13.19.1.2189.jar) UCHIJAAAA roboticraft{1.11R1.0.0} [RobotiCraft] (1.11) Loaded coremods (and transformers): GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Player Count: 1 / 8; [EntityPlayerMP['Awesome_Spider'/240, l='test world', x=65.19, y=63.00, z=-52.49]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' [spoiler=Code] Main class: public class RobotiCraft { public static final String ModId = "roboticraft"; public static final String Name = "RobotiCraft"; public static final String Version = "1.11R1.0.0"; public static Logger log = LogManager.getLogger(ModId); @Mod.Instance public static RobotiCraft instance = new RobotiCraft(); @SidedProxy(clientSide="wiseowl5.roboticraft.Proxies.ClientProxy", serverSide="wiseowl5.roboticraft.Proxies.CommonProxy") public static CommonProxy proxy; public static CreativeTabs creativeTab = new ModCreativeTab(); @EventHandler public void preInit(FMLPreInitializationEvent e) { ModItems.initItems(); ModBlocks.initBlocks(); GameRegistry.registerWorldGenerator(new ModWorldGen(), 3); } @EventHandler public void init(FMLInitializationEvent e) { ModRecipes.initRecipes(); proxy.registerGuiHandler(); } @EventHandler public void postInit(FMLPostInitializationEvent e) { } } The block class: public class BlockSteamEngine extends BlockTileEntity<TileEntitySteamEngine> { public BlockSteamEngine() { super(Material.ROCK, "steam_engine"); } @Override public Class<TileEntitySteamEngine> getTileEntityClass() { return TileEntitySteamEngine.class; } @Nullable @Override public TileEntitySteamEngine createTileEntity(World world, IBlockState state) { return new TileEntitySteamEngine(); } @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if (!world.isRemote) { player.openGui(RobotiCraft.instance, ModGuiHandler.TILE_ENTITY_STEAM_ENGINE_GUI, world, pos.getX(), pos.getY(), pos.getZ()); } return true; } } The tile entity class (partially based off the furnace): public class TileEntitySteamEngine extends TileEntity implements ITickable, IInventory, IEnergyProvider { private ItemStackHandler inventory; private String customName; private int burnTime; private int totalBurnTime; private int maxEnergy; private int storedEnergy; public TileEntitySteamEngine() { inventory = new ItemStackHandler(1); } public int getSizeInventory() { return 1; } public int getBurnTime() { return burnTime; } public int getTotalBurnTime() { return totalBurnTime; } public boolean isBurning() { return burnTime > 0; } //ITickable @Override public void update() { } //IPowerProvider @Override public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate) { return 0; } @Override public int getEnergyStored(EnumFacing from) { return storedEnergy; } @Override public int getMaxEnergyStored(EnumFacing from) { return maxEnergy; } @Override public boolean canConnectEnergy(EnumFacing from) { return false; } //IInventory @Override public boolean isEmpty() { return inventory.getStackInSlot(inventory.getSlots()).isEmpty(); } @Override public String getName() { return this.hasCustomName() ? this.customName : "container.tile_entity_steam_engine"; } public String getCustomName() { return this.customName; } public void setCustomName(String customName) { this.customName = customName; } @Override public boolean hasCustomName() { return this.customName != null && !this.customName.equals(""); } @Override public ItemStack getStackInSlot(int index) { if (index < 0 || index >= this.getSizeInventory()) return null; return this.inventory.getStackInSlot(index); } @Override public ItemStack decrStackSize(int index, int count) { if (this.getStackInSlot(index) != null) { ItemStack itemstack; if (this.getStackInSlot(index).getCount() <= count) { itemstack = this.getStackInSlot(index); this.setInventorySlotContents(index, null); this.markDirty(); return itemstack; } else { itemstack = this.getStackInSlot(index).splitStack(count); if (this.getStackInSlot(index).getCount() <= 0) { this.setInventorySlotContents(index, null); } else { //Just to show that changes happened this.setInventorySlotContents(index, this.getStackInSlot(index)); } this.markDirty(); return itemstack; } } else { return null; } } @Override public ItemStack removeStackFromSlot(int index) { return null; } @Override public void setInventorySlotContents(int index, ItemStack stack) { if (index < 0 || index >= this.getSizeInventory()) return; if (stack != null && stack.getCount() > this.getInventoryStackLimit()) stack.setCount(this.getInventoryStackLimit()); if (stack != null && stack.getCount() == 0) stack = null; this.inventory.setStackInSlot(index, stack); this.markDirty(); } @Override public int getInventoryStackLimit() { return 64; } @Override public boolean isUsableByPlayer(EntityPlayer player) { return this.world.getTileEntity(this.getPos()) == this && player.getDistanceSq(this.pos.add(0.5, 0.5, 0.5)) <= 64; } @Override public void openInventory(EntityPlayer player) { } @Override public void closeInventory(EntityPlayer player) { } @Override public boolean isItemValidForSlot(int index, ItemStack stack) { return true; } @Override public int getField(int id) { return 0; } @Override public void setField(int id, int value) { } @Override public int getFieldCount() { return 0; } @Override public void clear() { for (int i = 0; i < this.getSizeInventory(); i++) this.setInventorySlotContents(i, null); } //NBT/Capability @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { compound.setTag("inventory", inventory.serializeNBT()); return super.writeToNBT(compound); } @Override public void readFromNBT(NBTTagCompound compound) { inventory.deserializeNBT(compound.getCompoundTag("inventory")); super.readFromNBT(compound); } @Override public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing) { return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || super.hasCapability(capability, facing); } @Nullable @Override public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) { return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY ? (T)inventory : super.getCapability(capability, facing); } } The Gui handler: public class ModGuiHandler implements IGuiHandler { public static final int TILE_ENTITY_STEAM_ENGINE_GUI = 0; @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID == TILE_ENTITY_STEAM_ENGINE_GUI) return new ContainerTileEntitySteamEngine(player.inventory, (TileEntitySteamEngine) world.getTileEntity(new BlockPos(x, y, z))); return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID == TILE_ENTITY_STEAM_ENGINE_GUI) return new GuiSteamEngine(player.inventory, (TileEntitySteamEngine) world.getTileEntity(new BlockPos(x, y, z))); return null; } } The gui for my tile entity: public class GuiSteamEngine extends GuiContainer { private IInventory playerInv; private TileEntitySteamEngine te; public GuiSteamEngine(IInventory playerInv, TileEntitySteamEngine te) { super(new ContainerTileEntitySteamEngine(playerInv, te)); this.playerInv = playerInv; this.te = te; this.xSize = 176; this.ySize = 166; } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f); this.mc.getTextureManager().bindTexture(new ResourceLocation("roboticraft:textures/gui/container/steam_engine_tile_entity.png")); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); if (te.isBurning()) { int scaledBurnTime = this.getBurnLeftScaled(13); this.drawTexturedModalRect(80, 59 - scaledBurnTime, 176, 12 - scaledBurnTime, 14, scaledBurnTime + 1); } int scaledPower = this.getPowerScaled(30); this.drawTexturedModalRect(83, 5 - scaledPower, 176, 30 - scaledPower, 10, scaledPower + 1); } @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { String s = this.te.getDisplayName().getUnformattedText(); this.fontRenderer.drawString(s, 88 - this.fontRenderer.getStringWidth(s) / 2, 6, 4210752); //#404040 this.fontRenderer.drawString(this.playerInv.getDisplayName().getUnformattedText(), 8, 72, 4210752); //#404040 } private int getBurnLeftScaled(int pixels) { int totalBurnTime = this.te.getTotalBurnTime(); return this.te.getBurnTime() * pixels / totalBurnTime; } private int getPowerScaled(int pixels) { int powerCapacity = this.te.getMaxEnergyStored(EnumFacing.NORTH); return this.te.getEnergyStored(EnumFacing.NORTH) * pixels / powerCapacity; } } The container: public class ContainerTileEntitySteamEngine extends Container { private TileEntitySteamEngine te; public ContainerTileEntitySteamEngine(IInventory playerInv, TileEntitySteamEngine te) { this.te = te; // Tile Entity, Slot 1, Slot ID 1 this.addSlotToContainer(new Slot(te, 0, 79, 39)); // Player Inventory, Slot 9-35, Slot IDs 9-35 for (int y = 0; y < 3; ++y) { for (int x = 0; x < 9; ++x) { this.addSlotToContainer(new Slot(playerInv, x + y * 9 + 9, 8 + x * 18, 84 + y * 18)); } } // Player Inventory, Slot 0-8, Slot IDs 36-44 for (int x = 0; x < 9; ++x) { this.addSlotToContainer(new Slot(playerInv, x, 8 + x * 18, 142)); } } @Override public boolean canInteractWith(EntityPlayer playerIn) { return this.te.isUsableByPlayer(playerIn); } } If there is anything else you need please let me know. Edit: I tried running it again and it did crash this time. Here is the new log: [spoiler=New crash report] ---- Minecraft Crash Report ---- // Would you like a cupcake? Time: 1/28/17 3:27 PM Description: Rendering screen java.lang.NullPointerException: Rendering screen at wiseowl5.roboticraft.Inventory.GuiSteamEngine.drawGuiContainerForegroundLayer(GuiSteamEngine.java:47) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:136) at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:382) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1164) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1146) at net.minecraft.client.Minecraft.run(Minecraft.java:405) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at wiseowl5.roboticraft.Inventory.GuiSteamEngine.drawGuiContainerForegroundLayer(GuiSteamEngine.java:47) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:136) at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:382) -- Screen render details -- Details: Screen name: wiseowl5.roboticraft.Inventory.GuiSteamEngine Mouse location: Scaled: (160, 120). Absolute: (640, 480) Screen size: Scaled: (320, 241). Absolute: (1280, 961). Scale factor of 4 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Awesome_Spider'/241, l='MpServer', x=65.19, y=63.00, z=-52.49]] Chunk stats: MultiplayerChunkCache: 537, 537 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (72,64,-36), Chunk: (at 8,4,12 in 4,-3; contains blocks 64,0,-48 to 79,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 19423 game time, 7465 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 64 total; [EntityPig['Pig'/129, l='MpServer', x=125.78, y=67.00, z=-67.49], EntityPig['Pig'/130, l='MpServer', x=113.28, y=68.00, z=-52.23], EntityBat['Bat'/131, l='MpServer', x=119.23, y=54.70, z=-33.47], EntityPig['Pig'/132, l='MpServer', x=125.30, y=67.00, z=-43.53], EntityEnderman['Enderman'/133, l='MpServer', x=116.53, y=22.00, z=-5.47], EntitySquid['Squid'/135, l='MpServer', x=120.89, y=51.52, z=4.49], EntityCreeper['Creeper'/145, l='MpServer', x=135.50, y=41.00, z=-112.50], EntitySheep['Sheep'/146, l='MpServer', x=138.73, y=66.00, z=-118.53], EntityCreeper['Creeper'/147, l='MpServer', x=134.15, y=28.00, z=-109.47], EntitySheep['Sheep'/148, l='MpServer', x=136.76, y=69.00, z=-107.50], EntitySkeleton['Skeleton'/149, l='MpServer', x=129.50, y=32.00, z=-82.50], EntityEnderman['Enderman'/150, l='MpServer', x=134.50, y=36.00, z=-66.50], EntitySheep['Sheep'/151, l='MpServer', x=133.75, y=63.00, z=-64.49], EntitySkeleton['Skeleton'/152, l='MpServer', x=135.50, y=30.00, z=-60.50], EntityCreeper['Creeper'/153, l='MpServer', x=130.50, y=34.00, z=-57.50], EntityCreeper['Creeper'/154, l='MpServer', x=143.50, y=20.00, z=-35.83], EntitySkeleton['Skeleton'/155, l='MpServer', x=139.50, y=14.00, z=-24.50], EntityZombie['Zombie'/156, l='MpServer', x=130.09, y=28.00, z=-19.47], EntityZombie['Zombie'/157, l='MpServer', x=129.18, y=29.00, z=-23.54], EntityCreeper['Creeper'/158, l='MpServer', x=136.50, y=25.00, z=-22.50], EntityZombie['Zombie'/159, l='MpServer', x=128.50, y=30.00, z=-24.50], EntityCreeper['Creeper'/160, l='MpServer', x=140.69, y=19.00, z=-31.15], EntityBat['Bat'/161, l='MpServer', x=141.80, y=36.29, z=-31.35], EntityCreeper['Creeper'/162, l='MpServer', x=130.20, y=28.00, z=-6.44], EntityZombie['Zombie'/163, l='MpServer', x=132.45, y=26.14, z=-13.82], EntitySheep['Sheep'/39, l='MpServer', x=-7.19, y=79.00, z=-120.50], EntityZombie['Zombie'/40, l='MpServer', x=-8.51, y=31.00, z=-60.20], EntitySheep['Sheep'/168, l='MpServer', x=144.81, y=62.58, z=-54.19], EntitySheep['Sheep'/47, l='MpServer', x=0.74, y=78.00, z=-125.86], EntitySpider['Spider'/48, l='MpServer', x=1.25, y=40.00, z=-97.59], EntityCreeper['Creeper'/49, l='MpServer', x=1.50, y=39.00, z=-92.12], EntityZombie['Zombie'/50, l='MpServer', x=14.33, y=14.00, z=-49.69], EntitySpider['Spider'/52, l='MpServer', x=20.50, y=26.00, z=-122.50], EntitySkeleton['Skeleton'/53, l='MpServer', x=25.21, y=15.00, z=-100.63], EntitySpider['Spider'/54, l='MpServer', x=21.50, y=17.00, z=-93.50], EntityZombie['Zombie'/55, l='MpServer', x=20.07, y=13.00, z=-55.12], EntityZombie['Zombie'/56, l='MpServer', x=22.69, y=12.00, z=-51.22], EntityZombie['Zombie'/57, l='MpServer', x=20.70, y=13.00, z=-55.70], EntitySquid['Squid'/59, l='MpServer', x=22.76, y=62.02, z=11.47], EntityBat['Bat'/71, l='MpServer', x=49.25, y=52.10, z=-120.25], EntitySheep['Sheep'/72, l='MpServer', x=54.53, y=65.00, z=-56.27], EntitySheep['Sheep'/73, l='MpServer', x=49.50, y=67.00, z=-46.19], EntitySheep['Sheep'/83, l='MpServer', x=70.18, y=70.00, z=-34.46], EntityBat['Bat'/84, l='MpServer', x=76.48, y=36.81, z=-21.56], EntityCreeper['Creeper'/96, l='MpServer', x=88.30, y=46.00, z=-124.30], EntitySpider['Spider'/97, l='MpServer', x=89.52, y=46.00, z=-125.52], EntitySkeleton['Skeleton'/98, l='MpServer', x=84.53, y=46.00, z=-126.73], EntitySkeleton['Skeleton'/99, l='MpServer', x=83.50, y=46.00, z=-127.50], EntityZombie['Zombie'/100, l='MpServer', x=95.54, y=37.00, z=-31.77], EntitySheep['Sheep'/101, l='MpServer', x=87.47, y=65.00, z=-22.27], EntitySkeleton['Skeleton'/102, l='MpServer', x=95.47, y=22.00, z=22.22], EntityBat['Bat'/108, l='MpServer', x=108.34, y=14.10, z=-66.42], EntityBat['Bat'/109, l='MpServer', x=100.58, y=48.10, z=-73.75], EntityPig['Pig'/110, l='MpServer', x=111.75, y=65.00, z=-56.50], EntityCreeper['Creeper'/111, l='MpServer', x=101.25, y=40.00, z=-40.94], EntityBat['Bat'/112, l='MpServer', x=90.09, y=38.03, z=-26.56], EntityBat['Bat'/113, l='MpServer', x=93.68, y=37.63, z=-27.81], EntitySkeleton['Skeleton'/114, l='MpServer', x=108.70, y=52.00, z=-19.30], EntityBat['Bat'/115, l='MpServer', x=110.14, y=52.08, z=-20.37], EntitySheep['Sheep'/116, l='MpServer', x=99.77, y=69.00, z=-28.52], EntitySheep['Sheep'/117, l='MpServer', x=102.26, y=70.00, z=-31.48], EntityBat['Bat'/118, l='MpServer', x=108.29, y=34.96, z=4.35], EntityPlayerSP['Awesome_Spider'/241, l='MpServer', x=65.19, y=63.00, z=-52.49], EntitySkeleton['Skeleton'/120, l='MpServer', x=97.47, y=23.00, z=18.73]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:451) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2780) at net.minecraft.client.Minecraft.run(Minecraft.java:426) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) -- System Details -- Details: Minecraft Version: 1.11 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_60, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 343920872 bytes (327 MB) / 811073536 bytes (773 MB) up to 1415053312 bytes (1349 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP 9.35 Powered by Forge 13.19.1.2189 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.11-13.19.1.2189.jar) UCHIJAAAA forge{13.19.1.2189} [Minecraft Forge] (forgeSrc-1.11-13.19.1.2189.jar) UCHIJAAAA roboticraft{1.11R1.0.0} [RobotiCraft] (1.11) Loaded coremods (and transformers): GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13399 Compatibility Profile Context 15.201.1151.1008' Renderer: 'AMD Radeon HD 5450' Launched Version: 1.11 LWJGL: 2.9.4 OpenGL: AMD Radeon HD 5450 GL version 4.5.13399 Compatibility Profile Context 15.201.1151.1008, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: English (US) Profiler Position: N/A (disabled) CPU: 4x Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz
  7. I updated the mappings and refreshed grade. But the method is still obfuscated. Do I need to run setupDecompWorkspace again? Edit: I ran setupDecompWorkspace and it put in the new mappings. Thanks for your help.
  8. So, is the method to get the stack size this method: func_190916_E()? It is the only method I can see that returns stackSize.
  9. Oh ya. I almost forgot. The code: [spoiler=The code]My TileEntity class: public class TileEntitySteamEngine extends TileEntity implements IInventory { private ItemStack[] inventory = new ItemStack[this.getSizeInventory()]; private String customName; @Override public String getName() { return this.hasCustomName() ? this.customName : "container.tile_entity_steam_engine"; } public String getCustomName() { return this.customName; } public void setCustomName(String customName) { this.customName = customName; } @Override public boolean hasCustomName() { return this.customName != null && !this.customName.equals("");; } @Override public IChatComponent getDisplayName() { return this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatComponentTranslation(this.getName()); } @Override public int getSizeInventory() { return 1; } @Override public ItemStack getStackInSlot(int index) { if (index < 0 || index >= this.getSizeInventory()) return null; return this.inventory[index]; } @Override public ItemStack decrStackSize(int index, int count) { if (this.getStackInSlot(index) != null) { ItemStack itemstack; if (this.getStackInSlot(index).stackSize <= count) { itemstack = this.getStackInSlot(index); this.setInventorySlotContents(index, null); this.markDirty(); return itemstack; } else { itemstack = this.getStackInSlot(index).splitStack(count); if (this.getStackInSlot(index).stackSize <= 0) { this.setInventorySlotContents(index, null); } else { //Just to show that changes happened this.setInventorySlotContents(index, this.getStackInSlot(index)); } this.markDirty(); return itemstack; } } else { return null; } } @Override public ItemStack getStackInSlotOnClosing(int index) { ItemStack stack = this.getStackInSlot(index); this.setInventorySlotContents(index, null); return stack; } @Override public void setInventorySlotContents(int index, ItemStack stack) { if (index < 0 || index >= this.getSizeInventory()) return; if (stack != null && stack.stackSize > this.getInventoryStackLimit()) stack.stackSize = this.getInventoryStackLimit(); if (stack != null && stack.stackSize == 0) stack = null; this.inventory[index] = stack; this.markDirty(); } @Override public int getInventoryStackLimit() { return 64; } @Override public boolean isUseableByPlayer(EntityPlayer player) { return this.worldObj.getTileEntity(this.getPos()) == this && player.getDistanceSq(this.pos.add(0.5, 0.5, 0.5)) <= 64; } @Override public void openInventory(EntityPlayer player) { } @Override public void closeInventory(EntityPlayer player) { } @Override public boolean isItemValidForSlot(int index, ItemStack stack) { return true; } @Override public int getField(int id) { return 0; } @Override public void setField(int id, int value) { } @Override public int getFieldCount() { return 0; } @Override public void clear() { for (int i = 0; i < this.getSizeInventory(); i++) this.setInventorySlotContents(i, null); } @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { NBTTagList list = new NBTTagList(); for (int i = 0; i < this.getSizeInventory(); ++i) { if (this.getStackInSlot(i) != null) { NBTTagCompound stackTag = new NBTTagCompound(); stackTag.setByte("Slot", (byte) i); this.getStackInSlot(i).writeToNBT(stackTag); list.appendTag(stackTag); } } nbt.setTag("Items", list); if (this.hasCustomName()) { nbt.setString("CustomName", this.getCustomName()); } return super.writeToNBT(nbt); } @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("Items", 10); for (int i = 0; i < list.tagCount(); ++i) { NBTTagCompound stackTag = list.getCompoundTagAt(i); int slot = stackTag.getByte("Slot") & 255; this.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(stackTag)); } } }
  10. Ok. So I started to create a tile entity (and so far my mod in general) using ShadowFacts's tutorials for 1.11. Then I decided I want to eventually include a GUI with my tile entity which this tutorial doesn't provide yet. So I used this tutorial for 1.8. This seems to outdated now, as it uses methods and fields in the ItemStack class which seem to not exist anymore or have been moved. These include ItemStack.stackSize and ItemStack.loadItemStackFromNBT(). I'm not sure what to do now. The only tutorial I have found for 1.10/1.11 is ShadowFacts's, and these tutorials don't include GUIs yet, which is my end goal. What has changed in Inventories/GUIs from 1.8 to 1.11? Which tutorial should I follow for these? Btw, ShadowFacts's tutorials have been really great so far. I highly recommend them.
  11. Just a side question: Are there any tutorials for this api? I can't find any on Google.
  12. Ok, thanks. I'll check that out. Edit: Oh *facepalm*, I see now. There was a 1.8 branch in Github. Thanks.
  13. So, I am just starting to mod Minecraft again after a while. When I quit modding and Minecraft in general because of school and other things eating up my free time, the transition from 1.7.10 to 1.8 was taking place. I am just now learning how to mod with with the json models that were added in 1.8 and things are going pretty good. But then after I started trying to implement Thermal Expansion's RF API into my mod I started running into problems. I realized that CoFH never updated their mods from 1.7.10 (or are still doing so), and the RF API wasn't working. I found out that classes were moved and modiffyed in 1.8 through 1.11 so the RF API is outdated now. How do I fix this? Do I have to create my own power system until CoFH updates the API? PS: Sorry for the long post.
  14. You can't make your modid capitalized. It must be lowercased or else you textures will not work. Edit: oh sorry Ernio, I didn't see your edit.
  15. Ya, I fixed it, I just ran it on the normal command line and it didn't take near as long. The tablet doesn't have much RAM to begin with, I probably shouldn't have even attempted it. I just want to get back into modding and don't have access to my desktop at the moment.
  16. I'm decided to start playing around with creating a mod in 1.10.2. I'm using IntelliJ IDEA because it's the best software in my opinion. I got to the step where you run the command 'setupDecompWorkspace'. I expected it to take a long time because I am doing this on my tablet, but I didn't think it would take this long. It is stuck on ':decompileMc' and been on that for 2 hours so far. I don't mean to be impatient or anything, but is it supposed to take that long?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.