
Big_Bad_E
Members-
Posts
312 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Big_Bad_E
-
Textures/Jason not loading in game[1.10]
Big_Bad_E replied to TheMysticMinecart Myles's topic in Modder Support
Okay, so i'ma explain what you gotta do to register, because its a pain. (BTW its JSON not Jason) You need a class annotated with EventBusSubscriber, and a static method annotated with SubscribeEvent. The arguments are a ModelRegistryEvent. In that method you have the ModelLoader#setCustomModelResourceLocation method. Also since i'm guessing you're newer to forge you should set up proxies (look up tutorials if you have not made a proxy before) and I think you'r supposed to annotate your registry methods with SideOnly(value = Side.CLIENT) as I think it crashes trying to load them server side. -
I have been searching around, and have not found much, but I have two ideas on how to get this to work, I just don't know how to do them. My first idea is to take a model (the block) and overlay it with a lock model, but I don't know how to overlay two models (like replace pixels underneath with the ones above, not add another layer.) My second is to make the lock model have the lock set as an outer layer, somehow change the regular model beneath to match the block, and set the MultiLayeredModel so it will load correctly. I've found threads on how to do multi layered models and am figuring out how to change models at runtime. I'm looking at ISmartModel and IPerspectiveAwareModel. Thread i've found that might be useful:
-
forge will not install and creates a crash log
Big_Bad_E replied to nohew1's topic in Support & Bug Reports
I think your problem is your Path variable, try setting it to Path: (path to Java folder)\bin, if that doesn't work remove the other ones. -
Ok, how would I do so? I found MultiLayerModel but didn't really understand how to create an instance of it, and how to combine two ResourceLocations with it.
-
I found this method: public static IBakedModel getModel(ResourceLocation resourceLocation) throws RuntimeException { IBakedModel bakedModel; IModel model; try { model = ModelLoaderRegistry.getModel(resourceLocation); } catch (Exception e) { throw new RuntimeException(e); } bakedModel = model.bake(TRSRTransformation.identity(), DefaultVertexFormats.BLOCK, location -> Minecraft.getMinecraft().getTextureMapBlocks() .getAtlasSprite(location.toString())); return bakedModel; } It seems to turn a resourceLocation to a IBakedModel, but it doesn't add an overlay like I am trying to do. I am currently trying to use TextureAltasSprite.load() to load the overlay onto the texture, but how would I overlay it onto a single side?
-
So, lets say I have the block dynamic_block, what I want is whenever I place the block, it sets the texture to whatever your looking at, but with an overlayed texture over the north face. I am looking at the secret rooms mod but I can't figure out how it does it. (https://github.com/AbrarSyed/SecretRoomsMod-forge/blob/master/src/main/java/com/wynprice/secretroomsmod/) Any help with what I would have to do, any examples or methods or whatever is appreciated. I can't find anyone who asked a similar question and got the correct response. Secret rooms mod is all.
-
Their dynamic block textures have textures set before model baking, so it only changes before initialization. I found this GitHub for a mod called SecretRoomsMod, you should look at the Ghost Block, because in the mod it changes texture on placement while retaining the properties of the ghost block. https://github.com/AbrarSyed/SecretRoomsMod-forge
-
I was trying to explain I was just trying everything, hoping it would look it layer0, but I tried it without that, with and without the modid, etc... You were right! The problem was I had a 1 instead of a 0 as the second variable of setCustomModelResourceLocation().
-
I cannot seem to get an item texture/model working. Here are my classes/paths. Item image path: src/main/resources/assets/cfd/textures/items/testitem.png Item model path: src/main/resources/assets/cfd/models/item/testitem.json Registry: @Mod.EventBusSubscriber(modid = "cfd") public class Registery { private static TestItem testItem = new TestItem(); @SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> event) { System.out.println("Registering Items!"); event.getRegistry().register(testItem); System.out.println("Registered testItem!"); } @SubscribeEvent public static void registerItemModels(ModelRegistryEvent event) { ModelLoader.setCustomModelResourceLocation(testItem, 1, new ModelResourceLocation("cfd:testitem#layer0", "inventory")); } } (I have changed the ModelResourceLocation a lot, idk what its supposed to be) testitem.json: { "parent": "item/generated", "textures": { "layer0": "cfd:items/testitem" } } I don't know why the model texture won't work.
-
Its working now, forgot to tag the registry event with @SubscribeEvent. Thanks so much to Cadiboo for helping me!
-
I know Cooking for Blockheads mod, I accidentally keep on typing CFB or Cooking For Blockheads idk why, and Cooking For Dummies is just a placeholder name for now I'm not that creative, will hopefully think of something decent later. I made the registry method static, I didn't see that in the documentation and was being dumb. Nope, I should of said no errors, but the problem is still going on, error debugging right now, will be debugging. I will be working on this myself, but if anyone has an idea why my code isn't working please reply. Yeah the registry event isn't running, even with the EventBusSubscriber tag.
-
Yes this is probably asked a ton. I always forget how to do the whole item creation 1.12 system. My item isn't appearing, and the lang file doesn't seem to work at all. I made a tab though! I think I've messed up in the asset path, and somewhere with making the item. Lang path: src/main/resources/assets/cfd/lang Item image path: src/main/resources/assets/cfd/textures/items/testitem.png Item class: public class TestItem extends Item { public TestItem() { setRegistryName("testitem"); setUnlocalizedName("testitem"); setCreativeTab(CookingForDummies.cfdTab); } } Registry: public class Registery { private static TestItem testItem = new TestItem(); @SubscribeEvent public void registerItems(RegistryEvent.Register<Item> event) { event.getRegistry().register(testItem); } } Common Proxy: public class CommonProxy { public void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new Registery()); } public void init(FMLInitializationEvent event) { } public void postInit(FMLPostInitializationEvent event) { } } Main Class: @Mod(modid = "cfb", name = "Cooking For Blockheads", version = "v1.0.0") public class CookingForDummies { @SidedProxy(clientSide="com.bigbade.cookingfordummies.proxies.ClientProxy", serverSide="com.bigbade.cookingfordummies.proxies.ServerProxy") public static CommonProxy proxy; public static CreativeTabs cfdTab = new CFDTab(CreativeTabs.getNextID(),"Cooking For Dummies"); public void preInit(FMLPreInitializationEvent event) { proxy.preInit(event); } public void init(FMLInitializationEvent event) { proxy.init(event); } public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); } } Yes I know there is something with JSON files for textures and stuff but i'm not gonna work on that until the item is in the creative tab.
-
I am trying to register a block, Here is the registry class: @EventBusSubscriber public class BlockInit { public static final ArrayList<Block> blocks = new ArrayList<Block>(); public static final Block theblock = new Block(Material.ROCK).setUnlocalizedName("test").setRegistryName("modid:test"); @SubscribeEvent public void registerBlocks(RegistryEvent.Register<Block> event) { for (Block block : blocks) { System.out.println("Registering block!"); event.getRegistry().register(block); } } @SubscribeEvent public void registerItemBlocks(RegistryEvent.Register<Item> event) { for (Block block : blocks) { event.getRegistry().register( Item.getItemFromBlock(block) .setRegistryName( new ModelResourceLocation(block .getRegistryName(), "Inventory")) .setUnlocalizedName( block.getUnlocalizedName() + "_item")); } } @SubscribeEvent public void modelRegister(ModelRegistryEvent event) { for (Block block : blocks) { block.registerModels(); } } } But it never outprints "Registering block!" I have my proxies but I do not think they need a line for this to work I can usually do this but now I just can't for some reason P.S. the mod loads correctly, no errors no outprints.
-
So I have a simple EnergyStorage, I have a GUI, but how would I make the player open the GUI? Also how would I make a TileEntity/EnergyStorage that transfers energy? I would provide code but it's so simple. I have not used ForgeEnergy yet sorry. Also would I register the EnergyStorage block like a TileEntity or a Block or what method would I use? Sorry about this being so short with so many questions, there is so little documentation about ForgeEnergy.
-
I believe mod support is not available, but crash support is. What version of forge are you using? latest of 1.7 or recommended? Or a different one?
-
You need to disable the loading screen, that is crashing you. Look it up, I do not know how to do it as I never needed to do so.
-
Forge 1.8.9 doesn't work and will crash.
Big_Bad_E replied to Corgi's topic in Support & Bug Reports
Remove your shaders mod, Optifine has shaders support -
Can i return a decimal value? is that possible or not? I get the tint index and item stack but can I use decimal color values? e.g. 255 for blue
-
So, I looked around, but could only find this used in models and not in code. I am trying to make an item change shade of blue depending on the NBT data. I don't know what this method/its variables do: @Override public int colorMultiplier(ItemStack stack, int tintIndex) { return null; } The return null is temporary. Also how do I change the color of the ItemStack? This is ment to be similar to leather armor but changing the shade whenever I want.
-
Can't join server, dispacther exeception
Big_Bad_E replied to JonasCiss's topic in Support & Bug Reports
The whole log really does help, but you will probably end up having to remove a mod. -
I'm just messing around with sending packets from player, I found some of them have methods, but it seems the attack method does not have one that I can find, except the two I listed above. I don't really have an end goal tbh. I just want to figure out how to send an attack packet from the player. I can use Packet 7 to swing items 10,11,12,13 with the player variable. But what is the method to make a player attack, and if there is not one how do I send the attack packet from a player to the server.
-
I'm trying to make the client send an attack packet to the server. I found the .attackEntityFrom() and .attackEntityWithCurrentItem() but both require an entity and .attackEntityFrom() requires a damage amount which I am guessing doesn't work on a server. I tried .swingItem() but that does not work.
-
How would I send a vanilla packet from the client to the server? I can't figure out how to do so. I know it has to do with NetworkManager. (BTW I am trying to send attack packet)
-
Help using OreDict for recipes and recipe type error
Big_Bad_E replied to Big_Bad_E's topic in Modder Support
so basically, it's a pain and too advanced for me? I'll be fine without it then lol. Thanks for responding. got answers to everything I wanted to know.