Jump to content

TheRedMezek

Members
  • Posts

    58
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I wonder if I should be a different color...

TheRedMezek's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. My apologies; the main class does have @Mod, I just incorrectly assumed it wasn't important because it came before the class declaration. @Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION) public class ExampleMod { public static final String MODID = "eternalanvils"; public static final String VERSION = "1.0"; public static Block eternalanvil; @EventHandler public void preInit(FMLPreInitializationEvent event){ } @EventHandler public void init(FMLInitializationEvent event) { eternalanvil = new BlockEternalAnvil(); if(event.getSide() == Side.CLIENT) { System.out.println("PRINTING LOOK LOOK LOOK LOOK LOOK LOOK!!!!!!!!"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(eternalanvil), 0, new ModelResourceLocation("eternalanvils:" + ((BlockEternalAnvil) eternalanvil).getName(), "inventory")); } } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event){ } } I looked through fml-client-latest.log and... well, it looked like another one of my mods was printing the print line, which didn't make any sense. I figured out what the problem was: my current mod and that other one both used the default package "com.example.examplemod" name for their class structure. *CRINGE* AAAAAGH It had never occurred to me that that might be a problem but in retrospect that's probably a super basic thing and I know I've read about it before. I'll have to update my other mod now as well. But I fixed the problem with this mod! Thank you guys for bearing with me in my noobishness.
  2. I just ran the Forge setup according to instructions, so I'm not sure what kind of info you're asking for. Do you want the structure of the contents of my src folder? Sure. This is the launcher's game output from just starting the game, not loading a world: [11:13:00] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [11:13:00] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [11:13:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [11:13:00] [main/INFO] [FML]: Forge Mod Loader version 11.14.4.1563 for Minecraft 1.8 loading [11:13:00] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_25, running on Windows 10:amd64:10.0, installed at C:\Program Files (x86)\Minecraft\runtime\jre-x64\1.8.0_25 [11:13:00] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [11:13:00] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [11:13:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [11:13:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [11:13:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [11:13:01] [main/INFO] [FML]: Found valid fingerprint for Minecraft. Certificate fingerprint cd99959656f753dc28d863b46769f7f8fbaefcfc [11:13:01] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [11:13:01] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [11:13:01] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [11:13:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [11:13:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [11:13:02] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [11:13:02] [main/INFO] [sTDOUT]: [net.minecraft.client.main.Main:main:55]: Completely ignored arguments: [--nativeLauncherVersion, 307] [11:13:02] [Client thread/INFO]: Setting user: 630tiger [11:13:04] [Client thread/INFO]: LWJGL Version: 2.9.1 [11:13:04] [Client thread/INFO] [sTDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:246]: ---- Minecraft Crash Report ---- // I just don't know what went wrong Time: 9/5/16 11:13 AM Description: Loading screen debug info This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 48344680 bytes (46 MB) / 194412544 bytes (185 MB) up to 3207856128 bytes (3059 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx3G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 368.69' Renderer: 'GeForce GTX 970/PCIe/SSE2' [11:13:04] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [11:13:04] [Client thread/INFO] [FML]: MinecraftForge v11.14.4.1563 Initialized [11:13:04] [Client thread/INFO] [FML]: Replaced 204 ore recipies [11:13:05] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [11:13:05] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [11:13:05] [Client thread/INFO] [FML]: Searching C:\Users\ScreechingMarmot\AppData\Roaming\.minecraft\mods for mods [11:13:05] [Client thread/INFO] [FML]: Forge Mod Loader has identified 8 mods to load [11:13:06] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, braziermod, eternalanvils, sprintnerf, wildanimals, chiselsandbits] at CLIENT [11:13:06] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, braziermod, eternalanvils, sprintnerf, wildanimals, chiselsandbits] at SERVER [11:13:06] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Brazier Mod, FMLFileResourcePack:Eternal Anvils, FMLFileResourcePack:Sprint Nerf, FMLFileResourcePack:Wild Animals, FMLFileResourcePack:Chisels & Bits [11:13:06] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [11:13:06] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations [11:13:06] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [11:13:06] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [11:13:06] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [11:13:06] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [11:13:06] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: UP_TO_DATE Target: null [11:13:07] [Client thread/INFO] [FML]: Applying holder lookups [11:13:07] [Client thread/INFO] [FML]: Holder lookups applied [11:13:07] [Client thread/INFO] [FML]: Injecting itemstacks [11:13:07] [Client thread/INFO] [FML]: Itemstack injection complete [11:13:07] [sound Library Loader/INFO]: Starting up SoundSystem... [11:13:07] [Thread-9/INFO]: Initializing LWJGL OpenAL [11:13:07] [Thread-9/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [11:13:07] [Thread-9/INFO]: OpenAL initialized. [11:13:07] [sound Library Loader/INFO]: Sound engine started [11:13:08] [Client thread/INFO] [FML]: Max texture size: 16384 [11:13:08] [Client thread/INFO]: Created: 16x16 textures-atlas [11:13:08] [Client thread/INFO] [sTDOUT]: [com.example.examplemod.ExampleMod:init:34]: PRINTING LOOK LOOK LOOK LOOK LOOK LOOK!!!!!!!! [11:13:08] [Client thread/INFO] [sTDOUT]: [com.example.examplemod.ExampleMod:init:34]: PRINTING LOOK LOOK LOOK LOOK LOOK LOOK!!!!!!!! [11:13:08] [Client thread/INFO] [FML]: Injecting itemstacks [11:13:08] [Client thread/INFO] [FML]: Itemstack injection complete [11:13:08] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 8 mods [11:13:08] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Brazier Mod, FMLFileResourcePack:Eternal Anvils, FMLFileResourcePack:Sprint Nerf, FMLFileResourcePack:Wild Animals, FMLFileResourcePack:Chisels & Bits [11:13:08] [Client thread/INFO]: SoundSystem shutting down... [11:13:09] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [11:13:09] [sound Library Loader/INFO]: Starting up SoundSystem... [11:13:09] [Thread-11/INFO]: Initializing LWJGL OpenAL [11:13:09] [Thread-11/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [11:13:09] [Thread-11/INFO]: OpenAL initialized. [11:13:09] [sound Library Loader/INFO]: Sound engine started [11:13:09] [Client thread/INFO] [FML]: Max texture size: 16384 [11:13:10] [Client thread/INFO]: Created: 512x512 textures-atlas [11:13:10] [Client thread/ERROR] [FML]: Model definition for location sprintnerf:eternal_anvil#facing=north not found [11:13:10] [Client thread/ERROR] [FML]: Model definition for location sprintnerf:eternal_anvil#facing=east not found [11:13:10] [Client thread/ERROR] [FML]: Model definition for location sprintnerf:eternal_anvil#facing=west not found [11:13:10] [Client thread/ERROR] [FML]: Model definition for location sprintnerf:eternal_anvil#inventory not found [11:13:10] [Client thread/ERROR] [FML]: Model definition for location sprintnerf:eternal_anvil#facing=south not found [11:13:40] [Client thread/INFO]: Stopping! [11:13:40] [Client thread/INFO]: SoundSystem shutting down... [11:13:40] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com Thank you guys for helping me out. @jeffryfisher, too much to quote but thank you for your response. I will read up on proxies. I'd rather not keep my mods up to date with Minecraft because... reasons that should be dealt with in a long paragraph. Basically, it sounds obnoxious to update all my mods every time, and every time a new update came out I'd have to make new mods to change/fix the new things I didn't like in addition to updating my old stuff. As it is once I make a mod for 1.8 I can just leave it there and never worry about it again, unless it needs fixing. I hadn't considered the trouble with asking for help on here though.
  3. Please forgive my ignorance, my understanding of how Forge works is almost nil. I put the print inside if(event.getSide() == Side.CLIENT){} and tried it with both Side.CLIENT and Side.SERVER, and it did print twice in both cases. The only other way I know how to check the side is world.isRemote(), and I don't think I have a world to check that with in init(). I've read a little about proxies before but I don't quite understand them. It seemed like they were for organization when you're initializing lots of blocks, items, renderers, etc., but since my mod only works with one block I didn't think it was necessary. I didn't register an item anywhere because last time I made a mod which added blocks I didn't have to. I just registered the blocks and they came with item forms. I also made the item json, which is being used correctly, so again I haven't seen a need to register an item. My guess is that whoever reads this will be fuming at my terrible ignorance and incompetence. I really want to learn to do this better, so if you're choosing between scolding me and giving up on me please choose to scold me instead. I promise I am not set on any of my ways if there's a better way out there.
  4. I'm making a mod which adds a single block to the game, based on the anvil. For some reason two of them are showing up in the creative inventory with the exact same name and icon. When I place them, they both have the right hitbox, but one of the blocks has the correct model and texture and the other is that purple-black cube. After experimenting for a bit I put a print line in my init() method and discovered that it printed twice. My conclusion is that my mod is initializing twice... for some reason... But I need it to only initialize once. This code is WIP, I haven't done very much yet. Main class public class ExampleMod { public static final String MODID = "eternalanvils"; public static final String VERSION = "1.0"; public static Block eternalanvil; @EventHandler public void preInit(FMLPreInitializationEvent event){ } @EventHandler public void init(FMLInitializationEvent event) { eternalanvil = new BlockEternalAnvil(); System.out.println("PRINTING LOOK LOOK LOOK LOOK LOOK LOOK!!!!!!!!"); if(event.getSide() == Side.CLIENT) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(eternalanvil), 0, new ModelResourceLocation("eternalanvils:" + ((BlockEternalAnvil) eternalanvil).getName(), "inventory")); } } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event){ } } Block class public class BlockEternalAnvil extends BlockFalling { private String name = "eternal_anvil"; public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); protected BlockEternalAnvil(){ super(Material.anvil); this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); this.setLightOpacity(0); this.setUnlocalizedName("eternalanvils_" + name); this.setCreativeTab(CreativeTabs.tabDecorations); GameRegistry.registerBlock(this, name); } public String getName(){ return name; } public boolean isFullCube() { return false; } public boolean isOpaqueCube() { return false; } public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { EnumFacing enumfacing1 = placer.getHorizontalFacing().rotateY(); return super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer).withProperty(FACING, enumfacing1); } public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) { if (!worldIn.isRemote) { playerIn.displayGui(new BlockEternalAnvil.EternalAnvil(worldIn, pos)); } return true; } public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) { EnumFacing enumfacing = (EnumFacing)worldIn.getBlockState(pos).getValue(FACING); if (enumfacing.getAxis() == EnumFacing.Axis.X) { this.setBlockBounds(0.0F, 0.0F, 0.125F, 1.0F, 1.0F, 0.875F); } else { this.setBlockBounds(0.125F, 0.0F, 0.0F, 0.875F, 1.0F, 1.0F); } } protected void onStartFalling(EntityFallingBlock fallingEntity) { fallingEntity.setHurtEntities(true); } public void onEndFalling(World worldIn, BlockPos pos) { worldIn.playAuxSFX(1022, pos, 0); } @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockAccess worldIn, BlockPos pos, EnumFacing side) { return true; } /** * Convert the given metadata into a BlockState for this Block */ public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta & 3)); } /** * Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...) */ @SideOnly(Side.CLIENT) public IBlockState getStateForEntityRender(IBlockState state) { return this.getDefaultState().withProperty(FACING, EnumFacing.SOUTH); } /** * Convert the BlockState into the correct metadata value */ public int getMetaFromState(IBlockState state) { byte b0 = 0; int i = b0 | ((EnumFacing)state.getValue(FACING)).getHorizontalIndex(); return i; } protected BlockState createBlockState() { return new BlockState(this, new IProperty[] {FACING}); } public static class EternalAnvil implements IInteractionObject { private final World world; private final BlockPos position; public EternalAnvil(World worldIn, BlockPos pos) { this.world = worldIn; this.position = pos; } /** * Gets the name of this command sender (usually username, but possibly "Rcon") */ public String getName() { return "eternal_anvil"; } /** * Returns true if this thing is named */ public boolean hasCustomName() { return false; } public IChatComponent getDisplayName() { return new ChatComponentTranslation(Blocks.anvil.getUnlocalizedName() + ".name", new Object[0]); } public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) { return new ContainerRepair(playerInventory, this.world, this.position, playerIn); } public String getGuiID() { return "minecraft:anvil"; } } }
  5. In the days of yore the MC Forums were the main site for mods, but it seems to have slowed down. Now there is a Curse mod list as well, which feels rather incomplete. We have a subforum here that has threads for a bunch of mods. There's the MCF Mod List website at http://modlist.mcf.li/ which is now only rarely updated, but is otherwise ideal. So what is currently the best listing? Or would I have to go around to several of them for a good list?
  6. event.entityPlayer.isSneaking is exactly what I was looking for. Thank you!
  7. I'm making a new mod where my first step is to make a GUI come up when a player shift-right-clicks on an EntityTameable with an open hand. This is my first time delving into key bindings and GUIs. This code @EventHandler public void init(FMLInitializationEvent event) { shift = new KeyBinding("key.shift", Keyboard.KEY_LSHIFT, "key.categories.pettransfer"); ClientRegistry.registerKeyBinding(shift); } @SubscribeEvent public void animalClicked(EntityInteractEvent event){ if (event.entityPlayer.worldObj.isRemote) { if (!event.entityPlayer.isUsingItem()) { if (event.target instanceof EntityTameable) { System.out.println("It works!!!!!!!!!!!"); event.entityPlayer.openGui(Base.instance, PetGUI.GUI_ID, event.entityPlayer.worldObj, (int)event.entityPlayer.posX, (int)event.entityPlayer.posY, (int)event.entityPlayer.posZ); } } } } Made it so that the player could not crouch or move down while flying. I haven't a clue how to do this correctly. I was unable to find a decent tutorial on this and had to copy some of my code from another forum thread.
  8. If another mod uses the same IDs in the dataWatcher, won't our mods conflict?
  9. I'm working on a mod which adds wild spawning/despawning versions of the vanilla passive mobs. I just started working on a copy of the horse and I discovered this "dataWatcher" thing in its code. Apparently it deals with client-server communication and uses a very limited number of IDs, and so it's preferable to use something else. However, because I know nothing about the deeper, gritty level of code I have no idea what I should replace it with. So far I've just worked with simple entities and blocks.
  10. My plan is to have the persistent mobs (cows, dogs, etc.) spawnable only by taming non-persistent mobs, or through creative/command methods. The only way I want them to not spawn is through terrain generation. EDIT: Thank you Diesieben, that was the problem! The animals no longer spawn.
  11. I'm trying to prevent the passive mobs (cows, etc.) from generating with the terrain, although I'll have them spawnable through other means later. I've run in a circle trying to figure this out. So far the only way I've found to do it is through this: @SubscribeEvent public void onEntitySpawn(EntityJoinWorldEvent event){ if (event.entity instanceof EntityChicken || event.entity instanceof EntityCow || event.entity instanceof EntitySheep || event.entity instanceof EntityPig || event.entity instanceof EntityRabbit || event.entity instanceof EntityWolf || event.entity instanceof EntityOcelot){ event.setCanceled(true); } } But that disables the creatures from ever spawning at all from any source. I have also tried the following, to no effect: @SubscribeEvent public void spawnAnimals(LivingSpawnEvent.CheckSpawn event){ if (event.entity instanceof EntityChicken || event.entity instanceof EntityCow || event.entity instanceof EntitySheep || event.entity instanceof EntityPig || event.entity instanceof EntityRabbit || event.entity instanceof EntityWolf || event.entity instanceof EntityOcelot){ event.setCanceled(true); event.setResult(Event.Result.DENY); } } @SubscribeEvent public void genAnimals(PopulateChunkEvent.Populate event){ if (event.type == PopulateChunkEvent.Populate.EventType.ANIMALS){ event.setCanceled(true); event.setResult(Event.Result.DENY); } } @SubscribeEvent public void onEntitySpawn(EntityJoinWorldEvent event){ if (event.entity instanceof EntityChicken || event.entity instanceof EntityCow || event.entity instanceof EntitySheep || event.entity instanceof EntityPig || event.entity instanceof EntityRabbit || event.entity instanceof EntityWolf || event.entity instanceof EntityOcelot){ event.setResult(Event.Result.DENY); } } So what is the proper way to do this? It looks to my research like I'd have to somehow change the spawn lists within the biome classes, and if I'm correct I have no idea how to do that. I hope I'm not correct.
  12. I have the same problem and would like to know how to make custom world types. The only 1.8 mod I'm aware of that adds custom world type is Vintagecraft, but it actually replaced the vanilla default and flatworld types with its own, which isn't quite the same thing. I've had a look at its code but it hasn't helped so far. EDIT: Using the code I found here: http://www.minecraftforge.net/forum/index.php/topic,28975.msg149170.html#msg149170 I made a world type appear that would generate like normal world gen. Here's my modified world gen class: And then I added this into my main class after everything else:
  13. I now have this in my tile entity's update method, but it still doesn't work. Thank you for your replies, I hadn't noticed you posted anything in my last thread. //Before the update method: private boolean prevIsBurning; //Within the update method: boolean flag = this.isBurning(); if (prevIsBurning != flag) { prevIsBurning = flag; if (worldObj.isRemote) { worldObj.markBlockForUpdate(pos); } worldObj.checkLightFor(EnumSkyBlock.BLOCK, pos); } The last post in the last thread said to use checkLightFor on the surrounding blocks if this didn't work. I tied changing the line to this: worldObj.checkLightFor(EnumSkyBlock.BLOCK, pos.east()); but it didn't do anything different. I will keep experimenting, any advice is appreciated. P.S. I won't be able to look back here for a while.
  14. I have a block which alternates between states of producing and not producing light, but for some reason the change only effects the block itself, until several seconds after (once I've placed stuff around it) it finally shines out into neighboring blocks. Block class Picture of block before the lighting updates
  15. The 3D viewer doesn't work for me either; I'm glad you use it though. Just making sure. Does your model work now?
×
×
  • Create New...

Important Information

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