-
Posts
444 -
Joined
-
Last visited
Everything posted by brandon3055
-
I have been trying to figure this out for a while now but haven't had much luck. When i try to run my mod in debug mode i get some null pointer exceptions which pause the startup. They don't seem to have anything todo with my mod and they dont seem to affect anything as far as i can tell. I was able to stop the first three by right clicking the thread that is giving the exception and and using the "Exclude exception location" option but im not sure if that will create other problems. so far i have tryed Updating forge and deleting and redownloading all the minecraft src files but i suspect it is a problem with eclipse. I tried moving my src to a fresh workspace and that worked fine so i know its not a problem with my code. My workspace is setup in a way that allows me to have several projects in the same workespace using this tutorial
-
[SOLVED][1.7.2]Packet Handling problem.
brandon3055 replied to brandon3055's topic in Modder Support
Yup thats the same error i got and i already tried exporting the mod but i didn't try separate computers although i don't think it would make much difference. -
[1.7.2][Solved]Issues with rendering of custom Leaves
brandon3055 replied to GyroEmpire's topic in Modder Support
there is a method in the leaves class called setGraphicsLevel(boolean p_150122_1_) that is used to check if fancy graphics in enabled -
[1.7.2][Solved]Issues with rendering of custom Leaves
brandon3055 replied to GyroEmpire's topic in Modder Support
you need to override @Override public boolean isOpaqueCube() { return false; } in your block class -
this also happens when you try to open a client game to lan spacifically when you press the "start lan world" button but the publish command still works fine.
-
I dont know much about this but could you search the spawn area and surrounding chunks for the end portal block? or would the chunk have to be loaded for that to work aswell?
-
I dont believe so but i am a noob so... maby
-
Oh didnt see your post. Yes that is a much better way to do it! @Override public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { par1ItemStack.addEnchantment(Enchantment.fortune, 5); super.onCreated(par1ItemStack, par2World, par3EntityPlayer); } Not sure if you need the super call or not. Edit: no i dont think you do. I think he was sad because he gave a perfect solution (which i didnt see) then i gave another solution which works but isnt nearly as good and you decided to go with mine.
-
when you register your recipe do it like this. ItemStack enchantedPick = new ItemStack(Items.diamond_pickaxe); enchantedPick.addEnchantment(Enchantment.fortune, 5); CraftingManager.getInstance().addRecipe(enchantedPick, "DDD", " S ", "BSB", 'D', Items.diamond, 'S', Items.stick, 'B', Items.book); The way this works is you are creating a new instance of the pick (in this case diamond) and adding the enchant to that then in the recipe you return the enchanted pick.
-
your best bet would be to add the enchant when crafting it just give me a minute to set up an example
-
I think he wants to know how to put his mod on github like other mods such as biomesop do
-
[SOLVED][1.7.2]Packet Handling problem.
brandon3055 replied to brandon3055's topic in Modder Support
I am sending packets like this. Tolkienaddon.channelHandler.sendToServer(new ButtonPacket((button.id, true)); ant it seems to be working perfectly what difference would it make if i use IPacket packet = new ButtonPacket((button.id, true); ESPModRegistry.channelHandler.sendToServer(packet); -
[SOLVED][1.7.2]Packet Handling problem.
brandon3055 replied to brandon3055's topic in Modder Support
@SanAndreasP Im trying to figure out how to use your system but im a bit lost can you please show me an example of how to send and receive a packet? Also i noticed you have a method in your proxy called "registerPackets" im not exactly sure how that works ether. I apologize for being such a noob Edit: also you have channelHandler = new ChannelHandler(ModCntManPack.MOD_ID, ModCntManPack.MOD_CHANNEL); in a modConstruction(FMLConstructionEvent event) method i assume this is something to do with your mod being a core mod in my case would i just add new ChannelHandler(MOD_ID, MOD_CHANNEL); to public static ChannelHandler channelHandler;? Edit2: I think im starting to figure it out but one thing i dont understand is "sendToAll(IPacket message)" Edit3: I think I have it figured out. Edit4: IT WORKS!!! although i discovered something interesting. The onBlockActivated method is only called client side when playing multiplayer Edit5: onBlockActivated dosnt run server side if the block is within the protected spawn area and the player activating it is not op! Edit6: that's a lot of edits... well at least i didn't hex post. -
If your custom item extends a tool that can have unbreaking it should be available by default. What are you trying to make? Edit: if you extend ItemTool it will accept any tool enchant
-
onUpdate is for entitys. You just have to override updateEntity and it will be called every tick. updateEntity is a method from the tileEntity class which your class should extend. e.g. public class MyTile extends TileEntity { @Override public void updateEntity() { //any code here will be run each tick } }
-
I never expected I would ever have to ask for help with item icons I thought I had them figured out. Then I tried to do something new and here I am... Until recently I have been using getIconFromDamage() whenever I need to be able to switch between icons e.g. @Override @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int par1) { if (par1 == 0) return itemIcon0; else if (par1 == 1) return itemIcon1; else return itemIcon2; } But then I switched to nbt for storing item data which obviously broke this so i switched to @Override @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { if (ItemNBTHelper.getShort(stack, "size", (short)0) > 0 && ItemNBTHelper.getBoolean(stack, "obliterate", false)) return itemIcon2; else if (ItemNBTHelper.getShort(stack, "size", (short)0) > 0) return itemIcon1; else return itemIcon0; } But for some reason this dosnt work properly the item renders correctly in the players hand but in the inventory it tries to use the default icon (itemIcon) which in this case is null. Can anyone tell me what im doing wrong?
-
[SOLVED][1.7.2]Packet Handling problem.
brandon3055 replied to brandon3055's topic in Modder Support
I was going to check out your earlier suggestion is this the same? Anyway i wont be starting on that until i finish what i am current project which is mostly just cleaning up my mod... may take a while lol. -
[SOLVED][1.7.2]Packet Handling problem.
brandon3055 replied to brandon3055's topic in Modder Support
Tell me about it thats why I have been messing with it for so long it is just so close to working I will finish the project i am working on then i will look into the other options but i will be keeping an eye on this and may switch back if you get it working because this is just so simple to use. BTW i assume from your posts that it dosnt but you haven't actually confirmed weather or not it works for you in multiplayer. -
For now i guess i will have to settle for running teleporting the player twice if they are teleporting from the end. If anyone is interested this is the final code. What it gives me is a method "Teleporter.teleport(player, x, y, z, dimension);" which works exactly as you would expect teleports the given player to the given x, y, z coordinates in the given dimension and it seems to work fairly well. Teleporter class CustomeTeleporter class Example implementation:
-
[1.7.x] Check for condition on block break
brandon3055 replied to Naoticon's topic in Modder Support
There is a method "onBlockHarvested" that gives you the player from there you can get the currently equipped item and check if it has the silk touch enchant. -
[SOLVED][1.7.2]Packet Handling problem.
brandon3055 replied to brandon3055's topic in Modder Support
I noticed the same thing. I think the server packet handler is being registered on both the server and the client so when sending a packet from the client it is received both on the server and the client that sent it. But i may be wrong. -
I was completely lost as to why the world wont load when teleporting from the end. I started thinking it may be a forge problem so to test this i went and found a 1.7.2 mod thats adds inter dimensional travel (found this http://www.minecraftforum.net/topic/2266303-172164teleportation-warp-book/) and loaded it up with the latest forge release and sure enough when teleporting from the end to any other dimension the world dosnt load. So ether this mod is broken or there is a problem with forge. Edit: ok maby that mod was a bad test subject i went as far back as forge 1049 and it still didnt work properly. It also sometimes spawned portals when travelling between the overworld and the nether which leads me to believe it just uses the travelToDimension method. Edit: This is just so weird the world is definitely being loaded. I can here mobs and see the particle effects from sheep eating grass and i can even pick up items on the ground but all i see it this:
-
This is what i have atm its very basic but it almost works And i made an item to test it. (right click teleports you to ether the end or the nether depending on which you are currently in shift right click teliports you to the dimension you are currently in) The problem i am having is when you teleport from the the end to ether the overworld or the nether the world dosnt seem to lead client side. The world is definitely loading because you can still collide with blocks (in a very glitchy way) even though you cant see them. If you teleport again it fixes it.
-
where dose your teleport method get called?