Jump to content

poopoodice

Members
  • Posts

    1160
  • Joined

  • Days Won

    7

Everything posted by poopoodice

  1. you might want to do them your self, such as override the onBlockActivated in your custom log, check if the player is holding an axe, and either change the block state or set a new block there. I dont know if it's the best way to do it tho.
  2. yeah you're right
  3. It seems like EntityLiving is now MobEntity, and EntityLivingBase is now LivingEntity
  4. Block model only gives what the blocks looks like, you will need to create shapes yourself. You can still use the deprecated methods, you can see people discuss with them in lots of past posts, check this: And through voxelshapes you can use them to declare the bounding box of the block, and the box showed to player when player is looking at it also.
  5. As title, is there a way to prevent player move stacks by using number keys? Here's what I've tried: @Override public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, PlayerEntity player) { return slotId == this.slot ? ItemStack.EMPTY : super.slotClick(slotId, dragType, clickTypeIn, player); } In container class this works well on normal transfer (drag and drop), but not working on the number keys. addSlot(new Slot(playerInv, x, 24 + x * 18, 165) { @Override public boolean canTakeStack(PlayerEntity playerIn) { return false; } @Override public boolean isItemValid(ItemStack stack) { return false; } }); Override these two methods from the Slot class doesn't help with that either. Any hints or something I did not noticed? Thanks.
  6. The log should tell you where went wrong
  7. Show your Block class as well, and I think add notSolid() to your block property should work.
  8. You should use your own modid?
  9. You can do it in both ways, but I'll say block state if that's the only thing you want to do.
  10. I think so, and I'd recommend master-slave system
  11. I just found another problem about registering client commands (opens a guiscreen). I've tested it in three different situations: 1- single player and it works fine. 2- multiplayers, the world is opened to lan. In this situation all players are able to see and execute the command but only the player that is sharing the world opens gui (even if it's the other players executed the command). 3- multiplayers, the world is hosted by a separated server (I ran runServer), and the players joined are unable to see and execute the command. how I register the command: private void onServerStarting(final FMLServerStartingEvent event) { ModCommands.registerAll(event.getCommandDispatcher(), event.getServer().isDedicatedServer()); } mod commands public static void registerAll(CommandDispatcher<CommandSource> dispatcher, boolean isDedicatedServer) { LiteralArgumentBuilder<CommandSource> command = Commands .literal("test") if (!isDedicatedServer) { command.then(OpenGUICommand.register(dispatcher)); } dispatcher.register(command); } command itself public static ArgumentBuilder<CommandSource, LiteralArgumentBuilder<CommandSource>> register(CommandDispatcher<CommandSource> dispatcher) { return Commands.literal("opengui").executes((context) -> { Minecraft.getInstance().displayGuiScreen(new TestScreen()); return 0; }); } Hope these hints help
  12. I'm now using FMLServerStartingEvent to register other commands and they worked fine, what are the ways to register a client-only command?
  13. I'm not really sure about this, but the problem might be that Minecraft mc = Minecraft.getMinecraft(); it's only for client side use
  14. Where does that mc came from?
  15. I've created a bullet successfully, but then I found out when the motion reaches a certain number, it is possible for bullets to jump through walls (new pos is basically current pos + motion), but when it is too low, it doesn't act like bullets. The reason I used entity bullet is I want it only reduces damage and range when colliding with terrains instead of stop and self-destruct. Is it possible to that with raytracing as well? If so do I need to rewrite a raytracing method?
  16. you can have a look at vanilla lectern
  17. It could be the Chinese government's problem? Probably
  18. Sorry for doing that, appreciate for ur patient ?
  19. https://github.com/poopoodice/ava/tree/master/src/main/java/com/poopoodice/ava Link to the repo
  20. Registry.ENTITY_TYPES.register(FMLJavaModLoadingContext.get().getModEventBus()); In the constructor of the main class
  21. I'm pretty sure the animations are basically the rotations and the movements of the boxes of the entity model according to their statue.
  22. public class Bullet extends AbstractBullet { private float damage; public Bullet(EntityType<? extends Bullet> entityType, World worldIn) { super(entityType, worldIn); } public Bullet(EntityType<? extends Bullet> entityType, World worldIn, PlayerEntity shooter) { this(entityType, worldIn); this.setPosition(shooter.posX, shooter.posY, shooter.posZ); } @Override protected void registerData(){} @Override public IPacket<?> createSpawnPacket() { return NetworkHooks.getEntitySpawningPacket(this); } } public abstract class AbstractBullet extends DamagingProjectileEntity { protected AbstractBullet(EntityType<? extends AbstractBullet> entityType, World worldIn) { super(entityType, worldIn); } @Override public boolean canBeCollidedWith() { return false;} @Override public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_){ return false;} @Override protected boolean isFireballFiery(){ return false;} } Here you are ?
  23. https://stackoverflow.com/questions/11247793/why-do-some-folks-use-classmethod-instead-of-class-method-in-correspondence
×
×
  • Create New...

Important Information

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