Jump to content

archieab

Members
  • Posts

    33
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    England, United Kingdom
  • Personal Text
    Slowly gathering the basics with help from books and other sources!

Recent Profile Visitors

919 profile views

archieab's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Honestly, I don't know. I tweaked some stuff and it booted fine. I'll push it to my GitHub master later, so you'll be able to see there.
  2. I've seemed to have fixed it! Thanks for the help!
  3. As far as I'm aware, yes. Here is latest the crash report.
  4. How would you suggest I change it? Also, the game still crashes.
  5. Just fixed and pushed the 1st and 3rd issues to GitHub master branch. Why is this a bad idea?
  6. Now registered. Why? Changed it to only be 9.
  7. I'm not sure which specific code you are looking for, but here is my Git page for the mod. https://github.com/archiebaldry/Andustry
  8. Hello there! I have an issue with my GUI/Container. When I shift click out an item, the game crashes. Here is my crash report ---- Minecraft Crash Report ---- // Would you like a cupcake? Time: 1/31/18 9:08 AM Description: Updating screen events java.lang.IndexOutOfBoundsException: Index: 45, Size: 45 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at net.minecraft.inventory.Container.mergeItemStack(Container.java:632) at archieab.andustry.container.ContainerDrill.transferStackInSlot(ContainerDrill.java:62) at net.minecraft.inventory.Container.slotClick(Container.java:261) at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:600) at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:687) at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:429) at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:615) at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:580) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1792) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1119) at net.minecraft.client.Minecraft.run(Minecraft.java:407) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at net.minecraft.inventory.Container.mergeItemStack(Container.java:632) at archieab.andustry.container.ContainerDrill.transferStackInSlot(ContainerDrill.java:62) at net.minecraft.inventory.Container.slotClick(Container.java:261) at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:600) at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:687) at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:429) at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:615) at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:580) -- Affected screen -- Details: Screen name: archieab.andustry.client.gui.GuiDrill -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player148'/3, l='MpServer', x=-190.89, y=56.00, z=47.29]] Chunk stats: MultiplayerChunkCache: 554, 554 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: World: (-188,4,50), Chunk: (at 4,0,2 in -12,3; contains blocks -192,0,48 to -177,255,63), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 33143 game time, 1000 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: 4 total; [EntityItemFrame['entity.ItemFrame.name'/0, l='MpServer', x=-181.03, y=57.50, z=47.50], EntityItemFrame['entity.ItemFrame.name'/1, l='MpServer', x=-181.03, y=57.50, z=46.50], EntityPlayerSP['Player148'/3, l='MpServer', x=-190.89, y=56.00, z=47.29], EntityItemFrame['entity.ItemFrame.name'/2, l='MpServer', x=-181.03, y=57.50, z=48.50]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:456) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2774) at net.minecraft.client.Minecraft.run(Minecraft.java:428) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) -- System Details -- Details: Minecraft Version: 1.11.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_161, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 711053296 bytes (678 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.38 Powered by Forge 13.20.1.2588 6 mods loaded, 6 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA minecraft{1.11.2} [Minecraft] (minecraft.jar) UCHIJAAAA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.11.2-13.20.1.2588.jar) UCHIJAAAA forge{13.20.1.2588} [Minecraft Forge] (forgeSrc-1.11.2-13.20.1.2588.jar) UCHIJAAAA and{1.0} [Andustry] (bin) UCHIJAAAA waila{1.7.1} [waila] (Waila-1.7.1_1.11.2.jar) Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 390.65' Renderer: 'GeForce GTX 1060 3GB/PCIe/SSE2' Launched Version: 1.11.2 LWJGL: 2.9.4 OpenGL: GeForce GTX 1060 3GB/PCIe/SSE2 GL version 4.6.0 NVIDIA 390.65, NVIDIA Corporation 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-3570K CPU @ 3.40GHz Many thanks, archieab
  9. Are you talking about my ModBlocks.java? If so, here's the code: package archieab.andustry.init; import archieab.andustry.Andustry; import archieab.andustry.Reference; import archieab.andustry.blocks.BlockCopperOre; import archieab.andustry.blocks.BlockDrill; import archieab.andustry.blocks.BlockMachineFrameAdvanced; import archieab.andustry.blocks.BlockMachineFrameBasic; import archieab.andustry.blocks.BlockTinOre; import archieab.andustry.blocks.BlockCoalCatalystBlock; import archieab.andustry.blocks.item.ItemBlockDrill; import archieab.andustry.handlers.EnumHandler; import archieab.andustry.util.Utils; import net.minecraft.block.Block; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModBlocks { public static Block copper_ore; public static Block tin_ore; public static Block machineframebasic; public static Block machineframeadvanced; public static Block drill; public static Block coalcatalystblock; public static void init() { copper_ore = new BlockCopperOre("copper_ore", "copper_ore"); tin_ore = new BlockTinOre("tin_ore", "tin_ore"); machineframebasic = new BlockMachineFrameBasic("machineframebasic", "machineframebasic"); machineframeadvanced = new BlockMachineFrameAdvanced("machineframeadvanced", "machineframeadvanced"); drill = new BlockDrill("drill"); coalcatalystblock = new BlockCoalCatalystBlock("coal_catalyst_block", "coal_catalyst_block"); } public static void register() { registerBlock(copper_ore); registerBlock(tin_ore); registerBlock(machineframebasic); registerBlock(machineframeadvanced); registerBlock(drill, new ItemBlockDrill(drill)); registerBlock(coalcatalystblock); } public static void registerRenders() { registerRender(copper_ore); registerRender(tin_ore); registerRender(machineframebasic); registerRender(machineframeadvanced); for(int i = 0; i < EnumHandler.MacTypes.values().length; i++) { registerRender(drill, i, "block_drill_" + EnumHandler.MacTypes.values()[i].getName()); } registerRender(coalcatalystblock); } public static void registerBlock(Block block) { block.setCreativeTab(Andustry.Blocks); GameRegistry.register(block); GameRegistry.register(new ItemBlock(block).setRegistryName(block.getRegistryName())); Utils.getLogger().info("Registered Block: " + block.getUnlocalizedName().substring(5)); } public static void registerBlock(Block block, ItemBlock itemBlock) { block.setCreativeTab(Andustry.Blocks); GameRegistry.register(block); GameRegistry.register(itemBlock.setRegistryName(block.getRegistryName())); Utils.getLogger().info("Registered Block: " + block.getUnlocalizedName().substring(5)); } public static void registerRender(Block block) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(new ResourceLocation(Reference.MODID, block.getUnlocalizedName().substring(5)), "inventory")); Utils.getLogger().info("Registered render for " + block.getUnlocalizedName().substring(5)); } public static void registerRender(Block block, int meta, String fileName) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), meta, new ModelResourceLocation(new ResourceLocation(Reference.MODID, fileName), "inventory")); Utils.getLogger().info("Register render for " + block.getUnlocalizedName().substring(5)); } }
  10. It's not to do with the lang. I haven't added the block's into the lang purely so you can see the raw name. I'm almost certain the issue is to do with it's SpecialName or UnlocalizedName.
  11. Hello! My block Drill's name is not displaying correctly. The block has the three properties, PropertyEnum for types, PropertyDirection for model rotation and PropertyBool for redstone activation. For some reason, both the basic drill and advanced drill, in the inventory show the same block.drill.basic.name. Yet, the placed blocks display (using Waila) the block.drill.basic.name and block.drill.advanced.name. I'm presuming it's an issue with it's unlocalized name in my block's BlockDrill.java? Basic Drill Image https://ibb.co/jpWM16 Advanced Drill Image https://ibb.co/d1XiER BlockDrill.java package archieab.andustry.blocks; import java.util.List; import archieab.andustry.Reference; import archieab.andustry.blocks.item.IMetaBlockName; import archieab.andustry.handlers.EnumHandler.MacTypes; import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyBool; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.NonNullList; import net.minecraft.util.ResourceLocation; import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; public class BlockDrill extends Block implements IMetaBlockName { public static final PropertyEnum TYPE = PropertyEnum.create("type", MacTypes.class); public static final PropertyDirection FACING = PropertyDirection.create("facing"); public static final PropertyBool ACTIVATED = PropertyBool.create("activated"); public BlockDrill(String unlocalizedName) { super(Material.IRON); this.setUnlocalizedName(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setDefaultState(this.blockState.getBaseState().withProperty(TYPE, MacTypes.BASIC).withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVATED, Boolean.valueOf(false))); } @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] {TYPE,FACING,ACTIVATED}); } @Override public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) { return this.getDefaultState().withProperty(FACING, EnumFacing.getDirectionFromEntityLiving(pos, placer)).withProperty(ACTIVATED, Boolean.valueOf(false)).withProperty(TYPE, getStateFromMeta(meta * EnumFacing.values().length).getValue(TYPE)); } @Override public int getMetaFromState(IBlockState state) { MacTypes type = (MacTypes) state.getValue(TYPE); EnumFacing facing = (EnumFacing) state.getValue(FACING); int meta = type.getID() * EnumFacing.values().length + facing.ordinal(); return meta; } @Override public IBlockState getStateFromMeta(int meta) { MacTypes type = MacTypes.values()[(int)(meta / EnumFacing.values().length) % MacTypes.values().length]; EnumFacing facing = EnumFacing.values()[meta % EnumFacing.values().length]; return this.getDefaultState().withProperty(TYPE, type).withProperty(FACING, facing); } @Override public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) { return new ItemStack(Item.getItemFromBlock(this), 1, (int) (getMetaFromState(world.getBlockState(pos)) / EnumFacing.values().length)); } @Override public int damageDropped(IBlockState state) { return (int) (getMetaFromState(state) / EnumFacing.values().length); } @Override public String getSpecialName(ItemStack stack) { return MacTypes.values()[stack.getItemDamage() / EnumFacing.values().length].getName(); } @Override public void getSubBlocks(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> list) { for (int i = 0; i < MacTypes.values().length; i++) { list.add(new ItemStack(itemIn, 1, i)); } } } Any help would be greatly appreciated!
  12. Okay, I will attempt to encode these two methods into my metadata.
  13. No, that was an issue of the PropertyDirection not working altogether. This is purely just the PropertyDirection not saving.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.