Jump to content

Recommended Posts

Posted

I have looked all over Google and everywhere else and I could not find a single accurate guide for 1.8 on how to add a custom liquid to the game. They were all in 1.7.10 and I know the way that you add custom items and blocks to the game is WAY different than it used to be so I assume it's similar for liquids as well. Does anyone have a guide they used or something? It seems that everyone but me knows how to make liquids for 1.8. Can someone explain? Thanks!

egg

Posted

Adding the

Fluid

and its

Block

aren't that different in 1.8, except you need to pass

ResourceLocation

s of the fluid's textures to the

Fluid

constructor.

 

The new model system is fairly different, though. You need to use Forge's advanced blockstates format to tell each fluid block to use Forge's fluid model and specify which

Fluid

to use the textures from.

 

I don't have a guide, but I do have examples:

 

The registration of fluid containers (buckets and tanks) in my

ModFluids

class is currently broken (

FluidContainerRegistry

doesn't support NBT-based fluid containers), so don't use that.

 

Edit: Fixed the formatting.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 10/30/2015 at 6:25 AM, Choonster said:

 

  Reveal hidden contents

 

 

 

This is really helpful. Thanks! Can you create all of your liquids in one class like I did with my blocks and items? Example below:

 

 

  Reveal hidden contents

 

 

 

EDIT: Another quick question: What does the gas stuff mean when creating a liquid?

egg

Posted
  On 10/30/2015 at 11:46 AM, 1Poseidon3 said:

This is really helpful. Thanks! Can you create all of your liquids in one class like I did with my blocks and items?

 

Yes, that's what my

ModFluids

class does. You can do model registration in the same class as the fluid creation/registration, but I prefer to register all models in a separate client-only class (

ModModelManager

).

 

 

  Quote

Another quick question: What does the gas stuff mean when creating a liquid?

 

A

Fluid

can be either a liquid or a gas. Liquids behave like Water/Lava, gases are just liquids that flow upwards instead of downwards.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 10/30/2015 at 11:55 AM, Choonster said:

 

  Reveal hidden contents

 

 

 

I put that code in a new file but it's missing some things like FluidNoFlow and things like that. How exactly does this fluid creation work? I don't understand most of this at an initial glance because I am still relatively new to mod creation. Could you please explain how this works (if it isn't too much work for you)?

egg

Posted
  On 10/30/2015 at 2:45 PM, 1Poseidon3 said:

I put that code in a new file but it's missing some things like FluidNoFlow and things like that. How exactly does this fluid creation work? I don't understand most of this at an initial glance because I am still relatively new to mod creation. Could you please explain how this works (if it isn't too much work for you)?

 

BlockFluidNoFlow

is my own fluid block class, it's just a fluid that doesn't flow outwards.

BlockFluidClassic

and

BlockFluidFinite

are the fluid block classes provided by Forge. The doc comment on each class briefly explains what it does.

 

ModFluids.createFluid

creates and registers the

Fluid

instance (a singleton like

Block

and

Item

) using the specified fluid name and texture name. The

Fluid

instance defines the physical properties of the fluid like luminosity, density and viscosity (explained in doc comments of the corresponding

Fluid

fields).

 

ModFluids.registerFluidBlock

receives the fluid's

Block

instance as an argument, sets its unlocalised name to the fluid's unlocalised name and registers it. The

Block

instance represents the fluid when it's in the world and actually implements the in-world behaviour corresponding to the

Fluid

's properties (e.g. light level is controlled by the luminosity, flow speed is controlled by the viscosity).

 

My code doesn't handle the

Fluid

already being registered by another mod. If a

Fluid

with the same name as yours (e.g.

steam

) is already registered, you should use that

Fluid

instance and its

Block

instead of creating your own. I know BuildCraft has an example of this (for 1.7.10, but it should be the same in 1.8).

 

Edit: I wish 8 followed by a ) didn't turn into a smiley.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 10/30/2015 at 3:49 PM, diesieben07 said:

  Quote
Edit: I wish 8 followed by a ) didn't turn into a smiley.

I don't know what you are talking about [nobbc]8)[/nobbc]

 

Jokes aside: Either check "Don't use smileys" in "Attachments and other options" or disable BBCode temporarily by surrounding the desired passage with

[nobbc][nobbc][/nobbc][/nobbc]

(the creation of this involved that tag :D).

 

Thanks, I wasn't aware of that option.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 10/30/2015 at 3:34 PM, Choonster said:

  Quote

I put that code in a new file but it's missing some things like FluidNoFlow and things like that. How exactly does this fluid creation work? I don't understand most of this at an initial glance because I am still relatively new to mod creation. Could you please explain how this works (if it isn't too much work for you)?

 

BlockFluidNoFlow

is my own fluid block class, it's just a fluid that doesn't flow outwards.

BlockFluidClassic

and

BlockFluidFinite

are the fluid block classes provided by Forge. The doc comment on each class briefly explains what it does.

 

ModFluids.createFluid

creates and registers the

Fluid

instance (a singleton like

Block

and

Item

) using the specified fluid name and texture name. The

Fluid

instance defines the physical properties of the fluid like luminosity, density and viscosity (explained in doc comments of the corresponding

Fluid

fields).

 

ModFluids.registerFluidBlock

receives the fluid's

Block

instance as an argument, sets its unlocalised name to the fluid's unlocalised name and registers it. The

Block

instance represents the fluid when it's in the world and actually implements the in-world behaviour corresponding to the

Fluid

's properties (e.g. light level is controlled by the luminosity, flow speed is controlled by the viscosity).

 

My code doesn't handle the

Fluid

already being registered by another mod. If a

Fluid

with the same name as yours (e.g.

steam

) is already registered, you should use that

Fluid

instance and its

Block

instead of creating your own. I know BuildCraft has an example of this (for 1.7.10, but it should be the same in 1. 8) .

 

Edit: I wish 8 followed by a ) didn't turn into a smiley.

 

 

Ok so this helped a lot and I've been following what your code does but I have encountered an issue that's really getting to me. Here's the code it's happening in:

 

 

public class PTFluids {

public static Fluid mercury_fluid_static;
public static BlockFluidClassic mercury_block_static;


public static Fluid fluidNormalGas;
public static BlockFluidClassic blockNormalGas;


public static Set<IFluidBlock> fluidBlocks = new HashSet<IFluidBlock>();


public static void registerFluids() {

	mercury_fluid_static = createFluid("mercury", "pt:blocks/mercury_still", false).setLuminosity(10).setDensity(1600).setViscosity(1);
	mercury_block_static = registerFluidBlock(new BlockFluidClassic(mercury_block_static, new MaterialLiquid(MapColor.grayColor)));


	fluidNormalGas = createFluid("normalgas", "testmod3:blocks/fluid_normalGas", true).setLuminosity(10).setDensity(-1600).setViscosity(100).setGaseous(true);
	blockNormalGas = registerFluidBlock(new BlockFluidClassic(fluidNormalGas, new MaterialLiquid(MapColor.adobeColor)));
}

 

 

For some reason, my custom liquid (mercury) is throwing an error in (new BlockFluidClassic(mercury_block_static, new MaterialLiquid(MapColor.grayColor));

 

 

I don't know why this is happening since it's identical to your original code except for the things needed to change for mine yet it is throwing the error saying the method is undefined. Any ideas why this is happening?

egg

Posted

Post the full error and the full class.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 10/30/2015 at 5:13 PM, Choonster said:

Post the full error and the full class.

 

 

Sorry it took me so long. I had a busy weekend.

 

 

Error

 

  Reveal hidden contents

 

 

 

PTFluids.java

 

  Reveal hidden contents

 

egg

Posted

mercury_block_static = new BlockFluidClassic(mercury_block_static

 

Uh.

 

You're passing the block you haven't yet created to the constructor of said block.  At best you're passing null.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  On 11/2/2015 at 2:41 AM, 1Poseidon3 said:

Didn't this (public static BlockFluidClassic mercury_block_static;) create it?

 

That simply declares a field and assigns the default value (

null

) to it. At that point, you haven't created a

Block

instance or assigned it to the field.

 

BlockFluidClassic

doesn't have a

(BlockFluidClassic, Material)

constructor anyway, so why are you trying to pass the mercury block to its own constructor?

 

Side note: Use the [nobbc][tt][/nobbc] tag (or the Tt button) for inline code.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 11/2/2015 at 2:41 AM, 1Poseidon3 said:

Didn't this (public static BlockFluidClassic mercury_block_static;) create it?

 

Declaration vs. Initialization vs. Assignment.  Basic Java.  Basic programming, really (although various languages will separate things a little farther, such as C* having separate declaration and definitions for functions).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  On 11/2/2015 at 6:02 AM, Draco18s said:

  Quote

Didn't this (public static BlockFluidClassic mercury_block_static;) create it?

 

Declaration vs. Initialization vs. Assignment.  Basic Java.  Basic programming, really (although various languages will separate things a little farther, such as C* having separate declaration and definitions for functions).

 

 

I was trying to do it like that because it's identical to the one below it which is the one you created (which also has no errors in it).

egg

Posted
  On 11/2/2015 at 2:54 PM, 1Poseidon3 said:

I was trying to do it like that because it's identical to the one below it which is the one you created (which also has no errors in it).

 

No, my code passes the

Fluid

to the

BlockFluidClassic

constructor. You're trying to pass the

Block

to its own constructor.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 11/2/2015 at 3:17 PM, Choonster said:

  Quote

I was trying to do it like that because it's identical to the one below it which is the one you created (which also has no errors in it).

 

No, my code passes the

Fluid

to the

BlockFluidClassic

constructor. You're trying to pass the

Block

to its own constructor.

 

 

OH. That's what I needed the entire time. That's what was causing it. I can't believe I misread that. Thanks!

egg

Posted

@Choonster

I don't understand your ModModelManager.java does or where that method that gets the textures is called. Could you please explain how it works so I can implement it into my own mod? I currently use .json files to load all of my textures in. How does it work for liquids?

 

 

EDIT: Also on a side note,

.setCreativeTab();

doesn't appear to work on liquids. Is there another way to do it instead?

egg

Posted

ModModelManager#registerAllModels

is called from

CombinedClientProxy#preInit

(this is only loaded on the client, the dedicated server loads

DedicatedServerProxy

instead), which is in turn called from

TestMod3#preInit

.

 

registerFluidModel

registers the model for a single

IFluidBlock

:

  • The call to
    ModelBakery.addVariantName

    without any names prevents any model being loaded for the

    Item

    form of the

    IFluidBlock

    . If you don't call

    ModelBakery.addVariantName

    for an

    Item

    , the model with the same name as the one passed to

    GameRegistry.registerBlock

    /

    registerItem

    will be loaded.

  • The
    ModelResourceLocation

    defines the location of the fluid's model (

    testmod3:fluid

    with the

    Fluid

    's name as the variant)

  • The call to
    ModelLoader.setCustomMeshDefinition

    tells Minecraft to always use the model defined by the

    ModelResourceLocation

    for the

    Item

    .

    • MeshDefinitionFix

      is an interface created by diesieben07 that allows a lambda to be used as an

      ItemMeshDefinition

      (this is needed because ForgeGradle doesn't know how to reobfuscate lambdas). If you're not compiling against Java 8, you'd use an anonymous class instead of a lambda.

    [*]The call to

    ModeLoader.setCustomStateMapper

    tells Minecraft to always use the blockstates file and variant defined by the

    ModelResourceLocation

    to get the model for the

    Block

 

The fluid.json blockstates file tells Minecraft to use the

forge:fluid

model for each variant, passing the name of the fluid to render in the custom data.

 

Forge's fluid model acts as both a

Block

and

Item

model, using a 3D model for the

Block

and a 2D model for the

Item

.

 

Block#setCreativeTab

works without issue on fluid blocks, but a

Fluid

isn't a

Block

and thus doesn't have a creative tab.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

UPDATE:my bad forge was not updated

OP your code seems to have Fluid fluid = new Fluid(name);

instead of choonster code.

 

 

 

Fluid fluid = new Fluid(name, still, flowing);

in
private static Fluid createFluid(String name, String textureName, boolean hasFlowIcon)

in
Modfluids

 

The constructor Fluid(String, ResourceLocation, ResourceLocation) is undefined

Posted

That constructor was added with the fluid model in Forge 1.8-11.14.3.1464. Make sure you're using that version or a newer one.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • dynamictrees and dtneapolitan are the last mentioned mod - remove these
    • https://mclo.gs/9y5ciD2 anyone ever had this issue?  Internal exception illegal argument exception: unable to fit 3194354 into 3
    • Hi! I'm trying to add my custom models/textures renderer like this: public class PonyPlayerWrapperRenderer extends EntityRenderer<Player> { // wrapper class under my LivingEntityRenderer class implementation private final PonyPlayerRenderer innerRenderer; private final PonyPlayerRenderer innerSlimRenderer; public PonyPlayerWrapperRenderer(final EntityRendererProvider.Context context) { super(context); System.out.println("creating new PonyPlayerWrapperRenderer"); this.innerRenderer = new PonyPlayerRenderer(context, false); this.innerSlimRenderer = new PonyPlayerRenderer(context, true); } @Override public void render(final Player entity, final float yaw, final float partialTicks, final PoseStack poseStack, final MultiBufferSource bufferSource, final int packedLight) { System.out.println("PonyPlayerWrapperRenderer render: " + entity.toString()); if (entity instanceof AbstractClientPlayer clientPlayer) { if (clientPlayer.getModelName().contains("slim")) { innerSlimRenderer.render(clientPlayer, yaw, partialTicks, poseStack, bufferSource, packedLight); } else { innerRenderer.render(clientPlayer, yaw, partialTicks, poseStack, bufferSource, packedLight); } } } @Override public ResourceLocation getTextureLocation(final Player player) { System.out.println("PonyPlayerWrapperRenderer getTextureLocation"); if (player instanceof AbstractClientPlayer clientPlayer) { return clientPlayer.getSkinTextureLocation(); } System.out.println("player instanceof AbstractClientPlayer is false"); return getDefaultSkin(player.getUUID()); } } public class PonyPlayerRenderer extends LivingEntityRenderer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> { private final PlayerModel<AbstractClientPlayer> earthModel; private final PlayerModel<AbstractClientPlayer> pegasusModel; private final PlayerModel<AbstractClientPlayer> unicornModel; public PonyPlayerRenderer(final EntityRendererProvider.Context context, final boolean slim) { super( context, slim ? new PonyModelSlim(context.bakeLayer(PonyModelSlim.LAYER_LOCATION)) : new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)), 0.5f ); System.out.println("creating new PonyPlayerRenderer"); this.earthModel = slim ? new PonyModelSlim(context.bakeLayer(PonyModelSlim.LAYER_LOCATION)) : new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)); this.pegasusModel = new PegasusModel(context.bakeLayer(PegasusModel.LAYER_LOCATION)); this.unicornModel = new UnicornModel(context.bakeLayer(UnicornModel.LAYER_LOCATION)); } @Override public void render(final AbstractClientPlayer player, final float entityYaw, final float partialTicks, final PoseStack poseStack, final MultiBufferSource buffer, final int packedLight) { final PonyRace race = player.getCapability(PONY_DATA) .map(data -> ofNullable(data.getRace()).orElse(PonyRace.EARTH)) .orElse(PonyRace.EARTH); this.model = switch (race) { case PEGASUS -> pegasusModel; case UNICORN -> unicornModel; case EARTH -> earthModel; }; super.render(player, entityYaw, partialTicks, poseStack, buffer, packedLight); } @Override public ResourceLocation getTextureLocation(final AbstractClientPlayer player) { final PonyRace race = player.getCapability(PONY_DATA) .map(data -> ofNullable(data.getRace()).orElse(PonyRace.EARTH)) .orElse(PonyRace.EARTH); return switch (race) { case EARTH -> fromNamespaceAndPath(MODID, "textures/entity/earth_pony.png"); case PEGASUS -> fromNamespaceAndPath(MODID, "textures/entity/pegasus.png"); case UNICORN -> fromNamespaceAndPath(MODID, "textures/entity/unicorn.png"); }; } } @Mod.EventBusSubscriber(modid = MODID, bus = MOD, value = CLIENT) public class ClientRenderers { // mod bus render registration config @SubscribeEvent public static void onRegisterLayerDefinitions(final EntityRenderersEvent.RegisterLayerDefinitions event) { event.registerLayerDefinition(PonyModel.LAYER_LOCATION, PonyModel::createBodyLayer); event.registerLayerDefinition(PonyModelSlim.LAYER_LOCATION, PonyModelSlim::createBodyLayer); event.registerLayerDefinition(PegasusModel.LAYER_LOCATION, PegasusModel::createBodyLayer); event.registerLayerDefinition(UnicornModel.LAYER_LOCATION, UnicornModel::createBodyLayer); event.registerLayerDefinition(InnerPonyArmorModel.LAYER_LOCATION, InnerPonyArmorModel::createBodyLayer); event.registerLayerDefinition(OuterPonyArmorModel.LAYER_LOCATION, OuterPonyArmorModel::createBodyLayer); } @SubscribeEvent public static void onRegisterRenderers(final EntityRenderersEvent.RegisterRenderers event) { event.registerEntityRenderer(EntityType.PLAYER, PonyPlayerWrapperRenderer::new); System.out.println("onRegisterRenderers end"); } } Method onRegisterRenderers() is called and I can see it being logged. But when I enter the world, my PonyWrapperRenderer render() method doesn't ever seem to be called. I also tried to put my renderer to EntityRenderDispatcher's playerRenderers via reflection: @Mod.EventBusSubscriber(modid = MODID, bus = MOD, value = CLIENT) public class ClientRenderers { @SubscribeEvent public static void onRegisterLayerDefinitions(final EntityRenderersEvent.RegisterLayerDefinitions event) { event.registerLayerDefinition(PonyModel.LAYER_LOCATION, PonyModel::createBodyLayer); event.registerLayerDefinition(PonyModelSlim.LAYER_LOCATION, PonyModelSlim::createBodyLayer); event.registerLayerDefinition(PegasusModel.LAYER_LOCATION, PegasusModel::createBodyLayer); event.registerLayerDefinition(UnicornModel.LAYER_LOCATION, UnicornModel::createBodyLayer); event.registerLayerDefinition(InnerPonyArmorModel.LAYER_LOCATION, InnerPonyArmorModel::createBodyLayer); event.registerLayerDefinition(OuterPonyArmorModel.LAYER_LOCATION, OuterPonyArmorModel::createBodyLayer); } @SubscribeEvent public static void onClientSetup(final FMLClientSetupEvent event) { event.enqueueWork(() -> { try { final EntityRenderDispatcher dispatcher = Minecraft.getInstance().getEntityRenderDispatcher(); final Field renderersField = getEntityRenderDispatcherField("playerRenderers"); final Field itemInHandRenderer = getEntityRenderDispatcherField("itemInHandRenderer"); @SuppressWarnings("unchecked") final Map<String, EntityRenderer<? extends Player>> playerRenderers = (Map<String, EntityRenderer<? extends Player>>)renderersField.get(dispatcher); final PonyPlayerWrapperRenderer renderer = new PonyPlayerWrapperRenderer( new EntityRendererProvider.Context( dispatcher, Minecraft.getInstance().getItemRenderer(), Minecraft.getInstance().getBlockRenderer(), (ItemInHandRenderer)itemInHandRenderer.get(dispatcher), Minecraft.getInstance().getResourceManager(), Minecraft.getInstance().getEntityModels(), Minecraft.getInstance().font ) ); playerRenderers.put("default", renderer); playerRenderers.put("slim", renderer); System.out.println("Player renderers replaced"); } catch (final Exception e) { throw new RuntimeException("Failed to replace player renderers", e); } }); } private static Field getEntityRenderDispatcherField(final String fieldName) throws NoSuchFieldException { final Field field = EntityRenderDispatcher.class.getDeclaredField(fieldName); field.setAccessible(true); return field; } } But I receive the error before Minecraft Client appears (RuntimeException: Failed to replace player renderers - from ClientRenderers onClientSetup() method - and its cause below): java.lang.IllegalArgumentException: No model for layer anotherlittlepony:earth_pony#main at net.minecraft.client.model.geom.EntityModelSet.bakeLayer(EntityModelSet.java:18) ~[forge-1.20.1-47.4.0_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.entity.EntityRendererProvider$Context.bakeLayer(EntityRendererProvider.java:69) ~[forge-1.20.1-47.4.0_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at com.thuggeelya.anotherlittlepony.client.renderer.pony.PonyPlayerRenderer.<init>(PonyPlayerRenderer.java:32) ~[main/:?] {re:classloading} at com.thuggeelya.anotherlittlepony.client.renderer.pony.PonyPlayerWrapperRenderer.<init>(PonyPlayerWrapperRenderer.java:24) ~[main/:?] {re:classloading} at com.thuggeelya.anotherlittlepony.client.renderer.ClientRenderers.lambda$onClientSetup$0(ClientRenderers.java:79) ~[main/:?] {re:classloading} ... 33 more Problem appears when EntityRendererProvider context tries to bakeLayer with my model layer location: new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)); // PonyPlayerRenderer.java:32 public class PonyModel extends PlayerModel<AbstractClientPlayer> { // the model class itself public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation( ResourceLocation.fromNamespaceAndPath(MODID, "earth_pony"), "main" ); public PonyModel(final ModelPart root) { super(root, false); } public static LayerDefinition createBodyLayer() { // some CubeListBuilder stuff for model appearance } } Textures PNGs are placed at: resources/assets/[my mod id]/textures/entity. My forge version is 1.20.1. Would appreciate any help.
    • Well, a bit more information about what you're trying to do would be helpful. e.g. why you're trying to use "INVOKE_ASSIGN" instead of "INVOKE". "INVOKE_ASSIGN" calls your code after the "target" is called and its value is stored, if applicable. "INVOKE" calls your code before the target is called. "target" expects a fully qualified name, as per the SpongePowered docs, if that name is going to be remapped (which it will be if your injecting into Minecraft itself and not another mod). For more information on fully qualified names versus canonical names, see the Java specifications. Here's an example of a working "@At" from my own code that targets the "getClosestsVulnerablePlayerToEntity" call inside a mob's logic: @At(value = "INVOKE_ASSIGN", target = "net.minecraft.world.World.getClosestVulnerablePlayerToEntity(Lnet/minecraft/entity/Entity;D)Lnet/minecraft/entity/player/EntityPlayer;") Hope this helps!
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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