-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a545c1
commit 8aa8832
Showing
7 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...falsepattern/falsetweaks/mixin/mixins/common/compat/sc/BlockReinforcedFenceGateMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* This file is part of FalseTweaks. | ||
* | ||
* Copyright (C) 2022-2024 FalsePattern | ||
* All Rights Reserved | ||
* | ||
* The above copyright notice and this permission notice shall be included | ||
* in all copies or substantial portions of the Software. | ||
* | ||
* FalseTweaks is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* FalseTweaks is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with FalseTweaks. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.falsepattern.falsetweaks.mixin.mixins.common.compat.sc; | ||
|
||
import net.geforcemods.securitycraft.blocks.reinforced.BlockReinforcedFenceGate; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
import net.minecraft.block.BlockFenceGate; | ||
import net.minecraft.block.BlockStainedGlassPane; | ||
import cpw.mods.fml.common.ObfuscationReflectionHelper; | ||
|
||
@Mixin(BlockReinforcedFenceGate.class) | ||
public abstract class BlockReinforcedFenceGateMixin extends BlockFenceGate { | ||
@Redirect(method = "<init>", | ||
at = @At(value = "INVOKE", | ||
target = "Lcpw/mods/fml/common/ObfuscationReflectionHelper;setPrivateValue(Ljava/lang/Class;Ljava/lang/Object;Ljava/lang/Object;I)V"), | ||
require = 0, | ||
expect = 0) | ||
private <T, E> void fixPriv(Class<T> classToAccess, T instance, E value, int index) { | ||
ObfuscationReflectionHelper.setPrivateValue(classToAccess, instance, value, "field_149764_J", "blockMaterial"); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...falsepattern/falsetweaks/mixin/mixins/common/compat/sc/BlockReinforcedGlassPaneMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* This file is part of FalseTweaks. | ||
* | ||
* Copyright (C) 2022-2024 FalsePattern | ||
* All Rights Reserved | ||
* | ||
* The above copyright notice and this permission notice shall be included | ||
* in all copies or substantial portions of the Software. | ||
* | ||
* FalseTweaks is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* FalseTweaks is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with FalseTweaks. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.falsepattern.falsetweaks.mixin.mixins.common.compat.sc; | ||
|
||
import net.geforcemods.securitycraft.blocks.reinforced.BlockReinforcedFenceGate; | ||
import net.geforcemods.securitycraft.blocks.reinforced.BlockReinforcedGlassPane; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
import net.minecraft.block.BlockFenceGate; | ||
import net.minecraft.block.BlockPane; | ||
import net.minecraft.block.material.Material; | ||
import cpw.mods.fml.common.ObfuscationReflectionHelper; | ||
|
||
@Mixin(BlockReinforcedGlassPane.class) | ||
public abstract class BlockReinforcedGlassPaneMixin extends BlockPane { | ||
protected BlockReinforcedGlassPaneMixin(String p_i45432_1_, String p_i45432_2_, Material p_i45432_3_, boolean p_i45432_4_) { | ||
super(p_i45432_1_, p_i45432_2_, p_i45432_3_, p_i45432_4_); | ||
} | ||
|
||
@Redirect(method = "<init>", | ||
at = @At(value = "INVOKE", | ||
target = "Lcpw/mods/fml/relauncher/ReflectionHelper;setPrivateValue(Ljava/lang/Class;Ljava/lang/Object;Ljava/lang/Object;I)V"), | ||
require = 0, | ||
expect = 0) | ||
private <T, E> void fixPriv(Class<T> classToAccess, T instance, E value, int index) { | ||
isBlockContainer = true; | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
.../falsepattern/falsetweaks/mixin/mixins/common/compat/sc/BlockReinforcedIronBarsMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* This file is part of FalseTweaks. | ||
* | ||
* Copyright (C) 2022-2024 FalsePattern | ||
* All Rights Reserved | ||
* | ||
* The above copyright notice and this permission notice shall be included | ||
* in all copies or substantial portions of the Software. | ||
* | ||
* FalseTweaks is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* FalseTweaks is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with FalseTweaks. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.falsepattern.falsetweaks.mixin.mixins.common.compat.sc; | ||
|
||
import net.geforcemods.securitycraft.blocks.reinforced.BlockReinforcedFenceGate; | ||
import net.geforcemods.securitycraft.blocks.reinforced.BlockReinforcedIronBars; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
import net.minecraft.block.BlockPane; | ||
import net.minecraft.block.material.Material; | ||
|
||
@Mixin(BlockReinforcedIronBars.class) | ||
public abstract class BlockReinforcedIronBarsMixin extends BlockPane { | ||
protected BlockReinforcedIronBarsMixin(String p_i45432_1_, String p_i45432_2_, Material p_i45432_3_, boolean p_i45432_4_) { | ||
super(p_i45432_1_, p_i45432_2_, p_i45432_3_, p_i45432_4_); | ||
} | ||
|
||
@Redirect(method = "<init>", | ||
at = @At(value = "INVOKE", | ||
target = "Lcpw/mods/fml/common/ObfuscationReflectionHelper;setPrivateValue(Ljava/lang/Class;Ljava/lang/Object;Ljava/lang/Object;I)V"), | ||
require = 0, | ||
expect = 0) | ||
private <T, E> void fixPriv(Class<T> classToAccess, T instance, E value, int index) { | ||
this.stepSound = soundTypeMetal; | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...tern/falsetweaks/mixin/mixins/common/compat/sc/BlockReinforcedStainedGlassPanesMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* This file is part of FalseTweaks. | ||
* | ||
* Copyright (C) 2022-2024 FalsePattern | ||
* All Rights Reserved | ||
* | ||
* The above copyright notice and this permission notice shall be included | ||
* in all copies or substantial portions of the Software. | ||
* | ||
* FalseTweaks is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* FalseTweaks is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with FalseTweaks. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.falsepattern.falsetweaks.mixin.mixins.common.compat.sc; | ||
|
||
import net.geforcemods.securitycraft.blocks.reinforced.BlockReinforcedStainedGlassPanes; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
import net.minecraft.block.BlockStainedGlassPane; | ||
import cpw.mods.fml.common.ObfuscationReflectionHelper; | ||
|
||
@Mixin(BlockReinforcedStainedGlassPanes.class) | ||
public abstract class BlockReinforcedStainedGlassPanesMixin extends BlockStainedGlassPane { | ||
@Redirect(method = "<init>", | ||
at = @At(value = "INVOKE", | ||
target = "Lcpw/mods/fml/common/ObfuscationReflectionHelper;setPrivateValue(Ljava/lang/Class;Ljava/lang/Object;Ljava/lang/Object;I)V"), | ||
require = 0, | ||
expect = 0) | ||
private <T, E> void fixPriv(Class<T> classToAccess, T instance, E value, int index) { | ||
String field = ""; | ||
switch (index) { | ||
case 0: field = "field_150100_a"; break; | ||
case 2: field = "field_150101_M"; break; | ||
} | ||
ObfuscationReflectionHelper.setPrivateValue(classToAccess, instance, value, field); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters