
Seynox
Members-
Posts
44 -
Joined
-
Last visited
Everything posted by Seynox
-
Hi! Is it possible to change a player's creature attributes to Undead? Or do i have to manually make the changes of being an undead to the player? (Like taking more damage with a Smite enchant, inverting the potions effects etc)
-
Perfect! Everything works! Thanks a lot
-
So, how am i supposed to register the ItemBlock? I have to put the item from the ObjectHolder?
-
That's how i register the blocks
-
So everything is working except the blocks that are really weird I have 2 custom blocks and both have the same problem : When i place the block, the block doesnt have any textures/sounds/particles, but still have the effects and properties i have set in their class, but if they are placed with a command or a structure, the block is working perfectly (When i try to pick the working block (With the middle click), nothing happen, but when i do it on the glitchy one, i get the item) EDIT : Forgot to mention that they appear normal in hand and in inventory
-
So, how can i create a ObjectHolder?
-
So, for example, if i make an item like this, it's not gonna work? @Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) { ItemStack itemstack = player.getHeldItem(hand); world.spawnEntity(new EntityItem(world, posX, posY, posZ, new ItemStack(new ExempleItem()))); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemstack); }
-
Okay, so i registered everything like this (The string after is just to set the unlocalized name) : @SubscribeEvent public static void onItemRegister(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll ( new ItemExemple0("item_exemple0"), new ItemExemple1("item_exemple1"), new ItemExemple2("item_exemple2") ); } Everything is working, and i still have those lines public static final Item ITEM_EXEMPLE = new ItemExemple("item_exemple"); Is it problematic if i use them? Not for the registering of course, but in general? For exemple : ItemStack stack = new ItemStack(ITEM_EXEMPLE); instead of ItemStack stack = new ItemStack(new ItemExemple("item_exemple"));
-
Okay so now that the Items and blocks are registered, i need to find a way to register the models, so here's what i did : @SubscribeEvent public static void onModelRegister(ModelRegistryEvent event) { for(Item item : Item.REGISTRY) { if(item.getRegistryName().getResourceDomain().equals(Reference.MODID)) ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } } Is it fine if i use the Resource Domain to register the model like this? (It's working perfectly but i don't know if that's a great way to do it)
-
I just saw how Botania registered his Items and it's really close to what i already have and it's not using the ArrayList to register things, is it good?
-
Hello! I saw on different posts that registering items like this i not the best way to do it @SubscribeEvent public static void onItemRegister(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll(ModItems.ITEMS.toArray(new Item[0])); } I saw how VoidWalker was registering his items, and it seems more complicated and to be adding more code than what i currently have What are the downsides of doing what i do and how can i optimize it?
-
Anyone?
-
I just retried the AttributeModifier, and yeah its working (but i have to put some crazy amounts) but the FOV go waaayy too high Is there a way to fix this?
-
Hi! Im trying to make an armor piece that allow the player to move at normal speed when sneaking (The code im trying to make is inside a Tick Event) I already tried few things like PotionEffect, Attributes and Capabilities and any of them change the sneak walking speed I looked at the sneak cheat of few hacked clients and i can't find how they do Can anyone help me?
-
Anyone?
-
Hello! Im trying to get Baubles as a dependency, i already tried so i have the bauble api in my workspace, and the mod installed when i launch with Eclipse (I didnt manually downloaded Bauble, it installed itself after adding few things in my build.gradle (see below)) so i thought that was it, but when i build my mod and i add it to my minecraft, it's not installing Bauble by itself so i have to do it myself (I put Baubles in the mod folder with my mod). Is there a way to have the Bauble mod automatically installed? The things i added to build.gradle :
-
Fixed! Thanks you
-
Can you give me an exemple? I have no idea how i can do this
-
PacketHandler : JumpPacket :
-
I just tried the mod on server, and it's crashing about the EntityPlayerSP How can i make this thread-safe?
-
Nevermind, i just added the motionY in the KeyPressHandler! Thanks a lot!
-
How can i make the client execute player.motionY? world.isRemote isnt working here
-
Okay so here's what i did. Every println are showing up in the console, which mean everything is working, but the player.motionY = 0.42D; (Inside PacketJump) is not happening, and i don't have any errors. I think it might be a side problem, but i don't see how i can fix it ClientProxy : KeyPressHandler : PacketHandler : PacketJump : The console output when i press space while in the air :
-
Is this outdated? https://gist.github.com/CatDany/4a3df7fcb3c8270cf70b If i get it, after doing this i just have to put the condition before sending the packet right? Like in useExemple
-
Anyone?