Jump to content

RobinCirex

Members
  • Posts

    115
  • Joined

  • Last visited

Everything posted by RobinCirex

  1. Because I have to copy and paste the model file 15 times and rename it
  2. Okay. I have an item that does the same every time but in like 10 different colors and it' s kinda dumb to add each as a single item
  3. Hey, there used to be the method #setHasSubtypes in the Item class. Does anyone know how this works in the latest forge version?
  4. uh, basically, but without a resource pack. Someone requested from me to make a mod where he can change the textures of the mod in a config file?
  5. Hey, is it possible to use textures that are in e.g. the .minecraft folder for items? So that I could change the textures without having to change the code?
  6. Hey, I want to make monsters be able to break blocks that are in the way of their path. How would I detect those blocks? I've looked through all the AIs but didn't really find much. How would you guys recommend me to do it?
  7. Hey, I'm trying to make an animated player model using GeckoLib. For that, the player has to implement the interface "IAnimatable". How do I overwrite the player class so I can implement it? This is what I've tried package me.cirex.titans.entity; import com.mojang.authlib.GameProfile; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import software.bernie.geckolib3.core.IAnimatable; import software.bernie.geckolib3.core.manager.AnimationData; import software.bernie.geckolib3.core.manager.AnimationFactory; public class CustomPlayerEntity extends PlayerEntity implements IAnimatable { public CustomPlayerEntity(World p_i241920_1_, BlockPos p_i241920_2_, float p_i241920_3_, GameProfile p_i241920_4_) { super(p_i241920_1_, p_i241920_2_, p_i241920_3_, p_i241920_4_); System.out.println("Player was created"); } @Override public boolean isSpectator() { return false; } @Override public boolean isCreative() { return false; } @Override public void tick() { System.out.println("test"); super.tick(); } @Override public void registerControllers(AnimationData data) { } @Override public AnimationFactory getFactory() { return null; } } package me.cirex.titans.registry; import me.cirex.titans.entity.CustomPlayerEntity; import net.minecraft.entity.EntityClassification; import net.minecraft.entity.EntityType; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; public class TitanRegistry { public static final EntityType<?> playerType = EntityType.Builder .<CustomPlayerEntity>create(EntityClassification.MISC).disableSerialization().disableSummoning() .size(0.6F, 1.8F).trackingRange(32).func_233608_b_(2).build("minecraft:player").setRegistryName("minecraft:player"); @SubscribeEvent public void onRegisterEntity(RegistryEvent.Register<EntityType<?>> event) { if(event.getName().getPath().equalsIgnoreCase("player")) { event.setCanceled(true); } event.getRegistry().register(playerType); } }
  8. Hey, I want to make a mod where the player transforms into a monster that has special abilities. I have the model, textures and animations (using geckolib) made and I wanted to ask you guys for an opinion: How would I go on about this? I'm thinking of 2 options: Either override the PlayerRenderer and add the special abilities to the player or make the player invisible and kind of make the monster follow him around constantly. What do you guys think?
  9. So, if I have spawneggs that are all supposed to use the same model, I have to copy it like 20 times?
  10. Hey, I'm trying to assign a custom model. I've looked at the documentary and it says that I have to use ModelLoader.setCustomModelResourceLocation, though that doesn't exist. Can anyone help?
  11. okay, how would I be doing it then? Just using a rect?
  12. Hey, I want to make a laser and I'm rendering a 3D line. However, I want to add a texture to it but I'm not quite sure how to do it. Can someone tell me what I have to put in the tex method? This is my code public void fillTex(Matrix4f matrix, Matrix4f matrix2) { BufferBuilder bufferbuilder = Tessellator.getInstance().getBuffer(); RenderSystem.enableBlend(); RenderSystem.enableTexture(); RenderSystem.defaultBlendFunc(); GL11.glLineWidth(5); Minecraft.getInstance().getTextureManager().bindTexture(laserTexture); bufferbuilder.begin(2, DefaultVertexFormats.POSITION_TEX); bufferbuilder.pos(matrix, (float) 0, (float) 0, (float) 0).tex(0, 0).endVertex(); bufferbuilder.pos(matrix2, (float) 0, (float) 0, (float) 0).tex(100, 100).endVertex(); bufferbuilder.finishDrawing(); WorldVertexBufferUploader.draw(bufferbuilder); RenderSystem.disableTexture(); RenderSystem.disableBlend(); }
  13. Hey, I want to remove the particles that are displayed below a player when running. Does someone have an idea on how to do that?
  14. Hey, I'm trying to make a command using this code public static void register(CommandDispatcher<CommandSource> dispatcher) { dispatcher.register(Commands.literal("picture").executes(source -> { return command(source.getSource(), source.getSource().asPlayer()); }).then(Commands.argument("link", StringArgumentType.string()).argument("width", IntegerArgumentType.integer()) .argument("height", IntegerArgumentType.integer())).executes(source -> { return command(source.getSource(), source.getSource().asPlayer(), StringArgumentType.getString(source, "controlled"), IntegerArgumentType.getInteger(source, "width"), IntegerArgumentType.getInteger(source, "height")); })); } private static int command(CommandSource source, PlayerEntity player) { return 1; } private static int command(CommandSource source, PlayerEntity player, String controlled, int width, int height) { return 1; } However, everytime I try to use it, I get the error "An unexpected error occurred trying to execute that command" and nothing happens. Can someone tell me what I'm doing wrong?
  15. Hey, I'm implementing SimpleImpl atm and when I tried to send a message, I got the error "Caused by: java.lang.IllegalArgumentException: Invalid message" Can somebody tell me what's wrong? public class SimpleMessage { public String message; public SimpleMessage(String message) { this.message = message; } public SimpleMessage() { } public static SimpleMessage read(PacketBuffer buf) { return new SimpleMessage(buf.readString()); } public static void write(SimpleMessage message, PacketBuffer buf) { buf.writeString(message.message); } public static class Handler { public static void handle(SimpleMessage message, Supplier<NetworkEvent.Context> context) { ((NetworkEvent.Context) context.get()).setPacketHandled(true); System.out.println(message.message); } } } This is the message class itself And this is the method I'm using to send it public <MSG> void sendToServer(MSG message) { channel.sendToServer(message); } Thanks in advance
  16. Hey, is there a way to get a resource location from a picture from e.g. imgur or prntscr? Or at least a way to get one from a picture that is not in your assets?
  17. Okay, could you maybe explain how I would do that?
  18. well, I wanna render rects though, textured rects too. This was just an example fo what I mean by "2D Rect in 3D"
×
×
  • Create New...

Important Information

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