Compare commits

...
12 Commits
Author SHA1 Message Date
LexManos 220cb1fd81 Update binpatcher version to decrease installer download size. 2020-02-03 13:41:18 -08:00
FenixFyreX 19abf0cb9a [1.14.4] Fix NPE on java 8u242 backport of PR #6473 (#6495) 2020-02-03 12:44:21 -08:00
DaemonUmbra 508d872ef3 Fixed Brown Mooshrooms dropping Red Mushrooms when sheared (#6476)
Backports 1.15.x code to 1.14.x
2020-01-29 09:16:25 -08:00
Wyn Price b67c37fd6c Fixed rounding issue with entity navigation fix (#6455) 2020-01-22 12:24:07 -07:00
KnightMiner d4a3762f21 [1.14] Add support for custom nether portal frame blocks (#6417) 2020-01-15 16:22:57 -08:00
tterrag 4c7f1096e5 Add constructor for FishBucketItem that accepts suppliers 2020-01-09 17:32:45 -05:00
Choonster TheMage 4ff65feb63 Deprecate ElementBuilder#rotation(BlockPartRotation) and add zero-parameter overload (fixes #6321) (#6338) 2020-01-07 12:02:08 -08:00
tterrag dbec9b3d5a Fix dyes tag containing dye items instead of tags
Update generated data
2020-01-05 19:05:09 -05:00
Richard Freimer 28515d7c59 Fix capabilities becoming inaccessible on returning from end (#6359) 2019-12-31 16:09:21 -08:00
David Quintana ca819e09f2 Revert one of the hunks of #6216, which was actually correct as it was. (#6337) 2019-12-31 16:09:07 -08:00
King Lemming d28cd0352b Make Minecarts work with modded powered/activator rails.
Re-adds functionality for rails to have different maximum speeds.
2019-12-23 19:34:43 -08:00
King Lemming a436118e39 Add FluidStack support to the Forge packet buffer. (#6353) 2019-12-22 22:21:38 -08:00
21 changed files with 225 additions and 44 deletions

No files matched your search

+1 -1
View File
@@ -192,7 +192,7 @@ project(':forge') {
MCP_ARTIFACT = project(':mcp').mcp.config
SPECIAL_SOURCE = 'net.md-5:SpecialSource:1.8.5'
VERSION_JSON = project(':mcp').file('build/mcp/downloadJson/version.json')
BINPATCH_TOOL = 'net.minecraftforge:binarypatcher:1.0.7:fatjar'
BINPATCH_TOOL = 'net.minecraftforge:binarypatcher:1.0.12:fatjar'
}
def getVersion = {
@@ -9,3 +9,48 @@
netherportalblock$size.func_150859_c();
return true;
} else {
@@ -245,13 +245,13 @@
int i;
for(i = 0; i < 22; ++i) {
BlockPos blockpos = p_180120_1_.func_177967_a(p_180120_2_, i);
- if (!this.func_196900_a(this.field_150867_a.func_180495_p(blockpos)) || this.field_150867_a.func_180495_p(blockpos.func_177977_b()).func_177230_c() != Blocks.field_150343_Z) {
+ if (!this.func_196900_a(this.field_150867_a.func_180495_p(blockpos)) || !this.field_150867_a.func_180495_p(blockpos.func_177977_b()).isPortalFrame(this.field_150867_a, blockpos.func_177977_b())) {
break;
}
}
- Block block = this.field_150867_a.func_180495_p(p_180120_1_.func_177967_a(p_180120_2_, i)).func_177230_c();
- return block == Blocks.field_150343_Z ? i : 0;
+ BlockPos framePos = p_180120_1_.func_177967_a(p_180120_2_, i);
+ return this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos) ? i : 0;
}
public int func_181100_a() {
@@ -278,13 +278,13 @@
}
if (i == 0) {
- block = this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150863_d)).func_177230_c();
- if (block != Blocks.field_150343_Z) {
+ BlockPos framePos = blockpos.func_177972_a(this.field_150863_d);
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
break label56;
}
} else if (i == this.field_150868_h - 1) {
- block = this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150866_c)).func_177230_c();
- if (block != Blocks.field_150343_Z) {
+ BlockPos framePos = blockpos.func_177972_a(this.field_150866_c);
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
break label56;
}
}
@@ -292,7 +292,8 @@
}
for(int j = 0; j < this.field_150868_h; ++j) {
- if (this.field_150867_a.func_180495_p(this.field_150861_f.func_177967_a(this.field_150866_c, j).func_177981_b(this.field_150862_g)).func_177230_c() != Blocks.field_150343_Z) {
+ BlockPos framePos = this.field_150861_f.func_177967_a(this.field_150866_c, j).func_177981_b(this.field_150862_g);
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
this.field_150862_g = 0;
break;
}
@@ -4,17 +4,17 @@
public class PoweredRailBlock extends AbstractRailBlock {
public static final EnumProperty<RailShape> field_176568_b = BlockStateProperties.field_208166_S;
public static final BooleanProperty field_176569_M = BlockStateProperties.field_208194_u;
+ private final boolean isActivator;
+ private final boolean isActivator; // TRUE for an Activator Rail, FALSE for Powered Rail
protected PoweredRailBlock(Block.Properties p_i48349_1_) {
- super(true, p_i48349_1_);
+ this(p_i48349_1_, false);
+ }
+
+ protected PoweredRailBlock(Block.Properties builder, boolean isActivator) {
+ protected PoweredRailBlock(Block.Properties builder, boolean isPoweredRail) {
+ super(true, builder);
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176568_b, RailShape.NORTH_SOUTH).func_206870_a(field_176569_M, Boolean.valueOf(false)));
+ this.isActivator = isActivator;
+ this.isActivator = !isPoweredRail;
}
protected boolean func_176566_a(World p_176566_1_, BlockPos p_176566_2_, BlockState p_176566_3_, boolean p_176566_4_, int p_176566_5_) {
@@ -35,3 +35,12 @@
return p_208071_1_.func_175640_z(p_208071_2_) ? true : this.func_176566_a(p_208071_1_, p_208071_2_, blockstate, p_208071_3_, p_208071_4_ + 1);
} else {
return false;
@@ -255,4 +261,8 @@
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
p_206840_1_.func_206894_a(field_176568_b, field_176569_M);
}
+
+ public boolean isActivatorRail() {
+ return isActivator;
+ }
}
@@ -27,12 +27,3 @@
return MemoryUtil.memByteBuffer(this.field_195722_d, this.field_195723_e).get((p_211675_1_ + p_211675_2_ * this.field_195719_a) * this.field_211680_b.func_211651_a() + this.field_211680_b.func_211647_v() / 8);
} else {
throw new IllegalArgumentException(String.format("(%s, %s) outside of image bounds (%s, %s)", p_211675_1_, p_211675_2_, this.field_195719_a, this.field_195720_b));
@@ -328,7 +328,7 @@
}
public void func_211676_a(STBTTFontinfo p_211676_1_, int p_211676_2_, int p_211676_3_, int p_211676_4_, float p_211676_5_, float p_211676_6_, float p_211676_7_, float p_211676_8_, int p_211676_9_, int p_211676_10_) {
- if (p_211676_9_ >= 0 && p_211676_9_ + p_211676_3_ <= this.func_195702_a() && p_211676_10_ >= 0 && p_211676_10_ + p_211676_4_ <= this.func_195714_b()) {
+ if (p_211676_9_ >= 0 && p_211676_9_ + p_211676_3_ < this.func_195702_a() && p_211676_10_ >= 0 && p_211676_10_ + p_211676_4_ < this.func_195714_b()) { //Fix MC-162953 bounds checks in `NativeImage`
if (this.field_211680_b.func_211651_a() != 1) {
throw new IllegalArgumentException("Can only write fonts into 1-component images.");
} else {
@@ -31,15 +31,18 @@
}
public double func_70042_X() {
@@ -214,7 +216,7 @@
@@ -214,9 +216,9 @@
BlockPos blockpos = new BlockPos(i, j, k);
BlockState blockstate = this.field_70170_p.func_180495_p(blockpos);
- if (blockstate.func_203425_a(BlockTags.field_203437_y)) {
+ if (canUseRail() && blockstate.func_203425_a(BlockTags.field_203437_y)) {
this.func_180460_a(blockpos, blockstate);
if (blockstate.func_177230_c() == Blocks.field_150408_cc) {
- if (blockstate.func_177230_c() == Blocks.field_150408_cc) {
+ if (blockstate.func_177230_c() instanceof PoweredRailBlock && ((PoweredRailBlock)blockstate.func_177230_c()).isActivatorRail()) {
this.func_96095_a(i, j, k, blockstate.func_177229_b(PoweredRailBlock.field_176569_M));
}
} else {
@@ -241,8 +243,11 @@
}
@@ -98,7 +101,13 @@
}
}
@@ -299,24 +313,24 @@
@@ -294,29 +308,29 @@
boolean flag = false;
boolean flag1 = false;
AbstractRailBlock abstractrailblock = (AbstractRailBlock)p_180460_2_.func_177230_c();
- if (abstractrailblock == Blocks.field_196552_aC) {
+ if (abstractrailblock instanceof PoweredRailBlock && !((PoweredRailBlock)abstractrailblock).isActivatorRail()) {
flag = p_180460_2_.func_177229_b(PoweredRailBlock.field_176569_M);
flag1 = !flag;
}
@@ -239,7 +248,7 @@
+ public void moveMinecartOnRail(BlockPos pos) { //Non-default because getMaximumSpeed is protected
+ AbstractMinecartEntity mc = getMinecart();
+ double d21 = mc.func_184207_aI() ? 0.75D : 1.0D;
+ double d22 = mc.func_174898_m();
+ double d22 = mc.getMaxSpeedWithRail();
+ Vec3d vec3d1 = mc.func_213322_ci();
+ mc.func_213315_a(MoverType.SELF, new Vec3d(MathHelper.func_151237_a(d21 * vec3d1.field_72450_a, -d22, d22), 0.0D, MathHelper.func_151237_a(d21 * vec3d1.field_72449_c, -d22, d22)));
+ }
@@ -42,7 +42,7 @@
+ }
+ this.field_70170_p.func_217376_c(entitycow);
+ for(int i = 0; i < 5; ++i) {
+ ret.add(new ItemStack(Blocks.field_150337_Q));
+ ret.add(new ItemStack(this.func_213444_dV().field_221099_d.func_177230_c()));
+ }
+ this.func_184185_a(SoundEvents.field_187784_dt, 1.0F, 1.0F);
+ }
@@ -17,7 +17,7 @@
BlockPos blockpos = new BlockPos(this.field_70165_t, this.field_70163_u, this.field_70161_v);
BlockState blockstate = Blocks.field_222388_bz.func_176223_P();
if (this.field_70170_p.func_180495_p(blockpos).func_196958_f() && blockstate.func_196955_c(this.field_70170_p, blockpos)) {
@@ -568,8 +569,10 @@
@@ -568,13 +569,15 @@
return this.field_71133_b.func_71219_W();
}
@@ -28,6 +28,12 @@
this.field_184851_cj = true;
DimensionType dimensiontype = this.field_71093_bK;
if (dimensiontype == DimensionType.field_223229_c_ && p_212321_1_ == DimensionType.field_223227_a_) {
this.func_213319_R();
- this.func_71121_q().func_217434_e(this);
+ this.func_71121_q().removePlayer(this, true); //Forge: The player entity is cloned so keep the data until after cloning calls copyFrom
if (!this.field_71136_j) {
this.field_71136_j = true;
this.field_71135_a.func_147359_a(new SChangeGameStatePacket(4, this.field_192040_cp ? 0.0F : 1.0F));
@@ -587,12 +590,13 @@
this.field_71093_bK = p_212321_1_;
ServerWorld serverworld1 = this.field_71133_b.func_71218_a(p_212321_1_);
@@ -0,0 +1,32 @@
--- a/net/minecraft/item/FishBucketItem.java
+++ b/net/minecraft/item/FishBucketItem.java
@@ -25,11 +25,19 @@
public class FishBucketItem extends BucketItem {
private final EntityType<?> field_203794_a;
+ @Deprecated
public FishBucketItem(EntityType<?> p_i49022_1_, Fluid p_i49022_2_, Item.Properties p_i49022_3_) {
super(p_i49022_2_, p_i49022_3_);
this.field_203794_a = p_i49022_1_;
+ this.fishTypeSupplier = () -> p_i49022_1_;
}
+ public FishBucketItem(java.util.function.Supplier<? extends EntityType<?>> fishTypeIn, java.util.function.Supplier<? extends Fluid> p_i49022_2_, Item.Properties builder) {
+ super(p_i49022_2_, builder);
+ this.field_203794_a = null;
+ this.fishTypeSupplier = fishTypeIn;
+ }
+
public void func_203792_a(World p_203792_1_, ItemStack p_203792_2_, BlockPos p_203792_3_) {
if (!p_203792_1_.field_72995_K) {
this.func_205357_b(p_203792_1_, p_203792_2_, p_203792_3_);
@@ -78,4 +86,9 @@
}
}
+
+ private final java.util.function.Supplier<? extends EntityType<?>> fishTypeSupplier;
+ protected EntityType<?> getFishType() {
+ return fishTypeSupplier.get();
+ }
}
@@ -0,0 +1,12 @@
--- a/net/minecraft/item/FlintAndSteelItem.java
+++ b/net/minecraft/item/FlintAndSteelItem.java
@@ -65,7 +65,8 @@
boolean flag = false;
for(Direction direction : Direction.Plane.HORIZONTAL) {
- if (p_219996_1_.func_180495_p(p_219996_2_.func_177972_a(direction)).func_177230_c() == Blocks.field_150343_Z && ((NetherPortalBlock)Blocks.field_150427_aO).func_201816_b(p_219996_1_, p_219996_2_) != null) {
+ BlockPos framePos = p_219996_2_.func_177972_a(direction);
+ if (p_219996_1_.func_180495_p(framePos).isPortalFrame(p_219996_1_, framePos) && ((NetherPortalBlock)Blocks.field_150427_aO).func_201816_b(p_219996_1_, p_219996_2_) != null) {
flag = true;
}
}
@@ -6,7 +6,7 @@
Vec3d vec3d1 = this.field_75514_c.func_186310_f();
- if (Math.abs(this.field_75515_a.field_70165_t - (vec3d1.field_72450_a + 0.5D)) < (double)this.field_188561_o && Math.abs(this.field_75515_a.field_70161_v - (vec3d1.field_72449_c + 0.5D)) < (double)this.field_188561_o && Math.abs(this.field_75515_a.field_70163_u - vec3d1.field_72448_b) < 1.0D) {
+ // Forge: fix MC-94054
+ if (Math.abs(this.field_75515_a.field_70165_t - (vec3d1.field_72450_a + (this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)this.field_188561_o && Math.abs(this.field_75515_a.field_70161_v - (vec3d1.field_72449_c + (this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)this.field_188561_o && Math.abs(this.field_75515_a.field_70163_u - vec3d1.field_72448_b) < 1.0D) {
+ if (Math.abs(this.field_75515_a.field_70165_t - (vec3d1.field_72450_a + (int)(this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)this.field_188561_o && Math.abs(this.field_75515_a.field_70161_v - (vec3d1.field_72449_c + (int)(this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)this.field_188561_o && Math.abs(this.field_75515_a.field_70163_u - vec3d1.field_72448_b) < 1.0D) {
this.field_75514_c.func_75872_c(this.field_75514_c.func_75873_e() + 1);
}
@@ -6,7 +6,7 @@
Vec3d vec3d2 = this.field_75514_c.func_186310_f();
- if (Math.abs(this.field_75515_a.field_70165_t - (vec3d2.field_72450_a + 0.5D)) < (double)f1 && Math.abs(this.field_75515_a.field_70161_v - (vec3d2.field_72449_c + 0.5D)) < (double)f1 && Math.abs(this.field_75515_a.field_70163_u - vec3d2.field_72448_b) < (double)(f1 * 2.0F)) {
+ // Forge: fix MC-94054
+ if (Math.abs(this.field_75515_a.field_70165_t - (vec3d2.field_72450_a + (this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)f1 && Math.abs(this.field_75515_a.field_70161_v - (vec3d2.field_72449_c + (this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)f1 && Math.abs(this.field_75515_a.field_70163_u - vec3d2.field_72448_b) < (double)(f1 * 2.0F)) {
+ if (Math.abs(this.field_75515_a.field_70165_t - (vec3d2.field_72450_a + (int)(this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)f1 && Math.abs(this.field_75515_a.field_70161_v - (vec3d2.field_72449_c + (int)(this.field_75515_a.func_213311_cf() + 1) / 2D)) < (double)f1 && Math.abs(this.field_75515_a.field_70163_u - vec3d2.field_72448_b) < (double)(f1 * 2.0F)) {
this.field_75514_c.func_75875_a();
}
@@ -2,7 +2,9 @@
"replace": false,
"values": [
"minecraft:dirt",
"minecraft:grass_block",
"minecraft:coarse_dirt",
"minecraft:podzol"
"minecraft:podzol",
"minecraft:mycelium"
]
}
@@ -1,21 +1,21 @@
{
"replace": false,
"values": [
"minecraft:white_dye",
"minecraft:orange_dye",
"minecraft:magenta_dye",
"minecraft:light_blue_dye",
"minecraft:yellow_dye",
"minecraft:lime_dye",
"minecraft:pink_dye",
"minecraft:gray_dye",
"minecraft:light_gray_dye",
"minecraft:cyan_dye",
"minecraft:purple_dye",
"minecraft:blue_dye",
"minecraft:brown_dye",
"minecraft:green_dye",
"minecraft:red_dye",
"minecraft:black_dye"
"#forge:dyes/white",
"#forge:dyes/orange",
"#forge:dyes/magenta",
"#forge:dyes/light_blue",
"#forge:dyes/yellow",
"#forge:dyes/lime",
"#forge:dyes/pink",
"#forge:dyes/gray",
"#forge:dyes/light_gray",
"#forge:dyes/cyan",
"#forge:dyes/purple",
"#forge:dyes/blue",
"#forge:dyes/brown",
"#forge:dyes/green",
"#forge:dyes/red",
"#forge:dyes/black"
]
}
@@ -367,7 +367,7 @@ public class ForgeHooksClient
{
MinecraftForge.EVENT_BUS.post(new EntityViewRenderEvent.RenderFogEvent(fogRenderer, renderer, info, partial, mode, distance));
}
public static EntityViewRenderEvent.CameraSetup onCameraSetup(GameRenderer renderer, ActiveRenderInfo info, float partial, float yaw, float pitch, float roll)
{
EntityViewRenderEvent.CameraSetup event = new EntityViewRenderEvent.CameraSetup(renderer, info, partial, yaw, pitch, roll);
@@ -370,7 +370,15 @@ public class ModelBuilder<T extends ModelBuilder<T>> extends ModelFile {
return faces.computeIfAbsent(dir, FaceBuilder::new);
}
/**
* @deprecated Use {@link #rotation()}
*/
@Deprecated
public RotationBuilder rotation(BlockPartRotation rotation) {
return rotation();
}
public RotationBuilder rotation() {
if (this.rotation == null) {
this.rotation = new RotationBuilder();
}
@@ -146,7 +146,7 @@ public class ForgeItemTagsProvider extends ItemTagsProvider
copy(Tags.Blocks.SUPPORTS_CONDUIT, Tags.Items.SUPPORTS_CONDUIT);
}
private void addColored(Consumer<Item> consumer, Tag<Item> group, String pattern)
private void addColored(Consumer<Tag<Item>> consumer, Tag<Item> group, String pattern)
{
String prefix = group.getId().getPath().toUpperCase(Locale.ENGLISH) + '_';
for (DyeColor color : DyeColor.values())
@@ -157,7 +157,7 @@ public class ForgeItemTagsProvider extends ItemTagsProvider
if (item == null || item == Items.AIR)
throw new IllegalStateException("Unknown vanilla item: " + key.toString());
getBuilder(tag).add(item);
consumer.accept(item);
consumer.accept(tag);
}
}
@@ -592,6 +592,20 @@ public interface IForgeBlock
{
return Tags.Blocks.SUPPORTS_BEACON.contains(state.getBlock());
}
/**
* Determines if this block can be used as part of a frame of a nether portal.
*
* @param state The current state
* @param world The current world
* @param pos Block position in world
* @return True, to support being part of a nether portal frame, false otherwise.
*/
default boolean isPortalFrame(BlockState state, IWorldReader world, BlockPos pos)
{
return state.getBlock() == Blocks.OBSIDIAN;
}
/**
* Gathers how much experience this block drops when broken.
*
@@ -514,6 +514,18 @@ public interface IForgeBlockState
return getBlockState().getBlock().isBeaconBase(getBlockState(), world, pos, beacon);
}
/**
* Determines if this block can be used as part of a frame of a nether portal.
*
* @param world The current world
* @param pos Block position in world
* @return True, to support being part of a nether portal frame, false otherwise.
*/
default boolean isPortalFrame(IWorldReader world, BlockPos pos)
{
return getBlockState().getBlock().isPortalFrame(getBlockState(), world, pos);
}
/**
* Gathers how much experience this block drops when broken.
*
@@ -22,6 +22,7 @@ package net.minecraftforge.common.extensions;
import com.google.common.base.Preconditions;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.registries.ForgeRegistry;
import net.minecraftforge.registries.IForgeRegistry;
import net.minecraftforge.registries.IForgeRegistryEntry;
@@ -126,4 +127,28 @@ public interface IForgePacketBuffer
throw new IllegalArgumentException("Attempted to read an registryValue of the wrong type from the Buffer!");
return value;
}
/**
* Writes a FluidStack to the packet buffer, easy enough. If EMPTY, writes a FALSE.
* This behavior provides parity with the ItemStack method in PacketBuffer.
*
* @param stack FluidStack to be written to the packet buffer.
*/
default void writeFluidStack(FluidStack stack)
{
if (stack.isEmpty()) {
getBuffer().writeBoolean(false);
} else {
getBuffer().writeBoolean(true);
stack.writeToPacket(getBuffer());
}
}
/**
* Reads a FluidStack from this buffer.
*/
default FluidStack readFluidStack()
{
return !getBuffer().readBoolean() ? FluidStack.EMPTY : FluidStack.readFromPacket(getBuffer());
}
}
@@ -61,6 +61,18 @@ function initializeCoreMod() {
asmapi.redirectFieldToMethod(classNode, fn, asmapi.mapMethod('func_220276_d'))
return classNode;
}
},
'fishbucketitem': {
'target': {
'type': 'CLASS',
'name': 'net.minecraft.item.FishBucketItem'
},
'transformer': function(classNode) {
var asmapi=Java.type('net.minecraftforge.coremod.api.ASMAPI')
var fn = asmapi.mapField('field_203794_a') // fishType - remap to mcp if necessary
asmapi.redirectFieldToMethod(classNode, fn, asmapi.mapMethod('getFishType'))
return classNode;
}
}
}
}
@@ -28,6 +28,7 @@ import cpw.mods.modlauncher.Launcher;
import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.Proxy;
import java.util.Arrays;
import java.util.Locale;
@@ -122,9 +123,12 @@ public class LaunchTesting
// hack the classloader now.
try
{
final Field sysPathsField = ClassLoader.class.getDeclaredField("sys_paths");
sysPathsField.setAccessible(true);
sysPathsField.set(null, null);
final Method initializePathMethod = ClassLoader.class.getDeclaredMethod("initializePath", String.class);
initializePathMethod.setAccessible(true);
final Object usrPathsValue = initializePathMethod.invoke(null, "java.library.path");
final Field usrPathsField = ClassLoader.class.getDeclaredField("usr_paths");
usrPathsField.setAccessible(true);
usrPathsField.set(null, usrPathsValue);
}
catch(Throwable t) {}
}