MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / setValue

Method setValue

src/main/java/net/minecraft/world/GameRules.java:138–177  ·  view source on GitHub ↗
(String value)

Source from the content-addressed store, hash-verified

136 }
137
138 public void setValue(String value)
139 {
140 this.valueString = value;
141
142 if (value != null)
143 {
144 if (value.equals("false"))
145 {
146 this.valueBoolean = false;
147 return;
148 }
149
150 if (value.equals("true"))
151 {
152 this.valueBoolean = true;
153 return;
154 }
155 }
156
157 this.valueBoolean = Boolean.parseBoolean(value);
158 this.valueInteger = this.valueBoolean ? 1 : 0;
159
160 try
161 {
162 this.valueInteger = Integer.parseInt(value);
163 }
164 catch (NumberFormatException var4)
165 {
166 ;
167 }
168
169 try
170 {
171 this.valueDouble = Double.parseDouble(value);
172 }
173 catch (NumberFormatException var3)
174 {
175 ;
176 }
177 }
178
179 public String getGameRuleStringValue()
180 {

Callers 11

ValueMethod · 0.95
onCommandMethod · 0.95
readMethod · 0.95
fixModelLocationsMethod · 0.45
blendFuncMethod · 0.45
tryBlendFuncSeparateMethod · 0.45
glDrawArraysMethod · 0.45
callListMethod · 0.45
callListsMethod · 0.45
glMultiDrawArraysMethod · 0.45
setOrCreateGameRuleMethod · 0.45

Calls 4

parseDoubleMethod · 0.80
equalsMethod · 0.45
parseBooleanMethod · 0.45
parseIntMethod · 0.45

Tested by

no test coverage detected