Jump to content

xJon

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by xJon

  1. I'm pretty sure I figured it out, with some help. I managed to make my changes inside of the ChunkProvider, without making tons of other classes. Thanks anyway!
  2. Hi, Recently I worked on a custom dimension which I wanted to use Minecraft's base decorate method. The only thing is, I wanted to remove the vanilla ore gen and lava lakes. I tried making the classes that I had to override the methods (that the decorate method called to), and I extended them. Finally I tried it and it did work, but I felt like I didn't know what the hell am I doing, and I'm a bit afraid from crashes and such. I'm not sure at all if I that's the legit way to modify the decorate method. That's my commit that removed the ore gen and lava lakes from the decorate method: https://github.com/xJon/Jons-Useless-Mod/commit/ae298bb0d3d198938e38722a1620ab0f46cd7768 And that's the code itself: https://github.com/xJon/Jons-Useless-Mod/tree/Test/src/main/java/xjon/jum/world I'll really appreciate if someone could tell me if there's anything I can change to make it more simple, also if I'm missing anything. Thanks for reading this, and for any reply!
  3. That fixed everything! But just so I'll understand, why are we setting the shootingEntity as an EntityLivingBase? Also, could you explain to me why did the issue happen only in survival mode? Thank you so much!
  4. Tried to change it - it didn't really work. I changed everything as you said and implemented IEntityAdditionalSpawnData. The problem is that my writeSpawnData & readSpawnData aren't working really - the arrow is invisible. I tried to follow what you said but I probably did something wrong. Here's the code: @Override public void writeSpawnData(ByteBuf buffer) { buffer.writeInt(this.shootingEntity.getEntityId()); } @Override public void readSpawnData(ByteBuf additionalData) { this.shootingEntity.setEntityId(additionalData.readInt()); } Also, could you explain how is this issue not happening in creative mode? I really can't understand that. Thanks for the reply!
  5. Any idea? Thanks.
  6. Hi, Whenever I shoot the custom arrow I made, using the custom bow, in survival mod (which is interesting), it has a slight issue. When shoot the arrow far enough, it's okay, but if I shoot the arrow to a close range, this happens: I'm really not sure what does that. This is the custom arrow class - https://github.com/xJon/Jons-Useless-Mod/blob/master/src/main/java/xjon/jum/entity/projectile/EntityUselessArrow.java Any help is appreciated. Thanks!
  7. I tried searching more but nope. I'll REALLY appreciate any kind of help!
  8. I tried to search and look at other mods, also at the ChunkProviderEnd.class, yet I'm unable to figure out what I'm doing wrong. Here's my current ChunkProvider: http://pastebin.com/p7WUCBdX I'll appreciate any kind of help/tip. Thanks
  9. Never mind - found a way.
  10. Alright, I figured out how - I had to add the required arguments to transferPlayerToDimension Also I found out that I can override placeInPortal and set a new block state in the entity pos to make my block when the player changes dimemsion. My only problem now is that when the player come back to the overworld, it makes ANOTHER portal block, so each time it changes dimension the Teleporter class makes another teleport block. What I can do so the teleporter class will make my teleport block to act like it should? Thanks
  11. I'm currently unable to test that. When I'll be able to I'll see how it goes. Thanks anyway for replying.
  12. I'm looking at the BlockPortal.class and I can't find anything related to the Teleporter.class. Am I blind? :\
  13. I made a custom teleporter class that extands the Teleporter (vanilla) class and I've overridden the "makePortal" method. I tried to insert "setBlockState" in it, without all the other portal-making code, but I'm not sure at all if this is the way to do it. The problem though, is that I don't really know how to call the Teleporter. I'm using "travelToDimension" to move the player on a block activate (I gave up currently on the GUI with one button, seems pretty useless). So basically nothing calls the custom Teleporter class. I think I just totally understand the Telleporter class so I'm doing something wrong. Thanks for the reply
  14. Hi, How can I change (or override) the default (nether) teleporter with a new one, which will basically be one block? How can I basically get rid of the nether portal spawning when the player enters the new custom dimension? Thanks for any support!
  15. Hi, I'm working on a custom dimension and I want to make the world generation like random floating islands. I tried few things I found online but it didn't really work out, and I'm not sure at all I'm doing it right. What exactly do I need to modify and where, to change the world generation to act like I want it to? Thanks for any support
  16. Okay, I'll try that. If I'd have some issues I'll just ask
  17. Pretty sure I understood that! Yet I'm having some problems creating the custom dimension. What are the core things I to set up for a custom dimension - Where can I find a good tutorial for Minecraft 1.8? Thanks guys
  18. Hi, I want to make it so a button on a GUI will teleport the player that is pressing it to another dimension. Is this possible? If so - how do I do that? I tried to figure it out myself but it's a bit tricky, as I understood that GUIs are client-side only. Any help is appreciated!
  19. I understood my problem and your method is working perfectly. Thanks!
  20. Here is the full Items class inside of my init package: public class UselessItems { public static Item useless_material; public static Item useless_sword; public static Item useless_shovel; public static Item useless_pickaxe; public static Item useless_axe; public static Item useless_hoe; public static Item useless_multitool; public static Item useless_bro; public static Item useless_food; public static Item useless_helmet; public static Item useless_chestplate; public static Item useless_leggings; public static Item useless_boots; public static Item useless_bow; public static Item useless_arrow; public static int harvestLevel, maxUses, enchantability, armorHelm, armorChest, armorLeg, armorBoot; public static float efficiency, damage; public static void checks() { if(!UselessConfiguration.isUseless) { harvestLevel = 10; maxUses = 1000; enchantability = 100; efficiency = 10.0F; damage = 10.0F; armorHelm = 4; armorChest = 14; armorLeg = 10; armorBoot = 6; } else { harvestLevel = 0; maxUses = 11; enchantability = 1; efficiency = 0.5F; damage = 0.5F; armorHelm = 1; armorChest = 2; armorLeg = 2; armorBoot = 1; } } public static final Item.ToolMaterial uselessToolMaterial = EnumHelper.addToolMaterial("uselessToolMaterial", harvestLevel, maxUses, efficiency, damage, enchantability); public static final ItemArmor.ArmorMaterial uselessArmorMaterial = EnumHelper.addArmorMaterial("uselessArmorMaterial", "useless_armor", maxUses, new int []{armorHelm,armorChest,armorLeg,armorBoot}, enchantability); public static void init() { useless_material = new Item().setUnlocalizedName("useless_material").setCreativeTab(JumCore.tabJUM); useless_sword = new ItemUselessSword(uselessToolMaterial).setUnlocalizedName("useless_sword").setCreativeTab(JumCore.tabJUM); useless_shovel = new ItemUselessShovel(uselessToolMaterial).setUnlocalizedName("useless_shovel").setCreativeTab(JumCore.tabJUM); useless_axe = new ItemUselessAxe(uselessToolMaterial).setUnlocalizedName("useless_axe").setCreativeTab(JumCore.tabJUM); useless_hoe = new ItemUselessHoe(uselessToolMaterial).setUnlocalizedName("useless_hoe").setCreativeTab(JumCore.tabJUM); useless_bro = new ItemUselessBro().setUnlocalizedName("useless_bro").setCreativeTab(JumCore.tabJUM); useless_pickaxe = new ItemUselessPickaxe(uselessToolMaterial).setUnlocalizedName("useless_pickaxe").setCreativeTab(JumCore.tabJUM); useless_food = new ItemFood(8, 2.0F, true).setUnlocalizedName("useless_food").setCreativeTab(JumCore.tabJUM); useless_helmet = new ItemUselessArmor(uselessArmorMaterial, 0, 0).setUnlocalizedName("useless_helmet").setCreativeTab(JumCore.tabJUM); useless_chestplate = new ItemUselessArmor(uselessArmorMaterial, 0, 1).setUnlocalizedName("useless_chestplate").setCreativeTab(JumCore.tabJUM); useless_leggings = new ItemUselessArmor(uselessArmorMaterial, 0, 2).setUnlocalizedName("useless_leggings").setCreativeTab(JumCore.tabJUM); useless_boots = new ItemUselessArmor(uselessArmorMaterial, 0, 3).setUnlocalizedName("useless_boots").setCreativeTab(JumCore.tabJUM); useless_multitool = new ItemUselessMultitool(uselessToolMaterial).setUnlocalizedName("useless_multitool").setCreativeTab(JumCore.tabJUM); useless_bow = new ItemUselessBow().setUnlocalizedName("useless_bow").setCreativeTab(JumCore.tabJUM); useless_arrow = new Item().setUnlocalizedName("useless_arrow").setCreativeTab(JumCore.tabJUM); } public static void register() { GameRegistry.registerItem(useless_sword, useless_sword.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_material, useless_material.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_axe, useless_axe.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_shovel, useless_shovel.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_hoe, useless_hoe.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_bro, useless_bro.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_pickaxe, useless_pickaxe.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_food, useless_food.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_helmet, useless_helmet.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_chestplate, useless_chestplate.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_leggings, useless_leggings.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_boots, useless_boots.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_multitool, useless_multitool.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_bow, useless_bow.getUnlocalizedName().substring(5)); GameRegistry.registerItem(useless_arrow, useless_arrow.getUnlocalizedName().substring(5)); } public static void registerRenders() { registerRender(useless_sword); registerRender(useless_material); registerRender(useless_shovel); registerRender(useless_axe); registerRender(useless_hoe); registerRender(useless_bro); registerRender(useless_pickaxe); registerRender(useless_food); registerRender(useless_helmet); registerRender(useless_chestplate); registerRender(useless_leggings); registerRender(useless_boots); registerRender(useless_multitool); registerRender(useless_bow); registerRender(useless_arrow); } public static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } And here's the relevant part of the intialization: @EventHandler public void preInit(FMLPreInitializationEvent event) { config = new Configuration(event.getSuggestedConfigurationFile()); UselessConfiguration.syncConfig(); UselessItems.checks(); UselessItems.init(); UselessItems.register(); UselessBlocks.init(); UselessBlocks.register(); UselessAchievements.loadAchievements(); UselessAchievements.registerPage(); FMLCommonHandler.instance().bus().register(new PlayerEvents()); } @EventHandler public void Init(FMLInitializationEvent event) { proxy.registerRenders(); UselessRecipes.register(); UselessTileEntities.register(); GameRegistry.registerWorldGenerator(new UselessGeneration(), 0); FMLCommonHandler.instance().bus().register(instance); } Thanks and sorry if I'm stupid as hell
  21. As you said: "You have to create items in preInit"; I can't put "checks()" in "preInit" and "Items" in "init".
  22. Okay, misunderstood - sorry. The code I gaved is inside of the Items class. Inside there I set up the tool and armor material for the actual items.
×
×
  • Create New...

Important Information

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