Skip to content

Commit

Permalink
Update mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
thecatcore committed Sep 15, 2022
1 parent a9c128f commit 022f9a7
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void fabric_modifyResourcePackList(List<ResourcePack> list) {
}
}

@Inject(method = "stitchTextures", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
@Inject(method = "reloadResources", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
public void reloadResources(CallbackInfo ci, List<ResourcePack> list) {
fabric_modifyResourcePackList(list);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public abstract class MinecraftServerMixin implements MinecraftServerExtensions
public abstract boolean isOnThread();

@Shadow
public abstract ListenableFuture<Object> execute(Runnable task);
public abstract ListenableFuture<Object> submit(Runnable task);

@Override
public boolean isOnGameThread() {
Expand All @@ -40,6 +40,6 @@ public boolean isOnGameThread() {

@Override
public ListenableFuture<Object> executeTask(Runnable task) {
return this.execute(task);
return this.submit(task);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void fabric_modifyResourcePackList(List<ResourcePack> list) {
}
}

@Inject(method = "stitchTextures", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
@Inject(method = "reloadResources", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
public void reloadResources(CallbackInfo ci, List<ResourcePack> list) {
fabric_modifyResourcePackList(list);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public abstract class ClientChunkProviderMixin {
ClientChunkEvents.CHUNK_UNLOAD.invoker().onChunkUnload((ClientWorld) this.world, this.getChunk(i, j));
}

@Inject(at = @At("RETURN"), method = "method_3871", locals = LocalCapture.CAPTURE_FAILEXCEPTION)
@Inject(at = @At("RETURN"), method = "getOrGenerateChunk", locals = LocalCapture.CAPTURE_FAILEXCEPTION)
public void api$chunkLoad(int i, int j, CallbackInfoReturnable<Chunk> cir, Chunk chunk) {
ClientChunkEvents.CHUNK_LOAD.invoker().onChunkLoad((ClientWorld) this.world, chunk);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void fabric_modifyResourcePackList(List<ResourcePack> list) {
}
}

@Inject(method = "stitchTextures", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
@Inject(method = "reloadResources", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
public void reloadResources(CallbackInfo ci, ArrayList list) {
fabric_modifyResourcePackList(list);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public abstract class MinecraftServerMixin implements MinecraftServerExtensions
public abstract boolean isOnThread();

@Shadow
public abstract ListenableFuture<Object> execute(Runnable task);
public abstract ListenableFuture<Object> submit(Runnable task);

@Override
public boolean isOnGameThread() {
Expand All @@ -40,6 +40,6 @@ public boolean isOnGameThread() {

@Override
public ListenableFuture<Object> executeTask(Runnable task) {
return this.execute(task);
return this.submit(task);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

@Mixin(ItemRenderer.class)
public class ItemRendererMixin {
@Redirect(method = "method_10243", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/block/entity/BlockEntityItemStackRenderHelper;renderItem(Lnet/minecraft/item/ItemStack;)V"))
@Redirect(method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/BakedModel;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/block/entity/BlockEntityItemStackRenderHelper;renderItem(Lnet/minecraft/item/ItemStack;)V"))
public void onRender(BlockEntityItemStackRenderHelper instance, ItemStack stack, ItemStack itemStack, BakedModel bakedModel) {
BuiltinItemRendererRegistry.DynamicItemRenderer renderer = BuiltinItemRendererRegistryImpl.getRenderer(stack.getItem());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void fabric_modifyResourcePackList(List<ResourcePack> list) {
}
}

@Inject(method = "stitchTextures", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
@Inject(method = "reloadResources", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
public void reloadResources(CallbackInfo ci, List<ResourcePack> list) {
fabric_modifyResourcePackList(list);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private void fabric_modifyResourcePackList(List<ResourcePack> list) {
}
}

@Inject(method = "stitchTextures", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
@Inject(method = "reloadResources", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
public void reloadResources(CallbackInfo ci, ArrayList list) {
fabric_modifyResourcePackList(list);
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class MinecraftVersion {
this.userProperties = userProperties
}

public static final String MAPPINGS_BUILD = "382"
public static final String MAPPINGS_BUILD = "390"

public static MinecraftVersion[] VERSIONS = new MinecraftVersion[] {
new MinecraftVersion("1.12.2"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected void receive(ClientPlayNetworking.PlayChannelHandler handler, PacketBy

@Override
protected void schedule(Runnable task) {
MinecraftClient.getInstance().execute(task);
MinecraftClient.getInstance().submit(task);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void onInitializeClient() {
throw new UncheckedIOException(e);
}

client.execute(() -> ClientRegistryRemapper.getInstance().readAndRemap(nbt));
client.submit(() -> ClientRegistryRemapper.getInstance().readAndRemap(nbt));
});
}
}

0 comments on commit 022f9a7

Please sign in to comment.